aws-sdk-location 0.36.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>
    pub collection_name: ::std::option::Option<::std::string::String>,
    /// <p>The batch of geofences to be deleted.</p>
    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>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.geofence_ids.is_none()`.
    pub fn geofence_ids(&self) -> &[::std::string::String] {
        self.geofence_ids.as_deref().unwrap_or_default()
    }
}
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>
    /// This field is required.
    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
    }
    /// <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
    }
    /// <p>The geofence collection storing the geofences to be deleted.</p>
    pub fn get_collection_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.collection_name
    }
    /// 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 ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.geofence_ids.unwrap_or_default();
        v.push(input.into());
        self.geofence_ids = ::std::option::Option::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
    }
    /// <p>The batch of geofences to be deleted.</p>
    pub fn get_geofence_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.geofence_ids
    }
    /// Consumes the builder and constructs a [`BatchDeleteGeofenceInput`](crate::operation::batch_delete_geofence::BatchDeleteGeofenceInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::batch_delete_geofence::BatchDeleteGeofenceInput, ::aws_smithy_types::error::operation::BuildError>
    {
        ::std::result::Result::Ok(crate::operation::batch_delete_geofence::BatchDeleteGeofenceInput {
            collection_name: self.collection_name,
            geofence_ids: self.geofence_ids,
        })
    }
}