/* * Copyright 2010-2023 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. */ package com.amazonaws.services.geo.model; import java.io.Serializable; import com.amazonaws.AmazonWebServiceRequest; /** *

* 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 class SearchPlaceIndexForSuggestionsRequest extends AmazonWebServiceRequest implements Serializable { /** *

* 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. *

*
*/ private java.util.List biasPosition; /** *

* 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. *

*
*/ private java.util.List filterBBox; /** *

* 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. *

*/ private java.util.List filterCategories; /** *

* 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. *

    *
  • *
*/ private java.util.List filterCountries; /** *

* The name of the place index resource you want to use for the search. *

*

* Constraints:
* Length: 1 - 100
* Pattern: ^[-._\w]+$
*/ private String indexName; /** *

* 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. *

*

* Constraints:
* Length: 2 - 35
*/ private String language; /** *

* An optional parameter. The maximum number of results returned per * request. *

*

* The default: 5 *

*

* Constraints:
* Range: 1 - 15
*/ private Integer maxResults; /** *

* The free-form partial text to use to generate place suggestions. For * example, eiffel tow. *

*

* Constraints:
* Length: 1 - 200
*/ private String text; /** *

* 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. *

*
* * @return

* 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. *

*
*/ public java.util.List getBiasPosition() { return 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. *

*
* * @param 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. *

*
*/ public void setBiasPosition(java.util.Collection biasPosition) { if (biasPosition == null) { this.biasPosition = null; return; } this.biasPosition = new java.util.ArrayList(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. *

*
*

* Returns a reference to this object so that method calls can be chained * together. * * @param 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. *

*
* @return A reference to this updated object so that method calls can be * chained together. */ public SearchPlaceIndexForSuggestionsRequest withBiasPosition(Double... biasPosition) { if (getBiasPosition() == null) { this.biasPosition = new java.util.ArrayList(biasPosition.length); } for (Double value : biasPosition) { this.biasPosition.add(value); } return this; } /** *

* 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. *

*
*

* Returns a reference to this object so that method calls can be chained * together. * * @param 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. *

*
* @return A reference to this updated object so that method calls can be * chained together. */ public SearchPlaceIndexForSuggestionsRequest withBiasPosition( java.util.Collection biasPosition) { setBiasPosition(biasPosition); return this; } /** *

* 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. *

*
* * @return

* 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. *

*
*/ public java.util.List getFilterBBox() { return 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. *

*
* * @param 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. *

*
*/ public void setFilterBBox(java.util.Collection filterBBox) { if (filterBBox == null) { this.filterBBox = null; return; } this.filterBBox = new java.util.ArrayList(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. *

*
*

* Returns a reference to this object so that method calls can be chained * together. * * @param 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. *

*
* @return A reference to this updated object so that method calls can be * chained together. */ public SearchPlaceIndexForSuggestionsRequest withFilterBBox(Double... filterBBox) { if (getFilterBBox() == null) { this.filterBBox = new java.util.ArrayList(filterBBox.length); } for (Double value : filterBBox) { this.filterBBox.add(value); } return this; } /** *

* 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. *

*
*

* Returns a reference to this object so that method calls can be chained * together. * * @param 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. *

*
* @return A reference to this updated object so that method calls can be * chained together. */ public SearchPlaceIndexForSuggestionsRequest withFilterBBox( java.util.Collection filterBBox) { setFilterBBox(filterBBox); return this; } /** *

* 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. *

* * @return

* 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. *

*/ public java.util.List getFilterCategories() { return 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. *

* * @param 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. *

*/ public void setFilterCategories(java.util.Collection filterCategories) { if (filterCategories == null) { this.filterCategories = null; return; } this.filterCategories = new java.util.ArrayList(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. *

*

* Returns a reference to this object so that method calls can be chained * together. * * @param 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. *

* @return A reference to this updated object so that method calls can be * chained together. */ public SearchPlaceIndexForSuggestionsRequest withFilterCategories(String... filterCategories) { if (getFilterCategories() == null) { this.filterCategories = new java.util.ArrayList(filterCategories.length); } for (String value : filterCategories) { this.filterCategories.add(value); } return this; } /** *

* 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. *

*

* Returns a reference to this object so that method calls can be chained * together. * * @param 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. *

* @return A reference to this updated object so that method calls can be * chained together. */ public SearchPlaceIndexForSuggestionsRequest withFilterCategories( java.util.Collection filterCategories) { setFilterCategories(filterCategories); return this; } /** *

* 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. *

    *
  • *
* * @return

* 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. *

    *
  • *
*/ public java.util.List getFilterCountries() { return 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. *

    *
  • *
* * @param 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. *

    *
  • *
*/ public void setFilterCountries(java.util.Collection filterCountries) { if (filterCountries == null) { this.filterCountries = null; return; } this.filterCountries = new java.util.ArrayList(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. *

    *
  • *
*

* Returns a reference to this object so that method calls can be chained * together. * * @param 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. *

    *
  • *
* @return A reference to this updated object so that method calls can be * chained together. */ public SearchPlaceIndexForSuggestionsRequest withFilterCountries(String... filterCountries) { if (getFilterCountries() == null) { this.filterCountries = new java.util.ArrayList(filterCountries.length); } for (String value : filterCountries) { this.filterCountries.add(value); } return this; } /** *

* 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. *

    *
  • *
*

* Returns a reference to this object so that method calls can be chained * together. * * @param 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. *

    *
  • *
* @return A reference to this updated object so that method calls can be * chained together. */ public SearchPlaceIndexForSuggestionsRequest withFilterCountries( java.util.Collection filterCountries) { setFilterCountries(filterCountries); return this; } /** *

* The name of the place index resource you want to use for the search. *

*

* Constraints:
* Length: 1 - 100
* Pattern: ^[-._\w]+$
* * @return

* The name of the place index resource you want to use for the * search. *

*/ public String getIndexName() { return indexName; } /** *

* The name of the place index resource you want to use for the search. *

*

* Constraints:
* Length: 1 - 100
* Pattern: ^[-._\w]+$
* * @param indexName

* The name of the place index resource you want to use for the * search. *

*/ public void setIndexName(String indexName) { this.indexName = indexName; } /** *

* The name of the place index resource you want to use for the search. *

*

* Returns a reference to this object so that method calls can be chained * together. *

* Constraints:
* Length: 1 - 100
* Pattern: ^[-._\w]+$
* * @param indexName

* The name of the place index resource you want to use for the * search. *

* @return A reference to this updated object so that method calls can be * chained together. */ public SearchPlaceIndexForSuggestionsRequest withIndexName(String indexName) { this.indexName = indexName; return this; } /** *

* 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. *

*

* Constraints:
* Length: 2 - 35
* * @return

* 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. *

*/ public String getLanguage() { return 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. *

*

* Constraints:
* Length: 2 - 35
* * @param 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. *

*/ public void setLanguage(String language) { this.language = 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. *

*

* Returns a reference to this object so that method calls can be chained * together. *

* Constraints:
* Length: 2 - 35
* * @param 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. *

* @return A reference to this updated object so that method calls can be * chained together. */ public SearchPlaceIndexForSuggestionsRequest withLanguage(String language) { this.language = language; return this; } /** *

* An optional parameter. The maximum number of results returned per * request. *

*

* The default: 5 *

*

* Constraints:
* Range: 1 - 15
* * @return

* An optional parameter. The maximum number of results returned per * request. *

*

* The default: 5 *

*/ public Integer getMaxResults() { return maxResults; } /** *

* An optional parameter. The maximum number of results returned per * request. *

*

* The default: 5 *

*

* Constraints:
* Range: 1 - 15
* * @param maxResults

* An optional parameter. The maximum number of results returned * per request. *

*

* The default: 5 *

*/ public void setMaxResults(Integer maxResults) { this.maxResults = maxResults; } /** *

* An optional parameter. The maximum number of results returned per * request. *

*

* The default: 5 *

*

* Returns a reference to this object so that method calls can be chained * together. *

* Constraints:
* Range: 1 - 15
* * @param maxResults

* An optional parameter. The maximum number of results returned * per request. *

*

* The default: 5 *

* @return A reference to this updated object so that method calls can be * chained together. */ public SearchPlaceIndexForSuggestionsRequest withMaxResults(Integer maxResults) { this.maxResults = maxResults; return this; } /** *

* The free-form partial text to use to generate place suggestions. For * example, eiffel tow. *

*

* Constraints:
* Length: 1 - 200
* * @return

* The free-form partial text to use to generate place suggestions. * For example, eiffel tow. *

*/ public String getText() { return text; } /** *

* The free-form partial text to use to generate place suggestions. For * example, eiffel tow. *

*

* Constraints:
* Length: 1 - 200
* * @param text

* The free-form partial text to use to generate place * suggestions. For example, eiffel tow. *

*/ public void setText(String text) { this.text = text; } /** *

* The free-form partial text to use to generate place suggestions. For * example, eiffel tow. *

*

* Returns a reference to this object so that method calls can be chained * together. *

* Constraints:
* Length: 1 - 200
* * @param text

* The free-form partial text to use to generate place * suggestions. For example, eiffel tow. *

* @return A reference to this updated object so that method calls can be * chained together. */ public SearchPlaceIndexForSuggestionsRequest withText(String text) { this.text = text; return this; } /** * Returns a string representation of this object; useful for testing and * debugging. * * @return A string representation of this object. * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getBiasPosition() != null) sb.append("BiasPosition: " + getBiasPosition() + ","); if (getFilterBBox() != null) sb.append("FilterBBox: " + getFilterBBox() + ","); if (getFilterCategories() != null) sb.append("FilterCategories: " + getFilterCategories() + ","); if (getFilterCountries() != null) sb.append("FilterCountries: " + getFilterCountries() + ","); if (getIndexName() != null) sb.append("IndexName: " + getIndexName() + ","); if (getLanguage() != null) sb.append("Language: " + getLanguage() + ","); if (getMaxResults() != null) sb.append("MaxResults: " + getMaxResults() + ","); if (getText() != null) sb.append("Text: " + getText()); sb.append("}"); return sb.toString(); } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getBiasPosition() == null) ? 0 : getBiasPosition().hashCode()); hashCode = prime * hashCode + ((getFilterBBox() == null) ? 0 : getFilterBBox().hashCode()); hashCode = prime * hashCode + ((getFilterCategories() == null) ? 0 : getFilterCategories().hashCode()); hashCode = prime * hashCode + ((getFilterCountries() == null) ? 0 : getFilterCountries().hashCode()); hashCode = prime * hashCode + ((getIndexName() == null) ? 0 : getIndexName().hashCode()); hashCode = prime * hashCode + ((getLanguage() == null) ? 0 : getLanguage().hashCode()); hashCode = prime * hashCode + ((getMaxResults() == null) ? 0 : getMaxResults().hashCode()); hashCode = prime * hashCode + ((getText() == null) ? 0 : getText().hashCode()); return hashCode; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof SearchPlaceIndexForSuggestionsRequest == false) return false; SearchPlaceIndexForSuggestionsRequest other = (SearchPlaceIndexForSuggestionsRequest) obj; if (other.getBiasPosition() == null ^ this.getBiasPosition() == null) return false; if (other.getBiasPosition() != null && other.getBiasPosition().equals(this.getBiasPosition()) == false) return false; if (other.getFilterBBox() == null ^ this.getFilterBBox() == null) return false; if (other.getFilterBBox() != null && other.getFilterBBox().equals(this.getFilterBBox()) == false) return false; if (other.getFilterCategories() == null ^ this.getFilterCategories() == null) return false; if (other.getFilterCategories() != null && other.getFilterCategories().equals(this.getFilterCategories()) == false) return false; if (other.getFilterCountries() == null ^ this.getFilterCountries() == null) return false; if (other.getFilterCountries() != null && other.getFilterCountries().equals(this.getFilterCountries()) == false) return false; if (other.getIndexName() == null ^ this.getIndexName() == null) return false; if (other.getIndexName() != null && other.getIndexName().equals(this.getIndexName()) == false) return false; if (other.getLanguage() == null ^ this.getLanguage() == null) return false; if (other.getLanguage() != null && other.getLanguage().equals(this.getLanguage()) == false) return false; if (other.getMaxResults() == null ^ this.getMaxResults() == null) return false; if (other.getMaxResults() != null && other.getMaxResults().equals(this.getMaxResults()) == false) return false; if (other.getText() == null ^ this.getText() == null) return false; if (other.getText() != null && other.getText().equals(this.getText()) == false) return false; return true; } }