1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185
// 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).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
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,
}
}
}