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

/// The root object of <https://ip-ranges.amazonaws.com/ip-ranges.json>.
#[derive(Debug, Clone)]
pub struct IpRanges {
        pub sync_token: &'static str,
        pub create_date: &'static str,
    pub prefixes: &'static [Prefix],
    pub ipv6_prefixes: &'static [Ipv6Prefix],
}

/// The objects inside the `prefixes` list of
/// <https://ip-ranges.amazonaws.com/ip-ranges.json>.
#[derive(Debug, Clone)]
pub struct Prefix {
    pub ip_prefix: &'static str,
    pub region: &'static str,
    pub service: &'static str,
    pub network_border_group: &'static str,
}

/// The objects inside the `ipv6_prefixes` list of
/// <https://ip-ranges.amazonaws.com/ip-ranges.json>.
#[derive(Debug, Clone)]
pub struct Ipv6Prefix {
    pub ipv6_prefix: &'static str,
    pub region: &'static str,
    pub service: &'static str,
    pub network_border_group: &'static str,
}