/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #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 AWS_KENDRA_API QueryResult { public: QueryResult(); QueryResult(const Aws::AmazonWebServiceResult& result); QueryResult& operator=(const Aws::AmazonWebServiceResult& result); /** *

The unique identifier for the search. You use QueryId to * identify the search when using the feedback API.

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

The unique identifier for the search. You use QueryId to * identify the search when using the feedback API.

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

The unique identifier for the search. You use QueryId to * identify the search when using the feedback API.

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

The unique identifier for the search. You use QueryId to * identify the search when using the feedback API.

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

The unique identifier for the search. You use QueryId to * identify the search when using the feedback API.

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

The unique identifier for the search. You use QueryId to * identify the search when using the feedback API.

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

The unique identifier for the search. You use QueryId to * identify the search when using the feedback 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 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 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 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 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 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 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 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 number of items returned by the search. Use this to determine when you * have requested the last set of results.

*/ inline int GetTotalNumberOfResults() const{ return m_totalNumberOfResults; } /** *

The number of items returned by the search. Use this to determine when you * have requested the last set of results.

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

The number of items returned by the search. Use this to determine when you * have requested the last set of results.

*/ inline QueryResult& WithTotalNumberOfResults(int value) { SetTotalNumberOfResults(value); return *this;} private: Aws::String m_queryId; Aws::Vector m_resultItems; Aws::Vector m_facetResults; int m_totalNumberOfResults; }; } // namespace Model } // namespace kendra } // namespace Aws