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

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

/// DrainSpec describes a Node's drain behavior.
///
/// This struct was generated based on the Go types of the official Nomad API.
#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize, Builder)]
pub struct DrainSpec {
    /// Deadline is the duration after StartTime when the remaining
    /// allocations on a draining Node should be told to stop.
    #[serde(
        rename = "Deadline",
        serialize_with = "crate::serialize_duration",
        deserialize_with = "crate::deserialize_duration"
    )]
    pub deadline: chrono::TimeDelta,

    /// IgnoreSystemJobs allows systems jobs to remain on the node even though it
    /// has been marked for draining.
    #[serde(rename = "IgnoreSystemJobs")]
    pub ignore_system_jobs: bool,
}
