1 /** 2 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 * SPDX-License-Identifier: Apache-2.0. 4 */ 5 6 #pragma once 7 #include <aws/comprehend/Comprehend_EXPORTS.h> 8 #include <aws/comprehend/model/EntityType.h> 9 #include <aws/core/utils/memory/stl/AWSString.h> 10 #include <utility> 11 12 namespace Aws 13 { 14 namespace Utils 15 { 16 namespace Json 17 { 18 class JsonValue; 19 class JsonView; 20 } // namespace Json 21 } // namespace Utils 22 namespace Comprehend 23 { 24 namespace Model 25 { 26 27 /** 28 * <p>Provides information about an entity. </p> <p> </p><p><h3>See Also:</h3> <a 29 * href="http://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/Entity">AWS 30 * API Reference</a></p> 31 */ 32 class AWS_COMPREHEND_API Entity 33 { 34 public: 35 Entity(); 36 Entity(Aws::Utils::Json::JsonView jsonValue); 37 Entity& operator=(Aws::Utils::Json::JsonView jsonValue); 38 Aws::Utils::Json::JsonValue Jsonize() const; 39 40 41 /** 42 * <p>The level of confidence that Amazon Comprehend has in the accuracy of the 43 * detection.</p> 44 */ GetScore()45 inline double GetScore() const{ return m_score; } 46 47 /** 48 * <p>The level of confidence that Amazon Comprehend has in the accuracy of the 49 * detection.</p> 50 */ ScoreHasBeenSet()51 inline bool ScoreHasBeenSet() const { return m_scoreHasBeenSet; } 52 53 /** 54 * <p>The level of confidence that Amazon Comprehend has in the accuracy of the 55 * detection.</p> 56 */ SetScore(double value)57 inline void SetScore(double value) { m_scoreHasBeenSet = true; m_score = value; } 58 59 /** 60 * <p>The level of confidence that Amazon Comprehend has in the accuracy of the 61 * detection.</p> 62 */ WithScore(double value)63 inline Entity& WithScore(double value) { SetScore(value); return *this;} 64 65 66 /** 67 * <p>The entity's type.</p> 68 */ GetType()69 inline const EntityType& GetType() const{ return m_type; } 70 71 /** 72 * <p>The entity's type.</p> 73 */ TypeHasBeenSet()74 inline bool TypeHasBeenSet() const { return m_typeHasBeenSet; } 75 76 /** 77 * <p>The entity's type.</p> 78 */ SetType(const EntityType & value)79 inline void SetType(const EntityType& value) { m_typeHasBeenSet = true; m_type = value; } 80 81 /** 82 * <p>The entity's type.</p> 83 */ SetType(EntityType && value)84 inline void SetType(EntityType&& value) { m_typeHasBeenSet = true; m_type = std::move(value); } 85 86 /** 87 * <p>The entity's type.</p> 88 */ WithType(const EntityType & value)89 inline Entity& WithType(const EntityType& value) { SetType(value); return *this;} 90 91 /** 92 * <p>The entity's type.</p> 93 */ WithType(EntityType && value)94 inline Entity& WithType(EntityType&& value) { SetType(std::move(value)); return *this;} 95 96 97 /** 98 * <p>The text of the entity.</p> 99 */ GetText()100 inline const Aws::String& GetText() const{ return m_text; } 101 102 /** 103 * <p>The text of the entity.</p> 104 */ TextHasBeenSet()105 inline bool TextHasBeenSet() const { return m_textHasBeenSet; } 106 107 /** 108 * <p>The text of the entity.</p> 109 */ SetText(const Aws::String & value)110 inline void SetText(const Aws::String& value) { m_textHasBeenSet = true; m_text = value; } 111 112 /** 113 * <p>The text of the entity.</p> 114 */ SetText(Aws::String && value)115 inline void SetText(Aws::String&& value) { m_textHasBeenSet = true; m_text = std::move(value); } 116 117 /** 118 * <p>The text of the entity.</p> 119 */ SetText(const char * value)120 inline void SetText(const char* value) { m_textHasBeenSet = true; m_text.assign(value); } 121 122 /** 123 * <p>The text of the entity.</p> 124 */ WithText(const Aws::String & value)125 inline Entity& WithText(const Aws::String& value) { SetText(value); return *this;} 126 127 /** 128 * <p>The text of the entity.</p> 129 */ WithText(Aws::String && value)130 inline Entity& WithText(Aws::String&& value) { SetText(std::move(value)); return *this;} 131 132 /** 133 * <p>The text of the entity.</p> 134 */ WithText(const char * value)135 inline Entity& WithText(const char* value) { SetText(value); return *this;} 136 137 138 /** 139 * <p>A character offset in the input text that shows where the entity begins (the 140 * first character is at position 0). The offset returns the position of each UTF-8 141 * code point in the string. A <i>code point</i> is the abstract character from a 142 * particular graphical representation. For example, a multi-byte UTF-8 character 143 * maps to a single code point.</p> 144 */ GetBeginOffset()145 inline int GetBeginOffset() const{ return m_beginOffset; } 146 147 /** 148 * <p>A character offset in the input text that shows where the entity begins (the 149 * first character is at position 0). The offset returns the position of each UTF-8 150 * code point in the string. A <i>code point</i> is the abstract character from a 151 * particular graphical representation. For example, a multi-byte UTF-8 character 152 * maps to a single code point.</p> 153 */ BeginOffsetHasBeenSet()154 inline bool BeginOffsetHasBeenSet() const { return m_beginOffsetHasBeenSet; } 155 156 /** 157 * <p>A character offset in the input text that shows where the entity begins (the 158 * first character is at position 0). The offset returns the position of each UTF-8 159 * code point in the string. A <i>code point</i> is the abstract character from a 160 * particular graphical representation. For example, a multi-byte UTF-8 character 161 * maps to a single code point.</p> 162 */ SetBeginOffset(int value)163 inline void SetBeginOffset(int value) { m_beginOffsetHasBeenSet = true; m_beginOffset = value; } 164 165 /** 166 * <p>A character offset in the input text that shows where the entity begins (the 167 * first character is at position 0). The offset returns the position of each UTF-8 168 * code point in the string. A <i>code point</i> is the abstract character from a 169 * particular graphical representation. For example, a multi-byte UTF-8 character 170 * maps to a single code point.</p> 171 */ WithBeginOffset(int value)172 inline Entity& WithBeginOffset(int value) { SetBeginOffset(value); return *this;} 173 174 175 /** 176 * <p>A character offset in the input text that shows where the entity ends. The 177 * offset returns the position of each UTF-8 code point in the string. A <i>code 178 * point</i> is the abstract character from a particular graphical representation. 179 * For example, a multi-byte UTF-8 character maps to a single code point. </p> 180 */ GetEndOffset()181 inline int GetEndOffset() const{ return m_endOffset; } 182 183 /** 184 * <p>A character offset in the input text that shows where the entity ends. The 185 * offset returns the position of each UTF-8 code point in the string. A <i>code 186 * point</i> is the abstract character from a particular graphical representation. 187 * For example, a multi-byte UTF-8 character maps to a single code point. </p> 188 */ EndOffsetHasBeenSet()189 inline bool EndOffsetHasBeenSet() const { return m_endOffsetHasBeenSet; } 190 191 /** 192 * <p>A character offset in the input text that shows where the entity ends. The 193 * offset returns the position of each UTF-8 code point in the string. A <i>code 194 * point</i> is the abstract character from a particular graphical representation. 195 * For example, a multi-byte UTF-8 character maps to a single code point. </p> 196 */ SetEndOffset(int value)197 inline void SetEndOffset(int value) { m_endOffsetHasBeenSet = true; m_endOffset = value; } 198 199 /** 200 * <p>A character offset in the input text that shows where the entity ends. The 201 * offset returns the position of each UTF-8 code point in the string. A <i>code 202 * point</i> is the abstract character from a particular graphical representation. 203 * For example, a multi-byte UTF-8 character maps to a single code point. </p> 204 */ WithEndOffset(int value)205 inline Entity& WithEndOffset(int value) { SetEndOffset(value); return *this;} 206 207 private: 208 209 double m_score; 210 bool m_scoreHasBeenSet; 211 212 EntityType m_type; 213 bool m_typeHasBeenSet; 214 215 Aws::String m_text; 216 bool m_textHasBeenSet; 217 218 int m_beginOffset; 219 bool m_beginOffsetHasBeenSet; 220 221 int m_endOffset; 222 bool m_endOffsetHasBeenSet; 223 }; 224 225 } // namespace Model 226 } // namespace Comprehend 227 } // namespace Aws 228