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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
/*
* 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};
/// Location : Location the Data Center is located at. | Location of the Volume. Volume can only be attached to Servers in the same Location. | Location of the Storage Box.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct Location {
/// Name of the closest city to the Location. City name or city name and state in short form. E.g. `Falkenstein` or `Ashburn, VA`.
#[serde(rename = "city")]
pub city: String,
/// Country the Location resides in. ISO 3166-1 alpha-2 code of the country.
#[serde(rename = "country")]
pub country: String,
/// Human readable description of the Location.
#[serde(rename = "description")]
pub description: String,
/// ID of the Location.
#[serde(rename = "id")]
pub id: i64,
/// Latitude of the city closest to the Location.
#[serde(rename = "latitude")]
pub latitude: f64,
/// Longitude of the city closest to the Location.
#[serde(rename = "longitude")]
pub longitude: f64,
/// Unique identifier of the Location.
#[serde(rename = "name")]
pub name: String,
/// Name of the Network Zone this Location resides in.
#[serde(rename = "network_zone")]
pub network_zone: String,
}
impl Location {
/// Location the Data Center is located at. | Location of the Volume. Volume can only be attached to Servers in the same Location. | Location of the Storage Box.
pub fn new(
city: String,
country: String,
description: String,
id: i64,
latitude: f64,
longitude: f64,
name: String,
network_zone: String,
) -> Location {
Location {
city,
country,
description,
id,
latitude,
longitude,
name,
network_zone,
}
}
}