AWS SDK for C++

AWS SDK for C++ Version 1.11.741

Loading...
Searching...
No Matches
Entity.h
1
6#pragma once
7#include <aws/comprehendmedical/ComprehendMedical_EXPORTS.h>
8#include <aws/comprehendmedical/model/Attribute.h>
9#include <aws/comprehendmedical/model/EntitySubType.h>
10#include <aws/comprehendmedical/model/EntityType.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
33class Entity {
34 public:
35 AWS_COMPREHENDMEDICAL_API Entity() = default;
36 AWS_COMPREHENDMEDICAL_API Entity(Aws::Utils::Json::JsonView jsonValue);
37 AWS_COMPREHENDMEDICAL_API Entity& operator=(Aws::Utils::Json::JsonView jsonValue);
38 AWS_COMPREHENDMEDICAL_API Aws::Utils::Json::JsonValue Jsonize() const;
39
41
45 inline int GetId() const { return m_id; }
46 inline bool IdHasBeenSet() const { return m_idHasBeenSet; }
47 inline void SetId(int value) {
48 m_idHasBeenSet = true;
49 m_id = value;
50 }
51 inline Entity& WithId(int value) {
52 SetId(value);
53 return *this;
54 }
56
58
62 inline int GetBeginOffset() const { return m_beginOffset; }
63 inline bool BeginOffsetHasBeenSet() const { return m_beginOffsetHasBeenSet; }
64 inline void SetBeginOffset(int value) {
65 m_beginOffsetHasBeenSet = true;
66 m_beginOffset = value;
67 }
68 inline Entity& WithBeginOffset(int value) {
69 SetBeginOffset(value);
70 return *this;
71 }
73
75
79 inline int GetEndOffset() const { return m_endOffset; }
80 inline bool EndOffsetHasBeenSet() const { return m_endOffsetHasBeenSet; }
81 inline void SetEndOffset(int value) {
82 m_endOffsetHasBeenSet = true;
83 m_endOffset = value;
84 }
85 inline Entity& WithEndOffset(int value) {
86 SetEndOffset(value);
87 return *this;
88 }
90
92
96 inline double GetScore() const { return m_score; }
97 inline bool ScoreHasBeenSet() const { return m_scoreHasBeenSet; }
98 inline void SetScore(double value) {
99 m_scoreHasBeenSet = true;
100 m_score = value;
101 }
102 inline Entity& WithScore(double value) {
103 SetScore(value);
104 return *this;
105 }
107
109
112 inline const Aws::String& GetText() const { return m_text; }
113 inline bool TextHasBeenSet() const { return m_textHasBeenSet; }
114 template <typename TextT = Aws::String>
115 void SetText(TextT&& value) {
116 m_textHasBeenSet = true;
117 m_text = std::forward<TextT>(value);
118 }
119 template <typename TextT = Aws::String>
120 Entity& WithText(TextT&& value) {
121 SetText(std::forward<TextT>(value));
122 return *this;
123 }
125
127
130 inline EntityType GetCategory() const { return m_category; }
131 inline bool CategoryHasBeenSet() const { return m_categoryHasBeenSet; }
132 inline void SetCategory(EntityType value) {
133 m_categoryHasBeenSet = true;
134 m_category = value;
135 }
137 SetCategory(value);
138 return *this;
139 }
141
143
146 inline EntitySubType GetType() const { return m_type; }
147 inline bool TypeHasBeenSet() const { return m_typeHasBeenSet; }
148 inline void SetType(EntitySubType value) {
149 m_typeHasBeenSet = true;
150 m_type = value;
151 }
153 SetType(value);
154 return *this;
155 }
157
159
162 inline const Aws::Vector<Trait>& GetTraits() const { return m_traits; }
163 inline bool TraitsHasBeenSet() const { return m_traitsHasBeenSet; }
164 template <typename TraitsT = Aws::Vector<Trait>>
165 void SetTraits(TraitsT&& value) {
166 m_traitsHasBeenSet = true;
167 m_traits = std::forward<TraitsT>(value);
168 }
169 template <typename TraitsT = Aws::Vector<Trait>>
170 Entity& WithTraits(TraitsT&& value) {
171 SetTraits(std::forward<TraitsT>(value));
172 return *this;
173 }
174 template <typename TraitsT = Trait>
175 Entity& AddTraits(TraitsT&& value) {
176 m_traitsHasBeenSet = true;
177 m_traits.emplace_back(std::forward<TraitsT>(value));
178 return *this;
179 }
181
183
186 inline const Aws::Vector<Attribute>& GetAttributes() const { return m_attributes; }
187 inline bool AttributesHasBeenSet() const { return m_attributesHasBeenSet; }
188 template <typename AttributesT = Aws::Vector<Attribute>>
189 void SetAttributes(AttributesT&& value) {
190 m_attributesHasBeenSet = true;
191 m_attributes = std::forward<AttributesT>(value);
192 }
193 template <typename AttributesT = Aws::Vector<Attribute>>
194 Entity& WithAttributes(AttributesT&& value) {
195 SetAttributes(std::forward<AttributesT>(value));
196 return *this;
197 }
198 template <typename AttributesT = Attribute>
199 Entity& AddAttributes(AttributesT&& value) {
200 m_attributesHasBeenSet = true;
201 m_attributes.emplace_back(std::forward<AttributesT>(value));
202 return *this;
203 }
205 private:
206 int m_id{0};
207
208 int m_beginOffset{0};
209
210 int m_endOffset{0};
211
212 double m_score{0.0};
213
214 Aws::String m_text;
215
217
219
220 Aws::Vector<Trait> m_traits;
221
222 Aws::Vector<Attribute> m_attributes;
223 bool m_idHasBeenSet = false;
224 bool m_beginOffsetHasBeenSet = false;
225 bool m_endOffsetHasBeenSet = false;
226 bool m_scoreHasBeenSet = false;
227 bool m_textHasBeenSet = false;
228 bool m_categoryHasBeenSet = false;
229 bool m_typeHasBeenSet = false;
230 bool m_traitsHasBeenSet = false;
231 bool m_attributesHasBeenSet = false;
232};
233
234} // namespace Model
235} // namespace ComprehendMedical
236} // namespace Aws
AWS_COMPREHENDMEDICAL_API Entity(Aws::Utils::Json::JsonView jsonValue)
void SetType(EntitySubType value)
Definition Entity.h:148
Entity & AddAttributes(AttributesT &&value)
Definition Entity.h:199
void SetTraits(TraitsT &&value)
Definition Entity.h:165
Entity & WithType(EntitySubType value)
Definition Entity.h:152
Entity & WithCategory(EntityType value)
Definition Entity.h:136
Entity & AddTraits(TraitsT &&value)
Definition Entity.h:175
Entity & WithText(TextT &&value)
Definition Entity.h:120
AWS_COMPREHENDMEDICAL_API Aws::Utils::Json::JsonValue Jsonize() const
AWS_COMPREHENDMEDICAL_API Entity()=default
Entity & WithBeginOffset(int value)
Definition Entity.h:68
void SetCategory(EntityType value)
Definition Entity.h:132
AWS_COMPREHENDMEDICAL_API Entity & operator=(Aws::Utils::Json::JsonView jsonValue)
Entity & WithAttributes(AttributesT &&value)
Definition Entity.h:194
const Aws::Vector< Trait > & GetTraits() const
Definition Entity.h:162
const Aws::Vector< Attribute > & GetAttributes() const
Definition Entity.h:186
const Aws::String & GetText() const
Definition Entity.h:112
void SetAttributes(AttributesT &&value)
Definition Entity.h:189
Entity & WithEndOffset(int value)
Definition Entity.h:85
EntitySubType GetType() const
Definition Entity.h:146
Entity & WithTraits(TraitsT &&value)
Definition Entity.h:170
Entity & WithScore(double value)
Definition Entity.h:102
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue