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 PutGeofenceInput {
    /// <p>The geofence collection to store the geofence in.</p>
    #[doc(hidden)]
    pub collection_name: std::option::Option<std::string::String>,
    /// <p>An identifier for the geofence. For example, <code>ExampleGeofence-1</code>.</p>
    #[doc(hidden)]
    pub geofence_id: std::option::Option<std::string::String>,
    /// <p>Contains the details to specify the position of the geofence. Can be either a polygon or a circle. Including both will return a validation error.</p> <note>
    /// <p>Each <a href="https://docs.aws.amazon.com/location-geofences/latest/APIReference/API_GeofenceGeometry.html"> geofence polygon</a> can have a maximum of 1,000 vertices.</p>
    /// </note>
    #[doc(hidden)]
    pub geometry: std::option::Option<crate::types::GeofenceGeometry>,
}
impl PutGeofenceInput {
    /// <p>The geofence collection to store the geofence in.</p>
    pub fn collection_name(&self) -> std::option::Option<&str> {
        self.collection_name.as_deref()
    }
    /// <p>An identifier for the geofence. For example, <code>ExampleGeofence-1</code>.</p>
    pub fn geofence_id(&self) -> std::option::Option<&str> {
        self.geofence_id.as_deref()
    }
    /// <p>Contains the details to specify the position of the geofence. Can be either a polygon or a circle. Including both will return a validation error.</p> <note>
    /// <p>Each <a href="https://docs.aws.amazon.com/location-geofences/latest/APIReference/API_GeofenceGeometry.html"> geofence polygon</a> can have a maximum of 1,000 vertices.</p>
    /// </note>
    pub fn geometry(&self) -> std::option::Option<&crate::types::GeofenceGeometry> {
        self.geometry.as_ref()
    }
}
impl PutGeofenceInput {
    /// Creates a new builder-style object to manufacture [`PutGeofenceInput`](crate::operation::put_geofence::PutGeofenceInput).
    pub fn builder() -> crate::operation::put_geofence::builders::PutGeofenceInputBuilder {
        crate::operation::put_geofence::builders::PutGeofenceInputBuilder::default()
    }
}

/// A builder for [`PutGeofenceInput`](crate::operation::put_geofence::PutGeofenceInput).
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct PutGeofenceInputBuilder {
    pub(crate) collection_name: std::option::Option<std::string::String>,
    pub(crate) geofence_id: std::option::Option<std::string::String>,
    pub(crate) geometry: std::option::Option<crate::types::GeofenceGeometry>,
}
impl PutGeofenceInputBuilder {
    /// <p>The geofence collection to store the geofence in.</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 to store the geofence in.</p>
    pub fn set_collection_name(mut self, input: std::option::Option<std::string::String>) -> Self {
        self.collection_name = input;
        self
    }
    /// <p>An identifier for the geofence. For example, <code>ExampleGeofence-1</code>.</p>
    pub fn geofence_id(mut self, input: impl Into<std::string::String>) -> Self {
        self.geofence_id = Some(input.into());
        self
    }
    /// <p>An identifier for the geofence. For example, <code>ExampleGeofence-1</code>.</p>
    pub fn set_geofence_id(mut self, input: std::option::Option<std::string::String>) -> Self {
        self.geofence_id = input;
        self
    }
    /// <p>Contains the details to specify the position of the geofence. Can be either a polygon or a circle. Including both will return a validation error.</p> <note>
    /// <p>Each <a href="https://docs.aws.amazon.com/location-geofences/latest/APIReference/API_GeofenceGeometry.html"> geofence polygon</a> can have a maximum of 1,000 vertices.</p>
    /// </note>
    pub fn geometry(mut self, input: crate::types::GeofenceGeometry) -> Self {
        self.geometry = Some(input);
        self
    }
    /// <p>Contains the details to specify the position of the geofence. Can be either a polygon or a circle. Including both will return a validation error.</p> <note>
    /// <p>Each <a href="https://docs.aws.amazon.com/location-geofences/latest/APIReference/API_GeofenceGeometry.html"> geofence polygon</a> can have a maximum of 1,000 vertices.</p>
    /// </note>
    pub fn set_geometry(
        mut self,
        input: std::option::Option<crate::types::GeofenceGeometry>,
    ) -> Self {
        self.geometry = input;
        self
    }
    /// Consumes the builder and constructs a [`PutGeofenceInput`](crate::operation::put_geofence::PutGeofenceInput).
    pub fn build(
        self,
    ) -> Result<
        crate::operation::put_geofence::PutGeofenceInput,
        aws_smithy_http::operation::error::BuildError,
    > {
        Ok(crate::operation::put_geofence::PutGeofenceInput {
            collection_name: self.collection_name,
            geofence_id: self.geofence_id,
            geometry: self.geometry,
        })
    }
}