shiver.me.timbers.aws.emr.ClusterScalingRule Maven / Gradle / Ivy
Show all versions of smt-cloudformation-objects Show documentation
package shiver.me.timbers.aws.emr;
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;
/**
* ClusterScalingRule
*
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-cluster-scalingrule.html
*
*/
@JsonInclude(JsonInclude.Include.NON_EMPTY)
@JsonPropertyOrder({
"Action",
"Description",
"Name",
"Trigger"
})
public class ClusterScalingRule implements Property
{
/**
* ClusterScalingAction
*
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-cluster-scalingaction.html
*
*/
@JsonProperty("Action")
@JsonPropertyDescription("http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-cluster-scalingaction.html")
private Property action;
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-cluster-scalingrule.html#cfn-elasticmapreduce-cluster-scalingrule-description
*
*/
@JsonProperty("Description")
@JsonPropertyDescription("http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-cluster-scalingrule.html#cfn-elasticmapreduce-cluster-scalingrule-description")
private CharSequence description;
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-cluster-scalingrule.html#cfn-elasticmapreduce-cluster-scalingrule-name
*
*/
@JsonProperty("Name")
@JsonPropertyDescription("http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-cluster-scalingrule.html#cfn-elasticmapreduce-cluster-scalingrule-name")
private CharSequence name;
/**
* ClusterScalingTrigger
*
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-cluster-scalingtrigger.html
*
*/
@JsonProperty("Trigger")
@JsonPropertyDescription("http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-cluster-scalingtrigger.html")
private Property trigger;
/**
* ClusterScalingAction
*
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-cluster-scalingaction.html
*
*/
@JsonIgnore
public Property getAction() {
return action;
}
/**
* ClusterScalingAction
*
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-cluster-scalingaction.html
*
*/
@JsonIgnore
public void setAction(Property action) {
this.action = action;
}
public ClusterScalingRule withAction(Property action) {
this.action = action;
return this;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-cluster-scalingrule.html#cfn-elasticmapreduce-cluster-scalingrule-description
*
*/
@JsonIgnore
public CharSequence getDescription() {
return description;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-cluster-scalingrule.html#cfn-elasticmapreduce-cluster-scalingrule-description
*
*/
@JsonIgnore
public void setDescription(CharSequence description) {
this.description = description;
}
public ClusterScalingRule withDescription(CharSequence description) {
this.description = description;
return this;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-cluster-scalingrule.html#cfn-elasticmapreduce-cluster-scalingrule-name
*
*/
@JsonIgnore
public CharSequence getName() {
return name;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-cluster-scalingrule.html#cfn-elasticmapreduce-cluster-scalingrule-name
*
*/
@JsonIgnore
public void setName(CharSequence name) {
this.name = name;
}
public ClusterScalingRule withName(CharSequence name) {
this.name = name;
return this;
}
/**
* ClusterScalingTrigger
*
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-cluster-scalingtrigger.html
*
*/
@JsonIgnore
public Property getTrigger() {
return trigger;
}
/**
* ClusterScalingTrigger
*
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-cluster-scalingtrigger.html
*
*/
@JsonIgnore
public void setTrigger(Property trigger) {
this.trigger = trigger;
}
public ClusterScalingRule withTrigger(Property trigger) {
this.trigger = trigger;
return this;
}
@Override
public String toString() {
return new ToStringBuilder(this).append("action", action).append("description", description).append("name", name).append("trigger", trigger).toString();
}
@Override
public int hashCode() {
return new HashCodeBuilder().append(name).append(action).append(description).append(trigger).toHashCode();
}
@Override
public boolean equals(Object other) {
if (other == this) {
return true;
}
if ((other instanceof ClusterScalingRule) == false) {
return false;
}
ClusterScalingRule rhs = ((ClusterScalingRule) other);
return new EqualsBuilder().append(name, rhs.name).append(action, rhs.action).append(description, rhs.description).append(trigger, rhs.trigger).isEquals();
}
}