AWS SDK for C++

AWS SDK for C++ Version 1.11.717

Loading...
Searching...
No Matches
KeyPhrase.h
1
6#pragma once
7#include <aws/comprehend/Comprehend_EXPORTS.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9
10#include <utility>
11
12namespace Aws {
13namespace Utils {
14namespace Json {
15class JsonValue;
16class JsonView;
17} // namespace Json
18} // namespace Utils
19namespace Comprehend {
20namespace Model {
21
27class KeyPhrase {
28 public:
29 AWS_COMPREHEND_API KeyPhrase() = default;
30 AWS_COMPREHEND_API KeyPhrase(Aws::Utils::Json::JsonView jsonValue);
31 AWS_COMPREHEND_API KeyPhrase& operator=(Aws::Utils::Json::JsonView jsonValue);
32 AWS_COMPREHEND_API Aws::Utils::Json::JsonValue Jsonize() const;
33
35
39 inline double GetScore() const { return m_score; }
40 inline bool ScoreHasBeenSet() const { return m_scoreHasBeenSet; }
41 inline void SetScore(double value) {
42 m_scoreHasBeenSet = true;
43 m_score = value;
44 }
45 inline KeyPhrase& WithScore(double value) {
46 SetScore(value);
47 return *this;
48 }
50
52
55 inline const Aws::String& GetText() const { return m_text; }
56 inline bool TextHasBeenSet() const { return m_textHasBeenSet; }
57 template <typename TextT = Aws::String>
58 void SetText(TextT&& value) {
59 m_textHasBeenSet = true;
60 m_text = std::forward<TextT>(value);
61 }
62 template <typename TextT = Aws::String>
63 KeyPhrase& WithText(TextT&& value) {
64 SetText(std::forward<TextT>(value));
65 return *this;
66 }
68
70
74 inline int GetBeginOffset() const { return m_beginOffset; }
75 inline bool BeginOffsetHasBeenSet() const { return m_beginOffsetHasBeenSet; }
76 inline void SetBeginOffset(int value) {
77 m_beginOffsetHasBeenSet = true;
78 m_beginOffset = value;
79 }
80 inline KeyPhrase& WithBeginOffset(int value) {
81 SetBeginOffset(value);
82 return *this;
83 }
85
87
91 inline int GetEndOffset() const { return m_endOffset; }
92 inline bool EndOffsetHasBeenSet() const { return m_endOffsetHasBeenSet; }
93 inline void SetEndOffset(int value) {
94 m_endOffsetHasBeenSet = true;
95 m_endOffset = value;
96 }
97 inline KeyPhrase& WithEndOffset(int value) {
98 SetEndOffset(value);
99 return *this;
100 }
102 private:
103 double m_score{0.0};
104
105 Aws::String m_text;
106
107 int m_beginOffset{0};
108
109 int m_endOffset{0};
110 bool m_scoreHasBeenSet = false;
111 bool m_textHasBeenSet = false;
112 bool m_beginOffsetHasBeenSet = false;
113 bool m_endOffsetHasBeenSet = false;
114};
115
116} // namespace Model
117} // namespace Comprehend
118} // namespace Aws
AWS_COMPREHEND_API KeyPhrase & operator=(Aws::Utils::Json::JsonView jsonValue)
const Aws::String & GetText() const
Definition KeyPhrase.h:55
KeyPhrase & WithScore(double value)
Definition KeyPhrase.h:45
KeyPhrase & WithEndOffset(int value)
Definition KeyPhrase.h:97
AWS_COMPREHEND_API KeyPhrase()=default
void SetScore(double value)
Definition KeyPhrase.h:41
AWS_COMPREHEND_API Aws::Utils::Json::JsonValue Jsonize() const
KeyPhrase & WithBeginOffset(int value)
Definition KeyPhrase.h:80
void SetText(TextT &&value)
Definition KeyPhrase.h:58
AWS_COMPREHEND_API KeyPhrase(Aws::Utils::Json::JsonView jsonValue)
KeyPhrase & WithText(TextT &&value)
Definition KeyPhrase.h:63
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Aws::Utils::Json::JsonValue JsonValue