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
/*
 * Hetzner Cloud API
 *
 * Copied from the official API documentation for the Public Hetzner Cloud.
 *
 * The version of the OpenAPI document: 0.1.0
 * 
 * Generated by: https://openapi-generator.tech
 */

/// ListDatacentersResponse : Response to GET https://api.hetzner.cloud/v1/datacenters



#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct ListDatacentersResponse {
    #[serde(rename = "datacenters")]
    pub datacenters: Vec<crate::models::Datacenter>,
    /// The Datacenter which is recommended to be used to create new Servers.
    #[serde(rename = "recommendation")]
    pub recommendation: i32,
}

impl ListDatacentersResponse {
    /// Response to GET https://api.hetzner.cloud/v1/datacenters
    pub fn new(datacenters: Vec<crate::models::Datacenter>, recommendation: i32) -> ListDatacentersResponse {
        ListDatacentersResponse {
            datacenters,
            recommendation,
        }
    }
}