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 private virtual interface that will be provisioned on a connection.

 
 public class NewPrivateVirtualInterfaceAllocation 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;

    
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 NewPrivateVirtualInterfaceAllocation 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.
        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.
        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.
        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.
        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.
        this. = customerAddress;
        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() );
        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()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof NewPrivateVirtualInterfaceAllocation == 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
        return true;
    }
    
    @Override
        try {
            return (NewPrivateVirtualInterfaceAllocationsuper.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