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

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

/// ScalingRequest is the payload for a generic scaling action
///
/// This struct was generated based on the Go types of the official Nomad API.
#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize, Builder)]
pub struct ScalingRequest {
    #[serde(rename = "Count", skip_serializing_if = "Option::is_none")]
    pub count: Option<i64>,

    #[serde(rename = "Target")]
    pub target: std::collections::HashMap<String, String>,

    #[serde(rename = "Message")]
    pub message: String,

    #[serde(rename = "Error")]
    pub error: bool,

    #[serde(rename = "Meta")]
    pub meta: std::collections::HashMap<String, serde_json::Value>,

    /// this is effectively a job update, so we need the ability to override policy.
    #[serde(rename = "PolicyOverride")]
    pub policy_override: bool,

    /// If JobModifyIndex is set then the job will only be scaled if it matches
    /// the current Jobs index. The JobModifyIndex is ignored if 0.
    #[serde(rename = "JobModifyIndex")]
    pub job_modify_index: u64,
}
