shiver.me.timbers.aws.ec2.Volume Maven / Gradle / Ivy
Show all versions of smt-cloudformation-objects Show documentation
package shiver.me.timbers.aws.ec2;
import java.util.ArrayList;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyDescription;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import shiver.me.timbers.aws.Property;
import shiver.me.timbers.aws.Tag;
/**
* Volume
*
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-ebs-volume.html
*
*/
@JsonInclude(JsonInclude.Include.NON_EMPTY)
@JsonPropertyOrder({
"AutoEnableIO",
"AvailabilityZone",
"Encrypted",
"Iops",
"KmsKeyId",
"MultiAttachEnabled",
"OutpostArn",
"Size",
"SnapshotId",
"Tags",
"VolumeType"
})
public class Volume {
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-ebs-volume.html#cfn-ec2-ebs-volume-autoenableio
*
*/
@JsonProperty("AutoEnableIO")
@JsonPropertyDescription("http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-ebs-volume.html#cfn-ec2-ebs-volume-autoenableio")
private CharSequence autoEnableIO;
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-ebs-volume.html#cfn-ec2-ebs-volume-availabilityzone
*
*/
@JsonProperty("AvailabilityZone")
@JsonPropertyDescription("http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-ebs-volume.html#cfn-ec2-ebs-volume-availabilityzone")
private CharSequence availabilityZone;
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-ebs-volume.html#cfn-ec2-ebs-volume-encrypted
*
*/
@JsonProperty("Encrypted")
@JsonPropertyDescription("http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-ebs-volume.html#cfn-ec2-ebs-volume-encrypted")
private CharSequence encrypted;
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-ebs-volume.html#cfn-ec2-ebs-volume-iops
*
*/
@JsonProperty("Iops")
@JsonPropertyDescription("http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-ebs-volume.html#cfn-ec2-ebs-volume-iops")
private Number iops;
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-ebs-volume.html#cfn-ec2-ebs-volume-kmskeyid
*
*/
@JsonProperty("KmsKeyId")
@JsonPropertyDescription("http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-ebs-volume.html#cfn-ec2-ebs-volume-kmskeyid")
private CharSequence kmsKeyId;
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-ebs-volume.html#cfn-ec2-ebs-volume-multiattachenabled
*
*/
@JsonProperty("MultiAttachEnabled")
@JsonPropertyDescription("http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-ebs-volume.html#cfn-ec2-ebs-volume-multiattachenabled")
private CharSequence multiAttachEnabled;
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-ebs-volume.html#cfn-ec2-ebs-volume-outpostarn
*
*/
@JsonProperty("OutpostArn")
@JsonPropertyDescription("http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-ebs-volume.html#cfn-ec2-ebs-volume-outpostarn")
private CharSequence outpostArn;
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-ebs-volume.html#cfn-ec2-ebs-volume-size
*
*/
@JsonProperty("Size")
@JsonPropertyDescription("http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-ebs-volume.html#cfn-ec2-ebs-volume-size")
private Number size;
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-ebs-volume.html#cfn-ec2-ebs-volume-snapshotid
*
*/
@JsonProperty("SnapshotId")
@JsonPropertyDescription("http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-ebs-volume.html#cfn-ec2-ebs-volume-snapshotid")
private CharSequence snapshotId;
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-ebs-volume.html#cfn-ec2-ebs-volume-tags
*
*/
@JsonProperty("Tags")
@JsonPropertyDescription("http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-ebs-volume.html#cfn-ec2-ebs-volume-tags")
private List> tags = new ArrayList>();
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-ebs-volume.html#cfn-ec2-ebs-volume-volumetype
*
*/
@JsonProperty("VolumeType")
@JsonPropertyDescription("http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-ebs-volume.html#cfn-ec2-ebs-volume-volumetype")
private CharSequence volumeType;
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-ebs-volume.html#cfn-ec2-ebs-volume-autoenableio
*
*/
@JsonIgnore
public CharSequence getAutoEnableIO() {
return autoEnableIO;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-ebs-volume.html#cfn-ec2-ebs-volume-autoenableio
*
*/
@JsonIgnore
public void setAutoEnableIO(CharSequence autoEnableIO) {
this.autoEnableIO = autoEnableIO;
}
public Volume withAutoEnableIO(CharSequence autoEnableIO) {
this.autoEnableIO = autoEnableIO;
return this;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-ebs-volume.html#cfn-ec2-ebs-volume-availabilityzone
*
*/
@JsonIgnore
public CharSequence getAvailabilityZone() {
return availabilityZone;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-ebs-volume.html#cfn-ec2-ebs-volume-availabilityzone
*
*/
@JsonIgnore
public void setAvailabilityZone(CharSequence availabilityZone) {
this.availabilityZone = availabilityZone;
}
public Volume withAvailabilityZone(CharSequence availabilityZone) {
this.availabilityZone = availabilityZone;
return this;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-ebs-volume.html#cfn-ec2-ebs-volume-encrypted
*
*/
@JsonIgnore
public CharSequence getEncrypted() {
return encrypted;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-ebs-volume.html#cfn-ec2-ebs-volume-encrypted
*
*/
@JsonIgnore
public void setEncrypted(CharSequence encrypted) {
this.encrypted = encrypted;
}
public Volume withEncrypted(CharSequence encrypted) {
this.encrypted = encrypted;
return this;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-ebs-volume.html#cfn-ec2-ebs-volume-iops
*
*/
@JsonIgnore
public Number getIops() {
return iops;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-ebs-volume.html#cfn-ec2-ebs-volume-iops
*
*/
@JsonIgnore
public void setIops(Number iops) {
this.iops = iops;
}
public Volume withIops(Number iops) {
this.iops = iops;
return this;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-ebs-volume.html#cfn-ec2-ebs-volume-kmskeyid
*
*/
@JsonIgnore
public CharSequence getKmsKeyId() {
return kmsKeyId;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-ebs-volume.html#cfn-ec2-ebs-volume-kmskeyid
*
*/
@JsonIgnore
public void setKmsKeyId(CharSequence kmsKeyId) {
this.kmsKeyId = kmsKeyId;
}
public Volume withKmsKeyId(CharSequence kmsKeyId) {
this.kmsKeyId = kmsKeyId;
return this;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-ebs-volume.html#cfn-ec2-ebs-volume-multiattachenabled
*
*/
@JsonIgnore
public CharSequence getMultiAttachEnabled() {
return multiAttachEnabled;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-ebs-volume.html#cfn-ec2-ebs-volume-multiattachenabled
*
*/
@JsonIgnore
public void setMultiAttachEnabled(CharSequence multiAttachEnabled) {
this.multiAttachEnabled = multiAttachEnabled;
}
public Volume withMultiAttachEnabled(CharSequence multiAttachEnabled) {
this.multiAttachEnabled = multiAttachEnabled;
return this;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-ebs-volume.html#cfn-ec2-ebs-volume-outpostarn
*
*/
@JsonIgnore
public CharSequence getOutpostArn() {
return outpostArn;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-ebs-volume.html#cfn-ec2-ebs-volume-outpostarn
*
*/
@JsonIgnore
public void setOutpostArn(CharSequence outpostArn) {
this.outpostArn = outpostArn;
}
public Volume withOutpostArn(CharSequence outpostArn) {
this.outpostArn = outpostArn;
return this;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-ebs-volume.html#cfn-ec2-ebs-volume-size
*
*/
@JsonIgnore
public Number getSize() {
return size;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-ebs-volume.html#cfn-ec2-ebs-volume-size
*
*/
@JsonIgnore
public void setSize(Number size) {
this.size = size;
}
public Volume withSize(Number size) {
this.size = size;
return this;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-ebs-volume.html#cfn-ec2-ebs-volume-snapshotid
*
*/
@JsonIgnore
public CharSequence getSnapshotId() {
return snapshotId;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-ebs-volume.html#cfn-ec2-ebs-volume-snapshotid
*
*/
@JsonIgnore
public void setSnapshotId(CharSequence snapshotId) {
this.snapshotId = snapshotId;
}
public Volume withSnapshotId(CharSequence snapshotId) {
this.snapshotId = snapshotId;
return this;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-ebs-volume.html#cfn-ec2-ebs-volume-tags
*
*/
@JsonIgnore
public List> getTags() {
return tags;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-ebs-volume.html#cfn-ec2-ebs-volume-tags
*
*/
@JsonIgnore
public void setTags(List> tags) {
this.tags = tags;
}
public Volume withTags(List> tags) {
this.tags = tags;
return this;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-ebs-volume.html#cfn-ec2-ebs-volume-volumetype
*
*/
@JsonIgnore
public CharSequence getVolumeType() {
return volumeType;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-ebs-volume.html#cfn-ec2-ebs-volume-volumetype
*
*/
@JsonIgnore
public void setVolumeType(CharSequence volumeType) {
this.volumeType = volumeType;
}
public Volume withVolumeType(CharSequence volumeType) {
this.volumeType = volumeType;
return this;
}
@Override
public String toString() {
return new ToStringBuilder(this).append("autoEnableIO", autoEnableIO).append("availabilityZone", availabilityZone).append("encrypted", encrypted).append("iops", iops).append("kmsKeyId", kmsKeyId).append("multiAttachEnabled", multiAttachEnabled).append("outpostArn", outpostArn).append("size", size).append("snapshotId", snapshotId).append("tags", tags).append("volumeType", volumeType).toString();
}
@Override
public int hashCode() {
return new HashCodeBuilder().append(volumeType).append(snapshotId).append(encrypted).append(size).append(iops).append(outpostArn).append(kmsKeyId).append(autoEnableIO).append(availabilityZone).append(multiAttachEnabled).append(tags).toHashCode();
}
@Override
public boolean equals(Object other) {
if (other == this) {
return true;
}
if ((other instanceof Volume) == false) {
return false;
}
Volume rhs = ((Volume) other);
return new EqualsBuilder().append(volumeType, rhs.volumeType).append(snapshotId, rhs.snapshotId).append(encrypted, rhs.encrypted).append(size, rhs.size).append(iops, rhs.iops).append(outpostArn, rhs.outpostArn).append(kmsKeyId, rhs.kmsKeyId).append(autoEnableIO, rhs.autoEnableIO).append(availabilityZone, rhs.availabilityZone).append(multiAttachEnabled, rhs.multiAttachEnabled).append(tags, rhs.tags).isEquals();
}
}