AWS SDK for C++

AWS SDK for C++ Version 1.11.717

Loading...
Searching...
No Matches
TargetedSentimentMention.h
1
6#pragma once
7#include <aws/comprehend/Comprehend_EXPORTS.h>
8#include <aws/comprehend/model/MentionSentiment.h>
9#include <aws/comprehend/model/TargetedSentimentEntityType.h>
10#include <aws/core/utils/memory/stl/AWSString.h>
11
12#include <utility>
13
14namespace Aws {
15namespace Utils {
16namespace Json {
17class JsonValue;
18class JsonView;
19} // namespace Json
20} // namespace Utils
21namespace Comprehend {
22namespace Model {
23
35 public:
36 AWS_COMPREHEND_API TargetedSentimentMention() = default;
39 AWS_COMPREHEND_API Aws::Utils::Json::JsonValue Jsonize() const;
40
42
46 inline double GetScore() const { return m_score; }
47 inline bool ScoreHasBeenSet() const { return m_scoreHasBeenSet; }
48 inline void SetScore(double value) {
49 m_scoreHasBeenSet = true;
50 m_score = value;
51 }
52 inline TargetedSentimentMention& WithScore(double value) {
53 SetScore(value);
54 return *this;
55 }
57
59
63 inline double GetGroupScore() const { return m_groupScore; }
64 inline bool GroupScoreHasBeenSet() const { return m_groupScoreHasBeenSet; }
65 inline void SetGroupScore(double value) {
66 m_groupScoreHasBeenSet = true;
67 m_groupScore = value;
68 }
70 SetGroupScore(value);
71 return *this;
72 }
74
76
79 inline const Aws::String& GetText() const { return m_text; }
80 inline bool TextHasBeenSet() const { return m_textHasBeenSet; }
81 template <typename TextT = Aws::String>
82 void SetText(TextT&& value) {
83 m_textHasBeenSet = true;
84 m_text = std::forward<TextT>(value);
85 }
86 template <typename TextT = Aws::String>
88 SetText(std::forward<TextT>(value));
89 return *this;
90 }
92
94
99 inline TargetedSentimentEntityType GetType() const { return m_type; }
100 inline bool TypeHasBeenSet() const { return m_typeHasBeenSet; }
102 m_typeHasBeenSet = true;
103 m_type = value;
104 }
106 SetType(value);
107 return *this;
108 }
110
112
115 inline const MentionSentiment& GetMentionSentiment() const { return m_mentionSentiment; }
116 inline bool MentionSentimentHasBeenSet() const { return m_mentionSentimentHasBeenSet; }
117 template <typename MentionSentimentT = MentionSentiment>
118 void SetMentionSentiment(MentionSentimentT&& value) {
119 m_mentionSentimentHasBeenSet = true;
120 m_mentionSentiment = std::forward<MentionSentimentT>(value);
121 }
122 template <typename MentionSentimentT = MentionSentiment>
123 TargetedSentimentMention& WithMentionSentiment(MentionSentimentT&& value) {
124 SetMentionSentiment(std::forward<MentionSentimentT>(value));
125 return *this;
126 }
128
130
133 inline int GetBeginOffset() const { return m_beginOffset; }
134 inline bool BeginOffsetHasBeenSet() const { return m_beginOffsetHasBeenSet; }
135 inline void SetBeginOffset(int value) {
136 m_beginOffsetHasBeenSet = true;
137 m_beginOffset = value;
138 }
140 SetBeginOffset(value);
141 return *this;
142 }
144
146
149 inline int GetEndOffset() const { return m_endOffset; }
150 inline bool EndOffsetHasBeenSet() const { return m_endOffsetHasBeenSet; }
151 inline void SetEndOffset(int value) {
152 m_endOffsetHasBeenSet = true;
153 m_endOffset = value;
154 }
156 SetEndOffset(value);
157 return *this;
158 }
160 private:
161 double m_score{0.0};
162
163 double m_groupScore{0.0};
164
165 Aws::String m_text;
166
168
169 MentionSentiment m_mentionSentiment;
170
171 int m_beginOffset{0};
172
173 int m_endOffset{0};
174 bool m_scoreHasBeenSet = false;
175 bool m_groupScoreHasBeenSet = false;
176 bool m_textHasBeenSet = false;
177 bool m_typeHasBeenSet = false;
178 bool m_mentionSentimentHasBeenSet = false;
179 bool m_beginOffsetHasBeenSet = false;
180 bool m_endOffsetHasBeenSet = false;
181};
182
183} // namespace Model
184} // namespace Comprehend
185} // namespace Aws
AWS_COMPREHEND_API TargetedSentimentMention & operator=(Aws::Utils::Json::JsonView jsonValue)
TargetedSentimentMention & WithScore(double value)
TargetedSentimentMention & WithGroupScore(double value)
AWS_COMPREHEND_API Aws::Utils::Json::JsonValue Jsonize() const
void SetType(TargetedSentimentEntityType value)
AWS_COMPREHEND_API TargetedSentimentMention(Aws::Utils::Json::JsonView jsonValue)
TargetedSentimentMention & WithEndOffset(int value)
TargetedSentimentMention & WithType(TargetedSentimentEntityType value)
TargetedSentimentMention & WithBeginOffset(int value)
AWS_COMPREHEND_API TargetedSentimentMention()=default
TargetedSentimentMention & WithText(TextT &&value)
TargetedSentimentMention & WithMentionSentiment(MentionSentimentT &&value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Aws::Utils::Json::JsonValue JsonValue