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

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

/// VaultAccessor is a Vault ACL token created by Nomad for a task to access
/// Vault using the legacy authentication flow.
///
/// This struct was generated based on the Go types of the official Nomad API.
#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize, Builder)]
pub struct VaultAccessor {
    /// CreateIndex is the Raft index when the token was created.
    #[serde(rename = "CreateIndex")]
    pub create_index: u64,

    /// AllocID is the ID of the allocation that requested this token.
    #[serde(rename = "AllocID")]
    pub alloc_id: String,

    /// Task is the name of the task that requested this token.
    #[serde(rename = "Task")]
    pub task: String,

    /// NodeID is the ID of the node running the allocation that requested this
    /// token.
    #[serde(rename = "NodeID")]
    pub node_id: String,

    /// Accessor is the Vault ACL token accessor ID.
    #[serde(rename = "Accessor")]
    pub accessor: String,

    /// CreationTTL is the TTL set when the token was created.
    #[serde(rename = "CreationTTL")]
    pub creation_ttl: i64,
}
