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 connection represents the physical network connection between the AWS Direct Connect location and the customer.

 
 public class CreateConnectionResult implements SerializableCloneable {
 
     private String ownerAccount;

    
ID of the connection.

Example: dxcon-fg5678gh

Default: None

 
     private String connectionId;

    
The name of the connection.

Example: "1G Connection to AWS"

Default: None

 
     private String connectionName;

    
State of the connection.
  • Ordering: The initial state of a hosted connection provisioned on an interconnect. The connection stays in the ordering state until the owner of the hosted connection confirms or declines the connection order.
  • Requested: The initial state of a standard connection. The connection stays in the requested state until the Letter of Authorization (LOA) is sent to the customer.
  • Pending: The connection has been approved, and is being initialized.
  • Available: The network link is up, and the connection is ready for use.
  • Down: The network link is down.
  • Deleted: The connection has been deleted.
  • Rejected: A hosted connection in the 'Ordering' state will enter the 'Rejected' state if it is deleted by the end customer.

Constraints:
Allowed Values: ordering, requested, pending, available, down, deleting, deleted, rejected

 
     private String connectionState;

    
The AWS region where the connection is located.

Example: us-east-1

Default: None

 
     private String region;

    
Where the connection is located.

Example: EqSV5

Default: None

 
     private String location;

    
Bandwidth of the connection.

Example: 1Gbps

Default: None

 
     private String bandwidth;

    
The VLAN ID.

Example: 101

 
     private Integer vlan;
 
     private String partnerName;

    
Returns the value of the OwnerAccount property for this object.

Returns:
The value of the OwnerAccount property for this object.
 
     public String getOwnerAccount() {
         return ;
     }
    
    
Sets the value of the OwnerAccount property for this object.

Parameters:
ownerAccount The new value for the OwnerAccount property for this object.
 
     public void setOwnerAccount(String ownerAccount) {
         this. = ownerAccount;
     }
    
    
Sets the value of the OwnerAccount property for this object.

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

Parameters:
ownerAccount The new value for the OwnerAccount property for this object.
Returns:
A reference to this updated object so that method calls can be chained together.
    public CreateConnectionResult withOwnerAccount(String ownerAccount) {
        this. = ownerAccount;
        return this;
    }

    
ID of the connection.

Example: dxcon-fg5678gh

Default: None

Returns:
ID of the connection.

Example: dxcon-fg5678gh

Default: None

    public String getConnectionId() {
        return ;
    }
    
    
ID of the connection.

Example: dxcon-fg5678gh

Default: None

Parameters:
connectionId ID of the connection.

Example: dxcon-fg5678gh

Default: None

    public void setConnectionId(String connectionId) {
        this. = connectionId;
    }
    
    
ID of the connection.

Example: dxcon-fg5678gh

Default: None

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

Parameters:
connectionId ID of the connection.

Example: dxcon-fg5678gh

Default: None

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

    
The name of the connection.

Example: "1G Connection to AWS"

Default: None

Returns:
The name of the connection.

Example: "1G Connection to AWS"

Default: None

    public String getConnectionName() {
        return ;
    }
    
    
The name of the connection.

Example: "1G Connection to AWS"

Default: None

Parameters:
connectionName The name of the connection.

Example: "1G Connection to AWS"

Default: None

    public void setConnectionName(String connectionName) {
        this. = connectionName;
    }
    
    
The name of the connection.

Example: "1G Connection to AWS"

Default: None

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

Parameters:
connectionName The name of the connection.

Example: "1G Connection to AWS"

Default: None

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

    
State of the connection.
  • Ordering: The initial state of a hosted connection provisioned on an interconnect. The connection stays in the ordering state until the owner of the hosted connection confirms or declines the connection order.
  • Requested: The initial state of a standard connection. The connection stays in the requested state until the Letter of Authorization (LOA) is sent to the customer.
  • Pending: The connection has been approved, and is being initialized.
  • Available: The network link is up, and the connection is ready for use.
  • Down: The network link is down.
  • Deleted: The connection has been deleted.
  • Rejected: A hosted connection in the 'Ordering' state will enter the 'Rejected' state if it is deleted by the end customer.

Constraints:
Allowed Values: ordering, requested, pending, available, down, deleting, deleted, rejected

Returns:
State of the connection.
  • Ordering: The initial state of a hosted connection provisioned on an interconnect. The connection stays in the ordering state until the owner of the hosted connection confirms or declines the connection order.
  • Requested: The initial state of a standard connection. The connection stays in the requested state until the Letter of Authorization (LOA) is sent to the customer.
  • Pending: The connection has been approved, and is being initialized.
  • Available: The network link is up, and the connection is ready for use.
  • Down: The network link is down.
  • Deleted: The connection has been deleted.
  • Rejected: A hosted connection in the 'Ordering' state will enter the 'Rejected' state if it is deleted by the end customer.
See also:
ConnectionState
    public String getConnectionState() {
        return ;
    }
    
    
State of the connection.
  • Ordering: The initial state of a hosted connection provisioned on an interconnect. The connection stays in the ordering state until the owner of the hosted connection confirms or declines the connection order.
  • Requested: The initial state of a standard connection. The connection stays in the requested state until the Letter of Authorization (LOA) is sent to the customer.
  • Pending: The connection has been approved, and is being initialized.
  • Available: The network link is up, and the connection is ready for use.
  • Down: The network link is down.
  • Deleted: The connection has been deleted.
  • Rejected: A hosted connection in the 'Ordering' state will enter the 'Rejected' state if it is deleted by the end customer.

Constraints:
Allowed Values: ordering, requested, pending, available, down, deleting, deleted, rejected

Parameters:
connectionState State of the connection.
  • Ordering: The initial state of a hosted connection provisioned on an interconnect. The connection stays in the ordering state until the owner of the hosted connection confirms or declines the connection order.
  • Requested: The initial state of a standard connection. The connection stays in the requested state until the Letter of Authorization (LOA) is sent to the customer.
  • Pending: The connection has been approved, and is being initialized.
  • Available: The network link is up, and the connection is ready for use.
  • Down: The network link is down.
  • Deleted: The connection has been deleted.
  • Rejected: A hosted connection in the 'Ordering' state will enter the 'Rejected' state if it is deleted by the end customer.
See also:
ConnectionState
    public void setConnectionState(String connectionState) {
        this. = connectionState;
    }
    
    
State of the connection.
  • Ordering: The initial state of a hosted connection provisioned on an interconnect. The connection stays in the ordering state until the owner of the hosted connection confirms or declines the connection order.
  • Requested: The initial state of a standard connection. The connection stays in the requested state until the Letter of Authorization (LOA) is sent to the customer.
  • Pending: The connection has been approved, and is being initialized.
  • Available: The network link is up, and the connection is ready for use.
  • Down: The network link is down.
  • Deleted: The connection has been deleted.
  • Rejected: A hosted connection in the 'Ordering' state will enter the 'Rejected' state if it is deleted by the end customer.

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

Constraints:
Allowed Values: ordering, requested, pending, available, down, deleting, deleted, rejected

Parameters:
connectionState State of the connection.
  • Ordering: The initial state of a hosted connection provisioned on an interconnect. The connection stays in the ordering state until the owner of the hosted connection confirms or declines the connection order.
  • Requested: The initial state of a standard connection. The connection stays in the requested state until the Letter of Authorization (LOA) is sent to the customer.
  • Pending: The connection has been approved, and is being initialized.
  • Available: The network link is up, and the connection is ready for use.
  • Down: The network link is down.
  • Deleted: The connection has been deleted.
  • Rejected: A hosted connection in the 'Ordering' state will enter the 'Rejected' state if it is deleted by the end customer.
Returns:
A reference to this updated object so that method calls can be chained together.
See also:
ConnectionState
    public CreateConnectionResult withConnectionState(String connectionState) {
        this. = connectionState;
        return this;
    }

    
State of the connection.
  • Ordering: The initial state of a hosted connection provisioned on an interconnect. The connection stays in the ordering state until the owner of the hosted connection confirms or declines the connection order.
  • Requested: The initial state of a standard connection. The connection stays in the requested state until the Letter of Authorization (LOA) is sent to the customer.
  • Pending: The connection has been approved, and is being initialized.
  • Available: The network link is up, and the connection is ready for use.
  • Down: The network link is down.
  • Deleted: The connection has been deleted.
  • Rejected: A hosted connection in the 'Ordering' state will enter the 'Rejected' state if it is deleted by the end customer.

Constraints:
Allowed Values: ordering, requested, pending, available, down, deleting, deleted, rejected

Parameters:
connectionState State of the connection.
  • Ordering: The initial state of a hosted connection provisioned on an interconnect. The connection stays in the ordering state until the owner of the hosted connection confirms or declines the connection order.
  • Requested: The initial state of a standard connection. The connection stays in the requested state until the Letter of Authorization (LOA) is sent to the customer.
  • Pending: The connection has been approved, and is being initialized.
  • Available: The network link is up, and the connection is ready for use.
  • Down: The network link is down.
  • Deleted: The connection has been deleted.
  • Rejected: A hosted connection in the 'Ordering' state will enter the 'Rejected' state if it is deleted by the end customer.
See also:
ConnectionState
    public void setConnectionState(ConnectionState connectionState) {
        this. = connectionState.toString();
    }
    
    
State of the connection.
  • Ordering: The initial state of a hosted connection provisioned on an interconnect. The connection stays in the ordering state until the owner of the hosted connection confirms or declines the connection order.
  • Requested: The initial state of a standard connection. The connection stays in the requested state until the Letter of Authorization (LOA) is sent to the customer.
  • Pending: The connection has been approved, and is being initialized.
  • Available: The network link is up, and the connection is ready for use.
  • Down: The network link is down.
  • Deleted: The connection has been deleted.
  • Rejected: A hosted connection in the 'Ordering' state will enter the 'Rejected' state if it is deleted by the end customer.

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

Constraints:
Allowed Values: ordering, requested, pending, available, down, deleting, deleted, rejected

Parameters:
connectionState State of the connection.
  • Ordering: The initial state of a hosted connection provisioned on an interconnect. The connection stays in the ordering state until the owner of the hosted connection confirms or declines the connection order.
  • Requested: The initial state of a standard connection. The connection stays in the requested state until the Letter of Authorization (LOA) is sent to the customer.
  • Pending: The connection has been approved, and is being initialized.
  • Available: The network link is up, and the connection is ready for use.
  • Down: The network link is down.
  • Deleted: The connection has been deleted.
  • Rejected: A hosted connection in the 'Ordering' state will enter the 'Rejected' state if it is deleted by the end customer.
Returns:
A reference to this updated object so that method calls can be chained together.
See also:
ConnectionState
    public CreateConnectionResult withConnectionState(ConnectionState connectionState) {
        this. = connectionState.toString();
        return this;
    }

    
The AWS region where the connection is located.

Example: us-east-1

Default: None

Returns:
The AWS region where the connection is located.

Example: us-east-1

Default: None

    public String getRegion() {
        return ;
    }
    
    
The AWS region where the connection is located.

Example: us-east-1

Default: None

Parameters:
region The AWS region where the connection is located.

Example: us-east-1

Default: None

    public void setRegion(String region) {
        this. = region;
    }
    
    
The AWS region where the connection is located.

Example: us-east-1

Default: None

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

Parameters:
region The AWS region where the connection is located.

Example: us-east-1

Default: None

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

    
Where the connection is located.

Example: EqSV5

Default: None

Returns:
Where the connection is located.

Example: EqSV5

Default: None

    public String getLocation() {
        return ;
    }
    
    
Where the connection is located.

Example: EqSV5

Default: None

Parameters:
location Where the connection is located.

Example: EqSV5

Default: None

    public void setLocation(String location) {
        this. = location;
    }
    
    
Where the connection is located.

Example: EqSV5

Default: None

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

Parameters:
location Where the connection is located.

Example: EqSV5

Default: None

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

    
Bandwidth of the connection.

Example: 1Gbps

Default: None

Returns:
Bandwidth of the connection.

Example: 1Gbps

Default: None

    public String getBandwidth() {
        return ;
    }
    
    
Bandwidth of the connection.

Example: 1Gbps

Default: None

Parameters:
bandwidth Bandwidth of the connection.

Example: 1Gbps

Default: None

    public void setBandwidth(String bandwidth) {
        this. = bandwidth;
    }
    
    
Bandwidth of the connection.

Example: 1Gbps

Default: None

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

Parameters:
bandwidth Bandwidth of the connection.

Example: 1Gbps

Default: None

Returns:
A reference to this updated object so that method calls can be chained together.
    public CreateConnectionResult withBandwidth(String bandwidth) {
        this. = bandwidth;
        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 CreateConnectionResult withVlan(Integer vlan) {
        this. = vlan;
        return this;
    }

    
Returns the value of the PartnerName property for this object.

Returns:
The value of the PartnerName property for this object.
    public String getPartnerName() {
        return ;
    }
    
    
Sets the value of the PartnerName property for this object.

Parameters:
partnerName The new value for the PartnerName property for this object.
    public void setPartnerName(String partnerName) {
        this. = partnerName;
    }
    
    
Sets the value of the PartnerName property for this object.

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

Parameters:
partnerName The new value for the PartnerName property for this object.
Returns:
A reference to this updated object so that method calls can be chained together.
    public CreateConnectionResult withPartnerName(String partnerName) {
        this. = partnerName;
        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 (getOwnerAccount() != nullsb.append("OwnerAccount: " + getOwnerAccount() + ",");
        if (getConnectionId() != nullsb.append("ConnectionId: " + getConnectionId() + ",");
        if (getConnectionName() != nullsb.append("ConnectionName: " + getConnectionName() + ",");
        if (getConnectionState() != nullsb.append("ConnectionState: " + getConnectionState() + ",");
        if (getRegion() != nullsb.append("Region: " + getRegion() + ",");
        if (getLocation() != nullsb.append("Location: " + getLocation() + ",");
        if (getBandwidth() != nullsb.append("Bandwidth: " + getBandwidth() + ",");
        if (getVlan() != nullsb.append("Vlan: " + getVlan() + ",");
        if (getPartnerName() != nullsb.append("PartnerName: " + getPartnerName() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getOwnerAccount() == null) ? 0 : getOwnerAccount().hashCode()); 
        hashCode = prime * hashCode + ((getConnectionId() == null) ? 0 : getConnectionId().hashCode()); 
        hashCode = prime * hashCode + ((getConnectionName() == null) ? 0 : getConnectionName().hashCode()); 
        hashCode = prime * hashCode + ((getConnectionState() == null) ? 0 : getConnectionState().hashCode()); 
        hashCode = prime * hashCode + ((getRegion() == null) ? 0 : getRegion().hashCode()); 
        hashCode = prime * hashCode + ((getLocation() == null) ? 0 : getLocation().hashCode()); 
        hashCode = prime * hashCode + ((getBandwidth() == null) ? 0 : getBandwidth().hashCode()); 
        hashCode = prime * hashCode + ((getVlan() == null) ? 0 : getVlan().hashCode()); 
        hashCode = prime * hashCode + ((getPartnerName() == null) ? 0 : getPartnerName().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof CreateConnectionResult == falsereturn false;
        CreateConnectionResult other = (CreateConnectionResult)obj;
        
        if (other.getOwnerAccount() == null ^ this.getOwnerAccount() == nullreturn false;
        if (other.getOwnerAccount() != null && other.getOwnerAccount().equals(this.getOwnerAccount()) == falsereturn false
        if (other.getConnectionId() == null ^ this.getConnectionId() == nullreturn false;
        if (other.getConnectionId() != null && other.getConnectionId().equals(this.getConnectionId()) == falsereturn false
        if (other.getConnectionName() == null ^ this.getConnectionName() == nullreturn false;
        if (other.getConnectionName() != null && other.getConnectionName().equals(this.getConnectionName()) == falsereturn false
        if (other.getConnectionState() == null ^ this.getConnectionState() == nullreturn false;
        if (other.getConnectionState() != null && other.getConnectionState().equals(this.getConnectionState()) == falsereturn false
        if (other.getRegion() == null ^ this.getRegion() == nullreturn false;
        if (other.getRegion() != null && other.getRegion().equals(this.getRegion()) == falsereturn false
        if (other.getLocation() == null ^ this.getLocation() == nullreturn false;
        if (other.getLocation() != null && other.getLocation().equals(this.getLocation()) == falsereturn false
        if (other.getBandwidth() == null ^ this.getBandwidth() == nullreturn false;
        if (other.getBandwidth() != null && other.getBandwidth().equals(this.getBandwidth()) == falsereturn false
        if (other.getVlan() == null ^ this.getVlan() == nullreturn false;
        if (other.getVlan() != null && other.getVlan().equals(this.getVlan()) == falsereturn false
        if (other.getPartnerName() == null ^ this.getPartnerName() == nullreturn false;
        if (other.getPartnerName() != null && other.getPartnerName().equals(this.getPartnerName()) == falsereturn false
        return true;
    }
    
    @Override
    public CreateConnectionResult clone() {
        try {
            return (CreateConnectionResultsuper.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