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.opsworks.model;
 

Describes an Amazon EBS volume configuration.

 
 public class VolumeConfiguration implements SerializableCloneable {

    
The volume mount point. For example "/dev/sdh".
 
     private String mountPoint;

    
The volume RAID level.
 
     private Integer raidLevel;

    
The number of disks in the volume.
 
     private Integer numberOfDisks;

    
The volume size.
 
     private Integer size;

    
The volume type:
  • standard - Magnetic
  • io1 - Provisioned IOPS (SSD)
  • gp2 - General Purpose (SSD)
 
     private String volumeType;

    
For PIOPS volumes, the IOPS per disk.
 
     private Integer iops;

    
The volume mount point. For example "/dev/sdh".

Returns:
The volume mount point. For example "/dev/sdh".
 
     public String getMountPoint() {
         return ;
     }
    
    
The volume mount point. For example "/dev/sdh".

Parameters:
mountPoint The volume mount point. For example "/dev/sdh".
 
     public void setMountPoint(String mountPoint) {
         this. = mountPoint;
     }
    
    
The volume mount point. For example "/dev/sdh".

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

Parameters:
mountPoint The volume mount point. For example "/dev/sdh".
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public VolumeConfiguration withMountPoint(String mountPoint) {
         this. = mountPoint;
         return this;
     }

    
The volume RAID level.

Returns:
The volume RAID level.
    public Integer getRaidLevel() {
        return ;
    }
    
    
The volume RAID level.

Parameters:
raidLevel The volume RAID level.
    public void setRaidLevel(Integer raidLevel) {
        this. = raidLevel;
    }
    
    
The volume RAID level.

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

Parameters:
raidLevel The volume RAID level.
Returns:
A reference to this updated object so that method calls can be chained together.
    public VolumeConfiguration withRaidLevel(Integer raidLevel) {
        this. = raidLevel;
        return this;
    }

    
The number of disks in the volume.

Returns:
The number of disks in the volume.
    public Integer getNumberOfDisks() {
        return ;
    }
    
    
The number of disks in the volume.

Parameters:
numberOfDisks The number of disks in the volume.
    public void setNumberOfDisks(Integer numberOfDisks) {
        this. = numberOfDisks;
    }
    
    
The number of disks in the volume.

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

Parameters:
numberOfDisks The number of disks in the volume.
Returns:
A reference to this updated object so that method calls can be chained together.
    public VolumeConfiguration withNumberOfDisks(Integer numberOfDisks) {
        this. = numberOfDisks;
        return this;
    }

    
The volume size.

Returns:
The volume size.
    public Integer getSize() {
        return ;
    }
    
    
The volume size.

Parameters:
size The volume size.
    public void setSize(Integer size) {
        this. = size;
    }
    
    
The volume size.

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

Parameters:
size The volume size.
Returns:
A reference to this updated object so that method calls can be chained together.
    public VolumeConfiguration withSize(Integer size) {
        this. = size;
        return this;
    }

    
The volume type:
  • standard - Magnetic
  • io1 - Provisioned IOPS (SSD)
  • gp2 - General Purpose (SSD)

Returns:
The volume type:
  • standard - Magnetic
  • io1 - Provisioned IOPS (SSD)
  • gp2 - General Purpose (SSD)
    public String getVolumeType() {
        return ;
    }
    
    
The volume type:
  • standard - Magnetic
  • io1 - Provisioned IOPS (SSD)
  • gp2 - General Purpose (SSD)

Parameters:
volumeType The volume type:
  • standard - Magnetic
  • io1 - Provisioned IOPS (SSD)
  • gp2 - General Purpose (SSD)
    public void setVolumeType(String volumeType) {
        this. = volumeType;
    }
    
    
The volume type:
  • standard - Magnetic
  • io1 - Provisioned IOPS (SSD)
  • gp2 - General Purpose (SSD)

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

Parameters:
volumeType The volume type:
  • standard - Magnetic
  • io1 - Provisioned IOPS (SSD)
  • gp2 - General Purpose (SSD)
Returns:
A reference to this updated object so that method calls can be chained together.
    public VolumeConfiguration withVolumeType(String volumeType) {
        this. = volumeType;
        return this;
    }

    
For PIOPS volumes, the IOPS per disk.

Returns:
For PIOPS volumes, the IOPS per disk.
    public Integer getIops() {
        return ;
    }
    
    
For PIOPS volumes, the IOPS per disk.

Parameters:
iops For PIOPS volumes, the IOPS per disk.
    public void setIops(Integer iops) {
        this. = iops;
    }
    
    
For PIOPS volumes, the IOPS per disk.

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

Parameters:
iops For PIOPS volumes, the IOPS per disk.
Returns:
A reference to this updated object so that method calls can be chained together.
    public VolumeConfiguration withIops(Integer iops) {
        this. = iops;
        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 (getMountPoint() != nullsb.append("MountPoint: " + getMountPoint() + ",");
        if (getRaidLevel() != nullsb.append("RaidLevel: " + getRaidLevel() + ",");
        if (getNumberOfDisks() != nullsb.append("NumberOfDisks: " + getNumberOfDisks() + ",");
        if (getSize() != nullsb.append("Size: " + getSize() + ",");
        if (getVolumeType() != nullsb.append("VolumeType: " + getVolumeType() + ",");
        if (getIops() != nullsb.append("Iops: " + getIops() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getMountPoint() == null) ? 0 : getMountPoint().hashCode()); 
        hashCode = prime * hashCode + ((getRaidLevel() == null) ? 0 : getRaidLevel().hashCode()); 
        hashCode = prime * hashCode + ((getNumberOfDisks() == null) ? 0 : getNumberOfDisks().hashCode()); 
        hashCode = prime * hashCode + ((getSize() == null) ? 0 : getSize().hashCode()); 
        hashCode = prime * hashCode + ((getVolumeType() == null) ? 0 : getVolumeType().hashCode()); 
        hashCode = prime * hashCode + ((getIops() == null) ? 0 : getIops().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof VolumeConfiguration == falsereturn false;
        VolumeConfiguration other = (VolumeConfiguration)obj;
        
        if (other.getMountPoint() == null ^ this.getMountPoint() == nullreturn false;
        if (other.getMountPoint() != null && other.getMountPoint().equals(this.getMountPoint()) == falsereturn false
        if (other.getRaidLevel() == null ^ this.getRaidLevel() == nullreturn false;
        if (other.getRaidLevel() != null && other.getRaidLevel().equals(this.getRaidLevel()) == falsereturn false
        if (other.getNumberOfDisks() == null ^ this.getNumberOfDisks() == nullreturn false;
        if (other.getNumberOfDisks() != null && other.getNumberOfDisks().equals(this.getNumberOfDisks()) == falsereturn false
        if (other.getSize() == null ^ this.getSize() == nullreturn false;
        if (other.getSize() != null && other.getSize().equals(this.getSize()) == falsereturn false
        if (other.getVolumeType() == null ^ this.getVolumeType() == nullreturn false;
        if (other.getVolumeType() != null && other.getVolumeType().equals(this.getVolumeType()) == falsereturn false
        if (other.getIops() == null ^ this.getIops() == nullreturn false;
        if (other.getIops() != null && other.getIops().equals(this.getIops()) == falsereturn false
        return true;
    }
    
    @Override
    public VolumeConfiguration clone() {
        try {
            return (VolumeConfigurationsuper.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