Skip to main content

hcloud/models/
get_data_center_response.rs

1/*
2 * Hetzner Cloud API
3 *
4 * Copied from the official API documentation for the Public Hetzner Cloud.
5 *
6 * The version of the OpenAPI document: 4b3f595
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// GetDataCenterResponse : Response to GET https://api.hetzner.cloud/v1/datacenters/{id}
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct GetDataCenterResponse {
17    #[serde(rename = "datacenter")]
18    pub datacenter: Box<models::DataCenter>,
19}
20
21impl GetDataCenterResponse {
22    /// Response to GET https://api.hetzner.cloud/v1/datacenters/{id}
23    pub fn new(datacenter: models::DataCenter) -> GetDataCenterResponse {
24        GetDataCenterResponse {
25            datacenter: Box::new(datacenter),
26        }
27    }
28}