/* * 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 virtual private gateway. *
* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class VpnGateway implements Serializable, Cloneable { /** ** The Availability Zone where the virtual private gateway was created, if applicable. This field may be empty or * not returned. *
*/ private String availabilityZone; /** ** The current state of the virtual private gateway. *
*/ private String state; /** ** The type of VPN connection the virtual private gateway supports. *
*/ private String type; /** ** Any VPCs attached to the virtual private gateway. *
*/ private com.amazonaws.internal.SdkInternalList* The ID of the virtual private gateway. *
*/ private String vpnGatewayId; /** ** The private Autonomous System Number (ASN) for the Amazon side of a BGP session. *
*/ private Long amazonSideAsn; /** ** Any tags assigned to the virtual private gateway. *
*/ private com.amazonaws.internal.SdkInternalList* The Availability Zone where the virtual private gateway was created, if applicable. This field may be empty or * not returned. *
* * @param availabilityZone * The Availability Zone where the virtual private gateway was created, if applicable. This field may be * empty or not returned. */ public void setAvailabilityZone(String availabilityZone) { this.availabilityZone = availabilityZone; } /** ** The Availability Zone where the virtual private gateway was created, if applicable. This field may be empty or * not returned. *
* * @return The Availability Zone where the virtual private gateway was created, if applicable. This field may be * empty or not returned. */ public String getAvailabilityZone() { return this.availabilityZone; } /** ** The Availability Zone where the virtual private gateway was created, if applicable. This field may be empty or * not returned. *
* * @param availabilityZone * The Availability Zone where the virtual private gateway was created, if applicable. This field may be * empty or not returned. * @return Returns a reference to this object so that method calls can be chained together. */ public VpnGateway withAvailabilityZone(String availabilityZone) { setAvailabilityZone(availabilityZone); return this; } /** ** The current state of the virtual private gateway. *
* * @param state * The current state of the virtual private gateway. * @see VpnState */ public void setState(String state) { this.state = state; } /** ** The current state of the virtual private gateway. *
* * @return The current state of the virtual private gateway. * @see VpnState */ public String getState() { return this.state; } /** ** The current state of the virtual private gateway. *
* * @param state * The current state of the virtual private gateway. * @return Returns a reference to this object so that method calls can be chained together. * @see VpnState */ public VpnGateway withState(String state) { setState(state); return this; } /** ** The current state of the virtual private gateway. *
* * @param state * The current state of the virtual private gateway. * @see VpnState */ public void setState(VpnState state) { withState(state); } /** ** The current state of the virtual private gateway. *
* * @param state * The current state of the virtual private gateway. * @return Returns a reference to this object so that method calls can be chained together. * @see VpnState */ public VpnGateway withState(VpnState state) { this.state = state.toString(); return this; } /** ** The type of VPN connection the virtual private gateway supports. *
* * @param type * The type of VPN connection the virtual private gateway supports. * @see GatewayType */ public void setType(String type) { this.type = type; } /** ** The type of VPN connection the virtual private gateway supports. *
* * @return The type of VPN connection the virtual private gateway supports. * @see GatewayType */ public String getType() { return this.type; } /** ** The type of VPN connection the virtual private gateway supports. *
* * @param type * The type of VPN connection the virtual private gateway supports. * @return Returns a reference to this object so that method calls can be chained together. * @see GatewayType */ public VpnGateway withType(String type) { setType(type); return this; } /** ** The type of VPN connection the virtual private gateway supports. *
* * @param type * The type of VPN connection the virtual private gateway supports. * @see GatewayType */ public void setType(GatewayType type) { withType(type); } /** ** The type of VPN connection the virtual private gateway supports. *
* * @param type * The type of VPN connection the virtual private gateway supports. * @return Returns a reference to this object so that method calls can be chained together. * @see GatewayType */ public VpnGateway withType(GatewayType type) { this.type = type.toString(); return this; } /** ** Any VPCs attached to the virtual private gateway. *
* * @return Any VPCs attached to the virtual private gateway. */ public java.util.List* Any VPCs attached to the virtual private gateway. *
* * @param vpcAttachments * Any VPCs attached to the virtual private gateway. */ public void setVpcAttachments(java.util.Collection* Any VPCs attached to the virtual private gateway. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setVpcAttachments(java.util.Collection)} or {@link #withVpcAttachments(java.util.Collection)} if you want * to override the existing values. *
* * @param vpcAttachments * Any VPCs attached to the virtual private gateway. * @return Returns a reference to this object so that method calls can be chained together. */ public VpnGateway withVpcAttachments(VpcAttachment... vpcAttachments) { if (this.vpcAttachments == null) { setVpcAttachments(new com.amazonaws.internal.SdkInternalList* Any VPCs attached to the virtual private gateway. *
* * @param vpcAttachments * Any VPCs attached to the virtual private gateway. * @return Returns a reference to this object so that method calls can be chained together. */ public VpnGateway withVpcAttachments(java.util.Collection* The ID of the virtual private gateway. *
* * @param vpnGatewayId * The ID of the virtual private gateway. */ public void setVpnGatewayId(String vpnGatewayId) { this.vpnGatewayId = vpnGatewayId; } /** ** The ID of the virtual private gateway. *
* * @return The ID of the virtual private gateway. */ public String getVpnGatewayId() { return this.vpnGatewayId; } /** ** The ID of the virtual private gateway. *
* * @param vpnGatewayId * The ID of the virtual private gateway. * @return Returns a reference to this object so that method calls can be chained together. */ public VpnGateway withVpnGatewayId(String vpnGatewayId) { setVpnGatewayId(vpnGatewayId); return this; } /** ** The private Autonomous System Number (ASN) for the Amazon side of a BGP session. *
* * @param amazonSideAsn * The private Autonomous System Number (ASN) for the Amazon side of a BGP session. */ public void setAmazonSideAsn(Long amazonSideAsn) { this.amazonSideAsn = amazonSideAsn; } /** ** The private Autonomous System Number (ASN) for the Amazon side of a BGP session. *
* * @return The private Autonomous System Number (ASN) for the Amazon side of a BGP session. */ public Long getAmazonSideAsn() { return this.amazonSideAsn; } /** ** The private Autonomous System Number (ASN) for the Amazon side of a BGP session. *
* * @param amazonSideAsn * The private Autonomous System Number (ASN) for the Amazon side of a BGP session. * @return Returns a reference to this object so that method calls can be chained together. */ public VpnGateway withAmazonSideAsn(Long amazonSideAsn) { setAmazonSideAsn(amazonSideAsn); return this; } /** ** Any tags assigned to the virtual private gateway. *
* * @return Any tags assigned to the virtual private gateway. */ public java.util.List* Any tags assigned to the virtual private gateway. *
* * @param tags * Any tags assigned to the virtual private gateway. */ public void setTags(java.util.Collection* Any tags assigned to the virtual private gateway. *
** 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 virtual private gateway. * @return Returns a reference to this object so that method calls can be chained together. */ public VpnGateway withTags(Tag... tags) { if (this.tags == null) { setTags(new com.amazonaws.internal.SdkInternalList* Any tags assigned to the virtual private gateway. *
* * @param tags * Any tags assigned to the virtual private gateway. * @return Returns a reference to this object so that method calls can be chained together. */ public VpnGateway withTags(java.util.Collection