shiver.me.timbers.aws.emr.ClusterInstanceGroupConfig Maven / Gradle / Ivy
package shiver.me.timbers.aws.emr;
import java.util.LinkedHashSet;
import java.util.Set;
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 com.fasterxml.jackson.databind.annotation.JsonDeserialize;
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;
/**
* ClusterInstanceGroupConfig
*
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-cluster-instancegroupconfig.html
*
*/
@JsonInclude(JsonInclude.Include.NON_EMPTY)
@JsonPropertyOrder({
"AutoScalingPolicy",
"BidPrice",
"Configurations",
"EbsConfiguration",
"InstanceCount",
"InstanceType",
"Market",
"Name"
})
public class ClusterInstanceGroupConfig implements Property
{
/**
* ClusterAutoScalingPolicy
*
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-cluster-autoscalingpolicy.html
*
*/
@JsonProperty("AutoScalingPolicy")
@JsonPropertyDescription("http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-cluster-autoscalingpolicy.html")
private Property autoScalingPolicy;
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-cluster-instancegroupconfig.html#cfn-elasticmapreduce-cluster-instancegroupconfig-bidprice
*
*/
@JsonProperty("BidPrice")
@JsonPropertyDescription("http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-cluster-instancegroupconfig.html#cfn-elasticmapreduce-cluster-instancegroupconfig-bidprice")
private CharSequence bidPrice;
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-cluster-instancegroupconfig.html#cfn-elasticmapreduce-cluster-instancegroupconfig-configurations
*
*/
@JsonProperty("Configurations")
@JsonDeserialize(as = java.util.LinkedHashSet.class)
@JsonPropertyDescription("http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-cluster-instancegroupconfig.html#cfn-elasticmapreduce-cluster-instancegroupconfig-configurations")
private Set> configurations = new LinkedHashSet>();
/**
* ClusterEbsConfiguration
*
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-cluster-ebsconfiguration.html
*
*/
@JsonProperty("EbsConfiguration")
@JsonPropertyDescription("http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-cluster-ebsconfiguration.html")
private Property ebsConfiguration;
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-cluster-instancegroupconfig.html#cfn-elasticmapreduce-cluster-instancegroupconfig-instancecount
*
*/
@JsonProperty("InstanceCount")
@JsonPropertyDescription("http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-cluster-instancegroupconfig.html#cfn-elasticmapreduce-cluster-instancegroupconfig-instancecount")
private Number instanceCount;
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-cluster-instancegroupconfig.html#cfn-elasticmapreduce-cluster-instancegroupconfig-instancetype
*
*/
@JsonProperty("InstanceType")
@JsonPropertyDescription("http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-cluster-instancegroupconfig.html#cfn-elasticmapreduce-cluster-instancegroupconfig-instancetype")
private CharSequence instanceType;
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-cluster-instancegroupconfig.html#cfn-elasticmapreduce-cluster-instancegroupconfig-market
*
*/
@JsonProperty("Market")
@JsonPropertyDescription("http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-cluster-instancegroupconfig.html#cfn-elasticmapreduce-cluster-instancegroupconfig-market")
private CharSequence market;
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-cluster-instancegroupconfig.html#cfn-elasticmapreduce-cluster-instancegroupconfig-name
*
*/
@JsonProperty("Name")
@JsonPropertyDescription("http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-cluster-instancegroupconfig.html#cfn-elasticmapreduce-cluster-instancegroupconfig-name")
private CharSequence name;
/**
* ClusterAutoScalingPolicy
*
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-cluster-autoscalingpolicy.html
*
*/
@JsonIgnore
public Property getAutoScalingPolicy() {
return autoScalingPolicy;
}
/**
* ClusterAutoScalingPolicy
*
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-cluster-autoscalingpolicy.html
*
*/
@JsonIgnore
public void setAutoScalingPolicy(Property autoScalingPolicy) {
this.autoScalingPolicy = autoScalingPolicy;
}
public ClusterInstanceGroupConfig withAutoScalingPolicy(Property autoScalingPolicy) {
this.autoScalingPolicy = autoScalingPolicy;
return this;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-cluster-instancegroupconfig.html#cfn-elasticmapreduce-cluster-instancegroupconfig-bidprice
*
*/
@JsonIgnore
public CharSequence getBidPrice() {
return bidPrice;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-cluster-instancegroupconfig.html#cfn-elasticmapreduce-cluster-instancegroupconfig-bidprice
*
*/
@JsonIgnore
public void setBidPrice(CharSequence bidPrice) {
this.bidPrice = bidPrice;
}
public ClusterInstanceGroupConfig withBidPrice(CharSequence bidPrice) {
this.bidPrice = bidPrice;
return this;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-cluster-instancegroupconfig.html#cfn-elasticmapreduce-cluster-instancegroupconfig-configurations
*
*/
@JsonIgnore
public Set> getConfigurations() {
return configurations;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-cluster-instancegroupconfig.html#cfn-elasticmapreduce-cluster-instancegroupconfig-configurations
*
*/
@JsonIgnore
public void setConfigurations(Set> configurations) {
this.configurations = configurations;
}
public ClusterInstanceGroupConfig withConfigurations(Set> configurations) {
this.configurations = configurations;
return this;
}
/**
* ClusterEbsConfiguration
*
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-cluster-ebsconfiguration.html
*
*/
@JsonIgnore
public Property getEbsConfiguration() {
return ebsConfiguration;
}
/**
* ClusterEbsConfiguration
*
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-cluster-ebsconfiguration.html
*
*/
@JsonIgnore
public void setEbsConfiguration(Property ebsConfiguration) {
this.ebsConfiguration = ebsConfiguration;
}
public ClusterInstanceGroupConfig withEbsConfiguration(Property ebsConfiguration) {
this.ebsConfiguration = ebsConfiguration;
return this;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-cluster-instancegroupconfig.html#cfn-elasticmapreduce-cluster-instancegroupconfig-instancecount
*
*/
@JsonIgnore
public Number getInstanceCount() {
return instanceCount;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-cluster-instancegroupconfig.html#cfn-elasticmapreduce-cluster-instancegroupconfig-instancecount
*
*/
@JsonIgnore
public void setInstanceCount(Number instanceCount) {
this.instanceCount = instanceCount;
}
public ClusterInstanceGroupConfig withInstanceCount(Number instanceCount) {
this.instanceCount = instanceCount;
return this;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-cluster-instancegroupconfig.html#cfn-elasticmapreduce-cluster-instancegroupconfig-instancetype
*
*/
@JsonIgnore
public CharSequence getInstanceType() {
return instanceType;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-cluster-instancegroupconfig.html#cfn-elasticmapreduce-cluster-instancegroupconfig-instancetype
*
*/
@JsonIgnore
public void setInstanceType(CharSequence instanceType) {
this.instanceType = instanceType;
}
public ClusterInstanceGroupConfig withInstanceType(CharSequence instanceType) {
this.instanceType = instanceType;
return this;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-cluster-instancegroupconfig.html#cfn-elasticmapreduce-cluster-instancegroupconfig-market
*
*/
@JsonIgnore
public CharSequence getMarket() {
return market;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-cluster-instancegroupconfig.html#cfn-elasticmapreduce-cluster-instancegroupconfig-market
*
*/
@JsonIgnore
public void setMarket(CharSequence market) {
this.market = market;
}
public ClusterInstanceGroupConfig withMarket(CharSequence market) {
this.market = market;
return this;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-cluster-instancegroupconfig.html#cfn-elasticmapreduce-cluster-instancegroupconfig-name
*
*/
@JsonIgnore
public CharSequence getName() {
return name;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-cluster-instancegroupconfig.html#cfn-elasticmapreduce-cluster-instancegroupconfig-name
*
*/
@JsonIgnore
public void setName(CharSequence name) {
this.name = name;
}
public ClusterInstanceGroupConfig withName(CharSequence name) {
this.name = name;
return this;
}
@Override
public String toString() {
return new ToStringBuilder(this).append("autoScalingPolicy", autoScalingPolicy).append("bidPrice", bidPrice).append("configurations", configurations).append("ebsConfiguration", ebsConfiguration).append("instanceCount", instanceCount).append("instanceType", instanceType).append("market", market).append("name", name).toString();
}
@Override
public int hashCode() {
return new HashCodeBuilder().append(market).append(configurations).append(instanceCount).append(instanceType).append(name).append(autoScalingPolicy).append(bidPrice).append(ebsConfiguration).toHashCode();
}
@Override
public boolean equals(Object other) {
if (other == this) {
return true;
}
if ((other instanceof ClusterInstanceGroupConfig) == false) {
return false;
}
ClusterInstanceGroupConfig rhs = ((ClusterInstanceGroupConfig) other);
return new EqualsBuilder().append(market, rhs.market).append(configurations, rhs.configurations).append(instanceCount, rhs.instanceCount).append(instanceType, rhs.instanceType).append(name, rhs.name).append(autoScalingPolicy, rhs.autoScalingPolicy).append(bidPrice, rhs.bidPrice).append(ebsConfiguration, rhs.ebsConfiguration).isEquals();
}
}