shiver.me.timbers.aws.appmesh.VirtualNodePortMapping Maven / Gradle / Ivy
Show all versions of smt-cloudformation-objects Show documentation
package shiver.me.timbers.aws.appmesh;
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;
/**
* VirtualNodePortMapping
*
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-virtualnode-portmapping.html
*
*/
@JsonInclude(JsonInclude.Include.NON_EMPTY)
@JsonPropertyOrder({
"Port",
"Protocol"
})
public class VirtualNodePortMapping implements Property
{
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-virtualnode-portmapping.html#cfn-appmesh-virtualnode-portmapping-port
*
*/
@JsonProperty("Port")
@JsonPropertyDescription("http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-virtualnode-portmapping.html#cfn-appmesh-virtualnode-portmapping-port")
private Number port;
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-virtualnode-portmapping.html#cfn-appmesh-virtualnode-portmapping-protocol
*
*/
@JsonProperty("Protocol")
@JsonPropertyDescription("http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-virtualnode-portmapping.html#cfn-appmesh-virtualnode-portmapping-protocol")
private CharSequence protocol;
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-virtualnode-portmapping.html#cfn-appmesh-virtualnode-portmapping-port
*
*/
@JsonIgnore
public Number getPort() {
return port;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-virtualnode-portmapping.html#cfn-appmesh-virtualnode-portmapping-port
*
*/
@JsonIgnore
public void setPort(Number port) {
this.port = port;
}
public VirtualNodePortMapping withPort(Number port) {
this.port = port;
return this;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-virtualnode-portmapping.html#cfn-appmesh-virtualnode-portmapping-protocol
*
*/
@JsonIgnore
public CharSequence getProtocol() {
return protocol;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-virtualnode-portmapping.html#cfn-appmesh-virtualnode-portmapping-protocol
*
*/
@JsonIgnore
public void setProtocol(CharSequence protocol) {
this.protocol = protocol;
}
public VirtualNodePortMapping withProtocol(CharSequence protocol) {
this.protocol = protocol;
return this;
}
@Override
public String toString() {
return new ToStringBuilder(this).append("port", port).append("protocol", protocol).toString();
}
@Override
public int hashCode() {
return new HashCodeBuilder().append(port).append(protocol).toHashCode();
}
@Override
public boolean equals(Object other) {
if (other == this) {
return true;
}
if ((other instanceof VirtualNodePortMapping) == false) {
return false;
}
VirtualNodePortMapping rhs = ((VirtualNodePortMapping) other);
return new EqualsBuilder().append(port, rhs.port).append(protocol, rhs.protocol).isEquals();
}
}