/* * 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 VPN connection. *
* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class VpnConnection implements Serializable, Cloneable { /** *
* The configuration information for the VPN connection's customer gateway (in the native XML format). This element
* is always present in the CreateVpnConnection response; however, it's present in the
* DescribeVpnConnections response only if the VPN connection is in the pending
or
* available
state.
*
* The ID of the customer gateway at your end of the VPN connection. *
*/ private String customerGatewayId; /** *
* The category of the VPN connection. A value of VPN
indicates an Amazon Web Services VPN connection.
* A value of VPN-Classic
indicates an Amazon Web Services Classic VPN connection.
*
* The current state of the VPN connection. *
*/ private String state; /** ** The type of VPN connection. *
*/ private String type; /** ** The ID of the VPN connection. *
*/ private String vpnConnectionId; /** ** The ID of the virtual private gateway at the Amazon Web Services side of the VPN connection. *
*/ private String vpnGatewayId; /** ** The ID of the transit gateway associated with the VPN connection. *
*/ private String transitGatewayId; /** ** The ARN of the core network. *
*/ private String coreNetworkArn; /** ** The ARN of the core network attachment. *
*/ private String coreNetworkAttachmentArn; /** ** The current state of the gateway association. *
*/ private String gatewayAssociationState; /** ** The VPN connection options. *
*/ private VpnConnectionOptions options; /** ** The static routes associated with the VPN connection. *
*/ private com.amazonaws.internal.SdkInternalList* Any tags assigned to the VPN connection. *
*/ private com.amazonaws.internal.SdkInternalList* Information about the VPN tunnel. *
*/ private com.amazonaws.internal.SdkInternalList
* The configuration information for the VPN connection's customer gateway (in the native XML format). This element
* is always present in the CreateVpnConnection response; however, it's present in the
* DescribeVpnConnections response only if the VPN connection is in the pending
or
* available
state.
*
pending
or
* available
state.
*/
public void setCustomerGatewayConfiguration(String customerGatewayConfiguration) {
this.customerGatewayConfiguration = customerGatewayConfiguration;
}
/**
*
* The configuration information for the VPN connection's customer gateway (in the native XML format). This element
* is always present in the CreateVpnConnection response; however, it's present in the
* DescribeVpnConnections response only if the VPN connection is in the pending
or
* available
state.
*
pending
or
* available
state.
*/
public String getCustomerGatewayConfiguration() {
return this.customerGatewayConfiguration;
}
/**
*
* The configuration information for the VPN connection's customer gateway (in the native XML format). This element
* is always present in the CreateVpnConnection response; however, it's present in the
* DescribeVpnConnections response only if the VPN connection is in the pending
or
* available
state.
*
pending
or
* available
state.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public VpnConnection withCustomerGatewayConfiguration(String customerGatewayConfiguration) {
setCustomerGatewayConfiguration(customerGatewayConfiguration);
return this;
}
/**
* * The ID of the customer gateway at your end of the VPN connection. *
* * @param customerGatewayId * The ID of the customer gateway at your end of the VPN connection. */ public void setCustomerGatewayId(String customerGatewayId) { this.customerGatewayId = customerGatewayId; } /** ** The ID of the customer gateway at your end of the VPN connection. *
* * @return The ID of the customer gateway at your end of the VPN connection. */ public String getCustomerGatewayId() { return this.customerGatewayId; } /** ** The ID of the customer gateway at your end of the VPN connection. *
* * @param customerGatewayId * The ID of the customer gateway at your end of the VPN connection. * @return Returns a reference to this object so that method calls can be chained together. */ public VpnConnection withCustomerGatewayId(String customerGatewayId) { setCustomerGatewayId(customerGatewayId); return this; } /** *
* The category of the VPN connection. A value of VPN
indicates an Amazon Web Services VPN connection.
* A value of VPN-Classic
indicates an Amazon Web Services Classic VPN connection.
*
VPN
indicates an Amazon Web Services VPN
* connection. A value of VPN-Classic
indicates an Amazon Web Services Classic VPN connection.
*/
public void setCategory(String category) {
this.category = category;
}
/**
*
* The category of the VPN connection. A value of VPN
indicates an Amazon Web Services VPN connection.
* A value of VPN-Classic
indicates an Amazon Web Services Classic VPN connection.
*
VPN
indicates an Amazon Web Services VPN
* connection. A value of VPN-Classic
indicates an Amazon Web Services Classic VPN connection.
*/
public String getCategory() {
return this.category;
}
/**
*
* The category of the VPN connection. A value of VPN
indicates an Amazon Web Services VPN connection.
* A value of VPN-Classic
indicates an Amazon Web Services Classic VPN connection.
*
VPN
indicates an Amazon Web Services VPN
* connection. A value of VPN-Classic
indicates an Amazon Web Services Classic VPN connection.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public VpnConnection withCategory(String category) {
setCategory(category);
return this;
}
/**
* * The current state of the VPN connection. *
* * @param state * The current state of the VPN connection. * @see VpnState */ public void setState(String state) { this.state = state; } /** ** The current state of the VPN connection. *
* * @return The current state of the VPN connection. * @see VpnState */ public String getState() { return this.state; } /** ** The current state of the VPN connection. *
* * @param state * The current state of the VPN connection. * @return Returns a reference to this object so that method calls can be chained together. * @see VpnState */ public VpnConnection withState(String state) { setState(state); return this; } /** ** The current state of the VPN connection. *
* * @param state * The current state of the VPN connection. * @see VpnState */ public void setState(VpnState state) { withState(state); } /** ** The current state of the VPN connection. *
* * @param state * The current state of the VPN connection. * @return Returns a reference to this object so that method calls can be chained together. * @see VpnState */ public VpnConnection withState(VpnState state) { this.state = state.toString(); return this; } /** ** The type of VPN connection. *
* * @param type * The type of VPN connection. * @see GatewayType */ public void setType(String type) { this.type = type; } /** ** The type of VPN connection. *
* * @return The type of VPN connection. * @see GatewayType */ public String getType() { return this.type; } /** ** The type of VPN connection. *
* * @param type * The type of VPN connection. * @return Returns a reference to this object so that method calls can be chained together. * @see GatewayType */ public VpnConnection withType(String type) { setType(type); return this; } /** ** The type of VPN connection. *
* * @param type * The type of VPN connection. * @see GatewayType */ public void setType(GatewayType type) { withType(type); } /** ** The type of VPN connection. *
* * @param type * The type of VPN connection. * @return Returns a reference to this object so that method calls can be chained together. * @see GatewayType */ public VpnConnection withType(GatewayType type) { this.type = type.toString(); return this; } /** ** The ID of the VPN connection. *
* * @param vpnConnectionId * The ID of the VPN connection. */ public void setVpnConnectionId(String vpnConnectionId) { this.vpnConnectionId = vpnConnectionId; } /** ** The ID of the VPN connection. *
* * @return The ID of the VPN connection. */ public String getVpnConnectionId() { return this.vpnConnectionId; } /** ** The ID of the VPN connection. *
* * @param vpnConnectionId * The ID of the VPN connection. * @return Returns a reference to this object so that method calls can be chained together. */ public VpnConnection withVpnConnectionId(String vpnConnectionId) { setVpnConnectionId(vpnConnectionId); return this; } /** ** The ID of the virtual private gateway at the Amazon Web Services side of the VPN connection. *
* * @param vpnGatewayId * The ID of the virtual private gateway at the Amazon Web Services side of the VPN connection. */ public void setVpnGatewayId(String vpnGatewayId) { this.vpnGatewayId = vpnGatewayId; } /** ** The ID of the virtual private gateway at the Amazon Web Services side of the VPN connection. *
* * @return The ID of the virtual private gateway at the Amazon Web Services side of the VPN connection. */ public String getVpnGatewayId() { return this.vpnGatewayId; } /** ** The ID of the virtual private gateway at the Amazon Web Services side of the VPN connection. *
* * @param vpnGatewayId * The ID of the virtual private gateway at the Amazon Web Services side of the VPN connection. * @return Returns a reference to this object so that method calls can be chained together. */ public VpnConnection withVpnGatewayId(String vpnGatewayId) { setVpnGatewayId(vpnGatewayId); return this; } /** ** The ID of the transit gateway associated with the VPN connection. *
* * @param transitGatewayId * The ID of the transit gateway associated with the VPN connection. */ public void setTransitGatewayId(String transitGatewayId) { this.transitGatewayId = transitGatewayId; } /** ** The ID of the transit gateway associated with the VPN connection. *
* * @return The ID of the transit gateway associated with the VPN connection. */ public String getTransitGatewayId() { return this.transitGatewayId; } /** ** The ID of the transit gateway associated with the VPN connection. *
* * @param transitGatewayId * The ID of the transit gateway associated with the VPN connection. * @return Returns a reference to this object so that method calls can be chained together. */ public VpnConnection withTransitGatewayId(String transitGatewayId) { setTransitGatewayId(transitGatewayId); return this; } /** ** The ARN of the core network. *
* * @param coreNetworkArn * The ARN of the core network. */ public void setCoreNetworkArn(String coreNetworkArn) { this.coreNetworkArn = coreNetworkArn; } /** ** The ARN of the core network. *
* * @return The ARN of the core network. */ public String getCoreNetworkArn() { return this.coreNetworkArn; } /** ** The ARN of the core network. *
* * @param coreNetworkArn * The ARN of the core network. * @return Returns a reference to this object so that method calls can be chained together. */ public VpnConnection withCoreNetworkArn(String coreNetworkArn) { setCoreNetworkArn(coreNetworkArn); return this; } /** ** The ARN of the core network attachment. *
* * @param coreNetworkAttachmentArn * The ARN of the core network attachment. */ public void setCoreNetworkAttachmentArn(String coreNetworkAttachmentArn) { this.coreNetworkAttachmentArn = coreNetworkAttachmentArn; } /** ** The ARN of the core network attachment. *
* * @return The ARN of the core network attachment. */ public String getCoreNetworkAttachmentArn() { return this.coreNetworkAttachmentArn; } /** ** The ARN of the core network attachment. *
* * @param coreNetworkAttachmentArn * The ARN of the core network attachment. * @return Returns a reference to this object so that method calls can be chained together. */ public VpnConnection withCoreNetworkAttachmentArn(String coreNetworkAttachmentArn) { setCoreNetworkAttachmentArn(coreNetworkAttachmentArn); return this; } /** ** The current state of the gateway association. *
* * @param gatewayAssociationState * The current state of the gateway association. * @see GatewayAssociationState */ public void setGatewayAssociationState(String gatewayAssociationState) { this.gatewayAssociationState = gatewayAssociationState; } /** ** The current state of the gateway association. *
* * @return The current state of the gateway association. * @see GatewayAssociationState */ public String getGatewayAssociationState() { return this.gatewayAssociationState; } /** ** The current state of the gateway association. *
* * @param gatewayAssociationState * The current state of the gateway association. * @return Returns a reference to this object so that method calls can be chained together. * @see GatewayAssociationState */ public VpnConnection withGatewayAssociationState(String gatewayAssociationState) { setGatewayAssociationState(gatewayAssociationState); return this; } /** ** The current state of the gateway association. *
* * @param gatewayAssociationState * The current state of the gateway association. * @see GatewayAssociationState */ public void setGatewayAssociationState(GatewayAssociationState gatewayAssociationState) { withGatewayAssociationState(gatewayAssociationState); } /** ** The current state of the gateway association. *
* * @param gatewayAssociationState * The current state of the gateway association. * @return Returns a reference to this object so that method calls can be chained together. * @see GatewayAssociationState */ public VpnConnection withGatewayAssociationState(GatewayAssociationState gatewayAssociationState) { this.gatewayAssociationState = gatewayAssociationState.toString(); return this; } /** ** The VPN connection options. *
* * @param options * The VPN connection options. */ public void setOptions(VpnConnectionOptions options) { this.options = options; } /** ** The VPN connection options. *
* * @return The VPN connection options. */ public VpnConnectionOptions getOptions() { return this.options; } /** ** The VPN connection options. *
* * @param options * The VPN connection options. * @return Returns a reference to this object so that method calls can be chained together. */ public VpnConnection withOptions(VpnConnectionOptions options) { setOptions(options); return this; } /** ** The static routes associated with the VPN connection. *
* * @return The static routes associated with the VPN connection. */ public java.util.List* The static routes associated with the VPN connection. *
* * @param routes * The static routes associated with the VPN connection. */ public void setRoutes(java.util.Collection* The static routes associated with the VPN connection. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setRoutes(java.util.Collection)} or {@link #withRoutes(java.util.Collection)} if you want to override the * existing values. *
* * @param routes * The static routes associated with the VPN connection. * @return Returns a reference to this object so that method calls can be chained together. */ public VpnConnection withRoutes(VpnStaticRoute... routes) { if (this.routes == null) { setRoutes(new com.amazonaws.internal.SdkInternalList* The static routes associated with the VPN connection. *
* * @param routes * The static routes associated with the VPN connection. * @return Returns a reference to this object so that method calls can be chained together. */ public VpnConnection withRoutes(java.util.Collection* Any tags assigned to the VPN connection. *
* * @return Any tags assigned to the VPN connection. */ public java.util.List* Any tags assigned to the VPN connection. *
* * @param tags * Any tags assigned to the VPN connection. */ public void setTags(java.util.Collection* Any tags assigned to the VPN connection. *
** 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 VPN connection. * @return Returns a reference to this object so that method calls can be chained together. */ public VpnConnection withTags(Tag... tags) { if (this.tags == null) { setTags(new com.amazonaws.internal.SdkInternalList* Any tags assigned to the VPN connection. *
* * @param tags * Any tags assigned to the VPN connection. * @return Returns a reference to this object so that method calls can be chained together. */ public VpnConnection withTags(java.util.Collection* Information about the VPN tunnel. *
* * @return Information about the VPN tunnel. */ public java.util.List* Information about the VPN tunnel. *
* * @param vgwTelemetry * Information about the VPN tunnel. */ public void setVgwTelemetry(java.util.Collection* Information about the VPN tunnel. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setVgwTelemetry(java.util.Collection)} or {@link #withVgwTelemetry(java.util.Collection)} if you want to * override the existing values. *
* * @param vgwTelemetry * Information about the VPN tunnel. * @return Returns a reference to this object so that method calls can be chained together. */ public VpnConnection withVgwTelemetry(VgwTelemetry... vgwTelemetry) { if (this.vgwTelemetry == null) { setVgwTelemetry(new com.amazonaws.internal.SdkInternalList* Information about the VPN tunnel. *
* * @param vgwTelemetry * Information about the VPN tunnel. * @return Returns a reference to this object so that method calls can be chained together. */ public VpnConnection withVgwTelemetry(java.util.Collection