AWS SDK for C++

AWS SDK for C++ Version 1.11.742

Loading...
Searching...
No Matches
Attribute.h
1
6#pragma once
7#include <aws/comprehendmedical/ComprehendMedical_EXPORTS.h>
8#include <aws/comprehendmedical/model/EntitySubType.h>
9#include <aws/comprehendmedical/model/EntityType.h>
10#include <aws/comprehendmedical/model/RelationshipType.h>
11#include <aws/comprehendmedical/model/Trait.h>
12#include <aws/core/utils/memory/stl/AWSString.h>
13#include <aws/core/utils/memory/stl/AWSVector.h>
14
15#include <utility>
16
17namespace Aws {
18namespace Utils {
19namespace Json {
20class JsonValue;
21class JsonView;
22} // namespace Json
23} // namespace Utils
24namespace ComprehendMedical {
25namespace Model {
26
36class Attribute {
37 public:
38 AWS_COMPREHENDMEDICAL_API Attribute() = default;
39 AWS_COMPREHENDMEDICAL_API Attribute(Aws::Utils::Json::JsonView jsonValue);
40 AWS_COMPREHENDMEDICAL_API Attribute& operator=(Aws::Utils::Json::JsonView jsonValue);
41 AWS_COMPREHENDMEDICAL_API Aws::Utils::Json::JsonValue Jsonize() const;
42
44
47 inline EntitySubType GetType() const { return m_type; }
48 inline bool TypeHasBeenSet() const { return m_typeHasBeenSet; }
49 inline void SetType(EntitySubType value) {
50 m_typeHasBeenSet = true;
51 m_type = value;
52 }
54 SetType(value);
55 return *this;
56 }
58
60
64 inline double GetScore() const { return m_score; }
65 inline bool ScoreHasBeenSet() const { return m_scoreHasBeenSet; }
66 inline void SetScore(double value) {
67 m_scoreHasBeenSet = true;
68 m_score = value;
69 }
70 inline Attribute& WithScore(double value) {
71 SetScore(value);
72 return *this;
73 }
75
77
81 inline double GetRelationshipScore() const { return m_relationshipScore; }
82 inline bool RelationshipScoreHasBeenSet() const { return m_relationshipScoreHasBeenSet; }
83 inline void SetRelationshipScore(double value) {
84 m_relationshipScoreHasBeenSet = true;
85 m_relationshipScore = value;
86 }
87 inline Attribute& WithRelationshipScore(double value) {
89 return *this;
90 }
92
94
99 inline RelationshipType GetRelationshipType() const { return m_relationshipType; }
100 inline bool RelationshipTypeHasBeenSet() const { return m_relationshipTypeHasBeenSet; }
102 m_relationshipTypeHasBeenSet = true;
103 m_relationshipType = value;
104 }
106 SetRelationshipType(value);
107 return *this;
108 }
110
112
117 inline int GetId() const { return m_id; }
118 inline bool IdHasBeenSet() const { return m_idHasBeenSet; }
119 inline void SetId(int value) {
120 m_idHasBeenSet = true;
121 m_id = value;
122 }
123 inline Attribute& WithId(int value) {
124 SetId(value);
125 return *this;
126 }
128
130
134 inline int GetBeginOffset() const { return m_beginOffset; }
135 inline bool BeginOffsetHasBeenSet() const { return m_beginOffsetHasBeenSet; }
136 inline void SetBeginOffset(int value) {
137 m_beginOffsetHasBeenSet = true;
138 m_beginOffset = value;
139 }
140 inline Attribute& WithBeginOffset(int value) {
141 SetBeginOffset(value);
142 return *this;
143 }
145
147
151 inline int GetEndOffset() const { return m_endOffset; }
152 inline bool EndOffsetHasBeenSet() const { return m_endOffsetHasBeenSet; }
153 inline void SetEndOffset(int value) {
154 m_endOffsetHasBeenSet = true;
155 m_endOffset = value;
156 }
157 inline Attribute& WithEndOffset(int value) {
158 SetEndOffset(value);
159 return *this;
160 }
162
164
167 inline const Aws::String& GetText() const { return m_text; }
168 inline bool TextHasBeenSet() const { return m_textHasBeenSet; }
169 template <typename TextT = Aws::String>
170 void SetText(TextT&& value) {
171 m_textHasBeenSet = true;
172 m_text = std::forward<TextT>(value);
173 }
174 template <typename TextT = Aws::String>
175 Attribute& WithText(TextT&& value) {
176 SetText(std::forward<TextT>(value));
177 return *this;
178 }
180
182
185 inline EntityType GetCategory() const { return m_category; }
186 inline bool CategoryHasBeenSet() const { return m_categoryHasBeenSet; }
187 inline void SetCategory(EntityType value) {
188 m_categoryHasBeenSet = true;
189 m_category = value;
190 }
192 SetCategory(value);
193 return *this;
194 }
196
198
201 inline const Aws::Vector<Trait>& GetTraits() const { return m_traits; }
202 inline bool TraitsHasBeenSet() const { return m_traitsHasBeenSet; }
203 template <typename TraitsT = Aws::Vector<Trait>>
204 void SetTraits(TraitsT&& value) {
205 m_traitsHasBeenSet = true;
206 m_traits = std::forward<TraitsT>(value);
207 }
208 template <typename TraitsT = Aws::Vector<Trait>>
209 Attribute& WithTraits(TraitsT&& value) {
210 SetTraits(std::forward<TraitsT>(value));
211 return *this;
212 }
213 template <typename TraitsT = Trait>
214 Attribute& AddTraits(TraitsT&& value) {
215 m_traitsHasBeenSet = true;
216 m_traits.emplace_back(std::forward<TraitsT>(value));
217 return *this;
218 }
220 private:
222
223 double m_score{0.0};
224
225 double m_relationshipScore{0.0};
226
228
229 int m_id{0};
230
231 int m_beginOffset{0};
232
233 int m_endOffset{0};
234
235 Aws::String m_text;
236
238
239 Aws::Vector<Trait> m_traits;
240 bool m_typeHasBeenSet = false;
241 bool m_scoreHasBeenSet = false;
242 bool m_relationshipScoreHasBeenSet = false;
243 bool m_relationshipTypeHasBeenSet = false;
244 bool m_idHasBeenSet = false;
245 bool m_beginOffsetHasBeenSet = false;
246 bool m_endOffsetHasBeenSet = false;
247 bool m_textHasBeenSet = false;
248 bool m_categoryHasBeenSet = false;
249 bool m_traitsHasBeenSet = false;
250};
251
252} // namespace Model
253} // namespace ComprehendMedical
254} // namespace Aws
Attribute & WithScore(double value)
Definition Attribute.h:70
void SetType(EntitySubType value)
Definition Attribute.h:49
Attribute & WithTraits(TraitsT &&value)
Definition Attribute.h:209
Attribute & WithBeginOffset(int value)
Definition Attribute.h:140
AWS_COMPREHENDMEDICAL_API Aws::Utils::Json::JsonValue Jsonize() const
AWS_COMPREHENDMEDICAL_API Attribute & operator=(Aws::Utils::Json::JsonView jsonValue)
const Aws::String & GetText() const
Definition Attribute.h:167
Attribute & WithRelationshipType(RelationshipType value)
Definition Attribute.h:105
void SetRelationshipType(RelationshipType value)
Definition Attribute.h:101
Attribute & WithText(TextT &&value)
Definition Attribute.h:175
Attribute & WithRelationshipScore(double value)
Definition Attribute.h:87
AWS_COMPREHENDMEDICAL_API Attribute()=default
AWS_COMPREHENDMEDICAL_API Attribute(Aws::Utils::Json::JsonView jsonValue)
Attribute & WithType(EntitySubType value)
Definition Attribute.h:53
Attribute & WithCategory(EntityType value)
Definition Attribute.h:191
Attribute & WithEndOffset(int value)
Definition Attribute.h:157
const Aws::Vector< Trait > & GetTraits() const
Definition Attribute.h:201
Attribute & AddTraits(TraitsT &&value)
Definition Attribute.h:214
RelationshipType GetRelationshipType() const
Definition Attribute.h:99
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue