shiver.me.timbers.aws.codebuild.ProjectVpcConfig Maven / Gradle / Ivy
package shiver.me.timbers.aws.codebuild;
import java.util.ArrayList;
import java.util.List;
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;
/**
* ProjectVpcConfig
*
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-vpcconfig.html
*
*/
@JsonInclude(JsonInclude.Include.NON_EMPTY)
@JsonPropertyOrder({
"Subnets",
"VpcId",
"SecurityGroupIds"
})
public class ProjectVpcConfig implements Property
{
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-vpcconfig.html#cfn-codebuild-project-vpcconfig-subnets
*
*/
@JsonProperty("Subnets")
@JsonPropertyDescription("http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-vpcconfig.html#cfn-codebuild-project-vpcconfig-subnets")
private List subnets = new ArrayList();
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-vpcconfig.html#cfn-codebuild-project-vpcconfig-vpcid
*
*/
@JsonProperty("VpcId")
@JsonPropertyDescription("http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-vpcconfig.html#cfn-codebuild-project-vpcconfig-vpcid")
private CharSequence vpcId;
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-vpcconfig.html#cfn-codebuild-project-vpcconfig-securitygroupids
*
*/
@JsonProperty("SecurityGroupIds")
@JsonPropertyDescription("http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-vpcconfig.html#cfn-codebuild-project-vpcconfig-securitygroupids")
private List securityGroupIds = new ArrayList();
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-vpcconfig.html#cfn-codebuild-project-vpcconfig-subnets
*
*/
@JsonIgnore
public List getSubnets() {
return subnets;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-vpcconfig.html#cfn-codebuild-project-vpcconfig-subnets
*
*/
@JsonIgnore
public void setSubnets(List subnets) {
this.subnets = subnets;
}
public ProjectVpcConfig withSubnets(List subnets) {
this.subnets = subnets;
return this;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-vpcconfig.html#cfn-codebuild-project-vpcconfig-vpcid
*
*/
@JsonIgnore
public CharSequence getVpcId() {
return vpcId;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-vpcconfig.html#cfn-codebuild-project-vpcconfig-vpcid
*
*/
@JsonIgnore
public void setVpcId(CharSequence vpcId) {
this.vpcId = vpcId;
}
public ProjectVpcConfig withVpcId(CharSequence vpcId) {
this.vpcId = vpcId;
return this;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-vpcconfig.html#cfn-codebuild-project-vpcconfig-securitygroupids
*
*/
@JsonIgnore
public List getSecurityGroupIds() {
return securityGroupIds;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-vpcconfig.html#cfn-codebuild-project-vpcconfig-securitygroupids
*
*/
@JsonIgnore
public void setSecurityGroupIds(List securityGroupIds) {
this.securityGroupIds = securityGroupIds;
}
public ProjectVpcConfig withSecurityGroupIds(List securityGroupIds) {
this.securityGroupIds = securityGroupIds;
return this;
}
@Override
public String toString() {
return new ToStringBuilder(this).append("subnets", subnets).append("vpcId", vpcId).append("securityGroupIds", securityGroupIds).toString();
}
@Override
public int hashCode() {
return new HashCodeBuilder().append(subnets).append(securityGroupIds).append(vpcId).toHashCode();
}
@Override
public boolean equals(Object other) {
if (other == this) {
return true;
}
if ((other instanceof ProjectVpcConfig) == false) {
return false;
}
ProjectVpcConfig rhs = ((ProjectVpcConfig) other);
return new EqualsBuilder().append(subnets, rhs.subnets).append(securityGroupIds, rhs.securityGroupIds).append(vpcId, rhs.vpcId).isEquals();
}
}