Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * Copyright 2010 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;

The VpnConnection data type.

 
 public class VpnConnection {

    
Specifies the ID of the VPN gateway at the VPC end of the VPN connection.
 
     private String vpnConnectionId;

    
Describes the current state of the VPN connection. Valid values are pending, available, deleting, and deleted.
 
     private String state;

    
Contains configuration information in the native XML format for the VPN connection's customer gateway.

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;

    
Specifies the type of VPN connection.
 
     private String type;

    
Specifies ID of the customer gateway at the end of the VPN connection.
 
     private String customerGatewayId;

    
Specfies the ID of the VPN gateway at the VPC end of the VPN connection.
 
     private String vpnGatewayId;

    
A list of tags for the VpnConnection.
 
     private java.util.List<Tagtags;

    
Specifies the ID of the VPN gateway at the VPC end of the VPN connection.

Returns:
Specifies the ID of the VPN gateway at the VPC end of the VPN connection.
 
     public String getVpnConnectionId() {
         return ;
     }
    
    
Specifies the ID of the VPN gateway at the VPC end of the VPN connection.

Parameters:
vpnConnectionId Specifies the ID of the VPN gateway at the VPC end of the VPN connection.
 
     public void setVpnConnectionId(String vpnConnectionId) {
         this. = vpnConnectionId;
     }
    
    
Specifies the ID of the VPN gateway at the VPC end of the VPN connection.

Returns a reference to this object so that method calls can be chained together.

Parameters:
vpnConnectionId Specifies the ID of the VPN gateway at the VPC end of the VPN connection.
Returns:
A reference to this updated object so that method calls can be chained together.
    public VpnConnection withVpnConnectionId(String vpnConnectionId) {
        this. = vpnConnectionId;
        return this;
    }
    
    
    
Describes the current state of the VPN connection. Valid values are pending, available, deleting, and deleted.

Returns:
Describes the current state of the VPN connection. Valid values are pending, available, deleting, and deleted.
    public String getState() {
        return ;
    }
    
    
Describes the current state of the VPN connection. Valid values are pending, available, deleting, and deleted.

Parameters:
state Describes the current state of the VPN connection. Valid values are pending, available, deleting, and deleted.
    public void setState(String state) {
        this. = state;
    }
    
    
Describes the current state of the VPN connection. Valid values are pending, available, deleting, and deleted.

Returns a reference to this object so that method calls can be chained together.

Parameters:
state Describes the current state of the VPN connection. Valid values are pending, available, deleting, and deleted.
Returns:
A reference to this updated object so that method calls can be chained together.
    public VpnConnection withState(String state) {
        this. = state;
        return this;
    }
    
    
    
Contains configuration information in the native XML format for the VPN connection's customer gateway.

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.

Returns:
Contains configuration information in the native XML format for the VPN connection's customer gateway.

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 ;
    }
    
    
Contains configuration information in the native XML format for the VPN connection's customer gateway.

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.

Parameters:
customerGatewayConfiguration Contains configuration information in the native XML format for the VPN connection's customer gateway.

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;
    }
    
    
Contains configuration information in the native XML format for the VPN connection's customer gateway.

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.

Returns a reference to this object so that method calls can be chained together.

Parameters:
customerGatewayConfiguration Contains configuration information in the native XML format for the VPN connection's customer gateway.

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.

Returns:
A reference to this updated object so that method calls can be chained together.
    public VpnConnection withCustomerGatewayConfiguration(String customerGatewayConfiguration) {
        this. = customerGatewayConfiguration;
        return this;
    }
    
    
    
Specifies the type of VPN connection.

Returns:
Specifies the type of VPN connection.
    public String getType() {
        return ;
    }
    
    
Specifies the type of VPN connection.

Parameters:
type Specifies the type of VPN connection.
    public void setType(String type) {
        this. = type;
    }
    
    
Specifies the type of VPN connection.

Returns a reference to this object so that method calls can be chained together.

Parameters:
type Specifies the type of VPN connection.
Returns:
A reference to this updated object so that method calls can be chained together.
    public VpnConnection withType(String type) {
        this. = type;
        return this;
    }
    
    
    
Specifies ID of the customer gateway at the end of the VPN connection.

Returns:
Specifies ID of the customer gateway at the end of the VPN connection.
    public String getCustomerGatewayId() {
        return ;
    }
    
    
Specifies ID of the customer gateway at the end of the VPN connection.

Parameters:
customerGatewayId Specifies ID of the customer gateway at the end of the VPN connection.
    public void setCustomerGatewayId(String customerGatewayId) {
        this. = customerGatewayId;
    }
    
    
Specifies ID of the customer gateway at the end of the VPN connection.

Returns a reference to this object so that method calls can be chained together.

Parameters:
customerGatewayId Specifies ID of the customer gateway at the end of the VPN connection.
Returns:
A reference to this updated object so that method calls can be chained together.
    public VpnConnection withCustomerGatewayId(String customerGatewayId) {
        this. = customerGatewayId;
        return this;
    }
    
    
    
Specfies the ID of the VPN gateway at the VPC end of the VPN connection.

Returns:
Specfies the ID of the VPN gateway at the VPC end of the VPN connection.
    public String getVpnGatewayId() {
        return ;
    }
    
    
Specfies the ID of the VPN gateway at the VPC end of the VPN connection.

Parameters:
vpnGatewayId Specfies the ID of the VPN gateway at the VPC end of the VPN connection.
    public void setVpnGatewayId(String vpnGatewayId) {
        this. = vpnGatewayId;
    }
    
    
Specfies the ID of the VPN gateway at the VPC end of the VPN connection.

Returns a reference to this object so that method calls can be chained together.

Parameters:
vpnGatewayId Specfies the ID of the VPN gateway at the VPC end of the VPN connection.
Returns:
A reference to this updated object so that method calls can be chained together.
    public VpnConnection withVpnGatewayId(String vpnGatewayId) {
        this. = vpnGatewayId;
        return this;
    }
    
    
    
A list of tags for the VpnConnection.

Returns:
A list of tags for the VpnConnection.
    public java.util.List<TaggetTags() {
        if ( == null) {
             = new java.util.ArrayList<Tag>();
        }
        return ;
    }
    
    
A list of tags for the VpnConnection.

Parameters:
tags A list of tags for the VpnConnection.
    public void setTags(java.util.Collection<Tagtags) {
        java.util.List<TagtagsCopy = new java.util.ArrayList<Tag>();
        if (tags != null) {
            tagsCopy.addAll(tags);
        }
        this. = tagsCopy;
    }
    
    
A list of tags for the VpnConnection.

Returns a reference to this object so that method calls can be chained together.

Parameters:
tags A list of tags for the VpnConnection.
Returns:
A reference to this updated object so that method calls can be chained together.
    public VpnConnection withTags(Tag... tags) {
        for (Tag value : tags) {
            getTags().add(value);
        }
        return this;
    }
    
    
A list of tags for the VpnConnection.

Returns a reference to this object so that method calls can be chained together.

Parameters:
tags A list of tags for the VpnConnection.
Returns:
A reference to this updated object so that method calls can be chained together.
    public VpnConnection withTags(java.util.Collection<Tagtags) {
        java.util.List<TagtagsCopy = new java.util.ArrayList<Tag>();
        if (tags != null) {
            tagsCopy.addAll(tags);
        }
        this. = tagsCopy;
        return this;
    }
    
    
Returns a string representation of this object; useful for testing and debugging.

Returns:
A string representation of this object.
See also:
java.lang.Object.toString()
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("{");
        sb.append("VpnConnectionId: " +  + ", ");
        sb.append("State: " +  + ", ");
        sb.append("CustomerGatewayConfiguration: " +  + ", ");
        sb.append("Type: " +  + ", ");
        sb.append("CustomerGatewayId: " +  + ", ");
        sb.append("VpnGatewayId: " +  + ", ");
        sb.append("Tags: " +  + ", ");
        sb.append("}");
        return sb.toString();
    }
    
}
    
New to GrepCode? Check out our FAQ X