shiver.me.timbers.aws.codedeploy.DeploymentGroupAutoRollbackConfiguration Maven / Gradle / Ivy
package shiver.me.timbers.aws.codedeploy;
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;
/**
* DeploymentGroupAutoRollbackConfiguration
*
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codedeploy-deploymentgroup-autorollbackconfiguration.html
*
*/
@JsonInclude(JsonInclude.Include.NON_EMPTY)
@JsonPropertyOrder({
"Enabled",
"Events"
})
public class DeploymentGroupAutoRollbackConfiguration implements Property
{
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codedeploy-deploymentgroup-autorollbackconfiguration.html#cfn-codedeploy-deploymentgroup-autorollbackconfiguration-enabled
*
*/
@JsonProperty("Enabled")
@JsonPropertyDescription("http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codedeploy-deploymentgroup-autorollbackconfiguration.html#cfn-codedeploy-deploymentgroup-autorollbackconfiguration-enabled")
private CharSequence enabled;
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codedeploy-deploymentgroup-autorollbackconfiguration.html#cfn-codedeploy-deploymentgroup-autorollbackconfiguration-events
*
*/
@JsonProperty("Events")
@JsonDeserialize(as = java.util.LinkedHashSet.class)
@JsonPropertyDescription("http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codedeploy-deploymentgroup-autorollbackconfiguration.html#cfn-codedeploy-deploymentgroup-autorollbackconfiguration-events")
private Set events = new LinkedHashSet();
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codedeploy-deploymentgroup-autorollbackconfiguration.html#cfn-codedeploy-deploymentgroup-autorollbackconfiguration-enabled
*
*/
@JsonIgnore
public CharSequence getEnabled() {
return enabled;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codedeploy-deploymentgroup-autorollbackconfiguration.html#cfn-codedeploy-deploymentgroup-autorollbackconfiguration-enabled
*
*/
@JsonIgnore
public void setEnabled(CharSequence enabled) {
this.enabled = enabled;
}
public DeploymentGroupAutoRollbackConfiguration withEnabled(CharSequence enabled) {
this.enabled = enabled;
return this;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codedeploy-deploymentgroup-autorollbackconfiguration.html#cfn-codedeploy-deploymentgroup-autorollbackconfiguration-events
*
*/
@JsonIgnore
public Set getEvents() {
return events;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codedeploy-deploymentgroup-autorollbackconfiguration.html#cfn-codedeploy-deploymentgroup-autorollbackconfiguration-events
*
*/
@JsonIgnore
public void setEvents(Set events) {
this.events = events;
}
public DeploymentGroupAutoRollbackConfiguration withEvents(Set events) {
this.events = events;
return this;
}
@Override
public String toString() {
return new ToStringBuilder(this).append("enabled", enabled).append("events", events).toString();
}
@Override
public int hashCode() {
return new HashCodeBuilder().append(enabled).append(events).toHashCode();
}
@Override
public boolean equals(Object other) {
if (other == this) {
return true;
}
if ((other instanceof DeploymentGroupAutoRollbackConfiguration) == false) {
return false;
}
DeploymentGroupAutoRollbackConfiguration rhs = ((DeploymentGroupAutoRollbackConfiguration) other);
return new EqualsBuilder().append(enabled, rhs.enabled).append(events, rhs.events).isEquals();
}
}