#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Geometry {
pub r#type: ::std::string::String,
pub coordinates: ::std::vec::Vec<::std::vec::Vec<::std::vec::Vec<f64>>>,
}
impl Geometry {
pub fn r#type(&self) -> &str {
use std::ops::Deref;
self.r#type.deref()
}
pub fn coordinates(&self) -> &[::std::vec::Vec<::std::vec::Vec<f64>>] {
use std::ops::Deref;
self.coordinates.deref()
}
}
impl Geometry {
pub fn builder() -> crate::types::builders::GeometryBuilder {
crate::types::builders::GeometryBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GeometryBuilder {
pub(crate) r#type: ::std::option::Option<::std::string::String>,
pub(crate) coordinates: ::std::option::Option<::std::vec::Vec<::std::vec::Vec<::std::vec::Vec<f64>>>>,
}
impl GeometryBuilder {
pub fn r#type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.r#type = ::std::option::Option::Some(input.into());
self
}
pub fn set_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.r#type = input;
self
}
pub fn get_type(&self) -> &::std::option::Option<::std::string::String> {
&self.r#type
}
pub fn coordinates(mut self, input: ::std::vec::Vec<::std::vec::Vec<f64>>) -> Self {
let mut v = self.coordinates.unwrap_or_default();
v.push(input);
self.coordinates = ::std::option::Option::Some(v);
self
}
pub fn set_coordinates(mut self, input: ::std::option::Option<::std::vec::Vec<::std::vec::Vec<::std::vec::Vec<f64>>>>) -> Self {
self.coordinates = input;
self
}
pub fn get_coordinates(&self) -> &::std::option::Option<::std::vec::Vec<::std::vec::Vec<::std::vec::Vec<f64>>>> {
&self.coordinates
}
pub fn build(self) -> ::std::result::Result<crate::types::Geometry, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::types::Geometry {
r#type: self.r#type.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"r#type",
"r#type was not specified but it is required when building Geometry",
)
})?,
coordinates: self.coordinates.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"coordinates",
"coordinates was not specified but it is required when building Geometry",
)
})?,
})
}
}