# frozen_string_literal: true # Copyright 2023 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See 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 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, numeric_enums: true, raise_faraday_errors: false end ## # The effective universe domain # # @return [String] # def universe_domain @client_stub.universe_domain end ## # The effective endpoint # # @return [String] # def endpoint @client_stub.endpoint 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, options: options ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Cloud::ArtifactRegistry::V1::ListDockerImagesResponse.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result 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, options: options ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Cloud::ArtifactRegistry::V1::DockerImage.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result 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, options: options ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Cloud::ArtifactRegistry::V1::ListMavenArtifactsResponse.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result 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, options: options ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Cloud::ArtifactRegistry::V1::MavenArtifact.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result 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, options: options ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Cloud::ArtifactRegistry::V1::ListNpmPackagesResponse.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result 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, options: options ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Cloud::ArtifactRegistry::V1::NpmPackage.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result 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, options: options ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Cloud::ArtifactRegistry::V1::ListPythonPackagesResponse.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result 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, options: options ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Cloud::ArtifactRegistry::V1::PythonPackage.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result 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, options: options ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result 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, options: options ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result 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, options: options ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Cloud::ArtifactRegistry::V1::ListRepositoriesResponse.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result 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, options: options ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Cloud::ArtifactRegistry::V1::Repository.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result 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, options: options ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result 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, options: options ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Cloud::ArtifactRegistry::V1::Repository.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result 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, options: options ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result 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, options: options ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Cloud::ArtifactRegistry::V1::ListPackagesResponse.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result 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, options: options ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Cloud::ArtifactRegistry::V1::Package.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result 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, options: options ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result 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, options: options ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Cloud::ArtifactRegistry::V1::ListVersionsResponse.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result 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, options: options ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Cloud::ArtifactRegistry::V1::Version.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result 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, options: options ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result 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, options: options ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result 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, options: options ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Cloud::ArtifactRegistry::V1::ListFilesResponse.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result 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, options: options ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Cloud::ArtifactRegistry::V1::File.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result 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, options: options ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Cloud::ArtifactRegistry::V1::ListTagsResponse.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result 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, options: options ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Cloud::ArtifactRegistry::V1::Tag.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result 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, options: options ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Cloud::ArtifactRegistry::V1::Tag.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result 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, options: options ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Cloud::ArtifactRegistry::V1::Tag.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result 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, options: options ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result 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, options: options ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result 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, options: options ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result 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, options: options ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Iam::V1::TestIamPermissionsResponse.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result 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, options: options ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Cloud::ArtifactRegistry::V1::ProjectSettings.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result 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, options: options ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Cloud::ArtifactRegistry::V1::ProjectSettings.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result 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, options: options ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result 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, options: options ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Cloud::ArtifactRegistry::V1::VPCSCConfig.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result 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 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 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 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 end end end end end end end