#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Location {
pub latitude: f64,
pub longitude: f64,
}
impl Location {
pub fn latitude(&self) -> f64 {
self.latitude
}
pub fn longitude(&self) -> f64 {
self.longitude
}
}
impl Location {
pub fn builder() -> crate::types::builders::LocationBuilder {
crate::types::builders::LocationBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct LocationBuilder {
pub(crate) latitude: ::std::option::Option<f64>,
pub(crate) longitude: ::std::option::Option<f64>,
}
impl LocationBuilder {
pub fn latitude(mut self, input: f64) -> Self {
self.latitude = ::std::option::Option::Some(input);
self
}
pub fn set_latitude(mut self, input: ::std::option::Option<f64>) -> Self {
self.latitude = input;
self
}
pub fn get_latitude(&self) -> &::std::option::Option<f64> {
&self.latitude
}
pub fn longitude(mut self, input: f64) -> Self {
self.longitude = ::std::option::Option::Some(input);
self
}
pub fn set_longitude(mut self, input: ::std::option::Option<f64>) -> Self {
self.longitude = input;
self
}
pub fn get_longitude(&self) -> &::std::option::Option<f64> {
&self.longitude
}
pub fn build(self) -> ::std::result::Result<crate::types::Location, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::types::Location {
latitude: self.latitude.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"latitude",
"latitude was not specified but it is required when building Location",
)
})?,
longitude: self.longitude.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"longitude",
"longitude was not specified but it is required when building Location",
)
})?,
})
}
}