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

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

Go to download

The AWS Java SDK for AWS Direct Connect module holds the client classes that are used for communicating with AWS Direct Connect Service

There is a newer version: 1.12.782
Show newest version
/*
 * Copyright 2016-2021 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 an attachment between a Direct Connect gateway and a virtual interface. *

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

* The ID of the Direct Connect gateway. *

*/ private String directConnectGatewayId; /** *

* The ID of the virtual interface. *

*/ private String virtualInterfaceId; /** *

* The AWS Region where the virtual interface is located. *

*/ private String virtualInterfaceRegion; /** *

* The ID of the AWS account that owns the virtual interface. *

*/ private String virtualInterfaceOwnerAccount; /** *

* The state of the attachment. The following are the possible values: *

*
    *
  • *

    * attaching: The initial state after a virtual interface is created using the Direct Connect gateway. *

    *
  • *
  • *

    * attached: The Direct Connect gateway and virtual interface are attached and ready to pass traffic. *

    *
  • *
  • *

    * detaching: The initial state after calling DeleteVirtualInterface. *

    *
  • *
  • *

    * detached: The virtual interface is detached from the Direct Connect gateway. Traffic flow between * the Direct Connect gateway and virtual interface is stopped. *

    *
  • *
*/ private String attachmentState; /** *

* The type of attachment. *

*/ private String attachmentType; /** *

* 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 DirectConnectGatewayAttachment withDirectConnectGatewayId(String directConnectGatewayId) { setDirectConnectGatewayId(directConnectGatewayId); return this; } /** *

* The ID of the virtual interface. *

* * @param virtualInterfaceId * The ID of the virtual interface. */ public void setVirtualInterfaceId(String virtualInterfaceId) { this.virtualInterfaceId = virtualInterfaceId; } /** *

* The ID of the virtual interface. *

* * @return The ID of the virtual interface. */ public String getVirtualInterfaceId() { return this.virtualInterfaceId; } /** *

* The ID of the virtual interface. *

* * @param virtualInterfaceId * The ID of the virtual interface. * @return Returns a reference to this object so that method calls can be chained together. */ public DirectConnectGatewayAttachment withVirtualInterfaceId(String virtualInterfaceId) { setVirtualInterfaceId(virtualInterfaceId); return this; } /** *

* The AWS Region where the virtual interface is located. *

* * @param virtualInterfaceRegion * The AWS Region where the virtual interface is located. */ public void setVirtualInterfaceRegion(String virtualInterfaceRegion) { this.virtualInterfaceRegion = virtualInterfaceRegion; } /** *

* The AWS Region where the virtual interface is located. *

* * @return The AWS Region where the virtual interface is located. */ public String getVirtualInterfaceRegion() { return this.virtualInterfaceRegion; } /** *

* The AWS Region where the virtual interface is located. *

* * @param virtualInterfaceRegion * The AWS Region where the virtual interface is located. * @return Returns a reference to this object so that method calls can be chained together. */ public DirectConnectGatewayAttachment withVirtualInterfaceRegion(String virtualInterfaceRegion) { setVirtualInterfaceRegion(virtualInterfaceRegion); return this; } /** *

* The ID of the AWS account that owns the virtual interface. *

* * @param virtualInterfaceOwnerAccount * The ID of the AWS account that owns the virtual interface. */ public void setVirtualInterfaceOwnerAccount(String virtualInterfaceOwnerAccount) { this.virtualInterfaceOwnerAccount = virtualInterfaceOwnerAccount; } /** *

* The ID of the AWS account that owns the virtual interface. *

* * @return The ID of the AWS account that owns the virtual interface. */ public String getVirtualInterfaceOwnerAccount() { return this.virtualInterfaceOwnerAccount; } /** *

* The ID of the AWS account that owns the virtual interface. *

* * @param virtualInterfaceOwnerAccount * The ID of the AWS account that owns the virtual interface. * @return Returns a reference to this object so that method calls can be chained together. */ public DirectConnectGatewayAttachment withVirtualInterfaceOwnerAccount(String virtualInterfaceOwnerAccount) { setVirtualInterfaceOwnerAccount(virtualInterfaceOwnerAccount); return this; } /** *

* The state of the attachment. The following are the possible values: *

*
    *
  • *

    * attaching: The initial state after a virtual interface is created using the Direct Connect gateway. *

    *
  • *
  • *

    * attached: The Direct Connect gateway and virtual interface are attached and ready to pass traffic. *

    *
  • *
  • *

    * detaching: The initial state after calling DeleteVirtualInterface. *

    *
  • *
  • *

    * detached: The virtual interface is detached from the Direct Connect gateway. Traffic flow between * the Direct Connect gateway and virtual interface is stopped. *

    *
  • *
* * @param attachmentState * The state of the attachment. The following are the possible values:

*
    *
  • *

    * attaching: The initial state after a virtual interface is created using the Direct Connect * gateway. *

    *
  • *
  • *

    * attached: The Direct Connect gateway and virtual interface are attached and ready to pass * traffic. *

    *
  • *
  • *

    * detaching: The initial state after calling DeleteVirtualInterface. *

    *
  • *
  • *

    * detached: The virtual interface is detached from the Direct Connect gateway. Traffic flow * between the Direct Connect gateway and virtual interface is stopped. *

    *
  • * @see DirectConnectGatewayAttachmentState */ public void setAttachmentState(String attachmentState) { this.attachmentState = attachmentState; } /** *

    * The state of the attachment. The following are the possible values: *

    *
      *
    • *

      * attaching: The initial state after a virtual interface is created using the Direct Connect gateway. *

      *
    • *
    • *

      * attached: The Direct Connect gateway and virtual interface are attached and ready to pass traffic. *

      *
    • *
    • *

      * detaching: The initial state after calling DeleteVirtualInterface. *

      *
    • *
    • *

      * detached: The virtual interface is detached from the Direct Connect gateway. Traffic flow between * the Direct Connect gateway and virtual interface is stopped. *

      *
    • *
    * * @return The state of the attachment. The following are the possible values:

    *
      *
    • *

      * attaching: The initial state after a virtual interface is created using the Direct Connect * gateway. *

      *
    • *
    • *

      * attached: The Direct Connect gateway and virtual interface are attached and ready to pass * traffic. *

      *
    • *
    • *

      * detaching: The initial state after calling DeleteVirtualInterface. *

      *
    • *
    • *

      * detached: The virtual interface is detached from the Direct Connect gateway. Traffic flow * between the Direct Connect gateway and virtual interface is stopped. *

      *
    • * @see DirectConnectGatewayAttachmentState */ public String getAttachmentState() { return this.attachmentState; } /** *

      * The state of the attachment. The following are the possible values: *

      *
        *
      • *

        * attaching: The initial state after a virtual interface is created using the Direct Connect gateway. *

        *
      • *
      • *

        * attached: The Direct Connect gateway and virtual interface are attached and ready to pass traffic. *

        *
      • *
      • *

        * detaching: The initial state after calling DeleteVirtualInterface. *

        *
      • *
      • *

        * detached: The virtual interface is detached from the Direct Connect gateway. Traffic flow between * the Direct Connect gateway and virtual interface is stopped. *

        *
      • *
      * * @param attachmentState * The state of the attachment. The following are the possible values:

      *
        *
      • *

        * attaching: The initial state after a virtual interface is created using the Direct Connect * gateway. *

        *
      • *
      • *

        * attached: The Direct Connect gateway and virtual interface are attached and ready to pass * traffic. *

        *
      • *
      • *

        * detaching: The initial state after calling DeleteVirtualInterface. *

        *
      • *
      • *

        * detached: The virtual interface is detached from the Direct Connect gateway. Traffic flow * between the Direct Connect gateway and virtual interface is stopped. *

        *
      • * @return Returns a reference to this object so that method calls can be chained together. * @see DirectConnectGatewayAttachmentState */ public DirectConnectGatewayAttachment withAttachmentState(String attachmentState) { setAttachmentState(attachmentState); return this; } /** *

        * The state of the attachment. The following are the possible values: *

        *
          *
        • *

          * attaching: The initial state after a virtual interface is created using the Direct Connect gateway. *

          *
        • *
        • *

          * attached: The Direct Connect gateway and virtual interface are attached and ready to pass traffic. *

          *
        • *
        • *

          * detaching: The initial state after calling DeleteVirtualInterface. *

          *
        • *
        • *

          * detached: The virtual interface is detached from the Direct Connect gateway. Traffic flow between * the Direct Connect gateway and virtual interface is stopped. *

          *
        • *
        * * @param attachmentState * The state of the attachment. The following are the possible values:

        *
          *
        • *

          * attaching: The initial state after a virtual interface is created using the Direct Connect * gateway. *

          *
        • *
        • *

          * attached: The Direct Connect gateway and virtual interface are attached and ready to pass * traffic. *

          *
        • *
        • *

          * detaching: The initial state after calling DeleteVirtualInterface. *

          *
        • *
        • *

          * detached: The virtual interface is detached from the Direct Connect gateway. Traffic flow * between the Direct Connect gateway and virtual interface is stopped. *

          *
        • * @return Returns a reference to this object so that method calls can be chained together. * @see DirectConnectGatewayAttachmentState */ public DirectConnectGatewayAttachment withAttachmentState(DirectConnectGatewayAttachmentState attachmentState) { this.attachmentState = attachmentState.toString(); return this; } /** *

          * The type of attachment. *

          * * @param attachmentType * The type of attachment. * @see DirectConnectGatewayAttachmentType */ public void setAttachmentType(String attachmentType) { this.attachmentType = attachmentType; } /** *

          * The type of attachment. *

          * * @return The type of attachment. * @see DirectConnectGatewayAttachmentType */ public String getAttachmentType() { return this.attachmentType; } /** *

          * The type of attachment. *

          * * @param attachmentType * The type of attachment. * @return Returns a reference to this object so that method calls can be chained together. * @see DirectConnectGatewayAttachmentType */ public DirectConnectGatewayAttachment withAttachmentType(String attachmentType) { setAttachmentType(attachmentType); return this; } /** *

          * The type of attachment. *

          * * @param attachmentType * The type of attachment. * @return Returns a reference to this object so that method calls can be chained together. * @see DirectConnectGatewayAttachmentType */ public DirectConnectGatewayAttachment withAttachmentType(DirectConnectGatewayAttachmentType attachmentType) { this.attachmentType = attachmentType.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 DirectConnectGatewayAttachment 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 (getVirtualInterfaceId() != null) sb.append("VirtualInterfaceId: ").append(getVirtualInterfaceId()).append(","); if (getVirtualInterfaceRegion() != null) sb.append("VirtualInterfaceRegion: ").append(getVirtualInterfaceRegion()).append(","); if (getVirtualInterfaceOwnerAccount() != null) sb.append("VirtualInterfaceOwnerAccount: ").append(getVirtualInterfaceOwnerAccount()).append(","); if (getAttachmentState() != null) sb.append("AttachmentState: ").append(getAttachmentState()).append(","); if (getAttachmentType() != null) sb.append("AttachmentType: ").append(getAttachmentType()).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 DirectConnectGatewayAttachment == false) return false; DirectConnectGatewayAttachment other = (DirectConnectGatewayAttachment) obj; if (other.getDirectConnectGatewayId() == null ^ this.getDirectConnectGatewayId() == null) return false; if (other.getDirectConnectGatewayId() != null && other.getDirectConnectGatewayId().equals(this.getDirectConnectGatewayId()) == false) return false; if (other.getVirtualInterfaceId() == null ^ this.getVirtualInterfaceId() == null) return false; if (other.getVirtualInterfaceId() != null && other.getVirtualInterfaceId().equals(this.getVirtualInterfaceId()) == false) return false; if (other.getVirtualInterfaceRegion() == null ^ this.getVirtualInterfaceRegion() == null) return false; if (other.getVirtualInterfaceRegion() != null && other.getVirtualInterfaceRegion().equals(this.getVirtualInterfaceRegion()) == false) return false; if (other.getVirtualInterfaceOwnerAccount() == null ^ this.getVirtualInterfaceOwnerAccount() == null) return false; if (other.getVirtualInterfaceOwnerAccount() != null && other.getVirtualInterfaceOwnerAccount().equals(this.getVirtualInterfaceOwnerAccount()) == false) return false; if (other.getAttachmentState() == null ^ this.getAttachmentState() == null) return false; if (other.getAttachmentState() != null && other.getAttachmentState().equals(this.getAttachmentState()) == false) return false; if (other.getAttachmentType() == null ^ this.getAttachmentType() == null) return false; if (other.getAttachmentType() != null && other.getAttachmentType().equals(this.getAttachmentType()) == 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 + ((getVirtualInterfaceId() == null) ? 0 : getVirtualInterfaceId().hashCode()); hashCode = prime * hashCode + ((getVirtualInterfaceRegion() == null) ? 0 : getVirtualInterfaceRegion().hashCode()); hashCode = prime * hashCode + ((getVirtualInterfaceOwnerAccount() == null) ? 0 : getVirtualInterfaceOwnerAccount().hashCode()); hashCode = prime * hashCode + ((getAttachmentState() == null) ? 0 : getAttachmentState().hashCode()); hashCode = prime * hashCode + ((getAttachmentType() == null) ? 0 : getAttachmentType().hashCode()); hashCode = prime * hashCode + ((getStateChangeError() == null) ? 0 : getStateChangeError().hashCode()); return hashCode; } @Override public DirectConnectGatewayAttachment clone() { try { return (DirectConnectGatewayAttachment) 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.DirectConnectGatewayAttachmentMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy