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

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

/// CSIControllerInfo is the fingerprinted data from a CSI Plugin that is specific to
/// the Controller API.
///
/// This struct was generated based on the Go types of the official Nomad API.
#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize, Builder)]
pub struct CSIControllerInfo {
    /// SupportsListVolumes is true when the controller implements the
    /// ListVolumes RPC. NOTE: This does not guarantee that attached nodes will
    /// be returned unless SupportsListVolumesAttachedNodes is also true.
    #[serde(rename = "SupportsListVolumes")]
    pub supports_list_volumes: bool,

    /// SupportsGetCapacity indicates plugin support for GET_CAPACITY
    #[serde(rename = "SupportsGetCapacity")]
    pub supports_get_capacity: bool,

    /// SupportsCreateDeleteSnapshot indicates plugin support for
    /// CREATE_DELETE_SNAPSHOT
    #[serde(rename = "SupportsCreateDeleteSnapshot")]
    pub supports_create_delete_snapshot: bool,

    /// SupportsListSnapshots indicates plugin support for LIST_SNAPSHOTS
    #[serde(rename = "SupportsListSnapshots")]
    pub supports_list_snapshots: bool,

    /// SupportsGet indicates plugin support for GET_VOLUME
    #[serde(rename = "SupportsGet")]
    pub supports_get: bool,

    /// SupportsCreateDelete indicates plugin support for CREATE_DELETE_VOLUME
    #[serde(rename = "SupportsCreateDelete")]
    pub supports_create_delete: bool,

    /// SupportsClone indicates plugin support for CLONE_VOLUME
    #[serde(rename = "SupportsClone")]
    pub supports_clone: bool,

    /// SupportsReadOnlyAttach is set to true when the controller returns the
    /// ATTACH_READONLY capability.
    #[serde(rename = "SupportsReadOnlyAttach")]
    pub supports_read_only_attach: bool,

    /// SupportsExpand indicates plugin support for EXPAND_VOLUME
    #[serde(rename = "SupportsExpand")]
    pub supports_expand: bool,

    /// SupportsListVolumesAttachedNodes indicates whether the plugin will
    /// return attached nodes data when making ListVolume RPCs (plugin support
    /// for LIST_VOLUMES_PUBLISHED_NODES)
    #[serde(rename = "SupportsListVolumesAttachedNodes")]
    pub supports_list_volumes_attached_nodes: bool,

    /// SupportsCondition indicates plugin support for VOLUME_CONDITION
    #[serde(rename = "SupportsCondition")]
    pub supports_condition: bool,

    /// SupportsPublishVolume is true when the controller implements the
    /// methods required to attach and detach volumes. If this is false Nomad
    /// should skip the controller attachment flow.
    #[serde(rename = "SupportsAttachDetach")]
    pub supports_attach_detach: bool,
}
