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

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

/// Namespace is used to serialize a namespace.
///
/// This struct was generated based on the Go types of the official Nomad API.
#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize, Builder)]
pub struct Namespace {
    #[serde(rename = "Name")]
    pub name: String,

    #[serde(rename = "VaultConfiguration", skip_serializing_if = "Option::is_none")]
    pub vault_configuration: Option<super::NamespaceVaultConfiguration>,

    #[serde(
        rename = "ConsulConfiguration",
        skip_serializing_if = "Option::is_none"
    )]
    pub consul_configuration: Option<super::NamespaceConsulConfiguration>,

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

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

    #[serde(rename = "Description")]
    pub description: String,

    #[serde(rename = "Quota")]
    pub quota: String,

    #[serde(rename = "Capabilities", skip_serializing_if = "Option::is_none")]
    pub capabilities: Option<super::NamespaceCapabilities>,

    #[serde(
        rename = "NodePoolConfiguration",
        skip_serializing_if = "Option::is_none"
    )]
    pub node_pool_configuration: Option<super::NamespaceNodePoolConfiguration>,

    #[serde(rename = "CreateIndex")]
    pub create_index: u64,
}
