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

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

/// QuotaSpec specifies the allowed resource usage across regions.
///
/// This struct was generated based on the Go types of the official Nomad API.
#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize, Builder)]
pub struct QuotaSpec {
    #[serde(rename = "ModifyIndex")]
    pub modify_index: u64,

    /// Name is the name for the quota object
    #[serde(rename = "Name")]
    pub name: String,

    /// Description is an optional description for the quota object
    #[serde(rename = "Description")]
    pub description: String,

    /// Limits is the set of quota limits encapsulated by this quota object. Each
    /// limit applies quota in a particular region and in the future over a
    /// particular priority range and datacenter set.
    #[serde(
        rename = "Limits",
        deserialize_with = "crate::deserialize_null_as_default"
    )]
    pub limits: Vec<super::QuotaLimit>,

    /// Raft indexes to track creation and modification
    #[serde(rename = "CreateIndex")]
    pub create_index: u64,
}
