AWS SDK for C++

AWS SDK for C++ Version 1.11.607

Loading...
Searching...
No Matches
Entity.h
1
6#pragma once
7#include <aws/comprehendmedical/ComprehendMedical_EXPORTS.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/comprehendmedical/model/EntityType.h>
10#include <aws/comprehendmedical/model/EntitySubType.h>
11#include <aws/core/utils/memory/stl/AWSVector.h>
12#include <aws/comprehendmedical/model/Trait.h>
13#include <aws/comprehendmedical/model/Attribute.h>
14#include <utility>
15
16namespace Aws
17{
18namespace Utils
19{
20namespace Json
21{
22 class JsonValue;
23 class JsonView;
24} // namespace Json
25} // namespace Utils
26namespace ComprehendMedical
27{
28namespace Model
29{
30
37 class Entity
38 {
39 public:
40 AWS_COMPREHENDMEDICAL_API Entity() = default;
41 AWS_COMPREHENDMEDICAL_API Entity(Aws::Utils::Json::JsonView jsonValue);
42 AWS_COMPREHENDMEDICAL_API Entity& operator=(Aws::Utils::Json::JsonView jsonValue);
43 AWS_COMPREHENDMEDICAL_API Aws::Utils::Json::JsonValue Jsonize() const;
44
45
47
51 inline int GetId() const { return m_id; }
52 inline bool IdHasBeenSet() const { return m_idHasBeenSet; }
53 inline void SetId(int value) { m_idHasBeenSet = true; m_id = value; }
54 inline Entity& WithId(int value) { SetId(value); return *this;}
56
58
62 inline int GetBeginOffset() const { return m_beginOffset; }
63 inline bool BeginOffsetHasBeenSet() const { return m_beginOffsetHasBeenSet; }
64 inline void SetBeginOffset(int value) { m_beginOffsetHasBeenSet = true; m_beginOffset = value; }
65 inline Entity& WithBeginOffset(int value) { SetBeginOffset(value); return *this;}
67
69
73 inline int GetEndOffset() const { return m_endOffset; }
74 inline bool EndOffsetHasBeenSet() const { return m_endOffsetHasBeenSet; }
75 inline void SetEndOffset(int value) { m_endOffsetHasBeenSet = true; m_endOffset = value; }
76 inline Entity& WithEndOffset(int value) { SetEndOffset(value); return *this;}
78
80
84 inline double GetScore() const { return m_score; }
85 inline bool ScoreHasBeenSet() const { return m_scoreHasBeenSet; }
86 inline void SetScore(double value) { m_scoreHasBeenSet = true; m_score = value; }
87 inline Entity& WithScore(double value) { SetScore(value); return *this;}
89
91
94 inline const Aws::String& GetText() const { return m_text; }
95 inline bool TextHasBeenSet() const { return m_textHasBeenSet; }
96 template<typename TextT = Aws::String>
97 void SetText(TextT&& value) { m_textHasBeenSet = true; m_text = std::forward<TextT>(value); }
98 template<typename TextT = Aws::String>
99 Entity& WithText(TextT&& value) { SetText(std::forward<TextT>(value)); return *this;}
101
103
106 inline EntityType GetCategory() const { return m_category; }
107 inline bool CategoryHasBeenSet() const { return m_categoryHasBeenSet; }
108 inline void SetCategory(EntityType value) { m_categoryHasBeenSet = true; m_category = value; }
109 inline Entity& WithCategory(EntityType value) { SetCategory(value); return *this;}
111
113
116 inline EntitySubType GetType() const { return m_type; }
117 inline bool TypeHasBeenSet() const { return m_typeHasBeenSet; }
118 inline void SetType(EntitySubType value) { m_typeHasBeenSet = true; m_type = value; }
119 inline Entity& WithType(EntitySubType value) { SetType(value); return *this;}
121
123
126 inline const Aws::Vector<Trait>& GetTraits() const { return m_traits; }
127 inline bool TraitsHasBeenSet() const { return m_traitsHasBeenSet; }
128 template<typename TraitsT = Aws::Vector<Trait>>
129 void SetTraits(TraitsT&& value) { m_traitsHasBeenSet = true; m_traits = std::forward<TraitsT>(value); }
130 template<typename TraitsT = Aws::Vector<Trait>>
131 Entity& WithTraits(TraitsT&& value) { SetTraits(std::forward<TraitsT>(value)); return *this;}
132 template<typename TraitsT = Trait>
133 Entity& AddTraits(TraitsT&& value) { m_traitsHasBeenSet = true; m_traits.emplace_back(std::forward<TraitsT>(value)); return *this; }
135
137
140 inline const Aws::Vector<Attribute>& GetAttributes() const { return m_attributes; }
141 inline bool AttributesHasBeenSet() const { return m_attributesHasBeenSet; }
142 template<typename AttributesT = Aws::Vector<Attribute>>
143 void SetAttributes(AttributesT&& value) { m_attributesHasBeenSet = true; m_attributes = std::forward<AttributesT>(value); }
144 template<typename AttributesT = Aws::Vector<Attribute>>
145 Entity& WithAttributes(AttributesT&& value) { SetAttributes(std::forward<AttributesT>(value)); return *this;}
146 template<typename AttributesT = Attribute>
147 Entity& AddAttributes(AttributesT&& value) { m_attributesHasBeenSet = true; m_attributes.emplace_back(std::forward<AttributesT>(value)); return *this; }
149 private:
150
151 int m_id{0};
152 bool m_idHasBeenSet = false;
153
154 int m_beginOffset{0};
155 bool m_beginOffsetHasBeenSet = false;
156
157 int m_endOffset{0};
158 bool m_endOffsetHasBeenSet = false;
159
160 double m_score{0.0};
161 bool m_scoreHasBeenSet = false;
162
163 Aws::String m_text;
164 bool m_textHasBeenSet = false;
165
167 bool m_categoryHasBeenSet = false;
168
170 bool m_typeHasBeenSet = false;
171
172 Aws::Vector<Trait> m_traits;
173 bool m_traitsHasBeenSet = false;
174
175 Aws::Vector<Attribute> m_attributes;
176 bool m_attributesHasBeenSet = false;
177 };
178
179} // namespace Model
180} // namespace ComprehendMedical
181} // namespace Aws
AWS_COMPREHENDMEDICAL_API Entity(Aws::Utils::Json::JsonView jsonValue)
void SetType(EntitySubType value)
Definition Entity.h:118
Entity & AddAttributes(AttributesT &&value)
Definition Entity.h:147
void SetTraits(TraitsT &&value)
Definition Entity.h:129
Entity & WithType(EntitySubType value)
Definition Entity.h:119
Entity & WithCategory(EntityType value)
Definition Entity.h:109
Entity & AddTraits(TraitsT &&value)
Definition Entity.h:133
Entity & WithText(TextT &&value)
Definition Entity.h:99
void SetText(TextT &&value)
Definition Entity.h:97
AWS_COMPREHENDMEDICAL_API Aws::Utils::Json::JsonValue Jsonize() const
AWS_COMPREHENDMEDICAL_API Entity()=default
Entity & WithBeginOffset(int value)
Definition Entity.h:65
void SetCategory(EntityType value)
Definition Entity.h:108
AWS_COMPREHENDMEDICAL_API Entity & operator=(Aws::Utils::Json::JsonView jsonValue)
Entity & WithAttributes(AttributesT &&value)
Definition Entity.h:145
const Aws::Vector< Trait > & GetTraits() const
Definition Entity.h:126
const Aws::Vector< Attribute > & GetAttributes() const
Definition Entity.h:140
const Aws::String & GetText() const
Definition Entity.h:94
void SetAttributes(AttributesT &&value)
Definition Entity.h:143
Entity & WithEndOffset(int value)
Definition Entity.h:76
EntitySubType GetType() const
Definition Entity.h:116
Entity & WithTraits(TraitsT &&value)
Definition Entity.h:131
Entity & WithScore(double value)
Definition Entity.h:87
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue