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
use super::*;

/// <https://vk.com/dev/objects/geo>
#[derive(Deserialize, Clone, Debug)]
pub struct Geo {
    #[serde(rename = "type")]
    pub type_: String,

    pub coordinates: Coordinates,
    pub place: Option<Place>,
}

#[derive(Deserialize, Copy, Clone, Debug)]
pub struct Coordinates {
    pub latitude: Number,
    pub longitude: Number,
}

#[derive(Deserialize, Clone, Debug)]
pub struct City {
    pub id: Option<Integer>,
    pub title: Option<String>,
}

#[derive(Deserialize, Clone, Debug)]
pub struct Country {
    pub id: Option<Integer>,
    pub title: Option<String>,
}

#[derive(Deserialize, Clone, Debug)]
pub struct Place {
    pub id: Option<Integer>,
    pub title: Option<String>,
    pub latitude: Number,
    pub longitude: Number,
    pub created: Option<Integer>,
    pub icon: String,
    pub country: String,
    pub city: String,

    // Optional
    #[serde(rename = "type")]
    pub type_: Option<String>,

    pub group_id: Option<Integer>,
    pub group_photo: Option<String>,
    pub checkins: Option<Integer>,
    pub updated: Option<Integer>,
    pub address: Option<Integer>,
}