All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.location.model.SearchForSuggestionsResult Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Amazon Location module holds the client classes that are used for communicating with Amazon Location Service

There is a newer version: 1.12.780
Show newest version
/*
 * 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.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;

/**
 * 

* Contains a place suggestion resulting from a place suggestion query that is run on a place index resource. *

* * @see AWS API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class SearchForSuggestionsResult implements Serializable, Cloneable, StructuredPojo { /** *

* The text of the place suggestion, typically formatted as an address string. *

*/ private String text; /** *

* The unique identifier of the Place. You can use this with the GetPlace operation to find the place * again later, or to get full information for the Place. *

*

* The GetPlace request must use the same PlaceIndex resource as the * SearchPlaceIndexForSuggestions that generated the Place ID. *

* *

* For SearchPlaceIndexForSuggestions operations, the PlaceId is returned by place indexes * that use Esri, Grab, or HERE as data providers. *

*
*/ private String placeId; /** *

* The Amazon Location categories that describe the Place. *

*

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

* Categories from the data provider that describe the Place that are not mapped to any Amazon Location categories. *

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

* The text of the place suggestion, typically formatted as an address string. *

* * @param text * The text of the place suggestion, typically formatted as an address string. */ public void setText(String text) { this.text = text; } /** *

* The text of the place suggestion, typically formatted as an address string. *

* * @return The text of the place suggestion, typically formatted as an address string. */ public String getText() { return this.text; } /** *

* The text of the place suggestion, typically formatted as an address string. *

* * @param text * The text of the place suggestion, typically formatted as an address string. * @return Returns a reference to this object so that method calls can be chained together. */ public SearchForSuggestionsResult withText(String text) { setText(text); return this; } /** *

* The unique identifier of the Place. You can use this with the GetPlace operation to find the place * again later, or to get full information for the Place. *

*

* The GetPlace request must use the same PlaceIndex resource as the * SearchPlaceIndexForSuggestions that generated the Place ID. *

* *

* For SearchPlaceIndexForSuggestions operations, the PlaceId is returned by place indexes * that use Esri, Grab, or HERE as data providers. *

*
* * @param placeId * The unique identifier of the Place. You can use this with the GetPlace operation to find the * place again later, or to get full information for the Place.

*

* The GetPlace request must use the same PlaceIndex resource as the * SearchPlaceIndexForSuggestions that generated the Place ID. *

* *

* For SearchPlaceIndexForSuggestions operations, the PlaceId is returned by place * indexes that use Esri, Grab, or HERE as data providers. *

*/ public void setPlaceId(String placeId) { this.placeId = placeId; } /** *

* The unique identifier of the Place. You can use this with the GetPlace operation to find the place * again later, or to get full information for the Place. *

*

* The GetPlace request must use the same PlaceIndex resource as the * SearchPlaceIndexForSuggestions that generated the Place ID. *

* *

* For SearchPlaceIndexForSuggestions operations, the PlaceId is returned by place indexes * that use Esri, Grab, or HERE as data providers. *

*
* * @return The unique identifier of the Place. You can use this with the GetPlace operation to find the * place again later, or to get full information for the Place.

*

* The GetPlace request must use the same PlaceIndex resource as the * SearchPlaceIndexForSuggestions that generated the Place ID. *

* *

* For SearchPlaceIndexForSuggestions operations, the PlaceId is returned by place * indexes that use Esri, Grab, or HERE as data providers. *

*/ public String getPlaceId() { return this.placeId; } /** *

* The unique identifier of the Place. You can use this with the GetPlace operation to find the place * again later, or to get full information for the Place. *

*

* The GetPlace request must use the same PlaceIndex resource as the * SearchPlaceIndexForSuggestions that generated the Place ID. *

* *

* For SearchPlaceIndexForSuggestions operations, the PlaceId is returned by place indexes * that use Esri, Grab, or HERE as data providers. *

*
* * @param placeId * The unique identifier of the Place. You can use this with the GetPlace operation to find the * place again later, or to get full information for the Place.

*

* The GetPlace request must use the same PlaceIndex resource as the * SearchPlaceIndexForSuggestions that generated the Place ID. *

* *

* For SearchPlaceIndexForSuggestions operations, the PlaceId is returned by place * indexes that use Esri, Grab, or HERE as data providers. *

* @return Returns a reference to this object so that method calls can be chained together. */ public SearchForSuggestionsResult withPlaceId(String placeId) { setPlaceId(placeId); return this; } /** *

* The Amazon Location categories that describe the Place. *

*

* 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 The Amazon Location categories that describe the Place.

*

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

* The Amazon Location categories that describe the Place. *

*

* 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 categories * The Amazon Location categories that describe the Place.

*

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

* The Amazon Location categories that describe the Place. *

*

* 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 #setCategories(java.util.Collection)} or {@link #withCategories(java.util.Collection)} if you want to * override the existing values. *

* * @param categories * The Amazon Location categories that describe the Place.

*

* 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 SearchForSuggestionsResult withCategories(String... categories) { if (this.categories == null) { setCategories(new java.util.ArrayList(categories.length)); } for (String ele : categories) { this.categories.add(ele); } return this; } /** *

* The Amazon Location categories that describe the Place. *

*

* 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 categories * The Amazon Location categories that describe the Place.

*

* 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 SearchForSuggestionsResult withCategories(java.util.Collection categories) { setCategories(categories); return this; } /** *

* Categories from the data provider that describe the Place that are not mapped to any Amazon Location categories. *

* * @return Categories from the data provider that describe the Place that are not mapped to any Amazon Location * categories. */ public java.util.List getSupplementalCategories() { return supplementalCategories; } /** *

* Categories from the data provider that describe the Place that are not mapped to any Amazon Location categories. *

* * @param supplementalCategories * Categories from the data provider that describe the Place that are not mapped to any Amazon Location * categories. */ public void setSupplementalCategories(java.util.Collection supplementalCategories) { if (supplementalCategories == null) { this.supplementalCategories = null; return; } this.supplementalCategories = new java.util.ArrayList(supplementalCategories); } /** *

* Categories from the data provider that describe the Place that are not mapped to any Amazon Location categories. *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setSupplementalCategories(java.util.Collection)} or * {@link #withSupplementalCategories(java.util.Collection)} if you want to override the existing values. *

* * @param supplementalCategories * Categories from the data provider that describe the Place that are not mapped to any Amazon Location * categories. * @return Returns a reference to this object so that method calls can be chained together. */ public SearchForSuggestionsResult withSupplementalCategories(String... supplementalCategories) { if (this.supplementalCategories == null) { setSupplementalCategories(new java.util.ArrayList(supplementalCategories.length)); } for (String ele : supplementalCategories) { this.supplementalCategories.add(ele); } return this; } /** *

* Categories from the data provider that describe the Place that are not mapped to any Amazon Location categories. *

* * @param supplementalCategories * Categories from the data provider that describe the Place that are not mapped to any Amazon Location * categories. * @return Returns a reference to this object so that method calls can be chained together. */ public SearchForSuggestionsResult withSupplementalCategories(java.util.Collection supplementalCategories) { setSupplementalCategories(supplementalCategories); 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 (getText() != null) sb.append("Text: ").append(getText()).append(","); if (getPlaceId() != null) sb.append("PlaceId: ").append(getPlaceId()).append(","); if (getCategories() != null) sb.append("Categories: ").append(getCategories()).append(","); if (getSupplementalCategories() != null) sb.append("SupplementalCategories: ").append(getSupplementalCategories()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof SearchForSuggestionsResult == false) return false; SearchForSuggestionsResult other = (SearchForSuggestionsResult) obj; if (other.getText() == null ^ this.getText() == null) return false; if (other.getText() != null && other.getText().equals(this.getText()) == false) return false; if (other.getPlaceId() == null ^ this.getPlaceId() == null) return false; if (other.getPlaceId() != null && other.getPlaceId().equals(this.getPlaceId()) == false) return false; if (other.getCategories() == null ^ this.getCategories() == null) return false; if (other.getCategories() != null && other.getCategories().equals(this.getCategories()) == false) return false; if (other.getSupplementalCategories() == null ^ this.getSupplementalCategories() == null) return false; if (other.getSupplementalCategories() != null && other.getSupplementalCategories().equals(this.getSupplementalCategories()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getText() == null) ? 0 : getText().hashCode()); hashCode = prime * hashCode + ((getPlaceId() == null) ? 0 : getPlaceId().hashCode()); hashCode = prime * hashCode + ((getCategories() == null) ? 0 : getCategories().hashCode()); hashCode = prime * hashCode + ((getSupplementalCategories() == null) ? 0 : getSupplementalCategories().hashCode()); return hashCode; } @Override public SearchForSuggestionsResult clone() { try { return (SearchForSuggestionsResult) 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.SearchForSuggestionsResultMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy