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

A document attribute or metadata field. To create custom document attributes, * see Custom * attributes.

See Also:

AWS * API Reference

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

The identifier for the attribute.

*/ inline const Aws::String& GetKey() const{ return m_key; } /** *

The identifier for the attribute.

*/ inline bool KeyHasBeenSet() const { return m_keyHasBeenSet; } /** *

The identifier for the attribute.

*/ inline void SetKey(const Aws::String& value) { m_keyHasBeenSet = true; m_key = value; } /** *

The identifier for the attribute.

*/ inline void SetKey(Aws::String&& value) { m_keyHasBeenSet = true; m_key = std::move(value); } /** *

The identifier for the attribute.

*/ inline void SetKey(const char* value) { m_keyHasBeenSet = true; m_key.assign(value); } /** *

The identifier for the attribute.

*/ inline DocumentAttribute& WithKey(const Aws::String& value) { SetKey(value); return *this;} /** *

The identifier for the attribute.

*/ inline DocumentAttribute& WithKey(Aws::String&& value) { SetKey(std::move(value)); return *this;} /** *

The identifier for the attribute.

*/ inline DocumentAttribute& WithKey(const char* value) { SetKey(value); return *this;} /** *

The value of the attribute.

*/ inline const DocumentAttributeValue& GetValue() const{ return m_value; } /** *

The value of the attribute.

*/ inline bool ValueHasBeenSet() const { return m_valueHasBeenSet; } /** *

The value of the attribute.

*/ inline void SetValue(const DocumentAttributeValue& value) { m_valueHasBeenSet = true; m_value = value; } /** *

The value of the attribute.

*/ inline void SetValue(DocumentAttributeValue&& value) { m_valueHasBeenSet = true; m_value = std::move(value); } /** *

The value of the attribute.

*/ inline DocumentAttribute& WithValue(const DocumentAttributeValue& value) { SetValue(value); return *this;} /** *

The value of the attribute.

*/ inline DocumentAttribute& WithValue(DocumentAttributeValue&& value) { SetValue(std::move(value)); return *this;} private: Aws::String m_key; bool m_keyHasBeenSet = false; DocumentAttributeValue m_value; bool m_valueHasBeenSet = false; }; } // namespace Model } // namespace kendra } // namespace Aws