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

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

/// QuotaLimit describes the resource limit in a particular region.
///
/// This struct was generated based on the Go types of the official Nomad API.
#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize, Builder)]
pub struct QuotaLimit {
    /// VariablesLimit is the maximum total size of all variables
    /// Variable.EncryptedData. A value of zero is treated as unlimited and a
    /// negative value is treated as fully disallowed.
    #[serde(rename = "variables_limit", skip_serializing_if = "Option::is_none")]
    pub variables_limit: Option<i64>,

    /// Hash is the hash of the object and is used to make replication efficient.
    #[serde(
        rename = "Hash",
        deserialize_with = "crate::deserialize_null_as_default"
    )]
    pub hash: Vec<u8>,

    /// Region is the region in which this limit has affect
    #[serde(rename = "Region")]
    pub region: String,

    /// RegionLimit is the quota limit that applies to any allocation within a
    /// referencing namespace in the region. A value of zero is treated as
    /// unlimited and a negative value is treated as fully disallowed. This is
    /// useful for once we support GPUs
    #[serde(rename = "RegionLimit", skip_serializing_if = "Option::is_none")]
    pub region_limit: Option<super::Resources>,
}
