nomad_api_types/types/variable.rs
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
/*
* 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 {
/// 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,
/// Items contains the k/v variable component
#[serde(rename = "Items")]
pub items: std::collections::HashMap<String, String>,
}