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

/// DataCenter : Data Center the Primary IP is located at. | Data Center this Resource is located at.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct DataCenter {
    /// Descriptive name for the Data Center.  Desired to be easy to understand for humans. Might be changed for cosmetic reasons. Do not use this as an identifier.
    #[serde(rename = "description")]
    pub description: String,
    /// ID of the Data Center.
    #[serde(rename = "id")]
    pub id: i64,
    #[serde(rename = "location")]
    pub location: Box<models::Location>,
    /// Unique name for the Data Center.  Can be used as a more descriptive identifier.
    #[serde(rename = "name")]
    pub name: String,
    #[serde(rename = "server_types")]
    pub server_types: Box<models::DataCenterServerTypes>,
}

impl DataCenter {
    /// Data Center the Primary IP is located at. | Data Center this Resource is located at.
    pub fn new(
        description: String,
        id: i64,
        location: models::Location,
        name: String,
        server_types: models::DataCenterServerTypes,
    ) -> DataCenter {
        DataCenter {
            description,
            id,
            location: Box::new(location),
            name,
            server_types: Box::new(server_types),
        }
    }
}