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

com.amazonaws.services.rds.model.FailoverState Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Amazon RDS module holds the client classes that are used for communicating with Amazon Relational Database Service

There is a newer version: 1.12.780
Show newest version
/*
 * Copyright 2019-2024 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.rds.model;

import java.io.Serializable;
import javax.annotation.Generated;

/**
 * 

* Contains the state of scheduled or in-process operations on a global cluster (Aurora global database). This data type * is empty unless a switchover or failover operation is scheduled or is in progress on the Aurora global database. *

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

* The current status of the global cluster. Possible values are as follows: *

*
    *
  • *

    * pending – The service received a request to switch over or fail over the global cluster. The global * cluster's primary DB cluster and the specified secondary DB cluster are being verified before the operation * starts. *

    *
  • *
  • *

    * failing-over – Aurora is promoting the chosen secondary Aurora DB cluster to become the new primary DB * cluster to fail over the global cluster. *

    *
  • *
  • *

    * cancelling – The request to switch over or fail over the global cluster was cancelled and the primary Aurora * DB cluster and the selected secondary Aurora DB cluster are returning to their previous states. *

    *
  • *
  • *

    * switching-over – This status covers the range of Aurora internal operations that take place during the * switchover process, such as demoting the primary Aurora DB cluster, promoting the secondary Aurora DB cluster, * and synchronizing replicas. *

    *
  • *
*/ private String status; /** *

* The Amazon Resource Name (ARN) of the Aurora DB cluster that is currently being demoted, and which is associated * with this state. *

*/ private String fromDbClusterArn; /** *

* The Amazon Resource Name (ARN) of the Aurora DB cluster that is currently being promoted, and which is associated * with this state. *

*/ private String toDbClusterArn; /** *

* Indicates whether the operation is a global switchover or a global failover. If data loss is allowed, then the * operation is a global failover. Otherwise, it's a switchover. *

*/ private Boolean isDataLossAllowed; /** *

* The current status of the global cluster. Possible values are as follows: *

*
    *
  • *

    * pending – The service received a request to switch over or fail over the global cluster. The global * cluster's primary DB cluster and the specified secondary DB cluster are being verified before the operation * starts. *

    *
  • *
  • *

    * failing-over – Aurora is promoting the chosen secondary Aurora DB cluster to become the new primary DB * cluster to fail over the global cluster. *

    *
  • *
  • *

    * cancelling – The request to switch over or fail over the global cluster was cancelled and the primary Aurora * DB cluster and the selected secondary Aurora DB cluster are returning to their previous states. *

    *
  • *
  • *

    * switching-over – This status covers the range of Aurora internal operations that take place during the * switchover process, such as demoting the primary Aurora DB cluster, promoting the secondary Aurora DB cluster, * and synchronizing replicas. *

    *
  • *
* * @param status * The current status of the global cluster. Possible values are as follows:

*
    *
  • *

    * pending – The service received a request to switch over or fail over the global cluster. The global * cluster's primary DB cluster and the specified secondary DB cluster are being verified before the * operation starts. *

    *
  • *
  • *

    * failing-over – Aurora is promoting the chosen secondary Aurora DB cluster to become the new primary * DB cluster to fail over the global cluster. *

    *
  • *
  • *

    * cancelling – The request to switch over or fail over the global cluster was cancelled and the primary * Aurora DB cluster and the selected secondary Aurora DB cluster are returning to their previous states. *

    *
  • *
  • *

    * switching-over – This status covers the range of Aurora internal operations that take place during * the switchover process, such as demoting the primary Aurora DB cluster, promoting the secondary Aurora DB * cluster, and synchronizing replicas. *

    *
  • * @see FailoverStatus */ public void setStatus(String status) { this.status = status; } /** *

    * The current status of the global cluster. Possible values are as follows: *

    *
      *
    • *

      * pending – The service received a request to switch over or fail over the global cluster. The global * cluster's primary DB cluster and the specified secondary DB cluster are being verified before the operation * starts. *

      *
    • *
    • *

      * failing-over – Aurora is promoting the chosen secondary Aurora DB cluster to become the new primary DB * cluster to fail over the global cluster. *

      *
    • *
    • *

      * cancelling – The request to switch over or fail over the global cluster was cancelled and the primary Aurora * DB cluster and the selected secondary Aurora DB cluster are returning to their previous states. *

      *
    • *
    • *

      * switching-over – This status covers the range of Aurora internal operations that take place during the * switchover process, such as demoting the primary Aurora DB cluster, promoting the secondary Aurora DB cluster, * and synchronizing replicas. *

      *
    • *
    * * @return The current status of the global cluster. Possible values are as follows:

    *
      *
    • *

      * pending – The service received a request to switch over or fail over the global cluster. The global * cluster's primary DB cluster and the specified secondary DB cluster are being verified before the * operation starts. *

      *
    • *
    • *

      * failing-over – Aurora is promoting the chosen secondary Aurora DB cluster to become the new primary * DB cluster to fail over the global cluster. *

      *
    • *
    • *

      * cancelling – The request to switch over or fail over the global cluster was cancelled and the * primary Aurora DB cluster and the selected secondary Aurora DB cluster are returning to their previous * states. *

      *
    • *
    • *

      * switching-over – This status covers the range of Aurora internal operations that take place during * the switchover process, such as demoting the primary Aurora DB cluster, promoting the secondary Aurora DB * cluster, and synchronizing replicas. *

      *
    • * @see FailoverStatus */ public String getStatus() { return this.status; } /** *

      * The current status of the global cluster. Possible values are as follows: *

      *
        *
      • *

        * pending – The service received a request to switch over or fail over the global cluster. The global * cluster's primary DB cluster and the specified secondary DB cluster are being verified before the operation * starts. *

        *
      • *
      • *

        * failing-over – Aurora is promoting the chosen secondary Aurora DB cluster to become the new primary DB * cluster to fail over the global cluster. *

        *
      • *
      • *

        * cancelling – The request to switch over or fail over the global cluster was cancelled and the primary Aurora * DB cluster and the selected secondary Aurora DB cluster are returning to their previous states. *

        *
      • *
      • *

        * switching-over – This status covers the range of Aurora internal operations that take place during the * switchover process, such as demoting the primary Aurora DB cluster, promoting the secondary Aurora DB cluster, * and synchronizing replicas. *

        *
      • *
      * * @param status * The current status of the global cluster. Possible values are as follows:

      *
        *
      • *

        * pending – The service received a request to switch over or fail over the global cluster. The global * cluster's primary DB cluster and the specified secondary DB cluster are being verified before the * operation starts. *

        *
      • *
      • *

        * failing-over – Aurora is promoting the chosen secondary Aurora DB cluster to become the new primary * DB cluster to fail over the global cluster. *

        *
      • *
      • *

        * cancelling – The request to switch over or fail over the global cluster was cancelled and the primary * Aurora DB cluster and the selected secondary Aurora DB cluster are returning to their previous states. *

        *
      • *
      • *

        * switching-over – This status covers the range of Aurora internal operations that take place during * the switchover process, such as demoting the primary Aurora DB cluster, promoting the secondary Aurora DB * cluster, and synchronizing replicas. *

        *
      • * @return Returns a reference to this object so that method calls can be chained together. * @see FailoverStatus */ public FailoverState withStatus(String status) { setStatus(status); return this; } /** *

        * The current status of the global cluster. Possible values are as follows: *

        *
          *
        • *

          * pending – The service received a request to switch over or fail over the global cluster. The global * cluster's primary DB cluster and the specified secondary DB cluster are being verified before the operation * starts. *

          *
        • *
        • *

          * failing-over – Aurora is promoting the chosen secondary Aurora DB cluster to become the new primary DB * cluster to fail over the global cluster. *

          *
        • *
        • *

          * cancelling – The request to switch over or fail over the global cluster was cancelled and the primary Aurora * DB cluster and the selected secondary Aurora DB cluster are returning to their previous states. *

          *
        • *
        • *

          * switching-over – This status covers the range of Aurora internal operations that take place during the * switchover process, such as demoting the primary Aurora DB cluster, promoting the secondary Aurora DB cluster, * and synchronizing replicas. *

          *
        • *
        * * @param status * The current status of the global cluster. Possible values are as follows:

        *
          *
        • *

          * pending – The service received a request to switch over or fail over the global cluster. The global * cluster's primary DB cluster and the specified secondary DB cluster are being verified before the * operation starts. *

          *
        • *
        • *

          * failing-over – Aurora is promoting the chosen secondary Aurora DB cluster to become the new primary * DB cluster to fail over the global cluster. *

          *
        • *
        • *

          * cancelling – The request to switch over or fail over the global cluster was cancelled and the primary * Aurora DB cluster and the selected secondary Aurora DB cluster are returning to their previous states. *

          *
        • *
        • *

          * switching-over – This status covers the range of Aurora internal operations that take place during * the switchover process, such as demoting the primary Aurora DB cluster, promoting the secondary Aurora DB * cluster, and synchronizing replicas. *

          *
        • * @return Returns a reference to this object so that method calls can be chained together. * @see FailoverStatus */ public FailoverState withStatus(FailoverStatus status) { this.status = status.toString(); return this; } /** *

          * The Amazon Resource Name (ARN) of the Aurora DB cluster that is currently being demoted, and which is associated * with this state. *

          * * @param fromDbClusterArn * The Amazon Resource Name (ARN) of the Aurora DB cluster that is currently being demoted, and which is * associated with this state. */ public void setFromDbClusterArn(String fromDbClusterArn) { this.fromDbClusterArn = fromDbClusterArn; } /** *

          * The Amazon Resource Name (ARN) of the Aurora DB cluster that is currently being demoted, and which is associated * with this state. *

          * * @return The Amazon Resource Name (ARN) of the Aurora DB cluster that is currently being demoted, and which is * associated with this state. */ public String getFromDbClusterArn() { return this.fromDbClusterArn; } /** *

          * The Amazon Resource Name (ARN) of the Aurora DB cluster that is currently being demoted, and which is associated * with this state. *

          * * @param fromDbClusterArn * The Amazon Resource Name (ARN) of the Aurora DB cluster that is currently being demoted, and which is * associated with this state. * @return Returns a reference to this object so that method calls can be chained together. */ public FailoverState withFromDbClusterArn(String fromDbClusterArn) { setFromDbClusterArn(fromDbClusterArn); return this; } /** *

          * The Amazon Resource Name (ARN) of the Aurora DB cluster that is currently being promoted, and which is associated * with this state. *

          * * @param toDbClusterArn * The Amazon Resource Name (ARN) of the Aurora DB cluster that is currently being promoted, and which is * associated with this state. */ public void setToDbClusterArn(String toDbClusterArn) { this.toDbClusterArn = toDbClusterArn; } /** *

          * The Amazon Resource Name (ARN) of the Aurora DB cluster that is currently being promoted, and which is associated * with this state. *

          * * @return The Amazon Resource Name (ARN) of the Aurora DB cluster that is currently being promoted, and which is * associated with this state. */ public String getToDbClusterArn() { return this.toDbClusterArn; } /** *

          * The Amazon Resource Name (ARN) of the Aurora DB cluster that is currently being promoted, and which is associated * with this state. *

          * * @param toDbClusterArn * The Amazon Resource Name (ARN) of the Aurora DB cluster that is currently being promoted, and which is * associated with this state. * @return Returns a reference to this object so that method calls can be chained together. */ public FailoverState withToDbClusterArn(String toDbClusterArn) { setToDbClusterArn(toDbClusterArn); return this; } /** *

          * Indicates whether the operation is a global switchover or a global failover. If data loss is allowed, then the * operation is a global failover. Otherwise, it's a switchover. *

          * * @param isDataLossAllowed * Indicates whether the operation is a global switchover or a global failover. If data loss is allowed, then * the operation is a global failover. Otherwise, it's a switchover. */ public void setIsDataLossAllowed(Boolean isDataLossAllowed) { this.isDataLossAllowed = isDataLossAllowed; } /** *

          * Indicates whether the operation is a global switchover or a global failover. If data loss is allowed, then the * operation is a global failover. Otherwise, it's a switchover. *

          * * @return Indicates whether the operation is a global switchover or a global failover. If data loss is allowed, * then the operation is a global failover. Otherwise, it's a switchover. */ public Boolean getIsDataLossAllowed() { return this.isDataLossAllowed; } /** *

          * Indicates whether the operation is a global switchover or a global failover. If data loss is allowed, then the * operation is a global failover. Otherwise, it's a switchover. *

          * * @param isDataLossAllowed * Indicates whether the operation is a global switchover or a global failover. If data loss is allowed, then * the operation is a global failover. Otherwise, it's a switchover. * @return Returns a reference to this object so that method calls can be chained together. */ public FailoverState withIsDataLossAllowed(Boolean isDataLossAllowed) { setIsDataLossAllowed(isDataLossAllowed); return this; } /** *

          * Indicates whether the operation is a global switchover or a global failover. If data loss is allowed, then the * operation is a global failover. Otherwise, it's a switchover. *

          * * @return Indicates whether the operation is a global switchover or a global failover. If data loss is allowed, * then the operation is a global failover. Otherwise, it's a switchover. */ public Boolean isDataLossAllowed() { return this.isDataLossAllowed; } /** * 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 (getStatus() != null) sb.append("Status: ").append(getStatus()).append(","); if (getFromDbClusterArn() != null) sb.append("FromDbClusterArn: ").append(getFromDbClusterArn()).append(","); if (getToDbClusterArn() != null) sb.append("ToDbClusterArn: ").append(getToDbClusterArn()).append(","); if (getIsDataLossAllowed() != null) sb.append("IsDataLossAllowed: ").append(getIsDataLossAllowed()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof FailoverState == false) return false; FailoverState other = (FailoverState) obj; if (other.getStatus() == null ^ this.getStatus() == null) return false; if (other.getStatus() != null && other.getStatus().equals(this.getStatus()) == false) return false; if (other.getFromDbClusterArn() == null ^ this.getFromDbClusterArn() == null) return false; if (other.getFromDbClusterArn() != null && other.getFromDbClusterArn().equals(this.getFromDbClusterArn()) == false) return false; if (other.getToDbClusterArn() == null ^ this.getToDbClusterArn() == null) return false; if (other.getToDbClusterArn() != null && other.getToDbClusterArn().equals(this.getToDbClusterArn()) == false) return false; if (other.getIsDataLossAllowed() == null ^ this.getIsDataLossAllowed() == null) return false; if (other.getIsDataLossAllowed() != null && other.getIsDataLossAllowed().equals(this.getIsDataLossAllowed()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode()); hashCode = prime * hashCode + ((getFromDbClusterArn() == null) ? 0 : getFromDbClusterArn().hashCode()); hashCode = prime * hashCode + ((getToDbClusterArn() == null) ? 0 : getToDbClusterArn().hashCode()); hashCode = prime * hashCode + ((getIsDataLossAllowed() == null) ? 0 : getIsDataLossAllowed().hashCode()); return hashCode; } @Override public FailoverState clone() { try { return (FailoverState) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy