#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct BatchEvaluateGeofencesInput {
#[doc(hidden)]
pub collection_name: std::option::Option<std::string::String>,
#[doc(hidden)]
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,
) -> std::option::Option<&[crate::types::DevicePositionUpdate]> {
self.device_position_updates.as_deref()
}
}
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 Into<std::string::String>) -> Self {
self.collection_name = 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 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 = 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 build(
self,
) -> Result<
crate::operation::batch_evaluate_geofences::BatchEvaluateGeofencesInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(
crate::operation::batch_evaluate_geofences::BatchEvaluateGeofencesInput {
collection_name: self.collection_name,
device_position_updates: self.device_position_updates,
},
)
}
}