public class SuggestModel
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable
Container for the suggestion information returned in a
SuggestResponse
.
Modifier and Type | Field and Description |
---|---|
private java.lang.Long |
found
The number of documents that were found to match the query string.
|
private java.lang.String |
query
The query string specified in the suggest request.
|
private SdkInternalList<SuggestionMatch> |
suggestions
The documents that match the query string.
|
Constructor and Description |
---|
SuggestModel() |
Modifier and Type | Method and Description |
---|---|
SuggestModel |
clone() |
boolean |
equals(java.lang.Object obj) |
java.lang.Long |
getFound()
The number of documents that were found to match the query string.
|
java.lang.String |
getQuery()
The query string specified in the suggest request.
|
java.util.List<SuggestionMatch> |
getSuggestions()
The documents that match the query string.
|
int |
hashCode() |
void |
setFound(java.lang.Long found)
The number of documents that were found to match the query string.
|
void |
setQuery(java.lang.String query)
The query string specified in the suggest request.
|
void |
setSuggestions(java.util.Collection<SuggestionMatch> suggestions)
The documents that match the query string.
|
java.lang.String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
SuggestModel |
withFound(java.lang.Long found)
The number of documents that were found to match the query string.
|
SuggestModel |
withQuery(java.lang.String query)
The query string specified in the suggest request.
|
SuggestModel |
withSuggestions(java.util.Collection<SuggestionMatch> suggestions)
The documents that match the query string.
|
SuggestModel |
withSuggestions(SuggestionMatch... suggestions)
The documents that match the query string.
|
private java.lang.String query
The query string specified in the suggest request.
private java.lang.Long found
The number of documents that were found to match the query string.
private SdkInternalList<SuggestionMatch> suggestions
The documents that match the query string.
public void setQuery(java.lang.String query)
The query string specified in the suggest request.
query
- The query string specified in the suggest request.public java.lang.String getQuery()
The query string specified in the suggest request.
public SuggestModel withQuery(java.lang.String query)
The query string specified in the suggest request.
query
- The query string specified in the suggest request.public void setFound(java.lang.Long found)
The number of documents that were found to match the query string.
found
- The number of documents that were found to match the query string.public java.lang.Long getFound()
The number of documents that were found to match the query string.
public SuggestModel withFound(java.lang.Long found)
The number of documents that were found to match the query string.
found
- The number of documents that were found to match the query string.public java.util.List<SuggestionMatch> getSuggestions()
The documents that match the query string.
public void setSuggestions(java.util.Collection<SuggestionMatch> suggestions)
The documents that match the query string.
suggestions
- The documents that match the query string.public SuggestModel withSuggestions(SuggestionMatch... suggestions)
The documents that match the query string.
NOTE: This method appends the values to the existing list (if
any). Use setSuggestions(java.util.Collection)
or
withSuggestions(java.util.Collection)
if you want to override
the existing values.
suggestions
- The documents that match the query string.public SuggestModel withSuggestions(java.util.Collection<SuggestionMatch> suggestions)
The documents that match the query string.
suggestions
- The documents that match the query string.public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public SuggestModel clone()
clone
in class java.lang.Object