/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include #include #include #include namespace Aws { template class AmazonWebServiceResult; namespace Utils { namespace Json { class JsonValue; } // namespace Json } // namespace Utils namespace kendra { namespace Model { class QueryResult { public: AWS_KENDRA_API QueryResult(); AWS_KENDRA_API QueryResult(const Aws::AmazonWebServiceResult& result); AWS_KENDRA_API QueryResult& operator=(const Aws::AmazonWebServiceResult& result); /** *

The identifier for the search. You also use QueryId to identify * the search when using the SubmitFeedback * API.

*/ inline const Aws::String& GetQueryId() const{ return m_queryId; } /** *

The identifier for the search. You also use QueryId to identify * the search when using the SubmitFeedback * API.

*/ inline void SetQueryId(const Aws::String& value) { m_queryId = value; } /** *

The identifier for the search. You also use QueryId to identify * the search when using the SubmitFeedback * API.

*/ inline void SetQueryId(Aws::String&& value) { m_queryId = std::move(value); } /** *

The identifier for the search. You also use QueryId to identify * the search when using the SubmitFeedback * API.

*/ inline void SetQueryId(const char* value) { m_queryId.assign(value); } /** *

The identifier for the search. You also use QueryId to identify * the search when using the SubmitFeedback * API.

*/ inline QueryResult& WithQueryId(const Aws::String& value) { SetQueryId(value); return *this;} /** *

The identifier for the search. You also use QueryId to identify * the search when using the SubmitFeedback * API.

*/ inline QueryResult& WithQueryId(Aws::String&& value) { SetQueryId(std::move(value)); return *this;} /** *

The identifier for the search. You also use QueryId to identify * the search when using the SubmitFeedback * API.

*/ inline QueryResult& WithQueryId(const char* value) { SetQueryId(value); return *this;} /** *

The results of the search.

*/ inline const Aws::Vector& GetResultItems() const{ return m_resultItems; } /** *

The results of the search.

*/ inline void SetResultItems(const Aws::Vector& value) { m_resultItems = value; } /** *

The results of the search.

*/ inline void SetResultItems(Aws::Vector&& value) { m_resultItems = std::move(value); } /** *

The results of the search.

*/ inline QueryResult& WithResultItems(const Aws::Vector& value) { SetResultItems(value); return *this;} /** *

The results of the search.

*/ inline QueryResult& WithResultItems(Aws::Vector&& value) { SetResultItems(std::move(value)); return *this;} /** *

The results of the search.

*/ inline QueryResult& AddResultItems(const QueryResultItem& value) { m_resultItems.push_back(value); return *this; } /** *

The results of the search.

*/ inline QueryResult& AddResultItems(QueryResultItem&& value) { m_resultItems.push_back(std::move(value)); return *this; } /** *

Contains the facet results. A FacetResult contains the counts * for each field/attribute key that was specified in the Facets input * parameter.

*/ inline const Aws::Vector& GetFacetResults() const{ return m_facetResults; } /** *

Contains the facet results. A FacetResult contains the counts * for each field/attribute key that was specified in the Facets input * parameter.

*/ inline void SetFacetResults(const Aws::Vector& value) { m_facetResults = value; } /** *

Contains the facet results. A FacetResult contains the counts * for each field/attribute key that was specified in the Facets input * parameter.

*/ inline void SetFacetResults(Aws::Vector&& value) { m_facetResults = std::move(value); } /** *

Contains the facet results. A FacetResult contains the counts * for each field/attribute key that was specified in the Facets input * parameter.

*/ inline QueryResult& WithFacetResults(const Aws::Vector& value) { SetFacetResults(value); return *this;} /** *

Contains the facet results. A FacetResult contains the counts * for each field/attribute key that was specified in the Facets input * parameter.

*/ inline QueryResult& WithFacetResults(Aws::Vector&& value) { SetFacetResults(std::move(value)); return *this;} /** *

Contains the facet results. A FacetResult contains the counts * for each field/attribute key that was specified in the Facets input * parameter.

*/ inline QueryResult& AddFacetResults(const FacetResult& value) { m_facetResults.push_back(value); return *this; } /** *

Contains the facet results. A FacetResult contains the counts * for each field/attribute key that was specified in the Facets input * parameter.

*/ inline QueryResult& AddFacetResults(FacetResult&& value) { m_facetResults.push_back(std::move(value)); return *this; } /** *

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.

*/ inline int GetTotalNumberOfResults() const{ return m_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.

*/ inline void SetTotalNumberOfResults(int value) { m_totalNumberOfResults = value; } /** *

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.

*/ inline QueryResult& WithTotalNumberOfResults(int value) { SetTotalNumberOfResults(value); return *this;} /** *

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.

*/ inline const Aws::Vector& GetWarnings() const{ return m_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.

*/ inline void SetWarnings(const Aws::Vector& value) { m_warnings = value; } /** *

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.

*/ inline void SetWarnings(Aws::Vector&& value) { m_warnings = std::move(value); } /** *

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.

*/ inline QueryResult& WithWarnings(const Aws::Vector& value) { SetWarnings(value); return *this;} /** *

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.

*/ inline QueryResult& WithWarnings(Aws::Vector&& value) { SetWarnings(std::move(value)); return *this;} /** *

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.

*/ inline QueryResult& AddWarnings(const Warning& value) { m_warnings.push_back(value); return *this; } /** *

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.

*/ inline QueryResult& AddWarnings(Warning&& value) { m_warnings.push_back(std::move(value)); return *this; } /** *

A list of information related to suggested spell corrections for a query.

*/ inline const Aws::Vector& GetSpellCorrectedQueries() const{ return m_spellCorrectedQueries; } /** *

A list of information related to suggested spell corrections for a query.

*/ inline void SetSpellCorrectedQueries(const Aws::Vector& value) { m_spellCorrectedQueries = value; } /** *

A list of information related to suggested spell corrections for a query.

*/ inline void SetSpellCorrectedQueries(Aws::Vector&& value) { m_spellCorrectedQueries = std::move(value); } /** *

A list of information related to suggested spell corrections for a query.

*/ inline QueryResult& WithSpellCorrectedQueries(const Aws::Vector& value) { SetSpellCorrectedQueries(value); return *this;} /** *

A list of information related to suggested spell corrections for a query.

*/ inline QueryResult& WithSpellCorrectedQueries(Aws::Vector&& value) { SetSpellCorrectedQueries(std::move(value)); return *this;} /** *

A list of information related to suggested spell corrections for a query.

*/ inline QueryResult& AddSpellCorrectedQueries(const SpellCorrectedQuery& value) { m_spellCorrectedQueries.push_back(value); return *this; } /** *

A list of information related to suggested spell corrections for a query.

*/ inline QueryResult& AddSpellCorrectedQueries(SpellCorrectedQuery&& value) { m_spellCorrectedQueries.push_back(std::move(value)); return *this; } /** *

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.

*/ inline const Aws::Vector& GetFeaturedResultsItems() const{ return m_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.

*/ inline void SetFeaturedResultsItems(const Aws::Vector& value) { m_featuredResultsItems = value; } /** *

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.

*/ inline void SetFeaturedResultsItems(Aws::Vector&& value) { m_featuredResultsItems = std::move(value); } /** *

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.

*/ inline QueryResult& WithFeaturedResultsItems(const Aws::Vector& value) { SetFeaturedResultsItems(value); return *this;} /** *

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.

*/ inline QueryResult& WithFeaturedResultsItems(Aws::Vector&& value) { SetFeaturedResultsItems(std::move(value)); return *this;} /** *

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.

*/ inline QueryResult& AddFeaturedResultsItems(const FeaturedResultsItem& value) { m_featuredResultsItems.push_back(value); return *this; } /** *

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.

*/ inline QueryResult& AddFeaturedResultsItems(FeaturedResultsItem&& value) { m_featuredResultsItems.push_back(std::move(value)); return *this; } inline const Aws::String& GetRequestId() const{ return m_requestId; } inline void SetRequestId(const Aws::String& value) { m_requestId = value; } inline void SetRequestId(Aws::String&& value) { m_requestId = std::move(value); } inline void SetRequestId(const char* value) { m_requestId.assign(value); } inline QueryResult& WithRequestId(const Aws::String& value) { SetRequestId(value); return *this;} inline QueryResult& WithRequestId(Aws::String&& value) { SetRequestId(std::move(value)); return *this;} inline QueryResult& WithRequestId(const char* value) { SetRequestId(value); return *this;} private: Aws::String m_queryId; Aws::Vector m_resultItems; Aws::Vector m_facetResults; int m_totalNumberOfResults; Aws::Vector m_warnings; Aws::Vector m_spellCorrectedQueries; Aws::Vector m_featuredResultsItems; Aws::String m_requestId; }; } // namespace Model } // namespace kendra } // namespace Aws