All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.directconnect.model.DirectConnectGateway Maven / Gradle / Ivy

/*
 * Copyright 2015-2020 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;

import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;

/**
 * 

* Information about a Direct Connect gateway, which enables you to connect virtual interfaces and virtual private * gateway or transit gateways. *

* * @see AWS * API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class DirectConnectGateway implements Serializable, Cloneable, StructuredPojo { /** *

* The ID of the Direct Connect gateway. *

*/ private String directConnectGatewayId; /** *

* The name of the Direct Connect gateway. *

*/ private String directConnectGatewayName; /** *

* The autonomous system number (ASN) for the Amazon side of the connection. *

*/ private Long amazonSideAsn; /** *

* The ID of the AWS account that owns the Direct Connect gateway. *

*/ private String ownerAccount; /** *

* The state of the Direct Connect gateway. The following are the possible values: *

*
    *
  • *

    * pending: The initial state after calling CreateDirectConnectGateway. *

    *
  • *
  • *

    * available: The Direct Connect gateway is ready for use. *

    *
  • *
  • *

    * deleting: The initial state after calling DeleteDirectConnectGateway. *

    *
  • *
  • *

    * deleted: The Direct Connect gateway is deleted and cannot pass traffic. *

    *
  • *
*/ private String directConnectGatewayState; /** *

* The error message if the state of an object failed to advance. *

*/ private String stateChangeError; /** *

* The ID of the Direct Connect gateway. *

* * @param directConnectGatewayId * The ID of the Direct Connect gateway. */ public void setDirectConnectGatewayId(String directConnectGatewayId) { this.directConnectGatewayId = directConnectGatewayId; } /** *

* The ID of the Direct Connect gateway. *

* * @return The ID of the Direct Connect gateway. */ public String getDirectConnectGatewayId() { return this.directConnectGatewayId; } /** *

* The ID of the Direct Connect gateway. *

* * @param directConnectGatewayId * The ID of the Direct Connect gateway. * @return Returns a reference to this object so that method calls can be chained together. */ public DirectConnectGateway withDirectConnectGatewayId(String directConnectGatewayId) { setDirectConnectGatewayId(directConnectGatewayId); return this; } /** *

* The name of the Direct Connect gateway. *

* * @param directConnectGatewayName * The name of the Direct Connect gateway. */ public void setDirectConnectGatewayName(String directConnectGatewayName) { this.directConnectGatewayName = directConnectGatewayName; } /** *

* The name of the Direct Connect gateway. *

* * @return The name of the Direct Connect gateway. */ public String getDirectConnectGatewayName() { return this.directConnectGatewayName; } /** *

* The name of the Direct Connect gateway. *

* * @param directConnectGatewayName * The name of the Direct Connect gateway. * @return Returns a reference to this object so that method calls can be chained together. */ public DirectConnectGateway withDirectConnectGatewayName(String directConnectGatewayName) { setDirectConnectGatewayName(directConnectGatewayName); return this; } /** *

* The autonomous system number (ASN) for the Amazon side of the connection. *

* * @param amazonSideAsn * The autonomous system number (ASN) for the Amazon side of the connection. */ public void setAmazonSideAsn(Long amazonSideAsn) { this.amazonSideAsn = amazonSideAsn; } /** *

* The autonomous system number (ASN) for the Amazon side of the connection. *

* * @return The autonomous system number (ASN) for the Amazon side of the connection. */ public Long getAmazonSideAsn() { return this.amazonSideAsn; } /** *

* The autonomous system number (ASN) for the Amazon side of the connection. *

* * @param amazonSideAsn * The autonomous system number (ASN) for the Amazon side of the connection. * @return Returns a reference to this object so that method calls can be chained together. */ public DirectConnectGateway withAmazonSideAsn(Long amazonSideAsn) { setAmazonSideAsn(amazonSideAsn); return this; } /** *

* The ID of the AWS account that owns the Direct Connect gateway. *

* * @param ownerAccount * The ID of the AWS account that owns the Direct Connect gateway. */ public void setOwnerAccount(String ownerAccount) { this.ownerAccount = ownerAccount; } /** *

* The ID of the AWS account that owns the Direct Connect gateway. *

* * @return The ID of the AWS account that owns the Direct Connect gateway. */ public String getOwnerAccount() { return this.ownerAccount; } /** *

* The ID of the AWS account that owns the Direct Connect gateway. *

* * @param ownerAccount * The ID of the AWS account that owns the Direct Connect gateway. * @return Returns a reference to this object so that method calls can be chained together. */ public DirectConnectGateway withOwnerAccount(String ownerAccount) { setOwnerAccount(ownerAccount); return this; } /** *

* The state of the Direct Connect gateway. The following are the possible values: *

*
    *
  • *

    * pending: The initial state after calling CreateDirectConnectGateway. *

    *
  • *
  • *

    * available: The Direct Connect gateway is ready for use. *

    *
  • *
  • *

    * deleting: The initial state after calling DeleteDirectConnectGateway. *

    *
  • *
  • *

    * deleted: The Direct Connect gateway is deleted and cannot pass traffic. *

    *
  • *
* * @param directConnectGatewayState * The state of the Direct Connect gateway. The following are the possible values:

*
    *
  • *

    * pending: The initial state after calling CreateDirectConnectGateway. *

    *
  • *
  • *

    * available: The Direct Connect gateway is ready for use. *

    *
  • *
  • *

    * deleting: The initial state after calling DeleteDirectConnectGateway. *

    *
  • *
  • *

    * deleted: The Direct Connect gateway is deleted and cannot pass traffic. *

    *
  • * @see DirectConnectGatewayState */ public void setDirectConnectGatewayState(String directConnectGatewayState) { this.directConnectGatewayState = directConnectGatewayState; } /** *

    * The state of the Direct Connect gateway. The following are the possible values: *

    *
      *
    • *

      * pending: The initial state after calling CreateDirectConnectGateway. *

      *
    • *
    • *

      * available: The Direct Connect gateway is ready for use. *

      *
    • *
    • *

      * deleting: The initial state after calling DeleteDirectConnectGateway. *

      *
    • *
    • *

      * deleted: The Direct Connect gateway is deleted and cannot pass traffic. *

      *
    • *
    * * @return The state of the Direct Connect gateway. The following are the possible values:

    *
      *
    • *

      * pending: The initial state after calling CreateDirectConnectGateway. *

      *
    • *
    • *

      * available: The Direct Connect gateway is ready for use. *

      *
    • *
    • *

      * deleting: The initial state after calling DeleteDirectConnectGateway. *

      *
    • *
    • *

      * deleted: The Direct Connect gateway is deleted and cannot pass traffic. *

      *
    • * @see DirectConnectGatewayState */ public String getDirectConnectGatewayState() { return this.directConnectGatewayState; } /** *

      * The state of the Direct Connect gateway. The following are the possible values: *

      *
        *
      • *

        * pending: The initial state after calling CreateDirectConnectGateway. *

        *
      • *
      • *

        * available: The Direct Connect gateway is ready for use. *

        *
      • *
      • *

        * deleting: The initial state after calling DeleteDirectConnectGateway. *

        *
      • *
      • *

        * deleted: The Direct Connect gateway is deleted and cannot pass traffic. *

        *
      • *
      * * @param directConnectGatewayState * The state of the Direct Connect gateway. The following are the possible values:

      *
        *
      • *

        * pending: The initial state after calling CreateDirectConnectGateway. *

        *
      • *
      • *

        * available: The Direct Connect gateway is ready for use. *

        *
      • *
      • *

        * deleting: The initial state after calling DeleteDirectConnectGateway. *

        *
      • *
      • *

        * deleted: The Direct Connect gateway is deleted and cannot pass traffic. *

        *
      • * @return Returns a reference to this object so that method calls can be chained together. * @see DirectConnectGatewayState */ public DirectConnectGateway withDirectConnectGatewayState(String directConnectGatewayState) { setDirectConnectGatewayState(directConnectGatewayState); return this; } /** *

        * The state of the Direct Connect gateway. The following are the possible values: *

        *
          *
        • *

          * pending: The initial state after calling CreateDirectConnectGateway. *

          *
        • *
        • *

          * available: The Direct Connect gateway is ready for use. *

          *
        • *
        • *

          * deleting: The initial state after calling DeleteDirectConnectGateway. *

          *
        • *
        • *

          * deleted: The Direct Connect gateway is deleted and cannot pass traffic. *

          *
        • *
        * * @param directConnectGatewayState * The state of the Direct Connect gateway. The following are the possible values:

        *
          *
        • *

          * pending: The initial state after calling CreateDirectConnectGateway. *

          *
        • *
        • *

          * available: The Direct Connect gateway is ready for use. *

          *
        • *
        • *

          * deleting: The initial state after calling DeleteDirectConnectGateway. *

          *
        • *
        • *

          * deleted: The Direct Connect gateway is deleted and cannot pass traffic. *

          *
        • * @return Returns a reference to this object so that method calls can be chained together. * @see DirectConnectGatewayState */ public DirectConnectGateway withDirectConnectGatewayState(DirectConnectGatewayState directConnectGatewayState) { this.directConnectGatewayState = directConnectGatewayState.toString(); return this; } /** *

          * The error message if the state of an object failed to advance. *

          * * @param stateChangeError * The error message if the state of an object failed to advance. */ public void setStateChangeError(String stateChangeError) { this.stateChangeError = stateChangeError; } /** *

          * The error message if the state of an object failed to advance. *

          * * @return The error message if the state of an object failed to advance. */ public String getStateChangeError() { return this.stateChangeError; } /** *

          * The error message if the state of an object failed to advance. *

          * * @param stateChangeError * The error message if the state of an object failed to advance. * @return Returns a reference to this object so that method calls can be chained together. */ public DirectConnectGateway withStateChangeError(String stateChangeError) { setStateChangeError(stateChangeError); return this; } /** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getDirectConnectGatewayId() != null) sb.append("DirectConnectGatewayId: ").append(getDirectConnectGatewayId()).append(","); if (getDirectConnectGatewayName() != null) sb.append("DirectConnectGatewayName: ").append(getDirectConnectGatewayName()).append(","); if (getAmazonSideAsn() != null) sb.append("AmazonSideAsn: ").append(getAmazonSideAsn()).append(","); if (getOwnerAccount() != null) sb.append("OwnerAccount: ").append(getOwnerAccount()).append(","); if (getDirectConnectGatewayState() != null) sb.append("DirectConnectGatewayState: ").append(getDirectConnectGatewayState()).append(","); if (getStateChangeError() != null) sb.append("StateChangeError: ").append(getStateChangeError()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof DirectConnectGateway == false) return false; DirectConnectGateway other = (DirectConnectGateway) obj; if (other.getDirectConnectGatewayId() == null ^ this.getDirectConnectGatewayId() == null) return false; if (other.getDirectConnectGatewayId() != null && other.getDirectConnectGatewayId().equals(this.getDirectConnectGatewayId()) == false) return false; if (other.getDirectConnectGatewayName() == null ^ this.getDirectConnectGatewayName() == null) return false; if (other.getDirectConnectGatewayName() != null && other.getDirectConnectGatewayName().equals(this.getDirectConnectGatewayName()) == false) return false; if (other.getAmazonSideAsn() == null ^ this.getAmazonSideAsn() == null) return false; if (other.getAmazonSideAsn() != null && other.getAmazonSideAsn().equals(this.getAmazonSideAsn()) == false) return false; if (other.getOwnerAccount() == null ^ this.getOwnerAccount() == null) return false; if (other.getOwnerAccount() != null && other.getOwnerAccount().equals(this.getOwnerAccount()) == false) return false; if (other.getDirectConnectGatewayState() == null ^ this.getDirectConnectGatewayState() == null) return false; if (other.getDirectConnectGatewayState() != null && other.getDirectConnectGatewayState().equals(this.getDirectConnectGatewayState()) == false) return false; if (other.getStateChangeError() == null ^ this.getStateChangeError() == null) return false; if (other.getStateChangeError() != null && other.getStateChangeError().equals(this.getStateChangeError()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getDirectConnectGatewayId() == null) ? 0 : getDirectConnectGatewayId().hashCode()); hashCode = prime * hashCode + ((getDirectConnectGatewayName() == null) ? 0 : getDirectConnectGatewayName().hashCode()); hashCode = prime * hashCode + ((getAmazonSideAsn() == null) ? 0 : getAmazonSideAsn().hashCode()); hashCode = prime * hashCode + ((getOwnerAccount() == null) ? 0 : getOwnerAccount().hashCode()); hashCode = prime * hashCode + ((getDirectConnectGatewayState() == null) ? 0 : getDirectConnectGatewayState().hashCode()); hashCode = prime * hashCode + ((getStateChangeError() == null) ? 0 : getStateChangeError().hashCode()); return hashCode; } @Override public DirectConnectGateway clone() { try { return (DirectConnectGateway) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } @com.amazonaws.annotation.SdkInternalApi @Override public void marshall(ProtocolMarshaller protocolMarshaller) { com.amazonaws.services.directconnect.model.transform.DirectConnectGatewayMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy