hcloud 0.13.0

Unofficial Rust crate for accessing the Hetzner Cloud API
Documentation
/*
 * Hetzner Cloud API
 *
 * Copied from the official API documentation for the Public Hetzner Cloud.
 *
 * The version of the OpenAPI document: 0.12.0
 *
 * Generated by: https://openapi-generator.tech
 */

/// CreateServerResponse : Response to POST https://api.hetzner.cloud/v1/servers

#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct CreateServerResponse {
    #[serde(rename = "action")]
    pub action: Box<crate::models::Action>,
    #[serde(rename = "next_actions")]
    pub next_actions: Vec<crate::models::Action>,
    /// Root password when no SSH keys have been specified
    #[serde(rename = "root_password")]
    pub root_password: Option<String>,
    #[serde(rename = "server")]
    pub server: Box<crate::models::Server>,
}

impl CreateServerResponse {
    #![allow(clippy::too_many_arguments)]
    /// Response to POST https://api.hetzner.cloud/v1/servers
    pub fn new(
        action: crate::models::Action,
        next_actions: Vec<crate::models::Action>,
        root_password: Option<String>,
        server: crate::models::Server,
    ) -> CreateServerResponse {
        CreateServerResponse {
            action: Box::new(action),
            next_actions,
            root_password,
            server: Box::new(server),
        }
    }
}