@Generated(value="software.amazon.awssdk:codegen") public final class QueryResponse extends KendraResponse implements ToCopyableBuilder<QueryResponse.Builder,QueryResponse>
| Modifier and Type | Class and Description |
|---|---|
static interface |
QueryResponse.Builder |
| Modifier and Type | Method and Description |
|---|---|
static QueryResponse.Builder |
builder() |
boolean |
equals(Object obj) |
boolean |
equalsBySdkFields(Object obj) |
List<FacetResult> |
facetResults()
Contains the facet results.
|
List<FeaturedResultsItem> |
featuredResultsItems()
The list of featured result items.
|
<T> Optional<T> |
getValueForField(String fieldName,
Class<T> clazz) |
boolean |
hasFacetResults()
For responses, this returns true if the service returned a value for the FacetResults property.
|
boolean |
hasFeaturedResultsItems()
For responses, this returns true if the service returned a value for the FeaturedResultsItems property.
|
int |
hashCode() |
boolean |
hasResultItems()
For responses, this returns true if the service returned a value for the ResultItems property.
|
boolean |
hasSpellCorrectedQueries()
For responses, this returns true if the service returned a value for the SpellCorrectedQueries property.
|
boolean |
hasWarnings()
For responses, this returns true if the service returned a value for the Warnings property.
|
String |
queryId()
The identifier for the search.
|
List<QueryResultItem> |
resultItems()
The results of the search.
|
List<SdkField<?>> |
sdkFields() |
static Class<? extends QueryResponse.Builder> |
serializableBuilderClass() |
List<SpellCorrectedQuery> |
spellCorrectedQueries()
A list of information related to suggested spell corrections for a query.
|
QueryResponse.Builder |
toBuilder() |
String |
toString()
Returns a string representation of this object.
|
Integer |
totalNumberOfResults()
The total number of items found by the search.
|
List<Warning> |
warnings()
A list of warning codes and their messages on problems with your query.
|
responseMetadatasdkHttpResponseclone, finalize, getClass, notify, notifyAll, wait, wait, waitcopypublic final String queryId()
The identifier for the search. You also use QueryId to identify the search when using the SubmitFeedback API.
QueryId to identify the search when using the SubmitFeedback
API.public final boolean hasResultItems()
isEmpty() method on the property).
This is useful because the SDK will never return a null collection or map, but you may need to differentiate
between the service returning nothing (or null) and the service returning an empty collection or map. For
requests, this returns true if a value for the property was specified in the request builder, and false if a
value was not specified.public final List<QueryResultItem> resultItems()
The results of the search.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that
you can differentiate between null and empty), you can use the hasResultItems() method.
public final boolean hasFacetResults()
isEmpty() method on the property).
This is useful because the SDK will never return a null collection or map, but you may need to differentiate
between the service returning nothing (or null) and the service returning an empty collection or map. For
requests, this returns true if a value for the property was specified in the request builder, and false if a
value was not specified.public final List<FacetResult> facetResults()
Contains the facet results. A FacetResult contains the counts for each field/attribute key that was
specified in the Facets input parameter.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that
you can differentiate between null and empty), you can use the hasFacetResults() method.
FacetResult contains the counts for each field/attribute key
that was specified in the Facets input parameter.public final Integer totalNumberOfResults()
The total number of items found by the search. However, you can only retrieve up to 100 items. For example, if the search found 192 items, you can only retrieve the first 100 of the items.
public final boolean hasWarnings()
isEmpty() method on the property). This is
useful because the SDK will never return a null collection or map, but you may need to differentiate between the
service returning nothing (or null) and the service returning an empty collection or map. For requests, this
returns true if a value for the property was specified in the request builder, and false if a value was not
specified.public final List<Warning> warnings()
A list of warning codes and their messages on problems with your query.
Amazon Kendra currently only supports one type of warning, which is a warning on invalid syntax used in the query. For examples of invalid query syntax, see Searching with advanced query syntax.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that
you can differentiate between null and empty), you can use the hasWarnings() method.
Amazon Kendra currently only supports one type of warning, which is a warning on invalid syntax used in the query. For examples of invalid query syntax, see Searching with advanced query syntax.
public final boolean hasSpellCorrectedQueries()
isEmpty() method on the
property). This is useful because the SDK will never return a null collection or map, but you may need to
differentiate between the service returning nothing (or null) and the service returning an empty collection or
map. For requests, this returns true if a value for the property was specified in the request builder, and false
if a value was not specified.public final List<SpellCorrectedQuery> spellCorrectedQueries()
A list of information related to suggested spell corrections for a query.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that
you can differentiate between null and empty), you can use the hasSpellCorrectedQueries() method.
public final boolean hasFeaturedResultsItems()
isEmpty() method on the property).
This is useful because the SDK will never return a null collection or map, but you may need to differentiate
between the service returning nothing (or null) and the service returning an empty collection or map. For
requests, this returns true if a value for the property was specified in the request builder, and false if a
value was not specified.public final List<FeaturedResultsItem> featuredResultsItems()
The list of featured result items. Featured results are displayed at the top of the search results page, placed above all other results for certain queries. If there's an exact match of a query, then certain documents are featured in the search results.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that
you can differentiate between null and empty), you can use the hasFeaturedResultsItems() method.
public QueryResponse.Builder toBuilder()
toBuilder in interface ToCopyableBuilder<QueryResponse.Builder,QueryResponse>toBuilder in class AwsResponsepublic static QueryResponse.Builder builder()
public static Class<? extends QueryResponse.Builder> serializableBuilderClass()
public final int hashCode()
hashCode in class AwsResponsepublic final boolean equals(Object obj)
equals in class AwsResponsepublic final boolean equalsBySdkFields(Object obj)
equalsBySdkFields in interface SdkPojopublic final String toString()
public final <T> Optional<T> getValueForField(String fieldName, Class<T> clazz)
getValueForField in class SdkResponseCopyright © 2023. All rights reserved.