shiver.me.timbers.aws.ec2.Host Maven / Gradle / Ivy
Show all versions of smt-cloudformation-objects Show documentation
package shiver.me.timbers.aws.ec2;
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;
/**
* Host
*
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-host.html
*
*/
@JsonInclude(JsonInclude.Include.NON_EMPTY)
@JsonPropertyOrder({
"AutoPlacement",
"AvailabilityZone",
"HostRecovery",
"InstanceType"
})
public class Host {
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-host.html#cfn-ec2-host-autoplacement
*
*/
@JsonProperty("AutoPlacement")
@JsonPropertyDescription("http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-host.html#cfn-ec2-host-autoplacement")
private CharSequence autoPlacement;
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-host.html#cfn-ec2-host-availabilityzone
*
*/
@JsonProperty("AvailabilityZone")
@JsonPropertyDescription("http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-host.html#cfn-ec2-host-availabilityzone")
private CharSequence availabilityZone;
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-host.html#cfn-ec2-host-hostrecovery
*
*/
@JsonProperty("HostRecovery")
@JsonPropertyDescription("http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-host.html#cfn-ec2-host-hostrecovery")
private CharSequence hostRecovery;
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-host.html#cfn-ec2-host-instancetype
*
*/
@JsonProperty("InstanceType")
@JsonPropertyDescription("http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-host.html#cfn-ec2-host-instancetype")
private CharSequence instanceType;
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-host.html#cfn-ec2-host-autoplacement
*
*/
@JsonIgnore
public CharSequence getAutoPlacement() {
return autoPlacement;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-host.html#cfn-ec2-host-autoplacement
*
*/
@JsonIgnore
public void setAutoPlacement(CharSequence autoPlacement) {
this.autoPlacement = autoPlacement;
}
public Host withAutoPlacement(CharSequence autoPlacement) {
this.autoPlacement = autoPlacement;
return this;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-host.html#cfn-ec2-host-availabilityzone
*
*/
@JsonIgnore
public CharSequence getAvailabilityZone() {
return availabilityZone;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-host.html#cfn-ec2-host-availabilityzone
*
*/
@JsonIgnore
public void setAvailabilityZone(CharSequence availabilityZone) {
this.availabilityZone = availabilityZone;
}
public Host withAvailabilityZone(CharSequence availabilityZone) {
this.availabilityZone = availabilityZone;
return this;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-host.html#cfn-ec2-host-hostrecovery
*
*/
@JsonIgnore
public CharSequence getHostRecovery() {
return hostRecovery;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-host.html#cfn-ec2-host-hostrecovery
*
*/
@JsonIgnore
public void setHostRecovery(CharSequence hostRecovery) {
this.hostRecovery = hostRecovery;
}
public Host withHostRecovery(CharSequence hostRecovery) {
this.hostRecovery = hostRecovery;
return this;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-host.html#cfn-ec2-host-instancetype
*
*/
@JsonIgnore
public CharSequence getInstanceType() {
return instanceType;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-host.html#cfn-ec2-host-instancetype
*
*/
@JsonIgnore
public void setInstanceType(CharSequence instanceType) {
this.instanceType = instanceType;
}
public Host withInstanceType(CharSequence instanceType) {
this.instanceType = instanceType;
return this;
}
@Override
public String toString() {
return new ToStringBuilder(this).append("autoPlacement", autoPlacement).append("availabilityZone", availabilityZone).append("hostRecovery", hostRecovery).append("instanceType", instanceType).toString();
}
@Override
public int hashCode() {
return new HashCodeBuilder().append(hostRecovery).append(autoPlacement).append(availabilityZone).append(instanceType).toHashCode();
}
@Override
public boolean equals(Object other) {
if (other == this) {
return true;
}
if ((other instanceof Host) == false) {
return false;
}
Host rhs = ((Host) other);
return new EqualsBuilder().append(hostRecovery, rhs.hostRecovery).append(autoPlacement, rhs.autoPlacement).append(availabilityZone, rhs.availabilityZone).append(instanceType, rhs.instanceType).isEquals();
}
}