Interface AttachmentOrBuilder (1.52.0)

public interface AttachmentOrBuilder extends MessageOrBuilder

Implements

MessageOrBuilder

Methods

containsAnnotations(String key)

public abstract boolean containsAnnotations(String key)

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.

map<string, string> annotations = 5 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
key String
Returns
Type Description
boolean

getAnnotations() (deprecated)

public abstract Map<String,String> getAnnotations()

Use #getAnnotationsMap() instead.

Returns
Type Description
Map<String,String>

getAnnotationsCount()

public abstract int getAnnotationsCount()

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.

map<string, string> annotations = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

getAnnotationsMap()

public abstract Map<String,String> getAnnotationsMap()

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.

map<string, string> annotations = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Map<String,String>

getAnnotationsOrDefault(String key, String defaultValue)

public abstract String getAnnotationsOrDefault(String key, String defaultValue)

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.

map<string, string> annotations = 5 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
key String
defaultValue String
Returns
Type Description
String

getAnnotationsOrThrow(String key)

public abstract String getAnnotationsOrThrow(String key)

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.

map<string, string> annotations = 5 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
key String
Returns
Type Description
String

getAttachmentNamespace()

public abstract String 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 attachment_namespace = 4;

Returns
Type Description
String

The attachmentNamespace.

getAttachmentNamespaceBytes()

public abstract ByteString getAttachmentNamespaceBytes()

The namespace this attachment belongs to. E.g. If an attachment is created by artifact analysis, namespace is set to artifactanalysis.googleapis.com.

string attachment_namespace = 4;

Returns
Type Description
ByteString

The bytes for attachmentNamespace.

getCreateTime()

public abstract Timestamp getCreateTime()

Output only. The time when the attachment was created.

.google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Timestamp

The createTime.

getCreateTimeOrBuilder()

public abstract TimestampOrBuilder getCreateTimeOrBuilder()

Output only. The time when the attachment was created.

.google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
TimestampOrBuilder

getFiles(int index)

public abstract String getFiles(int index)

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>.

repeated string files = 8 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The files at the given index.

getFilesBytes(int index)

public abstract ByteString getFilesBytes(int index)

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>.

repeated string files = 8 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the files at the given index.

getFilesCount()

public abstract int getFilesCount()

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>.

repeated string files = 8 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
Type Description
int

The count of files.

getFilesList()

public abstract List<String> getFilesList()

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>.

repeated string files = 8 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
Type Description
List<String>

A list containing the files.

getName()

public abstract String getName()

The name of the attachment. E.g. projects/p1/locations/us/repositories/repo/attachments/sbom.

string name = 1;

Returns
Type Description
String

The name.

getNameBytes()

public abstract ByteString getNameBytes()

The name of the attachment. E.g. projects/p1/locations/us/repositories/repo/attachments/sbom.

string name = 1;

Returns
Type Description
ByteString

The bytes for name.

getOciVersionName()

public abstract String 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 oci_version_name = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
String

The ociVersionName.

getOciVersionNameBytes()

public abstract ByteString getOciVersionNameBytes()

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 oci_version_name = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ByteString

The bytes for ociVersionName.

getTarget()

public abstract String 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 target = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
String

The target.

getTargetBytes()

public abstract ByteString getTargetBytes()

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 target = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ByteString

The bytes for target.

getType()

public abstract String getType()

Type of attachment. E.g. application/vnd.spdx+json

string type = 3;

Returns
Type Description
String

The type.

getTypeBytes()

public abstract ByteString getTypeBytes()

Type of attachment. E.g. application/vnd.spdx+json

string type = 3;

Returns
Type Description
ByteString

The bytes for type.

getUpdateTime()

public abstract Timestamp getUpdateTime()

Output only. The time when the attachment was last updated.

.google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Timestamp

The updateTime.

getUpdateTimeOrBuilder()

public abstract TimestampOrBuilder getUpdateTimeOrBuilder()

Output only. The time when the attachment was last updated.

.google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
TimestampOrBuilder

hasCreateTime()

public abstract boolean hasCreateTime()

Output only. The time when the attachment was created.

.google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the createTime field is set.

hasUpdateTime()

public abstract boolean hasUpdateTime()

Output only. The time when the attachment was last updated.

.google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the updateTime field is set.