aws-sdk-location 1.62.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 GetDevicePositionInput {
    /// <p>The tracker resource receiving the position update.</p>
    pub tracker_name: ::std::option::Option<::std::string::String>,
    /// <p>The device whose position you want to retrieve.</p>
    pub device_id: ::std::option::Option<::std::string::String>,
}
impl GetDevicePositionInput {
    /// <p>The tracker resource receiving the position update.</p>
    pub fn tracker_name(&self) -> ::std::option::Option<&str> {
        self.tracker_name.as_deref()
    }
    /// <p>The device whose position you want to retrieve.</p>
    pub fn device_id(&self) -> ::std::option::Option<&str> {
        self.device_id.as_deref()
    }
}
impl GetDevicePositionInput {
    /// Creates a new builder-style object to manufacture [`GetDevicePositionInput`](crate::operation::get_device_position::GetDevicePositionInput).
    pub fn builder() -> crate::operation::get_device_position::builders::GetDevicePositionInputBuilder {
        crate::operation::get_device_position::builders::GetDevicePositionInputBuilder::default()
    }
}

/// A builder for [`GetDevicePositionInput`](crate::operation::get_device_position::GetDevicePositionInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetDevicePositionInputBuilder {
    pub(crate) tracker_name: ::std::option::Option<::std::string::String>,
    pub(crate) device_id: ::std::option::Option<::std::string::String>,
}
impl GetDevicePositionInputBuilder {
    /// <p>The tracker resource receiving the position update.</p>
    /// This field is required.
    pub fn tracker_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.tracker_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The tracker resource receiving the position update.</p>
    pub fn set_tracker_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.tracker_name = input;
        self
    }
    /// <p>The tracker resource receiving the position update.</p>
    pub fn get_tracker_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.tracker_name
    }
    /// <p>The device whose position you want to retrieve.</p>
    /// This field is required.
    pub fn device_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.device_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The device whose position you want to retrieve.</p>
    pub fn set_device_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.device_id = input;
        self
    }
    /// <p>The device whose position you want to retrieve.</p>
    pub fn get_device_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.device_id
    }
    /// Consumes the builder and constructs a [`GetDevicePositionInput`](crate::operation::get_device_position::GetDevicePositionInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::get_device_position::GetDevicePositionInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::get_device_position::GetDevicePositionInput {
            tracker_name: self.tracker_name,
            device_id: self.device_id,
        })
    }
}