/* * 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 virtual private gateway. *
*/ public class VpnGateway implements Serializable { /** * The ID of the virtual private gateway. */ private String vpnGatewayId; /** * The current state of the virtual private gateway. *
* Constraints:
* Allowed Values: pending, available, deleting, deleted
*/
private String state;
/**
* The type of VPN connection the virtual private gateway supports.
*
* Constraints:
* Returns a reference to this object so that method calls can be chained together.
*
* @param vpnGatewayId The ID of the virtual private gateway.
*
* @return A reference to this updated object so that method calls can be chained
* together.
*/
public VpnGateway withVpnGatewayId(String vpnGatewayId) {
this.vpnGatewayId = vpnGatewayId;
return this;
}
/**
* The current state of the virtual private gateway.
*
* 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:
* 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 availabilityZone The Availability Zone where the virtual private gateway was created,
* if applicable. This field may be empty or not returned.
*
* @return A reference to this updated object so that method calls can be chained
* together.
*/
public VpnGateway withAvailabilityZone(String availabilityZone) {
this.availabilityZone = availabilityZone;
return this;
}
/**
* Any VPCs attached to the virtual private gateway.
*
* @return Any VPCs attached to the virtual private gateway.
*/
public java.util.List
* Returns a reference to this object so that method calls can be chained together.
*
* @param vpcAttachments Any VPCs attached to the virtual private gateway.
*
* @return A reference to this updated object so that method calls can be chained
* together.
*/
public VpnGateway withVpcAttachments(VpcAttachment... vpcAttachments) {
if (getVpcAttachments() == null) setVpcAttachments(new java.util.ArrayList
* Returns a reference to this object so that method calls can be chained together.
*
* @param vpcAttachments Any VPCs attached to the virtual private gateway.
*
* @return A reference to this updated object so that method calls can be chained
* together.
*/
public VpnGateway withVpcAttachments(java.util.Collection
* Returns a reference to this object so that method calls can be chained together.
*
* @param tags Any tags assigned to the virtual private gateway.
*
* @return A reference to this updated object so that method calls can be chained
* together.
*/
public VpnGateway 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 virtual private gateway.
*
* @return A reference to this updated object so that method calls can be chained
* together.
*/
public VpnGateway withTags(java.util.Collection
* Allowed Values: ipsec.1
*/
private String type;
/**
* The Availability Zone where the virtual private gateway was created,
* if applicable. This field may be empty or not returned.
*/
private String availabilityZone;
/**
* Any VPCs attached to the virtual private gateway.
*/
private com.amazonaws.internal.ListWithAutoConstructFlag
* Allowed Values: pending, available, deleting, deleted
*
* @return The current state of the virtual private gateway.
*
* @see VpnState
*/
public String getState() {
return state;
}
/**
* The current state of the virtual private gateway.
*
* Allowed Values: pending, available, deleting, deleted
*
* @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.
*
* Allowed Values: pending, available, deleting, deleted
*
* @param state The current state of the virtual private gateway.
*
* @return A reference to this updated object so that method calls can be chained
* together.
*
* @see VpnState
*/
public VpnGateway withState(String state) {
this.state = state;
return this;
}
/**
* The current state of the virtual private gateway.
*
* Allowed Values: pending, available, deleting, deleted
*
* @param state The current state of the virtual private gateway.
*
* @see VpnState
*/
public void setState(VpnState state) {
this.state = state.toString();
}
/**
* The current state of the virtual private gateway.
*
* Allowed Values: pending, available, deleting, deleted
*
* @param state The current state of the virtual private gateway.
*
* @return A reference to this updated 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.
*
* Allowed Values: ipsec.1
*
* @return The type of VPN connection the virtual private gateway supports.
*
* @see GatewayType
*/
public String getType() {
return type;
}
/**
* The type of VPN connection the virtual private gateway supports.
*
* Allowed Values: ipsec.1
*
* @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.
*
* Allowed Values: ipsec.1
*
* @param type The type of VPN connection the virtual private gateway supports.
*
* @return A reference to this updated object so that method calls can be chained
* together.
*
* @see GatewayType
*/
public VpnGateway withType(String type) {
this.type = type;
return this;
}
/**
* The type of VPN connection the virtual private gateway supports.
*
* Allowed Values: ipsec.1
*
* @param type The type of VPN connection the virtual private gateway supports.
*
* @see GatewayType
*/
public void setType(GatewayType type) {
this.type = type.toString();
}
/**
* The type of VPN connection the virtual private gateway supports.
*
* Allowed Values: ipsec.1
*
* @param type The type of VPN connection the virtual private gateway supports.
*
* @return A reference to this updated object so that method calls can be chained
* together.
*
* @see GatewayType
*/
public VpnGateway withType(GatewayType type) {
this.type = type.toString();
return this;
}
/**
* 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 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.
*/
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.
*