Start line:  
End line:  

Snippet Preview

Snippet HTML Code

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

You can create one or more AWS Direct Connect private virtual interfaces linking to your virtual private gateway.

Virtual private gateways can be managed using the Amazon Virtual Private Cloud (Amazon VPC) console or the Amazon EC2 CreateVpnGateway action .

 
 public class VirtualGateway implements SerializableCloneable {

    
The ID of the virtual private gateway to a VPC. This only applies to private virtual interfaces.

Example: vgw-123er56

 
     private String virtualGatewayId;

    
State of the virtual private gateway.
  • Pending: This is the initial state after calling CreateVpnGateway.
  • Available: Ready for use by a private virtual interface.
  • Deleting: This is the initial state after calling DeleteVpnGateway.
  • Deleted: In this state, a private virtual interface is unable to send traffic over this gateway.
 
     private String virtualGatewayState;

    
The ID of the virtual private gateway to a VPC. This only applies to private virtual interfaces.

Example: vgw-123er56

Returns:
The ID of the virtual private gateway to a VPC. This only applies to private virtual interfaces.

Example: vgw-123er56

 
     public String getVirtualGatewayId() {
         return ;
     }
    
    
The ID of the virtual private gateway to a VPC. This only applies to private virtual interfaces.

Example: vgw-123er56

Parameters:
virtualGatewayId The ID of the virtual private gateway to a VPC. This only applies to private virtual interfaces.

Example: vgw-123er56

 
     public void setVirtualGatewayId(String virtualGatewayId) {
         this. = virtualGatewayId;
     }
    
    
The ID of the virtual private gateway to a VPC. This only applies to private virtual interfaces.

Example: vgw-123er56

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

Parameters:
virtualGatewayId The ID of the virtual private gateway to a VPC. This only applies to private virtual interfaces.

Example: vgw-123er56

Returns:
A reference to this updated object so that method calls can be chained together.
 
     public VirtualGateway withVirtualGatewayId(String virtualGatewayId) {
         this. = virtualGatewayId;
         return this;
     }

    
State of the virtual private gateway.
  • Pending: This is the initial state after calling CreateVpnGateway.
  • Available: Ready for use by a private virtual interface.
  • Deleting: This is the initial state after calling DeleteVpnGateway.
  • Deleted: In this state, a private virtual interface is unable to send traffic over this gateway.

Returns:
State of the virtual private gateway.
  • Pending: This is the initial state after calling CreateVpnGateway.
  • Available: Ready for use by a private virtual interface.
  • Deleting: This is the initial state after calling DeleteVpnGateway.
  • Deleted: In this state, a private virtual interface is unable to send traffic over this gateway.
    public String getVirtualGatewayState() {
        return ;
    }
    
    
State of the virtual private gateway.
  • Pending: This is the initial state after calling CreateVpnGateway.
  • Available: Ready for use by a private virtual interface.
  • Deleting: This is the initial state after calling DeleteVpnGateway.
  • Deleted: In this state, a private virtual interface is unable to send traffic over this gateway.

Parameters:
virtualGatewayState State of the virtual private gateway.
  • Pending: This is the initial state after calling CreateVpnGateway.
  • Available: Ready for use by a private virtual interface.
  • Deleting: This is the initial state after calling DeleteVpnGateway.
  • Deleted: In this state, a private virtual interface is unable to send traffic over this gateway.
    public void setVirtualGatewayState(String virtualGatewayState) {
        this. = virtualGatewayState;
    }
    
    
State of the virtual private gateway.
  • Pending: This is the initial state after calling CreateVpnGateway.
  • Available: Ready for use by a private virtual interface.
  • Deleting: This is the initial state after calling DeleteVpnGateway.
  • Deleted: In this state, a private virtual interface is unable to send traffic over this gateway.

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

Parameters:
virtualGatewayState State of the virtual private gateway.
  • Pending: This is the initial state after calling CreateVpnGateway.
  • Available: Ready for use by a private virtual interface.
  • Deleting: This is the initial state after calling DeleteVpnGateway.
  • Deleted: In this state, a private virtual interface is unable to send traffic over this gateway.
Returns:
A reference to this updated object so that method calls can be chained together.
    public VirtualGateway withVirtualGatewayState(String virtualGatewayState) {
        this. = virtualGatewayState;
        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("{");
        if (getVirtualGatewayId() != nullsb.append("VirtualGatewayId: " + getVirtualGatewayId() + ",");
        if (getVirtualGatewayState() != nullsb.append("VirtualGatewayState: " + getVirtualGatewayState() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getVirtualGatewayId() == null) ? 0 : getVirtualGatewayId().hashCode()); 
        hashCode = prime * hashCode + ((getVirtualGatewayState() == null) ? 0 : getVirtualGatewayState().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof VirtualGateway == falsereturn false;
        VirtualGateway other = (VirtualGateway)obj;
        
        if (other.getVirtualGatewayId() == null ^ this.getVirtualGatewayId() == nullreturn false;
        if (other.getVirtualGatewayId() != null && other.getVirtualGatewayId().equals(this.getVirtualGatewayId()) == falsereturn false
        if (other.getVirtualGatewayState() == null ^ this.getVirtualGatewayState() == nullreturn false;
        if (other.getVirtualGatewayState() != null && other.getVirtualGatewayState().equals(this.getVirtualGatewayState()) == falsereturn false
        return true;
    }
    
    @Override
    public VirtualGateway clone() {
        try {
            return (VirtualGatewaysuper.clone();
        
        } catch (CloneNotSupportedException e) {
            throw new IllegalStateException(
                    "Got a CloneNotSupportedException from Object.clone() "
                    + "even though we're Cloneable!",
                    e);
        }
        
    }
}
    
New to GrepCode? Check out our FAQ X