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
67
68
69
70
71
72
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>Provides geographic coordinates that indicate where a specified IP address originated from.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct IpGeoLocation {
    /// <p>The latitude coordinate of the location, rounded to four decimal places.</p>
    pub lat: ::std::option::Option<f64>,
    /// <p>The longitude coordinate of the location, rounded to four decimal places.</p>
    pub lon: ::std::option::Option<f64>,
}
impl IpGeoLocation {
    /// <p>The latitude coordinate of the location, rounded to four decimal places.</p>
    pub fn lat(&self) -> ::std::option::Option<f64> {
        self.lat
    }
    /// <p>The longitude coordinate of the location, rounded to four decimal places.</p>
    pub fn lon(&self) -> ::std::option::Option<f64> {
        self.lon
    }
}
impl IpGeoLocation {
    /// Creates a new builder-style object to manufacture [`IpGeoLocation`](crate::types::IpGeoLocation).
    pub fn builder() -> crate::types::builders::IpGeoLocationBuilder {
        crate::types::builders::IpGeoLocationBuilder::default()
    }
}

/// A builder for [`IpGeoLocation`](crate::types::IpGeoLocation).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct IpGeoLocationBuilder {
    pub(crate) lat: ::std::option::Option<f64>,
    pub(crate) lon: ::std::option::Option<f64>,
}
impl IpGeoLocationBuilder {
    /// <p>The latitude coordinate of the location, rounded to four decimal places.</p>
    pub fn lat(mut self, input: f64) -> Self {
        self.lat = ::std::option::Option::Some(input);
        self
    }
    /// <p>The latitude coordinate of the location, rounded to four decimal places.</p>
    pub fn set_lat(mut self, input: ::std::option::Option<f64>) -> Self {
        self.lat = input;
        self
    }
    /// <p>The latitude coordinate of the location, rounded to four decimal places.</p>
    pub fn get_lat(&self) -> &::std::option::Option<f64> {
        &self.lat
    }
    /// <p>The longitude coordinate of the location, rounded to four decimal places.</p>
    pub fn lon(mut self, input: f64) -> Self {
        self.lon = ::std::option::Option::Some(input);
        self
    }
    /// <p>The longitude coordinate of the location, rounded to four decimal places.</p>
    pub fn set_lon(mut self, input: ::std::option::Option<f64>) -> Self {
        self.lon = input;
        self
    }
    /// <p>The longitude coordinate of the location, rounded to four decimal places.</p>
    pub fn get_lon(&self) -> &::std::option::Option<f64> {
        &self.lon
    }
    /// Consumes the builder and constructs a [`IpGeoLocation`](crate::types::IpGeoLocation).
    pub fn build(self) -> crate::types::IpGeoLocation {
        crate::types::IpGeoLocation {
            lat: self.lat,
            lon: self.lon,
        }
    }
}