scaleway_api_rs 0.1.8

Generated library to interact with Scaleway API.
Documentation
/*
 * Account API
 *
 * # Introduction  The Account API allows you to manage projects. Project is Scaleway’s resource management feature. Designed to help you organize your infrastructure and cloud services, the feature allows resources to be isolated and grouped into specific projects.
 *
 * The version of the OpenAPI document: v2
 *
 * Generated by: https://openapi-generator.tech
 */

/// ScalewayInstanceV1ServerBootscript : The server bootscript

#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct ScalewayInstanceV1ServerBootscript {
    /// The bootscript arguments
    #[serde(rename = "bootcmdargs", skip_serializing_if = "Option::is_none")]
    pub bootcmdargs: Option<String>,
    /// Dispmay if the bootscript is the default bootscript if no other boot option is configured
    #[serde(rename = "default", skip_serializing_if = "Option::is_none")]
    pub default: Option<bool>,
    /// Provide information regarding a Device Tree Binary (dtb) for use with C1 servers
    #[serde(rename = "dtb", skip_serializing_if = "Option::is_none")]
    pub dtb: Option<String>,
    /// The bootscript ID
    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
    pub id: Option<String>,
    /// The initrd (initial ramdisk) configuration
    #[serde(rename = "initrd", skip_serializing_if = "Option::is_none")]
    pub initrd: Option<String>,
    /// The server kernel version
    #[serde(rename = "kernel", skip_serializing_if = "Option::is_none")]
    pub kernel: Option<String>,
    /// The bootscript organization ID
    #[serde(rename = "organization", skip_serializing_if = "Option::is_none")]
    pub organization: Option<String>,
    /// The bootscript project ID
    #[serde(rename = "project", skip_serializing_if = "Option::is_none")]
    pub project: Option<String>,
    /// Provide information if the bootscript is public
    #[serde(rename = "public", skip_serializing_if = "Option::is_none")]
    pub public: Option<bool>,
    /// The bootscript title
    #[serde(rename = "title", skip_serializing_if = "Option::is_none")]
    pub title: Option<String>,
    /// The bootscript arch
    #[serde(rename = "arch", skip_serializing_if = "Option::is_none")]
    pub arch: Option<Arch>,
    /// The zone in which is the bootscript
    #[serde(rename = "zone", skip_serializing_if = "Option::is_none")]
    pub zone: Option<String>,
}

impl ScalewayInstanceV1ServerBootscript {
    /// The server bootscript
    pub fn new() -> ScalewayInstanceV1ServerBootscript {
        ScalewayInstanceV1ServerBootscript {
            bootcmdargs: None,
            default: None,
            dtb: None,
            id: None,
            initrd: None,
            kernel: None,
            organization: None,
            project: None,
            public: None,
            title: None,
            arch: None,
            zone: None,
        }
    }
}

/// The bootscript arch
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Arch {
    #[serde(rename = "x86_64")]
    X8664,
    #[serde(rename = "arm")]
    Arm,
}

impl Default for Arch {
    fn default() -> Arch {
        Self::X8664
    }
}