/*
 * Hetzner Cloud API
 *
 * Copied from the official API documentation for the Public Hetzner Cloud.
 *
 * The version of the OpenAPI document: 4b3f595
 *
 * Generated by: https://openapi-generator.tech
 */

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

/// RebuildServerFromImageRequest : Request for POST https://api.hetzner.cloud/v1/servers/{id}/actions/rebuild
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct RebuildServerFromImageRequest {
    /// ID or name of Image to rebuilt from.
    #[serde(rename = "image")]
    pub image: String,
}

impl RebuildServerFromImageRequest {
    /// Request for POST https://api.hetzner.cloud/v1/servers/{id}/actions/rebuild
    pub fn new(image: String) -> RebuildServerFromImageRequest {
        RebuildServerFromImageRequest { image }
    }
}
