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 CreateServerRequest {
    /// Offer ID of the new server
    #[serde(rename = "offer_id")]
    pub offer_id: String,
    /// Organization ID with which the server will be created
    #[serde(rename = "organization_id", skip_serializing_if = "Option::is_none")]
    pub organization_id: Option<String>,
    /// Project ID with which the server will be created
    #[serde(rename = "project_id", skip_serializing_if = "Option::is_none")]
    pub project_id: Option<String>,
    /// Name of the server (≠hostname)
    #[serde(rename = "name")]
    pub name: String,
    /// Description associated to the server, max 255 characters
    #[serde(rename = "description")]
    pub description: String,
    /// Tags to associate to the server
    #[serde(rename = "tags", skip_serializing_if = "Option::is_none")]
    pub tags: Option<Vec<String>>,
    #[serde(rename = "install", skip_serializing_if = "Option::is_none")]
    pub install: Option<Box<crate::models::CreateServerRequestInstall>>,
    /// IDs of options to enable on server
    #[serde(rename = "option_ids", skip_serializing_if = "Option::is_none")]
    pub option_ids: Option<Vec<String>>,
}

impl CreateServerRequest {
    pub fn new(offer_id: String, name: String, description: String) -> CreateServerRequest {
        CreateServerRequest {
            offer_id,
            organization_id: None,
            project_id: None,
            name,
            description,
            tags: None,
            install: None,
            option_ids: None,
        }
    }
}