shiver.me.timbers.aws.ecs.TaskDefinitionHealthCheck Maven / Gradle / Ivy
Show all versions of smt-cloudformation-objects Show documentation
package shiver.me.timbers.aws.ecs;
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;
/**
* TaskDefinitionHealthCheck
*
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-taskdefinition-healthcheck.html
*
*/
@JsonInclude(JsonInclude.Include.NON_EMPTY)
@JsonPropertyOrder({
"Command",
"Interval",
"Retries",
"StartPeriod",
"Timeout"
})
public class TaskDefinitionHealthCheck implements Property
{
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-taskdefinition-healthcheck.html#cfn-ecs-taskdefinition-healthcheck-command
*
*/
@JsonProperty("Command")
@JsonDeserialize(as = java.util.LinkedHashSet.class)
@JsonPropertyDescription("http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-taskdefinition-healthcheck.html#cfn-ecs-taskdefinition-healthcheck-command")
private Set command = new LinkedHashSet();
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-taskdefinition-healthcheck.html#cfn-ecs-taskdefinition-healthcheck-interval
*
*/
@JsonProperty("Interval")
@JsonPropertyDescription("http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-taskdefinition-healthcheck.html#cfn-ecs-taskdefinition-healthcheck-interval")
private Number interval;
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-taskdefinition-healthcheck.html#cfn-ecs-taskdefinition-healthcheck-retries
*
*/
@JsonProperty("Retries")
@JsonPropertyDescription("http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-taskdefinition-healthcheck.html#cfn-ecs-taskdefinition-healthcheck-retries")
private Number retries;
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-taskdefinition-healthcheck.html#cfn-ecs-taskdefinition-healthcheck-startperiod
*
*/
@JsonProperty("StartPeriod")
@JsonPropertyDescription("http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-taskdefinition-healthcheck.html#cfn-ecs-taskdefinition-healthcheck-startperiod")
private Number startPeriod;
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-taskdefinition-healthcheck.html#cfn-ecs-taskdefinition-healthcheck-timeout
*
*/
@JsonProperty("Timeout")
@JsonPropertyDescription("http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-taskdefinition-healthcheck.html#cfn-ecs-taskdefinition-healthcheck-timeout")
private Number timeout;
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-taskdefinition-healthcheck.html#cfn-ecs-taskdefinition-healthcheck-command
*
*/
@JsonIgnore
public Set getCommand() {
return command;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-taskdefinition-healthcheck.html#cfn-ecs-taskdefinition-healthcheck-command
*
*/
@JsonIgnore
public void setCommand(Set command) {
this.command = command;
}
public TaskDefinitionHealthCheck withCommand(Set command) {
this.command = command;
return this;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-taskdefinition-healthcheck.html#cfn-ecs-taskdefinition-healthcheck-interval
*
*/
@JsonIgnore
public Number getInterval() {
return interval;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-taskdefinition-healthcheck.html#cfn-ecs-taskdefinition-healthcheck-interval
*
*/
@JsonIgnore
public void setInterval(Number interval) {
this.interval = interval;
}
public TaskDefinitionHealthCheck withInterval(Number interval) {
this.interval = interval;
return this;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-taskdefinition-healthcheck.html#cfn-ecs-taskdefinition-healthcheck-retries
*
*/
@JsonIgnore
public Number getRetries() {
return retries;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-taskdefinition-healthcheck.html#cfn-ecs-taskdefinition-healthcheck-retries
*
*/
@JsonIgnore
public void setRetries(Number retries) {
this.retries = retries;
}
public TaskDefinitionHealthCheck withRetries(Number retries) {
this.retries = retries;
return this;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-taskdefinition-healthcheck.html#cfn-ecs-taskdefinition-healthcheck-startperiod
*
*/
@JsonIgnore
public Number getStartPeriod() {
return startPeriod;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-taskdefinition-healthcheck.html#cfn-ecs-taskdefinition-healthcheck-startperiod
*
*/
@JsonIgnore
public void setStartPeriod(Number startPeriod) {
this.startPeriod = startPeriod;
}
public TaskDefinitionHealthCheck withStartPeriod(Number startPeriod) {
this.startPeriod = startPeriod;
return this;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-taskdefinition-healthcheck.html#cfn-ecs-taskdefinition-healthcheck-timeout
*
*/
@JsonIgnore
public Number getTimeout() {
return timeout;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-taskdefinition-healthcheck.html#cfn-ecs-taskdefinition-healthcheck-timeout
*
*/
@JsonIgnore
public void setTimeout(Number timeout) {
this.timeout = timeout;
}
public TaskDefinitionHealthCheck withTimeout(Number timeout) {
this.timeout = timeout;
return this;
}
@Override
public String toString() {
return new ToStringBuilder(this).append("command", command).append("interval", interval).append("retries", retries).append("startPeriod", startPeriod).append("timeout", timeout).toString();
}
@Override
public int hashCode() {
return new HashCodeBuilder().append(retries).append(startPeriod).append(interval).append(command).append(timeout).toHashCode();
}
@Override
public boolean equals(Object other) {
if (other == this) {
return true;
}
if ((other instanceof TaskDefinitionHealthCheck) == false) {
return false;
}
TaskDefinitionHealthCheck rhs = ((TaskDefinitionHealthCheck) other);
return new EqualsBuilder().append(retries, rhs.retries).append(startPeriod, rhs.startPeriod).append(interval, rhs.interval).append(command, rhs.command).append(timeout, rhs.timeout).isEquals();
}
}