// WARNING: generated by kopium - manual changes will be overwritten
// kopium command: kopium -f failoverquorums.yml --schema=derived --docs -b --derive=Default --derive=PartialEq --smart-derive-elision
// kopium version: 0.21.2

#[allow(unused_imports)]
mod prelude {
    pub use kube_derive::CustomResource;
    #[cfg(feature = "schemars")]
    pub use schemars::JsonSchema;
    pub use serde::{Deserialize, Serialize};
    #[cfg(feature = "builder")]
    pub use typed_builder::TypedBuilder;
}
use self::prelude::*;

/// Most recently observed status of the failover quorum.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
#[cfg_attr(feature = "builder", derive(TypedBuilder))]
#[cfg_attr(feature = "schemars", derive(JsonSchema))]
pub struct FailoverQuorumStatus {
    /// Contains the latest reported Method value.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
    pub method: Option<String>,
    /// Primary is the name of the primary instance that updated
    /// this object the latest time.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
    pub primary: Option<String>,
    /// StandbyNames is the list of potentially synchronous
    /// instance names.
    #[serde(
        default,
        skip_serializing_if = "Option::is_none",
        rename = "standbyNames"
    )]
    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
    pub standby_names: Option<Vec<String>>,
    /// StandbyNumber is the number of synchronous standbys that transactions
    /// need to wait for replies from.
    #[serde(
        default,
        skip_serializing_if = "Option::is_none",
        rename = "standbyNumber"
    )]
    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
    pub standby_number: Option<i64>,
}
