Class Attachment
java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessage
com.google.devtools.artifactregistry.v1.Attachment
- All Implemented Interfaces:
AttachmentOrBuilder,com.google.protobuf.Message,com.google.protobuf.MessageLite,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Serializable
@Generated
public final class Attachment
extends com.google.protobuf.GeneratedMessage
implements AttachmentOrBuilder
An Attachment refers to additional metadata that can be attached to artifacts in Artifact Registry. An attachment consists of one or more files.Protobuf type
google.devtools.artifactregistry.v1.Attachment- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classAn Attachment refers to additional metadata that can be attached to artifacts in Artifact Registry.Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessage
com.google.protobuf.GeneratedMessage.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>,BuilderT extends com.google.protobuf.GeneratedMessage.ExtendableBuilder<MessageT, BuilderT>>, com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessage.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessage.FieldAccessorTable, com.google.protobuf.GeneratedMessage.GeneratedExtension<ContainingT extends com.google.protobuf.Message, T extends Object>, com.google.protobuf.GeneratedMessage.UnusedPrivateParameter Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessage
com.google.protobuf.AbstractMessage.BuilderParentNested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessageLite.InternalOneOfEnum -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intFields inherited from class com.google.protobuf.GeneratedMessage
alwaysUseFieldBuilders, loggedPre22TypeNames, unknownFieldsFields inherited from class com.google.protobuf.AbstractMessage
memoizedSizeFields inherited from class com.google.protobuf.AbstractMessageLite
memoizedHashCode -
Method Summary
Modifier and TypeMethodDescriptionbooleanOptional.booleanDeprecated.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.static Attachmentstatic final com.google.protobuf.Descriptors.DescriptorgetFiles(int index) Required.com.google.protobuf.ByteStringgetFilesBytes(int index) Required.intRequired.com.google.protobuf.ProtocolStringListRequired.getName()The name of the attachment.com.google.protobuf.ByteStringThe name of the attachment.Output only.com.google.protobuf.ByteStringOutput only.com.google.protobuf.Parser<Attachment>intRequired.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.inthashCode()booleanOutput only.protected com.google.protobuf.GeneratedMessage.FieldAccessorTableprotected com.google.protobuf.MapFieldReflectionAccessorinternalGetMapFieldReflection(int number) final booleanstatic Attachment.Builderstatic Attachment.BuildernewBuilder(Attachment prototype) protected Attachment.BuildernewBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent) static AttachmentparseDelimitedFrom(InputStream input) static AttachmentparseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static AttachmentparseFrom(byte[] data) static AttachmentparseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static AttachmentparseFrom(com.google.protobuf.ByteString data) static AttachmentparseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static AttachmentparseFrom(com.google.protobuf.CodedInputStream input) static AttachmentparseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static AttachmentparseFrom(InputStream input) static AttachmentparseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static AttachmentparseFrom(ByteBuffer data) static AttachmentparseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static com.google.protobuf.Parser<Attachment>parser()voidwriteTo(com.google.protobuf.CodedOutputStream output) Methods inherited from class com.google.protobuf.GeneratedMessage
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, isStringEmpty, makeExtensionsImmutable, makeMutableCopy, makeMutableCopy, mergeFromAndMakeImmutableInternal, newFileScopedGeneratedExtension, newInstance, newMessageScopedGeneratedExtension, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTagMethods inherited from class com.google.protobuf.AbstractMessage
findInitializationErrors, getInitializationErrorString, hashFields, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite
addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.MessageLite
toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Field Details
-
NAME_FIELD_NUMBER
public static final int NAME_FIELD_NUMBER- See Also:
-
TARGET_FIELD_NUMBER
public static final int TARGET_FIELD_NUMBER- See Also:
-
TYPE_FIELD_NUMBER
public static final int TYPE_FIELD_NUMBER- See Also:
-
ATTACHMENT_NAMESPACE_FIELD_NUMBER
public static final int ATTACHMENT_NAMESPACE_FIELD_NUMBER- See Also:
-
ANNOTATIONS_FIELD_NUMBER
public static final int ANNOTATIONS_FIELD_NUMBER- See Also:
-
CREATE_TIME_FIELD_NUMBER
public static final int CREATE_TIME_FIELD_NUMBER- See Also:
-
UPDATE_TIME_FIELD_NUMBER
public static final int UPDATE_TIME_FIELD_NUMBER- See Also:
-
FILES_FIELD_NUMBER
public static final int FILES_FIELD_NUMBER- See Also:
-
OCI_VERSION_NAME_FIELD_NUMBER
public static final int OCI_VERSION_NAME_FIELD_NUMBER- See Also:
-
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetMapFieldReflection
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(int number) - Overrides:
internalGetMapFieldReflectionin classcom.google.protobuf.GeneratedMessage
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage
-
getName
The name of the attachment. E.g. `projects/p1/locations/us/repositories/repo/attachments/sbom`.
string name = 1;- Specified by:
getNamein interfaceAttachmentOrBuilder- Returns:
- The name.
-
getNameBytes
public com.google.protobuf.ByteString getNameBytes()The name of the attachment. E.g. `projects/p1/locations/us/repositories/repo/attachments/sbom`.
string name = 1;- Specified by:
getNameBytesin interfaceAttachmentOrBuilder- Returns:
- The bytes for name.
-
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];- Specified by:
getTargetin interfaceAttachmentOrBuilder- Returns:
- The target.
-
getTargetBytes
public 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];- Specified by:
getTargetBytesin interfaceAttachmentOrBuilder- Returns:
- The bytes for target.
-
getType
Type of attachment. E.g. `application/vnd.spdx+json`
string type = 3;- Specified by:
getTypein interfaceAttachmentOrBuilder- Returns:
- The type.
-
getTypeBytes
public com.google.protobuf.ByteString getTypeBytes()Type of attachment. E.g. `application/vnd.spdx+json`
string type = 3;- Specified by:
getTypeBytesin interfaceAttachmentOrBuilder- Returns:
- The bytes for type.
-
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;- Specified by:
getAttachmentNamespacein interfaceAttachmentOrBuilder- Returns:
- The attachmentNamespace.
-
getAttachmentNamespaceBytes
public 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;- Specified by:
getAttachmentNamespaceBytesin interfaceAttachmentOrBuilder- Returns:
- The bytes for attachmentNamespace.
-
getAnnotationsCount
public int getAnnotationsCount()Description copied from interface:AttachmentOrBuilderOptional. 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];- Specified by:
getAnnotationsCountin interfaceAttachmentOrBuilder
-
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];- Specified by:
containsAnnotationsin interfaceAttachmentOrBuilder
-
getAnnotations
Deprecated.UsegetAnnotationsMap()instead.- Specified by:
getAnnotationsin interfaceAttachmentOrBuilder
-
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];- Specified by:
getAnnotationsMapin interfaceAttachmentOrBuilder
-
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];- Specified by:
getAnnotationsOrDefaultin interfaceAttachmentOrBuilder
-
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];- Specified by:
getAnnotationsOrThrowin interfaceAttachmentOrBuilder
-
hasCreateTime
public boolean hasCreateTime()Output only. The time when the attachment was created.
.google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];- Specified by:
hasCreateTimein interfaceAttachmentOrBuilder- Returns:
- Whether the createTime field is set.
-
getCreateTime
public 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];- Specified by:
getCreateTimein interfaceAttachmentOrBuilder- Returns:
- The createTime.
-
getCreateTimeOrBuilder
public 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];- Specified by:
getCreateTimeOrBuilderin interfaceAttachmentOrBuilder
-
hasUpdateTime
public boolean hasUpdateTime()Output only. The time when the attachment was last updated.
.google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];- Specified by:
hasUpdateTimein interfaceAttachmentOrBuilder- Returns:
- Whether the updateTime field is set.
-
getUpdateTime
public 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];- Specified by:
getUpdateTimein interfaceAttachmentOrBuilder- Returns:
- The updateTime.
-
getUpdateTimeOrBuilder
public 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];- Specified by:
getUpdateTimeOrBuilderin interfaceAttachmentOrBuilder
-
getFilesList
public com.google.protobuf.ProtocolStringList 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) = { ... }- Specified by:
getFilesListin interfaceAttachmentOrBuilder- Returns:
- A list containing the files.
-
getFilesCount
public 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) = { ... }- Specified by:
getFilesCountin interfaceAttachmentOrBuilder- 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) = { ... }- Specified by:
getFilesin interfaceAttachmentOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The files at the given index.
-
getFilesBytes
public 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) = { ... }- Specified by:
getFilesBytesin interfaceAttachmentOrBuilder- Parameters:
index- The index of the value to return.- Returns:
- The bytes of the files at the given index.
-
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];- Specified by:
getOciVersionNamein interfaceAttachmentOrBuilder- Returns:
- The ociVersionName.
-
getOciVersionNameBytes
public 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];- Specified by:
getOciVersionNameBytesin interfaceAttachmentOrBuilder- Returns:
- The bytes for ociVersionName.
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage
-
writeTo
- Specified by:
writeToin interfacecom.google.protobuf.MessageLite- Overrides:
writeToin classcom.google.protobuf.GeneratedMessage- Throws:
IOException
-
getSerializedSize
public int getSerializedSize()- Specified by:
getSerializedSizein interfacecom.google.protobuf.MessageLite- Overrides:
getSerializedSizein classcom.google.protobuf.GeneratedMessage
-
equals
- Specified by:
equalsin interfacecom.google.protobuf.Message- Overrides:
equalsin classcom.google.protobuf.AbstractMessage
-
hashCode
public int hashCode()- Specified by:
hashCodein interfacecom.google.protobuf.Message- Overrides:
hashCodein classcom.google.protobuf.AbstractMessage
-
parseFrom
public static Attachment parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Attachment parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Attachment parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Attachment parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Attachment parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Attachment parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
- Throws:
IOException
-
parseFrom
public static Attachment parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseDelimitedFrom
- Throws:
IOException
-
parseDelimitedFrom
public static Attachment parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseFrom
- Throws:
IOException
-
parseFrom
public static Attachment parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
newBuilderForType
- Specified by:
newBuilderForTypein interfacecom.google.protobuf.Message- Specified by:
newBuilderForTypein interfacecom.google.protobuf.MessageLite
-
newBuilder
-
newBuilder
-
toBuilder
- Specified by:
toBuilderin interfacecom.google.protobuf.Message- Specified by:
toBuilderin interfacecom.google.protobuf.MessageLite
-
newBuilderForType
protected Attachment.Builder newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent) - Overrides:
newBuilderForTypein classcom.google.protobuf.AbstractMessage
-
getDefaultInstance
-
parser
-
getParserForType
- Specified by:
getParserForTypein interfacecom.google.protobuf.Message- Specified by:
getParserForTypein interfacecom.google.protobuf.MessageLite- Overrides:
getParserForTypein classcom.google.protobuf.GeneratedMessage
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-