/*
* 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 SearchPlaceIndexForText operation.
/// Geocodes free-form text, such as an address, name, city, or region to allow you to
/// search for Places or points of interest.
///
///
///
/// 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 places near a given position using BiasPosition
, or
/// filter results within a bounding box using FilterBBox
. Providing both
/// parameters simultaneously returns an error.
///
///
///
/// Search results are returned in order of highest to lowest relevance.
///
///
public partial class SearchPlaceIndexForTextRequest : 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 places 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 places that
/// are within the provided 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 places that
/// are in a specified list of countries.
///
/// -
///
/// Valid values include ISO
/// 3166 3-digit country codes. 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, but not the results themselves.
/// 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, Greece
,
/// with the language
parameter set to en
. The result found
/// will most likely be returned as Athens
.
///
///
///
/// 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: 50
///
///
[AWSProperty(Min=1, Max=50)]
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 address, name, city, or region to be used in the search in free-form text format.
/// For example, 123 Any Street
.
///
///
[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;
}
}
}