aws-sdk-location 0.26.0

AWS SDK for Amazon Location Service
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct BatchEvaluateGeofencesInput {
    /// <p>The geofence collection used in evaluating the position of devices against its geofences.</p>
    #[doc(hidden)]
    pub collection_name: std::option::Option<std::string::String>,
    /// <p>Contains device details for each device to be evaluated against the given geofence collection.</p>
    #[doc(hidden)]
    pub device_position_updates:
        std::option::Option<std::vec::Vec<crate::types::DevicePositionUpdate>>,
}
impl BatchEvaluateGeofencesInput {
    /// <p>The geofence collection used in evaluating the position of devices against its geofences.</p>
    pub fn collection_name(&self) -> std::option::Option<&str> {
        self.collection_name.as_deref()
    }
    /// <p>Contains device details for each device to be evaluated against the given geofence collection.</p>
    pub fn device_position_updates(
        &self,
    ) -> std::option::Option<&[crate::types::DevicePositionUpdate]> {
        self.device_position_updates.as_deref()
    }
}
impl BatchEvaluateGeofencesInput {
    /// Creates a new builder-style object to manufacture [`BatchEvaluateGeofencesInput`](crate::operation::batch_evaluate_geofences::BatchEvaluateGeofencesInput).
    pub fn builder(
    ) -> crate::operation::batch_evaluate_geofences::builders::BatchEvaluateGeofencesInputBuilder
    {
        crate::operation::batch_evaluate_geofences::builders::BatchEvaluateGeofencesInputBuilder::default()
    }
}

/// A builder for [`BatchEvaluateGeofencesInput`](crate::operation::batch_evaluate_geofences::BatchEvaluateGeofencesInput).
#[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 {
    /// <p>The geofence collection used in evaluating the position of devices against its geofences.</p>
    pub fn collection_name(mut self, input: impl Into<std::string::String>) -> Self {
        self.collection_name = Some(input.into());
        self
    }
    /// <p>The geofence collection used in evaluating the position of devices against its geofences.</p>
    pub fn set_collection_name(mut self, input: std::option::Option<std::string::String>) -> Self {
        self.collection_name = input;
        self
    }
    /// Appends an item to `device_position_updates`.
    ///
    /// To override the contents of this collection use [`set_device_position_updates`](Self::set_device_position_updates).
    ///
    /// <p>Contains device details for each device to be evaluated against the given geofence collection.</p>
    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
    }
    /// <p>Contains device details for each device to be evaluated against the given geofence collection.</p>
    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
    }
    /// Consumes the builder and constructs a [`BatchEvaluateGeofencesInput`](crate::operation::batch_evaluate_geofences::BatchEvaluateGeofencesInput).
    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,
            },
        )
    }
}