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

Provides information that you can use to highlight a search result so that * your users can quickly identify terms in the response.

See Also:

* AWS * API Reference

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

The zero-based location in the response string where the highlight * starts.

*/ inline int GetBeginOffset() const{ return m_beginOffset; } /** *

The zero-based location in the response string where the highlight * starts.

*/ inline bool BeginOffsetHasBeenSet() const { return m_beginOffsetHasBeenSet; } /** *

The zero-based location in the response string where the highlight * starts.

*/ inline void SetBeginOffset(int value) { m_beginOffsetHasBeenSet = true; m_beginOffset = value; } /** *

The zero-based location in the response string where the highlight * starts.

*/ inline Highlight& WithBeginOffset(int value) { SetBeginOffset(value); return *this;} /** *

The zero-based location in the response string where the highlight ends.

*/ inline int GetEndOffset() const{ return m_endOffset; } /** *

The zero-based location in the response string where the highlight ends.

*/ inline bool EndOffsetHasBeenSet() const { return m_endOffsetHasBeenSet; } /** *

The zero-based location in the response string where the highlight ends.

*/ inline void SetEndOffset(int value) { m_endOffsetHasBeenSet = true; m_endOffset = value; } /** *

The zero-based location in the response string where the highlight ends.

*/ inline Highlight& WithEndOffset(int value) { SetEndOffset(value); return *this;} /** *

Indicates whether the response is the best response. True if this is the best * response; otherwise, false.

*/ inline bool GetTopAnswer() const{ return m_topAnswer; } /** *

Indicates whether the response is the best response. True if this is the best * response; otherwise, false.

*/ inline bool TopAnswerHasBeenSet() const { return m_topAnswerHasBeenSet; } /** *

Indicates whether the response is the best response. True if this is the best * response; otherwise, false.

*/ inline void SetTopAnswer(bool value) { m_topAnswerHasBeenSet = true; m_topAnswer = value; } /** *

Indicates whether the response is the best response. True if this is the best * response; otherwise, false.

*/ inline Highlight& WithTopAnswer(bool value) { SetTopAnswer(value); return *this;} /** *

The highlight type.

*/ inline const HighlightType& GetType() const{ return m_type; } /** *

The highlight type.

*/ inline bool TypeHasBeenSet() const { return m_typeHasBeenSet; } /** *

The highlight type.

*/ inline void SetType(const HighlightType& value) { m_typeHasBeenSet = true; m_type = value; } /** *

The highlight type.

*/ inline void SetType(HighlightType&& value) { m_typeHasBeenSet = true; m_type = std::move(value); } /** *

The highlight type.

*/ inline Highlight& WithType(const HighlightType& value) { SetType(value); return *this;} /** *

The highlight type.

*/ inline Highlight& WithType(HighlightType&& value) { SetType(std::move(value)); return *this;} private: int m_beginOffset; bool m_beginOffsetHasBeenSet = false; int m_endOffset; bool m_endOffsetHasBeenSet = false; bool m_topAnswer; bool m_topAnswerHasBeenSet = false; HighlightType m_type; bool m_typeHasBeenSet = false; }; } // namespace Model } // namespace kendra } // namespace Aws