#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct BatchPutGeofenceInput {
#[doc(hidden)]
pub collection_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub entries: std::option::Option<std::vec::Vec<crate::types::BatchPutGeofenceRequestEntry>>,
}
impl BatchPutGeofenceInput {
pub fn collection_name(&self) -> std::option::Option<&str> {
self.collection_name.as_deref()
}
pub fn entries(&self) -> std::option::Option<&[crate::types::BatchPutGeofenceRequestEntry]> {
self.entries.as_deref()
}
}
impl BatchPutGeofenceInput {
pub fn builder() -> crate::operation::batch_put_geofence::builders::BatchPutGeofenceInputBuilder
{
crate::operation::batch_put_geofence::builders::BatchPutGeofenceInputBuilder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct BatchPutGeofenceInputBuilder {
pub(crate) collection_name: std::option::Option<std::string::String>,
pub(crate) entries:
std::option::Option<std::vec::Vec<crate::types::BatchPutGeofenceRequestEntry>>,
}
impl BatchPutGeofenceInputBuilder {
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 entries(mut self, input: crate::types::BatchPutGeofenceRequestEntry) -> Self {
let mut v = self.entries.unwrap_or_default();
v.push(input);
self.entries = Some(v);
self
}
pub fn set_entries(
mut self,
input: std::option::Option<std::vec::Vec<crate::types::BatchPutGeofenceRequestEntry>>,
) -> Self {
self.entries = input;
self
}
pub fn build(
self,
) -> Result<
crate::operation::batch_put_geofence::BatchPutGeofenceInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(
crate::operation::batch_put_geofence::BatchPutGeofenceInput {
collection_name: self.collection_name,
entries: self.entries,
},
)
}
}