#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct BatchEvaluateGeofencesInput {
pub collection_name: ::std::option::Option<::std::string::String>,
pub device_position_updates: ::std::option::Option<::std::vec::Vec<crate::types::DevicePositionUpdate>>,
}
impl BatchEvaluateGeofencesInput {
pub fn collection_name(&self) -> ::std::option::Option<&str> {
self.collection_name.as_deref()
}
pub fn device_position_updates(&self) -> &[crate::types::DevicePositionUpdate] {
self.device_position_updates.as_deref().unwrap_or_default()
}
}
impl BatchEvaluateGeofencesInput {
pub fn builder() -> crate::operation::batch_evaluate_geofences::builders::BatchEvaluateGeofencesInputBuilder {
crate::operation::batch_evaluate_geofences::builders::BatchEvaluateGeofencesInputBuilder::default()
}
}
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct BatchEvaluateGeofencesInputBuilder {
pub(crate) collection_name: ::std::option::Option<::std::string::String>,
pub(crate) device_position_updates: ::std::option::Option<::std::vec::Vec<crate::types::DevicePositionUpdate>>,
}
impl BatchEvaluateGeofencesInputBuilder {
pub fn collection_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.collection_name = ::std::option::Option::Some(input.into());
self
}
pub fn set_collection_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.collection_name = input;
self
}
pub fn get_collection_name(&self) -> &::std::option::Option<::std::string::String> {
&self.collection_name
}
pub fn device_position_updates(mut self, input: crate::types::DevicePositionUpdate) -> Self {
let mut v = self.device_position_updates.unwrap_or_default();
v.push(input);
self.device_position_updates = ::std::option::Option::Some(v);
self
}
pub fn set_device_position_updates(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::DevicePositionUpdate>>) -> Self {
self.device_position_updates = input;
self
}
pub fn get_device_position_updates(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::DevicePositionUpdate>> {
&self.device_position_updates
}
pub fn build(
self,
) -> ::std::result::Result<
crate::operation::batch_evaluate_geofences::BatchEvaluateGeofencesInput,
::aws_smithy_types::error::operation::BuildError,
> {
::std::result::Result::Ok(crate::operation::batch_evaluate_geofences::BatchEvaluateGeofencesInput {
collection_name: self.collection_name,
device_position_updates: self.device_position_updates,
})
}
}