/* * Copyright 2018-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.location.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* A summary of the request sent by using SearchPlaceIndexForSuggestions
.
*
* 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.
*
* Contains the optional result count limit specified in the request. *
*/ private Integer maxResults; /** ** The free-form partial text input 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
.
*
* 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,
* 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[-123.1174, 49.2847]
represents the position with longitude -123.1174
and
* latitude 49.2847
.
*
* 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,
* 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,
* 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.
* [-123.1174, 49.2847]
represents the position with longitude
* -123.1174
and latitude 49.2847
.
*/
public void setBiasPosition(java.util.Collection[-123.1174, 49.2847]
represents the position with longitude -123.1174
and
* latitude 49.2847
.
*
* 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,
* 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 Returns a reference to this object so that method calls can be chained together.
*/
public SearchPlaceIndexForSuggestionsSummary withBiasPosition(Double... biasPosition) {
if (this.biasPosition == null) {
setBiasPosition(new java.util.ArrayList[-123.1174, 49.2847]
represents the position with longitude -123.1174
and
* latitude 49.2847
.
*
* 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,
* 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.
* [-123.1174, 49.2847]
represents the position with longitude
* -123.1174
and latitude 49.2847
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public SearchPlaceIndexForSuggestionsSummary withBiasPosition(java.util.Collection
*
*
* 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. *
* * @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 this.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. * @return Returns a reference to this object so that method calls can be chained together. */ public SearchPlaceIndexForSuggestionsSummary withDataSource(String dataSource) { setDataSource(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. *
** 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 * Contains the coordinates for the optional bounding box specified in the request. * @return Returns a reference to this object so that method calls can be chained together. */ public SearchPlaceIndexForSuggestionsSummary withFilterBBox(Double... filterBBox) { if (this.filterBBox == null) { setFilterBBox(new java.util.ArrayList* 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. * @return Returns a reference to this object so that method calls can be chained together. */ public SearchPlaceIndexForSuggestionsSummary 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. *
** 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 * The optional category filter specified in the request. * @return Returns a reference to this object so that method calls can be chained together. */ public SearchPlaceIndexForSuggestionsSummary withFilterCategories(String... filterCategories) { if (this.filterCategories == null) { setFilterCategories(new java.util.ArrayList* The optional category filter specified in the request. *
* * @param filterCategories * The optional category filter specified in the request. * @return Returns a reference to this object so that method calls can be chained together. */ public SearchPlaceIndexForSuggestionsSummary 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. *
** 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 * Contains the optional country filter specified in the request. * @return Returns a reference to this object so that method calls can be chained together. */ public SearchPlaceIndexForSuggestionsSummary withFilterCountries(String... filterCountries) { if (this.filterCountries == null) { setFilterCountries(new java.util.ArrayList* Contains the optional country filter specified in the request. *
* * @param filterCountries * Contains the optional country filter specified in the request. * @return Returns a reference to this object so that method calls can be chained together. */ public SearchPlaceIndexForSuggestionsSummary 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.
*
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.
*
en
for
* English.
*/
public String getLanguage() {
return this.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.
*
en
for
* English.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public SearchPlaceIndexForSuggestionsSummary withLanguage(String language) {
setLanguage(language);
return this;
}
/**
* * Contains the optional result count limit specified in the request. *
* * @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. *
* * @return Contains the optional result count limit specified in the request. */ public Integer getMaxResults() { return this.maxResults; } /** ** Contains the optional result count limit specified in the request. *
* * @param maxResults * Contains the optional result count limit specified in the request. * @return Returns a reference to this object so that method calls can be chained together. */ public SearchPlaceIndexForSuggestionsSummary withMaxResults(Integer maxResults) { setMaxResults(maxResults); return this; } /** ** The free-form partial text input specified in the request. *
* * @param text * The free-form partial text input specified in the request. */ public void setText(String text) { this.text = text; } /** ** The free-form partial text input specified in the request. *
* * @return The free-form partial text input specified in the request. */ public String getText() { return this.text; } /** ** The free-form partial text input specified in the request. *
* * @param text * The free-form partial text input specified in the request. * @return Returns a reference to this object so that method calls can be chained together. */ public SearchPlaceIndexForSuggestionsSummary withText(String text) { setText(text); 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 (getBiasPosition() != null) sb.append("BiasPosition: ").append("***Sensitive Data Redacted***").append(","); if (getDataSource() != null) sb.append("DataSource: ").append(getDataSource()).append(","); if (getFilterBBox() != null) sb.append("FilterBBox: ").append("***Sensitive Data Redacted***").append(","); if (getFilterCategories() != null) sb.append("FilterCategories: ").append(getFilterCategories()).append(","); if (getFilterCountries() != null) sb.append("FilterCountries: ").append(getFilterCountries()).append(","); if (getLanguage() != null) sb.append("Language: ").append(getLanguage()).append(","); if (getMaxResults() != null) sb.append("MaxResults: ").append(getMaxResults()).append(","); if (getText() != null) sb.append("Text: ").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 SearchPlaceIndexForSuggestionsSummary == false) return false; SearchPlaceIndexForSuggestionsSummary other = (SearchPlaceIndexForSuggestionsSummary) 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.getText() == null ^ this.getText() == null) return false; if (other.getText() != null && other.getText().equals(this.getText()) == false) return false; return true; } @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 + ((getText() == null) ? 0 : getText().hashCode()); return hashCode; } @Override public SearchPlaceIndexForSuggestionsSummary clone() { try { return (SearchPlaceIndexForSuggestionsSummary) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } @com.amazonaws.annotation.SdkInternalApi @Override public void marshall(ProtocolMarshaller protocolMarshaller) { com.amazonaws.services.location.model.transform.SearchPlaceIndexForSuggestionsSummaryMarshaller.getInstance().marshall(this, protocolMarshaller); } }