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;
 

A structure containing information about a new public virtual interface.

 
 public class NewPublicVirtualInterface implements SerializableCloneable {

    
The name of the virtual interface assigned by the customer.

Example: "My VPC"

 
     private String virtualInterfaceName;

    
The VLAN ID.

Example: 101

 
     private Integer vlan;

    
Autonomous system (AS) number for Border Gateway Protocol (BGP) configuration.

Example: 65000

 
     private Integer asn;

    
Authentication key for BGP configuration.

Example: asdf34example

 
     private String authKey;

    
IP address assigned to the Amazon interface.

Example: 192.168.1.1/30

 
     private String amazonAddress;

    
IP address assigned to the customer interface.

Example: 192.168.1.2/30

 
     private String customerAddress;

    
A list of routes to be advertised to the AWS network in this region (public virtual interface) or your VPC (private virtual interface).
 
The name of the virtual interface assigned by the customer.

Example: "My VPC"

Returns:
The name of the virtual interface assigned by the customer.

Example: "My VPC"

 
     public String getVirtualInterfaceName() {
         return ;
     }
    
    
The name of the virtual interface assigned by the customer.

Example: "My VPC"

Parameters:
virtualInterfaceName The name of the virtual interface assigned by the customer.

Example: "My VPC"

 
     public void setVirtualInterfaceName(String virtualInterfaceName) {
         this. = virtualInterfaceName;
     }
    
    
The name of the virtual interface assigned by the customer.

Example: "My VPC"

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

Parameters:
virtualInterfaceName The name of the virtual interface assigned by the customer.

Example: "My VPC"

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

    
The VLAN ID.

Example: 101

Returns:
The VLAN ID.

Example: 101

    public Integer getVlan() {
        return ;
    }
    
    
The VLAN ID.

Example: 101

Parameters:
vlan The VLAN ID.

Example: 101

    public void setVlan(Integer vlan) {
        this. = vlan;
    }
    
    
The VLAN ID.

Example: 101

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

Parameters:
vlan The VLAN ID.

Example: 101

Returns:
A reference to this updated object so that method calls can be chained together.
    public NewPublicVirtualInterface withVlan(Integer vlan) {
        this. = vlan;
        return this;
    }

    
Autonomous system (AS) number for Border Gateway Protocol (BGP) configuration.

Example: 65000

Returns:
Autonomous system (AS) number for Border Gateway Protocol (BGP) configuration.

Example: 65000

    public Integer getAsn() {
        return ;
    }
    
    
Autonomous system (AS) number for Border Gateway Protocol (BGP) configuration.

Example: 65000

Parameters:
asn Autonomous system (AS) number for Border Gateway Protocol (BGP) configuration.

Example: 65000

    public void setAsn(Integer asn) {
        this. = asn;
    }
    
    
Autonomous system (AS) number for Border Gateway Protocol (BGP) configuration.

Example: 65000

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

Parameters:
asn Autonomous system (AS) number for Border Gateway Protocol (BGP) configuration.

Example: 65000

Returns:
A reference to this updated object so that method calls can be chained together.
    public NewPublicVirtualInterface withAsn(Integer asn) {
        this. = asn;
        return this;
    }

    
Authentication key for BGP configuration.

Example: asdf34example

Returns:
Authentication key for BGP configuration.

Example: asdf34example

    public String getAuthKey() {
        return ;
    }
    
    
Authentication key for BGP configuration.

Example: asdf34example

Parameters:
authKey Authentication key for BGP configuration.

Example: asdf34example

    public void setAuthKey(String authKey) {
        this. = authKey;
    }
    
    
Authentication key for BGP configuration.

Example: asdf34example

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

Parameters:
authKey Authentication key for BGP configuration.

Example: asdf34example

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

    
IP address assigned to the Amazon interface.

Example: 192.168.1.1/30

Returns:
IP address assigned to the Amazon interface.

Example: 192.168.1.1/30

    public String getAmazonAddress() {
        return ;
    }
    
    
IP address assigned to the Amazon interface.

Example: 192.168.1.1/30

Parameters:
amazonAddress IP address assigned to the Amazon interface.

Example: 192.168.1.1/30

    public void setAmazonAddress(String amazonAddress) {
        this. = amazonAddress;
    }
    
    
IP address assigned to the Amazon interface.

Example: 192.168.1.1/30

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

Parameters:
amazonAddress IP address assigned to the Amazon interface.

Example: 192.168.1.1/30

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

    
IP address assigned to the customer interface.

Example: 192.168.1.2/30

Returns:
IP address assigned to the customer interface.

Example: 192.168.1.2/30

    public String getCustomerAddress() {
        return ;
    }
    
    
IP address assigned to the customer interface.

Example: 192.168.1.2/30

Parameters:
customerAddress IP address assigned to the customer interface.

Example: 192.168.1.2/30

    public void setCustomerAddress(String customerAddress) {
        this. = customerAddress;
    }
    
    
IP address assigned to the customer interface.

Example: 192.168.1.2/30

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

Parameters:
customerAddress IP address assigned to the customer interface.

Example: 192.168.1.2/30

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

    
A list of routes to be advertised to the AWS network in this region (public virtual interface) or your VPC (private virtual interface).

Returns:
A list of routes to be advertised to the AWS network in this region (public virtual interface) or your VPC (private virtual interface).
        if ( == null) {
              .setAutoConstruct(true);
        }
        return ;
    }
    
    
A list of routes to be advertised to the AWS network in this region (public virtual interface) or your VPC (private virtual interface).

Parameters:
routeFilterPrefixes A list of routes to be advertised to the AWS network in this region (public virtual interface) or your VPC (private virtual interface).
    public void setRouteFilterPrefixes(java.util.Collection<RouteFilterPrefixrouteFilterPrefixes) {
        if (routeFilterPrefixes == null) {
            this. = null;
            return;
        }
        routeFilterPrefixesCopy.addAll(routeFilterPrefixes);
        this. = routeFilterPrefixesCopy;
    }
    
    
A list of routes to be advertised to the AWS network in this region (public virtual interface) or your VPC (private virtual interface).

NOTE: This method appends the values to the existing list (if any). Use setRouteFilterPrefixes(java.util.Collection) or withRouteFilterPrefixes(java.util.Collection) if you want to override the existing values.

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

Parameters:
routeFilterPrefixes A list of routes to be advertised to the AWS network in this region (public virtual interface) or your VPC (private virtual interface).
Returns:
A reference to this updated object so that method calls can be chained together.
    public NewPublicVirtualInterface withRouteFilterPrefixes(RouteFilterPrefix... routeFilterPrefixes) {
        if (getRouteFilterPrefixes() == nullsetRouteFilterPrefixes(new java.util.ArrayList<RouteFilterPrefix>(routeFilterPrefixes.length));
        for (RouteFilterPrefix value : routeFilterPrefixes) {
            getRouteFilterPrefixes().add(value);
        }
        return this;
    }
    
    
A list of routes to be advertised to the AWS network in this region (public virtual interface) or your VPC (private virtual interface).

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

Parameters:
routeFilterPrefixes A list of routes to be advertised to the AWS network in this region (public virtual interface) or your VPC (private virtual interface).
Returns:
A reference to this updated object so that method calls can be chained together.
        if (routeFilterPrefixes == null) {
            this. = null;
        } else {
            com.amazonaws.internal.ListWithAutoConstructFlag<RouteFilterPrefixrouteFilterPrefixesCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<RouteFilterPrefix>(routeFilterPrefixes.size());
            routeFilterPrefixesCopy.addAll(routeFilterPrefixes);
            this. = routeFilterPrefixesCopy;
        }
        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 (getVirtualInterfaceName() != nullsb.append("VirtualInterfaceName: " + getVirtualInterfaceName() + ",");
        if (getVlan() != nullsb.append("Vlan: " + getVlan() + ",");
        if (getAsn() != nullsb.append("Asn: " + getAsn() + ",");
        if (getAuthKey() != nullsb.append("AuthKey: " + getAuthKey() + ",");
        if (getAmazonAddress() != nullsb.append("AmazonAddress: " + getAmazonAddress() + ",");
        if (getCustomerAddress() != nullsb.append("CustomerAddress: " + getCustomerAddress() + ",");
        if (getRouteFilterPrefixes() != nullsb.append("RouteFilterPrefixes: " + getRouteFilterPrefixes() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getVirtualInterfaceName() == null) ? 0 : getVirtualInterfaceName().hashCode()); 
        hashCode = prime * hashCode + ((getVlan() == null) ? 0 : getVlan().hashCode()); 
        hashCode = prime * hashCode + ((getAsn() == null) ? 0 : getAsn().hashCode()); 
        hashCode = prime * hashCode + ((getAuthKey() == null) ? 0 : getAuthKey().hashCode()); 
        hashCode = prime * hashCode + ((getAmazonAddress() == null) ? 0 : getAmazonAddress().hashCode()); 
        hashCode = prime * hashCode + ((getCustomerAddress() == null) ? 0 : getCustomerAddress().hashCode()); 
        hashCode = prime * hashCode + ((getRouteFilterPrefixes() == null) ? 0 : getRouteFilterPrefixes().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof NewPublicVirtualInterface == falsereturn false;
        
        if (other.getVirtualInterfaceName() == null ^ this.getVirtualInterfaceName() == nullreturn false;
        if (other.getVirtualInterfaceName() != null && other.getVirtualInterfaceName().equals(this.getVirtualInterfaceName()) == falsereturn false
        if (other.getVlan() == null ^ this.getVlan() == nullreturn false;
        if (other.getVlan() != null && other.getVlan().equals(this.getVlan()) == falsereturn false
        if (other.getAsn() == null ^ this.getAsn() == nullreturn false;
        if (other.getAsn() != null && other.getAsn().equals(this.getAsn()) == falsereturn false
        if (other.getAuthKey() == null ^ this.getAuthKey() == nullreturn false;
        if (other.getAuthKey() != null && other.getAuthKey().equals(this.getAuthKey()) == falsereturn false
        if (other.getAmazonAddress() == null ^ this.getAmazonAddress() == nullreturn false;
        if (other.getAmazonAddress() != null && other.getAmazonAddress().equals(this.getAmazonAddress()) == falsereturn false
        if (other.getCustomerAddress() == null ^ this.getCustomerAddress() == nullreturn false;
        if (other.getCustomerAddress() != null && other.getCustomerAddress().equals(this.getCustomerAddress()) == falsereturn false
        if (other.getRouteFilterPrefixes() == null ^ this.getRouteFilterPrefixes() == nullreturn false;
        if (other.getRouteFilterPrefixes() != null && other.getRouteFilterPrefixes().equals(this.getRouteFilterPrefixes()) == falsereturn false
        return true;
    }
    
    @Override
    public NewPublicVirtualInterface clone() {
        try {
            return (NewPublicVirtualInterfacesuper.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