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

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

/// Variable specifies the metadata and contents to be stored in the
/// encrypted Nomad backend.
///
/// This struct was generated based on the Go types of the official Nomad API.
#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize, Builder)]
pub struct Variable {
    /// Items contains the k/v variable component
    #[serde(rename = "Items")]
    pub items: std::collections::HashMap<String, String>,

    /// Lock holds the information about the variable lock if its being used.
    #[serde(rename = "Lock", skip_serializing_if = "Option::is_none")]
    pub lock: Option<super::VariableLock>,

    /// Namespace is the Nomad namespace associated with the variable
    #[serde(rename = "Namespace")]
    pub namespace: String,

    /// Path is the path to the variable
    #[serde(rename = "Path")]
    pub path: String,

    /// CreateIndex tracks the index of creation time
    #[serde(rename = "CreateIndex")]
    pub create_index: u64,

    /// ModifyTime is the unix nano of the last modified time
    #[serde(rename = "ModifyIndex")]
    pub modify_index: u64,

    /// CreateTime is the unix nano of the creation time
    #[serde(rename = "CreateTime")]
    pub create_time: i64,

    /// ModifyTime is the unix nano of the last modified time
    #[serde(rename = "ModifyTime")]
    pub modify_time: i64,
}
