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 ListPartsResult implements SerializableCloneable {

    
The ID of the upload to which the parts are associated.
 
     private String multipartUploadId;

    
The Amazon Resource Name (ARN) of the vault to which the multipart upload was initiated.
 
     private String vaultARN;

    
The description of the archive that was specified in the Initiate Multipart Upload request.
 
     private String archiveDescription;

    
The part size in bytes.
 
     private Long partSizeInBytes;

    
The UTC time at which the multipart upload was initiated.
 
     private String creationDate;

    
A list of the part sizes of the multipart upload.
 
An opaque string that represents where to continue pagination of the results. You use the marker in a new List Parts request to obtain more jobs in the list. If there are no more parts, this value is null.
 
     private String marker;

    
The ID of the upload to which the parts are associated.

Returns:
The ID of the upload to which the parts are associated.
 
     public String getMultipartUploadId() {
         return ;
     }
    
    
The ID of the upload to which the parts are associated.

Parameters:
multipartUploadId The ID of the upload to which the parts are associated.
 
     public void setMultipartUploadId(String multipartUploadId) {
         this. = multipartUploadId;
     }
    
    
The ID of the upload to which the parts are associated.

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

Parameters:
multipartUploadId The ID of the upload to which the parts are associated.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public ListPartsResult withMultipartUploadId(String multipartUploadId) {
         this. = multipartUploadId;
         return this;
     }

    
The Amazon Resource Name (ARN) of the vault to which the multipart upload was initiated.

Returns:
The Amazon Resource Name (ARN) of the vault to which the multipart upload was initiated.
    public String getVaultARN() {
        return ;
    }
    
    
The Amazon Resource Name (ARN) of the vault to which the multipart upload was initiated.

Parameters:
vaultARN The Amazon Resource Name (ARN) of the vault to which the multipart upload was initiated.
    public void setVaultARN(String vaultARN) {
        this. = vaultARN;
    }
    
    
The Amazon Resource Name (ARN) of the vault to which the multipart upload was initiated.

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

Parameters:
vaultARN The Amazon Resource Name (ARN) of the vault to which the multipart upload was initiated.
Returns:
A reference to this updated object so that method calls can be chained together.
    public ListPartsResult withVaultARN(String vaultARN) {
        this. = vaultARN;
        return this;
    }

    
The description of the archive that was specified in the Initiate Multipart Upload request.

Returns:
The description of the archive that was specified in the Initiate Multipart Upload request.
    public String getArchiveDescription() {
        return ;
    }
    
    
The description of the archive that was specified in the Initiate Multipart Upload request.

Parameters:
archiveDescription The description of the archive that was specified in the Initiate Multipart Upload request.
    public void setArchiveDescription(String archiveDescription) {
        this. = archiveDescription;
    }
    
    
The description of the archive that was specified in the Initiate Multipart Upload request.

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

Parameters:
archiveDescription The description of the archive that was specified in the Initiate Multipart Upload request.
Returns:
A reference to this updated object so that method calls can be chained together.
    public ListPartsResult withArchiveDescription(String archiveDescription) {
        this. = archiveDescription;
        return this;
    }

    
The part size in bytes.

Returns:
The part size in bytes.
    public Long getPartSizeInBytes() {
        return ;
    }
    
    
The part size in bytes.

Parameters:
partSizeInBytes The part size in bytes.
    public void setPartSizeInBytes(Long partSizeInBytes) {
        this. = partSizeInBytes;
    }
    
    
The part size in bytes.

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

Parameters:
partSizeInBytes The part size in bytes.
Returns:
A reference to this updated object so that method calls can be chained together.
    public ListPartsResult withPartSizeInBytes(Long partSizeInBytes) {
        this. = partSizeInBytes;
        return this;
    }

    
The UTC time at which the multipart upload was initiated.

Returns:
The UTC time at which the multipart upload was initiated.
    public String getCreationDate() {
        return ;
    }
    
    
The UTC time at which the multipart upload was initiated.

Parameters:
creationDate The UTC time at which the multipart upload was initiated.
    public void setCreationDate(String creationDate) {
        this. = creationDate;
    }
    
    
The UTC time at which the multipart upload was initiated.

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

Parameters:
creationDate The UTC time at which the multipart upload was initiated.
Returns:
A reference to this updated object so that method calls can be chained together.
    public ListPartsResult withCreationDate(String creationDate) {
        this. = creationDate;
        return this;
    }

    
A list of the part sizes of the multipart upload.

Returns:
A list of the part sizes of the multipart upload.
    public java.util.List<PartListElementgetParts() {
        if ( == null) {
               = new com.amazonaws.internal.ListWithAutoConstructFlag<PartListElement>();
              .setAutoConstruct(true);
        }
        return ;
    }
    
    
A list of the part sizes of the multipart upload.

Parameters:
parts A list of the part sizes of the multipart upload.
    public void setParts(java.util.Collection<PartListElementparts) {
        if (parts == null) {
            this. = null;
            return;
        }
        partsCopy.addAll(parts);
        this. = partsCopy;
    }
    
    
A list of the part sizes of the multipart upload.

NOTE: This method appends the values to the existing list (if any). Use setParts(java.util.Collection) or withParts(java.util.Collection) if you want to override the existing values.

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

Parameters:
parts A list of the part sizes of the multipart upload.
Returns:
A reference to this updated object so that method calls can be chained together.
    public ListPartsResult withParts(PartListElement... parts) {
        if (getParts() == nullsetParts(new java.util.ArrayList<PartListElement>(parts.length));
        for (PartListElement value : parts) {
            getParts().add(value);
        }
        return this;
    }
    
    
A list of the part sizes of the multipart upload.

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

Parameters:
parts A list of the part sizes of the multipart upload.
Returns:
A reference to this updated object so that method calls can be chained together.
        if (parts == null) {
            this. = null;
        } else {
            partsCopy.addAll(parts);
            this. = partsCopy;
        }
        return this;
    }

    
An opaque string that represents where to continue pagination of the results. You use the marker in a new List Parts request to obtain more jobs in the list. If there are no more parts, this value is null.

Returns:
An opaque string that represents where to continue pagination of the results. You use the marker in a new List Parts request to obtain more jobs in the list. If there are no more parts, this value is null.
    public String getMarker() {
        return ;
    }
    
    
An opaque string that represents where to continue pagination of the results. You use the marker in a new List Parts request to obtain more jobs in the list. If there are no more parts, this value is null.

Parameters:
marker An opaque string that represents where to continue pagination of the results. You use the marker in a new List Parts request to obtain more jobs in the list. If there are no more parts, this value is null.
    public void setMarker(String marker) {
        this. = marker;
    }
    
    
An opaque string that represents where to continue pagination of the results. You use the marker in a new List Parts request to obtain more jobs in the list. If there are no more parts, this value is null.

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

Parameters:
marker An opaque string that represents where to continue pagination of the results. You use the marker in a new List Parts request to obtain more jobs in the list. If there are no more parts, this value is null.
Returns:
A reference to this updated object so that method calls can be chained together.
    public ListPartsResult withMarker(String marker) {
        this. = marker;
        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 (getMultipartUploadId() != nullsb.append("MultipartUploadId: " + getMultipartUploadId() + ",");
        if (getVaultARN() != nullsb.append("VaultARN: " + getVaultARN() + ",");
        if (getArchiveDescription() != nullsb.append("ArchiveDescription: " + getArchiveDescription() + ",");
        if (getPartSizeInBytes() != nullsb.append("PartSizeInBytes: " + getPartSizeInBytes() + ",");
        if (getCreationDate() != nullsb.append("CreationDate: " + getCreationDate() + ",");
        if (getParts() != nullsb.append("Parts: " + getParts() + ",");
        if (getMarker() != nullsb.append("Marker: " + getMarker() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getMultipartUploadId() == null) ? 0 : getMultipartUploadId().hashCode()); 
        hashCode = prime * hashCode + ((getVaultARN() == null) ? 0 : getVaultARN().hashCode()); 
        hashCode = prime * hashCode + ((getArchiveDescription() == null) ? 0 : getArchiveDescription().hashCode()); 
        hashCode = prime * hashCode + ((getPartSizeInBytes() == null) ? 0 : getPartSizeInBytes().hashCode()); 
        hashCode = prime * hashCode + ((getCreationDate() == null) ? 0 : getCreationDate().hashCode()); 
        hashCode = prime * hashCode + ((getParts() == null) ? 0 : getParts().hashCode()); 
        hashCode = prime * hashCode + ((getMarker() == null) ? 0 : getMarker().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof ListPartsResult == falsereturn false;
        ListPartsResult other = (ListPartsResult)obj;
        
        if (other.getMultipartUploadId() == null ^ this.getMultipartUploadId() == nullreturn false;
        if (other.getMultipartUploadId() != null && other.getMultipartUploadId().equals(this.getMultipartUploadId()) == falsereturn false
        if (other.getVaultARN() == null ^ this.getVaultARN() == nullreturn false;
        if (other.getVaultARN() != null && other.getVaultARN().equals(this.getVaultARN()) == falsereturn false
        if (other.getArchiveDescription() == null ^ this.getArchiveDescription() == nullreturn false;
        if (other.getArchiveDescription() != null && other.getArchiveDescription().equals(this.getArchiveDescription()) == falsereturn false
        if (other.getPartSizeInBytes() == null ^ this.getPartSizeInBytes() == nullreturn false;
        if (other.getPartSizeInBytes() != null && other.getPartSizeInBytes().equals(this.getPartSizeInBytes()) == falsereturn false
        if (other.getCreationDate() == null ^ this.getCreationDate() == nullreturn false;
        if (other.getCreationDate() != null && other.getCreationDate().equals(this.getCreationDate()) == falsereturn false
        if (other.getParts() == null ^ this.getParts() == nullreturn false;
        if (other.getParts() != null && other.getParts().equals(this.getParts()) == falsereturn false
        if (other.getMarker() == null ^ this.getMarker() == nullreturn false;
        if (other.getMarker() != null && other.getMarker().equals(this.getMarker()) == falsereturn false
        return true;
    }
    
    @Override
    public ListPartsResult clone() {
        try {
            return (ListPartsResultsuper.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