/** * 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 { /** *

A corrected misspelled word in a query.

See Also:

AWS * API Reference

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

The zero-based location in the response string or text where the corrected * word starts.

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

The zero-based location in the response string or text where the corrected * word starts.

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

The zero-based location in the response string or text where the corrected * word starts.

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

The zero-based location in the response string or text where the corrected * word starts.

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

The zero-based location in the response string or text where the corrected * word ends.

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

The zero-based location in the response string or text where the corrected * word ends.

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

The zero-based location in the response string or text where the corrected * word ends.

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

The zero-based location in the response string or text where the corrected * word ends.

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

The string or text of a misspelled word in a query.

*/ inline const Aws::String& GetTerm() const{ return m_term; } /** *

The string or text of a misspelled word in a query.

*/ inline bool TermHasBeenSet() const { return m_termHasBeenSet; } /** *

The string or text of a misspelled word in a query.

*/ inline void SetTerm(const Aws::String& value) { m_termHasBeenSet = true; m_term = value; } /** *

The string or text of a misspelled word in a query.

*/ inline void SetTerm(Aws::String&& value) { m_termHasBeenSet = true; m_term = std::move(value); } /** *

The string or text of a misspelled word in a query.

*/ inline void SetTerm(const char* value) { m_termHasBeenSet = true; m_term.assign(value); } /** *

The string or text of a misspelled word in a query.

*/ inline Correction& WithTerm(const Aws::String& value) { SetTerm(value); return *this;} /** *

The string or text of a misspelled word in a query.

*/ inline Correction& WithTerm(Aws::String&& value) { SetTerm(std::move(value)); return *this;} /** *

The string or text of a misspelled word in a query.

*/ inline Correction& WithTerm(const char* value) { SetTerm(value); return *this;} /** *

The string or text of a corrected misspelled word in a query.

*/ inline const Aws::String& GetCorrectedTerm() const{ return m_correctedTerm; } /** *

The string or text of a corrected misspelled word in a query.

*/ inline bool CorrectedTermHasBeenSet() const { return m_correctedTermHasBeenSet; } /** *

The string or text of a corrected misspelled word in a query.

*/ inline void SetCorrectedTerm(const Aws::String& value) { m_correctedTermHasBeenSet = true; m_correctedTerm = value; } /** *

The string or text of a corrected misspelled word in a query.

*/ inline void SetCorrectedTerm(Aws::String&& value) { m_correctedTermHasBeenSet = true; m_correctedTerm = std::move(value); } /** *

The string or text of a corrected misspelled word in a query.

*/ inline void SetCorrectedTerm(const char* value) { m_correctedTermHasBeenSet = true; m_correctedTerm.assign(value); } /** *

The string or text of a corrected misspelled word in a query.

*/ inline Correction& WithCorrectedTerm(const Aws::String& value) { SetCorrectedTerm(value); return *this;} /** *

The string or text of a corrected misspelled word in a query.

*/ inline Correction& WithCorrectedTerm(Aws::String&& value) { SetCorrectedTerm(std::move(value)); return *this;} /** *

The string or text of a corrected misspelled word in a query.

*/ inline Correction& WithCorrectedTerm(const char* value) { SetCorrectedTerm(value); return *this;} private: int m_beginOffset; bool m_beginOffsetHasBeenSet = false; int m_endOffset; bool m_endOffsetHasBeenSet = false; Aws::String m_term; bool m_termHasBeenSet = false; Aws::String m_correctedTerm; bool m_correctedTermHasBeenSet = false; }; } // namespace Model } // namespace kendra } // namespace Aws