/*
 * This is an auto-generated file.
 * Any manual changes may be overwritten without notice!
 */

use derive_builder::Builder;
use serde::{Deserialize, Serialize};

/// AutopilotZone holds the list of servers in a redundancy zone.  (Enterprise only)
///
/// This struct was generated based on the Go types of the official Nomad API.
#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize, Builder)]
pub struct AutopilotZone {
    /// Servers holds the list of servers in the redundancy zone.
    #[serde(
        rename = "Servers",
        deserialize_with = "crate::deserialize_null_as_default"
    )]
    pub servers: Vec<String>,

    /// Voters holds the list of servers that are voters in the redundancy zone.
    #[serde(
        rename = "Voters",
        deserialize_with = "crate::deserialize_null_as_default"
    )]
    pub voters: Vec<String>,

    /// FailureTolerance is the number of servers that could be lost without an
    /// outage occurring.
    #[serde(rename = "FailureTolerance")]
    pub failure_tolerance: i64,
}
