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

/// CreateFloatingIpResponse : Response to POST https://api.hetzner.cloud/v1/floating_ips
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct CreateFloatingIpResponse {
    #[serde(rename = "action", skip_serializing_if = "Option::is_none")]
    pub action: Option<Box<models::Action>>,
    #[serde(rename = "floating_ip")]
    pub floating_ip: Box<models::FloatingIp>,
}

impl CreateFloatingIpResponse {
    /// Response to POST https://api.hetzner.cloud/v1/floating_ips
    pub fn new(floating_ip: models::FloatingIp) -> CreateFloatingIpResponse {
        CreateFloatingIpResponse {
            action: None,
            floating_ip: Box::new(floating_ip),
        }
    }
}
