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 CreateFlexibleIpRequest {
    /// ID of the project to associate with the Flexible IP
    #[serde(rename = "project_id")]
    pub project_id: String,
    /// Description to associate with the Flexible IP, max 255 characters
    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
    pub description: Option<String>,
    /// Tags to associate to the Flexible IP
    #[serde(rename = "tags", skip_serializing_if = "Option::is_none")]
    pub tags: Option<Vec<String>>,
    /// Server ID on which to attach the created Flexible IP
    #[serde(
        rename = "server_id",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub server_id: Option<Option<String>>,
    /// Reverse DNS value
    #[serde(
        rename = "reverse",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub reverse: Option<Option<String>>,
    /// If true, creates a Flexible IP with an ipv6 address
    #[serde(rename = "is_ipv6", skip_serializing_if = "Option::is_none")]
    pub is_ipv6: Option<bool>,
}

impl CreateFlexibleIpRequest {
    pub fn new(project_id: String) -> CreateFlexibleIpRequest {
        CreateFlexibleIpRequest {
            project_id,
            description: None,
            tags: None,
            server_id: None,
            reverse: None,
            is_ipv6: None,
        }
    }
}