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

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

/// CSIVolumeExternalStub is the storage provider's view of a volume, as
/// returned from the controller plugin; all IDs are for external resources
///
/// This struct was generated based on the Go types of the official Nomad API.
#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize, Builder)]
pub struct CSIVolumeExternalStub {
    #[serde(rename = "CapacityBytes")]
    pub capacity_bytes: i64,

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

    #[serde(rename = "CloneID")]
    pub clone_id: String,

    #[serde(rename = "SnapshotID")]
    pub snapshot_id: String,

    #[serde(
        rename = "PublishedExternalNodeIDs",
        deserialize_with = "crate::deserialize_null_as_default"
    )]
    pub published_external_node_i_ds: Vec<String>,

    #[serde(rename = "IsAbnormal")]
    pub is_abnormal: bool,

    #[serde(rename = "Status")]
    pub status: String,

    #[serde(rename = "ExternalID")]
    pub external_id: String,
}
