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

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

/// DeregisterOptions is used to pass through job deregistration parameters
///
/// This struct was generated based on the Go types of the official Nomad API.
#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize, Builder)]
pub struct DeregisterOptions {
    /// If Purge is set to true, the job is deregistered and purged from the
    /// system versus still being queryable and eventually GC'ed from the
    /// system. Most callers should not specify purge.
    #[serde(rename = "Purge")]
    pub purge: bool,

    /// If Global is set to true, all regions of a multiregion job will be
    /// stopped.
    #[serde(rename = "Global")]
    pub global: bool,

    /// EvalPriority is an optional priority to use on any evaluation created as
    /// a result on this job deregistration. This value must be between 1-100
    /// inclusively, where a larger value corresponds to a higher priority. This
    /// is useful when an operator wishes to push through a job deregistration
    /// in busy clusters with a large evaluation backlog.
    #[serde(rename = "EvalPriority")]
    pub eval_priority: i64,

    /// NoShutdownDelay, if set to true, will override the group and
    /// task shutdown_delay configuration and ignore the delay for any
    /// allocations stopped as a result of this Deregister call.
    #[serde(rename = "NoShutdownDelay")]
    pub no_shutdown_delay: bool,
}
