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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>A circle on the earth, as defined by a center point and a radius.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
pub struct Circle {
    /// <p>A single point geometry, specifying the center of the circle, using <a href="https://gisgeography.com/wgs84-world-geodetic-system/">WGS 84</a> coordinates, in the form <code>[longitude, latitude]</code>.</p>
    pub center: ::std::vec::Vec<f64>,
    /// <p>The radius of the circle in meters. Must be greater than zero and no larger than 100,000 (100 kilometers).</p>
    pub radius: f64,
}
impl Circle {
    /// <p>A single point geometry, specifying the center of the circle, using <a href="https://gisgeography.com/wgs84-world-geodetic-system/">WGS 84</a> coordinates, in the form <code>[longitude, latitude]</code>.</p>
    pub fn center(&self) -> &[f64] {
        use std::ops::Deref;
        self.center.deref()
    }
    /// <p>The radius of the circle in meters. Must be greater than zero and no larger than 100,000 (100 kilometers).</p>
    pub fn radius(&self) -> f64 {
        self.radius
    }
}
impl ::std::fmt::Debug for Circle {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("Circle");
        formatter.field("center", &"*** Sensitive Data Redacted ***");
        formatter.field("radius", &"*** Sensitive Data Redacted ***");
        formatter.finish()
    }
}
impl Circle {
    /// Creates a new builder-style object to manufacture [`Circle`](crate::types::Circle).
    pub fn builder() -> crate::types::builders::CircleBuilder {
        crate::types::builders::CircleBuilder::default()
    }
}

/// A builder for [`Circle`](crate::types::Circle).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
pub struct CircleBuilder {
    pub(crate) center: ::std::option::Option<::std::vec::Vec<f64>>,
    pub(crate) radius: ::std::option::Option<f64>,
}
impl CircleBuilder {
    /// Appends an item to `center`.
    ///
    /// To override the contents of this collection use [`set_center`](Self::set_center).
    ///
    /// <p>A single point geometry, specifying the center of the circle, using <a href="https://gisgeography.com/wgs84-world-geodetic-system/">WGS 84</a> coordinates, in the form <code>[longitude, latitude]</code>.</p>
    pub fn center(mut self, input: f64) -> Self {
        let mut v = self.center.unwrap_or_default();
        v.push(input);
        self.center = ::std::option::Option::Some(v);
        self
    }
    /// <p>A single point geometry, specifying the center of the circle, using <a href="https://gisgeography.com/wgs84-world-geodetic-system/">WGS 84</a> coordinates, in the form <code>[longitude, latitude]</code>.</p>
    pub fn set_center(mut self, input: ::std::option::Option<::std::vec::Vec<f64>>) -> Self {
        self.center = input;
        self
    }
    /// <p>A single point geometry, specifying the center of the circle, using <a href="https://gisgeography.com/wgs84-world-geodetic-system/">WGS 84</a> coordinates, in the form <code>[longitude, latitude]</code>.</p>
    pub fn get_center(&self) -> &::std::option::Option<::std::vec::Vec<f64>> {
        &self.center
    }
    /// <p>The radius of the circle in meters. Must be greater than zero and no larger than 100,000 (100 kilometers).</p>
    /// This field is required.
    pub fn radius(mut self, input: f64) -> Self {
        self.radius = ::std::option::Option::Some(input);
        self
    }
    /// <p>The radius of the circle in meters. Must be greater than zero and no larger than 100,000 (100 kilometers).</p>
    pub fn set_radius(mut self, input: ::std::option::Option<f64>) -> Self {
        self.radius = input;
        self
    }
    /// <p>The radius of the circle in meters. Must be greater than zero and no larger than 100,000 (100 kilometers).</p>
    pub fn get_radius(&self) -> &::std::option::Option<f64> {
        &self.radius
    }
    /// Consumes the builder and constructs a [`Circle`](crate::types::Circle).
    /// This method will fail if any of the following fields are not set:
    /// - [`center`](crate::types::builders::CircleBuilder::center)
    /// - [`radius`](crate::types::builders::CircleBuilder::radius)
    pub fn build(self) -> ::std::result::Result<crate::types::Circle, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::types::Circle {
            center: self.center.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "center",
                    "center was not specified but it is required when building Circle",
                )
            })?,
            radius: self.radius.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "radius",
                    "radius was not specified but it is required when building Circle",
                )
            })?,
        })
    }
}
impl ::std::fmt::Debug for CircleBuilder {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("CircleBuilder");
        formatter.field("center", &"*** Sensitive Data Redacted ***");
        formatter.field("radius", &"*** Sensitive Data Redacted ***");
        formatter.finish()
    }
}