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

/// DataCenter : Data Center of the Primary IP.  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 {
    /// **Deprecated**: This property is deprecated and will be removed after the 1 July 2026. Use the `location` property instead.  Data Center of the Primary IP.  | **Deprecated**: This property is deprecated and will be removed after the 1 July 2026. Use the `location` property instead.  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),
        }
    }
}
