shiver.me.timbers.aws.ecs.Cluster Maven / Gradle / Ivy
Show all versions of smt-cloudformation-objects Show documentation
package shiver.me.timbers.aws.ecs;
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;
/**
* Cluster
*
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-cluster.html
*
*/
@JsonInclude(JsonInclude.Include.NON_EMPTY)
@JsonPropertyOrder({
"Tags",
"ClusterName",
"ClusterSettings"
})
public class Cluster {
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-cluster.html#cfn-ecs-cluster-tags
*
*/
@JsonProperty("Tags")
@JsonPropertyDescription("http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-cluster.html#cfn-ecs-cluster-tags")
private List> tags = new ArrayList>();
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-cluster.html#cfn-ecs-cluster-clustername
*
*/
@JsonProperty("ClusterName")
@JsonPropertyDescription("http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-cluster.html#cfn-ecs-cluster-clustername")
private CharSequence clusterName;
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-cluster.html#cfn-ecs-cluster-clustersettings
*
*/
@JsonProperty("ClusterSettings")
@JsonPropertyDescription("http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-cluster.html#cfn-ecs-cluster-clustersettings")
private List> clusterSettings = new ArrayList>();
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-cluster.html#cfn-ecs-cluster-tags
*
*/
@JsonIgnore
public List> getTags() {
return tags;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-cluster.html#cfn-ecs-cluster-tags
*
*/
@JsonIgnore
public void setTags(List> tags) {
this.tags = tags;
}
public Cluster withTags(List> tags) {
this.tags = tags;
return this;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-cluster.html#cfn-ecs-cluster-clustername
*
*/
@JsonIgnore
public CharSequence getClusterName() {
return clusterName;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-cluster.html#cfn-ecs-cluster-clustername
*
*/
@JsonIgnore
public void setClusterName(CharSequence clusterName) {
this.clusterName = clusterName;
}
public Cluster withClusterName(CharSequence clusterName) {
this.clusterName = clusterName;
return this;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-cluster.html#cfn-ecs-cluster-clustersettings
*
*/
@JsonIgnore
public List> getClusterSettings() {
return clusterSettings;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-cluster.html#cfn-ecs-cluster-clustersettings
*
*/
@JsonIgnore
public void setClusterSettings(List> clusterSettings) {
this.clusterSettings = clusterSettings;
}
public Cluster withClusterSettings(List> clusterSettings) {
this.clusterSettings = clusterSettings;
return this;
}
@Override
public String toString() {
return new ToStringBuilder(this).append("tags", tags).append("clusterName", clusterName).append("clusterSettings", clusterSettings).toString();
}
@Override
public int hashCode() {
return new HashCodeBuilder().append(clusterSettings).append(tags).append(clusterName).toHashCode();
}
@Override
public boolean equals(Object other) {
if (other == this) {
return true;
}
if ((other instanceof Cluster) == false) {
return false;
}
Cluster rhs = ((Cluster) other);
return new EqualsBuilder().append(clusterSettings, rhs.clusterSettings).append(tags, rhs.tags).append(clusterName, rhs.clusterName).isEquals();
}
}