aws_sdk_location/operation/update_tracker/_update_tracker_input.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct UpdateTrackerInput {
6 /// <p>The name of the tracker resource to update.</p>
7 pub tracker_name: ::std::option::Option<::std::string::String>,
8 /// <p>No longer used. If included, the only allowed value is <code>RequestBasedUsage</code>.</p>
9 #[deprecated(note = "Deprecated. If included, the only allowed value is RequestBasedUsage.", since = "2022-02-01")]
10 pub pricing_plan: ::std::option::Option<crate::types::PricingPlan>,
11 /// <p>This parameter is no longer used.</p>
12 #[deprecated(note = "Deprecated. No longer allowed.", since = "2022-02-01")]
13 pub pricing_plan_data_source: ::std::option::Option<::std::string::String>,
14 /// <p>Updates the description for the tracker resource.</p>
15 pub description: ::std::option::Option<::std::string::String>,
16 /// <p>Updates the position filtering for the tracker resource.</p>
17 /// <p>Valid values:</p>
18 /// <ul>
19 /// <li>
20 /// <p><code>TimeBased</code> - Location updates are evaluated against linked geofence collections, but not every location update is stored. If your update frequency is more often than 30 seconds, only one update per 30 seconds is stored for each unique device ID.</p></li>
21 /// <li>
22 /// <p><code>DistanceBased</code> - If the device has moved less than 30 m (98.4 ft), location updates are ignored. Location updates within this distance are neither evaluated against linked geofence collections, nor stored. This helps control costs by reducing the number of geofence evaluations and historical device positions to paginate through. Distance-based filtering can also reduce the effects of GPS noise when displaying device trajectories on a map.</p></li>
23 /// <li>
24 /// <p><code>AccuracyBased</code> - If the device has moved less than the measured accuracy, location updates are ignored. For example, if two consecutive updates from a device have a horizontal accuracy of 5 m and 10 m, the second update is ignored if the device has moved less than 15 m. Ignored location updates are neither evaluated against linked geofence collections, nor stored. This helps educe the effects of GPS noise when displaying device trajectories on a map, and can help control costs by reducing the number of geofence evaluations.</p></li>
25 /// </ul>
26 pub position_filtering: ::std::option::Option<crate::types::PositionFiltering>,
27 /// <p>Whether to enable position <code>UPDATE</code> events from this tracker to be sent to EventBridge.</p><note>
28 /// <p>You do not need enable this feature to get <code>ENTER</code> and <code>EXIT</code> events for geofences with this tracker. Those events are always sent to EventBridge.</p>
29 /// </note>
30 pub event_bridge_enabled: ::std::option::Option<bool>,
31 /// <p>Enables <code>GeospatialQueries</code> for a tracker that uses a <a href="https://docs.aws.amazon.com/kms/latest/developerguide/create-keys.html">Amazon Web Services KMS customer managed key</a>.</p>
32 /// <p>This parameter is only used if you are using a KMS customer managed key.</p>
33 pub kms_key_enable_geospatial_queries: ::std::option::Option<bool>,
34}
35impl UpdateTrackerInput {
36 /// <p>The name of the tracker resource to update.</p>
37 pub fn tracker_name(&self) -> ::std::option::Option<&str> {
38 self.tracker_name.as_deref()
39 }
40 /// <p>No longer used. If included, the only allowed value is <code>RequestBasedUsage</code>.</p>
41 #[deprecated(note = "Deprecated. If included, the only allowed value is RequestBasedUsage.", since = "2022-02-01")]
42 pub fn pricing_plan(&self) -> ::std::option::Option<&crate::types::PricingPlan> {
43 self.pricing_plan.as_ref()
44 }
45 /// <p>This parameter is no longer used.</p>
46 #[deprecated(note = "Deprecated. No longer allowed.", since = "2022-02-01")]
47 pub fn pricing_plan_data_source(&self) -> ::std::option::Option<&str> {
48 self.pricing_plan_data_source.as_deref()
49 }
50 /// <p>Updates the description for the tracker resource.</p>
51 pub fn description(&self) -> ::std::option::Option<&str> {
52 self.description.as_deref()
53 }
54 /// <p>Updates the position filtering for the tracker resource.</p>
55 /// <p>Valid values:</p>
56 /// <ul>
57 /// <li>
58 /// <p><code>TimeBased</code> - Location updates are evaluated against linked geofence collections, but not every location update is stored. If your update frequency is more often than 30 seconds, only one update per 30 seconds is stored for each unique device ID.</p></li>
59 /// <li>
60 /// <p><code>DistanceBased</code> - If the device has moved less than 30 m (98.4 ft), location updates are ignored. Location updates within this distance are neither evaluated against linked geofence collections, nor stored. This helps control costs by reducing the number of geofence evaluations and historical device positions to paginate through. Distance-based filtering can also reduce the effects of GPS noise when displaying device trajectories on a map.</p></li>
61 /// <li>
62 /// <p><code>AccuracyBased</code> - If the device has moved less than the measured accuracy, location updates are ignored. For example, if two consecutive updates from a device have a horizontal accuracy of 5 m and 10 m, the second update is ignored if the device has moved less than 15 m. Ignored location updates are neither evaluated against linked geofence collections, nor stored. This helps educe the effects of GPS noise when displaying device trajectories on a map, and can help control costs by reducing the number of geofence evaluations.</p></li>
63 /// </ul>
64 pub fn position_filtering(&self) -> ::std::option::Option<&crate::types::PositionFiltering> {
65 self.position_filtering.as_ref()
66 }
67 /// <p>Whether to enable position <code>UPDATE</code> events from this tracker to be sent to EventBridge.</p><note>
68 /// <p>You do not need enable this feature to get <code>ENTER</code> and <code>EXIT</code> events for geofences with this tracker. Those events are always sent to EventBridge.</p>
69 /// </note>
70 pub fn event_bridge_enabled(&self) -> ::std::option::Option<bool> {
71 self.event_bridge_enabled
72 }
73 /// <p>Enables <code>GeospatialQueries</code> for a tracker that uses a <a href="https://docs.aws.amazon.com/kms/latest/developerguide/create-keys.html">Amazon Web Services KMS customer managed key</a>.</p>
74 /// <p>This parameter is only used if you are using a KMS customer managed key.</p>
75 pub fn kms_key_enable_geospatial_queries(&self) -> ::std::option::Option<bool> {
76 self.kms_key_enable_geospatial_queries
77 }
78}
79impl UpdateTrackerInput {
80 /// Creates a new builder-style object to manufacture [`UpdateTrackerInput`](crate::operation::update_tracker::UpdateTrackerInput).
81 pub fn builder() -> crate::operation::update_tracker::builders::UpdateTrackerInputBuilder {
82 crate::operation::update_tracker::builders::UpdateTrackerInputBuilder::default()
83 }
84}
85
86/// A builder for [`UpdateTrackerInput`](crate::operation::update_tracker::UpdateTrackerInput).
87#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
88#[non_exhaustive]
89pub struct UpdateTrackerInputBuilder {
90 pub(crate) tracker_name: ::std::option::Option<::std::string::String>,
91 pub(crate) pricing_plan: ::std::option::Option<crate::types::PricingPlan>,
92 pub(crate) pricing_plan_data_source: ::std::option::Option<::std::string::String>,
93 pub(crate) description: ::std::option::Option<::std::string::String>,
94 pub(crate) position_filtering: ::std::option::Option<crate::types::PositionFiltering>,
95 pub(crate) event_bridge_enabled: ::std::option::Option<bool>,
96 pub(crate) kms_key_enable_geospatial_queries: ::std::option::Option<bool>,
97}
98impl UpdateTrackerInputBuilder {
99 /// <p>The name of the tracker resource to update.</p>
100 /// This field is required.
101 pub fn tracker_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
102 self.tracker_name = ::std::option::Option::Some(input.into());
103 self
104 }
105 /// <p>The name of the tracker resource to update.</p>
106 pub fn set_tracker_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
107 self.tracker_name = input;
108 self
109 }
110 /// <p>The name of the tracker resource to update.</p>
111 pub fn get_tracker_name(&self) -> &::std::option::Option<::std::string::String> {
112 &self.tracker_name
113 }
114 /// <p>No longer used. If included, the only allowed value is <code>RequestBasedUsage</code>.</p>
115 #[deprecated(note = "Deprecated. If included, the only allowed value is RequestBasedUsage.", since = "2022-02-01")]
116 pub fn pricing_plan(mut self, input: crate::types::PricingPlan) -> Self {
117 self.pricing_plan = ::std::option::Option::Some(input);
118 self
119 }
120 /// <p>No longer used. If included, the only allowed value is <code>RequestBasedUsage</code>.</p>
121 #[deprecated(note = "Deprecated. If included, the only allowed value is RequestBasedUsage.", since = "2022-02-01")]
122 pub fn set_pricing_plan(mut self, input: ::std::option::Option<crate::types::PricingPlan>) -> Self {
123 self.pricing_plan = input;
124 self
125 }
126 /// <p>No longer used. If included, the only allowed value is <code>RequestBasedUsage</code>.</p>
127 #[deprecated(note = "Deprecated. If included, the only allowed value is RequestBasedUsage.", since = "2022-02-01")]
128 pub fn get_pricing_plan(&self) -> &::std::option::Option<crate::types::PricingPlan> {
129 &self.pricing_plan
130 }
131 /// <p>This parameter is no longer used.</p>
132 #[deprecated(note = "Deprecated. No longer allowed.", since = "2022-02-01")]
133 pub fn pricing_plan_data_source(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
134 self.pricing_plan_data_source = ::std::option::Option::Some(input.into());
135 self
136 }
137 /// <p>This parameter is no longer used.</p>
138 #[deprecated(note = "Deprecated. No longer allowed.", since = "2022-02-01")]
139 pub fn set_pricing_plan_data_source(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
140 self.pricing_plan_data_source = input;
141 self
142 }
143 /// <p>This parameter is no longer used.</p>
144 #[deprecated(note = "Deprecated. No longer allowed.", since = "2022-02-01")]
145 pub fn get_pricing_plan_data_source(&self) -> &::std::option::Option<::std::string::String> {
146 &self.pricing_plan_data_source
147 }
148 /// <p>Updates the description for the tracker resource.</p>
149 pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
150 self.description = ::std::option::Option::Some(input.into());
151 self
152 }
153 /// <p>Updates the description for the tracker resource.</p>
154 pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
155 self.description = input;
156 self
157 }
158 /// <p>Updates the description for the tracker resource.</p>
159 pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
160 &self.description
161 }
162 /// <p>Updates the position filtering for the tracker resource.</p>
163 /// <p>Valid values:</p>
164 /// <ul>
165 /// <li>
166 /// <p><code>TimeBased</code> - Location updates are evaluated against linked geofence collections, but not every location update is stored. If your update frequency is more often than 30 seconds, only one update per 30 seconds is stored for each unique device ID.</p></li>
167 /// <li>
168 /// <p><code>DistanceBased</code> - If the device has moved less than 30 m (98.4 ft), location updates are ignored. Location updates within this distance are neither evaluated against linked geofence collections, nor stored. This helps control costs by reducing the number of geofence evaluations and historical device positions to paginate through. Distance-based filtering can also reduce the effects of GPS noise when displaying device trajectories on a map.</p></li>
169 /// <li>
170 /// <p><code>AccuracyBased</code> - If the device has moved less than the measured accuracy, location updates are ignored. For example, if two consecutive updates from a device have a horizontal accuracy of 5 m and 10 m, the second update is ignored if the device has moved less than 15 m. Ignored location updates are neither evaluated against linked geofence collections, nor stored. This helps educe the effects of GPS noise when displaying device trajectories on a map, and can help control costs by reducing the number of geofence evaluations.</p></li>
171 /// </ul>
172 pub fn position_filtering(mut self, input: crate::types::PositionFiltering) -> Self {
173 self.position_filtering = ::std::option::Option::Some(input);
174 self
175 }
176 /// <p>Updates the position filtering for the tracker resource.</p>
177 /// <p>Valid values:</p>
178 /// <ul>
179 /// <li>
180 /// <p><code>TimeBased</code> - Location updates are evaluated against linked geofence collections, but not every location update is stored. If your update frequency is more often than 30 seconds, only one update per 30 seconds is stored for each unique device ID.</p></li>
181 /// <li>
182 /// <p><code>DistanceBased</code> - If the device has moved less than 30 m (98.4 ft), location updates are ignored. Location updates within this distance are neither evaluated against linked geofence collections, nor stored. This helps control costs by reducing the number of geofence evaluations and historical device positions to paginate through. Distance-based filtering can also reduce the effects of GPS noise when displaying device trajectories on a map.</p></li>
183 /// <li>
184 /// <p><code>AccuracyBased</code> - If the device has moved less than the measured accuracy, location updates are ignored. For example, if two consecutive updates from a device have a horizontal accuracy of 5 m and 10 m, the second update is ignored if the device has moved less than 15 m. Ignored location updates are neither evaluated against linked geofence collections, nor stored. This helps educe the effects of GPS noise when displaying device trajectories on a map, and can help control costs by reducing the number of geofence evaluations.</p></li>
185 /// </ul>
186 pub fn set_position_filtering(mut self, input: ::std::option::Option<crate::types::PositionFiltering>) -> Self {
187 self.position_filtering = input;
188 self
189 }
190 /// <p>Updates the position filtering for the tracker resource.</p>
191 /// <p>Valid values:</p>
192 /// <ul>
193 /// <li>
194 /// <p><code>TimeBased</code> - Location updates are evaluated against linked geofence collections, but not every location update is stored. If your update frequency is more often than 30 seconds, only one update per 30 seconds is stored for each unique device ID.</p></li>
195 /// <li>
196 /// <p><code>DistanceBased</code> - If the device has moved less than 30 m (98.4 ft), location updates are ignored. Location updates within this distance are neither evaluated against linked geofence collections, nor stored. This helps control costs by reducing the number of geofence evaluations and historical device positions to paginate through. Distance-based filtering can also reduce the effects of GPS noise when displaying device trajectories on a map.</p></li>
197 /// <li>
198 /// <p><code>AccuracyBased</code> - If the device has moved less than the measured accuracy, location updates are ignored. For example, if two consecutive updates from a device have a horizontal accuracy of 5 m and 10 m, the second update is ignored if the device has moved less than 15 m. Ignored location updates are neither evaluated against linked geofence collections, nor stored. This helps educe the effects of GPS noise when displaying device trajectories on a map, and can help control costs by reducing the number of geofence evaluations.</p></li>
199 /// </ul>
200 pub fn get_position_filtering(&self) -> &::std::option::Option<crate::types::PositionFiltering> {
201 &self.position_filtering
202 }
203 /// <p>Whether to enable position <code>UPDATE</code> events from this tracker to be sent to EventBridge.</p><note>
204 /// <p>You do not need enable this feature to get <code>ENTER</code> and <code>EXIT</code> events for geofences with this tracker. Those events are always sent to EventBridge.</p>
205 /// </note>
206 pub fn event_bridge_enabled(mut self, input: bool) -> Self {
207 self.event_bridge_enabled = ::std::option::Option::Some(input);
208 self
209 }
210 /// <p>Whether to enable position <code>UPDATE</code> events from this tracker to be sent to EventBridge.</p><note>
211 /// <p>You do not need enable this feature to get <code>ENTER</code> and <code>EXIT</code> events for geofences with this tracker. Those events are always sent to EventBridge.</p>
212 /// </note>
213 pub fn set_event_bridge_enabled(mut self, input: ::std::option::Option<bool>) -> Self {
214 self.event_bridge_enabled = input;
215 self
216 }
217 /// <p>Whether to enable position <code>UPDATE</code> events from this tracker to be sent to EventBridge.</p><note>
218 /// <p>You do not need enable this feature to get <code>ENTER</code> and <code>EXIT</code> events for geofences with this tracker. Those events are always sent to EventBridge.</p>
219 /// </note>
220 pub fn get_event_bridge_enabled(&self) -> &::std::option::Option<bool> {
221 &self.event_bridge_enabled
222 }
223 /// <p>Enables <code>GeospatialQueries</code> for a tracker that uses a <a href="https://docs.aws.amazon.com/kms/latest/developerguide/create-keys.html">Amazon Web Services KMS customer managed key</a>.</p>
224 /// <p>This parameter is only used if you are using a KMS customer managed key.</p>
225 pub fn kms_key_enable_geospatial_queries(mut self, input: bool) -> Self {
226 self.kms_key_enable_geospatial_queries = ::std::option::Option::Some(input);
227 self
228 }
229 /// <p>Enables <code>GeospatialQueries</code> for a tracker that uses a <a href="https://docs.aws.amazon.com/kms/latest/developerguide/create-keys.html">Amazon Web Services KMS customer managed key</a>.</p>
230 /// <p>This parameter is only used if you are using a KMS customer managed key.</p>
231 pub fn set_kms_key_enable_geospatial_queries(mut self, input: ::std::option::Option<bool>) -> Self {
232 self.kms_key_enable_geospatial_queries = input;
233 self
234 }
235 /// <p>Enables <code>GeospatialQueries</code> for a tracker that uses a <a href="https://docs.aws.amazon.com/kms/latest/developerguide/create-keys.html">Amazon Web Services KMS customer managed key</a>.</p>
236 /// <p>This parameter is only used if you are using a KMS customer managed key.</p>
237 pub fn get_kms_key_enable_geospatial_queries(&self) -> &::std::option::Option<bool> {
238 &self.kms_key_enable_geospatial_queries
239 }
240 /// Consumes the builder and constructs a [`UpdateTrackerInput`](crate::operation::update_tracker::UpdateTrackerInput).
241 pub fn build(
242 self,
243 ) -> ::std::result::Result<crate::operation::update_tracker::UpdateTrackerInput, ::aws_smithy_types::error::operation::BuildError> {
244 ::std::result::Result::Ok(crate::operation::update_tracker::UpdateTrackerInput {
245 tracker_name: self.tracker_name,
246 pricing_plan: self.pricing_plan,
247 pricing_plan_data_source: self.pricing_plan_data_source,
248 description: self.description,
249 position_filtering: self.position_filtering,
250 event_bridge_enabled: self.event_bridge_enabled,
251 kms_key_enable_geospatial_queries: self.kms_key_enable_geospatial_queries,
252 })
253 }
254}