Class UploadArchiveRequest

java.lang.Object
com.amazonaws.AmazonWebServiceRequest
com.amazonaws.services.glacier.model.UploadArchiveRequest
All Implemented Interfaces:
ReadLimitInfo, Serializable, Cloneable

public class UploadArchiveRequest extends AmazonWebServiceRequest implements Serializable, Cloneable

Provides options to add an archive to a vault.

See Also:
  • Constructor Details

    • UploadArchiveRequest

      public UploadArchiveRequest()
      Default constructor for UploadArchiveRequest object. Callers should use the setter or fluent setter (with...) methods to initialize the object after creating it.
    • UploadArchiveRequest

      public UploadArchiveRequest(String vaultName, String archiveDescription, String checksum, InputStream body)
      Constructs a new UploadArchiveRequest object. Callers should use the setter or fluent setter (with...) methods to initialize any additional object members.
      Parameters:
      vaultName - The name of the vault.
      archiveDescription - The optional description of the archive you are uploading.
      checksum - The SHA256 tree hash of the data being uploaded.
      body - The data to upload.
    • UploadArchiveRequest

      public UploadArchiveRequest(String vaultName, String accountId, String archiveDescription, String checksum, InputStream body)
      Constructs a new UploadArchiveRequest object. Callers should use the setter or fluent setter (with...) methods to initialize any additional object members.
      Parameters:
      vaultName - The name of the vault.
      accountId - The AccountId value is the AWS account ID of the account that owns the vault. You can either specify an AWS account ID or optionally a single apos-apos (hyphen), in which case Amazon Glacier uses the AWS account ID associated with the credentials used to sign the request. If you use an account ID, do not include any hyphens (apos-apos) in the ID.
      archiveDescription - The optional description of the archive you are uploading.
      checksum - The SHA256 tree hash of the data being uploaded.
      body - The data to upload.
  • Method Details

    • setVaultName

      public void setVaultName(String vaultName)

      The name of the vault.

      Parameters:
      vaultName - The name of the vault.
    • getVaultName

      public String getVaultName()

      The name of the vault.

      Returns:
      The name of the vault.
    • withVaultName

      public UploadArchiveRequest withVaultName(String vaultName)

      The name of the vault.

      Parameters:
      vaultName - The name of the vault.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • setAccountId

      public void setAccountId(String accountId)

      The AccountId value is the AWS account ID of the account that owns the vault. You can either specify an AWS account ID or optionally a single apos-apos (hyphen), in which case Amazon Glacier uses the AWS account ID associated with the credentials used to sign the request. If you use an account ID, do not include any hyphens (apos-apos) in the ID.

      Parameters:
      accountId - The AccountId value is the AWS account ID of the account that owns the vault. You can either specify an AWS account ID or optionally a single apos-apos (hyphen), in which case Amazon Glacier uses the AWS account ID associated with the credentials used to sign the request. If you use an account ID, do not include any hyphens (apos-apos) in the ID.
    • getAccountId

      public String getAccountId()

      The AccountId value is the AWS account ID of the account that owns the vault. You can either specify an AWS account ID or optionally a single apos-apos (hyphen), in which case Amazon Glacier uses the AWS account ID associated with the credentials used to sign the request. If you use an account ID, do not include any hyphens (apos-apos) in the ID.

      Returns:
      The AccountId value is the AWS account ID of the account that owns the vault. You can either specify an AWS account ID or optionally a single apos-apos (hyphen), in which case Amazon Glacier uses the AWS account ID associated with the credentials used to sign the request. If you use an account ID, do not include any hyphens (apos-apos) in the ID.
    • withAccountId

      public UploadArchiveRequest withAccountId(String accountId)

      The AccountId value is the AWS account ID of the account that owns the vault. You can either specify an AWS account ID or optionally a single apos-apos (hyphen), in which case Amazon Glacier uses the AWS account ID associated with the credentials used to sign the request. If you use an account ID, do not include any hyphens (apos-apos) in the ID.

      Parameters:
      accountId - The AccountId value is the AWS account ID of the account that owns the vault. You can either specify an AWS account ID or optionally a single apos-apos (hyphen), in which case Amazon Glacier uses the AWS account ID associated with the credentials used to sign the request. If you use an account ID, do not include any hyphens (apos-apos) in the ID.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • setArchiveDescription

      public void setArchiveDescription(String archiveDescription)

      The optional description of the archive you are uploading.

      Parameters:
      archiveDescription - The optional description of the archive you are uploading.
    • getArchiveDescription

      public String getArchiveDescription()

      The optional description of the archive you are uploading.

      Returns:
      The optional description of the archive you are uploading.
    • withArchiveDescription

      public UploadArchiveRequest withArchiveDescription(String archiveDescription)

      The optional description of the archive you are uploading.

      Parameters:
      archiveDescription - The optional description of the archive you are uploading.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • setChecksum

      public void setChecksum(String checksum)

      The SHA256 tree hash of the data being uploaded.

      Parameters:
      checksum - The SHA256 tree hash of the data being uploaded.
    • getChecksum

      public String getChecksum()

      The SHA256 tree hash of the data being uploaded.

      Returns:
      The SHA256 tree hash of the data being uploaded.
    • withChecksum

      public UploadArchiveRequest withChecksum(String checksum)

      The SHA256 tree hash of the data being uploaded.

      Parameters:
      checksum - The SHA256 tree hash of the data being uploaded.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • setBody

      public void setBody(InputStream body)

      The data to upload.

      Parameters:
      body - The data to upload.
    • getBody

      public InputStream getBody()

      The data to upload.

      Returns:
      The data to upload.
    • withBody

      public UploadArchiveRequest withBody(InputStream body)

      The data to upload.

      Parameters:
      body - The data to upload.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • setContentLength

      public void setContentLength(Long contentLength)
      The content length of the archive to upload.
      Parameters:
      contentLength - The content length of the archive to upload.
    • getContentLength

      public Long getContentLength()
      The content length of the archive to upload.
      Returns:
      The content length of the archive to upload.
    • withContentLength

      public UploadArchiveRequest withContentLength(Long contentLength)
      The content length of the archive to upload.
      Parameters:
      contentLength - The content length of the archive to upload.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • toString

      public String toString()
      Returns a string representation of this object; useful for testing and debugging.
      Overrides:
      toString in class Object
      Returns:
      A string representation of this object.
      See Also:
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • clone

      public UploadArchiveRequest clone()
      Description copied from class: AmazonWebServiceRequest
      Creates a shallow clone of this request. Explicitly does not clone the deep structure of the request object.
      Overrides:
      clone in class AmazonWebServiceRequest
      See Also: