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

*/ public class SearchPlaceIndexForTextSummary implements Serializable { /** *

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

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

* The geospatial data provider attached to the place index resource * specified in the request. Values can be one of the following: *

* *

* 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 filterBBox; /** *

* The optional category filter specified in the request. *

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

* Contains the optional country filter specified in the request. *

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

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

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

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

* * @return

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

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

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

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

*

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

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

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

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

* 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 getFilterBBox() { return filterBBox; } /** *

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

* 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(filterBBox.length); } for (Double value : filterBBox) { this.filterBBox.add(value); } return this; } /** *

* 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 filterBBox) { setFilterBBox(filterBBox); return this; } /** *

* The optional category filter specified in the request. *

* * @return

* The optional category filter specified in the request. *

*/ public java.util.List getFilterCategories() { return filterCategories; } /** *

* The optional category filter specified in the request. *

* * @param filterCategories

* The optional category filter specified in the request. *

*/ public void setFilterCategories(java.util.Collection filterCategories) { if (filterCategories == null) { this.filterCategories = null; return; } this.filterCategories = new java.util.ArrayList(filterCategories); } /** *

* 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(filterCategories.length); } for (String value : filterCategories) { this.filterCategories.add(value); } return this; } /** *

* 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 filterCategories) { setFilterCategories(filterCategories); return this; } /** *

* Contains the optional country filter specified in the request. *

* * @return

* Contains the optional country filter specified in the request. *

*/ public java.util.List getFilterCountries() { return filterCountries; } /** *

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

* 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(filterCountries.length); } for (String value : filterCountries) { this.filterCountries.add(value); } return this; } /** *

* 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 filterCountries) { setFilterCountries(filterCountries); return this; } /** *

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

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

*

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

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

*

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

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

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

*
* * @return

* The bounding box that fully contains all search results. *

* *

* If you specified the optional FilterBBox parameter * in the request, ResultBBox is contained within * FilterBBox. *

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

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

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

*
*

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

*
* @return A reference to this updated object so that method calls can be * chained together. */ public SearchPlaceIndexForTextSummary withResultBBox(Double... resultBBox) { if (getResultBBox() == null) { this.resultBBox = new java.util.ArrayList(resultBBox.length); } for (Double value : resultBBox) { this.resultBBox.add(value); } 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. *

*
*

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

*
* @return A reference to this updated object so that method calls can be * chained together. */ public SearchPlaceIndexForTextSummary withResultBBox(java.util.Collection resultBBox) { setResultBBox(resultBBox); return this; } /** *

* 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; } }