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

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

/// CSISnapshot is the storage provider's view of a volume snapshot
///
/// This struct was generated based on the Go types of the official Nomad API.
#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize, Builder)]
pub struct CsiSnapshot {
    #[serde(rename = "ExternalSourceVolumeID")]
    pub external_source_volume_id: String,

    #[serde(rename = "IsReady")]
    pub is_ready: bool,

    #[serde(rename = "SourceVolumeID")]
    pub source_volume_id: String,

    /// These field are only used during snapshot creation and will not be
    /// populated when the snapshot is returned
    #[serde(rename = "Name")]
    pub name: String,

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

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

    #[serde(rename = "ID")]
    pub id: String,

    #[serde(rename = "SizeBytes")]
    pub size_bytes: i64,

    #[serde(rename = "CreateTime")]
    pub create_time: i64,

    #[serde(rename = "PluginID")]
    pub plugin_id: String,
}
