/* * 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 attachment. *
* * @see AWS * API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class TransitGatewayVpcAttachment implements Serializable, Cloneable { /** ** The ID of the attachment. *
*/ private String transitGatewayAttachmentId; /** ** The ID of the transit gateway. *
*/ private String transitGatewayId; /** ** The ID of the VPC. *
*/ private String vpcId; /** ** The ID of the Amazon Web Services account that owns the VPC. *
*/ private String vpcOwnerId; /** *
* The state of the VPC attachment. Note that the initiating
state has been deprecated.
*
* The IDs of the subnets. *
*/ private com.amazonaws.internal.SdkInternalList* The creation time. *
*/ private java.util.Date creationTime; /** ** The VPC attachment options. *
*/ private TransitGatewayVpcAttachmentOptions options; /** ** The tags for the VPC attachment. *
*/ private com.amazonaws.internal.SdkInternalList* The ID of the attachment. *
* * @param transitGatewayAttachmentId * The ID of the attachment. */ public void setTransitGatewayAttachmentId(String transitGatewayAttachmentId) { this.transitGatewayAttachmentId = transitGatewayAttachmentId; } /** ** The ID of the attachment. *
* * @return The ID of the attachment. */ public String getTransitGatewayAttachmentId() { return this.transitGatewayAttachmentId; } /** ** The ID of the attachment. *
* * @param transitGatewayAttachmentId * The ID of the attachment. * @return Returns a reference to this object so that method calls can be chained together. */ public TransitGatewayVpcAttachment withTransitGatewayAttachmentId(String transitGatewayAttachmentId) { setTransitGatewayAttachmentId(transitGatewayAttachmentId); return this; } /** ** The ID of the transit gateway. *
* * @param transitGatewayId * The ID of the transit gateway. */ public void setTransitGatewayId(String transitGatewayId) { this.transitGatewayId = transitGatewayId; } /** ** The ID of the transit gateway. *
* * @return The ID of the transit gateway. */ public String getTransitGatewayId() { return this.transitGatewayId; } /** ** The ID of the transit gateway. *
* * @param transitGatewayId * The ID of the transit gateway. * @return Returns a reference to this object so that method calls can be chained together. */ public TransitGatewayVpcAttachment withTransitGatewayId(String transitGatewayId) { setTransitGatewayId(transitGatewayId); 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 TransitGatewayVpcAttachment withVpcId(String vpcId) { setVpcId(vpcId); return this; } /** ** The ID of the Amazon Web Services account that owns the VPC. *
* * @param vpcOwnerId * The ID of the Amazon Web Services account that owns the VPC. */ public void setVpcOwnerId(String vpcOwnerId) { this.vpcOwnerId = vpcOwnerId; } /** ** 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 getVpcOwnerId() { return this.vpcOwnerId; } /** ** The ID of the Amazon Web Services account that owns the VPC. *
* * @param vpcOwnerId * 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 TransitGatewayVpcAttachment withVpcOwnerId(String vpcOwnerId) { setVpcOwnerId(vpcOwnerId); return this; } /** *
* The state of the VPC attachment. Note that the initiating
state has been deprecated.
*
initiating
state has been deprecated.
* @see TransitGatewayAttachmentState
*/
public void setState(String state) {
this.state = state;
}
/**
*
* The state of the VPC attachment. Note that the initiating
state has been deprecated.
*
initiating
state has been deprecated.
* @see TransitGatewayAttachmentState
*/
public String getState() {
return this.state;
}
/**
*
* The state of the VPC attachment. Note that the initiating
state has been deprecated.
*
initiating
state has been deprecated.
* @return Returns a reference to this object so that method calls can be chained together.
* @see TransitGatewayAttachmentState
*/
public TransitGatewayVpcAttachment withState(String state) {
setState(state);
return this;
}
/**
*
* The state of the VPC attachment. Note that the initiating
state has been deprecated.
*
initiating
state has been deprecated.
* @return Returns a reference to this object so that method calls can be chained together.
* @see TransitGatewayAttachmentState
*/
public TransitGatewayVpcAttachment withState(TransitGatewayAttachmentState state) {
this.state = state.toString();
return this;
}
/**
* * The IDs of the subnets. *
* * @return The IDs of the subnets. */ public java.util.List* The IDs of the subnets. *
* * @param subnetIds * The IDs of the subnets. */ public void setSubnetIds(java.util.Collection* The IDs of the subnets. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setSubnetIds(java.util.Collection)} or {@link #withSubnetIds(java.util.Collection)} if you want to * override the existing values. *
* * @param subnetIds * The IDs of the subnets. * @return Returns a reference to this object so that method calls can be chained together. */ public TransitGatewayVpcAttachment withSubnetIds(String... subnetIds) { if (this.subnetIds == null) { setSubnetIds(new com.amazonaws.internal.SdkInternalList* The IDs of the subnets. *
* * @param subnetIds * The IDs of the subnets. * @return Returns a reference to this object so that method calls can be chained together. */ public TransitGatewayVpcAttachment withSubnetIds(java.util.Collection* The creation time. *
* * @param creationTime * The creation time. */ public void setCreationTime(java.util.Date creationTime) { this.creationTime = creationTime; } /** ** The creation time. *
* * @return The creation time. */ public java.util.Date getCreationTime() { return this.creationTime; } /** ** The creation time. *
* * @param creationTime * The creation time. * @return Returns a reference to this object so that method calls can be chained together. */ public TransitGatewayVpcAttachment withCreationTime(java.util.Date creationTime) { setCreationTime(creationTime); return this; } /** ** The VPC attachment options. *
* * @param options * The VPC attachment options. */ public void setOptions(TransitGatewayVpcAttachmentOptions options) { this.options = options; } /** ** The VPC attachment options. *
* * @return The VPC attachment options. */ public TransitGatewayVpcAttachmentOptions getOptions() { return this.options; } /** ** The VPC attachment options. *
* * @param options * The VPC attachment options. * @return Returns a reference to this object so that method calls can be chained together. */ public TransitGatewayVpcAttachment withOptions(TransitGatewayVpcAttachmentOptions options) { setOptions(options); return this; } /** ** The tags for the VPC attachment. *
* * @return The tags for the VPC attachment. */ public java.util.List* The tags for the VPC attachment. *
* * @param tags * The tags for the VPC attachment. */ public void setTags(java.util.Collection* The tags for the VPC attachment. *
** 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 * The tags for the VPC attachment. * @return Returns a reference to this object so that method calls can be chained together. */ public TransitGatewayVpcAttachment withTags(Tag... tags) { if (this.tags == null) { setTags(new com.amazonaws.internal.SdkInternalList* The tags for the VPC attachment. *
* * @param tags * The tags for the VPC attachment. * @return Returns a reference to this object so that method calls can be chained together. */ public TransitGatewayVpcAttachment withTags(java.util.Collection