/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the location-2020-11-19.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.LocationService.Model { /// /// Container for the parameters to the SearchPlaceIndexForSuggestions operation. /// Generates suggestions for addresses and points of interest based on partial or misspelled /// free-form text. This operation is also known as autocomplete, autosuggest, or fuzzy /// matching. /// /// /// /// Optional parameters let you narrow your search results by bounding box or country, /// or bias your search toward a specific position on the globe. /// /// /// /// You can search for suggested place names near a specified position by using BiasPosition, /// or filter results within a bounding box by using FilterBBox. These parameters /// are mutually exclusive; using both BiasPosition and FilterBBox /// in the same command returns an error. /// /// /// public partial class SearchPlaceIndexForSuggestionsRequest : AmazonLocationServiceRequest { private List _biasPosition = new List(); private List _filterBBox = new List(); private List _filterCategories = new List(); private List _filterCountries = new List(); private string _indexName; private string _key; private string _language; private int? _maxResults; private string _text; /// /// Gets and sets the property BiasPosition. /// /// An optional parameter that indicates a preference for place suggestions that are closer /// to a specified position. /// /// /// /// If provided, this parameter must contain a pair of numbers. The first number represents /// the X coordinate, or longitude; the second number represents the Y coordinate, or /// latitude. /// /// /// /// For example, [-123.1174, 49.2847] represents the position with longitude /// -123.1174 and latitude 49.2847. /// /// /// /// BiasPosition and FilterBBox are mutually exclusive. Specifying /// both options results in an error. /// /// /// [AWSProperty(Sensitive=true, Min=2, Max=2)] public List BiasPosition { get { return this._biasPosition; } set { this._biasPosition = value; } } // Check to see if BiasPosition property is set internal bool IsSetBiasPosition() { return this._biasPosition != null && this._biasPosition.Count > 0; } /// /// Gets and sets the property FilterBBox. /// /// An optional parameter that limits the search results by returning only suggestions /// within a specified bounding box. /// /// /// /// If provided, this parameter must contain a total of four consecutive numbers in two /// pairs. The first pair of numbers represents the X and Y coordinates (longitude and /// latitude, respectively) of the southwest corner of the bounding box; the second pair /// of numbers represents the X and Y coordinates (longitude and latitude, respectively) /// of the northeast corner of the bounding box. /// /// /// /// For example, [-12.7935, -37.4835, -12.0684, -36.9542] represents a bounding /// box where the southwest corner has longitude -12.7935 and latitude -37.4835, /// and the northeast corner has longitude -12.0684 and latitude -36.9542. /// /// /// /// FilterBBox and BiasPosition are mutually exclusive. Specifying /// both options results in an error. /// /// /// [AWSProperty(Sensitive=true, Min=4, Max=4)] public List FilterBBox { get { return this._filterBBox; } set { this._filterBBox = value; } } // Check to see if FilterBBox property is set internal bool IsSetFilterBBox() { return this._filterBBox != null && this._filterBBox.Count > 0; } /// /// Gets and sets the property FilterCategories. /// /// A list of one or more Amazon Location categories to filter the returned places. If /// you include more than one category, the results will include results that match any /// of the categories listed. /// /// /// /// For more information about using categories, including a list of Amazon Location categories, /// see Categories /// and filtering, in the Amazon Location Service Developer Guide. /// /// [AWSProperty(Min=1, Max=5)] public List FilterCategories { get { return this._filterCategories; } set { this._filterCategories = value; } } // Check to see if FilterCategories property is set internal bool IsSetFilterCategories() { return this._filterCategories != null && this._filterCategories.Count > 0; } /// /// Gets and sets the property FilterCountries. /// /// An optional parameter that limits the search results by returning only suggestions /// within the provided list of countries. /// ///
  • /// /// Use the ISO 3166 3-digit /// country code. For example, Australia uses three upper-case characters: AUS. /// ///
///
[AWSProperty(Min=1, Max=100)] public List FilterCountries { get { return this._filterCountries; } set { this._filterCountries = value; } } // Check to see if FilterCountries property is set internal bool IsSetFilterCountries() { return this._filterCountries != null && this._filterCountries.Count > 0; } /// /// Gets and sets the property IndexName. /// /// The name of the place index resource you want to use for the search. /// /// [AWSProperty(Required=true, Min=1, Max=100)] public string IndexName { get { return this._indexName; } set { this._indexName = value; } } // Check to see if IndexName property is set internal bool IsSetIndexName() { return this._indexName != null; } /// /// Gets and sets the property Key. /// /// The optional API /// key to authorize the request. /// /// [AWSProperty(Sensitive=true, Min=0, Max=1000)] public string Key { get { return this._key; } set { this._key = value; } } // Check to see if Key property is set internal bool IsSetKey() { return this._key != null; } /// /// Gets and sets the property Language. /// /// The preferred language used to return results. The value must be a valid BCP /// 47 language tag, for example, en for English. /// /// /// /// This setting affects the languages used in the results. If no language is specified, /// or not supported for a particular result, the partner automatically chooses a language /// for the result. /// /// /// /// For an example, we'll use the Greek language. You search for Athens, Gr /// to get suggestions with the language parameter set to en. /// The results found will most likely be returned as Athens, Greece. /// /// /// /// If you set the language parameter to el, for Greek, then /// the result found will more likely be returned as Αθήνα, Ελλάδα. /// /// /// /// If the data provider does not have a value for Greek, the result will be in a language /// that the provider does support. /// /// [AWSProperty(Min=2, Max=35)] public string Language { get { return this._language; } set { this._language = value; } } // Check to see if Language property is set internal bool IsSetLanguage() { return this._language != null; } /// /// Gets and sets the property MaxResults. /// /// An optional parameter. The maximum number of results returned per request. /// /// /// /// The default: 5 /// /// [AWSProperty(Min=1, Max=15)] public int MaxResults { get { return this._maxResults.GetValueOrDefault(); } set { this._maxResults = value; } } // Check to see if MaxResults property is set internal bool IsSetMaxResults() { return this._maxResults.HasValue; } /// /// Gets and sets the property Text. /// /// The free-form partial text to use to generate place suggestions. For example, eiffel /// tow. /// /// [AWSProperty(Required=true, Sensitive=true, Min=1, Max=200)] public string Text { get { return this._text; } set { this._text = value; } } // Check to see if Text property is set internal bool IsSetText() { return this._text != null; } } }