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 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.rds.model;

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

/**
 * 

* Contains the state of scheduled or in-process failover operations on an Aurora global database * (GlobalCluster). This Data type is empty unless a failover operation is scheduled or is currently underway 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 Aurora global database (GlobalCluster). Possible values are as follows: *

*
    *
  • *

    * pending – A request to fail over the Aurora global database (GlobalCluster) has been received by the * service. The GlobalCluster's primary DB cluster and the specified secondary DB cluster are being * verified before the failover process can start. *

    *
  • *
  • *

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

    *
  • *
  • *

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

    *
  • *
*/ 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; /** *

* The current status of the Aurora global database (GlobalCluster). Possible values are as follows: *

*
    *
  • *

    * pending – A request to fail over the Aurora global database (GlobalCluster) has been received by the * service. The GlobalCluster's primary DB cluster and the specified secondary DB cluster are being * verified before the failover process can start. *

    *
  • *
  • *

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

    *
  • *
  • *

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

    *
  • *
* * @param status * The current status of the Aurora global database (GlobalCluster). Possible values are as follows: *

*
    *
  • *

    * pending – A request to fail over the Aurora global database (GlobalCluster) has been received * by the service. The GlobalCluster's primary DB cluster and the specified secondary DB cluster * are being verified before the failover process can start. *

    *
  • *
  • *

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

    *
  • *
  • *

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

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

    * The current status of the Aurora global database (GlobalCluster). Possible values are as follows: *

    *
      *
    • *

      * pending – A request to fail over the Aurora global database (GlobalCluster) has been received by the * service. The GlobalCluster's primary DB cluster and the specified secondary DB cluster are being * verified before the failover process can start. *

      *
    • *
    • *

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

      *
    • *
    • *

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

      *
    • *
    * * @return The current status of the Aurora global database (GlobalCluster). Possible values are as follows: *

    *
      *
    • *

      * pending – A request to fail over the Aurora global database (GlobalCluster) has been received * by the service. The GlobalCluster's primary DB cluster and the specified secondary DB * cluster are being verified before the failover process can start. *

      *
    • *
    • *

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

      *
    • *
    • *

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

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

      * The current status of the Aurora global database (GlobalCluster). Possible values are as follows: *

      *
        *
      • *

        * pending – A request to fail over the Aurora global database (GlobalCluster) has been received by the * service. The GlobalCluster's primary DB cluster and the specified secondary DB cluster are being * verified before the failover process can start. *

        *
      • *
      • *

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

        *
      • *
      • *

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

        *
      • *
      * * @param status * The current status of the Aurora global database (GlobalCluster). Possible values are as follows: *

      *
        *
      • *

        * pending – A request to fail over the Aurora global database (GlobalCluster) has been received * by the service. The GlobalCluster's primary DB cluster and the specified secondary DB cluster * are being verified before the failover process can start. *

        *
      • *
      • *

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

        *
      • *
      • *

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

        *
      • * @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 Aurora global database (GlobalCluster). Possible values are as follows: *

        *
          *
        • *

          * pending – A request to fail over the Aurora global database (GlobalCluster) has been received by the * service. The GlobalCluster's primary DB cluster and the specified secondary DB cluster are being * verified before the failover process can start. *

          *
        • *
        • *

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

          *
        • *
        • *

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

          *
        • *
        * * @param status * The current status of the Aurora global database (GlobalCluster). Possible values are as follows: *

        *
          *
        • *

          * pending – A request to fail over the Aurora global database (GlobalCluster) has been received * by the service. The GlobalCluster's primary DB cluster and the specified secondary DB cluster * are being verified before the failover process can start. *

          *
        • *
        • *

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

          *
        • *
        • *

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

          *
        • * @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; } /** * 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()); 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; 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()); 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