/* * 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; /** *
* A summary of the request sent by using SearchPlaceIndexForText
.
*
* Contains the coordinates for the optional bias position specified in the * request. *
** This parameter contains 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
.
*
* The geospatial data provider attached to the place index resource * specified in the request. Values can be one of the following: *
** Esri *
** Grab *
** Here *
** For more information about data providers, see Amazon Location Service data providers. *
*/ private String dataSource; /** ** Contains the coordinates for the optional bounding box specified in the * request. *
*/ private java.util.List* The optional category filter specified in the request. *
*/ private java.util.List* Contains the optional country filter specified in the request. *
*/ private java.util.List
* The preferred language used to return results. Matches the language in
* the request. The value is a valid BCP 47 language tag, for
* example, en
for English.
*
* Constraints:
* Length: 2 - 35
*/
private String language;
/**
*
* Contains the optional result count limit specified in the request. *
*
* Constraints:
* Range: 1 - 50
*/
private Integer maxResults;
/**
*
* The bounding box that fully contains all search results. *
*
* If you specified the optional FilterBBox
parameter in the
* request, ResultBBox
is contained within
* FilterBBox
.
*
* The search text specified in the request. *
*/ private String text; /** ** Contains the coordinates for the optional bias position specified in the * request. *
** This parameter contains 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
.
*
* Contains the coordinates for the optional bias position specified * in the request. *
** This parameter contains 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
.
*
* Contains the coordinates for the optional bias position specified in the * request. *
** This parameter contains 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
.
*
* Contains the coordinates for the optional bias position * specified in the request. *
** This parameter contains 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
.
*
* Contains the coordinates for the optional bias position specified in the * request. *
** This parameter contains 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
.
*
* Returns a reference to this object so that method calls can be chained * together. * * @param biasPosition
* Contains the coordinates for the optional bias position * specified in the request. *
** This parameter contains 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
.
*
* Contains the coordinates for the optional bias position specified in the * request. *
** This parameter contains 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
.
*
* Returns a reference to this object so that method calls can be chained * together. * * @param biasPosition
* Contains the coordinates for the optional bias position * specified in the request. *
** This parameter contains 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
.
*
* The geospatial data provider attached to the place index resource * specified in the request. Values can be one of the following: *
** Esri *
** Grab *
** Here *
** For more information about data providers, see Amazon Location Service data providers. *
* * @return* The geospatial data provider attached to the place index resource * specified in the request. Values can be one of the following: *
** Esri *
** Grab *
** Here *
** For more information about data providers, see Amazon Location Service data providers. *
*/ public String getDataSource() { return dataSource; } /** ** The geospatial data provider attached to the place index resource * specified in the request. Values can be one of the following: *
** Esri *
** Grab *
** Here *
** For more information about data providers, see Amazon Location Service data providers. *
* * @param dataSource* The geospatial data provider attached to the place index * resource specified in the request. Values can be one of the * following: *
** Esri *
** Grab *
** Here *
** For more information about data providers, see Amazon Location Service data providers. *
*/ public void setDataSource(String dataSource) { this.dataSource = dataSource; } /** ** The geospatial data provider attached to the place index resource * specified in the request. Values can be one of the following: *
** Esri *
** Grab *
** Here *
** For more information about data providers, see Amazon Location Service data providers. *
** Returns a reference to this object so that method calls can be chained * together. * * @param dataSource
* The geospatial data provider attached to the place index * resource specified in the request. Values can be one of the * following: *
** Esri *
** Grab *
** Here *
** For more information about data providers, see Amazon Location Service data providers. *
* @return A reference to this updated object so that method calls can be * chained together. */ public SearchPlaceIndexForTextSummary withDataSource(String dataSource) { this.dataSource = dataSource; return this; } /** ** Contains the coordinates for the optional bounding box specified in the * request. *
* * @return* Contains the coordinates for the optional bounding box specified * in the request. *
*/ public java.util.List* Contains the coordinates for the optional bounding box specified in the * request. *
* * @param filterBBox* Contains the coordinates for the optional bounding box * specified in the request. *
*/ public void setFilterBBox(java.util.Collection* Contains the coordinates for the optional bounding box specified in the * request. *
** Returns a reference to this object so that method calls can be chained * together. * * @param filterBBox
* Contains the coordinates for the optional bounding box * specified in the request. *
* @return A reference to this updated object so that method calls can be * chained together. */ public SearchPlaceIndexForTextSummary withFilterBBox(Double... filterBBox) { if (getFilterBBox() == null) { this.filterBBox = new java.util.ArrayList* Contains the coordinates for the optional bounding box specified in the * request. *
** Returns a reference to this object so that method calls can be chained * together. * * @param filterBBox
* Contains the coordinates for the optional bounding box * specified in the request. *
* @return A reference to this updated object so that method calls can be * chained together. */ public SearchPlaceIndexForTextSummary withFilterBBox(java.util.Collection* The optional category filter specified in the request. *
* * @return* The optional category filter specified in the request. *
*/ public java.util.List* The optional category filter specified in the request. *
* * @param filterCategories* The optional category filter specified in the request. *
*/ public void setFilterCategories(java.util.Collection* The optional category filter specified in the request. *
** Returns a reference to this object so that method calls can be chained * together. * * @param filterCategories
* The optional category filter specified in the request. *
* @return A reference to this updated object so that method calls can be * chained together. */ public SearchPlaceIndexForTextSummary withFilterCategories(String... filterCategories) { if (getFilterCategories() == null) { this.filterCategories = new java.util.ArrayList* The optional category filter specified in the request. *
** Returns a reference to this object so that method calls can be chained * together. * * @param filterCategories
* The optional category filter specified in the request. *
* @return A reference to this updated object so that method calls can be * chained together. */ public SearchPlaceIndexForTextSummary withFilterCategories( java.util.Collection* Contains the optional country filter specified in the request. *
* * @return* Contains the optional country filter specified in the request. *
*/ public java.util.List* Contains the optional country filter specified in the request. *
* * @param filterCountries* Contains the optional country filter specified in the request. *
*/ public void setFilterCountries(java.util.Collection* Contains the optional country filter specified in the request. *
** Returns a reference to this object so that method calls can be chained * together. * * @param filterCountries
* Contains the optional country filter specified in the request. *
* @return A reference to this updated object so that method calls can be * chained together. */ public SearchPlaceIndexForTextSummary withFilterCountries(String... filterCountries) { if (getFilterCountries() == null) { this.filterCountries = new java.util.ArrayList* Contains the optional country filter specified in the request. *
** Returns a reference to this object so that method calls can be chained * together. * * @param filterCountries
* Contains the optional country filter specified in the request. *
* @return A reference to this updated object so that method calls can be * chained together. */ public SearchPlaceIndexForTextSummary withFilterCountries( java.util.Collection
* The preferred language used to return results. Matches the language in
* the request. The value is a valid BCP 47 language tag, for
* example, en
for English.
*
* Constraints:
* Length: 2 - 35
*
* @return
* The preferred language used to return results. Matches the
* language in the request. The value is a valid BCP 47 language
* tag, for example, en
for English.
*
* The preferred language used to return results. Matches the language in
* the request. The value is a valid BCP 47 language tag, for
* example, en
for English.
*
* Constraints:
* Length: 2 - 35
*
* @param language
* The preferred language used to return results. Matches the
* language in the request. The value is a valid BCP 47 language
* tag, for example, en
for English.
*
* The preferred language used to return results. Matches the language in
* the request. The value is a valid BCP 47 language tag, for
* example, en
for English.
*
* 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. Matches the
* language in the request. The value is a valid BCP 47 language
* tag, for example, en
for English.
*
* Contains the optional result count limit specified in the request. *
*
* Constraints:
* Range: 1 - 50
*
* @return
* Contains the optional result count limit specified in the * request. *
*/ public Integer getMaxResults() { return maxResults; } /** ** Contains the optional result count limit specified in the request. *
*
* Constraints:
* Range: 1 - 50
*
* @param maxResults
* Contains the optional result count limit specified in the * request. *
*/ public void setMaxResults(Integer maxResults) { this.maxResults = maxResults; } /** ** Contains the optional result count limit specified in the request. *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Range: 1 - 50
*
* @param maxResults
* Contains the optional result count limit specified in the * request. *
* @return A reference to this updated object so that method calls can be * chained together. */ public SearchPlaceIndexForTextSummary withMaxResults(Integer maxResults) { this.maxResults = maxResults; return this; } /** ** The bounding box that fully contains all search results. *
*
* If you specified the optional FilterBBox
parameter in the
* request, ResultBBox
is contained within
* FilterBBox
.
*
* The bounding box that fully contains all search results. *
*
* If you specified the optional FilterBBox
parameter
* in the request, ResultBBox
is contained within
* FilterBBox
.
*
* The bounding box that fully contains all search results. *
*
* If you specified the optional FilterBBox
parameter in the
* request, ResultBBox
is contained within
* FilterBBox
.
*
* The bounding box that fully contains all search results. *
*
* If you specified the optional FilterBBox
* parameter in the request, ResultBBox
is contained
* within FilterBBox
.
*
* The bounding box that fully contains all search results. *
*
* If you specified the optional FilterBBox
parameter in the
* request, ResultBBox
is contained within
* FilterBBox
.
*
* Returns a reference to this object so that method calls can be chained * together. * * @param resultBBox
* The bounding box that fully contains all search results. *
*
* If you specified the optional FilterBBox
* parameter in the request, ResultBBox
is contained
* within FilterBBox
.
*
* The bounding box that fully contains all search results. *
*
* If you specified the optional FilterBBox
parameter in the
* request, ResultBBox
is contained within
* FilterBBox
.
*
* Returns a reference to this object so that method calls can be chained * together. * * @param resultBBox
* The bounding box that fully contains all search results. *
*
* If you specified the optional FilterBBox
* parameter in the request, ResultBBox
is contained
* within FilterBBox
.
*
* The search text specified in the request. *
* * @return* The search text specified in the request. *
*/ public String getText() { return text; } /** ** The search text specified in the request. *
* * @param text* The search text specified in the request. *
*/ public void setText(String text) { this.text = text; } /** ** The search text specified in the request. *
** Returns a reference to this object so that method calls can be chained * together. * * @param text
* The search text specified in the request. *
* @return A reference to this updated object so that method calls can be * chained together. */ public SearchPlaceIndexForTextSummary 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 (getDataSource() != null) sb.append("DataSource: " + getDataSource() + ","); if (getFilterBBox() != null) sb.append("FilterBBox: " + getFilterBBox() + ","); if (getFilterCategories() != null) sb.append("FilterCategories: " + getFilterCategories() + ","); if (getFilterCountries() != null) sb.append("FilterCountries: " + getFilterCountries() + ","); if (getLanguage() != null) sb.append("Language: " + getLanguage() + ","); if (getMaxResults() != null) sb.append("MaxResults: " + getMaxResults() + ","); if (getResultBBox() != null) sb.append("ResultBBox: " + getResultBBox() + ","); 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 + ((getDataSource() == null) ? 0 : getDataSource().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 + ((getLanguage() == null) ? 0 : getLanguage().hashCode()); hashCode = prime * hashCode + ((getMaxResults() == null) ? 0 : getMaxResults().hashCode()); hashCode = prime * hashCode + ((getResultBBox() == null) ? 0 : getResultBBox().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 SearchPlaceIndexForTextSummary == false) return false; SearchPlaceIndexForTextSummary other = (SearchPlaceIndexForTextSummary) obj; if (other.getBiasPosition() == null ^ this.getBiasPosition() == null) return false; if (other.getBiasPosition() != null && other.getBiasPosition().equals(this.getBiasPosition()) == false) return false; if (other.getDataSource() == null ^ this.getDataSource() == null) return false; if (other.getDataSource() != null && other.getDataSource().equals(this.getDataSource()) == 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.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.getResultBBox() == null ^ this.getResultBBox() == null) return false; if (other.getResultBBox() != null && other.getResultBBox().equals(this.getResultBBox()) == 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; } }