public final class Attachment extends GeneratedMessageV3 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
    Inherited Members
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
      com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT)
    
    
      com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT,int)
    
    
    
    
    
    
    
    
      com.google.protobuf.GeneratedMessageV3.<T>emptyList(java.lang.Class<T>)
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
      com.google.protobuf.GeneratedMessageV3.internalGetMapFieldReflection(int)
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
   
  Static Fields
  
  
  
    public static final int ANNOTATIONS_FIELD_NUMBER
   
  
    
      
        | Field Value | 
      
        | Type | Description | 
      
        | int |  | 
    
  
  
  
    public static final int ATTACHMENT_NAMESPACE_FIELD_NUMBER
   
  
    
      
        | Field Value | 
      
        | Type | Description | 
      
        | int |  | 
    
  
  
  
    public static final int CREATE_TIME_FIELD_NUMBER
   
  
    
      
        | Field Value | 
      
        | Type | Description | 
      
        | int |  | 
    
  
  
  
    public static final int FILES_FIELD_NUMBER
   
  
    
      
        | Field Value | 
      
        | Type | Description | 
      
        | int |  | 
    
  
  
  
    public static final int NAME_FIELD_NUMBER
   
  
    
      
        | Field Value | 
      
        | Type | Description | 
      
        | int |  | 
    
  
  
  
    public static final int OCI_VERSION_NAME_FIELD_NUMBER
   
  
    
      
        | Field Value | 
      
        | Type | Description | 
      
        | int |  | 
    
  
  
  
    public static final int TARGET_FIELD_NUMBER
   
  
    
      
        | Field Value | 
      
        | Type | Description | 
      
        | int |  | 
    
  
  
  
    public static final int TYPE_FIELD_NUMBER
   
  
    
      
        | Field Value | 
      
        | Type | Description | 
      
        | int |  | 
    
  
  
  
    public static final int UPDATE_TIME_FIELD_NUMBER
   
  
    
      
        | Field Value | 
      
        | Type | Description | 
      
        | int |  | 
    
  
  Static Methods
  
  
  
  
    public static Attachment getDefaultInstance()
   
  
  
  
  
    public static final Descriptors.Descriptor getDescriptor()
   
  
  
  
  
    public static Attachment.Builder newBuilder()
   
  
  
  
  
    public static Attachment.Builder newBuilder(Attachment prototype)
   
  
  
  
  
  
    public static Attachment parseDelimitedFrom(InputStream input)
   
  
  
  
  
  
  
    public static Attachment parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
   
  
  
  
  
  
  
    public static Attachment parseFrom(byte[] data)
   
  
    
      
        | Parameter | 
      
        | Name | Description | 
      
        | data | byte[]
 | 
    
  
  
  
  
  
  
    public static Attachment parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
   
  
  
  
  
  
  
    public static Attachment parseFrom(ByteString data)
   
  
  
  
  
  
  
    public static Attachment parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
   
  
  
  
  
  
  
    public static Attachment parseFrom(CodedInputStream input)
   
  
  
  
  
  
  
    public static Attachment parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
   
  
  
  
  
  
  
    public static Attachment parseFrom(InputStream input)
   
  
  
  
  
  
  
    public static Attachment parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
   
  
  
  
  
  
  
    public static Attachment parseFrom(ByteBuffer data)
   
  
  
  
  
  
  
    public static Attachment parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
   
  
  
  
  
  
  
    public static Parser<Attachment> parser()
   
  
  Methods
  
  
  
  
    public 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
 | 
    
  
  
  
  
  
    public boolean equals(Object obj)
   
  
    
      
        | Parameter | 
      
        | Name | Description | 
      
        | obj | Object
 | 
    
  
  
  Overrides
  
  
  
  
    public Map<String,String> getAnnotations()
   
  
  
  
  
  
    public 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 |  | 
    
  
  
  
  
    public 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];
 
    public 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];
 
    
      
        | Returns | 
      
        | Type | Description | 
      
        | String |  | 
    
  
  
  
  
    public 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 |  | 
    
  
  
  
  
    public 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. | 
    
  
  
  
  
    public 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. | 
    
  
  
  
  
    public 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. | 
    
  
  
  
  
    public TimestampOrBuilder getCreateTimeOrBuilder()
   
   Output only. The time when the attachment was created.
 .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
 
    public Attachment getDefaultInstanceForType()
   
  
  
  
  
    public 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. | 
    
  
  
  
  
    public 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. | 
    
  
  
  
  
    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) = { ... }
 
    
      
        | Returns | 
      
        | Type | Description | 
      
        | int | The count of files. | 
    
  
  
  
  
    public 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) = { ... }
 
 The name of the attachment. E.g.
 projects/p1/locations/us/repositories/repo/attachments/sbom.
 string name = 1;
    
      
        | Returns | 
      
        | Type | Description | 
      
        | String | The name. | 
    
  
  
  
  
    public 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. | 
    
  
  
  
  
    public 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. | 
    
  
  
  
  
    public 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. | 
    
  
  
  
  
    public Parser<Attachment> getParserForType()
   
  
  Overrides
  
  
  
  
    public int getSerializedSize()
   
  
    
      
        | Returns | 
      
        | Type | Description | 
      
        | int |  | 
    
  
  Overrides
  
  
  
  
    public 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. | 
    
  
  
  
  
    public 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. | 
    
  
  
  
  
   Type of attachment.
 E.g. application/vnd.spdx+json
 string type = 3;
    
      
        | Returns | 
      
        | Type | Description | 
      
        | String | The type. | 
    
  
  
  
  
    public ByteString getTypeBytes()
   
   Type of attachment.
 E.g. application/vnd.spdx+json
 string type = 3;
    
      
        | Returns | 
      
        | Type | Description | 
      
        | ByteString | The bytes for type. | 
    
  
  
  
  
    public 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. | 
    
  
  
  
  
    public TimestampOrBuilder getUpdateTimeOrBuilder()
   
   Output only. The time when the attachment was last updated.
 .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
 
    public 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. | 
    
  
  
  
  
    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];
 
    
      
        | Returns | 
      
        | Type | Description | 
      
        | boolean | Whether the updateTime field is set. | 
    
  
  
  
  
  
    
      
        | Returns | 
      
        | Type | Description | 
      
        | int |  | 
    
  
  Overrides
  
  
  
  
    protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
   
  
  Overrides
  
  
  
  
    protected MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
   
  
    
      
        | Parameter | 
      
        | Name | Description | 
      
        | number | int
 | 
    
  
  
    
      
        | Returns | 
      
        | Type | Description | 
      
        | com.google.protobuf.MapFieldReflectionAccessor |  | 
    
  
  Overrides
  com.google.protobuf.GeneratedMessageV3.internalGetMapFieldReflection(int)
  
  
  
    public final boolean isInitialized()
   
  
  Overrides
  
  
  
  
    public Attachment.Builder newBuilderForType()
   
  
  
  
  
    protected Attachment.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
   
  
  
  Overrides
  
  
  
  
    protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
   
  
  
    
      
        | Returns | 
      
        | Type | Description | 
      
        | Object |  | 
    
  
  Overrides
  
  
  
  
    public Attachment.Builder toBuilder()
   
  
  
  
  
    public void writeTo(CodedOutputStream output)
   
  
  Overrides