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

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

/// SchedulerConfiguration is the config for controlling scheduler 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 SchedulerConfiguration {
    /// MemoryOversubscriptionEnabled specifies whether memory oversubscription is enabled
    #[serde(rename = "MemoryOversubscriptionEnabled")]
    pub memory_oversubscription_enabled: bool,

    /// RejectJobRegistration disables new job registrations except with a
    /// management ACL token
    #[serde(rename = "RejectJobRegistration")]
    pub reject_job_registration: bool,

    /// PauseEvalBroker stops the leader evaluation broker process from running
    /// until the configuration is updated and written to the Nomad servers.
    #[serde(rename = "PauseEvalBroker")]
    pub pause_eval_broker: bool,

    /// CreateIndex/ModifyIndex store the create/modify indexes of this configuration.
    #[serde(rename = "CreateIndex")]
    pub create_index: u64,

    #[serde(rename = "ModifyIndex")]
    pub modify_index: u64,

    /// SchedulerAlgorithm lets you select between available scheduling algorithms.
    #[serde(rename = "SchedulerAlgorithm")]
    pub scheduler_algorithm: String,

    /// PreemptionConfig specifies whether to enable eviction of lower
    /// priority jobs to place higher priority jobs.
    #[serde(rename = "PreemptionConfig")]
    pub preemption_config: super::PreemptionConfig,
}
