1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/*
* 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),
}
}
}