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 VpnGateway data type.

 
 public class VpnGateway {

    
Specifies the ID of the VPN gateway.
 
     private String vpnGatewayId;

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

    
Specifies the type of VPN connection the VPN gateway supports.
 
     private String type;

    
Specifies the Availability Zone where the VPN gateway was created.
 
     private String availabilityZone;

    
Contains information about the VPCs attached to the VPN gateway.
 
     private java.util.List<VpcAttachmentvpcAttachments;

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

    
Specifies the ID of the VPN gateway.

Returns:
Specifies the ID of the VPN gateway.
 
     public String getVpnGatewayId() {
         return ;
     }
    
    
Specifies the ID of the VPN gateway.

Parameters:
vpnGatewayId Specifies the ID of the VPN gateway.
 
     public void setVpnGatewayId(String vpnGatewayId) {
         this. = vpnGatewayId;
     }
    
    
Specifies the ID of the VPN gateway.

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

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

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

Parameters:
state Describes the current state of the VPN gateway. Valid values are pending, available, deleting, and deleted.
    public void setState(String state) {
        this. = state;
    }
    
    
Describes the current state of the VPN gateway. 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 gateway. Valid values are pending, available, deleting, and deleted.
Returns:
A reference to this updated object so that method calls can be chained together.
    public VpnGateway withState(String state) {
        this. = state;
        return this;
    }
    
    
    
Specifies the type of VPN connection the VPN gateway supports.

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

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

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

Parameters:
type Specifies the type of VPN connection the VPN gateway supports.
Returns:
A reference to this updated object so that method calls can be chained together.
    public VpnGateway withType(String type) {
        this. = type;
        return this;
    }
    
    
    
Specifies the Availability Zone where the VPN gateway was created.

Returns:
Specifies the Availability Zone where the VPN gateway was created.
    public String getAvailabilityZone() {
        return ;
    }
    
    
Specifies the Availability Zone where the VPN gateway was created.

Parameters:
availabilityZone Specifies the Availability Zone where the VPN gateway was created.
    public void setAvailabilityZone(String availabilityZone) {
        this. = availabilityZone;
    }
    
    
Specifies the Availability Zone where the VPN gateway was created.

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

Parameters:
availabilityZone Specifies the Availability Zone where the VPN gateway was created.
Returns:
A reference to this updated object so that method calls can be chained together.
    public VpnGateway withAvailabilityZone(String availabilityZone) {
        this. = availabilityZone;
        return this;
    }
    
    
    
Contains information about the VPCs attached to the VPN gateway.

Returns:
Contains information about the VPCs attached to the VPN gateway.
        if ( == null) {
             = new java.util.ArrayList<VpcAttachment>();
        }
        return ;
    }
    
    
Contains information about the VPCs attached to the VPN gateway.

Parameters:
vpcAttachments Contains information about the VPCs attached to the VPN gateway.
    public void setVpcAttachments(java.util.Collection<VpcAttachmentvpcAttachments) {
        java.util.List<VpcAttachmentvpcAttachmentsCopy = new java.util.ArrayList<VpcAttachment>();
        if (vpcAttachments != null) {
            vpcAttachmentsCopy.addAll(vpcAttachments);
        }
        this. = vpcAttachmentsCopy;
    }
    
    
Contains information about the VPCs attached to the VPN gateway.

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

Parameters:
vpcAttachments Contains information about the VPCs attached to the VPN gateway.
Returns:
A reference to this updated object so that method calls can be chained together.
    public VpnGateway withVpcAttachments(VpcAttachment... vpcAttachments) {
        for (VpcAttachment value : vpcAttachments) {
            getVpcAttachments().add(value);
        }
        return this;
    }
    
    
Contains information about the VPCs attached to the VPN gateway.

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

Parameters:
vpcAttachments Contains information about the VPCs attached to the VPN gateway.
Returns:
A reference to this updated object so that method calls can be chained together.
    public VpnGateway withVpcAttachments(java.util.Collection<VpcAttachmentvpcAttachments) {
        java.util.List<VpcAttachmentvpcAttachmentsCopy = new java.util.ArrayList<VpcAttachment>();
        if (vpcAttachments != null) {
            vpcAttachmentsCopy.addAll(vpcAttachments);
        }
        this. = vpcAttachmentsCopy;
        return this;
    }
    
    
A list of tags for the VpnGateway.

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

Parameters:
tags A list of tags for the VpnGateway.
    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 VpnGateway.

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

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

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

Parameters:
tags A list of tags for the VpnGateway.
Returns:
A reference to this updated object so that method calls can be chained together.
    public VpnGateway 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("VpnGatewayId: " +  + ", ");
        sb.append("State: " +  + ", ");
        sb.append("Type: " +  + ", ");
        sb.append("AvailabilityZone: " +  + ", ");
        sb.append("VpcAttachments: " +  + ", ");
        sb.append("Tags: " +  + ", ");
        sb.append("}");
        return sb.toString();
    }
    
}
    
New to GrepCode? Check out our FAQ X