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};

/// CreateSnapshotResponse : Response to POST https://api.hetzner.com/v1/storage_boxes/{id}/snapshots
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct CreateSnapshotResponse {
    #[serde(rename = "action")]
    pub action: Box<models::Action>,
    #[serde(rename = "snapshot")]
    pub snapshot: Box<models::CreateSnapshotResponseSnapshot>,
}

impl CreateSnapshotResponse {
    /// Response to POST https://api.hetzner.com/v1/storage_boxes/{id}/snapshots
    pub fn new(
        action: models::Action,
        snapshot: models::CreateSnapshotResponseSnapshot,
    ) -> CreateSnapshotResponse {
        CreateSnapshotResponse {
            action: Box::new(action),
            snapshot: Box::new(snapshot),
        }
    }
}