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

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

/// VolumeRequest is a representation of a storage volume that a TaskGroup wishes to use.
///
/// This struct was generated based on the Go types of the official Nomad API.
#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize, Builder)]
pub struct VolumeRequest {
    #[serde(rename = "Name")]
    pub name: String,

    #[serde(rename = "Type")]
    pub r#type: String,

    #[serde(rename = "ReadOnly")]
    pub read_only: bool,

    #[serde(rename = "AccessMode")]
    pub access_mode: String,

    #[serde(rename = "AttachmentMode")]
    pub attachment_mode: String,

    #[serde(rename = "Source")]
    pub source: String,

    #[serde(rename = "MountOptions", skip_serializing_if = "Option::is_none")]
    pub mount_options: Option<super::CsiMountOptions>,

    #[serde(rename = "PerAlloc")]
    pub per_alloc: bool,
}
