com.amazonaws.services.location.model.SearchPlaceIndexForTextRequest Maven / Gradle / Ivy
Show all versions of aws-java-sdk-location Show documentation
/*
* Copyright 2019-2024 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.location.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.AmazonWebServiceRequest;
/**
*
* @see AWS
* API Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class SearchPlaceIndexForTextRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {
/**
*
* The name of the place index resource you want to use for the search.
*
*/
private String indexName;
/**
*
* The address, name, city, or region to be used in the search in free-form text format. For example,
* 123 Any Street
.
*
*/
private String text;
/**
*
* 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.
*
*
*/
private java.util.List biasPosition;
/**
*
* 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.
*
*
*/
private java.util.List filterBBox;
/**
*
* 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
.
*
*
*
*/
private java.util.List filterCountries;
/**
*
* An optional parameter. The maximum number of results returned per request.
*
*
* The default: 50
*
*/
private Integer maxResults;
/**
*
* 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.
*
*/
private String language;
/**
*
* 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;
/**
*
* The optional API key
* to authorize the request.
*
*/
private String key;
/**
*
* The name of the place index resource you want to use for the search.
*
*
* @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.
*
*
* @return The name of the place index resource you want to use for the search.
*/
public String getIndexName() {
return this.indexName;
}
/**
*
* The name of the place index resource you want to use for the search.
*
*
* @param indexName
* The name of the place index resource you want to use for the search.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public SearchPlaceIndexForTextRequest withIndexName(String indexName) {
setIndexName(indexName);
return this;
}
/**
*
* The address, name, city, or region to be used in the search in free-form text format. For example,
* 123 Any Street
.
*
*
* @param text
* The address, name, city, or region to be used in the search in free-form text format. For example,
* 123 Any Street
.
*/
public void setText(String text) {
this.text = text;
}
/**
*
* The address, name, city, or region to be used in the search in free-form text format. For example,
* 123 Any Street
.
*
*
* @return The address, name, city, or region to be used in the search in free-form text format. For example,
* 123 Any Street
.
*/
public String getText() {
return this.text;
}
/**
*
* The address, name, city, or region to be used in the search in free-form text format. For example,
* 123 Any Street
.
*
*
* @param text
* The address, name, city, or region to be used in the search in free-form text format. For example,
* 123 Any Street
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public SearchPlaceIndexForTextRequest withText(String text) {
setText(text);
return this;
}
/**
*
* 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.
*
*
*
* @return 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.
*
*/
public java.util.List getBiasPosition() {
return 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.
*
*
*
* @param 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.
*
*/
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 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.
*
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setBiasPosition(java.util.Collection)} or {@link #withBiasPosition(java.util.Collection)} if you want to
* override the existing values.
*
*
* @param 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.
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public SearchPlaceIndexForTextRequest withBiasPosition(Double... biasPosition) {
if (this.biasPosition == null) {
setBiasPosition(new java.util.ArrayList(biasPosition.length));
}
for (Double ele : biasPosition) {
this.biasPosition.add(ele);
}
return this;
}
/**
*
* 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.
*
*
*
* @param 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.
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public SearchPlaceIndexForTextRequest withBiasPosition(java.util.Collection biasPosition) {
setBiasPosition(biasPosition);
return this;
}
/**
*
* 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.
*
*
*
* @return 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.
*
*/
public java.util.List getFilterBBox() {
return 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.
*
*
*
* @param 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.
*
*/
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 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.
*
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setFilterBBox(java.util.Collection)} or {@link #withFilterBBox(java.util.Collection)} if you want to
* override the existing values.
*
*
* @param 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.
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public SearchPlaceIndexForTextRequest withFilterBBox(Double... filterBBox) {
if (this.filterBBox == null) {
setFilterBBox(new java.util.ArrayList(filterBBox.length));
}
for (Double ele : filterBBox) {
this.filterBBox.add(ele);
}
return this;
}
/**
*
* 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.
*
*
*
* @param 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.
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public SearchPlaceIndexForTextRequest withFilterBBox(java.util.Collection filterBBox) {
setFilterBBox(filterBBox);
return this;
}
/**
*
* 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
.
*
*
*
*
* @return 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
.
*
*
*/
public java.util.List getFilterCountries() {
return 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
.
*
*
*
*
* @param 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
.
*
*
*/
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 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
.
*
*
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setFilterCountries(java.util.Collection)} or {@link #withFilterCountries(java.util.Collection)} if you
* want to override the existing values.
*
*
* @param 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
.
*
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public SearchPlaceIndexForTextRequest withFilterCountries(String... filterCountries) {
if (this.filterCountries == null) {
setFilterCountries(new java.util.ArrayList(filterCountries.length));
}
for (String ele : filterCountries) {
this.filterCountries.add(ele);
}
return this;
}
/**
*
* 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
.
*
*
*
*
* @param 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
.
*
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public SearchPlaceIndexForTextRequest withFilterCountries(java.util.Collection filterCountries) {
setFilterCountries(filterCountries);
return this;
}
/**
*
* An optional parameter. The maximum number of results returned per request.
*
*
* The default: 50
*
*
* @param maxResults
* An optional parameter. The maximum number of results returned per request.
*
* The default: 50
*/
public void setMaxResults(Integer maxResults) {
this.maxResults = maxResults;
}
/**
*
* An optional parameter. The maximum number of results returned per request.
*
*
* The default: 50
*
*
* @return An optional parameter. The maximum number of results returned per request.
*
* The default: 50
*/
public Integer getMaxResults() {
return this.maxResults;
}
/**
*
* An optional parameter. The maximum number of results returned per request.
*
*
* The default: 50
*
*
* @param maxResults
* An optional parameter. The maximum number of results returned per request.
*
* The default: 50
* @return Returns a reference to this object so that method calls can be chained together.
*/
public SearchPlaceIndexForTextRequest withMaxResults(Integer maxResults) {
setMaxResults(maxResults);
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, 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.
*
*
* @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, 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.
*/
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, 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.
*
*
* @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, 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.
*/
public String getLanguage() {
return this.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.
*
*
* @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, 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.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public SearchPlaceIndexForTextRequest withLanguage(String language) {
setLanguage(language);
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.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setFilterCategories(java.util.Collection)} or {@link #withFilterCategories(java.util.Collection)} if you
* want to override the existing values.
*
*
* @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 Returns a reference to this object so that method calls can be chained together.
*/
public SearchPlaceIndexForTextRequest withFilterCategories(String... filterCategories) {
if (this.filterCategories == null) {
setFilterCategories(new java.util.ArrayList(filterCategories.length));
}
for (String ele : filterCategories) {
this.filterCategories.add(ele);
}
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.
*
*
* @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 Returns a reference to this object so that method calls can be chained together.
*/
public SearchPlaceIndexForTextRequest withFilterCategories(java.util.Collection filterCategories) {
setFilterCategories(filterCategories);
return this;
}
/**
*
* The optional API key
* to authorize the request.
*
*
* @param key
* The optional API
* key to authorize the request.
*/
public void setKey(String key) {
this.key = key;
}
/**
*
* The optional API key
* to authorize the request.
*
*
* @return The optional API
* key to authorize the request.
*/
public String getKey() {
return this.key;
}
/**
*
* The optional API key
* to authorize the request.
*
*
* @param key
* The optional API
* key to authorize the request.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public SearchPlaceIndexForTextRequest withKey(String key) {
setKey(key);
return this;
}
/**
* Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be
* redacted from this string using a placeholder value.
*
* @return A string representation of this object.
*
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("{");
if (getIndexName() != null)
sb.append("IndexName: ").append(getIndexName()).append(",");
if (getText() != null)
sb.append("Text: ").append("***Sensitive Data Redacted***").append(",");
if (getBiasPosition() != null)
sb.append("BiasPosition: ").append("***Sensitive Data Redacted***").append(",");
if (getFilterBBox() != null)
sb.append("FilterBBox: ").append("***Sensitive Data Redacted***").append(",");
if (getFilterCountries() != null)
sb.append("FilterCountries: ").append(getFilterCountries()).append(",");
if (getMaxResults() != null)
sb.append("MaxResults: ").append(getMaxResults()).append(",");
if (getLanguage() != null)
sb.append("Language: ").append(getLanguage()).append(",");
if (getFilterCategories() != null)
sb.append("FilterCategories: ").append(getFilterCategories()).append(",");
if (getKey() != null)
sb.append("Key: ").append("***Sensitive Data Redacted***");
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof SearchPlaceIndexForTextRequest == false)
return false;
SearchPlaceIndexForTextRequest other = (SearchPlaceIndexForTextRequest) obj;
if (other.getIndexName() == null ^ this.getIndexName() == null)
return false;
if (other.getIndexName() != null && other.getIndexName().equals(this.getIndexName()) == false)
return false;
if (other.getText() == null ^ this.getText() == null)
return false;
if (other.getText() != null && other.getText().equals(this.getText()) == false)
return false;
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.getFilterCountries() == null ^ this.getFilterCountries() == null)
return false;
if (other.getFilterCountries() != null && other.getFilterCountries().equals(this.getFilterCountries()) == 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.getLanguage() == null ^ this.getLanguage() == null)
return false;
if (other.getLanguage() != null && other.getLanguage().equals(this.getLanguage()) == 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.getKey() == null ^ this.getKey() == null)
return false;
if (other.getKey() != null && other.getKey().equals(this.getKey()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getIndexName() == null) ? 0 : getIndexName().hashCode());
hashCode = prime * hashCode + ((getText() == null) ? 0 : getText().hashCode());
hashCode = prime * hashCode + ((getBiasPosition() == null) ? 0 : getBiasPosition().hashCode());
hashCode = prime * hashCode + ((getFilterBBox() == null) ? 0 : getFilterBBox().hashCode());
hashCode = prime * hashCode + ((getFilterCountries() == null) ? 0 : getFilterCountries().hashCode());
hashCode = prime * hashCode + ((getMaxResults() == null) ? 0 : getMaxResults().hashCode());
hashCode = prime * hashCode + ((getLanguage() == null) ? 0 : getLanguage().hashCode());
hashCode = prime * hashCode + ((getFilterCategories() == null) ? 0 : getFilterCategories().hashCode());
hashCode = prime * hashCode + ((getKey() == null) ? 0 : getKey().hashCode());
return hashCode;
}
@Override
public SearchPlaceIndexForTextRequest clone() {
return (SearchPlaceIndexForTextRequest) super.clone();
}
}