
shiver.me.timbers.aws.autoscaling.AutoScalingGroupLaunchTemplateOverrides Maven / Gradle / Ivy
package shiver.me.timbers.aws.autoscaling;
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;
/**
* AutoScalingGroupLaunchTemplateOverrides
*
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-as-mixedinstancespolicy-launchtemplateoverrides.html
*
*/
@JsonInclude(JsonInclude.Include.NON_EMPTY)
@JsonPropertyOrder({
"InstanceType",
"WeightedCapacity"
})
public class AutoScalingGroupLaunchTemplateOverrides implements Property
{
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-as-mixedinstancespolicy-launchtemplateoverrides.html#cfn-autoscaling-autoscalinggroup-launchtemplateoverrides-instancetype
*
*/
@JsonProperty("InstanceType")
@JsonPropertyDescription("http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-as-mixedinstancespolicy-launchtemplateoverrides.html#cfn-autoscaling-autoscalinggroup-launchtemplateoverrides-instancetype")
private CharSequence instanceType;
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-as-mixedinstancespolicy-launchtemplateoverrides.html#cfn-autoscaling-autoscalinggroup-launchtemplateoverrides-weightedcapacity
*
*/
@JsonProperty("WeightedCapacity")
@JsonPropertyDescription("http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-as-mixedinstancespolicy-launchtemplateoverrides.html#cfn-autoscaling-autoscalinggroup-launchtemplateoverrides-weightedcapacity")
private CharSequence weightedCapacity;
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-as-mixedinstancespolicy-launchtemplateoverrides.html#cfn-autoscaling-autoscalinggroup-launchtemplateoverrides-instancetype
*
*/
@JsonIgnore
public CharSequence getInstanceType() {
return instanceType;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-as-mixedinstancespolicy-launchtemplateoverrides.html#cfn-autoscaling-autoscalinggroup-launchtemplateoverrides-instancetype
*
*/
@JsonIgnore
public void setInstanceType(CharSequence instanceType) {
this.instanceType = instanceType;
}
public AutoScalingGroupLaunchTemplateOverrides withInstanceType(CharSequence instanceType) {
this.instanceType = instanceType;
return this;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-as-mixedinstancespolicy-launchtemplateoverrides.html#cfn-autoscaling-autoscalinggroup-launchtemplateoverrides-weightedcapacity
*
*/
@JsonIgnore
public CharSequence getWeightedCapacity() {
return weightedCapacity;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-as-mixedinstancespolicy-launchtemplateoverrides.html#cfn-autoscaling-autoscalinggroup-launchtemplateoverrides-weightedcapacity
*
*/
@JsonIgnore
public void setWeightedCapacity(CharSequence weightedCapacity) {
this.weightedCapacity = weightedCapacity;
}
public AutoScalingGroupLaunchTemplateOverrides withWeightedCapacity(CharSequence weightedCapacity) {
this.weightedCapacity = weightedCapacity;
return this;
}
@Override
public String toString() {
return new ToStringBuilder(this).append("instanceType", instanceType).append("weightedCapacity", weightedCapacity).toString();
}
@Override
public int hashCode() {
return new HashCodeBuilder().append(weightedCapacity).append(instanceType).toHashCode();
}
@Override
public boolean equals(Object other) {
if (other == this) {
return true;
}
if ((other instanceof AutoScalingGroupLaunchTemplateOverrides) == false) {
return false;
}
AutoScalingGroupLaunchTemplateOverrides rhs = ((AutoScalingGroupLaunchTemplateOverrides) other);
return new EqualsBuilder().append(weightedCapacity, rhs.weightedCapacity).append(instanceType, rhs.instanceType).isEquals();
}
}