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
 */

#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct UpdateServer1Request {
    /// Name of the server
    #[serde(
        rename = "name",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub name: Option<Option<String>>,
    #[serde(rename = "boot_type", skip_serializing_if = "Option::is_none")]
    pub boot_type: Option<crate::models::ScalewayPeriodInstancePeriodV1PeriodBootType>,
    /// Tags of the server
    #[serde(
        rename = "tags",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub tags: Option<Option<Vec<String>>>,
    #[serde(rename = "volumes", skip_serializing_if = "Option::is_none")]
    pub volumes: Option<crate::models::UpdateServer1RequestVolumes>,
    #[serde(
        rename = "bootscript",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub bootscript: Option<Option<String>>,
    #[serde(
        rename = "dynamic_ip_required",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub dynamic_ip_required: Option<Option<bool>>,
    #[serde(
        rename = "enable_ipv6",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub enable_ipv6: Option<Option<bool>>,
    #[serde(
        rename = "protected",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub protected: Option<Option<bool>>,
    #[serde(rename = "security_group", skip_serializing_if = "Option::is_none")]
    pub security_group:
        Option<Box<crate::models::ScalewayPeriodInstancePeriodV1PeriodSecurityGroupTemplate>>,
    /// Placement group ID if server must be part of a placement group
    #[serde(
        rename = "placement_group",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub placement_group: Option<Option<String>>,
    /// The server private NICs
    #[serde(rename = "private_nics", skip_serializing_if = "Option::is_none")]
    pub private_nics: Option<Vec<crate::models::ScalewayPeriodInstancePeriodV1PeriodPrivateNic>>,
}

impl UpdateServer1Request {
    pub fn new() -> UpdateServer1Request {
        UpdateServer1Request {
            name: None,
            boot_type: None,
            tags: None,
            volumes: None,
            bootscript: None,
            dynamic_ip_required: None,
            enable_ipv6: None,
            protected: None,
            security_group: None,
            placement_group: None,
            private_nics: None,
        }
    }
}