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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>Global navigation satellite system (GNSS) object used for positioning.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Gnss {
/// <p>Payload that contains the GNSS scan result, or NAV message, in hexadecimal notation.</p>
pub payload: ::std::string::String,
/// <p>Optional parameter that gives an estimate of the time when the GNSS scan information is taken, in seconds GPS time (GPST). If capture time is not specified, the local server time is used.</p>
pub capture_time: ::std::option::Option<f32>,
/// <p>Optional value that gives the capture time estimate accuracy, in seconds. If capture time accuracy is not specified, default value of 300 is used.</p>
pub capture_time_accuracy: ::std::option::Option<f32>,
/// <p>Optional assistance position information, specified using latitude and longitude values in degrees. The coordinates are inside the WGS84 reference frame.</p>
pub assist_position: ::std::option::Option<::std::vec::Vec<f32>>,
/// <p>Optional assistance altitude, which is the altitude of the device at capture time, specified in meters above the WGS84 reference ellipsoid.</p>
pub assist_altitude: ::std::option::Option<f32>,
/// <p>Optional parameter that forces 2D solve, which modifies the positioning algorithm to a 2D solution problem. When this parameter is specified, the assistance altitude should have an accuracy of at least 10 meters.</p>
pub use2_d_solver: bool,
}
impl Gnss {
/// <p>Payload that contains the GNSS scan result, or NAV message, in hexadecimal notation.</p>
pub fn payload(&self) -> &str {
use std::ops::Deref;
self.payload.deref()
}
/// <p>Optional parameter that gives an estimate of the time when the GNSS scan information is taken, in seconds GPS time (GPST). If capture time is not specified, the local server time is used.</p>
pub fn capture_time(&self) -> ::std::option::Option<f32> {
self.capture_time
}
/// <p>Optional value that gives the capture time estimate accuracy, in seconds. If capture time accuracy is not specified, default value of 300 is used.</p>
pub fn capture_time_accuracy(&self) -> ::std::option::Option<f32> {
self.capture_time_accuracy
}
/// <p>Optional assistance position information, specified using latitude and longitude values in degrees. The coordinates are inside the WGS84 reference frame.</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 `.assist_position.is_none()`.
pub fn assist_position(&self) -> &[f32] {
self.assist_position.as_deref().unwrap_or_default()
}
/// <p>Optional assistance altitude, which is the altitude of the device at capture time, specified in meters above the WGS84 reference ellipsoid.</p>
pub fn assist_altitude(&self) -> ::std::option::Option<f32> {
self.assist_altitude
}
/// <p>Optional parameter that forces 2D solve, which modifies the positioning algorithm to a 2D solution problem. When this parameter is specified, the assistance altitude should have an accuracy of at least 10 meters.</p>
pub fn use2_d_solver(&self) -> bool {
self.use2_d_solver
}
}
impl Gnss {
/// Creates a new builder-style object to manufacture [`Gnss`](crate::types::Gnss).
pub fn builder() -> crate::types::builders::GnssBuilder {
crate::types::builders::GnssBuilder::default()
}
}
/// A builder for [`Gnss`](crate::types::Gnss).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GnssBuilder {
pub(crate) payload: ::std::option::Option<::std::string::String>,
pub(crate) capture_time: ::std::option::Option<f32>,
pub(crate) capture_time_accuracy: ::std::option::Option<f32>,
pub(crate) assist_position: ::std::option::Option<::std::vec::Vec<f32>>,
pub(crate) assist_altitude: ::std::option::Option<f32>,
pub(crate) use2_d_solver: ::std::option::Option<bool>,
}
impl GnssBuilder {
/// <p>Payload that contains the GNSS scan result, or NAV message, in hexadecimal notation.</p>
/// This field is required.
pub fn payload(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.payload = ::std::option::Option::Some(input.into());
self
}
/// <p>Payload that contains the GNSS scan result, or NAV message, in hexadecimal notation.</p>
pub fn set_payload(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.payload = input;
self
}
/// <p>Payload that contains the GNSS scan result, or NAV message, in hexadecimal notation.</p>
pub fn get_payload(&self) -> &::std::option::Option<::std::string::String> {
&self.payload
}
/// <p>Optional parameter that gives an estimate of the time when the GNSS scan information is taken, in seconds GPS time (GPST). If capture time is not specified, the local server time is used.</p>
pub fn capture_time(mut self, input: f32) -> Self {
self.capture_time = ::std::option::Option::Some(input);
self
}
/// <p>Optional parameter that gives an estimate of the time when the GNSS scan information is taken, in seconds GPS time (GPST). If capture time is not specified, the local server time is used.</p>
pub fn set_capture_time(mut self, input: ::std::option::Option<f32>) -> Self {
self.capture_time = input;
self
}
/// <p>Optional parameter that gives an estimate of the time when the GNSS scan information is taken, in seconds GPS time (GPST). If capture time is not specified, the local server time is used.</p>
pub fn get_capture_time(&self) -> &::std::option::Option<f32> {
&self.capture_time
}
/// <p>Optional value that gives the capture time estimate accuracy, in seconds. If capture time accuracy is not specified, default value of 300 is used.</p>
pub fn capture_time_accuracy(mut self, input: f32) -> Self {
self.capture_time_accuracy = ::std::option::Option::Some(input);
self
}
/// <p>Optional value that gives the capture time estimate accuracy, in seconds. If capture time accuracy is not specified, default value of 300 is used.</p>
pub fn set_capture_time_accuracy(mut self, input: ::std::option::Option<f32>) -> Self {
self.capture_time_accuracy = input;
self
}
/// <p>Optional value that gives the capture time estimate accuracy, in seconds. If capture time accuracy is not specified, default value of 300 is used.</p>
pub fn get_capture_time_accuracy(&self) -> &::std::option::Option<f32> {
&self.capture_time_accuracy
}
/// Appends an item to `assist_position`.
///
/// To override the contents of this collection use [`set_assist_position`](Self::set_assist_position).
///
/// <p>Optional assistance position information, specified using latitude and longitude values in degrees. The coordinates are inside the WGS84 reference frame.</p>
pub fn assist_position(mut self, input: f32) -> Self {
let mut v = self.assist_position.unwrap_or_default();
v.push(input);
self.assist_position = ::std::option::Option::Some(v);
self
}
/// <p>Optional assistance position information, specified using latitude and longitude values in degrees. The coordinates are inside the WGS84 reference frame.</p>
pub fn set_assist_position(mut self, input: ::std::option::Option<::std::vec::Vec<f32>>) -> Self {
self.assist_position = input;
self
}
/// <p>Optional assistance position information, specified using latitude and longitude values in degrees. The coordinates are inside the WGS84 reference frame.</p>
pub fn get_assist_position(&self) -> &::std::option::Option<::std::vec::Vec<f32>> {
&self.assist_position
}
/// <p>Optional assistance altitude, which is the altitude of the device at capture time, specified in meters above the WGS84 reference ellipsoid.</p>
pub fn assist_altitude(mut self, input: f32) -> Self {
self.assist_altitude = ::std::option::Option::Some(input);
self
}
/// <p>Optional assistance altitude, which is the altitude of the device at capture time, specified in meters above the WGS84 reference ellipsoid.</p>
pub fn set_assist_altitude(mut self, input: ::std::option::Option<f32>) -> Self {
self.assist_altitude = input;
self
}
/// <p>Optional assistance altitude, which is the altitude of the device at capture time, specified in meters above the WGS84 reference ellipsoid.</p>
pub fn get_assist_altitude(&self) -> &::std::option::Option<f32> {
&self.assist_altitude
}
/// <p>Optional parameter that forces 2D solve, which modifies the positioning algorithm to a 2D solution problem. When this parameter is specified, the assistance altitude should have an accuracy of at least 10 meters.</p>
pub fn use2_d_solver(mut self, input: bool) -> Self {
self.use2_d_solver = ::std::option::Option::Some(input);
self
}
/// <p>Optional parameter that forces 2D solve, which modifies the positioning algorithm to a 2D solution problem. When this parameter is specified, the assistance altitude should have an accuracy of at least 10 meters.</p>
pub fn set_use2_d_solver(mut self, input: ::std::option::Option<bool>) -> Self {
self.use2_d_solver = input;
self
}
/// <p>Optional parameter that forces 2D solve, which modifies the positioning algorithm to a 2D solution problem. When this parameter is specified, the assistance altitude should have an accuracy of at least 10 meters.</p>
pub fn get_use2_d_solver(&self) -> &::std::option::Option<bool> {
&self.use2_d_solver
}
/// Consumes the builder and constructs a [`Gnss`](crate::types::Gnss).
/// This method will fail if any of the following fields are not set:
/// - [`payload`](crate::types::builders::GnssBuilder::payload)
pub fn build(self) -> ::std::result::Result<crate::types::Gnss, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::types::Gnss {
payload: self.payload.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"payload",
"payload was not specified but it is required when building Gnss",
)
})?,
capture_time: self.capture_time,
capture_time_accuracy: self.capture_time_accuracy,
assist_position: self.assist_position,
assist_altitude: self.assist_altitude,
use2_d_solver: self.use2_d_solver.unwrap_or_default(),
})
}
}