/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace kendra { namespace Model { class FacetResult; /** *

Provides the count of documents that match a particular attribute when doing * a faceted search.

See Also:

AWS * API Reference

*/ class DocumentAttributeValueCountPair { public: AWS_KENDRA_API DocumentAttributeValueCountPair(); AWS_KENDRA_API DocumentAttributeValueCountPair(Aws::Utils::Json::JsonView jsonValue); AWS_KENDRA_API DocumentAttributeValueCountPair& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_KENDRA_API Aws::Utils::Json::JsonValue Jsonize() const; /** *

The value of the attribute. For example, "HR".

*/ inline const DocumentAttributeValue& GetDocumentAttributeValue() const{ return m_documentAttributeValue; } /** *

The value of the attribute. For example, "HR".

*/ inline bool DocumentAttributeValueHasBeenSet() const { return m_documentAttributeValueHasBeenSet; } /** *

The value of the attribute. For example, "HR".

*/ inline void SetDocumentAttributeValue(const DocumentAttributeValue& value) { m_documentAttributeValueHasBeenSet = true; m_documentAttributeValue = value; } /** *

The value of the attribute. For example, "HR".

*/ inline void SetDocumentAttributeValue(DocumentAttributeValue&& value) { m_documentAttributeValueHasBeenSet = true; m_documentAttributeValue = std::move(value); } /** *

The value of the attribute. For example, "HR".

*/ inline DocumentAttributeValueCountPair& WithDocumentAttributeValue(const DocumentAttributeValue& value) { SetDocumentAttributeValue(value); return *this;} /** *

The value of the attribute. For example, "HR".

*/ inline DocumentAttributeValueCountPair& WithDocumentAttributeValue(DocumentAttributeValue&& value) { SetDocumentAttributeValue(std::move(value)); return *this;} /** *

The number of documents in the response that have the attribute value for the * key.

*/ inline int GetCount() const{ return m_count; } /** *

The number of documents in the response that have the attribute value for the * key.

*/ inline bool CountHasBeenSet() const { return m_countHasBeenSet; } /** *

The number of documents in the response that have the attribute value for the * key.

*/ inline void SetCount(int value) { m_countHasBeenSet = true; m_count = value; } /** *

The number of documents in the response that have the attribute value for the * key.

*/ inline DocumentAttributeValueCountPair& WithCount(int value) { SetCount(value); return *this;} /** *

Contains the results of a document attribute that is a nested facet. A * FacetResult contains the counts for each facet nested within a * facet.

For example, the document attribute or facet "Department" includes * a value called "Engineering". In addition, the document attribute or facet * "SubDepartment" includes the values "Frontend" and "Backend" for documents * assigned to "Engineering". You can display nested facets in the search results * so that documents can be searched not only by department but also by a sub * department within a department. The counts for documents that belong to * "Frontend" and "Backend" within "Engineering" are returned for a query.

*

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

Contains the results of a document attribute that is a nested facet. A * FacetResult contains the counts for each facet nested within a * facet.

For example, the document attribute or facet "Department" includes * a value called "Engineering". In addition, the document attribute or facet * "SubDepartment" includes the values "Frontend" and "Backend" for documents * assigned to "Engineering". You can display nested facets in the search results * so that documents can be searched not only by department but also by a sub * department within a department. The counts for documents that belong to * "Frontend" and "Backend" within "Engineering" are returned for a query.

*

*/ inline bool FacetResultsHasBeenSet() const { return m_facetResultsHasBeenSet; } /** *

Contains the results of a document attribute that is a nested facet. A * FacetResult contains the counts for each facet nested within a * facet.

For example, the document attribute or facet "Department" includes * a value called "Engineering". In addition, the document attribute or facet * "SubDepartment" includes the values "Frontend" and "Backend" for documents * assigned to "Engineering". You can display nested facets in the search results * so that documents can be searched not only by department but also by a sub * department within a department. The counts for documents that belong to * "Frontend" and "Backend" within "Engineering" are returned for a query.

*

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

Contains the results of a document attribute that is a nested facet. A * FacetResult contains the counts for each facet nested within a * facet.

For example, the document attribute or facet "Department" includes * a value called "Engineering". In addition, the document attribute or facet * "SubDepartment" includes the values "Frontend" and "Backend" for documents * assigned to "Engineering". You can display nested facets in the search results * so that documents can be searched not only by department but also by a sub * department within a department. The counts for documents that belong to * "Frontend" and "Backend" within "Engineering" are returned for a query.

*

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

Contains the results of a document attribute that is a nested facet. A * FacetResult contains the counts for each facet nested within a * facet.

For example, the document attribute or facet "Department" includes * a value called "Engineering". In addition, the document attribute or facet * "SubDepartment" includes the values "Frontend" and "Backend" for documents * assigned to "Engineering". You can display nested facets in the search results * so that documents can be searched not only by department but also by a sub * department within a department. The counts for documents that belong to * "Frontend" and "Backend" within "Engineering" are returned for a query.

*

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

Contains the results of a document attribute that is a nested facet. A * FacetResult contains the counts for each facet nested within a * facet.

For example, the document attribute or facet "Department" includes * a value called "Engineering". In addition, the document attribute or facet * "SubDepartment" includes the values "Frontend" and "Backend" for documents * assigned to "Engineering". You can display nested facets in the search results * so that documents can be searched not only by department but also by a sub * department within a department. The counts for documents that belong to * "Frontend" and "Backend" within "Engineering" are returned for a query.

*

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

Contains the results of a document attribute that is a nested facet. A * FacetResult contains the counts for each facet nested within a * facet.

For example, the document attribute or facet "Department" includes * a value called "Engineering". In addition, the document attribute or facet * "SubDepartment" includes the values "Frontend" and "Backend" for documents * assigned to "Engineering". You can display nested facets in the search results * so that documents can be searched not only by department but also by a sub * department within a department. The counts for documents that belong to * "Frontend" and "Backend" within "Engineering" are returned for a query.

*

*/ inline DocumentAttributeValueCountPair& AddFacetResults(const FacetResult& value) { m_facetResultsHasBeenSet = true; m_facetResults.push_back(value); return *this; } /** *

Contains the results of a document attribute that is a nested facet. A * FacetResult contains the counts for each facet nested within a * facet.

For example, the document attribute or facet "Department" includes * a value called "Engineering". In addition, the document attribute or facet * "SubDepartment" includes the values "Frontend" and "Backend" for documents * assigned to "Engineering". You can display nested facets in the search results * so that documents can be searched not only by department but also by a sub * department within a department. The counts for documents that belong to * "Frontend" and "Backend" within "Engineering" are returned for a query.

*

*/ inline DocumentAttributeValueCountPair& AddFacetResults(FacetResult&& value) { m_facetResultsHasBeenSet = true; m_facetResults.push_back(std::move(value)); return *this; } private: DocumentAttributeValue m_documentAttributeValue; bool m_documentAttributeValueHasBeenSet = false; int m_count; bool m_countHasBeenSet = false; Aws::Vector m_facetResults; bool m_facetResultsHasBeenSet = false; }; } // namespace Model } // namespace kendra } // namespace Aws