shiver.me.timbers.aws.ec2.NetworkAclEntryIcmp Maven / Gradle / Ivy
package shiver.me.timbers.aws.ec2;
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;
/**
* NetworkAclEntryIcmp
*
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-networkaclentry-icmp.html
*
*/
@JsonInclude(JsonInclude.Include.NON_EMPTY)
@JsonPropertyOrder({
"Code",
"Type"
})
public class NetworkAclEntryIcmp implements Property
{
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-networkaclentry-icmp.html#cfn-ec2-networkaclentry-icmp-code
*
*/
@JsonProperty("Code")
@JsonPropertyDescription("http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-networkaclentry-icmp.html#cfn-ec2-networkaclentry-icmp-code")
private Number code;
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-networkaclentry-icmp.html#cfn-ec2-networkaclentry-icmp-type
*
*/
@JsonProperty("Type")
@JsonPropertyDescription("http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-networkaclentry-icmp.html#cfn-ec2-networkaclentry-icmp-type")
private Number type;
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-networkaclentry-icmp.html#cfn-ec2-networkaclentry-icmp-code
*
*/
@JsonIgnore
public Number getCode() {
return code;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-networkaclentry-icmp.html#cfn-ec2-networkaclentry-icmp-code
*
*/
@JsonIgnore
public void setCode(Number code) {
this.code = code;
}
public NetworkAclEntryIcmp withCode(Number code) {
this.code = code;
return this;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-networkaclentry-icmp.html#cfn-ec2-networkaclentry-icmp-type
*
*/
@JsonIgnore
public Number getType() {
return type;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-networkaclentry-icmp.html#cfn-ec2-networkaclentry-icmp-type
*
*/
@JsonIgnore
public void setType(Number type) {
this.type = type;
}
public NetworkAclEntryIcmp withType(Number type) {
this.type = type;
return this;
}
@Override
public String toString() {
return new ToStringBuilder(this).append("code", code).append("type", type).toString();
}
@Override
public int hashCode() {
return new HashCodeBuilder().append(type).append(code).toHashCode();
}
@Override
public boolean equals(Object other) {
if (other == this) {
return true;
}
if ((other instanceof NetworkAclEntryIcmp) == false) {
return false;
}
NetworkAclEntryIcmp rhs = ((NetworkAclEntryIcmp) other);
return new EqualsBuilder().append(type, rhs.type).append(code, rhs.code).isEquals();
}
}