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

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

impl CreatePrimaryIpResponse {
    /// Response to POST https://api.hetzner.cloud/v1/primary_ips
    pub fn new(primary_ip: models::PrimaryIp) -> CreatePrimaryIpResponse {
        CreatePrimaryIpResponse {
            action: None,
            primary_ip: Box::new(primary_ip),
        }
    }
}