
shiver.me.timbers.aws.ec2.NetworkInterface Maven / Gradle / Ivy
package shiver.me.timbers.aws.ec2;
import java.util.ArrayList;
import java.util.LinkedHashSet;
import java.util.List;
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;
import shiver.me.timbers.aws.Tag;
/**
* NetworkInterface
*
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-network-interface.html
*
*/
@JsonInclude(JsonInclude.Include.NON_EMPTY)
@JsonPropertyOrder({
"Description",
"GroupSet",
"InterfaceType",
"Ipv6AddressCount",
"Ipv6Addresses",
"PrivateIpAddress",
"PrivateIpAddresses",
"SecondaryPrivateIpAddressCount",
"SourceDestCheck",
"SubnetId",
"Tags"
})
public class NetworkInterface {
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-network-interface.html#cfn-awsec2networkinterface-description
*
*/
@JsonProperty("Description")
@JsonPropertyDescription("http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-network-interface.html#cfn-awsec2networkinterface-description")
private CharSequence description;
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-network-interface.html#cfn-awsec2networkinterface-groupset
*
*/
@JsonProperty("GroupSet")
@JsonDeserialize(as = java.util.LinkedHashSet.class)
@JsonPropertyDescription("http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-network-interface.html#cfn-awsec2networkinterface-groupset")
private Set groupSet = new LinkedHashSet();
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-network-interface.html#cfn-ec2-networkinterface-interfacetype
*
*/
@JsonProperty("InterfaceType")
@JsonPropertyDescription("http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-network-interface.html#cfn-ec2-networkinterface-interfacetype")
private CharSequence interfaceType;
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-network-interface.html#cfn-ec2-networkinterface-ipv6addresscount
*
*/
@JsonProperty("Ipv6AddressCount")
@JsonPropertyDescription("http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-network-interface.html#cfn-ec2-networkinterface-ipv6addresscount")
private Number ipv6AddressCount;
/**
* NetworkInterfaceInstanceIpv6Address
*
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-networkinterface-instanceipv6address.html
*
*/
@JsonProperty("Ipv6Addresses")
@JsonPropertyDescription("http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-networkinterface-instanceipv6address.html")
private Property ipv6Addresses;
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-network-interface.html#cfn-awsec2networkinterface-privateipaddress
*
*/
@JsonProperty("PrivateIpAddress")
@JsonPropertyDescription("http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-network-interface.html#cfn-awsec2networkinterface-privateipaddress")
private CharSequence privateIpAddress;
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-network-interface.html#cfn-awsec2networkinterface-privateipaddresses
*
*/
@JsonProperty("PrivateIpAddresses")
@JsonDeserialize(as = java.util.LinkedHashSet.class)
@JsonPropertyDescription("http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-network-interface.html#cfn-awsec2networkinterface-privateipaddresses")
private Set> privateIpAddresses = new LinkedHashSet>();
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-network-interface.html#cfn-awsec2networkinterface-secondaryprivateipcount
*
*/
@JsonProperty("SecondaryPrivateIpAddressCount")
@JsonPropertyDescription("http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-network-interface.html#cfn-awsec2networkinterface-secondaryprivateipcount")
private Number secondaryPrivateIpAddressCount;
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-network-interface.html#cfn-awsec2networkinterface-sourcedestcheck
*
*/
@JsonProperty("SourceDestCheck")
@JsonPropertyDescription("http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-network-interface.html#cfn-awsec2networkinterface-sourcedestcheck")
private CharSequence sourceDestCheck;
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-network-interface.html#cfn-awsec2networkinterface-subnetid
*
*/
@JsonProperty("SubnetId")
@JsonPropertyDescription("http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-network-interface.html#cfn-awsec2networkinterface-subnetid")
private CharSequence subnetId;
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-network-interface.html#cfn-awsec2networkinterface-tags
*
*/
@JsonProperty("Tags")
@JsonPropertyDescription("http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-network-interface.html#cfn-awsec2networkinterface-tags")
private List> tags = new ArrayList>();
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-network-interface.html#cfn-awsec2networkinterface-description
*
*/
@JsonIgnore
public CharSequence getDescription() {
return description;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-network-interface.html#cfn-awsec2networkinterface-description
*
*/
@JsonIgnore
public void setDescription(CharSequence description) {
this.description = description;
}
public NetworkInterface withDescription(CharSequence description) {
this.description = description;
return this;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-network-interface.html#cfn-awsec2networkinterface-groupset
*
*/
@JsonIgnore
public Set getGroupSet() {
return groupSet;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-network-interface.html#cfn-awsec2networkinterface-groupset
*
*/
@JsonIgnore
public void setGroupSet(Set groupSet) {
this.groupSet = groupSet;
}
public NetworkInterface withGroupSet(Set groupSet) {
this.groupSet = groupSet;
return this;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-network-interface.html#cfn-ec2-networkinterface-interfacetype
*
*/
@JsonIgnore
public CharSequence getInterfaceType() {
return interfaceType;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-network-interface.html#cfn-ec2-networkinterface-interfacetype
*
*/
@JsonIgnore
public void setInterfaceType(CharSequence interfaceType) {
this.interfaceType = interfaceType;
}
public NetworkInterface withInterfaceType(CharSequence interfaceType) {
this.interfaceType = interfaceType;
return this;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-network-interface.html#cfn-ec2-networkinterface-ipv6addresscount
*
*/
@JsonIgnore
public Number getIpv6AddressCount() {
return ipv6AddressCount;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-network-interface.html#cfn-ec2-networkinterface-ipv6addresscount
*
*/
@JsonIgnore
public void setIpv6AddressCount(Number ipv6AddressCount) {
this.ipv6AddressCount = ipv6AddressCount;
}
public NetworkInterface withIpv6AddressCount(Number ipv6AddressCount) {
this.ipv6AddressCount = ipv6AddressCount;
return this;
}
/**
* NetworkInterfaceInstanceIpv6Address
*
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-networkinterface-instanceipv6address.html
*
*/
@JsonIgnore
public Property getIpv6Addresses() {
return ipv6Addresses;
}
/**
* NetworkInterfaceInstanceIpv6Address
*
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-networkinterface-instanceipv6address.html
*
*/
@JsonIgnore
public void setIpv6Addresses(Property ipv6Addresses) {
this.ipv6Addresses = ipv6Addresses;
}
public NetworkInterface withIpv6Addresses(Property ipv6Addresses) {
this.ipv6Addresses = ipv6Addresses;
return this;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-network-interface.html#cfn-awsec2networkinterface-privateipaddress
*
*/
@JsonIgnore
public CharSequence getPrivateIpAddress() {
return privateIpAddress;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-network-interface.html#cfn-awsec2networkinterface-privateipaddress
*
*/
@JsonIgnore
public void setPrivateIpAddress(CharSequence privateIpAddress) {
this.privateIpAddress = privateIpAddress;
}
public NetworkInterface withPrivateIpAddress(CharSequence privateIpAddress) {
this.privateIpAddress = privateIpAddress;
return this;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-network-interface.html#cfn-awsec2networkinterface-privateipaddresses
*
*/
@JsonIgnore
public Set> getPrivateIpAddresses() {
return privateIpAddresses;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-network-interface.html#cfn-awsec2networkinterface-privateipaddresses
*
*/
@JsonIgnore
public void setPrivateIpAddresses(Set> privateIpAddresses) {
this.privateIpAddresses = privateIpAddresses;
}
public NetworkInterface withPrivateIpAddresses(Set> privateIpAddresses) {
this.privateIpAddresses = privateIpAddresses;
return this;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-network-interface.html#cfn-awsec2networkinterface-secondaryprivateipcount
*
*/
@JsonIgnore
public Number getSecondaryPrivateIpAddressCount() {
return secondaryPrivateIpAddressCount;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-network-interface.html#cfn-awsec2networkinterface-secondaryprivateipcount
*
*/
@JsonIgnore
public void setSecondaryPrivateIpAddressCount(Number secondaryPrivateIpAddressCount) {
this.secondaryPrivateIpAddressCount = secondaryPrivateIpAddressCount;
}
public NetworkInterface withSecondaryPrivateIpAddressCount(Number secondaryPrivateIpAddressCount) {
this.secondaryPrivateIpAddressCount = secondaryPrivateIpAddressCount;
return this;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-network-interface.html#cfn-awsec2networkinterface-sourcedestcheck
*
*/
@JsonIgnore
public CharSequence getSourceDestCheck() {
return sourceDestCheck;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-network-interface.html#cfn-awsec2networkinterface-sourcedestcheck
*
*/
@JsonIgnore
public void setSourceDestCheck(CharSequence sourceDestCheck) {
this.sourceDestCheck = sourceDestCheck;
}
public NetworkInterface withSourceDestCheck(CharSequence sourceDestCheck) {
this.sourceDestCheck = sourceDestCheck;
return this;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-network-interface.html#cfn-awsec2networkinterface-subnetid
*
*/
@JsonIgnore
public CharSequence getSubnetId() {
return subnetId;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-network-interface.html#cfn-awsec2networkinterface-subnetid
*
*/
@JsonIgnore
public void setSubnetId(CharSequence subnetId) {
this.subnetId = subnetId;
}
public NetworkInterface withSubnetId(CharSequence subnetId) {
this.subnetId = subnetId;
return this;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-network-interface.html#cfn-awsec2networkinterface-tags
*
*/
@JsonIgnore
public List> getTags() {
return tags;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-network-interface.html#cfn-awsec2networkinterface-tags
*
*/
@JsonIgnore
public void setTags(List> tags) {
this.tags = tags;
}
public NetworkInterface withTags(List> tags) {
this.tags = tags;
return this;
}
@Override
public String toString() {
return new ToStringBuilder(this).append("description", description).append("groupSet", groupSet).append("interfaceType", interfaceType).append("ipv6AddressCount", ipv6AddressCount).append("ipv6Addresses", ipv6Addresses).append("privateIpAddress", privateIpAddress).append("privateIpAddresses", privateIpAddresses).append("secondaryPrivateIpAddressCount", secondaryPrivateIpAddressCount).append("sourceDestCheck", sourceDestCheck).append("subnetId", subnetId).append("tags", tags).toString();
}
@Override
public int hashCode() {
return new HashCodeBuilder().append(privateIpAddresses).append(subnetId).append(interfaceType).append(ipv6AddressCount).append(description).append(ipv6Addresses).append(secondaryPrivateIpAddressCount).append(sourceDestCheck).append(groupSet).append(privateIpAddress).append(tags).toHashCode();
}
@Override
public boolean equals(Object other) {
if (other == this) {
return true;
}
if ((other instanceof NetworkInterface) == false) {
return false;
}
NetworkInterface rhs = ((NetworkInterface) other);
return new EqualsBuilder().append(privateIpAddresses, rhs.privateIpAddresses).append(subnetId, rhs.subnetId).append(interfaceType, rhs.interfaceType).append(ipv6AddressCount, rhs.ipv6AddressCount).append(description, rhs.description).append(ipv6Addresses, rhs.ipv6Addresses).append(secondaryPrivateIpAddressCount, rhs.secondaryPrivateIpAddressCount).append(sourceDestCheck, rhs.sourceDestCheck).append(groupSet, rhs.groupSet).append(privateIpAddress, rhs.privateIpAddress).append(tags, rhs.tags).isEquals();
}
}