AWS SDK for C++

AWS SDK for C++ Version 1.11.440

Loading...
Searching...
No Matches
Entity.h
1
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 <aws/core/utils/memory/stl/AWSVector.h>
11#include <aws/comprehend/model/BlockReference.h>
12#include <utility>
13
14namespace Aws
15{
16namespace Utils
17{
18namespace Json
19{
20 class JsonValue;
21 class JsonView;
22} // namespace Json
23} // namespace Utils
24namespace Comprehend
25{
26namespace Model
27{
28
34 class Entity
35 {
36 public:
37 AWS_COMPREHEND_API Entity();
38 AWS_COMPREHEND_API Entity(Aws::Utils::Json::JsonView jsonValue);
39 AWS_COMPREHEND_API Entity& operator=(Aws::Utils::Json::JsonView jsonValue);
40 AWS_COMPREHEND_API Aws::Utils::Json::JsonValue Jsonize() const;
41
42
44
48 inline double GetScore() const{ return m_score; }
49 inline bool ScoreHasBeenSet() const { return m_scoreHasBeenSet; }
50 inline void SetScore(double value) { m_scoreHasBeenSet = true; m_score = value; }
51 inline Entity& WithScore(double value) { SetScore(value); return *this;}
53
55
61 inline const EntityType& GetType() const{ return m_type; }
62 inline bool TypeHasBeenSet() const { return m_typeHasBeenSet; }
63 inline void SetType(const EntityType& value) { m_typeHasBeenSet = true; m_type = value; }
64 inline void SetType(EntityType&& value) { m_typeHasBeenSet = true; m_type = std::move(value); }
65 inline Entity& WithType(const EntityType& value) { SetType(value); return *this;}
66 inline Entity& WithType(EntityType&& value) { SetType(std::move(value)); return *this;}
68
70
73 inline const Aws::String& GetText() const{ return m_text; }
74 inline bool TextHasBeenSet() const { return m_textHasBeenSet; }
75 inline void SetText(const Aws::String& value) { m_textHasBeenSet = true; m_text = value; }
76 inline void SetText(Aws::String&& value) { m_textHasBeenSet = true; m_text = std::move(value); }
77 inline void SetText(const char* value) { m_textHasBeenSet = true; m_text.assign(value); }
78 inline Entity& WithText(const Aws::String& value) { SetText(value); return *this;}
79 inline Entity& WithText(Aws::String&& value) { SetText(std::move(value)); return *this;}
80 inline Entity& WithText(const char* value) { SetText(value); return *this;}
82
84
88 inline int GetBeginOffset() const{ return m_beginOffset; }
89 inline bool BeginOffsetHasBeenSet() const { return m_beginOffsetHasBeenSet; }
90 inline void SetBeginOffset(int value) { m_beginOffsetHasBeenSet = true; m_beginOffset = value; }
91 inline Entity& WithBeginOffset(int value) { SetBeginOffset(value); return *this;}
93
95
99 inline int GetEndOffset() const{ return m_endOffset; }
100 inline bool EndOffsetHasBeenSet() const { return m_endOffsetHasBeenSet; }
101 inline void SetEndOffset(int value) { m_endOffsetHasBeenSet = true; m_endOffset = value; }
102 inline Entity& WithEndOffset(int value) { SetEndOffset(value); return *this;}
104
106
110 inline const Aws::Vector<BlockReference>& GetBlockReferences() const{ return m_blockReferences; }
111 inline bool BlockReferencesHasBeenSet() const { return m_blockReferencesHasBeenSet; }
112 inline void SetBlockReferences(const Aws::Vector<BlockReference>& value) { m_blockReferencesHasBeenSet = true; m_blockReferences = value; }
113 inline void SetBlockReferences(Aws::Vector<BlockReference>&& value) { m_blockReferencesHasBeenSet = true; m_blockReferences = std::move(value); }
114 inline Entity& WithBlockReferences(const Aws::Vector<BlockReference>& value) { SetBlockReferences(value); return *this;}
115 inline Entity& WithBlockReferences(Aws::Vector<BlockReference>&& value) { SetBlockReferences(std::move(value)); return *this;}
116 inline Entity& AddBlockReferences(const BlockReference& value) { m_blockReferencesHasBeenSet = true; m_blockReferences.push_back(value); return *this; }
117 inline Entity& AddBlockReferences(BlockReference&& value) { m_blockReferencesHasBeenSet = true; m_blockReferences.push_back(std::move(value)); return *this; }
119 private:
120
121 double m_score;
122 bool m_scoreHasBeenSet = false;
123
124 EntityType m_type;
125 bool m_typeHasBeenSet = false;
126
127 Aws::String m_text;
128 bool m_textHasBeenSet = false;
129
130 int m_beginOffset;
131 bool m_beginOffsetHasBeenSet = false;
132
133 int m_endOffset;
134 bool m_endOffsetHasBeenSet = false;
135
136 Aws::Vector<BlockReference> m_blockReferences;
137 bool m_blockReferencesHasBeenSet = false;
138 };
139
140} // namespace Model
141} // namespace Comprehend
142} // namespace Aws
Entity & WithType(EntityType &&value)
Definition Entity.h:66
Entity & WithType(const EntityType &value)
Definition Entity.h:65
void SetScore(double value)
Definition Entity.h:50
void SetText(Aws::String &&value)
Definition Entity.h:76
const Aws::String & GetText() const
Definition Entity.h:73
Entity & WithText(Aws::String &&value)
Definition Entity.h:79
double GetScore() const
Definition Entity.h:48
const EntityType & GetType() const
Definition Entity.h:61
Entity & WithBlockReferences(Aws::Vector< BlockReference > &&value)
Definition Entity.h:115
bool ScoreHasBeenSet() const
Definition Entity.h:49
void SetBlockReferences(Aws::Vector< BlockReference > &&value)
Definition Entity.h:113
AWS_COMPREHEND_API Entity & operator=(Aws::Utils::Json::JsonView jsonValue)
void SetBlockReferences(const Aws::Vector< BlockReference > &value)
Definition Entity.h:112
Entity & WithText(const Aws::String &value)
Definition Entity.h:78
const Aws::Vector< BlockReference > & GetBlockReferences() const
Definition Entity.h:110
Entity & WithScore(double value)
Definition Entity.h:51
Entity & WithText(const char *value)
Definition Entity.h:80
bool BlockReferencesHasBeenSet() const
Definition Entity.h:111
Entity & AddBlockReferences(BlockReference &&value)
Definition Entity.h:117
Entity & WithEndOffset(int value)
Definition Entity.h:102
AWS_COMPREHEND_API Aws::Utils::Json::JsonValue Jsonize() const
AWS_COMPREHEND_API Entity()
Entity & AddBlockReferences(const BlockReference &value)
Definition Entity.h:116
Entity & WithBlockReferences(const Aws::Vector< BlockReference > &value)
Definition Entity.h:114
void SetType(EntityType &&value)
Definition Entity.h:64
void SetBeginOffset(int value)
Definition Entity.h:90
bool EndOffsetHasBeenSet() const
Definition Entity.h:100
Entity & WithBeginOffset(int value)
Definition Entity.h:91
bool TextHasBeenSet() const
Definition Entity.h:74
void SetText(const Aws::String &value)
Definition Entity.h:75
void SetType(const EntityType &value)
Definition Entity.h:63
bool TypeHasBeenSet() const
Definition Entity.h:62
AWS_COMPREHEND_API Entity(Aws::Utils::Json::JsonView jsonValue)
void SetText(const char *value)
Definition Entity.h:77
void SetEndOffset(int value)
Definition Entity.h:101
bool BeginOffsetHasBeenSet() const
Definition Entity.h:89
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue