AWS SDK for C++

AWS SDK for C++ Version 1.11.607

Loading...
Searching...
No Matches
Block.h
1
6#pragma once
7#include <aws/textract/Textract_EXPORTS.h>
8#include <aws/textract/model/BlockType.h>
9#include <aws/core/utils/memory/stl/AWSString.h>
10#include <aws/textract/model/TextType.h>
11#include <aws/textract/model/Geometry.h>
12#include <aws/core/utils/memory/stl/AWSVector.h>
13#include <aws/textract/model/SelectionStatus.h>
14#include <aws/textract/model/Query.h>
15#include <aws/textract/model/Relationship.h>
16#include <aws/textract/model/EntityType.h>
17#include <utility>
18
19namespace Aws
20{
21namespace Utils
22{
23namespace Json
24{
25 class JsonValue;
26 class JsonView;
27} // namespace Json
28} // namespace Utils
29namespace Textract
30{
31namespace Model
32{
33
52 class Block
53 {
54 public:
55 AWS_TEXTRACT_API Block() = default;
56 AWS_TEXTRACT_API Block(Aws::Utils::Json::JsonView jsonValue);
57 AWS_TEXTRACT_API Block& operator=(Aws::Utils::Json::JsonView jsonValue);
58 AWS_TEXTRACT_API Aws::Utils::Json::JsonValue Jsonize() const;
59
60
62
117 inline BlockType GetBlockType() const { return m_blockType; }
118 inline bool BlockTypeHasBeenSet() const { return m_blockTypeHasBeenSet; }
119 inline void SetBlockType(BlockType value) { m_blockTypeHasBeenSet = true; m_blockType = value; }
120 inline Block& WithBlockType(BlockType value) { SetBlockType(value); return *this;}
122
124
129 inline double GetConfidence() const { return m_confidence; }
130 inline bool ConfidenceHasBeenSet() const { return m_confidenceHasBeenSet; }
131 inline void SetConfidence(double value) { m_confidenceHasBeenSet = true; m_confidence = value; }
132 inline Block& WithConfidence(double value) { SetConfidence(value); return *this;}
134
136
139 inline const Aws::String& GetText() const { return m_text; }
140 inline bool TextHasBeenSet() const { return m_textHasBeenSet; }
141 template<typename TextT = Aws::String>
142 void SetText(TextT&& value) { m_textHasBeenSet = true; m_text = std::forward<TextT>(value); }
143 template<typename TextT = Aws::String>
144 Block& WithText(TextT&& value) { SetText(std::forward<TextT>(value)); return *this;}
146
148
152 inline TextType GetTextType() const { return m_textType; }
153 inline bool TextTypeHasBeenSet() const { return m_textTypeHasBeenSet; }
154 inline void SetTextType(TextType value) { m_textTypeHasBeenSet = true; m_textType = value; }
155 inline Block& WithTextType(TextType value) { SetTextType(value); return *this;}
157
159
164 inline int GetRowIndex() const { return m_rowIndex; }
165 inline bool RowIndexHasBeenSet() const { return m_rowIndexHasBeenSet; }
166 inline void SetRowIndex(int value) { m_rowIndexHasBeenSet = true; m_rowIndex = value; }
167 inline Block& WithRowIndex(int value) { SetRowIndex(value); return *this;}
169
171
176 inline int GetColumnIndex() const { return m_columnIndex; }
177 inline bool ColumnIndexHasBeenSet() const { return m_columnIndexHasBeenSet; }
178 inline void SetColumnIndex(int value) { m_columnIndexHasBeenSet = true; m_columnIndex = value; }
179 inline Block& WithColumnIndex(int value) { SetColumnIndex(value); return *this;}
181
183
188 inline int GetRowSpan() const { return m_rowSpan; }
189 inline bool RowSpanHasBeenSet() const { return m_rowSpanHasBeenSet; }
190 inline void SetRowSpan(int value) { m_rowSpanHasBeenSet = true; m_rowSpan = value; }
191 inline Block& WithRowSpan(int value) { SetRowSpan(value); return *this;}
193
195
200 inline int GetColumnSpan() const { return m_columnSpan; }
201 inline bool ColumnSpanHasBeenSet() const { return m_columnSpanHasBeenSet; }
202 inline void SetColumnSpan(int value) { m_columnSpanHasBeenSet = true; m_columnSpan = value; }
203 inline Block& WithColumnSpan(int value) { SetColumnSpan(value); return *this;}
205
207
212 inline const Geometry& GetGeometry() const { return m_geometry; }
213 inline bool GeometryHasBeenSet() const { return m_geometryHasBeenSet; }
214 template<typename GeometryT = Geometry>
215 void SetGeometry(GeometryT&& value) { m_geometryHasBeenSet = true; m_geometry = std::forward<GeometryT>(value); }
216 template<typename GeometryT = Geometry>
217 Block& WithGeometry(GeometryT&& value) { SetGeometry(std::forward<GeometryT>(value)); return *this;}
219
221
225 inline const Aws::String& GetId() const { return m_id; }
226 inline bool IdHasBeenSet() const { return m_idHasBeenSet; }
227 template<typename IdT = Aws::String>
228 void SetId(IdT&& value) { m_idHasBeenSet = true; m_id = std::forward<IdT>(value); }
229 template<typename IdT = Aws::String>
230 Block& WithId(IdT&& value) { SetId(std::forward<IdT>(value)); return *this;}
232
234
241 inline const Aws::Vector<Relationship>& GetRelationships() const { return m_relationships; }
242 inline bool RelationshipsHasBeenSet() const { return m_relationshipsHasBeenSet; }
243 template<typename RelationshipsT = Aws::Vector<Relationship>>
244 void SetRelationships(RelationshipsT&& value) { m_relationshipsHasBeenSet = true; m_relationships = std::forward<RelationshipsT>(value); }
245 template<typename RelationshipsT = Aws::Vector<Relationship>>
246 Block& WithRelationships(RelationshipsT&& value) { SetRelationships(std::forward<RelationshipsT>(value)); return *this;}
247 template<typename RelationshipsT = Relationship>
248 Block& AddRelationships(RelationshipsT&& value) { m_relationshipsHasBeenSet = true; m_relationships.emplace_back(std::forward<RelationshipsT>(value)); return *this; }
250
252
272 inline const Aws::Vector<EntityType>& GetEntityTypes() const { return m_entityTypes; }
273 inline bool EntityTypesHasBeenSet() const { return m_entityTypesHasBeenSet; }
274 template<typename EntityTypesT = Aws::Vector<EntityType>>
275 void SetEntityTypes(EntityTypesT&& value) { m_entityTypesHasBeenSet = true; m_entityTypes = std::forward<EntityTypesT>(value); }
276 template<typename EntityTypesT = Aws::Vector<EntityType>>
277 Block& WithEntityTypes(EntityTypesT&& value) { SetEntityTypes(std::forward<EntityTypesT>(value)); return *this;}
278 inline Block& AddEntityTypes(EntityType value) { m_entityTypesHasBeenSet = true; m_entityTypes.push_back(value); return *this; }
280
282
286 inline SelectionStatus GetSelectionStatus() const { return m_selectionStatus; }
287 inline bool SelectionStatusHasBeenSet() const { return m_selectionStatusHasBeenSet; }
288 inline void SetSelectionStatus(SelectionStatus value) { m_selectionStatusHasBeenSet = true; m_selectionStatus = value; }
289 inline Block& WithSelectionStatus(SelectionStatus value) { SetSelectionStatus(value); return *this;}
291
293
301 inline int GetPage() const { return m_page; }
302 inline bool PageHasBeenSet() const { return m_pageHasBeenSet; }
303 inline void SetPage(int value) { m_pageHasBeenSet = true; m_page = value; }
304 inline Block& WithPage(int value) { SetPage(value); return *this;}
306
308
311 inline const Query& GetQuery() const { return m_query; }
312 inline bool QueryHasBeenSet() const { return m_queryHasBeenSet; }
313 template<typename QueryT = Query>
314 void SetQuery(QueryT&& value) { m_queryHasBeenSet = true; m_query = std::forward<QueryT>(value); }
315 template<typename QueryT = Query>
316 Block& WithQuery(QueryT&& value) { SetQuery(std::forward<QueryT>(value)); return *this;}
318 private:
319
320 BlockType m_blockType{BlockType::NOT_SET};
321 bool m_blockTypeHasBeenSet = false;
322
323 double m_confidence{0.0};
324 bool m_confidenceHasBeenSet = false;
325
326 Aws::String m_text;
327 bool m_textHasBeenSet = false;
328
329 TextType m_textType{TextType::NOT_SET};
330 bool m_textTypeHasBeenSet = false;
331
332 int m_rowIndex{0};
333 bool m_rowIndexHasBeenSet = false;
334
335 int m_columnIndex{0};
336 bool m_columnIndexHasBeenSet = false;
337
338 int m_rowSpan{0};
339 bool m_rowSpanHasBeenSet = false;
340
341 int m_columnSpan{0};
342 bool m_columnSpanHasBeenSet = false;
343
344 Geometry m_geometry;
345 bool m_geometryHasBeenSet = false;
346
347 Aws::String m_id;
348 bool m_idHasBeenSet = false;
349
350 Aws::Vector<Relationship> m_relationships;
351 bool m_relationshipsHasBeenSet = false;
352
353 Aws::Vector<EntityType> m_entityTypes;
354 bool m_entityTypesHasBeenSet = false;
355
356 SelectionStatus m_selectionStatus{SelectionStatus::NOT_SET};
357 bool m_selectionStatusHasBeenSet = false;
358
359 int m_page{0};
360 bool m_pageHasBeenSet = false;
361
362 Query m_query;
363 bool m_queryHasBeenSet = false;
364 };
365
366} // namespace Model
367} // namespace Textract
368} // namespace Aws
AWS_TEXTRACT_API Block()=default
bool RelationshipsHasBeenSet() const
Definition Block.h:242
bool TextHasBeenSet() const
Definition Block.h:140
Block & WithRelationships(RelationshipsT &&value)
Definition Block.h:246
Block & WithGeometry(GeometryT &&value)
Definition Block.h:217
TextType GetTextType() const
Definition Block.h:152
Block & WithRowSpan(int value)
Definition Block.h:191
Block & WithText(TextT &&value)
Definition Block.h:144
bool PageHasBeenSet() const
Definition Block.h:302
Block & WithSelectionStatus(SelectionStatus value)
Definition Block.h:289
AWS_TEXTRACT_API Block & operator=(Aws::Utils::Json::JsonView jsonValue)
bool QueryHasBeenSet() const
Definition Block.h:312
Block & WithPage(int value)
Definition Block.h:304
const Aws::Vector< EntityType > & GetEntityTypes() const
Definition Block.h:272
int GetColumnIndex() const
Definition Block.h:176
bool ColumnIndexHasBeenSet() const
Definition Block.h:177
bool EntityTypesHasBeenSet() const
Definition Block.h:273
Block & WithColumnSpan(int value)
Definition Block.h:203
SelectionStatus GetSelectionStatus() const
Definition Block.h:286
int GetRowIndex() const
Definition Block.h:164
bool SelectionStatusHasBeenSet() const
Definition Block.h:287
void SetQuery(QueryT &&value)
Definition Block.h:314
Block & WithTextType(TextType value)
Definition Block.h:155
Block & WithQuery(QueryT &&value)
Definition Block.h:316
Block & WithId(IdT &&value)
Definition Block.h:230
void SetRowIndex(int value)
Definition Block.h:166
Block & WithColumnIndex(int value)
Definition Block.h:179
void SetRelationships(RelationshipsT &&value)
Definition Block.h:244
const Aws::Vector< Relationship > & GetRelationships() const
Definition Block.h:241
const Geometry & GetGeometry() const
Definition Block.h:212
AWS_TEXTRACT_API Aws::Utils::Json::JsonValue Jsonize() const
bool BlockTypeHasBeenSet() const
Definition Block.h:118
void SetGeometry(GeometryT &&value)
Definition Block.h:215
void SetColumnSpan(int value)
Definition Block.h:202
void SetBlockType(BlockType value)
Definition Block.h:119
bool RowIndexHasBeenSet() const
Definition Block.h:165
Block & WithEntityTypes(EntityTypesT &&value)
Definition Block.h:277
void SetEntityTypes(EntityTypesT &&value)
Definition Block.h:275
bool RowSpanHasBeenSet() const
Definition Block.h:189
bool GeometryHasBeenSet() const
Definition Block.h:213
void SetPage(int value)
Definition Block.h:303
bool ColumnSpanHasBeenSet() const
Definition Block.h:201
void SetRowSpan(int value)
Definition Block.h:190
Block & WithConfidence(double value)
Definition Block.h:132
Block & AddRelationships(RelationshipsT &&value)
Definition Block.h:248
BlockType GetBlockType() const
Definition Block.h:117
bool ConfidenceHasBeenSet() const
Definition Block.h:130
void SetText(TextT &&value)
Definition Block.h:142
Block & WithBlockType(BlockType value)
Definition Block.h:120
void SetConfidence(double value)
Definition Block.h:131
void SetColumnIndex(int value)
Definition Block.h:178
Block & WithRowIndex(int value)
Definition Block.h:167
void SetTextType(TextType value)
Definition Block.h:154
const Aws::String & GetText() const
Definition Block.h:139
AWS_TEXTRACT_API Block(Aws::Utils::Json::JsonView jsonValue)
const Aws::String & GetId() const
Definition Block.h:225
double GetConfidence() const
Definition Block.h:129
bool TextTypeHasBeenSet() const
Definition Block.h:153
void SetSelectionStatus(SelectionStatus value)
Definition Block.h:288
void SetId(IdT &&value)
Definition Block.h:228
int GetColumnSpan() const
Definition Block.h:200
bool IdHasBeenSet() const
Definition Block.h:226
const Query & GetQuery() const
Definition Block.h:311
Block & AddEntityTypes(EntityType value)
Definition Block.h:278
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue