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 ArtifactRegistry. 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.
164 165 166 |
# File 'lib/google/apis/artifactregistry_v1/classes.rb', line 164 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. Client specified
annotations.
Corresponds to the JSON property annotations
114 115 116 |
# File 'lib/google/apis/artifactregistry_v1/classes.rb', line 114 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
120 121 122 |
# File 'lib/google/apis/artifactregistry_v1/classes.rb', line 120 def @attachment_namespace end |
#create_time ⇒ String
Output only. The time when the attachment was created.
Corresponds to the JSON property createTime
125 126 127 |
# File 'lib/google/apis/artifactregistry_v1/classes.rb', line 125 def create_time @create_time end |
#files ⇒ Array<String>
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
132 133 134 |
# File 'lib/google/apis/artifactregistry_v1/classes.rb', line 132 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
138 139 140 |
# File 'lib/google/apis/artifactregistry_v1/classes.rb', line 138 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
145 146 147 |
# File 'lib/google/apis/artifactregistry_v1/classes.rb', line 145 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
152 153 154 |
# File 'lib/google/apis/artifactregistry_v1/classes.rb', line 152 def target @target end |
#type ⇒ String
Type of Attachment. E.g. application/vnd.spdx+jsonn
Corresponds to the JSON property type
157 158 159 |
# File 'lib/google/apis/artifactregistry_v1/classes.rb', line 157 def type @type end |
#update_time ⇒ String
Output only. The time when the attachment was last updated.
Corresponds to the JSON property updateTime
162 163 164 |
# File 'lib/google/apis/artifactregistry_v1/classes.rb', line 162 def update_time @update_time end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
169 170 171 172 173 174 175 176 177 178 179 |
# File 'lib/google/apis/artifactregistry_v1/classes.rb', line 169 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 |