aws_sdk_geoplaces/operation/autocomplete/_autocomplete_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)]
5pub struct AutocompleteInput {
6 /// <p>The free-form text query to match addresses against. This is usually a partially typed address from an end user in an address box or form.</p><note>
7 /// <p>The fields <code>QueryText</code>, and <code>QueryID</code> are mutually exclusive.</p>
8 /// </note>
9 pub query_text: ::std::option::Option<::std::string::String>,
10 /// <p>An optional limit for the number of results returned in a single call.</p>
11 pub max_results: ::std::option::Option<i32>,
12 /// <p>The position in longitude and latitude that the results should be close to. Typically, place results returned are ranked higher the closer they are to this position. Stored in <code>\[lng, lat\]</code> and in the WSG84 format.</p><note>
13 /// <p>The fields <code>BiasPosition</code>, <code>FilterBoundingBox</code>, and <code>FilterCircle</code> are mutually exclusive.</p>
14 /// </note>
15 pub bias_position: ::std::option::Option<::std::vec::Vec<f64>>,
16 /// <p>A structure which contains a set of inclusion/exclusion properties that results must possess in order to be returned as a result.</p>
17 pub filter: ::std::option::Option<crate::types::AutocompleteFilter>,
18 /// <p>The <code>PostalCodeMode</code> affects how postal code results are returned. If a postal code spans multiple localities and this value is empty, partial district or locality information may be returned under a single postal code result entry. If it's populated with the value <code>EnumerateSpannedLocalities</code>, all cities in that postal code are returned.</p>
19 pub postal_code_mode: ::std::option::Option<crate::types::PostalCodeMode>,
20 /// <p>A list of optional additional parameters that can be requested for each result.</p>
21 pub additional_features: ::std::option::Option<::std::vec::Vec<crate::types::AutocompleteAdditionalFeature>>,
22 /// <p>A list of <a href="https://en.wikipedia.org/wiki/IETF_language_tag">BCP 47</a> compliant language codes for the results to be rendered in. If there is no data for the result in the requested language, data will be returned in the default language for the entry.</p>
23 pub language: ::std::option::Option<::std::string::String>,
24 /// <p>The alpha-2 or alpha-3 character code for the political view of a country. The political view applies to the results of the request to represent unresolved territorial claims through the point of view of the specified country.</p>
25 /// <p>The following political views are currently supported:</p>
26 /// <ul>
27 /// <li>
28 /// <p><code>ARG</code>: Argentina's view on the Southern Patagonian Ice Field and Tierra Del Fuego, including the Falkland Islands, South Georgia, and South Sandwich Islands</p></li>
29 /// <li>
30 /// <p><code>EGY</code>: Egypt's view on Bir Tawil</p></li>
31 /// <li>
32 /// <p><code>IND</code>: India's view on Gilgit-Baltistan</p></li>
33 /// <li>
34 /// <p><code>KEN</code>: Kenya's view on the Ilemi Triangle</p></li>
35 /// <li>
36 /// <p><code>MAR</code>: Morocco's view on Western Sahara</p></li>
37 /// <li>
38 /// <p><code>RUS</code>: Russia's view on Crimea</p></li>
39 /// <li>
40 /// <p><code>SDN</code>: Sudan's view on the Halaib Triangle</p></li>
41 /// <li>
42 /// <p><code>SRB</code>: Serbia's view on Kosovo, Vukovar, and Sarengrad Islands</p></li>
43 /// <li>
44 /// <p><code>SUR</code>: Suriname's view on the Courantyne Headwaters and Lawa Headwaters</p></li>
45 /// <li>
46 /// <p><code>SYR</code>: Syria's view on the Golan Heights</p></li>
47 /// <li>
48 /// <p><code>TUR</code>: Turkey's view on Cyprus and Northern Cyprus</p></li>
49 /// <li>
50 /// <p><code>TZA</code>: Tanzania's view on Lake Malawi</p></li>
51 /// <li>
52 /// <p><code>URY</code>: Uruguay's view on Rincon de Artigas</p></li>
53 /// <li>
54 /// <p><code>VNM</code>: Vietnam's view on the Paracel Islands and Spratly Islands</p></li>
55 /// </ul>
56 pub political_view: ::std::option::Option<::std::string::String>,
57 /// <p>Indicates if the results will be stored. Defaults to <code>SingleUse</code>, if left empty.</p>
58 pub intended_use: ::std::option::Option<crate::types::AutocompleteIntendedUse>,
59 /// <p>Optional: The API key to be used for authorization. Either an API key or valid SigV4 signature must be provided when making a request.</p>
60 pub key: ::std::option::Option<::std::string::String>,
61}
62impl AutocompleteInput {
63 /// <p>The free-form text query to match addresses against. This is usually a partially typed address from an end user in an address box or form.</p><note>
64 /// <p>The fields <code>QueryText</code>, and <code>QueryID</code> are mutually exclusive.</p>
65 /// </note>
66 pub fn query_text(&self) -> ::std::option::Option<&str> {
67 self.query_text.as_deref()
68 }
69 /// <p>An optional limit for the number of results returned in a single call.</p>
70 pub fn max_results(&self) -> ::std::option::Option<i32> {
71 self.max_results
72 }
73 /// <p>The position in longitude and latitude that the results should be close to. Typically, place results returned are ranked higher the closer they are to this position. Stored in <code>\[lng, lat\]</code> and in the WSG84 format.</p><note>
74 /// <p>The fields <code>BiasPosition</code>, <code>FilterBoundingBox</code>, and <code>FilterCircle</code> are mutually exclusive.</p>
75 /// </note>
76 ///
77 /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.bias_position.is_none()`.
78 pub fn bias_position(&self) -> &[f64] {
79 self.bias_position.as_deref().unwrap_or_default()
80 }
81 /// <p>A structure which contains a set of inclusion/exclusion properties that results must possess in order to be returned as a result.</p>
82 pub fn filter(&self) -> ::std::option::Option<&crate::types::AutocompleteFilter> {
83 self.filter.as_ref()
84 }
85 /// <p>The <code>PostalCodeMode</code> affects how postal code results are returned. If a postal code spans multiple localities and this value is empty, partial district or locality information may be returned under a single postal code result entry. If it's populated with the value <code>EnumerateSpannedLocalities</code>, all cities in that postal code are returned.</p>
86 pub fn postal_code_mode(&self) -> ::std::option::Option<&crate::types::PostalCodeMode> {
87 self.postal_code_mode.as_ref()
88 }
89 /// <p>A list of optional additional parameters that can be requested for each result.</p>
90 ///
91 /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.additional_features.is_none()`.
92 pub fn additional_features(&self) -> &[crate::types::AutocompleteAdditionalFeature] {
93 self.additional_features.as_deref().unwrap_or_default()
94 }
95 /// <p>A list of <a href="https://en.wikipedia.org/wiki/IETF_language_tag">BCP 47</a> compliant language codes for the results to be rendered in. If there is no data for the result in the requested language, data will be returned in the default language for the entry.</p>
96 pub fn language(&self) -> ::std::option::Option<&str> {
97 self.language.as_deref()
98 }
99 /// <p>The alpha-2 or alpha-3 character code for the political view of a country. The political view applies to the results of the request to represent unresolved territorial claims through the point of view of the specified country.</p>
100 /// <p>The following political views are currently supported:</p>
101 /// <ul>
102 /// <li>
103 /// <p><code>ARG</code>: Argentina's view on the Southern Patagonian Ice Field and Tierra Del Fuego, including the Falkland Islands, South Georgia, and South Sandwich Islands</p></li>
104 /// <li>
105 /// <p><code>EGY</code>: Egypt's view on Bir Tawil</p></li>
106 /// <li>
107 /// <p><code>IND</code>: India's view on Gilgit-Baltistan</p></li>
108 /// <li>
109 /// <p><code>KEN</code>: Kenya's view on the Ilemi Triangle</p></li>
110 /// <li>
111 /// <p><code>MAR</code>: Morocco's view on Western Sahara</p></li>
112 /// <li>
113 /// <p><code>RUS</code>: Russia's view on Crimea</p></li>
114 /// <li>
115 /// <p><code>SDN</code>: Sudan's view on the Halaib Triangle</p></li>
116 /// <li>
117 /// <p><code>SRB</code>: Serbia's view on Kosovo, Vukovar, and Sarengrad Islands</p></li>
118 /// <li>
119 /// <p><code>SUR</code>: Suriname's view on the Courantyne Headwaters and Lawa Headwaters</p></li>
120 /// <li>
121 /// <p><code>SYR</code>: Syria's view on the Golan Heights</p></li>
122 /// <li>
123 /// <p><code>TUR</code>: Turkey's view on Cyprus and Northern Cyprus</p></li>
124 /// <li>
125 /// <p><code>TZA</code>: Tanzania's view on Lake Malawi</p></li>
126 /// <li>
127 /// <p><code>URY</code>: Uruguay's view on Rincon de Artigas</p></li>
128 /// <li>
129 /// <p><code>VNM</code>: Vietnam's view on the Paracel Islands and Spratly Islands</p></li>
130 /// </ul>
131 pub fn political_view(&self) -> ::std::option::Option<&str> {
132 self.political_view.as_deref()
133 }
134 /// <p>Indicates if the results will be stored. Defaults to <code>SingleUse</code>, if left empty.</p>
135 pub fn intended_use(&self) -> ::std::option::Option<&crate::types::AutocompleteIntendedUse> {
136 self.intended_use.as_ref()
137 }
138 /// <p>Optional: The API key to be used for authorization. Either an API key or valid SigV4 signature must be provided when making a request.</p>
139 pub fn key(&self) -> ::std::option::Option<&str> {
140 self.key.as_deref()
141 }
142}
143impl ::std::fmt::Debug for AutocompleteInput {
144 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
145 let mut formatter = f.debug_struct("AutocompleteInput");
146 formatter.field("query_text", &"*** Sensitive Data Redacted ***");
147 formatter.field("max_results", &self.max_results);
148 formatter.field("bias_position", &"*** Sensitive Data Redacted ***");
149 formatter.field("filter", &self.filter);
150 formatter.field("postal_code_mode", &self.postal_code_mode);
151 formatter.field("additional_features", &self.additional_features);
152 formatter.field("language", &self.language);
153 formatter.field("political_view", &"*** Sensitive Data Redacted ***");
154 formatter.field("intended_use", &self.intended_use);
155 formatter.field("key", &"*** Sensitive Data Redacted ***");
156 formatter.finish()
157 }
158}
159impl AutocompleteInput {
160 /// Creates a new builder-style object to manufacture [`AutocompleteInput`](crate::operation::autocomplete::AutocompleteInput).
161 pub fn builder() -> crate::operation::autocomplete::builders::AutocompleteInputBuilder {
162 crate::operation::autocomplete::builders::AutocompleteInputBuilder::default()
163 }
164}
165
166/// A builder for [`AutocompleteInput`](crate::operation::autocomplete::AutocompleteInput).
167#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
168#[non_exhaustive]
169pub struct AutocompleteInputBuilder {
170 pub(crate) query_text: ::std::option::Option<::std::string::String>,
171 pub(crate) max_results: ::std::option::Option<i32>,
172 pub(crate) bias_position: ::std::option::Option<::std::vec::Vec<f64>>,
173 pub(crate) filter: ::std::option::Option<crate::types::AutocompleteFilter>,
174 pub(crate) postal_code_mode: ::std::option::Option<crate::types::PostalCodeMode>,
175 pub(crate) additional_features: ::std::option::Option<::std::vec::Vec<crate::types::AutocompleteAdditionalFeature>>,
176 pub(crate) language: ::std::option::Option<::std::string::String>,
177 pub(crate) political_view: ::std::option::Option<::std::string::String>,
178 pub(crate) intended_use: ::std::option::Option<crate::types::AutocompleteIntendedUse>,
179 pub(crate) key: ::std::option::Option<::std::string::String>,
180}
181impl AutocompleteInputBuilder {
182 /// <p>The free-form text query to match addresses against. This is usually a partially typed address from an end user in an address box or form.</p><note>
183 /// <p>The fields <code>QueryText</code>, and <code>QueryID</code> are mutually exclusive.</p>
184 /// </note>
185 /// This field is required.
186 pub fn query_text(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
187 self.query_text = ::std::option::Option::Some(input.into());
188 self
189 }
190 /// <p>The free-form text query to match addresses against. This is usually a partially typed address from an end user in an address box or form.</p><note>
191 /// <p>The fields <code>QueryText</code>, and <code>QueryID</code> are mutually exclusive.</p>
192 /// </note>
193 pub fn set_query_text(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
194 self.query_text = input;
195 self
196 }
197 /// <p>The free-form text query to match addresses against. This is usually a partially typed address from an end user in an address box or form.</p><note>
198 /// <p>The fields <code>QueryText</code>, and <code>QueryID</code> are mutually exclusive.</p>
199 /// </note>
200 pub fn get_query_text(&self) -> &::std::option::Option<::std::string::String> {
201 &self.query_text
202 }
203 /// <p>An optional limit for the number of results returned in a single call.</p>
204 pub fn max_results(mut self, input: i32) -> Self {
205 self.max_results = ::std::option::Option::Some(input);
206 self
207 }
208 /// <p>An optional limit for the number of results returned in a single call.</p>
209 pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
210 self.max_results = input;
211 self
212 }
213 /// <p>An optional limit for the number of results returned in a single call.</p>
214 pub fn get_max_results(&self) -> &::std::option::Option<i32> {
215 &self.max_results
216 }
217 /// Appends an item to `bias_position`.
218 ///
219 /// To override the contents of this collection use [`set_bias_position`](Self::set_bias_position).
220 ///
221 /// <p>The position in longitude and latitude that the results should be close to. Typically, place results returned are ranked higher the closer they are to this position. Stored in <code>\[lng, lat\]</code> and in the WSG84 format.</p><note>
222 /// <p>The fields <code>BiasPosition</code>, <code>FilterBoundingBox</code>, and <code>FilterCircle</code> are mutually exclusive.</p>
223 /// </note>
224 pub fn bias_position(mut self, input: f64) -> Self {
225 let mut v = self.bias_position.unwrap_or_default();
226 v.push(input);
227 self.bias_position = ::std::option::Option::Some(v);
228 self
229 }
230 /// <p>The position in longitude and latitude that the results should be close to. Typically, place results returned are ranked higher the closer they are to this position. Stored in <code>\[lng, lat\]</code> and in the WSG84 format.</p><note>
231 /// <p>The fields <code>BiasPosition</code>, <code>FilterBoundingBox</code>, and <code>FilterCircle</code> are mutually exclusive.</p>
232 /// </note>
233 pub fn set_bias_position(mut self, input: ::std::option::Option<::std::vec::Vec<f64>>) -> Self {
234 self.bias_position = input;
235 self
236 }
237 /// <p>The position in longitude and latitude that the results should be close to. Typically, place results returned are ranked higher the closer they are to this position. Stored in <code>\[lng, lat\]</code> and in the WSG84 format.</p><note>
238 /// <p>The fields <code>BiasPosition</code>, <code>FilterBoundingBox</code>, and <code>FilterCircle</code> are mutually exclusive.</p>
239 /// </note>
240 pub fn get_bias_position(&self) -> &::std::option::Option<::std::vec::Vec<f64>> {
241 &self.bias_position
242 }
243 /// <p>A structure which contains a set of inclusion/exclusion properties that results must possess in order to be returned as a result.</p>
244 pub fn filter(mut self, input: crate::types::AutocompleteFilter) -> Self {
245 self.filter = ::std::option::Option::Some(input);
246 self
247 }
248 /// <p>A structure which contains a set of inclusion/exclusion properties that results must possess in order to be returned as a result.</p>
249 pub fn set_filter(mut self, input: ::std::option::Option<crate::types::AutocompleteFilter>) -> Self {
250 self.filter = input;
251 self
252 }
253 /// <p>A structure which contains a set of inclusion/exclusion properties that results must possess in order to be returned as a result.</p>
254 pub fn get_filter(&self) -> &::std::option::Option<crate::types::AutocompleteFilter> {
255 &self.filter
256 }
257 /// <p>The <code>PostalCodeMode</code> affects how postal code results are returned. If a postal code spans multiple localities and this value is empty, partial district or locality information may be returned under a single postal code result entry. If it's populated with the value <code>EnumerateSpannedLocalities</code>, all cities in that postal code are returned.</p>
258 pub fn postal_code_mode(mut self, input: crate::types::PostalCodeMode) -> Self {
259 self.postal_code_mode = ::std::option::Option::Some(input);
260 self
261 }
262 /// <p>The <code>PostalCodeMode</code> affects how postal code results are returned. If a postal code spans multiple localities and this value is empty, partial district or locality information may be returned under a single postal code result entry. If it's populated with the value <code>EnumerateSpannedLocalities</code>, all cities in that postal code are returned.</p>
263 pub fn set_postal_code_mode(mut self, input: ::std::option::Option<crate::types::PostalCodeMode>) -> Self {
264 self.postal_code_mode = input;
265 self
266 }
267 /// <p>The <code>PostalCodeMode</code> affects how postal code results are returned. If a postal code spans multiple localities and this value is empty, partial district or locality information may be returned under a single postal code result entry. If it's populated with the value <code>EnumerateSpannedLocalities</code>, all cities in that postal code are returned.</p>
268 pub fn get_postal_code_mode(&self) -> &::std::option::Option<crate::types::PostalCodeMode> {
269 &self.postal_code_mode
270 }
271 /// Appends an item to `additional_features`.
272 ///
273 /// To override the contents of this collection use [`set_additional_features`](Self::set_additional_features).
274 ///
275 /// <p>A list of optional additional parameters that can be requested for each result.</p>
276 pub fn additional_features(mut self, input: crate::types::AutocompleteAdditionalFeature) -> Self {
277 let mut v = self.additional_features.unwrap_or_default();
278 v.push(input);
279 self.additional_features = ::std::option::Option::Some(v);
280 self
281 }
282 /// <p>A list of optional additional parameters that can be requested for each result.</p>
283 pub fn set_additional_features(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::AutocompleteAdditionalFeature>>) -> Self {
284 self.additional_features = input;
285 self
286 }
287 /// <p>A list of optional additional parameters that can be requested for each result.</p>
288 pub fn get_additional_features(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::AutocompleteAdditionalFeature>> {
289 &self.additional_features
290 }
291 /// <p>A list of <a href="https://en.wikipedia.org/wiki/IETF_language_tag">BCP 47</a> compliant language codes for the results to be rendered in. If there is no data for the result in the requested language, data will be returned in the default language for the entry.</p>
292 pub fn language(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
293 self.language = ::std::option::Option::Some(input.into());
294 self
295 }
296 /// <p>A list of <a href="https://en.wikipedia.org/wiki/IETF_language_tag">BCP 47</a> compliant language codes for the results to be rendered in. If there is no data for the result in the requested language, data will be returned in the default language for the entry.</p>
297 pub fn set_language(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
298 self.language = input;
299 self
300 }
301 /// <p>A list of <a href="https://en.wikipedia.org/wiki/IETF_language_tag">BCP 47</a> compliant language codes for the results to be rendered in. If there is no data for the result in the requested language, data will be returned in the default language for the entry.</p>
302 pub fn get_language(&self) -> &::std::option::Option<::std::string::String> {
303 &self.language
304 }
305 /// <p>The alpha-2 or alpha-3 character code for the political view of a country. The political view applies to the results of the request to represent unresolved territorial claims through the point of view of the specified country.</p>
306 /// <p>The following political views are currently supported:</p>
307 /// <ul>
308 /// <li>
309 /// <p><code>ARG</code>: Argentina's view on the Southern Patagonian Ice Field and Tierra Del Fuego, including the Falkland Islands, South Georgia, and South Sandwich Islands</p></li>
310 /// <li>
311 /// <p><code>EGY</code>: Egypt's view on Bir Tawil</p></li>
312 /// <li>
313 /// <p><code>IND</code>: India's view on Gilgit-Baltistan</p></li>
314 /// <li>
315 /// <p><code>KEN</code>: Kenya's view on the Ilemi Triangle</p></li>
316 /// <li>
317 /// <p><code>MAR</code>: Morocco's view on Western Sahara</p></li>
318 /// <li>
319 /// <p><code>RUS</code>: Russia's view on Crimea</p></li>
320 /// <li>
321 /// <p><code>SDN</code>: Sudan's view on the Halaib Triangle</p></li>
322 /// <li>
323 /// <p><code>SRB</code>: Serbia's view on Kosovo, Vukovar, and Sarengrad Islands</p></li>
324 /// <li>
325 /// <p><code>SUR</code>: Suriname's view on the Courantyne Headwaters and Lawa Headwaters</p></li>
326 /// <li>
327 /// <p><code>SYR</code>: Syria's view on the Golan Heights</p></li>
328 /// <li>
329 /// <p><code>TUR</code>: Turkey's view on Cyprus and Northern Cyprus</p></li>
330 /// <li>
331 /// <p><code>TZA</code>: Tanzania's view on Lake Malawi</p></li>
332 /// <li>
333 /// <p><code>URY</code>: Uruguay's view on Rincon de Artigas</p></li>
334 /// <li>
335 /// <p><code>VNM</code>: Vietnam's view on the Paracel Islands and Spratly Islands</p></li>
336 /// </ul>
337 pub fn political_view(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
338 self.political_view = ::std::option::Option::Some(input.into());
339 self
340 }
341 /// <p>The alpha-2 or alpha-3 character code for the political view of a country. The political view applies to the results of the request to represent unresolved territorial claims through the point of view of the specified country.</p>
342 /// <p>The following political views are currently supported:</p>
343 /// <ul>
344 /// <li>
345 /// <p><code>ARG</code>: Argentina's view on the Southern Patagonian Ice Field and Tierra Del Fuego, including the Falkland Islands, South Georgia, and South Sandwich Islands</p></li>
346 /// <li>
347 /// <p><code>EGY</code>: Egypt's view on Bir Tawil</p></li>
348 /// <li>
349 /// <p><code>IND</code>: India's view on Gilgit-Baltistan</p></li>
350 /// <li>
351 /// <p><code>KEN</code>: Kenya's view on the Ilemi Triangle</p></li>
352 /// <li>
353 /// <p><code>MAR</code>: Morocco's view on Western Sahara</p></li>
354 /// <li>
355 /// <p><code>RUS</code>: Russia's view on Crimea</p></li>
356 /// <li>
357 /// <p><code>SDN</code>: Sudan's view on the Halaib Triangle</p></li>
358 /// <li>
359 /// <p><code>SRB</code>: Serbia's view on Kosovo, Vukovar, and Sarengrad Islands</p></li>
360 /// <li>
361 /// <p><code>SUR</code>: Suriname's view on the Courantyne Headwaters and Lawa Headwaters</p></li>
362 /// <li>
363 /// <p><code>SYR</code>: Syria's view on the Golan Heights</p></li>
364 /// <li>
365 /// <p><code>TUR</code>: Turkey's view on Cyprus and Northern Cyprus</p></li>
366 /// <li>
367 /// <p><code>TZA</code>: Tanzania's view on Lake Malawi</p></li>
368 /// <li>
369 /// <p><code>URY</code>: Uruguay's view on Rincon de Artigas</p></li>
370 /// <li>
371 /// <p><code>VNM</code>: Vietnam's view on the Paracel Islands and Spratly Islands</p></li>
372 /// </ul>
373 pub fn set_political_view(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
374 self.political_view = input;
375 self
376 }
377 /// <p>The alpha-2 or alpha-3 character code for the political view of a country. The political view applies to the results of the request to represent unresolved territorial claims through the point of view of the specified country.</p>
378 /// <p>The following political views are currently supported:</p>
379 /// <ul>
380 /// <li>
381 /// <p><code>ARG</code>: Argentina's view on the Southern Patagonian Ice Field and Tierra Del Fuego, including the Falkland Islands, South Georgia, and South Sandwich Islands</p></li>
382 /// <li>
383 /// <p><code>EGY</code>: Egypt's view on Bir Tawil</p></li>
384 /// <li>
385 /// <p><code>IND</code>: India's view on Gilgit-Baltistan</p></li>
386 /// <li>
387 /// <p><code>KEN</code>: Kenya's view on the Ilemi Triangle</p></li>
388 /// <li>
389 /// <p><code>MAR</code>: Morocco's view on Western Sahara</p></li>
390 /// <li>
391 /// <p><code>RUS</code>: Russia's view on Crimea</p></li>
392 /// <li>
393 /// <p><code>SDN</code>: Sudan's view on the Halaib Triangle</p></li>
394 /// <li>
395 /// <p><code>SRB</code>: Serbia's view on Kosovo, Vukovar, and Sarengrad Islands</p></li>
396 /// <li>
397 /// <p><code>SUR</code>: Suriname's view on the Courantyne Headwaters and Lawa Headwaters</p></li>
398 /// <li>
399 /// <p><code>SYR</code>: Syria's view on the Golan Heights</p></li>
400 /// <li>
401 /// <p><code>TUR</code>: Turkey's view on Cyprus and Northern Cyprus</p></li>
402 /// <li>
403 /// <p><code>TZA</code>: Tanzania's view on Lake Malawi</p></li>
404 /// <li>
405 /// <p><code>URY</code>: Uruguay's view on Rincon de Artigas</p></li>
406 /// <li>
407 /// <p><code>VNM</code>: Vietnam's view on the Paracel Islands and Spratly Islands</p></li>
408 /// </ul>
409 pub fn get_political_view(&self) -> &::std::option::Option<::std::string::String> {
410 &self.political_view
411 }
412 /// <p>Indicates if the results will be stored. Defaults to <code>SingleUse</code>, if left empty.</p>
413 pub fn intended_use(mut self, input: crate::types::AutocompleteIntendedUse) -> Self {
414 self.intended_use = ::std::option::Option::Some(input);
415 self
416 }
417 /// <p>Indicates if the results will be stored. Defaults to <code>SingleUse</code>, if left empty.</p>
418 pub fn set_intended_use(mut self, input: ::std::option::Option<crate::types::AutocompleteIntendedUse>) -> Self {
419 self.intended_use = input;
420 self
421 }
422 /// <p>Indicates if the results will be stored. Defaults to <code>SingleUse</code>, if left empty.</p>
423 pub fn get_intended_use(&self) -> &::std::option::Option<crate::types::AutocompleteIntendedUse> {
424 &self.intended_use
425 }
426 /// <p>Optional: The API key to be used for authorization. Either an API key or valid SigV4 signature must be provided when making a request.</p>
427 pub fn key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
428 self.key = ::std::option::Option::Some(input.into());
429 self
430 }
431 /// <p>Optional: The API key to be used for authorization. Either an API key or valid SigV4 signature must be provided when making a request.</p>
432 pub fn set_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
433 self.key = input;
434 self
435 }
436 /// <p>Optional: The API key to be used for authorization. Either an API key or valid SigV4 signature must be provided when making a request.</p>
437 pub fn get_key(&self) -> &::std::option::Option<::std::string::String> {
438 &self.key
439 }
440 /// Consumes the builder and constructs a [`AutocompleteInput`](crate::operation::autocomplete::AutocompleteInput).
441 pub fn build(self) -> ::std::result::Result<crate::operation::autocomplete::AutocompleteInput, ::aws_smithy_types::error::operation::BuildError> {
442 ::std::result::Result::Ok(crate::operation::autocomplete::AutocompleteInput {
443 query_text: self.query_text,
444 max_results: self.max_results,
445 bias_position: self.bias_position,
446 filter: self.filter,
447 postal_code_mode: self.postal_code_mode,
448 additional_features: self.additional_features,
449 language: self.language,
450 political_view: self.political_view,
451 intended_use: self.intended_use,
452 key: self.key,
453 })
454 }
455}
456impl ::std::fmt::Debug for AutocompleteInputBuilder {
457 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
458 let mut formatter = f.debug_struct("AutocompleteInputBuilder");
459 formatter.field("query_text", &"*** Sensitive Data Redacted ***");
460 formatter.field("max_results", &self.max_results);
461 formatter.field("bias_position", &"*** Sensitive Data Redacted ***");
462 formatter.field("filter", &self.filter);
463 formatter.field("postal_code_mode", &self.postal_code_mode);
464 formatter.field("additional_features", &self.additional_features);
465 formatter.field("language", &self.language);
466 formatter.field("political_view", &"*** Sensitive Data Redacted ***");
467 formatter.field("intended_use", &self.intended_use);
468 formatter.field("key", &"*** Sensitive Data Redacted ***");
469 formatter.finish()
470 }
471}