From 569f007ca2d2833323e829a83103f82c85b641f3 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Sun, 29 Sep 2024 09:31:49 +0000 Subject: [PATCH] feat: Automated regeneration of artifactregistry v1 client --- api_names_out.yaml | 68 +++ .../CHANGELOG.md | 4 + .../apis/artifactregistry_v1/classes.rb | 243 ++++++++++ .../apis/artifactregistry_v1/gem_version.rb | 4 +- .../artifactregistry_v1/representations.rb | 98 ++++ .../apis/artifactregistry_v1/service.rb | 436 ++++++++++++++++++ 6 files changed, 851 insertions(+), 2 deletions(-) diff --git a/api_names_out.yaml b/api_names_out.yaml index 9e5324d3d29..e46cdf19270 100644 --- a/api_names_out.yaml +++ b/api_names_out.yaml @@ -38561,6 +38561,18 @@ "/artifactregistry:v1/AptRepository": apt_repository "/artifactregistry:v1/AptRepository/customRepository": custom_repository "/artifactregistry:v1/AptRepository/publicRepository": public_repository +"/artifactregistry:v1/Attachment": attachment +"/artifactregistry:v1/Attachment/annotations": annotations +"/artifactregistry:v1/Attachment/annotations/annotation": annotation +"/artifactregistry:v1/Attachment/attachmentNamespace": attachment_namespace +"/artifactregistry:v1/Attachment/createTime": create_time +"/artifactregistry:v1/Attachment/files": files +"/artifactregistry:v1/Attachment/files/file": file +"/artifactregistry:v1/Attachment/name": name +"/artifactregistry:v1/Attachment/ociVersionName": oci_version_name +"/artifactregistry:v1/Attachment/target": target +"/artifactregistry:v1/Attachment/type": type +"/artifactregistry:v1/Attachment/updateTime": update_time "/artifactregistry:v1/BatchDeleteVersionsMetadata": batch_delete_versions_metadata "/artifactregistry:v1/BatchDeleteVersionsMetadata/failedVersions": failed_versions "/artifactregistry:v1/BatchDeleteVersionsMetadata/failedVersions/failed_version": failed_version @@ -38633,6 +38645,8 @@ "/artifactregistry:v1/GoogetArtifact/name": name "/artifactregistry:v1/GoogetArtifact/packageName": package_name "/artifactregistry:v1/GoogleDevtoolsArtifactregistryV1File": google_devtools_artifactregistry_v1_file +"/artifactregistry:v1/GoogleDevtoolsArtifactregistryV1File/annotations": annotations +"/artifactregistry:v1/GoogleDevtoolsArtifactregistryV1File/annotations/annotation": annotation "/artifactregistry:v1/GoogleDevtoolsArtifactregistryV1File/createTime": create_time "/artifactregistry:v1/GoogleDevtoolsArtifactregistryV1File/fetchTime": fetch_time "/artifactregistry:v1/GoogleDevtoolsArtifactregistryV1File/hashes": hashes @@ -38659,6 +38673,12 @@ "/artifactregistry:v1/GoogleDevtoolsArtifactregistryV1RemoteRepositoryConfigYumRepositoryPublicRepository": google_devtools_artifactregistry_v1_remote_repository_config_yum_repository_public_repository "/artifactregistry:v1/GoogleDevtoolsArtifactregistryV1RemoteRepositoryConfigYumRepositoryPublicRepository/repositoryBase": repository_base "/artifactregistry:v1/GoogleDevtoolsArtifactregistryV1RemoteRepositoryConfigYumRepositoryPublicRepository/repositoryPath": repository_path +"/artifactregistry:v1/GoogleDevtoolsArtifactregistryV1Rule": google_devtools_artifactregistry_v1_rule +"/artifactregistry:v1/GoogleDevtoolsArtifactregistryV1Rule/action": action +"/artifactregistry:v1/GoogleDevtoolsArtifactregistryV1Rule/condition": condition +"/artifactregistry:v1/GoogleDevtoolsArtifactregistryV1Rule/name": name +"/artifactregistry:v1/GoogleDevtoolsArtifactregistryV1Rule/operation": operation +"/artifactregistry:v1/GoogleDevtoolsArtifactregistryV1Rule/packageId": package_id "/artifactregistry:v1/GoogleDevtoolsArtifactregistryV1alpha1ErrorInfo": google_devtools_artifactregistry_v1alpha1_error_info "/artifactregistry:v1/GoogleDevtoolsArtifactregistryV1alpha1ErrorInfo/error": error "/artifactregistry:v1/GoogleDevtoolsArtifactregistryV1alpha1ErrorInfo/gcsSource": gcs_source @@ -38733,6 +38753,10 @@ "/artifactregistry:v1/KfpArtifact": kfp_artifact "/artifactregistry:v1/KfpArtifact/name": name "/artifactregistry:v1/KfpArtifact/version": version +"/artifactregistry:v1/ListAttachmentsResponse": list_attachments_response +"/artifactregistry:v1/ListAttachmentsResponse/attachments": attachments +"/artifactregistry:v1/ListAttachmentsResponse/attachments/attachment": attachment +"/artifactregistry:v1/ListAttachmentsResponse/nextPageToken": next_page_token "/artifactregistry:v1/ListDockerImagesResponse": list_docker_images_response "/artifactregistry:v1/ListDockerImagesResponse/dockerImages": docker_images "/artifactregistry:v1/ListDockerImagesResponse/dockerImages/docker_image": docker_image @@ -38769,6 +38793,10 @@ "/artifactregistry:v1/ListRepositoriesResponse/nextPageToken": next_page_token "/artifactregistry:v1/ListRepositoriesResponse/repositories": repositories "/artifactregistry:v1/ListRepositoriesResponse/repositories/repository": repository +"/artifactregistry:v1/ListRulesResponse": list_rules_response +"/artifactregistry:v1/ListRulesResponse/nextPageToken": next_page_token +"/artifactregistry:v1/ListRulesResponse/rules": rules +"/artifactregistry:v1/ListRulesResponse/rules/rule": rule "/artifactregistry:v1/ListTagsResponse": list_tags_response "/artifactregistry:v1/ListTagsResponse/nextPageToken": next_page_token "/artifactregistry:v1/ListTagsResponse/tags": tags @@ -38906,6 +38934,10 @@ "/artifactregistry:v1/UploadAptArtifactResponse": upload_apt_artifact_response "/artifactregistry:v1/UploadAptArtifactResponse/aptArtifacts": apt_artifacts "/artifactregistry:v1/UploadAptArtifactResponse/aptArtifacts/apt_artifact": apt_artifact +"/artifactregistry:v1/UploadFileMediaResponse": upload_file_media_response +"/artifactregistry:v1/UploadFileMediaResponse/operation": operation +"/artifactregistry:v1/UploadFileRequest": upload_file_request +"/artifactregistry:v1/UploadFileRequest/fileId": file_id "/artifactregistry:v1/UploadGenericArtifactMediaResponse": upload_generic_artifact_media_response "/artifactregistry:v1/UploadGenericArtifactMediaResponse/operation": operation "/artifactregistry:v1/UploadGenericArtifactMetadata": upload_generic_artifact_metadata @@ -38955,6 +38987,8 @@ "/artifactregistry:v1/VPCSCConfig/name": name "/artifactregistry:v1/VPCSCConfig/vpcscPolicy": vpcsc_policy "/artifactregistry:v1/Version": version +"/artifactregistry:v1/Version/annotations": annotations +"/artifactregistry:v1/Version/annotations/annotation": annotation "/artifactregistry:v1/Version/createTime": create_time "/artifactregistry:v1/Version/description": description "/artifactregistry:v1/Version/metadata": metadata @@ -39006,6 +39040,18 @@ "/artifactregistry:v1/artifactregistry.projects.locations.repositories.aptArtifacts.upload/parent": parent "/artifactregistry:v1/artifactregistry.projects.locations.repositories.aptartifacts.upload": upload_aptartifact_apt_artifact "/artifactregistry:v1/artifactregistry.projects.locations.repositories.aptartifacts.upload/parent": parent +"/artifactregistry:v1/artifactregistry.projects.locations.repositories.attachments.create": create_project_location_repository_attachment +"/artifactregistry:v1/artifactregistry.projects.locations.repositories.attachments.create/attachmentId": attachment_id +"/artifactregistry:v1/artifactregistry.projects.locations.repositories.attachments.create/parent": parent +"/artifactregistry:v1/artifactregistry.projects.locations.repositories.attachments.delete": delete_project_location_repository_attachment +"/artifactregistry:v1/artifactregistry.projects.locations.repositories.attachments.delete/name": name +"/artifactregistry:v1/artifactregistry.projects.locations.repositories.attachments.get": get_project_location_repository_attachment +"/artifactregistry:v1/artifactregistry.projects.locations.repositories.attachments.get/name": name +"/artifactregistry:v1/artifactregistry.projects.locations.repositories.attachments.list": list_project_location_repository_attachments +"/artifactregistry:v1/artifactregistry.projects.locations.repositories.attachments.list/filter": filter +"/artifactregistry:v1/artifactregistry.projects.locations.repositories.attachments.list/pageSize": page_size +"/artifactregistry:v1/artifactregistry.projects.locations.repositories.attachments.list/pageToken": page_token +"/artifactregistry:v1/artifactregistry.projects.locations.repositories.attachments.list/parent": parent "/artifactregistry:v1/artifactregistry.projects.locations.repositories.create": create_project_location_repository "/artifactregistry:v1/artifactregistry.projects.locations.repositories.create/parent": parent "/artifactregistry:v1/artifactregistry.projects.locations.repositories.create/repositoryId": repository_id @@ -39030,6 +39076,11 @@ "/artifactregistry:v1/artifactregistry.projects.locations.repositories.files.list/pageSize": page_size "/artifactregistry:v1/artifactregistry.projects.locations.repositories.files.list/pageToken": page_token "/artifactregistry:v1/artifactregistry.projects.locations.repositories.files.list/parent": parent +"/artifactregistry:v1/artifactregistry.projects.locations.repositories.files.patch": patch_project_location_repository_file +"/artifactregistry:v1/artifactregistry.projects.locations.repositories.files.patch/name": name +"/artifactregistry:v1/artifactregistry.projects.locations.repositories.files.patch/updateMask": update_mask +"/artifactregistry:v1/artifactregistry.projects.locations.repositories.files.upload": upload_file +"/artifactregistry:v1/artifactregistry.projects.locations.repositories.files.upload/parent": parent "/artifactregistry:v1/artifactregistry.projects.locations.repositories.genericArtifacts.upload": upload_generic_artifact "/artifactregistry:v1/artifactregistry.projects.locations.repositories.genericArtifacts.upload/parent": parent "/artifactregistry:v1/artifactregistry.projects.locations.repositories.get": get_project_location_repository @@ -39110,6 +39161,9 @@ "/artifactregistry:v1/artifactregistry.projects.locations.repositories.packages.versions.list/pageToken": page_token "/artifactregistry:v1/artifactregistry.projects.locations.repositories.packages.versions.list/parent": parent "/artifactregistry:v1/artifactregistry.projects.locations.repositories.packages.versions.list/view": view +"/artifactregistry:v1/artifactregistry.projects.locations.repositories.packages.versions.patch": patch_project_location_repository_package_version +"/artifactregistry:v1/artifactregistry.projects.locations.repositories.packages.versions.patch/name": name +"/artifactregistry:v1/artifactregistry.projects.locations.repositories.packages.versions.patch/updateMask": update_mask "/artifactregistry:v1/artifactregistry.projects.locations.repositories.patch": patch_project_location_repository "/artifactregistry:v1/artifactregistry.projects.locations.repositories.patch/name": name "/artifactregistry:v1/artifactregistry.projects.locations.repositories.patch/updateMask": update_mask @@ -39119,6 +39173,20 @@ "/artifactregistry:v1/artifactregistry.projects.locations.repositories.pythonPackages.list/pageSize": page_size "/artifactregistry:v1/artifactregistry.projects.locations.repositories.pythonPackages.list/pageToken": page_token "/artifactregistry:v1/artifactregistry.projects.locations.repositories.pythonPackages.list/parent": parent +"/artifactregistry:v1/artifactregistry.projects.locations.repositories.rules.create": create_project_location_repository_rule +"/artifactregistry:v1/artifactregistry.projects.locations.repositories.rules.create/parent": parent +"/artifactregistry:v1/artifactregistry.projects.locations.repositories.rules.create/ruleId": rule_id +"/artifactregistry:v1/artifactregistry.projects.locations.repositories.rules.delete": delete_project_location_repository_rule +"/artifactregistry:v1/artifactregistry.projects.locations.repositories.rules.delete/name": name +"/artifactregistry:v1/artifactregistry.projects.locations.repositories.rules.get": get_project_location_repository_rule +"/artifactregistry:v1/artifactregistry.projects.locations.repositories.rules.get/name": name +"/artifactregistry:v1/artifactregistry.projects.locations.repositories.rules.list": list_project_location_repository_rules +"/artifactregistry:v1/artifactregistry.projects.locations.repositories.rules.list/pageSize": page_size +"/artifactregistry:v1/artifactregistry.projects.locations.repositories.rules.list/pageToken": page_token +"/artifactregistry:v1/artifactregistry.projects.locations.repositories.rules.list/parent": parent +"/artifactregistry:v1/artifactregistry.projects.locations.repositories.rules.patch": patch_project_location_repository_rule +"/artifactregistry:v1/artifactregistry.projects.locations.repositories.rules.patch/name": name +"/artifactregistry:v1/artifactregistry.projects.locations.repositories.rules.patch/updateMask": update_mask "/artifactregistry:v1/artifactregistry.projects.locations.repositories.setIamPolicy": set_repository_iam_policy "/artifactregistry:v1/artifactregistry.projects.locations.repositories.setIamPolicy/resource": resource "/artifactregistry:v1/artifactregistry.projects.locations.repositories.testIamPermissions": test_repository_iam_permissions diff --git a/generated/google-apis-artifactregistry_v1/CHANGELOG.md b/generated/google-apis-artifactregistry_v1/CHANGELOG.md index 3dd42daae7e..87445db783b 100644 --- a/generated/google-apis-artifactregistry_v1/CHANGELOG.md +++ b/generated/google-apis-artifactregistry_v1/CHANGELOG.md @@ -1,5 +1,9 @@ # Release history for google-apis-artifactregistry_v1 +### v0.67.0 (2024-09-29) + +* Regenerated from discovery document revision 20240923 + ### v0.66.0 (2024-09-08) * Regenerated from discovery document revision 20240903 diff --git a/generated/google-apis-artifactregistry_v1/lib/google/apis/artifactregistry_v1/classes.rb b/generated/google-apis-artifactregistry_v1/lib/google/apis/artifactregistry_v1/classes.rb index ba23558c872..a1bdc1ec137 100644 --- a/generated/google-apis-artifactregistry_v1/lib/google/apis/artifactregistry_v1/classes.rb +++ b/generated/google-apis-artifactregistry_v1/lib/google/apis/artifactregistry_v1/classes.rb @@ -100,6 +100,85 @@ def update!(**args) end end + # An Attachment refers to additional metadata that can be attached to artifacts + # in ArtifactRegistry. An attachment consists of one or more files. + class Attachment + include Google::Apis::Core::Hashable + + # 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. Client specified + # annotations. + # Corresponds to the JSON property `annotations` + # @return [Hash] + attr_accessor :annotations + + # The namespace this attachment belongs to. E.g. If an Attachment is created by + # artifact analysis, namespace is set to artifactanalysis.googleapis.com. + # Corresponds to the JSON property `attachmentNamespace` + # @return [String] + attr_accessor :attachment_namespace + + # Output only. The time when the attachment was created. + # Corresponds to the JSON property `createTime` + # @return [String] + attr_accessor :create_time + + # Required. The files that blong to this Attachment. If the file ID part + # contains slashes, they are escaped. E.g. "projects/p1/locations/us-central1/ + # repositories/repo1/files/sha:". + # Corresponds to the JSON property `files` + # @return [Array] + attr_accessor :files + + # The name of the attachment. E.g. "projects/p1/locations/us/repositories/repo/ + # attachments/sbom". + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # 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". + # Corresponds to the JSON property `ociVersionName` + # @return [String] + attr_accessor :oci_version_name + + # 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". + # Corresponds to the JSON property `target` + # @return [String] + attr_accessor :target + + # Type of Attachment. E.g. application/vnd.spdx+jsonn + # Corresponds to the JSON property `type` + # @return [String] + attr_accessor :type + + # Output only. The time when the attachment was last updated. + # Corresponds to the JSON property `updateTime` + # @return [String] + attr_accessor :update_time + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @annotations = args[:annotations] if args.key?(:annotations) + @attachment_namespace = args[:attachment_namespace] if args.key?(:attachment_namespace) + @create_time = args[:create_time] if args.key?(:create_time) + @files = args[:files] if args.key?(:files) + @name = args[:name] if args.key?(:name) + @oci_version_name = args[:oci_version_name] if args.key?(:oci_version_name) + @target = args[:target] if args.key?(:target) + @type = args[:type] if args.key?(:type) + @update_time = args[:update_time] if args.key?(:update_time) + end + end + # The metadata of an LRO from deleting multiple versions. class BatchDeleteVersionsMetadata include Google::Apis::Core::Hashable @@ -706,6 +785,11 @@ def update!(**args) class GoogleDevtoolsArtifactregistryV1File include Google::Apis::Core::Hashable + # Optional. Client specified annotations. + # Corresponds to the JSON property `annotations` + # @return [Hash] + attr_accessor :annotations + # Output only. The time when the File was created. # Corresponds to the JSON property `createTime` # @return [String] @@ -750,6 +834,7 @@ def initialize(**args) # Update properties of this object def update!(**args) + @annotations = args[:annotations] if args.key?(:annotations) @create_time = args[:create_time] if args.key?(:create_time) @fetch_time = args[:fetch_time] if args.key?(:fetch_time) @hashes = args[:hashes] if args.key?(:hashes) @@ -932,6 +1017,66 @@ def update!(**args) end end + # A Rule applies to repository or package level. It defines the deny or allow + # action of the operation when the conditions in the rule are met. + class GoogleDevtoolsArtifactregistryV1Rule + include Google::Apis::Core::Hashable + + # The action this rule makes. + # Corresponds to the JSON property `action` + # @return [String] + attr_accessor :action + + # 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. + # Corresponds to the JSON property `condition` + # @return [Google::Apis::ArtifactregistryV1::Expr] + attr_accessor :condition + + # The name of the rule, for example: "projects/p1/locations/us-central1/ + # repositories/repo1/rules/rule1". + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # + # Corresponds to the JSON property `operation` + # @return [String] + attr_accessor :operation + + # The package ID the rule applies to. If empty, this rule applies to all the + # packages inside the repository. + # Corresponds to the JSON property `packageId` + # @return [String] + attr_accessor :package_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @action = args[:action] if args.key?(:action) + @condition = args[:condition] if args.key?(:condition) + @name = args[:name] if args.key?(:name) + @operation = args[:operation] if args.key?(:operation) + @package_id = args[:package_id] if args.key?(:package_id) + end + end + # A hash of file content. class HashProp include Google::Apis::Core::Hashable @@ -1326,6 +1471,32 @@ def update!(**args) end end + # The response from listing attachments. + class ListAttachmentsResponse + include Google::Apis::Core::Hashable + + # The Attachments returned. + # Corresponds to the JSON property `attachments` + # @return [Array] + attr_accessor :attachments + + # The token to retrieve the next page of attachments, or empty if there are no + # more attachments to return. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @attachments = args[:attachments] if args.key?(:attachments) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + end + end + # The response from listing docker images. class ListDockerImagesResponse include Google::Apis::Core::Hashable @@ -1533,6 +1704,32 @@ def update!(**args) end end + # The response from listing rules. + class ListRulesResponse + include Google::Apis::Core::Hashable + + # The token to retrieve the next page of rules, or empty if there are no more + # rules to return. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + # The rules returned. + # Corresponds to the JSON property `rules` + # @return [Array] + attr_accessor :rules + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + @rules = args[:rules] if args.key?(:rules) + end + end + # The response from listing tags. class ListTagsResponse include Google::Apis::Core::Hashable @@ -2599,6 +2796,46 @@ def update!(**args) end end + # The response to upload a generic artifact. + class UploadFileMediaResponse + include Google::Apis::Core::Hashable + + # This resource represents a long-running operation that is the result of a + # network API call. + # Corresponds to the JSON property `operation` + # @return [Google::Apis::ArtifactregistryV1::Operation] + attr_accessor :operation + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @operation = args[:operation] if args.key?(:operation) + end + end + + # The request to upload a file. + class UploadFileRequest + include Google::Apis::Core::Hashable + + # Optional. The ID of the file. If left empty will default to sha256 digest of + # the content uploaded. + # Corresponds to the JSON property `fileId` + # @return [String] + attr_accessor :file_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @file_id = args[:file_id] if args.key?(:file_id) + end + end + # The response to upload a generic artifact. class UploadGenericArtifactMediaResponse include Google::Apis::Core::Hashable @@ -3023,6 +3260,11 @@ def update!(**args) class Version include Google::Apis::Core::Hashable + # Optional. Client specified annotations. + # Corresponds to the JSON property `annotations` + # @return [Hash] + attr_accessor :annotations + # The time when the version was created. # Corresponds to the JSON property `createTime` # @return [String] @@ -3064,6 +3306,7 @@ def initialize(**args) # Update properties of this object def update!(**args) + @annotations = args[:annotations] if args.key?(:annotations) @create_time = args[:create_time] if args.key?(:create_time) @description = args[:description] if args.key?(:description) @metadata = args[:metadata] if args.key?(:metadata) diff --git a/generated/google-apis-artifactregistry_v1/lib/google/apis/artifactregistry_v1/gem_version.rb b/generated/google-apis-artifactregistry_v1/lib/google/apis/artifactregistry_v1/gem_version.rb index b0f51b9132c..2c1902056b6 100644 --- a/generated/google-apis-artifactregistry_v1/lib/google/apis/artifactregistry_v1/gem_version.rb +++ b/generated/google-apis-artifactregistry_v1/lib/google/apis/artifactregistry_v1/gem_version.rb @@ -16,13 +16,13 @@ module Google module Apis module ArtifactregistryV1 # Version of the google-apis-artifactregistry_v1 gem - GEM_VERSION = "0.66.0" + GEM_VERSION = "0.67.0" # Version of the code generator used to generate this client GENERATOR_VERSION = "0.15.1" # Revision of the discovery document this client was generated from - REVISION = "20240903" + REVISION = "20240923" end end end diff --git a/generated/google-apis-artifactregistry_v1/lib/google/apis/artifactregistry_v1/representations.rb b/generated/google-apis-artifactregistry_v1/lib/google/apis/artifactregistry_v1/representations.rb index 9aaf51e4101..9c8a0569b84 100644 --- a/generated/google-apis-artifactregistry_v1/lib/google/apis/artifactregistry_v1/representations.rb +++ b/generated/google-apis-artifactregistry_v1/lib/google/apis/artifactregistry_v1/representations.rb @@ -34,6 +34,12 @@ class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end + class Attachment + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class BatchDeleteVersionsMetadata class Representation < Google::Apis::Core::JsonRepresentation; end @@ -184,6 +190,12 @@ class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end + class GoogleDevtoolsArtifactregistryV1Rule + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class HashProp class Representation < Google::Apis::Core::JsonRepresentation; end @@ -286,6 +298,12 @@ class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end + class ListAttachmentsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class ListDockerImagesResponse class Representation < Google::Apis::Core::JsonRepresentation; end @@ -334,6 +352,12 @@ class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end + class ListRulesResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class ListTagsResponse class Representation < Google::Apis::Core::JsonRepresentation; end @@ -496,6 +520,18 @@ class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end + class UploadFileMediaResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class UploadFileRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class UploadGenericArtifactMediaResponse class Representation < Google::Apis::Core::JsonRepresentation; end @@ -668,6 +704,21 @@ class Representation < Google::Apis::Core::JsonRepresentation end end + class Attachment + # @private + class Representation < Google::Apis::Core::JsonRepresentation + hash :annotations, as: 'annotations' + property :attachment_namespace, as: 'attachmentNamespace' + property :create_time, as: 'createTime' + collection :files, as: 'files' + property :name, as: 'name' + property :oci_version_name, as: 'ociVersionName' + property :target, as: 'target' + property :type, as: 'type' + property :update_time, as: 'updateTime' + end + end + class BatchDeleteVersionsMetadata # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -816,6 +867,7 @@ class Representation < Google::Apis::Core::JsonRepresentation class GoogleDevtoolsArtifactregistryV1File # @private class Representation < Google::Apis::Core::JsonRepresentation + hash :annotations, as: 'annotations' property :create_time, as: 'createTime' property :fetch_time, as: 'fetchTime' collection :hashes, as: 'hashes', class: Google::Apis::ArtifactregistryV1::HashProp, decorator: Google::Apis::ArtifactregistryV1::HashProp::Representation @@ -885,6 +937,18 @@ class Representation < Google::Apis::Core::JsonRepresentation end end + class GoogleDevtoolsArtifactregistryV1Rule + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :action, as: 'action' + property :condition, as: 'condition', class: Google::Apis::ArtifactregistryV1::Expr, decorator: Google::Apis::ArtifactregistryV1::Expr::Representation + + property :name, as: 'name' + property :operation, as: 'operation' + property :package_id, as: 'packageId' + end + end + class HashProp # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -1027,6 +1091,15 @@ class Representation < Google::Apis::Core::JsonRepresentation end end + class ListAttachmentsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :attachments, as: 'attachments', class: Google::Apis::ArtifactregistryV1::Attachment, decorator: Google::Apis::ArtifactregistryV1::Attachment::Representation + + property :next_page_token, as: 'nextPageToken' + end + end + class ListDockerImagesResponse # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -1099,6 +1172,15 @@ class Representation < Google::Apis::Core::JsonRepresentation end end + class ListRulesResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :next_page_token, as: 'nextPageToken' + collection :rules, as: 'rules', class: Google::Apis::ArtifactregistryV1::GoogleDevtoolsArtifactregistryV1Rule, decorator: Google::Apis::ArtifactregistryV1::GoogleDevtoolsArtifactregistryV1Rule::Representation + + end + end + class ListTagsResponse # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -1374,6 +1456,21 @@ class Representation < Google::Apis::Core::JsonRepresentation end end + class UploadFileMediaResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :operation, as: 'operation', class: Google::Apis::ArtifactregistryV1::Operation, decorator: Google::Apis::ArtifactregistryV1::Operation::Representation + + end + end + + class UploadFileRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :file_id, as: 'fileId' + end + end + class UploadGenericArtifactMediaResponse # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -1531,6 +1628,7 @@ class Representation < Google::Apis::Core::JsonRepresentation class Version # @private class Representation < Google::Apis::Core::JsonRepresentation + hash :annotations, as: 'annotations' property :create_time, as: 'createTime' property :description, as: 'description' hash :metadata, as: 'metadata' diff --git a/generated/google-apis-artifactregistry_v1/lib/google/apis/artifactregistry_v1/service.rb b/generated/google-apis-artifactregistry_v1/lib/google/apis/artifactregistry_v1/service.rb index 2148d9f9c1b..31fa34e1d05 100644 --- a/generated/google-apis-artifactregistry_v1/lib/google/apis/artifactregistry_v1/service.rb +++ b/generated/google-apis-artifactregistry_v1/lib/google/apis/artifactregistry_v1/service.rb @@ -677,6 +677,146 @@ def upload_apt_artifact(parent, upload_apt_artifact_request_object = nil, fields execute_or_queue_command(command, &block) end + # Creates an attachment. The returned Operation will finish once the attachment + # has been created. Its response will be the created Attachment. + # @param [String] parent + # Required. The name of the parent resource where the attachment will be created. + # @param [Google::Apis::ArtifactregistryV1::Attachment] attachment_object + # @param [String] attachment_id + # Required. The attachment id to use for this attachment. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::ArtifactregistryV1::Operation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ArtifactregistryV1::Operation] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def create_project_location_repository_attachment(parent, attachment_object = nil, attachment_id: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+parent}/attachments', options) + command.request_representation = Google::Apis::ArtifactregistryV1::Attachment::Representation + command.request_object = attachment_object + command.response_representation = Google::Apis::ArtifactregistryV1::Operation::Representation + command.response_class = Google::Apis::ArtifactregistryV1::Operation + command.params['parent'] = parent unless parent.nil? + command.query['attachmentId'] = attachment_id unless attachment_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + 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. + # @param [String] name + # Required. The name of the attachment to delete. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::ArtifactregistryV1::Operation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ArtifactregistryV1::Operation] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def delete_project_location_repository_attachment(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:delete, 'v1/{+name}', options) + command.response_representation = Google::Apis::ArtifactregistryV1::Operation::Representation + command.response_class = Google::Apis::ArtifactregistryV1::Operation + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Gets an attachment. + # @param [String] name + # Required. The name of the attachment to retrieve. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::ArtifactregistryV1::Attachment] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ArtifactregistryV1::Attachment] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_project_location_repository_attachment(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/{+name}', options) + command.response_representation = Google::Apis::ArtifactregistryV1::Attachment::Representation + command.response_class = Google::Apis::ArtifactregistryV1::Attachment + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Lists repositories. + # @param [String] parent + # Required. The name of the parent resource whose attachments will be listed. + # @param [String] filter + # 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 [Fixnum] page_size + # The maximum number of attachments to return. Maximum page size is 1,000. + # @param [String] page_token + # The next_page_token value returned from a previous list request, if any. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::ArtifactregistryV1::ListAttachmentsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ArtifactregistryV1::ListAttachmentsResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def list_project_location_repository_attachments(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/{+parent}/attachments', options) + command.response_representation = Google::Apis::ArtifactregistryV1::ListAttachmentsResponse::Representation + command.response_class = Google::Apis::ArtifactregistryV1::ListAttachmentsResponse + command.params['parent'] = parent unless parent.nil? + command.query['filter'] = filter unless filter.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + # Gets a docker image. # @param [String] name # Required. The name of the docker images. @@ -914,6 +1054,90 @@ def list_project_location_repository_files(parent, filter: nil, order_by: nil, p execute_or_queue_command(command, &block) end + # Updates a file. + # @param [String] name + # 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. + # @param [Google::Apis::ArtifactregistryV1::GoogleDevtoolsArtifactregistryV1File] google_devtools_artifactregistry_v1_file_object + # @param [String] update_mask + # Required. The update mask applies to the resource. For the `FieldMask` + # definition, see https://developers.google.com/protocol-buffers/docs/reference/ + # google.protobuf#fieldmask + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::ArtifactregistryV1::GoogleDevtoolsArtifactregistryV1File] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ArtifactregistryV1::GoogleDevtoolsArtifactregistryV1File] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def patch_project_location_repository_file(name, google_devtools_artifactregistry_v1_file_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:patch, 'v1/{+name}', options) + command.request_representation = Google::Apis::ArtifactregistryV1::GoogleDevtoolsArtifactregistryV1File::Representation + command.request_object = google_devtools_artifactregistry_v1_file_object + command.response_representation = Google::Apis::ArtifactregistryV1::GoogleDevtoolsArtifactregistryV1File::Representation + command.response_class = Google::Apis::ArtifactregistryV1::GoogleDevtoolsArtifactregistryV1File + command.params['name'] = name unless name.nil? + command.query['updateMask'] = update_mask unless update_mask.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Directly uploads a File to a repository. The returned Operation will complete + # once the resources are uploaded. + # @param [String] parent + # Required. The resource name of the repository where the file will be uploaded. + # @param [Google::Apis::ArtifactregistryV1::UploadFileRequest] upload_file_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [IO, String] upload_source + # IO stream or filename containing content to upload + # @param [String] content_type + # Content type of the uploaded content. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::ArtifactregistryV1::UploadFileMediaResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ArtifactregistryV1::UploadFileMediaResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def upload_file(parent, upload_file_request_object = nil, fields: nil, quota_user: nil, upload_source: nil, content_type: nil, options: nil, &block) + if upload_source.nil? + command = make_simple_command(:post, 'v1/{+parent}/files:upload', options) + else + command = make_upload_command(:post, 'v1/{+parent}/files:upload', options) + command.upload_source = upload_source + command.upload_content_type = content_type + end + command.request_representation = Google::Apis::ArtifactregistryV1::UploadFileRequest::Representation + command.request_object = upload_file_request_object + command.response_representation = Google::Apis::ArtifactregistryV1::UploadFileMediaResponse::Representation + command.response_class = Google::Apis::ArtifactregistryV1::UploadFileMediaResponse + command.params['parent'] = parent unless parent.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + # Directly uploads a Generic artifact. The returned operation will complete once # the resources are uploaded. Package, version, and file resources are created # based on the uploaded artifact. Uploaded artifacts that conflict with existing @@ -1795,6 +2019,46 @@ def list_project_location_repository_package_versions(parent, filter: nil, order execute_or_queue_command(command, &block) end + # Updates a version. + # @param [String] name + # 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. + # @param [Google::Apis::ArtifactregistryV1::Version] version_object + # @param [String] update_mask + # The update mask applies to the resource. For the `FieldMask` definition, see + # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf# + # fieldmask + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::ArtifactregistryV1::Version] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ArtifactregistryV1::Version] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def patch_project_location_repository_package_version(name, version_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:patch, 'v1/{+name}', options) + command.request_representation = Google::Apis::ArtifactregistryV1::Version::Representation + command.request_object = version_object + command.response_representation = Google::Apis::ArtifactregistryV1::Version::Representation + command.response_class = Google::Apis::ArtifactregistryV1::Version + command.params['name'] = name unless name.nil? + command.query['updateMask'] = update_mask unless update_mask.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + # Gets a python package. # @param [String] name # Required. The name of the python package. @@ -1861,6 +2125,178 @@ def list_project_location_repository_python_packages(parent, page_size: nil, pag execute_or_queue_command(command, &block) end + # Creates a rule. + # @param [String] parent + # Required. The name of the parent resource where the rule will be created. + # @param [Google::Apis::ArtifactregistryV1::GoogleDevtoolsArtifactregistryV1Rule] google_devtools_artifactregistry_v1_rule_object + # @param [String] rule_id + # The rule id to use for this repository. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::ArtifactregistryV1::GoogleDevtoolsArtifactregistryV1Rule] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ArtifactregistryV1::GoogleDevtoolsArtifactregistryV1Rule] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def create_project_location_repository_rule(parent, google_devtools_artifactregistry_v1_rule_object = nil, rule_id: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+parent}/rules', options) + command.request_representation = Google::Apis::ArtifactregistryV1::GoogleDevtoolsArtifactregistryV1Rule::Representation + command.request_object = google_devtools_artifactregistry_v1_rule_object + command.response_representation = Google::Apis::ArtifactregistryV1::GoogleDevtoolsArtifactregistryV1Rule::Representation + command.response_class = Google::Apis::ArtifactregistryV1::GoogleDevtoolsArtifactregistryV1Rule + command.params['parent'] = parent unless parent.nil? + command.query['ruleId'] = rule_id unless rule_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Deletes a rule. + # @param [String] name + # Required. The name of the rule to delete. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::ArtifactregistryV1::Empty] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ArtifactregistryV1::Empty] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def delete_project_location_repository_rule(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:delete, 'v1/{+name}', options) + command.response_representation = Google::Apis::ArtifactregistryV1::Empty::Representation + command.response_class = Google::Apis::ArtifactregistryV1::Empty + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Gets a rule. + # @param [String] name + # Required. The name of the rule to retrieve. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::ArtifactregistryV1::GoogleDevtoolsArtifactregistryV1Rule] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ArtifactregistryV1::GoogleDevtoolsArtifactregistryV1Rule] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_project_location_repository_rule(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/{+name}', options) + command.response_representation = Google::Apis::ArtifactregistryV1::GoogleDevtoolsArtifactregistryV1Rule::Representation + command.response_class = Google::Apis::ArtifactregistryV1::GoogleDevtoolsArtifactregistryV1Rule + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Lists rules. + # @param [String] parent + # Required. The name of the parent repository whose rules will be listed. For + # example: `projects/p1/locations/us-central1/repositories/repo1`. + # @param [Fixnum] page_size + # The maximum number of rules to return. Maximum page size is 1,000. + # @param [String] page_token + # The next_page_token value returned from a previous list request, if any. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::ArtifactregistryV1::ListRulesResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ArtifactregistryV1::ListRulesResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def list_project_location_repository_rules(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/{+parent}/rules', options) + command.response_representation = Google::Apis::ArtifactregistryV1::ListRulesResponse::Representation + command.response_class = Google::Apis::ArtifactregistryV1::ListRulesResponse + command.params['parent'] = parent unless parent.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Updates a rule. + # @param [String] name + # The name of the rule, for example: "projects/p1/locations/us-central1/ + # repositories/repo1/rules/rule1". + # @param [Google::Apis::ArtifactregistryV1::GoogleDevtoolsArtifactregistryV1Rule] google_devtools_artifactregistry_v1_rule_object + # @param [String] update_mask + # The update mask applies to the resource. For the `FieldMask` definition, see + # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf# + # fieldmask + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::ArtifactregistryV1::GoogleDevtoolsArtifactregistryV1Rule] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ArtifactregistryV1::GoogleDevtoolsArtifactregistryV1Rule] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def patch_project_location_repository_rule(name, google_devtools_artifactregistry_v1_rule_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:patch, 'v1/{+name}', options) + command.request_representation = Google::Apis::ArtifactregistryV1::GoogleDevtoolsArtifactregistryV1Rule::Representation + command.request_object = google_devtools_artifactregistry_v1_rule_object + command.response_representation = Google::Apis::ArtifactregistryV1::GoogleDevtoolsArtifactregistryV1Rule::Representation + command.response_class = Google::Apis::ArtifactregistryV1::GoogleDevtoolsArtifactregistryV1Rule + command.params['name'] = name unless name.nil? + command.query['updateMask'] = update_mask unless update_mask.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + 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