/* * Copyright 2010-2018 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; /** *
* Describes a VPN connection. *
*/ public class VpnConnection implements Serializable { /** * The ID of the VPN connection. */ private String vpnConnectionId; /** * The current state of the VPN connection. *
* Constraints:
* Allowed Values: pending, available, deleting, deleted
*/
private String state;
/**
* 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.
*/
private String customerGatewayConfiguration;
/**
* The type of VPN connection.
*
* Constraints:
* Returns a reference to this object so that method calls can be chained together.
*
* @param vpnConnectionId The ID of the VPN connection.
*
* @return A reference to this updated object so that method calls can be chained
* together.
*/
public VpnConnection withVpnConnectionId(String vpnConnectionId) {
this.vpnConnectionId = vpnConnectionId;
return this;
}
/**
* The current state of the VPN connection.
*
* Constraints:
* Constraints:
* Returns a reference to this object so that method calls can be chained together.
*
* Constraints:
* Constraints:
* Returns a reference to this object so that method calls can be chained together.
*
* Constraints:
* Returns a reference to this object so that method calls can be chained together.
*
* @param 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
* Constraints:
* Constraints:
* Returns a reference to this object so that method calls can be chained together.
*
* Constraints:
* Constraints:
* Returns a reference to this object so that method calls can be chained together.
*
* Constraints:
* Returns a reference to this object so that method calls can be chained together.
*
* @param customerGatewayId The ID of the customer gateway at your end of the VPN connection.
*
* @return A reference to this updated object so that method calls can be chained
* together.
*/
public VpnConnection withCustomerGatewayId(String customerGatewayId) {
this.customerGatewayId = customerGatewayId;
return this;
}
/**
* The ID of the virtual private gateway at the AWS side of the VPN
* connection.
*
* @return The ID of the virtual private gateway at the AWS side of the VPN
* connection.
*/
public String getVpnGatewayId() {
return vpnGatewayId;
}
/**
* The ID of the virtual private gateway at the AWS side of the VPN
* connection.
*
* @param vpnGatewayId The ID of the virtual private gateway at the AWS side of the VPN
* connection.
*/
public void setVpnGatewayId(String vpnGatewayId) {
this.vpnGatewayId = vpnGatewayId;
}
/**
* The ID of the virtual private gateway at the AWS side of the VPN
* connection.
*
* Returns a reference to this object so that method calls can be chained together.
*
* @param vpnGatewayId The ID of the virtual private gateway at the AWS side of the VPN
* connection.
*
* @return A reference to this updated object so that method calls can be chained
* together.
*/
public VpnConnection withVpnGatewayId(String vpnGatewayId) {
this.vpnGatewayId = vpnGatewayId;
return this;
}
/**
* Any tags assigned to the VPN connection.
*
* @return Any tags assigned to the VPN connection.
*/
public java.util.List
* Returns a reference to this object so that method calls can be chained together.
*
* @param tags Any tags assigned to the VPN connection.
*
* @return A reference to this updated object so that method calls can be chained
* together.
*/
public VpnConnection withTags(Tag... tags) {
if (getTags() == null) setTags(new java.util.ArrayList
* Returns a reference to this object so that method calls can be chained together.
*
* @param tags Any tags assigned to the VPN connection.
*
* @return A reference to this updated object so that method calls can be chained
* together.
*/
public VpnConnection withTags(java.util.Collection
* Returns a reference to this object so that method calls can be chained together.
*
* @param vgwTelemetry Information about the VPN tunnel.
*
* @return A reference to this updated object so that method calls can be chained
* together.
*/
public VpnConnection withVgwTelemetry(VgwTelemetry... vgwTelemetry) {
if (getVgwTelemetry() == null) setVgwTelemetry(new java.util.ArrayList
* Returns a reference to this object so that method calls can be chained together.
*
* @param vgwTelemetry Information about the VPN tunnel.
*
* @return A reference to this updated object so that method calls can be chained
* together.
*/
public VpnConnection withVgwTelemetry(java.util.Collection
* Returns a reference to this object so that method calls can be chained together.
*
* @param options The VPN connection options.
*
* @return A reference to this updated object so that method calls can be chained
* together.
*/
public VpnConnection withOptions(VpnConnectionOptions options) {
this.options = options;
return this;
}
/**
* The static routes associated with the VPN connection.
*
* @return The static routes associated with the VPN connection.
*/
public java.util.List
* Returns a reference to this object so that method calls can be chained together.
*
* @param routes The static routes associated with the VPN connection.
*
* @return A reference to this updated object so that method calls can be chained
* together.
*/
public VpnConnection withRoutes(VpnStaticRoute... routes) {
if (getRoutes() == null) setRoutes(new java.util.ArrayList
* Returns a reference to this object so that method calls can be chained together.
*
* @param routes The static routes associated with the VPN connection.
*
* @return A reference to this updated object so that method calls can be chained
* together.
*/
public VpnConnection withRoutes(java.util.Collection
* Allowed Values: ipsec.1
*/
private String type;
/**
* The ID of the customer gateway at your end of the VPN connection.
*/
private String customerGatewayId;
/**
* The ID of the virtual private gateway at the AWS side of the VPN
* connection.
*/
private String vpnGatewayId;
/**
* Any tags assigned to the VPN connection.
*/
private com.amazonaws.internal.ListWithAutoConstructFlag
* Allowed Values: pending, available, deleting, deleted
*
* @return The current state of the VPN connection.
*
* @see VpnState
*/
public String getState() {
return state;
}
/**
* The current state of the VPN connection.
*
* Allowed Values: pending, available, deleting, deleted
*
* @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.
*
* Allowed Values: pending, available, deleting, deleted
*
* @param state The current state of the VPN connection.
*
* @return A reference to this updated object so that method calls can be chained
* together.
*
* @see VpnState
*/
public VpnConnection withState(String state) {
this.state = state;
return this;
}
/**
* The current state of the VPN connection.
*
* Allowed Values: pending, available, deleting, deleted
*
* @param state The current state of the VPN connection.
*
* @see VpnState
*/
public void setState(VpnState state) {
this.state = state.toString();
}
/**
* The current state of the VPN connection.
*
* Allowed Values: pending, available, deleting, deleted
*
* @param state The current state of the VPN connection.
*
* @return A reference to this updated object so that method calls can be chained
* together.
*
* @see VpnState
*/
public VpnConnection withState(VpnState state) {
this.state = state.toString();
return this;
}
/**
* 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.
*
* @return 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.
*/
public String getCustomerGatewayConfiguration() {
return 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.
*
* @param 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.
*/
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.
*
* @return A reference to this updated object so that method calls can be chained
* together.
*/
public VpnConnection withCustomerGatewayConfiguration(String customerGatewayConfiguration) {
this.customerGatewayConfiguration = customerGatewayConfiguration;
return this;
}
/**
* The type of VPN connection.
*
* Allowed Values: ipsec.1
*
* @return The type of VPN connection.
*
* @see GatewayType
*/
public String getType() {
return type;
}
/**
* The type of VPN connection.
*
* Allowed Values: ipsec.1
*
* @param type The type of VPN connection.
*
* @see GatewayType
*/
public void setType(String type) {
this.type = type;
}
/**
* The type of VPN connection.
*
* Allowed Values: ipsec.1
*
* @param type The type of VPN connection.
*
* @return A reference to this updated object so that method calls can be chained
* together.
*
* @see GatewayType
*/
public VpnConnection withType(String type) {
this.type = type;
return this;
}
/**
* The type of VPN connection.
*
* Allowed Values: ipsec.1
*
* @param type The type of VPN connection.
*
* @see GatewayType
*/
public void setType(GatewayType type) {
this.type = type.toString();
}
/**
* The type of VPN connection.
*
* Allowed Values: ipsec.1
*
* @param type The type of VPN connection.
*
* @return A reference to this updated 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 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 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.
*/
public void setCustomerGatewayId(String customerGatewayId) {
this.customerGatewayId = customerGatewayId;
}
/**
* The ID of the customer gateway at your end of the VPN connection.
*