shiver.me.timbers.aws.servicediscovery.ServiceHealthCheckConfig Maven / Gradle / Ivy
package shiver.me.timbers.aws.servicediscovery;
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;
/**
* ServiceHealthCheckConfig
*
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-servicediscovery-service-healthcheckconfig.html
*
*/
@JsonInclude(JsonInclude.Include.NON_EMPTY)
@JsonPropertyOrder({
"Type",
"ResourcePath",
"FailureThreshold"
})
public class ServiceHealthCheckConfig implements Property
{
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-servicediscovery-service-healthcheckconfig.html#cfn-servicediscovery-service-healthcheckconfig-type
*
*/
@JsonProperty("Type")
@JsonPropertyDescription("http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-servicediscovery-service-healthcheckconfig.html#cfn-servicediscovery-service-healthcheckconfig-type")
private CharSequence type;
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-servicediscovery-service-healthcheckconfig.html#cfn-servicediscovery-service-healthcheckconfig-resourcepath
*
*/
@JsonProperty("ResourcePath")
@JsonPropertyDescription("http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-servicediscovery-service-healthcheckconfig.html#cfn-servicediscovery-service-healthcheckconfig-resourcepath")
private CharSequence resourcePath;
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-servicediscovery-service-healthcheckconfig.html#cfn-servicediscovery-service-healthcheckconfig-failurethreshold
*
*/
@JsonProperty("FailureThreshold")
@JsonPropertyDescription("http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-servicediscovery-service-healthcheckconfig.html#cfn-servicediscovery-service-healthcheckconfig-failurethreshold")
private Number failureThreshold;
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-servicediscovery-service-healthcheckconfig.html#cfn-servicediscovery-service-healthcheckconfig-type
*
*/
@JsonIgnore
public CharSequence getType() {
return type;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-servicediscovery-service-healthcheckconfig.html#cfn-servicediscovery-service-healthcheckconfig-type
*
*/
@JsonIgnore
public void setType(CharSequence type) {
this.type = type;
}
public ServiceHealthCheckConfig withType(CharSequence type) {
this.type = type;
return this;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-servicediscovery-service-healthcheckconfig.html#cfn-servicediscovery-service-healthcheckconfig-resourcepath
*
*/
@JsonIgnore
public CharSequence getResourcePath() {
return resourcePath;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-servicediscovery-service-healthcheckconfig.html#cfn-servicediscovery-service-healthcheckconfig-resourcepath
*
*/
@JsonIgnore
public void setResourcePath(CharSequence resourcePath) {
this.resourcePath = resourcePath;
}
public ServiceHealthCheckConfig withResourcePath(CharSequence resourcePath) {
this.resourcePath = resourcePath;
return this;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-servicediscovery-service-healthcheckconfig.html#cfn-servicediscovery-service-healthcheckconfig-failurethreshold
*
*/
@JsonIgnore
public Number getFailureThreshold() {
return failureThreshold;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-servicediscovery-service-healthcheckconfig.html#cfn-servicediscovery-service-healthcheckconfig-failurethreshold
*
*/
@JsonIgnore
public void setFailureThreshold(Number failureThreshold) {
this.failureThreshold = failureThreshold;
}
public ServiceHealthCheckConfig withFailureThreshold(Number failureThreshold) {
this.failureThreshold = failureThreshold;
return this;
}
@Override
public String toString() {
return new ToStringBuilder(this).append("type", type).append("resourcePath", resourcePath).append("failureThreshold", failureThreshold).toString();
}
@Override
public int hashCode() {
return new HashCodeBuilder().append(type).append(failureThreshold).append(resourcePath).toHashCode();
}
@Override
public boolean equals(Object other) {
if (other == this) {
return true;
}
if ((other instanceof ServiceHealthCheckConfig) == false) {
return false;
}
ServiceHealthCheckConfig rhs = ((ServiceHealthCheckConfig) other);
return new EqualsBuilder().append(type, rhs.type).append(failureThreshold, rhs.failureThreshold).append(resourcePath, rhs.resourcePath).isEquals();
}
}