Interface AttachmentOrBuilder
- All Superinterfaces:
com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder
- All Known Implementing Classes:
Attachment,Attachment.Builder
@Generated
public interface AttachmentOrBuilder
extends com.google.protobuf.MessageOrBuilder
-
Method Summary
Modifier and TypeMethodDescriptionbooleanOptional.Deprecated.intOptional.Optional.getAnnotationsOrDefault(String key, String defaultValue) Optional.Optional.The namespace this attachment belongs to.com.google.protobuf.ByteStringThe namespace this attachment belongs to.com.google.protobuf.TimestampOutput only.com.google.protobuf.TimestampOrBuilderOutput only.getFiles(int index) Required.com.google.protobuf.ByteStringgetFilesBytes(int index) Required.intRequired.Required.getName()The name of the attachment.com.google.protobuf.ByteStringThe name of the attachment.Output only.com.google.protobuf.ByteStringOutput only.Required.com.google.protobuf.ByteStringRequired.getType()Type of attachment.com.google.protobuf.ByteStringType of attachment.com.google.protobuf.TimestampOutput only.com.google.protobuf.TimestampOrBuilderOutput only.booleanOutput only.booleanOutput only.Methods inherited from interface com.google.protobuf.MessageLiteOrBuilder
isInitializedMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getDefaultInstanceForType, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getName
String getName()The name of the attachment. E.g. `projects/p1/locations/us/repositories/repo/attachments/sbom`.
string name = 1;- Returns:
- The name.
-
getNameBytes
com.google.protobuf.ByteString getNameBytes()The name of the attachment. E.g. `projects/p1/locations/us/repositories/repo/attachments/sbom`.
string name = 1;- Returns:
- The bytes for name.
-
getTarget
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:
- The target.
-
getTargetBytes
com.google.protobuf.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:
- The bytes for target.
-
getType
String getType()Type of attachment. E.g. `application/vnd.spdx+json`
string type = 3;- Returns:
- The type.
-
getTypeBytes
com.google.protobuf.ByteString getTypeBytes()Type of attachment. E.g. `application/vnd.spdx+json`
string type = 3;- Returns:
- The bytes for type.
-
getAttachmentNamespace
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:
- The attachmentNamespace.
-
getAttachmentNamespaceBytes
com.google.protobuf.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:
- The bytes for attachmentNamespace.
-
getAnnotationsCount
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]; -
containsAnnotations
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]; -
getAnnotations
Deprecated.UsegetAnnotationsMap()instead. -
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]; -
getAnnotationsOrDefault
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]; -
getAnnotationsOrThrow
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]; -
hasCreateTime
boolean hasCreateTime()Output only. The time when the attachment was created.
.google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];- Returns:
- Whether the createTime field is set.
-
getCreateTime
com.google.protobuf.Timestamp getCreateTime()Output only. The time when the attachment was created.
.google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];- Returns:
- The createTime.
-
getCreateTimeOrBuilder
com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder()Output only. The time when the attachment was created.
.google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; -
hasUpdateTime
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:
- Whether the updateTime field is set.
-
getUpdateTime
com.google.protobuf.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:
- The updateTime.
-
getUpdateTimeOrBuilder
com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder()Output only. The time when the attachment was last updated.
.google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; -
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:
- A list containing the files.
-
getFilesCount
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:
- The count of files.
-
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>`.
repeated string files = 8 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }- Parameters:
index- The index of the element to return.- Returns:
- The files at the given index.
-
getFilesBytes
com.google.protobuf.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) = { ... }- Parameters:
index- The index of the value to return.- Returns:
- The bytes of the files at the given index.
-
getOciVersionName
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:
- The ociVersionName.
-
getOciVersionNameBytes
com.google.protobuf.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:
- The bytes for ociVersionName.
-