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 BatchDeleteGeofenceInput {
    /// <p>The geofence collection storing the geofences to be deleted.</p>
    #[doc(hidden)]
    pub collection_name: std::option::Option<std::string::String>,
    /// <p>The batch of geofences to be deleted.</p>
    #[doc(hidden)]
    pub geofence_ids: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl BatchDeleteGeofenceInput {
    /// <p>The geofence collection storing the geofences to be deleted.</p>
    pub fn collection_name(&self) -> std::option::Option<&str> {
        self.collection_name.as_deref()
    }
    /// <p>The batch of geofences to be deleted.</p>
    pub fn geofence_ids(&self) -> std::option::Option<&[std::string::String]> {
        self.geofence_ids.as_deref()
    }
}
impl BatchDeleteGeofenceInput {
    /// Creates a new builder-style object to manufacture [`BatchDeleteGeofenceInput`](crate::operation::batch_delete_geofence::BatchDeleteGeofenceInput).
    pub fn builder(
    ) -> crate::operation::batch_delete_geofence::builders::BatchDeleteGeofenceInputBuilder {
        crate::operation::batch_delete_geofence::builders::BatchDeleteGeofenceInputBuilder::default(
        )
    }
}

/// A builder for [`BatchDeleteGeofenceInput`](crate::operation::batch_delete_geofence::BatchDeleteGeofenceInput).
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct BatchDeleteGeofenceInputBuilder {
    pub(crate) collection_name: std::option::Option<std::string::String>,
    pub(crate) geofence_ids: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl BatchDeleteGeofenceInputBuilder {
    /// <p>The geofence collection storing the geofences to be deleted.</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 storing the geofences to be deleted.</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 `geofence_ids`.
    ///
    /// To override the contents of this collection use [`set_geofence_ids`](Self::set_geofence_ids).
    ///
    /// <p>The batch of geofences to be deleted.</p>
    pub fn geofence_ids(mut self, input: impl Into<std::string::String>) -> Self {
        let mut v = self.geofence_ids.unwrap_or_default();
        v.push(input.into());
        self.geofence_ids = Some(v);
        self
    }
    /// <p>The batch of geofences to be deleted.</p>
    pub fn set_geofence_ids(
        mut self,
        input: std::option::Option<std::vec::Vec<std::string::String>>,
    ) -> Self {
        self.geofence_ids = input;
        self
    }
    /// Consumes the builder and constructs a [`BatchDeleteGeofenceInput`](crate::operation::batch_delete_geofence::BatchDeleteGeofenceInput).
    pub fn build(
        self,
    ) -> Result<
        crate::operation::batch_delete_geofence::BatchDeleteGeofenceInput,
        aws_smithy_http::operation::error::BuildError,
    > {
        Ok(
            crate::operation::batch_delete_geofence::BatchDeleteGeofenceInput {
                collection_name: self.collection_name,
                geofence_ids: self.geofence_ids,
            },
        )
    }
}