From a24d2decd083b631ffd6fb0e216f09e11fadfa1b Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Sat, 20 Dec 2025 00:05:49 +0000 Subject: [PATCH 1/2] feat: add Fingerprint to Artifact Registry Version resource docs: update the description of ExportArtifact PiperOrigin-RevId: 846851972 Source-Link: https://github.com/googleapis/googleapis/commit/347b0e45a6ec42e183e44ce11e0cb0eaf7f24caa Source-Link: https://github.com/googleapis/googleapis-gen/commit/a4b09b2b952b9bbedd8cb1c98ab68299910e110c Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWFydGlmYWN0X3JlZ2lzdHJ5LXYxLy5Pd2xCb3QueWFtbCIsImgiOiJhNGIwOWIyYjk1MmI5YmJlZGQ4Y2IxYzk4YWI2ODI5OTkxMGUxMTBjIn0= --- .../.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 | 11 + .../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 | 53 + .../artifactregistry/v1/artifact_pb.rb | 63 + .../artifactregistry/v1/attachment_pb.rb | 52 + .../devtools/artifactregistry/v1/export_pb.rb | 52 + .../devtools/artifactregistry/v1/file_pb.rb | 56 + .../artifactregistry/v1/generic_pb.rb | 47 + .../devtools/artifactregistry/v1/go_pb.rb | 47 + .../artifactregistry/v1/kfp_artifact_pb.rb | 45 + .../artifactregistry/v1/package_pb.rb | 54 + .../artifactregistry/v1/repository_pb.rb | 96 + .../devtools/artifactregistry/v1/rule_pb.rb | 57 + .../artifactregistry/v1/service_pb.rb | 62 + .../v1/service_services_pb.rb | 172 + .../artifactregistry/v1/settings_pb.rb | 50 + .../devtools/artifactregistry/v1/tag_pb.rb | 52 + .../artifactregistry/v1/version_pb.rb | 63 + .../artifactregistry/v1/vpcsc_config_pb.rb | 50 + .../artifactregistry/v1/yum_artifact_pb.rb | 53 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 473 ++ .../proto_docs/google/api/field_behavior.rb | 85 + .../proto_docs/google/api/launch_stage.rb | 71 + .../proto_docs/google/api/resource.rb | 227 + .../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 | 208 + .../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 | 25 + 136 files changed, 35312 insertions(+) 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 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..9a210f1427c7 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/.toys.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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..6442df18fa2f --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/Gemfile @@ -0,0 +1,11 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.31.1" +gem "minitest", "~> 5.22" +gem "minitest-focus", "~> 1.4" +gem "minitest-rg", "~> 5.3" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-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..ef01c9da37a9 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/Rakefile @@ -0,0 +1,169 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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..ee7b90253d10 --- /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.1" + + gem.add_dependency "gapic-common", "~> 1.2" + gem.add_dependency "google-cloud-errors", "~> 1.0" + gem.add_dependency "google-cloud-location", "~> 1.0" + gem.add_dependency "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..fec79f60ab45 --- /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 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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..b0f3f509e3b6 --- /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 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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..1b492fb7d058 --- /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 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations 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..485ed8db3155 --- /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 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the 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..c06a8497a3c5 --- /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 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for 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..6d70643bab87 --- /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 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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..e3c7c2450918 --- /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 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for 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..6c1ef26366e5 --- /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 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations 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..fc505ec7912d --- /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 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the 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..02389dc54872 --- /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 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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..efe9630ebfef --- /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 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See 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..0dd3ef09536b --- /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 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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..b5e9a547c37e --- /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 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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..28de3ae7589a --- /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 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for 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..44593994e337 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/apt_artifact_pb.rb @@ -0,0 +1,53 @@ +# 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 + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.rpc.Status", "google/rpc/status.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module 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..36cf4cacffa4 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/artifact_pb.rb @@ -0,0 +1,63 @@ +# 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 + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module 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..18b03326e2d2 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/attachment_pb.rb @@ -0,0 +1,52 @@ +# 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 + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module 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..0da2a8320d33 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/export_pb.rb @@ -0,0 +1,52 @@ +# 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 + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.devtools.artifactregistry.v1.Version", "google/devtools/artifactregistry/v1/version.proto"], + ["google.devtools.artifactregistry.v1.Hash", "google/devtools/artifactregistry/v1/file.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module 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..880be8d33ef9 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/file_pb.rb @@ -0,0 +1,56 @@ +# 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\"\x93\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\":\n\x08HashType\x12\x19\n\x15HASH_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06SHA256\x10\x01\x12\x07\n\x03MD5\x10\x02\"\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 + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ["google.protobuf.FieldMask", "google/protobuf/field_mask.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module 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..6a8f9398efa8 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/generic_pb.rb @@ -0,0 +1,47 @@ +# 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 + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module 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..10495dc891f6 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/go_pb.rb @@ -0,0 +1,47 @@ +# 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 + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module 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..45875f46ee79 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/kfp_artifact_pb.rb @@ -0,0 +1,45 @@ +# 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 + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module 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..3a5b5d7b1d95 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/package_pb.rb @@ -0,0 +1,54 @@ +# 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 + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ["google.protobuf.FieldMask", "google/protobuf/field_mask.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module 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..9f6b0f4a7aaa --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/repository_pb.rb @@ -0,0 +1,96 @@ +# 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 + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.protobuf.Duration", "google/protobuf/duration.proto"], + ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ["google.protobuf.FieldMask", "google/protobuf/field_mask.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module 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..f6017afb3ab8 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/rule_pb.rb @@ -0,0 +1,57 @@ +# 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 + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.type.Expr", "google/type/expr.proto"], + ["google.protobuf.FieldMask", "google/protobuf/field_mask.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module 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..987a1d05ca80 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/service_pb.rb @@ -0,0 +1,62 @@ +# 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 + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module 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..431ca93e2ba5 --- /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 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF 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..105b628d5c69 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/settings_pb.rb @@ -0,0 +1,50 @@ +# 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 + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.protobuf.FieldMask", "google/protobuf/field_mask.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module 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..635b0c63877d --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/tag_pb.rb @@ -0,0 +1,52 @@ +# 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 + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.protobuf.FieldMask", "google/protobuf/field_mask.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module 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..cda147eff974 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/version_pb.rb @@ -0,0 +1,63 @@ +# 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 + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ["google.devtools.artifactregistry.v1.Tag", "google/devtools/artifactregistry/v1/tag.proto"], + ["google.protobuf.Struct", "google/protobuf/struct.proto"], + ["google.devtools.artifactregistry.v1.Hash", "google/devtools/artifactregistry/v1/file.proto"], + ["google.protobuf.FieldMask", "google/protobuf/field_mask.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module 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..1adc82508525 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/vpcsc_config_pb.rb @@ -0,0 +1,50 @@ +# 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 + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.protobuf.FieldMask", "google/protobuf/field_mask.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module 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..815ad73e6695 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/yum_artifact_pb.rb @@ -0,0 +1,53 @@ +# 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 + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.rpc.Status", "google/rpc/status.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module 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..c6b6b60729c9 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/api/client.rb @@ -0,0 +1,473 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # Required information for every language. + # @!attribute [rw] reference_docs_uri + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::String] + # Link to automatically generated reference documentation. Example: + # https://cloud.google.com/nodejs/docs/reference/asset/latest + # @!attribute [rw] destinations + # @return [::Array<::Google::Api::ClientLibraryDestination>] + # The destination where API teams want this client library to be published. + # @!attribute [rw] selective_gapic_generation + # @return [::Google::Api::SelectiveGapicGeneration] + # Configuration for which RPCs should be generated in the GAPIC client. + class CommonLanguageSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details about how and where to publish client libraries. + # @!attribute [rw] version + # @return [::String] + # Version of the API to apply these settings to. This is the full protobuf + # package for the API, ending in the version element. + # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". + # @!attribute [rw] launch_stage + # @return [::Google::Api::LaunchStage] + # Launch stage of this version of the API. + # @!attribute [rw] rest_numeric_enums + # @return [::Boolean] + # When using transport=rest, the client request will encode enums as + # numbers rather than strings. + # @!attribute [rw] java_settings + # @return [::Google::Api::JavaSettings] + # Settings for legacy Java features, supported in the Service YAML. + # @!attribute [rw] cpp_settings + # @return [::Google::Api::CppSettings] + # Settings for C++ client libraries. + # @!attribute [rw] php_settings + # @return [::Google::Api::PhpSettings] + # Settings for PHP client libraries. + # @!attribute [rw] python_settings + # @return [::Google::Api::PythonSettings] + # Settings for Python client libraries. + # @!attribute [rw] node_settings + # @return [::Google::Api::NodeSettings] + # Settings for Node client libraries. + # @!attribute [rw] dotnet_settings + # @return [::Google::Api::DotnetSettings] + # Settings for .NET client libraries. + # @!attribute [rw] ruby_settings + # @return [::Google::Api::RubySettings] + # Settings for Ruby client libraries. + # @!attribute [rw] go_settings + # @return [::Google::Api::GoSettings] + # Settings for Go client libraries. + class ClientLibrarySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # This message configures the settings for publishing [Google Cloud Client + # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) + # generated from the service config. + # @!attribute [rw] method_settings + # @return [::Array<::Google::Api::MethodSettings>] + # A list of API method settings, e.g. the behavior for methods that use the + # long-running operation pattern. + # @!attribute [rw] new_issue_uri + # @return [::String] + # Link to a *public* URI where users can report issues. Example: + # https://issuetracker.google.com/issues/new?component=190865&template=1161103 + # @!attribute [rw] documentation_uri + # @return [::String] + # Link to product home page. Example: + # https://cloud.google.com/asset-inventory/docs/overview + # @!attribute [rw] api_short_name + # @return [::String] + # Used as a tracking tag when collecting data about the APIs developer + # relations artifacts like docs, packages delivered to package managers, + # etc. Example: "speech". + # @!attribute [rw] github_label + # @return [::String] + # GitHub label to apply to issues and pull requests opened for this API. + # @!attribute [rw] codeowner_github_teams + # @return [::Array<::String>] + # GitHub teams to be added to CODEOWNERS in the directory in GitHub + # containing source code for the client libraries for this API. + # @!attribute [rw] doc_tag_prefix + # @return [::String] + # A prefix used in sample code when demarking regions to be included in + # documentation. + # @!attribute [rw] organization + # @return [::Google::Api::ClientLibraryOrganization] + # For whom the client library is being published. + # @!attribute [rw] library_settings + # @return [::Array<::Google::Api::ClientLibrarySettings>] + # Client library settings. If the same version string appears multiple + # times in this list, then the last one wins. Settings from earlier + # settings with the same version string are discarded. + # @!attribute [rw] proto_reference_documentation_uri + # @return [::String] + # Optional link to proto reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rpc + # @!attribute [rw] rest_reference_documentation_uri + # @return [::String] + # Optional link to REST reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rest + class Publishing + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Java client libraries. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Java. Clobbers the java_package option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.java.package_name" field + # in gapic.yaml. API teams should use the protobuf java_package option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 + # @!attribute [rw] service_class_names + # @return [::Google::Protobuf::Map{::String => ::String}] + # Configure the Java class name to use instead of the service's for its + # corresponding generated GAPIC client. Keys are fully-qualified + # service names as they appear in the protobuf (including the full + # the language_settings.java.interface_names" field in gapic.yaml. API + # teams should otherwise use the service name as it appears in the + # protobuf. + # + # Example of a YAML configuration:: + # + # publishing: + # java_settings: + # service_class_names: + # - google.pubsub.v1.Publisher: TopicAdmin + # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class JavaSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ServiceClassNamesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for C++ client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class CppSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Php client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class PhpSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Python client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] experimental_features + # @return [::Google::Api::PythonSettings::ExperimentalFeatures] + # Experimental features to be included during client library generation. + class PythonSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Experimental features to be included during client library generation. + # These fields will be deprecated once the feature graduates and is enabled + # by default. + # @!attribute [rw] rest_async_io_enabled + # @return [::Boolean] + # Enables generation of asynchronous REST clients if `rest` transport is + # enabled. By default, asynchronous REST clients will not be generated. + # This feature will be enabled by default 1 month after launching the + # feature in preview packages. + # @!attribute [rw] protobuf_pythonic_types_enabled + # @return [::Boolean] + # Enables generation of protobuf code using new types that are more + # Pythonic which are included in `protobuf>=5.29.x`. This feature will be + # enabled by default 1 month after launching the feature in preview + # packages. + # @!attribute [rw] unversioned_package_disabled + # @return [::Boolean] + # Disables generation of an unversioned Python package for this client + # library. This means that the module names will need to be versioned in + # import statements. For example `import google.cloud.library_v2` instead + # of `import google.cloud.library`. + class ExperimentalFeatures + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Node client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class NodeSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Dotnet client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from original service names to renamed versions. + # This is used when the default generated types + # would cause a naming conflict. (Neither name is + # fully-qualified.) + # Example: Subscriber to SubscriberServiceApi. + # @!attribute [rw] renamed_resources + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from full resource types to the effective short name + # for the resource. This is used when otherwise resource + # named from different services would cause naming collisions. + # Example entry: + # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" + # @!attribute [rw] ignored_resources + # @return [::Array<::String>] + # List of full resource types to ignore during generation. + # This is typically used for API-specific Location resources, + # which should be handled by the generator as if they were actually + # the common Location resources. + # Example entry: "documentai.googleapis.com/Location" + # @!attribute [rw] forced_namespace_aliases + # @return [::Array<::String>] + # Namespaces which must be aliased in snippets due to + # a known (but non-generator-predictable) naming collision + # @!attribute [rw] handwritten_signatures + # @return [::Array<::String>] + # Method signatures (in the form "service.method(signature)") + # which are provided separately, so shouldn't be generated. + # Snippets *calling* these methods are still generated, however. + class DotnetSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedResourcesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Ruby client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class RubySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Go client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map of service names to renamed services. Keys are the package relative + # service names and values are the name to be used for the service client + # and call options. + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin + class GoSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Describes the generator configuration for a method. + # @!attribute [rw] selector + # @return [::String] + # The fully qualified name of the method, for which the options below apply. + # This is used to find the method to apply the options. + # + # Example: + # + # publishing: + # method_settings: + # - selector: google.storage.control.v2.StorageControl.CreateFolder + # # method settings for CreateFolder... + # @!attribute [rw] long_running + # @return [::Google::Api::MethodSettings::LongRunning] + # Describes settings to use for long-running operations when generating + # API methods for RPCs. Complements RPCs that use the annotations in + # google/longrunning/operations.proto. + # + # Example of a YAML configuration:: + # + # publishing: + # method_settings: + # - selector: google.cloud.speech.v2.Speech.BatchRecognize + # long_running: + # initial_poll_delay: 60s # 1 minute + # poll_delay_multiplier: 1.5 + # max_poll_delay: 360s # 6 minutes + # total_poll_timeout: 54000s # 90 minutes + # @!attribute [rw] auto_populated_fields + # @return [::Array<::String>] + # List of top-level fields of the request message, that should be + # automatically populated by the client libraries based on their + # (google.api.field_info).format. Currently supported format: UUID4. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + class MethodSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes settings to use when generating API methods that use the + # long-running operation pattern. + # All default values below are from those used in the client library + # generators (e.g. + # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). + # @!attribute [rw] initial_poll_delay + # @return [::Google::Protobuf::Duration] + # Initial delay after which the first poll request will be made. + # Default value: 5 seconds. + # @!attribute [rw] poll_delay_multiplier + # @return [::Float] + # Multiplier to gradually increase delay between subsequent polls until it + # reaches max_poll_delay. + # Default value: 1.5. + # @!attribute [rw] max_poll_delay + # @return [::Google::Protobuf::Duration] + # Maximum time between two subsequent poll requests. + # Default value: 45 seconds. + # @!attribute [rw] total_poll_timeout + # @return [::Google::Protobuf::Duration] + # Total polling timeout. + # Default value: 5 minutes. + class LongRunning + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # This message is used to configure the generation of a subset of the RPCs in + # a service for client libraries. + # @!attribute [rw] methods + # @return [::Array<::String>] + # An allowlist of the fully qualified names of RPCs that should be included + # on public client surfaces. + # @!attribute [rw] generate_omitted_as_internal + # @return [::Boolean] + # Setting this to true indicates to the client generators that methods + # that would be excluded from the generation should instead be generated + # in a way that indicates these methods should not be consumed by + # end users. How this is expressed is up to individual language + # implementations to decide. Some examples may be: added annotations, + # obfuscated identifiers, or other language idiomatic patterns. + class SelectiveGapicGeneration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The organization for which the client libraries are being published. + # Affects the url where generated docs are published, etc. + module ClientLibraryOrganization + # Not useful. + CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 + + # Google Cloud Platform Org. + CLOUD = 1 + + # Ads (Advertising) Org. + ADS = 2 + + # Photos Org. + PHOTOS = 3 + + # Street View Org. + STREET_VIEW = 4 + + # Shopping Org. + SHOPPING = 5 + + # Geo Org. + GEO = 6 + + # Generative AI - https://developers.generativeai.google + GENERATIVE_AI = 7 + end + + # To where should client libraries be published? + module ClientLibraryDestination + # Client libraries will neither be generated nor published to package + # managers. + CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 + + # Generate the client library in a repo under github.com/googleapis, + # but don't publish it to package managers. + GITHUB = 10 + + # Publish the library to package managers like nuget.org and npmjs.com. + PACKAGE_MANAGER = 20 + end + end +end diff --git a/owl-bot-staging/google-cloud-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..fb9115c630af --- /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 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License 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..b836bdb60b21 --- /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 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License 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..71b994c7ef20 --- /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 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License 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..d90c70ab3ada --- /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 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for 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..f0e38edbd5ec --- /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 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for 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..f6ddcbb9645b --- /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 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for 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..08b7e3644546 --- /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 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for 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..d6b46319e746 --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/file.rb @@ -0,0 +1,208 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for 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 + 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..7b439bc7123f --- /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 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for 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..e01b46fffab7 --- /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 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for 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..3b3043a9b12e --- /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 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for 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..f1a7f888d1f7 --- /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 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for 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..48a623e6143b --- /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 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for 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..391c4a915fde --- /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 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for 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..736ea11305b0 --- /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 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for 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..9f525b8de256 --- /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 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for 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..7d9fc58a3a41 --- /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 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for 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..303c69e9d1c4 --- /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 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for 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..a60dd7a608ec --- /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 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for 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..5f97e9057caa --- /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 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for 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..fbee4c39d435 --- /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 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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..848f8c2f7895 --- /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 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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..79fdbd1e2eff --- /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 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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..f2d9d79d9da4 --- /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 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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..9e9bdbb09ea4 --- /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 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License 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..341efa296c29 --- /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 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for 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..c2acab1235a9 --- /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 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for 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..ad3c3ad25f0f --- /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 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License 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..b8b33e5c8cec --- /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 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License 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..a005f395ccab --- /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 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for 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..3f61f95b2587 --- /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 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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..9505eeb8657e --- /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 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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..dc2be1a2807b --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/Gemfile @@ -0,0 +1,32 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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..33275a764cb4 --- /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 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See 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..1756d1b8252e --- /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 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See 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..d00697a737ab --- /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 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See 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..06326f6d85a7 --- /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 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See 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..c7f64466777f --- /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 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See 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..527a7442ab10 --- /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 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See 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..41ab97d5b37f --- /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 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See 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..3e62198f7df8 --- /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 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See 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..8a6734561290 --- /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 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See 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..b24d73fb80ee --- /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 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See 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..59d0814bd39f --- /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 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See 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..6b27adc4114a --- /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 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See 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..67f78a084fa0 --- /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 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See 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..adddf1ec2342 --- /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 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See 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..68f65c35b304 --- /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 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See 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..7fd8cbc2bf75 --- /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 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See 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..2be135c5b578 --- /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 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See 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..2af66bb6f572 --- /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 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See 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..ab2ca7e9fd4d --- /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 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See 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..63f708effb60 --- /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 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See 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..b98c19f31c6d --- /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 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See 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..cbf4dcac6953 --- /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 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See 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..e6cc2c436a42 --- /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 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See 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..861544f43dc7 --- /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 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See 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..a685c71f7e4b --- /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 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See 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..3d3dfbea7ad2 --- /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 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See 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..17f18fc72acf --- /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 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See 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..08f0f60619ba --- /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 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See 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..936e75333707 --- /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 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See 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..1bf471a00963 --- /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 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See 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..e1e8ac294c78 --- /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 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See 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..c9dff0a29a88 --- /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 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See 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..8505ce6402fd --- /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 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See 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..498d2119e0ae --- /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 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See 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..533ef8e47a9a --- /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 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See 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..45a1035695c9 --- /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 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See 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..9806471378e2 --- /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 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See 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..8194b88d644a --- /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 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See 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..2f5a7620af2c --- /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 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See 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..e06f76756e3a --- /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 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See 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..3c8f64755fdb --- /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 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See 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..ce7d92cbf5d8 --- /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 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See 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..fb49db2310d0 --- /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 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See 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..112bfa5988e2 --- /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 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See 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..483b16bf6177 --- /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 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See 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..236a3aad301d --- /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 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See 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..8d1e836c9eed --- /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 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See 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..0f30119165fa --- /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 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See 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..3ec2d4bfaf0b --- /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 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See 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..993763103a45 --- /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 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See 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..51a878871f1d --- /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 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing 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..295cac2b471f --- /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 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions 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..0644ef709fce --- /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 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific 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..556c52fa656a --- /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 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing 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..968201e8049d --- /dev/null +++ b/owl-bot-staging/google-cloud-artifact_registry-v1/test/helper.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true + +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "minitest/autorun" +require "minitest/focus" +require "minitest/rg" + +require "grpc" + +require "ostruct" From 095ceb3a7938c47b377ed85fec8fe860f39f01c6 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Sat, 20 Dec 2025 00:08:41 +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 --- .../v1/artifact_registry/client.rb | 2 +- .../v1/artifact_registry/rest/client.rb | 2 +- .../v1/service_services_pb.rb | 2 +- .../artifactregistry/v1/version_pb.rb | 4 +- .../devtools/artifactregistry/v1/version.rb | 5 + .../.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 | 11 - .../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 | 53 - .../artifactregistry/v1/artifact_pb.rb | 63 - .../artifactregistry/v1/attachment_pb.rb | 52 - .../devtools/artifactregistry/v1/export_pb.rb | 52 - .../devtools/artifactregistry/v1/file_pb.rb | 56 - .../artifactregistry/v1/generic_pb.rb | 47 - .../devtools/artifactregistry/v1/go_pb.rb | 47 - .../artifactregistry/v1/kfp_artifact_pb.rb | 45 - .../artifactregistry/v1/package_pb.rb | 54 - .../artifactregistry/v1/repository_pb.rb | 96 - .../devtools/artifactregistry/v1/rule_pb.rb | 57 - .../artifactregistry/v1/service_pb.rb | 62 - .../v1/service_services_pb.rb | 172 - .../artifactregistry/v1/settings_pb.rb | 50 - .../devtools/artifactregistry/v1/tag_pb.rb | 52 - .../artifactregistry/v1/version_pb.rb | 63 - .../artifactregistry/v1/vpcsc_config_pb.rb | 50 - .../artifactregistry/v1/yum_artifact_pb.rb | 53 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 473 -- .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 - .../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 | 208 - .../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 | 25 - 141 files changed, 11 insertions(+), 35316 deletions(-) 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 diff --git a/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/client.rb b/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/client.rb index fc577288bf31..6d9bba9ae831 100644 --- a/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/client.rb +++ b/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/client.rb @@ -4913,7 +4913,7 @@ def delete_attachment request, options = nil end ## - # Exports an artifact. + # 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 diff --git a/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/rest/client.rb b/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/rest/client.rb index 63012f01a28e..5b745b3580d0 100644 --- a/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/rest/client.rb +++ b/google-cloud-artifact_registry-v1/lib/google/cloud/artifact_registry/v1/artifact_registry/rest/client.rb @@ -4564,7 +4564,7 @@ def delete_attachment request, options = nil end ## - # Exports an artifact. + # 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 diff --git a/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/service_services_pb.rb b/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/service_services_pb.rb index d286d8764251..43a7235b7680 100644 --- a/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/service_services_pb.rb +++ b/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/service_services_pb.rb @@ -160,7 +160,7 @@ class Service # 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. + # Exports an artifact to a Cloud Storage bucket. rpc :ExportArtifact, ::Google::Cloud::ArtifactRegistry::V1::ExportArtifactRequest, ::Google::Longrunning::Operation end diff --git a/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/version_pb.rb b/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/version_pb.rb index e61df2f70138..cda147eff974 100644 --- a/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/version_pb.rb +++ b/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/version_pb.rb @@ -6,13 +6,14 @@ 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/tag.proto\x1a google/protobuf/field_mask.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xa4\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\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" +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 @@ -30,6 +31,7 @@ ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], ["google.devtools.artifactregistry.v1.Tag", "google/devtools/artifactregistry/v1/tag.proto"], ["google.protobuf.Struct", "google/protobuf/struct.proto"], + ["google.devtools.artifactregistry.v1.Hash", "google/devtools/artifactregistry/v1/file.proto"], ["google.protobuf.FieldMask", "google/protobuf/field_mask.proto"], ] imports.each do |type_name, expected_filename| diff --git a/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/version.rb b/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/version.rb index 9e1c977c42f2..82f2cd70daf7 100644 --- a/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/version.rb +++ b/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/version.rb @@ -53,6 +53,11 @@ module V1 # @!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 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 9a210f1427c7..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/.toys.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 6442df18fa2f..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/Gemfile +++ /dev/null @@ -1,11 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.31.1" -gem "minitest", "~> 5.22" -gem "minitest-focus", "~> 1.4" -gem "minitest-rg", "~> 5.3" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-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 ef01c9da37a9..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/Rakefile +++ /dev/null @@ -1,169 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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 ee7b90253d10..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.1" - - gem.add_dependency "gapic-common", "~> 1.2" - gem.add_dependency "google-cloud-errors", "~> 1.0" - gem.add_dependency "google-cloud-location", "~> 1.0" - gem.add_dependency "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 fec79f60ab45..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 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 b0f3f509e3b6..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 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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 1b492fb7d058..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 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations 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 485ed8db3155..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 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the 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 c06a8497a3c5..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 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for 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 6d70643bab87..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 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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 e3c7c2450918..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 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for 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 6c1ef26366e5..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 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations 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 fc505ec7912d..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 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the 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 02389dc54872..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 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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 efe9630ebfef..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 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See 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 0dd3ef09536b..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 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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 b5e9a547c37e..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 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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 28de3ae7589a..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 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for 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 44593994e337..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/apt_artifact_pb.rb +++ /dev/null @@ -1,53 +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 - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ["google.rpc.Status", "google/rpc/status.proto"], - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module 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 36cf4cacffa4..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/artifact_pb.rb +++ /dev/null @@ -1,63 +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 - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module 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 18b03326e2d2..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/attachment_pb.rb +++ /dev/null @@ -1,52 +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 - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module 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 0da2a8320d33..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/export_pb.rb +++ /dev/null @@ -1,52 +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 - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ["google.devtools.artifactregistry.v1.Version", "google/devtools/artifactregistry/v1/version.proto"], - ["google.devtools.artifactregistry.v1.Hash", "google/devtools/artifactregistry/v1/file.proto"], - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module 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 880be8d33ef9..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/file_pb.rb +++ /dev/null @@ -1,56 +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\"\x93\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\":\n\x08HashType\x12\x19\n\x15HASH_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06SHA256\x10\x01\x12\x07\n\x03MD5\x10\x02\"\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 - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], - ["google.protobuf.FieldMask", "google/protobuf/field_mask.proto"], - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module 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 6a8f9398efa8..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/generic_pb.rb +++ /dev/null @@ -1,47 +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 - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module 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 10495dc891f6..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/go_pb.rb +++ /dev/null @@ -1,47 +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 - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module 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 45875f46ee79..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/kfp_artifact_pb.rb +++ /dev/null @@ -1,45 +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 - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module 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 3a5b5d7b1d95..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/package_pb.rb +++ /dev/null @@ -1,54 +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 - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], - ["google.protobuf.FieldMask", "google/protobuf/field_mask.proto"], - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module 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 9f6b0f4a7aaa..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/repository_pb.rb +++ /dev/null @@ -1,96 +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 - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ["google.protobuf.Duration", "google/protobuf/duration.proto"], - ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], - ["google.protobuf.FieldMask", "google/protobuf/field_mask.proto"], - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module 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 f6017afb3ab8..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/rule_pb.rb +++ /dev/null @@ -1,57 +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 - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ["google.type.Expr", "google/type/expr.proto"], - ["google.protobuf.FieldMask", "google/protobuf/field_mask.proto"], - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module 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 987a1d05ca80..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/service_pb.rb +++ /dev/null @@ -1,62 +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 - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module 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 431ca93e2ba5..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 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF 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 105b628d5c69..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/settings_pb.rb +++ /dev/null @@ -1,50 +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 - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ["google.protobuf.FieldMask", "google/protobuf/field_mask.proto"], - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module 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 635b0c63877d..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/tag_pb.rb +++ /dev/null @@ -1,52 +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 - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ["google.protobuf.FieldMask", "google/protobuf/field_mask.proto"], - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module 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 cda147eff974..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/version_pb.rb +++ /dev/null @@ -1,63 +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 - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], - ["google.devtools.artifactregistry.v1.Tag", "google/devtools/artifactregistry/v1/tag.proto"], - ["google.protobuf.Struct", "google/protobuf/struct.proto"], - ["google.devtools.artifactregistry.v1.Hash", "google/devtools/artifactregistry/v1/file.proto"], - ["google.protobuf.FieldMask", "google/protobuf/field_mask.proto"], - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module 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 1adc82508525..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/vpcsc_config_pb.rb +++ /dev/null @@ -1,50 +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 - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ["google.protobuf.FieldMask", "google/protobuf/field_mask.proto"], - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module 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 815ad73e6695..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/lib/google/devtools/artifactregistry/v1/yum_artifact_pb.rb +++ /dev/null @@ -1,53 +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 - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ["google.rpc.Status", "google/rpc/status.proto"], - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module 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 c6b6b60729c9..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/api/client.rb +++ /dev/null @@ -1,473 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # Required information for every language. - # @!attribute [rw] reference_docs_uri - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Link to automatically generated reference documentation. Example: - # https://cloud.google.com/nodejs/docs/reference/asset/latest - # @!attribute [rw] destinations - # @return [::Array<::Google::Api::ClientLibraryDestination>] - # The destination where API teams want this client library to be published. - # @!attribute [rw] selective_gapic_generation - # @return [::Google::Api::SelectiveGapicGeneration] - # Configuration for which RPCs should be generated in the GAPIC client. - class CommonLanguageSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details about how and where to publish client libraries. - # @!attribute [rw] version - # @return [::String] - # Version of the API to apply these settings to. This is the full protobuf - # package for the API, ending in the version element. - # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". - # @!attribute [rw] launch_stage - # @return [::Google::Api::LaunchStage] - # Launch stage of this version of the API. - # @!attribute [rw] rest_numeric_enums - # @return [::Boolean] - # When using transport=rest, the client request will encode enums as - # numbers rather than strings. - # @!attribute [rw] java_settings - # @return [::Google::Api::JavaSettings] - # Settings for legacy Java features, supported in the Service YAML. - # @!attribute [rw] cpp_settings - # @return [::Google::Api::CppSettings] - # Settings for C++ client libraries. - # @!attribute [rw] php_settings - # @return [::Google::Api::PhpSettings] - # Settings for PHP client libraries. - # @!attribute [rw] python_settings - # @return [::Google::Api::PythonSettings] - # Settings for Python client libraries. - # @!attribute [rw] node_settings - # @return [::Google::Api::NodeSettings] - # Settings for Node client libraries. - # @!attribute [rw] dotnet_settings - # @return [::Google::Api::DotnetSettings] - # Settings for .NET client libraries. - # @!attribute [rw] ruby_settings - # @return [::Google::Api::RubySettings] - # Settings for Ruby client libraries. - # @!attribute [rw] go_settings - # @return [::Google::Api::GoSettings] - # Settings for Go client libraries. - class ClientLibrarySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # This message configures the settings for publishing [Google Cloud Client - # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) - # generated from the service config. - # @!attribute [rw] method_settings - # @return [::Array<::Google::Api::MethodSettings>] - # A list of API method settings, e.g. the behavior for methods that use the - # long-running operation pattern. - # @!attribute [rw] new_issue_uri - # @return [::String] - # Link to a *public* URI where users can report issues. Example: - # https://issuetracker.google.com/issues/new?component=190865&template=1161103 - # @!attribute [rw] documentation_uri - # @return [::String] - # Link to product home page. Example: - # https://cloud.google.com/asset-inventory/docs/overview - # @!attribute [rw] api_short_name - # @return [::String] - # Used as a tracking tag when collecting data about the APIs developer - # relations artifacts like docs, packages delivered to package managers, - # etc. Example: "speech". - # @!attribute [rw] github_label - # @return [::String] - # GitHub label to apply to issues and pull requests opened for this API. - # @!attribute [rw] codeowner_github_teams - # @return [::Array<::String>] - # GitHub teams to be added to CODEOWNERS in the directory in GitHub - # containing source code for the client libraries for this API. - # @!attribute [rw] doc_tag_prefix - # @return [::String] - # A prefix used in sample code when demarking regions to be included in - # documentation. - # @!attribute [rw] organization - # @return [::Google::Api::ClientLibraryOrganization] - # For whom the client library is being published. - # @!attribute [rw] library_settings - # @return [::Array<::Google::Api::ClientLibrarySettings>] - # Client library settings. If the same version string appears multiple - # times in this list, then the last one wins. Settings from earlier - # settings with the same version string are discarded. - # @!attribute [rw] proto_reference_documentation_uri - # @return [::String] - # Optional link to proto reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rpc - # @!attribute [rw] rest_reference_documentation_uri - # @return [::String] - # Optional link to REST reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rest - class Publishing - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Java client libraries. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Java. Clobbers the java_package option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.java.package_name" field - # in gapic.yaml. API teams should use the protobuf java_package option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # corresponding generated GAPIC client. Keys are fully-qualified - # service names as they appear in the protobuf (including the full - # the language_settings.java.interface_names" field in gapic.yaml. API - # teams should otherwise use the service name as it appears in the - # protobuf. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class JavaSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ServiceClassNamesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for C++ client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class CppSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Php client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Python client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] experimental_features - # @return [::Google::Api::PythonSettings::ExperimentalFeatures] - # Experimental features to be included during client library generation. - class PythonSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Experimental features to be included during client library generation. - # These fields will be deprecated once the feature graduates and is enabled - # by default. - # @!attribute [rw] rest_async_io_enabled - # @return [::Boolean] - # Enables generation of asynchronous REST clients if `rest` transport is - # enabled. By default, asynchronous REST clients will not be generated. - # This feature will be enabled by default 1 month after launching the - # feature in preview packages. - # @!attribute [rw] protobuf_pythonic_types_enabled - # @return [::Boolean] - # Enables generation of protobuf code using new types that are more - # Pythonic which are included in `protobuf>=5.29.x`. This feature will be - # enabled by default 1 month after launching the feature in preview - # packages. - # @!attribute [rw] unversioned_package_disabled - # @return [::Boolean] - # Disables generation of an unversioned Python package for this client - # library. This means that the module names will need to be versioned in - # import statements. For example `import google.cloud.library_v2` instead - # of `import google.cloud.library`. - class ExperimentalFeatures - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Node client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class NodeSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Dotnet client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from original service names to renamed versions. - # This is used when the default generated types - # would cause a naming conflict. (Neither name is - # fully-qualified.) - # Example: Subscriber to SubscriberServiceApi. - # @!attribute [rw] renamed_resources - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from full resource types to the effective short name - # for the resource. This is used when otherwise resource - # named from different services would cause naming collisions. - # Example entry: - # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" - # @!attribute [rw] ignored_resources - # @return [::Array<::String>] - # List of full resource types to ignore during generation. - # This is typically used for API-specific Location resources, - # which should be handled by the generator as if they were actually - # the common Location resources. - # Example entry: "documentai.googleapis.com/Location" - # @!attribute [rw] forced_namespace_aliases - # @return [::Array<::String>] - # Namespaces which must be aliased in snippets due to - # a known (but non-generator-predictable) naming collision - # @!attribute [rw] handwritten_signatures - # @return [::Array<::String>] - # Method signatures (in the form "service.method(signature)") - # which are provided separately, so shouldn't be generated. - # Snippets *calling* these methods are still generated, however. - class DotnetSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedResourcesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Ruby client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class RubySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Go client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map of service names to renamed services. Keys are the package relative - # service names and values are the name to be used for the service client - # and call options. - # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin - class GoSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Describes the generator configuration for a method. - # @!attribute [rw] selector - # @return [::String] - # The fully qualified name of the method, for which the options below apply. - # This is used to find the method to apply the options. - # - # Example: - # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... - # @!attribute [rw] long_running - # @return [::Google::Api::MethodSettings::LongRunning] - # Describes settings to use for long-running operations when generating - # API methods for RPCs. Complements RPCs that use the annotations in - # google/longrunning/operations.proto. - # - # Example of a YAML configuration:: - # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes - # @!attribute [rw] auto_populated_fields - # @return [::Array<::String>] - # List of top-level fields of the request message, that should be - # automatically populated by the client libraries based on their - # (google.api.field_info).format. Currently supported format: UUID4. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes settings to use when generating API methods that use the - # long-running operation pattern. - # All default values below are from those used in the client library - # generators (e.g. - # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). - # @!attribute [rw] initial_poll_delay - # @return [::Google::Protobuf::Duration] - # Initial delay after which the first poll request will be made. - # Default value: 5 seconds. - # @!attribute [rw] poll_delay_multiplier - # @return [::Float] - # Multiplier to gradually increase delay between subsequent polls until it - # reaches max_poll_delay. - # Default value: 1.5. - # @!attribute [rw] max_poll_delay - # @return [::Google::Protobuf::Duration] - # Maximum time between two subsequent poll requests. - # Default value: 45 seconds. - # @!attribute [rw] total_poll_timeout - # @return [::Google::Protobuf::Duration] - # Total polling timeout. - # Default value: 5 minutes. - class LongRunning - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # This message is used to configure the generation of a subset of the RPCs in - # a service for client libraries. - # @!attribute [rw] methods - # @return [::Array<::String>] - # An allowlist of the fully qualified names of RPCs that should be included - # on public client surfaces. - # @!attribute [rw] generate_omitted_as_internal - # @return [::Boolean] - # Setting this to true indicates to the client generators that methods - # that would be excluded from the generation should instead be generated - # in a way that indicates these methods should not be consumed by - # end users. How this is expressed is up to individual language - # implementations to decide. Some examples may be: added annotations, - # obfuscated identifiers, or other language idiomatic patterns. - class SelectiveGapicGeneration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # Not useful. - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 - - # Google Cloud Platform Org. - CLOUD = 1 - - # Ads (Advertising) Org. - ADS = 2 - - # Photos Org. - PHOTOS = 3 - - # Street View Org. - STREET_VIEW = 4 - - # Shopping Org. - SHOPPING = 5 - - # Geo Org. - GEO = 6 - - # Generative AI - https://developers.generativeai.google - GENERATIVE_AI = 7 - end - - # To where should client libraries be published? - module ClientLibraryDestination - # Client libraries will neither be generated nor published to package - # managers. - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 - - # Generate the client library in a repo under github.com/googleapis, - # but don't publish it to package managers. - GITHUB = 10 - - # Publish the library to package managers like nuget.org and npmjs.com. - PACKAGE_MANAGER = 20 - end - end -end diff --git a/owl-bot-staging/google-cloud-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 fb9115c630af..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 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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 b836bdb60b21..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 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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 71b994c7ef20..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 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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 d90c70ab3ada..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 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for 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 f0e38edbd5ec..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 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for 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 f6ddcbb9645b..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 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for 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 08b7e3644546..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 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for 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 d6b46319e746..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/proto_docs/google/devtools/artifactregistry/v1/file.rb +++ /dev/null @@ -1,208 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for 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 - 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 7b439bc7123f..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 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for 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 e01b46fffab7..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 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for 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 3b3043a9b12e..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 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for 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 f1a7f888d1f7..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 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for 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 48a623e6143b..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 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for 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 391c4a915fde..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 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for 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 736ea11305b0..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 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for 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 9f525b8de256..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 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for 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 7d9fc58a3a41..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 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for 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 303c69e9d1c4..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 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for 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 a60dd7a608ec..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 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for 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 5f97e9057caa..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 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for 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 fbee4c39d435..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 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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 848f8c2f7895..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 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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 79fdbd1e2eff..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 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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 f2d9d79d9da4..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 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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 9e9bdbb09ea4..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 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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 341efa296c29..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 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for 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 c2acab1235a9..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 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for 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 ad3c3ad25f0f..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 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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 b8b33e5c8cec..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 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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 a005f395ccab..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 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for 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 3f61f95b2587..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 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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 9505eeb8657e..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 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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 dc2be1a2807b..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/snippets/Gemfile +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 33275a764cb4..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 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See 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 1756d1b8252e..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 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See 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 d00697a737ab..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 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See 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 06326f6d85a7..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 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See 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 c7f64466777f..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 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See 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 527a7442ab10..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 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See 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 41ab97d5b37f..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 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See 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 3e62198f7df8..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 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See 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 8a6734561290..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 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See 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 b24d73fb80ee..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 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See 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 59d0814bd39f..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 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See 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 6b27adc4114a..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 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See 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 67f78a084fa0..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 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See 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 adddf1ec2342..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 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See 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 68f65c35b304..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 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See 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 7fd8cbc2bf75..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 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See 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 2be135c5b578..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 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See 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 2af66bb6f572..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 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See 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 ab2ca7e9fd4d..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 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See 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 63f708effb60..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 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See 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 b98c19f31c6d..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 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See 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 cbf4dcac6953..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 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See 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 e6cc2c436a42..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 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See 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 861544f43dc7..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 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See 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 a685c71f7e4b..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 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See 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 3d3dfbea7ad2..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 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See 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 17f18fc72acf..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 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See 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 08f0f60619ba..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 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See 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 936e75333707..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 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See 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 1bf471a00963..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 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See 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 e1e8ac294c78..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 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See 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 c9dff0a29a88..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 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See 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 8505ce6402fd..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 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See 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 498d2119e0ae..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 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See 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 533ef8e47a9a..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 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See 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 45a1035695c9..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 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See 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 9806471378e2..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 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See 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 8194b88d644a..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 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See 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 2f5a7620af2c..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 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See 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 e06f76756e3a..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 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See 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 3c8f64755fdb..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 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See 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 ce7d92cbf5d8..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 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See 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 fb49db2310d0..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 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See 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 112bfa5988e2..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 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See 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 483b16bf6177..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 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See 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 236a3aad301d..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 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See 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 8d1e836c9eed..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 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See 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 0f30119165fa..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 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See 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 3ec2d4bfaf0b..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 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See 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 993763103a45..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 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See 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 51a878871f1d..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 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing 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 295cac2b471f..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 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions 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 0644ef709fce..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 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific 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 556c52fa656a..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 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing 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 968201e8049d..000000000000 --- a/owl-bot-staging/google-cloud-artifact_registry-v1/test/helper.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "minitest/autorun" -require "minitest/focus" -require "minitest/rg" - -require "grpc" - -require "ostruct"