Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * Copyright 2010-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.
   * 
   * Licensed under the Apache License, Version 2.0 (the "License").
   * You may not use this file except in compliance with the License.
   * A copy of the License is located at
   * 
   *  http://aws.amazon.com/apache2.0
   * 
  * or in the "license" file accompanying this file. This file is distributed
  * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
  * express or implied. See the License for the specific language governing
  * permissions and limitations under the License.
  */
 package com.amazonaws.services.glacier.model;
 

Contains the Amazon Glacier response to your request.

 
 public class GetJobOutputResult implements SerializableCloneable {

    
The job data, either archive data or inventory data. This stream must implement mark/reset in order for signature calculation to be performed before this data is read for the request payload.
 
     private java.io.InputStream body;

    
The checksum of the data in the response. This header is returned only when retrieving the output for an archive retrieval job. Furthermore, this header appears only under the following conditions:
  • You get the entire range of the archive.
  • You request a range to return of the archive that starts and ends on a multiple of 1 MB. For example, if you have an 3.1 MB archive and you specify a range to return that starts at 1 MB and ends at 2 MB, then the x-amz-sha256-tree-hash is returned as a response header.
  • You request a range of the archive to return that starts on a multiple of 1 MB and goes to the end of the archive. For example, if you have a 3.1 MB archive and you specify a range that starts at 2 MB and ends at 3.1 MB (the end of the archive), then the x-amz-sha256-tree-hash is returned as a response header.
 
     private String checksum;

    
The HTTP response code for a job output request. The value depends on whether a range was specified in the request.
 
     private Integer status;

    
The range of bytes returned by Amazon Glacier. If only partial output is downloaded, the response provides the range of bytes Amazon Glacier returned. For example, bytes 0-1048575/8388608 returns the first 1 MB from 8 MB.
 
     private String contentRange;

    
Indicates the range units accepted. For more information, go to RFC2616.
 
     private String acceptRanges;

    
The Content-Type depends on whether the job output is an archive or a vault inventory. For archive data, the Content-Type is application/octet-stream. For vault inventory, if you requested CSV format when you initiated the job, the Content-Type is text/csv. Otherwise, by default, vault inventory is returned as JSON, and the Content-Type is application/json.
 
     private String contentType;

    
The description of an archive.
 
     private String archiveDescription;

    
The job data, either archive data or inventory data. This stream must implement mark/reset in order for signature calculation to be performed before this data is read for the request payload.

Returns:
The job data, either archive data or inventory data.
 
     public java.io.InputStream getBody() {
         return ;
     }
    
    
The job data, either archive data or inventory data. This stream must implement mark/reset in order for signature calculation to be performed before this data is read for the request payload.

Parameters:
body The job data, either archive data or inventory data.
    public void setBody(java.io.InputStream body) {
        this. = body;
    }
    
    
The job data, either archive data or inventory data. This stream must implement mark/reset in order for signature calculation to be performed before this data is read for the request payload.

Returns a reference to this object so that method calls can be chained together.

Parameters:
body The job data, either archive data or inventory data.
Returns:
A reference to this updated object so that method calls can be chained together.
    public GetJobOutputResult withBody(java.io.InputStream body) {
        this. = body;
        return this;
    }

    
The checksum of the data in the response. This header is returned only when retrieving the output for an archive retrieval job. Furthermore, this header appears only under the following conditions:
  • You get the entire range of the archive.
  • You request a range to return of the archive that starts and ends on a multiple of 1 MB. For example, if you have an 3.1 MB archive and you specify a range to return that starts at 1 MB and ends at 2 MB, then the x-amz-sha256-tree-hash is returned as a response header.
  • You request a range of the archive to return that starts on a multiple of 1 MB and goes to the end of the archive. For example, if you have a 3.1 MB archive and you specify a range that starts at 2 MB and ends at 3.1 MB (the end of the archive), then the x-amz-sha256-tree-hash is returned as a response header.

Returns:
The checksum of the data in the response. This header is returned only when retrieving the output for an archive retrieval job. Furthermore, this header appears only under the following conditions:
  • You get the entire range of the archive.
  • You request a range to return of the archive that starts and ends on a multiple of 1 MB. For example, if you have an 3.1 MB archive and you specify a range to return that starts at 1 MB and ends at 2 MB, then the x-amz-sha256-tree-hash is returned as a response header.
  • You request a range of the archive to return that starts on a multiple of 1 MB and goes to the end of the archive. For example, if you have a 3.1 MB archive and you specify a range that starts at 2 MB and ends at 3.1 MB (the end of the archive), then the x-amz-sha256-tree-hash is returned as a response header.
    public String getChecksum() {
        return ;
    }
    
    
The checksum of the data in the response. This header is returned only when retrieving the output for an archive retrieval job. Furthermore, this header appears only under the following conditions:
  • You get the entire range of the archive.
  • You request a range to return of the archive that starts and ends on a multiple of 1 MB. For example, if you have an 3.1 MB archive and you specify a range to return that starts at 1 MB and ends at 2 MB, then the x-amz-sha256-tree-hash is returned as a response header.
  • You request a range of the archive to return that starts on a multiple of 1 MB and goes to the end of the archive. For example, if you have a 3.1 MB archive and you specify a range that starts at 2 MB and ends at 3.1 MB (the end of the archive), then the x-amz-sha256-tree-hash is returned as a response header.

Parameters:
checksum The checksum of the data in the response. This header is returned only when retrieving the output for an archive retrieval job. Furthermore, this header appears only under the following conditions:
  • You get the entire range of the archive.
  • You request a range to return of the archive that starts and ends on a multiple of 1 MB. For example, if you have an 3.1 MB archive and you specify a range to return that starts at 1 MB and ends at 2 MB, then the x-amz-sha256-tree-hash is returned as a response header.
  • You request a range of the archive to return that starts on a multiple of 1 MB and goes to the end of the archive. For example, if you have a 3.1 MB archive and you specify a range that starts at 2 MB and ends at 3.1 MB (the end of the archive), then the x-amz-sha256-tree-hash is returned as a response header.
    public void setChecksum(String checksum) {
        this. = checksum;
    }
    
    
The checksum of the data in the response. This header is returned only when retrieving the output for an archive retrieval job. Furthermore, this header appears only under the following conditions:
  • You get the entire range of the archive.
  • You request a range to return of the archive that starts and ends on a multiple of 1 MB. For example, if you have an 3.1 MB archive and you specify a range to return that starts at 1 MB and ends at 2 MB, then the x-amz-sha256-tree-hash is returned as a response header.
  • You request a range of the archive to return that starts on a multiple of 1 MB and goes to the end of the archive. For example, if you have a 3.1 MB archive and you specify a range that starts at 2 MB and ends at 3.1 MB (the end of the archive), then the x-amz-sha256-tree-hash is returned as a response header.

Returns a reference to this object so that method calls can be chained together.

Parameters:
checksum The checksum of the data in the response. This header is returned only when retrieving the output for an archive retrieval job. Furthermore, this header appears only under the following conditions:
  • You get the entire range of the archive.
  • You request a range to return of the archive that starts and ends on a multiple of 1 MB. For example, if you have an 3.1 MB archive and you specify a range to return that starts at 1 MB and ends at 2 MB, then the x-amz-sha256-tree-hash is returned as a response header.
  • You request a range of the archive to return that starts on a multiple of 1 MB and goes to the end of the archive. For example, if you have a 3.1 MB archive and you specify a range that starts at 2 MB and ends at 3.1 MB (the end of the archive), then the x-amz-sha256-tree-hash is returned as a response header.
Returns:
A reference to this updated object so that method calls can be chained together.
    public GetJobOutputResult withChecksum(String checksum) {
        this. = checksum;
        return this;
    }

    
The HTTP response code for a job output request. The value depends on whether a range was specified in the request.

Returns:
The HTTP response code for a job output request. The value depends on whether a range was specified in the request.
    public Integer getStatus() {
        return ;
    }
    
    
The HTTP response code for a job output request. The value depends on whether a range was specified in the request.

Parameters:
status The HTTP response code for a job output request. The value depends on whether a range was specified in the request.
    public void setStatus(Integer status) {
        this. = status;
    }
    
    
The HTTP response code for a job output request. The value depends on whether a range was specified in the request.

Returns a reference to this object so that method calls can be chained together.

Parameters:
status The HTTP response code for a job output request. The value depends on whether a range was specified in the request.
Returns:
A reference to this updated object so that method calls can be chained together.
    public GetJobOutputResult withStatus(Integer status) {
        this. = status;
        return this;
    }

    
The range of bytes returned by Amazon Glacier. If only partial output is downloaded, the response provides the range of bytes Amazon Glacier returned. For example, bytes 0-1048575/8388608 returns the first 1 MB from 8 MB.

Returns:
The range of bytes returned by Amazon Glacier. If only partial output is downloaded, the response provides the range of bytes Amazon Glacier returned. For example, bytes 0-1048575/8388608 returns the first 1 MB from 8 MB.
    public String getContentRange() {
        return ;
    }
    
    
The range of bytes returned by Amazon Glacier. If only partial output is downloaded, the response provides the range of bytes Amazon Glacier returned. For example, bytes 0-1048575/8388608 returns the first 1 MB from 8 MB.

Parameters:
contentRange The range of bytes returned by Amazon Glacier. If only partial output is downloaded, the response provides the range of bytes Amazon Glacier returned. For example, bytes 0-1048575/8388608 returns the first 1 MB from 8 MB.
    public void setContentRange(String contentRange) {
        this. = contentRange;
    }
    
    
The range of bytes returned by Amazon Glacier. If only partial output is downloaded, the response provides the range of bytes Amazon Glacier returned. For example, bytes 0-1048575/8388608 returns the first 1 MB from 8 MB.

Returns a reference to this object so that method calls can be chained together.

Parameters:
contentRange The range of bytes returned by Amazon Glacier. If only partial output is downloaded, the response provides the range of bytes Amazon Glacier returned. For example, bytes 0-1048575/8388608 returns the first 1 MB from 8 MB.
Returns:
A reference to this updated object so that method calls can be chained together.
    public GetJobOutputResult withContentRange(String contentRange) {
        this. = contentRange;
        return this;
    }

    
Indicates the range units accepted. For more information, go to RFC2616.

Returns:
Indicates the range units accepted. For more information, go to RFC2616.
    public String getAcceptRanges() {
        return ;
    }
    
    
Indicates the range units accepted. For more information, go to RFC2616.

Parameters:
acceptRanges Indicates the range units accepted. For more information, go to RFC2616.
    public void setAcceptRanges(String acceptRanges) {
        this. = acceptRanges;
    }
    
    
Indicates the range units accepted. For more information, go to RFC2616.

Returns a reference to this object so that method calls can be chained together.

Parameters:
acceptRanges Indicates the range units accepted. For more information, go to RFC2616.
Returns:
A reference to this updated object so that method calls can be chained together.
    public GetJobOutputResult withAcceptRanges(String acceptRanges) {
        this. = acceptRanges;
        return this;
    }

    
The Content-Type depends on whether the job output is an archive or a vault inventory. For archive data, the Content-Type is application/octet-stream. For vault inventory, if you requested CSV format when you initiated the job, the Content-Type is text/csv. Otherwise, by default, vault inventory is returned as JSON, and the Content-Type is application/json.

Returns:
The Content-Type depends on whether the job output is an archive or a vault inventory. For archive data, the Content-Type is application/octet-stream. For vault inventory, if you requested CSV format when you initiated the job, the Content-Type is text/csv. Otherwise, by default, vault inventory is returned as JSON, and the Content-Type is application/json.
    public String getContentType() {
        return ;
    }
    
    
The Content-Type depends on whether the job output is an archive or a vault inventory. For archive data, the Content-Type is application/octet-stream. For vault inventory, if you requested CSV format when you initiated the job, the Content-Type is text/csv. Otherwise, by default, vault inventory is returned as JSON, and the Content-Type is application/json.

Parameters:
contentType The Content-Type depends on whether the job output is an archive or a vault inventory. For archive data, the Content-Type is application/octet-stream. For vault inventory, if you requested CSV format when you initiated the job, the Content-Type is text/csv. Otherwise, by default, vault inventory is returned as JSON, and the Content-Type is application/json.
    public void setContentType(String contentType) {
        this. = contentType;
    }
    
    
The Content-Type depends on whether the job output is an archive or a vault inventory. For archive data, the Content-Type is application/octet-stream. For vault inventory, if you requested CSV format when you initiated the job, the Content-Type is text/csv. Otherwise, by default, vault inventory is returned as JSON, and the Content-Type is application/json.

Returns a reference to this object so that method calls can be chained together.

Parameters:
contentType The Content-Type depends on whether the job output is an archive or a vault inventory. For archive data, the Content-Type is application/octet-stream. For vault inventory, if you requested CSV format when you initiated the job, the Content-Type is text/csv. Otherwise, by default, vault inventory is returned as JSON, and the Content-Type is application/json.
Returns:
A reference to this updated object so that method calls can be chained together.
    public GetJobOutputResult withContentType(String contentType) {
        this. = contentType;
        return this;
    }

    
The description of an archive.

Returns:
The description of an archive.
    public String getArchiveDescription() {
        return ;
    }
    
    
The description of an archive.

Parameters:
archiveDescription The description of an archive.
    public void setArchiveDescription(String archiveDescription) {
        this. = archiveDescription;
    }
    
    
The description of an archive.

Returns a reference to this object so that method calls can be chained together.

Parameters:
archiveDescription The description of an archive.
Returns:
A reference to this updated object so that method calls can be chained together.
    public GetJobOutputResult withArchiveDescription(String archiveDescription) {
        this. = archiveDescription;
        return this;
    }

    
Returns a string representation of this object; useful for testing and debugging.

Returns:
A string representation of this object.
See also:
java.lang.Object.toString()
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("{");
        if (getBody() != nullsb.append("Body: " + getBody() + ",");
        if (getChecksum() != nullsb.append("Checksum: " + getChecksum() + ",");
        if (getStatus() != nullsb.append("Status: " + getStatus() + ",");
        if (getContentRange() != nullsb.append("ContentRange: " + getContentRange() + ",");
        if (getAcceptRanges() != nullsb.append("AcceptRanges: " + getAcceptRanges() + ",");
        if (getContentType() != nullsb.append("ContentType: " + getContentType() + ",");
        if (getArchiveDescription() != nullsb.append("ArchiveDescription: " + getArchiveDescription() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getBody() == null) ? 0 : getBody().hashCode()); 
        hashCode = prime * hashCode + ((getChecksum() == null) ? 0 : getChecksum().hashCode()); 
        hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode()); 
        hashCode = prime * hashCode + ((getContentRange() == null) ? 0 : getContentRange().hashCode()); 
        hashCode = prime * hashCode + ((getAcceptRanges() == null) ? 0 : getAcceptRanges().hashCode()); 
        hashCode = prime * hashCode + ((getContentType() == null) ? 0 : getContentType().hashCode()); 
        hashCode = prime * hashCode + ((getArchiveDescription() == null) ? 0 : getArchiveDescription().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof GetJobOutputResult == falsereturn false;
        GetJobOutputResult other = (GetJobOutputResult)obj;
        
        if (other.getBody() == null ^ this.getBody() == nullreturn false;
        if (other.getBody() != null && other.getBody().equals(this.getBody()) == falsereturn false
        if (other.getChecksum() == null ^ this.getChecksum() == nullreturn false;
        if (other.getChecksum() != null && other.getChecksum().equals(this.getChecksum()) == falsereturn false
        if (other.getStatus() == null ^ this.getStatus() == nullreturn false;
        if (other.getStatus() != null && other.getStatus().equals(this.getStatus()) == falsereturn false
        if (other.getContentRange() == null ^ this.getContentRange() == nullreturn false;
        if (other.getContentRange() != null && other.getContentRange().equals(this.getContentRange()) == falsereturn false
        if (other.getAcceptRanges() == null ^ this.getAcceptRanges() == nullreturn false;
        if (other.getAcceptRanges() != null && other.getAcceptRanges().equals(this.getAcceptRanges()) == falsereturn false
        if (other.getContentType() == null ^ this.getContentType() == nullreturn false;
        if (other.getContentType() != null && other.getContentType().equals(this.getContentType()) == falsereturn false
        if (other.getArchiveDescription() == null ^ this.getArchiveDescription() == nullreturn false;
        if (other.getArchiveDescription() != null && other.getArchiveDescription().equals(this.getArchiveDescription()) == falsereturn false
        return true;
    }
    
    @Override
    public GetJobOutputResult clone() {
        try {
            return (GetJobOutputResultsuper.clone();
        
        } catch (CloneNotSupportedException e) {
            throw new IllegalStateException(
                    "Got a CloneNotSupportedException from Object.clone() "
                    + "even though we're Cloneable!",
                    e);
        }
        
    }
}
    
New to GrepCode? Check out our FAQ X