/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #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 AWS_KENDRA_API Highlight { public: Highlight(); Highlight(Aws::Utils::Json::JsonView jsonValue); Highlight& operator=(Aws::Utils::Json::JsonView jsonValue); 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;} private: int m_beginOffset; bool m_beginOffsetHasBeenSet; int m_endOffset; bool m_endOffsetHasBeenSet; bool m_topAnswer; bool m_topAnswerHasBeenSet; }; } // namespace Model } // namespace kendra } // namespace Aws