aws-sdk-iotwireless 1.108.0

AWS SDK for AWS IoT Wireless
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[deprecated(note = "This operation is no longer supported.")]
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct GetPositionOutput {
    /// <p>The position information of the resource.</p>
    pub position: ::std::option::Option<::std::vec::Vec<f32>>,
    /// <p>The accuracy of the estimated position in meters. An empty value indicates that no position data is available. A value of ‘0.0’ value indicates that position data is available. This data corresponds to the position information that you specified instead of the position computed by solver.</p>
    pub accuracy: ::std::option::Option<crate::types::Accuracy>,
    /// <p>The type of solver used to identify the position of the resource.</p>
    pub solver_type: ::std::option::Option<crate::types::PositionSolverType>,
    /// <p>The vendor of the positioning solver.</p>
    pub solver_provider: ::std::option::Option<crate::types::PositionSolverProvider>,
    /// <p>The version of the positioning solver.</p>
    pub solver_version: ::std::option::Option<::std::string::String>,
    /// <p>The timestamp at which the device's position was determined.</p>
    pub timestamp: ::std::option::Option<::std::string::String>,
    _request_id: Option<String>,
}
impl GetPositionOutput {
    /// <p>The position information of the resource.</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 `.position.is_none()`.
    pub fn position(&self) -> &[f32] {
        self.position.as_deref().unwrap_or_default()
    }
    /// <p>The accuracy of the estimated position in meters. An empty value indicates that no position data is available. A value of ‘0.0’ value indicates that position data is available. This data corresponds to the position information that you specified instead of the position computed by solver.</p>
    pub fn accuracy(&self) -> ::std::option::Option<&crate::types::Accuracy> {
        self.accuracy.as_ref()
    }
    /// <p>The type of solver used to identify the position of the resource.</p>
    pub fn solver_type(&self) -> ::std::option::Option<&crate::types::PositionSolverType> {
        self.solver_type.as_ref()
    }
    /// <p>The vendor of the positioning solver.</p>
    pub fn solver_provider(&self) -> ::std::option::Option<&crate::types::PositionSolverProvider> {
        self.solver_provider.as_ref()
    }
    /// <p>The version of the positioning solver.</p>
    pub fn solver_version(&self) -> ::std::option::Option<&str> {
        self.solver_version.as_deref()
    }
    /// <p>The timestamp at which the device's position was determined.</p>
    pub fn timestamp(&self) -> ::std::option::Option<&str> {
        self.timestamp.as_deref()
    }
}
impl ::aws_types::request_id::RequestId for GetPositionOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl GetPositionOutput {
    /// Creates a new builder-style object to manufacture [`GetPositionOutput`](crate::operation::get_position::GetPositionOutput).
    pub fn builder() -> crate::operation::get_position::builders::GetPositionOutputBuilder {
        crate::operation::get_position::builders::GetPositionOutputBuilder::default()
    }
}

/// A builder for [`GetPositionOutput`](crate::operation::get_position::GetPositionOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetPositionOutputBuilder {
    pub(crate) position: ::std::option::Option<::std::vec::Vec<f32>>,
    pub(crate) accuracy: ::std::option::Option<crate::types::Accuracy>,
    pub(crate) solver_type: ::std::option::Option<crate::types::PositionSolverType>,
    pub(crate) solver_provider: ::std::option::Option<crate::types::PositionSolverProvider>,
    pub(crate) solver_version: ::std::option::Option<::std::string::String>,
    pub(crate) timestamp: ::std::option::Option<::std::string::String>,
    _request_id: Option<String>,
}
impl GetPositionOutputBuilder {
    /// Appends an item to `position`.
    ///
    /// To override the contents of this collection use [`set_position`](Self::set_position).
    ///
    /// <p>The position information of the resource.</p>
    pub fn position(mut self, input: f32) -> Self {
        let mut v = self.position.unwrap_or_default();
        v.push(input);
        self.position = ::std::option::Option::Some(v);
        self
    }
    /// <p>The position information of the resource.</p>
    pub fn set_position(mut self, input: ::std::option::Option<::std::vec::Vec<f32>>) -> Self {
        self.position = input;
        self
    }
    /// <p>The position information of the resource.</p>
    pub fn get_position(&self) -> &::std::option::Option<::std::vec::Vec<f32>> {
        &self.position
    }
    /// <p>The accuracy of the estimated position in meters. An empty value indicates that no position data is available. A value of ‘0.0’ value indicates that position data is available. This data corresponds to the position information that you specified instead of the position computed by solver.</p>
    pub fn accuracy(mut self, input: crate::types::Accuracy) -> Self {
        self.accuracy = ::std::option::Option::Some(input);
        self
    }
    /// <p>The accuracy of the estimated position in meters. An empty value indicates that no position data is available. A value of ‘0.0’ value indicates that position data is available. This data corresponds to the position information that you specified instead of the position computed by solver.</p>
    pub fn set_accuracy(mut self, input: ::std::option::Option<crate::types::Accuracy>) -> Self {
        self.accuracy = input;
        self
    }
    /// <p>The accuracy of the estimated position in meters. An empty value indicates that no position data is available. A value of ‘0.0’ value indicates that position data is available. This data corresponds to the position information that you specified instead of the position computed by solver.</p>
    pub fn get_accuracy(&self) -> &::std::option::Option<crate::types::Accuracy> {
        &self.accuracy
    }
    /// <p>The type of solver used to identify the position of the resource.</p>
    pub fn solver_type(mut self, input: crate::types::PositionSolverType) -> Self {
        self.solver_type = ::std::option::Option::Some(input);
        self
    }
    /// <p>The type of solver used to identify the position of the resource.</p>
    pub fn set_solver_type(mut self, input: ::std::option::Option<crate::types::PositionSolverType>) -> Self {
        self.solver_type = input;
        self
    }
    /// <p>The type of solver used to identify the position of the resource.</p>
    pub fn get_solver_type(&self) -> &::std::option::Option<crate::types::PositionSolverType> {
        &self.solver_type
    }
    /// <p>The vendor of the positioning solver.</p>
    pub fn solver_provider(mut self, input: crate::types::PositionSolverProvider) -> Self {
        self.solver_provider = ::std::option::Option::Some(input);
        self
    }
    /// <p>The vendor of the positioning solver.</p>
    pub fn set_solver_provider(mut self, input: ::std::option::Option<crate::types::PositionSolverProvider>) -> Self {
        self.solver_provider = input;
        self
    }
    /// <p>The vendor of the positioning solver.</p>
    pub fn get_solver_provider(&self) -> &::std::option::Option<crate::types::PositionSolverProvider> {
        &self.solver_provider
    }
    /// <p>The version of the positioning solver.</p>
    pub fn solver_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.solver_version = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The version of the positioning solver.</p>
    pub fn set_solver_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.solver_version = input;
        self
    }
    /// <p>The version of the positioning solver.</p>
    pub fn get_solver_version(&self) -> &::std::option::Option<::std::string::String> {
        &self.solver_version
    }
    /// <p>The timestamp at which the device's position was determined.</p>
    pub fn timestamp(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.timestamp = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The timestamp at which the device's position was determined.</p>
    pub fn set_timestamp(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.timestamp = input;
        self
    }
    /// <p>The timestamp at which the device's position was determined.</p>
    pub fn get_timestamp(&self) -> &::std::option::Option<::std::string::String> {
        &self.timestamp
    }
    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
        self._request_id = Some(request_id.into());
        self
    }

    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
        self._request_id = request_id;
        self
    }
    /// Consumes the builder and constructs a [`GetPositionOutput`](crate::operation::get_position::GetPositionOutput).
    pub fn build(self) -> crate::operation::get_position::GetPositionOutput {
        crate::operation::get_position::GetPositionOutput {
            position: self.position,
            accuracy: self.accuracy,
            solver_type: self.solver_type,
            solver_provider: self.solver_provider,
            solver_version: self.solver_version,
            timestamp: self.timestamp,
            _request_id: self._request_id,
        }
    }
}