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.storagegateway.model;
 
Cachedi S C S I Volume
 
 public class CachediSCSIVolume implements SerializableCloneable {
 
     private String volumeARN;
 
     private String volumeId;
 
     private String volumeType;
 
     private String volumeStatus;
 
     private Long volumeSizeInBytes;
 
     private Double volumeProgress;
 
     private String sourceSnapshotId;

    
Lists iSCSI information about a volume.
 
     private VolumeiSCSIAttributes volumeiSCSIAttributes;

    
Returns the value of the VolumeARN property for this object.

Constraints:
Length: 50 - 500

Returns:
The value of the VolumeARN property for this object.
 
     public String getVolumeARN() {
         return ;
     }
    
    
Sets the value of the VolumeARN property for this object.

Constraints:
Length: 50 - 500

Parameters:
volumeARN The new value for the VolumeARN property for this object.
 
     public void setVolumeARN(String volumeARN) {
         this. = volumeARN;
     }
    
    
Sets the value of the VolumeARN property for this object.

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

Constraints:
Length: 50 - 500

Parameters:
volumeARN The new value for the VolumeARN property for this object.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public CachediSCSIVolume withVolumeARN(String volumeARN) {
         this. = volumeARN;
         return this;
     }

    
Returns the value of the VolumeId property for this object.

Constraints:
Length: 12 - 30

Returns:
The value of the VolumeId property for this object.
 
     public String getVolumeId() {
         return ;
     }
    
    
Sets the value of the VolumeId property for this object.

Constraints:
Length: 12 - 30

Parameters:
volumeId The new value for the VolumeId property for this object.
    public void setVolumeId(String volumeId) {
        this. = volumeId;
    }
    
    
Sets the value of the VolumeId property for this object.

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

Constraints:
Length: 12 - 30

Parameters:
volumeId The new value for the VolumeId property for this object.
Returns:
A reference to this updated object so that method calls can be chained together.
    public CachediSCSIVolume withVolumeId(String volumeId) {
        this. = volumeId;
        return this;
    }

    
Returns the value of the VolumeType property for this object.

Constraints:
Length: 3 - 100

Returns:
The value of the VolumeType property for this object.
    public String getVolumeType() {
        return ;
    }
    
    
Sets the value of the VolumeType property for this object.

Constraints:
Length: 3 - 100

Parameters:
volumeType The new value for the VolumeType property for this object.
    public void setVolumeType(String volumeType) {
        this. = volumeType;
    }
    
    
Sets the value of the VolumeType property for this object.

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

Constraints:
Length: 3 - 100

Parameters:
volumeType The new value for the VolumeType property for this object.
Returns:
A reference to this updated object so that method calls can be chained together.
    public CachediSCSIVolume withVolumeType(String volumeType) {
        this. = volumeType;
        return this;
    }

    
Returns the value of the VolumeStatus property for this object.

Constraints:
Length: 3 - 50

Returns:
The value of the VolumeStatus property for this object.
    public String getVolumeStatus() {
        return ;
    }
    
    
Sets the value of the VolumeStatus property for this object.

Constraints:
Length: 3 - 50

Parameters:
volumeStatus The new value for the VolumeStatus property for this object.
    public void setVolumeStatus(String volumeStatus) {
        this. = volumeStatus;
    }
    
    
Sets the value of the VolumeStatus property for this object.

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

Constraints:
Length: 3 - 50

Parameters:
volumeStatus The new value for the VolumeStatus property for this object.
Returns:
A reference to this updated object so that method calls can be chained together.
    public CachediSCSIVolume withVolumeStatus(String volumeStatus) {
        this. = volumeStatus;
        return this;
    }

    
Returns the value of the VolumeSizeInBytes property for this object.

Returns:
The value of the VolumeSizeInBytes property for this object.
    public Long getVolumeSizeInBytes() {
        return ;
    }
    
    
Sets the value of the VolumeSizeInBytes property for this object.

Parameters:
volumeSizeInBytes The new value for the VolumeSizeInBytes property for this object.
    public void setVolumeSizeInBytes(Long volumeSizeInBytes) {
        this. = volumeSizeInBytes;
    }
    
    
Sets the value of the VolumeSizeInBytes property for this object.

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

Parameters:
volumeSizeInBytes The new value for the VolumeSizeInBytes property for this object.
Returns:
A reference to this updated object so that method calls can be chained together.
    public CachediSCSIVolume withVolumeSizeInBytes(Long volumeSizeInBytes) {
        this. = volumeSizeInBytes;
        return this;
    }

    
Returns the value of the VolumeProgress property for this object.

Returns:
The value of the VolumeProgress property for this object.
    public Double getVolumeProgress() {
        return ;
    }
    
    
Sets the value of the VolumeProgress property for this object.

Parameters:
volumeProgress The new value for the VolumeProgress property for this object.
    public void setVolumeProgress(Double volumeProgress) {
        this. = volumeProgress;
    }
    
    
Sets the value of the VolumeProgress property for this object.

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

Parameters:
volumeProgress The new value for the VolumeProgress property for this object.
Returns:
A reference to this updated object so that method calls can be chained together.
    public CachediSCSIVolume withVolumeProgress(Double volumeProgress) {
        this. = volumeProgress;
        return this;
    }

    
Returns the value of the SourceSnapshotId property for this object.

Constraints:
Pattern: \Asnap-[0-9a-fA-F]{8}\z

Returns:
The value of the SourceSnapshotId property for this object.
    public String getSourceSnapshotId() {
        return ;
    }
    
    
Sets the value of the SourceSnapshotId property for this object.

Constraints:
Pattern: \Asnap-[0-9a-fA-F]{8}\z

Parameters:
sourceSnapshotId The new value for the SourceSnapshotId property for this object.
    public void setSourceSnapshotId(String sourceSnapshotId) {
        this. = sourceSnapshotId;
    }
    
    
Sets the value of the SourceSnapshotId property for this object.

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

Constraints:
Pattern: \Asnap-[0-9a-fA-F]{8}\z

Parameters:
sourceSnapshotId The new value for the SourceSnapshotId property for this object.
Returns:
A reference to this updated object so that method calls can be chained together.
    public CachediSCSIVolume withSourceSnapshotId(String sourceSnapshotId) {
        this. = sourceSnapshotId;
        return this;
    }

    
Lists iSCSI information about a volume.

Returns:
Lists iSCSI information about a volume.
        return ;
    }
    
    
Lists iSCSI information about a volume.

Parameters:
volumeiSCSIAttributes Lists iSCSI information about a volume.
    public void setVolumeiSCSIAttributes(VolumeiSCSIAttributes volumeiSCSIAttributes) {
        this. = volumeiSCSIAttributes;
    }
    
    
Lists iSCSI information about a volume.

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

Parameters:
volumeiSCSIAttributes Lists iSCSI information about a volume.
Returns:
A reference to this updated object so that method calls can be chained together.
    public CachediSCSIVolume withVolumeiSCSIAttributes(VolumeiSCSIAttributes volumeiSCSIAttributes) {
        this. = volumeiSCSIAttributes;
        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 (getVolumeARN() != nullsb.append("VolumeARN: " + getVolumeARN() + ",");
        if (getVolumeId() != nullsb.append("VolumeId: " + getVolumeId() + ",");
        if (getVolumeType() != nullsb.append("VolumeType: " + getVolumeType() + ",");
        if (getVolumeStatus() != nullsb.append("VolumeStatus: " + getVolumeStatus() + ",");
        if (getVolumeSizeInBytes() != nullsb.append("VolumeSizeInBytes: " + getVolumeSizeInBytes() + ",");
        if (getVolumeProgress() != nullsb.append("VolumeProgress: " + getVolumeProgress() + ",");
        if (getSourceSnapshotId() != nullsb.append("SourceSnapshotId: " + getSourceSnapshotId() + ",");
        if (getVolumeiSCSIAttributes() != nullsb.append("VolumeiSCSIAttributes: " + getVolumeiSCSIAttributes() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getVolumeARN() == null) ? 0 : getVolumeARN().hashCode()); 
        hashCode = prime * hashCode + ((getVolumeId() == null) ? 0 : getVolumeId().hashCode()); 
        hashCode = prime * hashCode + ((getVolumeType() == null) ? 0 : getVolumeType().hashCode()); 
        hashCode = prime * hashCode + ((getVolumeStatus() == null) ? 0 : getVolumeStatus().hashCode()); 
        hashCode = prime * hashCode + ((getVolumeSizeInBytes() == null) ? 0 : getVolumeSizeInBytes().hashCode()); 
        hashCode = prime * hashCode + ((getVolumeProgress() == null) ? 0 : getVolumeProgress().hashCode()); 
        hashCode = prime * hashCode + ((getSourceSnapshotId() == null) ? 0 : getSourceSnapshotId().hashCode()); 
        hashCode = prime * hashCode + ((getVolumeiSCSIAttributes() == null) ? 0 : getVolumeiSCSIAttributes().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof CachediSCSIVolume == falsereturn false;
        CachediSCSIVolume other = (CachediSCSIVolume)obj;
        
        if (other.getVolumeARN() == null ^ this.getVolumeARN() == nullreturn false;
        if (other.getVolumeARN() != null && other.getVolumeARN().equals(this.getVolumeARN()) == falsereturn false
        if (other.getVolumeId() == null ^ this.getVolumeId() == nullreturn false;
        if (other.getVolumeId() != null && other.getVolumeId().equals(this.getVolumeId()) == falsereturn false
        if (other.getVolumeType() == null ^ this.getVolumeType() == nullreturn false;
        if (other.getVolumeType() != null && other.getVolumeType().equals(this.getVolumeType()) == falsereturn false
        if (other.getVolumeStatus() == null ^ this.getVolumeStatus() == nullreturn false;
        if (other.getVolumeStatus() != null && other.getVolumeStatus().equals(this.getVolumeStatus()) == falsereturn false
        if (other.getVolumeSizeInBytes() == null ^ this.getVolumeSizeInBytes() == nullreturn false;
        if (other.getVolumeSizeInBytes() != null && other.getVolumeSizeInBytes().equals(this.getVolumeSizeInBytes()) == falsereturn false
        if (other.getVolumeProgress() == null ^ this.getVolumeProgress() == nullreturn false;
        if (other.getVolumeProgress() != null && other.getVolumeProgress().equals(this.getVolumeProgress()) == falsereturn false
        if (other.getSourceSnapshotId() == null ^ this.getSourceSnapshotId() == nullreturn false;
        if (other.getSourceSnapshotId() != null && other.getSourceSnapshotId().equals(this.getSourceSnapshotId()) == falsereturn false
        if (other.getVolumeiSCSIAttributes() == null ^ this.getVolumeiSCSIAttributes() == nullreturn false;
        if (other.getVolumeiSCSIAttributes() != null && other.getVolumeiSCSIAttributes().equals(this.getVolumeiSCSIAttributes()) == falsereturn false
        return true;
    }
    
    @Override
    public CachediSCSIVolume clone() {
        try {
            return (CachediSCSIVolumesuper.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