Class: Google::Apis::ArtifactregistryV1::Attachment
- Inherits:
-
Object
- Object
- Google::Apis::ArtifactregistryV1::Attachment
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/artifactregistry_v1/classes.rb,
lib/google/apis/artifactregistry_v1/representations.rb,
lib/google/apis/artifactregistry_v1/representations.rb
Overview
An Attachment refers to additional metadata that can be attached to artifacts in Artifact Registry. An attachment consists of one or more files.
Instance Attribute Summary collapse
-
#annotations ⇒ Hash<String,String>
Optional.
-
#attachment_namespace ⇒ String
The namespace this attachment belongs to.
-
#create_time ⇒ String
Output only.
-
#files ⇒ Array<String>
Required.
-
#name ⇒ String
The name of the attachment.
-
#oci_version_name ⇒ String
Output only.
-
#target ⇒ String
Required.
-
#type ⇒ String
Type of attachment.
-
#update_time ⇒ String
Output only.
Instance Method Summary collapse
-
#initialize(**args) ⇒ Attachment
constructor
A new instance of Attachment.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ Attachment
Returns a new instance of Attachment.
163 164 165 |
# File 'lib/google/apis/artifactregistry_v1/classes.rb', line 163 def initialize(**args) update!(**args) end |
Instance Attribute Details
#annotations ⇒ Hash<String,String>
Optional. User annotations. These attributes can only be set and used by the
user, and not by Artifact Registry. See https://google.aip.dev/128#annotations
for more details such as format and size limitations.
Corresponds to the JSON property annotations
113 114 115 |
# File 'lib/google/apis/artifactregistry_v1/classes.rb', line 113 def annotations @annotations end |
#attachment_namespace ⇒ String
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
119 120 121 |
# File 'lib/google/apis/artifactregistry_v1/classes.rb', line 119 def @attachment_namespace end |
#create_time ⇒ String
Output only. The time when the attachment was created.
Corresponds to the JSON property createTime
124 125 126 |
# File 'lib/google/apis/artifactregistry_v1/classes.rb', line 124 def create_time @create_time end |
#files ⇒ Array<String>
Required. The files that belong to this attachment. If the file ID part
contains slashes, they are escaped. E.g. projects/p1/locations/us-central1/
repositories/repo1/files/sha:
.
Corresponds to the JSON property files
131 132 133 |
# File 'lib/google/apis/artifactregistry_v1/classes.rb', line 131 def files @files end |
#name ⇒ String
The name of the attachment. E.g. projects/p1/locations/us/repositories/repo/
attachments/sbom
.
Corresponds to the JSON property name
137 138 139 |
# File 'lib/google/apis/artifactregistry_v1/classes.rb', line 137 def name @name end |
#oci_version_name ⇒ String
Output only. The name of the OCI version that this attachment created. Only
populated for Docker attachments. E.g. projects/p1/locations/us-central1/
repositories/repo1/packages/p1/versions/v1
.
Corresponds to the JSON property ociVersionName
144 145 146 |
# File 'lib/google/apis/artifactregistry_v1/classes.rb', line 144 def oci_version_name @oci_version_name end |
#target ⇒ String
Required. The target the attachment is for, can be a Version, Package or
Repository. E.g. projects/p1/locations/us-central1/repositories/repo1/
packages/p1/versions/v1
.
Corresponds to the JSON property target
151 152 153 |
# File 'lib/google/apis/artifactregistry_v1/classes.rb', line 151 def target @target end |
#type ⇒ String
Type of attachment. E.g. application/vnd.spdx+json
Corresponds to the JSON property type
156 157 158 |
# File 'lib/google/apis/artifactregistry_v1/classes.rb', line 156 def type @type end |
#update_time ⇒ String
Output only. The time when the attachment was last updated.
Corresponds to the JSON property updateTime
161 162 163 |
# File 'lib/google/apis/artifactregistry_v1/classes.rb', line 161 def update_time @update_time end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
168 169 170 171 172 173 174 175 176 177 178 |
# File 'lib/google/apis/artifactregistry_v1/classes.rb', line 168 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 |