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

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

/// CSIInfo is the current state of a single CSI Plugin. This is updated regularly
/// as plugin health changes on the node.
///
/// This struct was generated based on the Go types of the official Nomad API.
#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize, Builder)]
pub struct CSIInfo {
    #[serde(rename = "PluginID")]
    pub plugin_id: String,

    #[serde(rename = "HealthDescription")]
    pub health_description: String,

    #[serde(rename = "RequiresControllerPlugin")]
    pub requires_controller_plugin: bool,

    #[serde(rename = "NodeInfo", skip_serializing_if = "Option::is_none")]
    pub node_info: Option<super::CSINodeInfo>,

    #[serde(rename = "AllocID")]
    pub alloc_id: String,

    #[serde(rename = "Healthy")]
    pub healthy: bool,

    #[serde(rename = "UpdateTime")]
    pub update_time: chrono::DateTime<chrono::Utc>,

    #[serde(rename = "RequiresTopologies")]
    pub requires_topologies: bool,

    #[serde(rename = "ControllerInfo", skip_serializing_if = "Option::is_none")]
    pub controller_info: Option<super::CSIControllerInfo>,
}
