All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.ebs.model.ListSnapshotBlocksResult Maven / Gradle / Ivy

/*
 * Copyright 2017-2022 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.ebs.model;

import java.io.Serializable;
import javax.annotation.Generated;

/**
 * 
 * @see AWS API
 *      Documentation
 */
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class ListSnapshotBlocksResult extends com.amazonaws.AmazonWebServiceResult implements Serializable, Cloneable {

    /**
     * 

* An array of objects containing information about the blocks. *

*/ private java.util.List blocks; /** *

* The time when the BlockToken expires. *

*/ private java.util.Date expiryTime; /** *

* The size of the volume in GB. *

*/ private Long volumeSize; /** *

* The size of the blocks in the snapshot, in bytes. *

*/ private Integer blockSize; /** *

* The token to use to retrieve the next page of results. This value is null when there are no more results to * return. *

*/ private String nextToken; /** *

* An array of objects containing information about the blocks. *

* * @return An array of objects containing information about the blocks. */ public java.util.List getBlocks() { return blocks; } /** *

* An array of objects containing information about the blocks. *

* * @param blocks * An array of objects containing information about the blocks. */ public void setBlocks(java.util.Collection blocks) { if (blocks == null) { this.blocks = null; return; } this.blocks = new java.util.ArrayList(blocks); } /** *

* An array of objects containing information about the blocks. *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setBlocks(java.util.Collection)} or {@link #withBlocks(java.util.Collection)} if you want to override the * existing values. *

* * @param blocks * An array of objects containing information about the blocks. * @return Returns a reference to this object so that method calls can be chained together. */ public ListSnapshotBlocksResult withBlocks(Block... blocks) { if (this.blocks == null) { setBlocks(new java.util.ArrayList(blocks.length)); } for (Block ele : blocks) { this.blocks.add(ele); } return this; } /** *

* An array of objects containing information about the blocks. *

* * @param blocks * An array of objects containing information about the blocks. * @return Returns a reference to this object so that method calls can be chained together. */ public ListSnapshotBlocksResult withBlocks(java.util.Collection blocks) { setBlocks(blocks); return this; } /** *

* The time when the BlockToken expires. *

* * @param expiryTime * The time when the BlockToken expires. */ public void setExpiryTime(java.util.Date expiryTime) { this.expiryTime = expiryTime; } /** *

* The time when the BlockToken expires. *

* * @return The time when the BlockToken expires. */ public java.util.Date getExpiryTime() { return this.expiryTime; } /** *

* The time when the BlockToken expires. *

* * @param expiryTime * The time when the BlockToken expires. * @return Returns a reference to this object so that method calls can be chained together. */ public ListSnapshotBlocksResult withExpiryTime(java.util.Date expiryTime) { setExpiryTime(expiryTime); return this; } /** *

* The size of the volume in GB. *

* * @param volumeSize * The size of the volume in GB. */ public void setVolumeSize(Long volumeSize) { this.volumeSize = volumeSize; } /** *

* The size of the volume in GB. *

* * @return The size of the volume in GB. */ public Long getVolumeSize() { return this.volumeSize; } /** *

* The size of the volume in GB. *

* * @param volumeSize * The size of the volume in GB. * @return Returns a reference to this object so that method calls can be chained together. */ public ListSnapshotBlocksResult withVolumeSize(Long volumeSize) { setVolumeSize(volumeSize); return this; } /** *

* The size of the blocks in the snapshot, in bytes. *

* * @param blockSize * The size of the blocks in the snapshot, in bytes. */ public void setBlockSize(Integer blockSize) { this.blockSize = blockSize; } /** *

* The size of the blocks in the snapshot, in bytes. *

* * @return The size of the blocks in the snapshot, in bytes. */ public Integer getBlockSize() { return this.blockSize; } /** *

* The size of the blocks in the snapshot, in bytes. *

* * @param blockSize * The size of the blocks in the snapshot, in bytes. * @return Returns a reference to this object so that method calls can be chained together. */ public ListSnapshotBlocksResult withBlockSize(Integer blockSize) { setBlockSize(blockSize); return this; } /** *

* The token to use to retrieve the next page of results. This value is null when there are no more results to * return. *

* * @param nextToken * The token to use to retrieve the next page of results. This value is null when there are no more results * to return. */ public void setNextToken(String nextToken) { this.nextToken = nextToken; } /** *

* The token to use to retrieve the next page of results. This value is null when there are no more results to * return. *

* * @return The token to use to retrieve the next page of results. This value is null when there are no more results * to return. */ public String getNextToken() { return this.nextToken; } /** *

* The token to use to retrieve the next page of results. This value is null when there are no more results to * return. *

* * @param nextToken * The token to use to retrieve the next page of results. This value is null when there are no more results * to return. * @return Returns a reference to this object so that method calls can be chained together. */ public ListSnapshotBlocksResult withNextToken(String nextToken) { setNextToken(nextToken); return this; } /** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getBlocks() != null) sb.append("Blocks: ").append("***Sensitive Data Redacted***").append(","); if (getExpiryTime() != null) sb.append("ExpiryTime: ").append(getExpiryTime()).append(","); if (getVolumeSize() != null) sb.append("VolumeSize: ").append(getVolumeSize()).append(","); if (getBlockSize() != null) sb.append("BlockSize: ").append(getBlockSize()).append(","); if (getNextToken() != null) sb.append("NextToken: ").append(getNextToken()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ListSnapshotBlocksResult == false) return false; ListSnapshotBlocksResult other = (ListSnapshotBlocksResult) obj; if (other.getBlocks() == null ^ this.getBlocks() == null) return false; if (other.getBlocks() != null && other.getBlocks().equals(this.getBlocks()) == false) return false; if (other.getExpiryTime() == null ^ this.getExpiryTime() == null) return false; if (other.getExpiryTime() != null && other.getExpiryTime().equals(this.getExpiryTime()) == false) return false; if (other.getVolumeSize() == null ^ this.getVolumeSize() == null) return false; if (other.getVolumeSize() != null && other.getVolumeSize().equals(this.getVolumeSize()) == false) return false; if (other.getBlockSize() == null ^ this.getBlockSize() == null) return false; if (other.getBlockSize() != null && other.getBlockSize().equals(this.getBlockSize()) == false) return false; if (other.getNextToken() == null ^ this.getNextToken() == null) return false; if (other.getNextToken() != null && other.getNextToken().equals(this.getNextToken()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getBlocks() == null) ? 0 : getBlocks().hashCode()); hashCode = prime * hashCode + ((getExpiryTime() == null) ? 0 : getExpiryTime().hashCode()); hashCode = prime * hashCode + ((getVolumeSize() == null) ? 0 : getVolumeSize().hashCode()); hashCode = prime * hashCode + ((getBlockSize() == null) ? 0 : getBlockSize().hashCode()); hashCode = prime * hashCode + ((getNextToken() == null) ? 0 : getNextToken().hashCode()); return hashCode; } @Override public ListSnapshotBlocksResult clone() { try { return (ListSnapshotBlocksResult) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy