/* * Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions * and limitations under the License. */ package com.amazonaws.services.ec2.model; import java.io.Serializable; import javax.annotation.Generated; /** *
* Describes a VPC. *
* * @see AWS API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class Vpc implements Serializable, Cloneable { /** ** The primary IPv4 CIDR block for the VPC. *
*/ private String cidrBlock; /** ** The ID of the set of DHCP options you've associated with the VPC. *
*/ private String dhcpOptionsId; /** ** The current state of the VPC. *
*/ private String state; /** ** The ID of the VPC. *
*/ private String vpcId; /** ** The ID of the Amazon Web Services account that owns the VPC. *
*/ private String ownerId; /** ** The allowed tenancy of instances launched into the VPC. *
*/ private String instanceTenancy; /** ** Information about the IPv6 CIDR blocks associated with the VPC. *
*/ private com.amazonaws.internal.SdkInternalList* Information about the IPv4 CIDR blocks associated with the VPC. *
*/ private com.amazonaws.internal.SdkInternalList* Indicates whether the VPC is the default VPC. *
*/ private Boolean isDefault; /** ** Any tags assigned to the VPC. *
*/ private com.amazonaws.internal.SdkInternalList* The primary IPv4 CIDR block for the VPC. *
* * @param cidrBlock * The primary IPv4 CIDR block for the VPC. */ public void setCidrBlock(String cidrBlock) { this.cidrBlock = cidrBlock; } /** ** The primary IPv4 CIDR block for the VPC. *
* * @return The primary IPv4 CIDR block for the VPC. */ public String getCidrBlock() { return this.cidrBlock; } /** ** The primary IPv4 CIDR block for the VPC. *
* * @param cidrBlock * The primary IPv4 CIDR block for the VPC. * @return Returns a reference to this object so that method calls can be chained together. */ public Vpc withCidrBlock(String cidrBlock) { setCidrBlock(cidrBlock); return this; } /** ** The ID of the set of DHCP options you've associated with the VPC. *
* * @param dhcpOptionsId * The ID of the set of DHCP options you've associated with the VPC. */ public void setDhcpOptionsId(String dhcpOptionsId) { this.dhcpOptionsId = dhcpOptionsId; } /** ** The ID of the set of DHCP options you've associated with the VPC. *
* * @return The ID of the set of DHCP options you've associated with the VPC. */ public String getDhcpOptionsId() { return this.dhcpOptionsId; } /** ** The ID of the set of DHCP options you've associated with the VPC. *
* * @param dhcpOptionsId * The ID of the set of DHCP options you've associated with the VPC. * @return Returns a reference to this object so that method calls can be chained together. */ public Vpc withDhcpOptionsId(String dhcpOptionsId) { setDhcpOptionsId(dhcpOptionsId); return this; } /** ** The current state of the VPC. *
* * @param state * The current state of the VPC. * @see VpcState */ public void setState(String state) { this.state = state; } /** ** The current state of the VPC. *
* * @return The current state of the VPC. * @see VpcState */ public String getState() { return this.state; } /** ** The current state of the VPC. *
* * @param state * The current state of the VPC. * @return Returns a reference to this object so that method calls can be chained together. * @see VpcState */ public Vpc withState(String state) { setState(state); return this; } /** ** The current state of the VPC. *
* * @param state * The current state of the VPC. * @see VpcState */ public void setState(VpcState state) { withState(state); } /** ** The current state of the VPC. *
* * @param state * The current state of the VPC. * @return Returns a reference to this object so that method calls can be chained together. * @see VpcState */ public Vpc withState(VpcState state) { this.state = state.toString(); return this; } /** ** The ID of the VPC. *
* * @param vpcId * The ID of the VPC. */ public void setVpcId(String vpcId) { this.vpcId = vpcId; } /** ** The ID of the VPC. *
* * @return The ID of the VPC. */ public String getVpcId() { return this.vpcId; } /** ** The ID of the VPC. *
* * @param vpcId * The ID of the VPC. * @return Returns a reference to this object so that method calls can be chained together. */ public Vpc withVpcId(String vpcId) { setVpcId(vpcId); return this; } /** ** The ID of the Amazon Web Services account that owns the VPC. *
* * @param ownerId * The ID of the Amazon Web Services account that owns the VPC. */ public void setOwnerId(String ownerId) { this.ownerId = ownerId; } /** ** The ID of the Amazon Web Services account that owns the VPC. *
* * @return The ID of the Amazon Web Services account that owns the VPC. */ public String getOwnerId() { return this.ownerId; } /** ** The ID of the Amazon Web Services account that owns the VPC. *
* * @param ownerId * The ID of the Amazon Web Services account that owns the VPC. * @return Returns a reference to this object so that method calls can be chained together. */ public Vpc withOwnerId(String ownerId) { setOwnerId(ownerId); return this; } /** ** The allowed tenancy of instances launched into the VPC. *
* * @param instanceTenancy * The allowed tenancy of instances launched into the VPC. * @see Tenancy */ public void setInstanceTenancy(String instanceTenancy) { this.instanceTenancy = instanceTenancy; } /** ** The allowed tenancy of instances launched into the VPC. *
* * @return The allowed tenancy of instances launched into the VPC. * @see Tenancy */ public String getInstanceTenancy() { return this.instanceTenancy; } /** ** The allowed tenancy of instances launched into the VPC. *
* * @param instanceTenancy * The allowed tenancy of instances launched into the VPC. * @return Returns a reference to this object so that method calls can be chained together. * @see Tenancy */ public Vpc withInstanceTenancy(String instanceTenancy) { setInstanceTenancy(instanceTenancy); return this; } /** ** The allowed tenancy of instances launched into the VPC. *
* * @param instanceTenancy * The allowed tenancy of instances launched into the VPC. * @see Tenancy */ public void setInstanceTenancy(Tenancy instanceTenancy) { withInstanceTenancy(instanceTenancy); } /** ** The allowed tenancy of instances launched into the VPC. *
* * @param instanceTenancy * The allowed tenancy of instances launched into the VPC. * @return Returns a reference to this object so that method calls can be chained together. * @see Tenancy */ public Vpc withInstanceTenancy(Tenancy instanceTenancy) { this.instanceTenancy = instanceTenancy.toString(); return this; } /** ** Information about the IPv6 CIDR blocks associated with the VPC. *
* * @return Information about the IPv6 CIDR blocks associated with the VPC. */ public java.util.List* Information about the IPv6 CIDR blocks associated with the VPC. *
* * @param ipv6CidrBlockAssociationSet * Information about the IPv6 CIDR blocks associated with the VPC. */ public void setIpv6CidrBlockAssociationSet(java.util.Collection* Information about the IPv6 CIDR blocks associated with the VPC. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setIpv6CidrBlockAssociationSet(java.util.Collection)} or * {@link #withIpv6CidrBlockAssociationSet(java.util.Collection)} if you want to override the existing values. *
* * @param ipv6CidrBlockAssociationSet * Information about the IPv6 CIDR blocks associated with the VPC. * @return Returns a reference to this object so that method calls can be chained together. */ public Vpc withIpv6CidrBlockAssociationSet(VpcIpv6CidrBlockAssociation... ipv6CidrBlockAssociationSet) { if (this.ipv6CidrBlockAssociationSet == null) { setIpv6CidrBlockAssociationSet(new com.amazonaws.internal.SdkInternalList* Information about the IPv6 CIDR blocks associated with the VPC. *
* * @param ipv6CidrBlockAssociationSet * Information about the IPv6 CIDR blocks associated with the VPC. * @return Returns a reference to this object so that method calls can be chained together. */ public Vpc withIpv6CidrBlockAssociationSet(java.util.Collection* Information about the IPv4 CIDR blocks associated with the VPC. *
* * @return Information about the IPv4 CIDR blocks associated with the VPC. */ public java.util.List* Information about the IPv4 CIDR blocks associated with the VPC. *
* * @param cidrBlockAssociationSet * Information about the IPv4 CIDR blocks associated with the VPC. */ public void setCidrBlockAssociationSet(java.util.Collection* Information about the IPv4 CIDR blocks associated with the VPC. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setCidrBlockAssociationSet(java.util.Collection)} or * {@link #withCidrBlockAssociationSet(java.util.Collection)} if you want to override the existing values. *
* * @param cidrBlockAssociationSet * Information about the IPv4 CIDR blocks associated with the VPC. * @return Returns a reference to this object so that method calls can be chained together. */ public Vpc withCidrBlockAssociationSet(VpcCidrBlockAssociation... cidrBlockAssociationSet) { if (this.cidrBlockAssociationSet == null) { setCidrBlockAssociationSet(new com.amazonaws.internal.SdkInternalList* Information about the IPv4 CIDR blocks associated with the VPC. *
* * @param cidrBlockAssociationSet * Information about the IPv4 CIDR blocks associated with the VPC. * @return Returns a reference to this object so that method calls can be chained together. */ public Vpc withCidrBlockAssociationSet(java.util.Collection* Indicates whether the VPC is the default VPC. *
* * @param isDefault * Indicates whether the VPC is the default VPC. */ public void setIsDefault(Boolean isDefault) { this.isDefault = isDefault; } /** ** Indicates whether the VPC is the default VPC. *
* * @return Indicates whether the VPC is the default VPC. */ public Boolean getIsDefault() { return this.isDefault; } /** ** Indicates whether the VPC is the default VPC. *
* * @param isDefault * Indicates whether the VPC is the default VPC. * @return Returns a reference to this object so that method calls can be chained together. */ public Vpc withIsDefault(Boolean isDefault) { setIsDefault(isDefault); return this; } /** ** Indicates whether the VPC is the default VPC. *
* * @return Indicates whether the VPC is the default VPC. */ public Boolean isDefault() { return this.isDefault; } /** ** Any tags assigned to the VPC. *
* * @return Any tags assigned to the VPC. */ public java.util.List* Any tags assigned to the VPC. *
* * @param tags * Any tags assigned to the VPC. */ public void setTags(java.util.Collection* Any tags assigned to the VPC. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setTags(java.util.Collection)} or {@link #withTags(java.util.Collection)} if you want to override the * existing values. *
* * @param tags * Any tags assigned to the VPC. * @return Returns a reference to this object so that method calls can be chained together. */ public Vpc withTags(Tag... tags) { if (this.tags == null) { setTags(new com.amazonaws.internal.SdkInternalList* Any tags assigned to the VPC. *
* * @param tags * Any tags assigned to the VPC. * @return Returns a reference to this object so that method calls can be chained together. */ public Vpc withTags(java.util.Collection