hcloud 0.25.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.28.0
 *
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

/// AttachVolumeToServerRequest : Request for POST https://api.hetzner.cloud/v1/volumes/{id}/actions/attach
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct AttachVolumeToServerRequest {
    /// Auto-mount the Volume after attaching it.
    #[serde(rename = "automount", skip_serializing_if = "Option::is_none")]
    pub automount: Option<bool>,
    /// ID of the Server the Volume will be attached to.
    #[serde(rename = "server")]
    pub server: i64,
}

impl AttachVolumeToServerRequest {
    /// Request for POST https://api.hetzner.cloud/v1/volumes/{id}/actions/attach
    pub fn new(server: i64) -> AttachVolumeToServerRequest {
        AttachVolumeToServerRequest {
            automount: None,
            server,
        }
    }
}