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.
Parameters | |
---|---|
Name | Description |
data |
array
Optional. Data for populating the Message object. |
↳ name |
string
The name of the attachment. E.g. |
↳ target |
string
Required. The target the attachment is for, can be a Version, Package or Repository. E.g. |
↳ type |
string
Type of attachment. E.g. |
↳ attachment_namespace |
string
The namespace this attachment belongs to. E.g. If an attachment is created by artifact analysis, namespace is set to |
↳ 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 |
Google\Protobuf\Timestamp
Output only. The time when the attachment was created. |
↳ update_time |
Google\Protobuf\Timestamp
Output only. The time when the attachment was last updated. |
↳ files |
array
Required. The files that belong to this attachment. If the file ID part contains slashes, they are escaped. E.g. |
↳ oci_version_name |
string
Output only. The name of the OCI version that this attachment created. Only populated for Docker attachments. E.g. |
getName
The name of the attachment. E.g.
projects/p1/locations/us/repositories/repo/attachments/sbom
.
Returns | |
---|---|
Type | Description |
string |
setName
The name of the attachment. E.g.
projects/p1/locations/us/repositories/repo/attachments/sbom
.
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$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
.
Returns | |
---|---|
Type | Description |
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
.
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |
getType
Type of attachment.
E.g. application/vnd.spdx+json
Returns | |
---|---|
Type | Description |
string |
setType
Type of attachment.
E.g. application/vnd.spdx+json
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$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
.
Returns | |
---|---|
Type | Description |
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
.
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$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.
Returns | |
---|---|
Type | Description |
Google\Protobuf\Internal\MapField |
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.
Parameter | |
---|---|
Name | Description |
var |
array|Google\Protobuf\Internal\MapField
|
Returns | |
---|---|
Type | Description |
$this |
getCreateTime
Output only. The time when the attachment was created.
Returns | |
---|---|
Type | Description |
Google\Protobuf\Timestamp|null |
hasCreateTime
clearCreateTime
setCreateTime
Output only. The time when the attachment was created.
Parameter | |
---|---|
Name | Description |
var |
Google\Protobuf\Timestamp
|
Returns | |
---|---|
Type | Description |
$this |
getUpdateTime
Output only. The time when the attachment was last updated.
Returns | |
---|---|
Type | Description |
Google\Protobuf\Timestamp|null |
hasUpdateTime
clearUpdateTime
setUpdateTime
Output only. The time when the attachment was last updated.
Parameter | |
---|---|
Name | Description |
var |
Google\Protobuf\Timestamp
|
Returns | |
---|---|
Type | Description |
$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>
.
Returns | |
---|---|
Type | Description |
Google\Protobuf\Internal\RepeatedField |
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>
.
Parameter | |
---|---|
Name | Description |
var |
string[]
|
Returns | |
---|---|
Type | Description |
$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
.
Returns | |
---|---|
Type | Description |
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
.
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |