aws_sdk_iotwireless/operation/get_position/
_get_position_output.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[deprecated(note = "This operation is no longer supported.")]
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct GetPositionOutput {
7    /// <p>The position information of the resource.</p>
8    pub position: ::std::option::Option<::std::vec::Vec<f32>>,
9    /// <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>
10    pub accuracy: ::std::option::Option<crate::types::Accuracy>,
11    /// <p>The type of solver used to identify the position of the resource.</p>
12    pub solver_type: ::std::option::Option<crate::types::PositionSolverType>,
13    /// <p>The vendor of the positioning solver.</p>
14    pub solver_provider: ::std::option::Option<crate::types::PositionSolverProvider>,
15    /// <p>The version of the positioning solver.</p>
16    pub solver_version: ::std::option::Option<::std::string::String>,
17    /// <p>The timestamp at which the device's position was determined.</p>
18    pub timestamp: ::std::option::Option<::std::string::String>,
19    _request_id: Option<String>,
20}
21impl GetPositionOutput {
22    /// <p>The position information of the resource.</p>
23    ///
24    /// 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()`.
25    pub fn position(&self) -> &[f32] {
26        self.position.as_deref().unwrap_or_default()
27    }
28    /// <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>
29    pub fn accuracy(&self) -> ::std::option::Option<&crate::types::Accuracy> {
30        self.accuracy.as_ref()
31    }
32    /// <p>The type of solver used to identify the position of the resource.</p>
33    pub fn solver_type(&self) -> ::std::option::Option<&crate::types::PositionSolverType> {
34        self.solver_type.as_ref()
35    }
36    /// <p>The vendor of the positioning solver.</p>
37    pub fn solver_provider(&self) -> ::std::option::Option<&crate::types::PositionSolverProvider> {
38        self.solver_provider.as_ref()
39    }
40    /// <p>The version of the positioning solver.</p>
41    pub fn solver_version(&self) -> ::std::option::Option<&str> {
42        self.solver_version.as_deref()
43    }
44    /// <p>The timestamp at which the device's position was determined.</p>
45    pub fn timestamp(&self) -> ::std::option::Option<&str> {
46        self.timestamp.as_deref()
47    }
48}
49impl ::aws_types::request_id::RequestId for GetPositionOutput {
50    fn request_id(&self) -> Option<&str> {
51        self._request_id.as_deref()
52    }
53}
54impl GetPositionOutput {
55    /// Creates a new builder-style object to manufacture [`GetPositionOutput`](crate::operation::get_position::GetPositionOutput).
56    pub fn builder() -> crate::operation::get_position::builders::GetPositionOutputBuilder {
57        crate::operation::get_position::builders::GetPositionOutputBuilder::default()
58    }
59}
60
61/// A builder for [`GetPositionOutput`](crate::operation::get_position::GetPositionOutput).
62#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
63#[non_exhaustive]
64pub struct GetPositionOutputBuilder {
65    pub(crate) position: ::std::option::Option<::std::vec::Vec<f32>>,
66    pub(crate) accuracy: ::std::option::Option<crate::types::Accuracy>,
67    pub(crate) solver_type: ::std::option::Option<crate::types::PositionSolverType>,
68    pub(crate) solver_provider: ::std::option::Option<crate::types::PositionSolverProvider>,
69    pub(crate) solver_version: ::std::option::Option<::std::string::String>,
70    pub(crate) timestamp: ::std::option::Option<::std::string::String>,
71    _request_id: Option<String>,
72}
73impl GetPositionOutputBuilder {
74    /// Appends an item to `position`.
75    ///
76    /// To override the contents of this collection use [`set_position`](Self::set_position).
77    ///
78    /// <p>The position information of the resource.</p>
79    pub fn position(mut self, input: f32) -> Self {
80        let mut v = self.position.unwrap_or_default();
81        v.push(input);
82        self.position = ::std::option::Option::Some(v);
83        self
84    }
85    /// <p>The position information of the resource.</p>
86    pub fn set_position(mut self, input: ::std::option::Option<::std::vec::Vec<f32>>) -> Self {
87        self.position = input;
88        self
89    }
90    /// <p>The position information of the resource.</p>
91    pub fn get_position(&self) -> &::std::option::Option<::std::vec::Vec<f32>> {
92        &self.position
93    }
94    /// <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>
95    pub fn accuracy(mut self, input: crate::types::Accuracy) -> Self {
96        self.accuracy = ::std::option::Option::Some(input);
97        self
98    }
99    /// <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>
100    pub fn set_accuracy(mut self, input: ::std::option::Option<crate::types::Accuracy>) -> Self {
101        self.accuracy = input;
102        self
103    }
104    /// <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>
105    pub fn get_accuracy(&self) -> &::std::option::Option<crate::types::Accuracy> {
106        &self.accuracy
107    }
108    /// <p>The type of solver used to identify the position of the resource.</p>
109    pub fn solver_type(mut self, input: crate::types::PositionSolverType) -> Self {
110        self.solver_type = ::std::option::Option::Some(input);
111        self
112    }
113    /// <p>The type of solver used to identify the position of the resource.</p>
114    pub fn set_solver_type(mut self, input: ::std::option::Option<crate::types::PositionSolverType>) -> Self {
115        self.solver_type = input;
116        self
117    }
118    /// <p>The type of solver used to identify the position of the resource.</p>
119    pub fn get_solver_type(&self) -> &::std::option::Option<crate::types::PositionSolverType> {
120        &self.solver_type
121    }
122    /// <p>The vendor of the positioning solver.</p>
123    pub fn solver_provider(mut self, input: crate::types::PositionSolverProvider) -> Self {
124        self.solver_provider = ::std::option::Option::Some(input);
125        self
126    }
127    /// <p>The vendor of the positioning solver.</p>
128    pub fn set_solver_provider(mut self, input: ::std::option::Option<crate::types::PositionSolverProvider>) -> Self {
129        self.solver_provider = input;
130        self
131    }
132    /// <p>The vendor of the positioning solver.</p>
133    pub fn get_solver_provider(&self) -> &::std::option::Option<crate::types::PositionSolverProvider> {
134        &self.solver_provider
135    }
136    /// <p>The version of the positioning solver.</p>
137    pub fn solver_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
138        self.solver_version = ::std::option::Option::Some(input.into());
139        self
140    }
141    /// <p>The version of the positioning solver.</p>
142    pub fn set_solver_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
143        self.solver_version = input;
144        self
145    }
146    /// <p>The version of the positioning solver.</p>
147    pub fn get_solver_version(&self) -> &::std::option::Option<::std::string::String> {
148        &self.solver_version
149    }
150    /// <p>The timestamp at which the device's position was determined.</p>
151    pub fn timestamp(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
152        self.timestamp = ::std::option::Option::Some(input.into());
153        self
154    }
155    /// <p>The timestamp at which the device's position was determined.</p>
156    pub fn set_timestamp(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
157        self.timestamp = input;
158        self
159    }
160    /// <p>The timestamp at which the device's position was determined.</p>
161    pub fn get_timestamp(&self) -> &::std::option::Option<::std::string::String> {
162        &self.timestamp
163    }
164    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
165        self._request_id = Some(request_id.into());
166        self
167    }
168
169    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
170        self._request_id = request_id;
171        self
172    }
173    /// Consumes the builder and constructs a [`GetPositionOutput`](crate::operation::get_position::GetPositionOutput).
174    pub fn build(self) -> crate::operation::get_position::GetPositionOutput {
175        crate::operation::get_position::GetPositionOutput {
176            position: self.position,
177            accuracy: self.accuracy,
178            solver_type: self.solver_type,
179            solver_provider: self.solver_provider,
180            solver_version: self.solver_version,
181            timestamp: self.timestamp,
182            _request_id: self._request_id,
183        }
184    }
185}