Reference documentation and code samples for the Google Cloud Artifact Registry V1 Client class Attachment.
An Attachment refers to additional metadata that can be attached to artifacts in Artifact Registry. An attachment consists of one or more files.
Generated from protobuf message google.devtools.artifactregistry.v1.Attachment
Namespace
Google \ Cloud \ ArtifactRegistry \ V1Methods
__construct
Constructor.
data
array
Optional. Data for populating the Message object.
↳ name
string
The name of the attachment. E.g. projects/p1/locations/us/repositories/repo/attachments/sbom
.
↳ 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
.
↳ type
string
Type of attachment. E.g. application/vnd.spdx+json
↳ 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
.
↳ annotations
array| Google\Protobuf\Internal\MapField
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.
↳ create_time
↳ update_time
↳ files
array
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:<sha-of-file>
.
↳ 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
.
getName
The name of the attachment. E.g.
projects/p1/locations/us/repositories/repo/attachments/sbom
.
string
setName
The name of the attachment. E.g.
projects/p1/locations/us/repositories/repo/attachments/sbom
.
var
string
$this
getTarget
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
.
string
setTarget
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
.
var
string
$this
getType
Type of attachment.
E.g. application/vnd.spdx+json
string
setType
Type of attachment.
E.g. application/vnd.spdx+json
var
string
$this
getAttachmentNamespace
The namespace this attachment belongs to.
E.g. If an attachment is created by artifact analysis, namespace is set
to artifactanalysis.googleapis.com
.
string
setAttachmentNamespace
The namespace this attachment belongs to.
E.g. If an attachment is created by artifact analysis, namespace is set
to artifactanalysis.googleapis.com
.
var
string
$this
getAnnotations
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.
setAnnotations
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.
$this
getCreateTime
Output only. The time when the attachment was created.
hasCreateTime
clearCreateTime
setCreateTime
Output only. The time when the attachment was created.
$this
getUpdateTime
Output only. The time when the attachment was last updated.
hasUpdateTime
clearUpdateTime
setUpdateTime
Output only. The time when the attachment was last updated.
$this
getFiles
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:<sha-of-file>
.
setFiles
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:<sha-of-file>
.
var
string[]
$this
getOciVersionName
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
.
string
setOciVersionName
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
.
var
string
$this