use serde::{Deserialize, Serialize}; /*
                                      * Compute Engine API
                                      *
                                      * Creates and runs virtual machines on Google Cloud Platform.
                                      *
                                      * The version of the OpenAPI document: v1
                                      *
                                      * Generated by: https://openapi-generator.tech
                                      */

use crate::google_rest_apis::compute_v1::models;

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct AllocationSpecificSkuAllocationAllocatedInstancePropertiesReservedDisk {
    /// Specifies the size of the disk in base-2 GB.
    #[serde(rename = "diskSizeGb", skip_serializing_if = "Option::is_none")]
    pub disk_size_gb: Option<String>,
    /// Specifies the disk interface to use for attaching this disk, which is either SCSI or NVME. The default is SCSI. For performance characteristics of SCSI over NVMe, see Local SSD performance.
    #[serde(rename = "interface", skip_serializing_if = "Option::is_none")]
    pub interface: Option<Interface>,
}

impl AllocationSpecificSkuAllocationAllocatedInstancePropertiesReservedDisk {
    pub fn new() -> AllocationSpecificSkuAllocationAllocatedInstancePropertiesReservedDisk {
        AllocationSpecificSkuAllocationAllocatedInstancePropertiesReservedDisk {
            disk_size_gb: None,
            interface: None,
        }
    }
}
/// Specifies the disk interface to use for attaching this disk, which is either SCSI or NVME. The default is SCSI. For performance characteristics of SCSI over NVMe, see Local SSD performance.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Interface {
    #[serde(rename = "NVME")]
    Nvme,
    #[serde(rename = "SCSI")]
    Scsi,
}

impl Default for Interface {
    fn default() -> Interface {
        Self::Nvme
    }
}
