1 /**
2  * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3  * SPDX-License-Identifier: Apache-2.0.
4  */
5 
6 #pragma once
7 #include <aws/kendra/Kendra_EXPORTS.h>
8 #include <aws/kendra/model/HighlightType.h>
9 #include <utility>
10 
11 namespace Aws
12 {
13 namespace Utils
14 {
15 namespace Json
16 {
17   class JsonValue;
18   class JsonView;
19 } // namespace Json
20 } // namespace Utils
21 namespace kendra
22 {
23 namespace Model
24 {
25 
26   /**
27    * <p>Provides information that you can use to highlight a search result so that
28    * your users can quickly identify terms in the response.</p><p><h3>See Also:</h3>
29    * <a href="http://docs.aws.amazon.com/goto/WebAPI/kendra-2019-02-03/Highlight">AWS
30    * API Reference</a></p>
31    */
32   class AWS_KENDRA_API Highlight
33   {
34   public:
35     Highlight();
36     Highlight(Aws::Utils::Json::JsonView jsonValue);
37     Highlight& operator=(Aws::Utils::Json::JsonView jsonValue);
38     Aws::Utils::Json::JsonValue Jsonize() const;
39 
40 
41     /**
42      * <p>The zero-based location in the response string where the highlight
43      * starts.</p>
44      */
GetBeginOffset()45     inline int GetBeginOffset() const{ return m_beginOffset; }
46 
47     /**
48      * <p>The zero-based location in the response string where the highlight
49      * starts.</p>
50      */
BeginOffsetHasBeenSet()51     inline bool BeginOffsetHasBeenSet() const { return m_beginOffsetHasBeenSet; }
52 
53     /**
54      * <p>The zero-based location in the response string where the highlight
55      * starts.</p>
56      */
SetBeginOffset(int value)57     inline void SetBeginOffset(int value) { m_beginOffsetHasBeenSet = true; m_beginOffset = value; }
58 
59     /**
60      * <p>The zero-based location in the response string where the highlight
61      * starts.</p>
62      */
WithBeginOffset(int value)63     inline Highlight& WithBeginOffset(int value) { SetBeginOffset(value); return *this;}
64 
65 
66     /**
67      * <p>The zero-based location in the response string where the highlight ends.</p>
68      */
GetEndOffset()69     inline int GetEndOffset() const{ return m_endOffset; }
70 
71     /**
72      * <p>The zero-based location in the response string where the highlight ends.</p>
73      */
EndOffsetHasBeenSet()74     inline bool EndOffsetHasBeenSet() const { return m_endOffsetHasBeenSet; }
75 
76     /**
77      * <p>The zero-based location in the response string where the highlight ends.</p>
78      */
SetEndOffset(int value)79     inline void SetEndOffset(int value) { m_endOffsetHasBeenSet = true; m_endOffset = value; }
80 
81     /**
82      * <p>The zero-based location in the response string where the highlight ends.</p>
83      */
WithEndOffset(int value)84     inline Highlight& WithEndOffset(int value) { SetEndOffset(value); return *this;}
85 
86 
87     /**
88      * <p>Indicates whether the response is the best response. True if this is the best
89      * response; otherwise, false.</p>
90      */
GetTopAnswer()91     inline bool GetTopAnswer() const{ return m_topAnswer; }
92 
93     /**
94      * <p>Indicates whether the response is the best response. True if this is the best
95      * response; otherwise, false.</p>
96      */
TopAnswerHasBeenSet()97     inline bool TopAnswerHasBeenSet() const { return m_topAnswerHasBeenSet; }
98 
99     /**
100      * <p>Indicates whether the response is the best response. True if this is the best
101      * response; otherwise, false.</p>
102      */
SetTopAnswer(bool value)103     inline void SetTopAnswer(bool value) { m_topAnswerHasBeenSet = true; m_topAnswer = value; }
104 
105     /**
106      * <p>Indicates whether the response is the best response. True if this is the best
107      * response; otherwise, false.</p>
108      */
WithTopAnswer(bool value)109     inline Highlight& WithTopAnswer(bool value) { SetTopAnswer(value); return *this;}
110 
111 
112     /**
113      * <p>The highlight type. </p>
114      */
GetType()115     inline const HighlightType& GetType() const{ return m_type; }
116 
117     /**
118      * <p>The highlight type. </p>
119      */
TypeHasBeenSet()120     inline bool TypeHasBeenSet() const { return m_typeHasBeenSet; }
121 
122     /**
123      * <p>The highlight type. </p>
124      */
SetType(const HighlightType & value)125     inline void SetType(const HighlightType& value) { m_typeHasBeenSet = true; m_type = value; }
126 
127     /**
128      * <p>The highlight type. </p>
129      */
SetType(HighlightType && value)130     inline void SetType(HighlightType&& value) { m_typeHasBeenSet = true; m_type = std::move(value); }
131 
132     /**
133      * <p>The highlight type. </p>
134      */
WithType(const HighlightType & value)135     inline Highlight& WithType(const HighlightType& value) { SetType(value); return *this;}
136 
137     /**
138      * <p>The highlight type. </p>
139      */
WithType(HighlightType && value)140     inline Highlight& WithType(HighlightType&& value) { SetType(std::move(value)); return *this;}
141 
142   private:
143 
144     int m_beginOffset;
145     bool m_beginOffsetHasBeenSet;
146 
147     int m_endOffset;
148     bool m_endOffsetHasBeenSet;
149 
150     bool m_topAnswer;
151     bool m_topAnswerHasBeenSet;
152 
153     HighlightType m_type;
154     bool m_typeHasBeenSet;
155   };
156 
157 } // namespace Model
158 } // namespace kendra
159 } // namespace Aws
160