/* * Copyright 2018-2023 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.computeoptimizer.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* Describes the configuration of an Amazon Elastic Block Store (Amazon EBS) volume. *
* * @see AWS API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class VolumeConfiguration implements Serializable, Cloneable, StructuredPojo { /** ** The volume type. *
*
* This can be gp2
for General Purpose SSD, io1
or io2
for Provisioned IOPS
* SSD, st1
for Throughput Optimized HDD, sc1
for Cold HDD, or standard
for
* Magnetic volumes.
*
* The size of the volume, in GiB. *
*/ private Integer volumeSize; /** ** The baseline IOPS of the volume. *
*/ private Integer volumeBaselineIOPS; /** ** The burst IOPS of the volume. *
*/ private Integer volumeBurstIOPS; /** ** The baseline throughput of the volume. *
*/ private Integer volumeBaselineThroughput; /** ** The burst throughput of the volume. *
*/ private Integer volumeBurstThroughput; /** ** Contains the image used to boot the instance during launch. *
*/ private Boolean rootVolume; /** ** The volume type. *
*
* This can be gp2
for General Purpose SSD, io1
or io2
for Provisioned IOPS
* SSD, st1
for Throughput Optimized HDD, sc1
for Cold HDD, or standard
for
* Magnetic volumes.
*
* This can be gp2
for General Purpose SSD, io1
or io2
for Provisioned
* IOPS SSD, st1
for Throughput Optimized HDD, sc1
for Cold HDD, or
* standard
for Magnetic volumes.
*/
public void setVolumeType(String volumeType) {
this.volumeType = volumeType;
}
/**
*
* The volume type. *
*
* This can be gp2
for General Purpose SSD, io1
or io2
for Provisioned IOPS
* SSD, st1
for Throughput Optimized HDD, sc1
for Cold HDD, or standard
for
* Magnetic volumes.
*
* This can be gp2
for General Purpose SSD, io1
or io2
for
* Provisioned IOPS SSD, st1
for Throughput Optimized HDD, sc1
for Cold HDD, or
* standard
for Magnetic volumes.
*/
public String getVolumeType() {
return this.volumeType;
}
/**
*
* The volume type. *
*
* This can be gp2
for General Purpose SSD, io1
or io2
for Provisioned IOPS
* SSD, st1
for Throughput Optimized HDD, sc1
for Cold HDD, or standard
for
* Magnetic volumes.
*
* This can be gp2
for General Purpose SSD, io1
or io2
for Provisioned
* IOPS SSD, st1
for Throughput Optimized HDD, sc1
for Cold HDD, or
* standard
for Magnetic volumes.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public VolumeConfiguration withVolumeType(String volumeType) {
setVolumeType(volumeType);
return this;
}
/**
*
* The size of the volume, in GiB. *
* * @param volumeSize * The size of the volume, in GiB. */ public void setVolumeSize(Integer volumeSize) { this.volumeSize = volumeSize; } /** ** The size of the volume, in GiB. *
* * @return The size of the volume, in GiB. */ public Integer getVolumeSize() { return this.volumeSize; } /** ** The size of the volume, in GiB. *
* * @param volumeSize * The size of the volume, in GiB. * @return Returns a reference to this object so that method calls can be chained together. */ public VolumeConfiguration withVolumeSize(Integer volumeSize) { setVolumeSize(volumeSize); return this; } /** ** The baseline IOPS of the volume. *
* * @param volumeBaselineIOPS * The baseline IOPS of the volume. */ public void setVolumeBaselineIOPS(Integer volumeBaselineIOPS) { this.volumeBaselineIOPS = volumeBaselineIOPS; } /** ** The baseline IOPS of the volume. *
* * @return The baseline IOPS of the volume. */ public Integer getVolumeBaselineIOPS() { return this.volumeBaselineIOPS; } /** ** The baseline IOPS of the volume. *
* * @param volumeBaselineIOPS * The baseline IOPS of the volume. * @return Returns a reference to this object so that method calls can be chained together. */ public VolumeConfiguration withVolumeBaselineIOPS(Integer volumeBaselineIOPS) { setVolumeBaselineIOPS(volumeBaselineIOPS); return this; } /** ** The burst IOPS of the volume. *
* * @param volumeBurstIOPS * The burst IOPS of the volume. */ public void setVolumeBurstIOPS(Integer volumeBurstIOPS) { this.volumeBurstIOPS = volumeBurstIOPS; } /** ** The burst IOPS of the volume. *
* * @return The burst IOPS of the volume. */ public Integer getVolumeBurstIOPS() { return this.volumeBurstIOPS; } /** ** The burst IOPS of the volume. *
* * @param volumeBurstIOPS * The burst IOPS of the volume. * @return Returns a reference to this object so that method calls can be chained together. */ public VolumeConfiguration withVolumeBurstIOPS(Integer volumeBurstIOPS) { setVolumeBurstIOPS(volumeBurstIOPS); return this; } /** ** The baseline throughput of the volume. *
* * @param volumeBaselineThroughput * The baseline throughput of the volume. */ public void setVolumeBaselineThroughput(Integer volumeBaselineThroughput) { this.volumeBaselineThroughput = volumeBaselineThroughput; } /** ** The baseline throughput of the volume. *
* * @return The baseline throughput of the volume. */ public Integer getVolumeBaselineThroughput() { return this.volumeBaselineThroughput; } /** ** The baseline throughput of the volume. *
* * @param volumeBaselineThroughput * The baseline throughput of the volume. * @return Returns a reference to this object so that method calls can be chained together. */ public VolumeConfiguration withVolumeBaselineThroughput(Integer volumeBaselineThroughput) { setVolumeBaselineThroughput(volumeBaselineThroughput); return this; } /** ** The burst throughput of the volume. *
* * @param volumeBurstThroughput * The burst throughput of the volume. */ public void setVolumeBurstThroughput(Integer volumeBurstThroughput) { this.volumeBurstThroughput = volumeBurstThroughput; } /** ** The burst throughput of the volume. *
* * @return The burst throughput of the volume. */ public Integer getVolumeBurstThroughput() { return this.volumeBurstThroughput; } /** ** The burst throughput of the volume. *
* * @param volumeBurstThroughput * The burst throughput of the volume. * @return Returns a reference to this object so that method calls can be chained together. */ public VolumeConfiguration withVolumeBurstThroughput(Integer volumeBurstThroughput) { setVolumeBurstThroughput(volumeBurstThroughput); return this; } /** ** Contains the image used to boot the instance during launch. *
* * @param rootVolume * Contains the image used to boot the instance during launch. */ public void setRootVolume(Boolean rootVolume) { this.rootVolume = rootVolume; } /** ** Contains the image used to boot the instance during launch. *
* * @return Contains the image used to boot the instance during launch. */ public Boolean getRootVolume() { return this.rootVolume; } /** ** Contains the image used to boot the instance during launch. *
* * @param rootVolume * Contains the image used to boot the instance during launch. * @return Returns a reference to this object so that method calls can be chained together. */ public VolumeConfiguration withRootVolume(Boolean rootVolume) { setRootVolume(rootVolume); return this; } /** ** Contains the image used to boot the instance during launch. *
* * @return Contains the image used to boot the instance during launch. */ public Boolean isRootVolume() { return this.rootVolume; } /** * 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 (getVolumeType() != null) sb.append("VolumeType: ").append(getVolumeType()).append(","); if (getVolumeSize() != null) sb.append("VolumeSize: ").append(getVolumeSize()).append(","); if (getVolumeBaselineIOPS() != null) sb.append("VolumeBaselineIOPS: ").append(getVolumeBaselineIOPS()).append(","); if (getVolumeBurstIOPS() != null) sb.append("VolumeBurstIOPS: ").append(getVolumeBurstIOPS()).append(","); if (getVolumeBaselineThroughput() != null) sb.append("VolumeBaselineThroughput: ").append(getVolumeBaselineThroughput()).append(","); if (getVolumeBurstThroughput() != null) sb.append("VolumeBurstThroughput: ").append(getVolumeBurstThroughput()).append(","); if (getRootVolume() != null) sb.append("RootVolume: ").append(getRootVolume()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof VolumeConfiguration == false) return false; VolumeConfiguration other = (VolumeConfiguration) obj; if (other.getVolumeType() == null ^ this.getVolumeType() == null) return false; if (other.getVolumeType() != null && other.getVolumeType().equals(this.getVolumeType()) == 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.getVolumeBaselineIOPS() == null ^ this.getVolumeBaselineIOPS() == null) return false; if (other.getVolumeBaselineIOPS() != null && other.getVolumeBaselineIOPS().equals(this.getVolumeBaselineIOPS()) == false) return false; if (other.getVolumeBurstIOPS() == null ^ this.getVolumeBurstIOPS() == null) return false; if (other.getVolumeBurstIOPS() != null && other.getVolumeBurstIOPS().equals(this.getVolumeBurstIOPS()) == false) return false; if (other.getVolumeBaselineThroughput() == null ^ this.getVolumeBaselineThroughput() == null) return false; if (other.getVolumeBaselineThroughput() != null && other.getVolumeBaselineThroughput().equals(this.getVolumeBaselineThroughput()) == false) return false; if (other.getVolumeBurstThroughput() == null ^ this.getVolumeBurstThroughput() == null) return false; if (other.getVolumeBurstThroughput() != null && other.getVolumeBurstThroughput().equals(this.getVolumeBurstThroughput()) == false) return false; if (other.getRootVolume() == null ^ this.getRootVolume() == null) return false; if (other.getRootVolume() != null && other.getRootVolume().equals(this.getRootVolume()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getVolumeType() == null) ? 0 : getVolumeType().hashCode()); hashCode = prime * hashCode + ((getVolumeSize() == null) ? 0 : getVolumeSize().hashCode()); hashCode = prime * hashCode + ((getVolumeBaselineIOPS() == null) ? 0 : getVolumeBaselineIOPS().hashCode()); hashCode = prime * hashCode + ((getVolumeBurstIOPS() == null) ? 0 : getVolumeBurstIOPS().hashCode()); hashCode = prime * hashCode + ((getVolumeBaselineThroughput() == null) ? 0 : getVolumeBaselineThroughput().hashCode()); hashCode = prime * hashCode + ((getVolumeBurstThroughput() == null) ? 0 : getVolumeBurstThroughput().hashCode()); hashCode = prime * hashCode + ((getRootVolume() == null) ? 0 : getRootVolume().hashCode()); return hashCode; } @Override public VolumeConfiguration clone() { try { return (VolumeConfiguration) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } @com.amazonaws.annotation.SdkInternalApi @Override public void marshall(ProtocolMarshaller protocolMarshaller) { com.amazonaws.services.computeoptimizer.model.transform.VolumeConfigurationMarshaller.getInstance().marshall(this, protocolMarshaller); } }