aws_sdk_geoplaces/client/
geocode.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2impl super::Client {
3    /// Constructs a fluent builder for the [`Geocode`](crate::operation::geocode::builders::GeocodeFluentBuilder) operation.
4    ///
5    /// - The fluent builder is configurable:
6    ///   - [`query_text(impl Into<String>)`](crate::operation::geocode::builders::GeocodeFluentBuilder::query_text) / [`set_query_text(Option<String>)`](crate::operation::geocode::builders::GeocodeFluentBuilder::set_query_text):<br>required: **false**<br><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>  <p>The fields <code>QueryText</code>, and <code>QueryID</code> are mutually exclusive.</p> </note><br>
7    ///   - [`query_components(GeocodeQueryComponents)`](crate::operation::geocode::builders::GeocodeFluentBuilder::query_components) / [`set_query_components(Option<GeocodeQueryComponents>)`](crate::operation::geocode::builders::GeocodeFluentBuilder::set_query_components):<br>required: **false**<br><p>A structured free text query allows you to search for places by the name or text representation of specific properties of the place.</p><br>
8    ///   - [`max_results(i32)`](crate::operation::geocode::builders::GeocodeFluentBuilder::max_results) / [`set_max_results(Option<i32>)`](crate::operation::geocode::builders::GeocodeFluentBuilder::set_max_results):<br>required: **false**<br><p>An optional limit for the number of results returned in a single call.</p><br>
9    ///   - [`bias_position(f64)`](crate::operation::geocode::builders::GeocodeFluentBuilder::bias_position) / [`set_bias_position(Option<Vec::<f64>>)`](crate::operation::geocode::builders::GeocodeFluentBuilder::set_bias_position):<br>required: **false**<br><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>  <p>The fields <code>BiasPosition</code>, <code>FilterBoundingBox</code>, and <code>FilterCircle</code> are mutually exclusive.</p> </note><br>
10    ///   - [`filter(GeocodeFilter)`](crate::operation::geocode::builders::GeocodeFluentBuilder::filter) / [`set_filter(Option<GeocodeFilter>)`](crate::operation::geocode::builders::GeocodeFluentBuilder::set_filter):<br>required: **false**<br><p>A structure which contains a set of inclusion/exclusion properties that results must possess in order to be returned as a result.</p><br>
11    ///   - [`additional_features(GeocodeAdditionalFeature)`](crate::operation::geocode::builders::GeocodeFluentBuilder::additional_features) / [`set_additional_features(Option<Vec::<GeocodeAdditionalFeature>>)`](crate::operation::geocode::builders::GeocodeFluentBuilder::set_additional_features):<br>required: **false**<br><p>A list of optional additional parameters, such as time zone, that can be requested for each result.</p><br>
12    ///   - [`language(impl Into<String>)`](crate::operation::geocode::builders::GeocodeFluentBuilder::language) / [`set_language(Option<String>)`](crate::operation::geocode::builders::GeocodeFluentBuilder::set_language):<br>required: **false**<br><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><br>
13    ///   - [`political_view(impl Into<String>)`](crate::operation::geocode::builders::GeocodeFluentBuilder::political_view) / [`set_political_view(Option<String>)`](crate::operation::geocode::builders::GeocodeFluentBuilder::set_political_view):<br>required: **false**<br><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><br>
14    ///   - [`intended_use(GeocodeIntendedUse)`](crate::operation::geocode::builders::GeocodeFluentBuilder::intended_use) / [`set_intended_use(Option<GeocodeIntendedUse>)`](crate::operation::geocode::builders::GeocodeFluentBuilder::set_intended_use):<br>required: **false**<br><p>Indicates if the results will be stored. Defaults to <code>SingleUse</code>, if left empty.</p><note>  <p>Storing the response of an Geocode query is required to comply with service terms, but charged at a higher cost per request. Please review the <a href="https://aws.amazon.com/location/sla/">user agreement</a> and <a href="https://aws.amazon.com/location/pricing/">service pricing structure</a> to determine the correct setting for your use case.</p> </note><br>
15    ///   - [`key(impl Into<String>)`](crate::operation::geocode::builders::GeocodeFluentBuilder::key) / [`set_key(Option<String>)`](crate::operation::geocode::builders::GeocodeFluentBuilder::set_key):<br>required: **false**<br><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><br>
16    /// - On success, responds with [`GeocodeOutput`](crate::operation::geocode::GeocodeOutput) with field(s):
17    ///   - [`pricing_bucket(String)`](crate::operation::geocode::GeocodeOutput::pricing_bucket): <p>The pricing bucket for which the query is charged at.</p> <p>For more information on pricing, please visit <a href="https://aws.amazon.com/location/pricing/">Amazon Location Service Pricing</a>.</p>
18    ///   - [`result_items(Option<Vec::<GeocodeResultItem>>)`](crate::operation::geocode::GeocodeOutput::result_items): <p>List of places or results returned for a query.</p>
19    /// - On failure, responds with [`SdkError<GeocodeError>`](crate::operation::geocode::GeocodeError)
20    pub fn geocode(&self) -> crate::operation::geocode::builders::GeocodeFluentBuilder {
21        crate::operation::geocode::builders::GeocodeFluentBuilder::new(self.handle.clone())
22    }
23}