/** * 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 { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace kendra { namespace Model { class DocumentAttributeValueCountPair; /** *

The facet values for the documents in the response.

See Also:

* AWS * API Reference

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

The key for the facet values. This is the same as the * DocumentAttributeKey provided in the query.

*/ inline const Aws::String& GetDocumentAttributeKey() const{ return m_documentAttributeKey; } /** *

The key for the facet values. This is the same as the * DocumentAttributeKey provided in the query.

*/ inline bool DocumentAttributeKeyHasBeenSet() const { return m_documentAttributeKeyHasBeenSet; } /** *

The key for the facet values. This is the same as the * DocumentAttributeKey provided in the query.

*/ inline void SetDocumentAttributeKey(const Aws::String& value) { m_documentAttributeKeyHasBeenSet = true; m_documentAttributeKey = value; } /** *

The key for the facet values. This is the same as the * DocumentAttributeKey provided in the query.

*/ inline void SetDocumentAttributeKey(Aws::String&& value) { m_documentAttributeKeyHasBeenSet = true; m_documentAttributeKey = std::move(value); } /** *

The key for the facet values. This is the same as the * DocumentAttributeKey provided in the query.

*/ inline void SetDocumentAttributeKey(const char* value) { m_documentAttributeKeyHasBeenSet = true; m_documentAttributeKey.assign(value); } /** *

The key for the facet values. This is the same as the * DocumentAttributeKey provided in the query.

*/ inline FacetResult& WithDocumentAttributeKey(const Aws::String& value) { SetDocumentAttributeKey(value); return *this;} /** *

The key for the facet values. This is the same as the * DocumentAttributeKey provided in the query.

*/ inline FacetResult& WithDocumentAttributeKey(Aws::String&& value) { SetDocumentAttributeKey(std::move(value)); return *this;} /** *

The key for the facet values. This is the same as the * DocumentAttributeKey provided in the query.

*/ inline FacetResult& WithDocumentAttributeKey(const char* value) { SetDocumentAttributeKey(value); return *this;} /** *

The data type of the facet value. This is the same as the type defined for * the index field when it was created.

*/ inline const DocumentAttributeValueType& GetDocumentAttributeValueType() const{ return m_documentAttributeValueType; } /** *

The data type of the facet value. This is the same as the type defined for * the index field when it was created.

*/ inline bool DocumentAttributeValueTypeHasBeenSet() const { return m_documentAttributeValueTypeHasBeenSet; } /** *

The data type of the facet value. This is the same as the type defined for * the index field when it was created.

*/ inline void SetDocumentAttributeValueType(const DocumentAttributeValueType& value) { m_documentAttributeValueTypeHasBeenSet = true; m_documentAttributeValueType = value; } /** *

The data type of the facet value. This is the same as the type defined for * the index field when it was created.

*/ inline void SetDocumentAttributeValueType(DocumentAttributeValueType&& value) { m_documentAttributeValueTypeHasBeenSet = true; m_documentAttributeValueType = std::move(value); } /** *

The data type of the facet value. This is the same as the type defined for * the index field when it was created.

*/ inline FacetResult& WithDocumentAttributeValueType(const DocumentAttributeValueType& value) { SetDocumentAttributeValueType(value); return *this;} /** *

The data type of the facet value. This is the same as the type defined for * the index field when it was created.

*/ inline FacetResult& WithDocumentAttributeValueType(DocumentAttributeValueType&& value) { SetDocumentAttributeValueType(std::move(value)); return *this;} /** *

An array of key/value pairs, where the key is the value of the attribute and * the count is the number of documents that share the key value.

*/ inline const Aws::Vector& GetDocumentAttributeValueCountPairs() const{ return m_documentAttributeValueCountPairs; } /** *

An array of key/value pairs, where the key is the value of the attribute and * the count is the number of documents that share the key value.

*/ inline bool DocumentAttributeValueCountPairsHasBeenSet() const { return m_documentAttributeValueCountPairsHasBeenSet; } /** *

An array of key/value pairs, where the key is the value of the attribute and * the count is the number of documents that share the key value.

*/ inline void SetDocumentAttributeValueCountPairs(const Aws::Vector& value) { m_documentAttributeValueCountPairsHasBeenSet = true; m_documentAttributeValueCountPairs = value; } /** *

An array of key/value pairs, where the key is the value of the attribute and * the count is the number of documents that share the key value.

*/ inline void SetDocumentAttributeValueCountPairs(Aws::Vector&& value) { m_documentAttributeValueCountPairsHasBeenSet = true; m_documentAttributeValueCountPairs = std::move(value); } /** *

An array of key/value pairs, where the key is the value of the attribute and * the count is the number of documents that share the key value.

*/ inline FacetResult& WithDocumentAttributeValueCountPairs(const Aws::Vector& value) { SetDocumentAttributeValueCountPairs(value); return *this;} /** *

An array of key/value pairs, where the key is the value of the attribute and * the count is the number of documents that share the key value.

*/ inline FacetResult& WithDocumentAttributeValueCountPairs(Aws::Vector&& value) { SetDocumentAttributeValueCountPairs(std::move(value)); return *this;} /** *

An array of key/value pairs, where the key is the value of the attribute and * the count is the number of documents that share the key value.

*/ inline FacetResult& AddDocumentAttributeValueCountPairs(const DocumentAttributeValueCountPair& value) { m_documentAttributeValueCountPairsHasBeenSet = true; m_documentAttributeValueCountPairs.push_back(value); return *this; } /** *

An array of key/value pairs, where the key is the value of the attribute and * the count is the number of documents that share the key value.

*/ inline FacetResult& AddDocumentAttributeValueCountPairs(DocumentAttributeValueCountPair&& value) { m_documentAttributeValueCountPairsHasBeenSet = true; m_documentAttributeValueCountPairs.push_back(std::move(value)); return *this; } private: Aws::String m_documentAttributeKey; bool m_documentAttributeKeyHasBeenSet = false; DocumentAttributeValueType m_documentAttributeValueType; bool m_documentAttributeValueTypeHasBeenSet = false; Aws::Vector m_documentAttributeValueCountPairs; bool m_documentAttributeValueCountPairsHasBeenSet = false; }; } // namespace Model } // namespace kendra } // namespace Aws