use serde::{Deserialize, Serialize}; /*
                                      * Cloud SQL Admin API
                                      *
                                      * API for Cloud SQL database instance management
                                      *
                                      * The version of the OpenAPI document: v1
                                      *
                                      * Generated by: https://openapi-generator.tech
                                      */

/// DatabaseInstanceFailoverReplica : The name and status of the failover replica.

#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct DatabaseInstanceFailoverReplica {
    /// The availability status of the failover replica. A false status indicates that the failover replica is out of sync. The primary instance can only failover to the failover replica when the status is true.
    #[serde(rename = "available", skip_serializing_if = "Option::is_none")]
    pub available: Option<bool>,
    /// The name of the failover replica. If specified at instance creation, a failover replica is created for the instance. The name doesn't include the project ID.
    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
}

impl DatabaseInstanceFailoverReplica {
    /// The name and status of the failover replica.
    pub fn new() -> DatabaseInstanceFailoverReplica {
        DatabaseInstanceFailoverReplica {
            available: None,
            name: None,
        }
    }
}
