AWS SDK for C++

AWS SDK for C++ Version 1.11.717

Loading...
Searching...
No Matches
Block.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSString.h>
8#include <aws/core/utils/memory/stl/AWSVector.h>
9#include <aws/textract/Textract_EXPORTS.h>
10#include <aws/textract/model/BlockType.h>
11#include <aws/textract/model/EntityType.h>
12#include <aws/textract/model/Geometry.h>
13#include <aws/textract/model/Query.h>
14#include <aws/textract/model/Relationship.h>
15#include <aws/textract/model/SelectionStatus.h>
16#include <aws/textract/model/TextType.h>
17
18#include <utility>
19
20namespace Aws {
21namespace Utils {
22namespace Json {
23class JsonValue;
24class JsonView;
25} // namespace Json
26} // namespace Utils
27namespace Textract {
28namespace Model {
29
48class Block {
49 public:
50 AWS_TEXTRACT_API Block() = default;
51 AWS_TEXTRACT_API Block(Aws::Utils::Json::JsonView jsonValue);
52 AWS_TEXTRACT_API Block& operator=(Aws::Utils::Json::JsonView jsonValue);
53 AWS_TEXTRACT_API Aws::Utils::Json::JsonValue Jsonize() const;
54
56
111 inline BlockType GetBlockType() const { return m_blockType; }
112 inline bool BlockTypeHasBeenSet() const { return m_blockTypeHasBeenSet; }
113 inline void SetBlockType(BlockType value) {
114 m_blockTypeHasBeenSet = true;
115 m_blockType = value;
116 }
118 SetBlockType(value);
119 return *this;
120 }
122
124
129 inline double GetConfidence() const { return m_confidence; }
130 inline bool ConfidenceHasBeenSet() const { return m_confidenceHasBeenSet; }
131 inline void SetConfidence(double value) {
132 m_confidenceHasBeenSet = true;
133 m_confidence = value;
134 }
135 inline Block& WithConfidence(double value) {
136 SetConfidence(value);
137 return *this;
138 }
140
142
145 inline const Aws::String& GetText() const { return m_text; }
146 inline bool TextHasBeenSet() const { return m_textHasBeenSet; }
147 template <typename TextT = Aws::String>
148 void SetText(TextT&& value) {
149 m_textHasBeenSet = true;
150 m_text = std::forward<TextT>(value);
151 }
152 template <typename TextT = Aws::String>
153 Block& WithText(TextT&& value) {
154 SetText(std::forward<TextT>(value));
155 return *this;
156 }
158
160
164 inline TextType GetTextType() const { return m_textType; }
165 inline bool TextTypeHasBeenSet() const { return m_textTypeHasBeenSet; }
166 inline void SetTextType(TextType value) {
167 m_textTypeHasBeenSet = true;
168 m_textType = value;
169 }
170 inline Block& WithTextType(TextType value) {
171 SetTextType(value);
172 return *this;
173 }
175
177
182 inline int GetRowIndex() const { return m_rowIndex; }
183 inline bool RowIndexHasBeenSet() const { return m_rowIndexHasBeenSet; }
184 inline void SetRowIndex(int value) {
185 m_rowIndexHasBeenSet = true;
186 m_rowIndex = value;
187 }
188 inline Block& WithRowIndex(int value) {
189 SetRowIndex(value);
190 return *this;
191 }
193
195
200 inline int GetColumnIndex() const { return m_columnIndex; }
201 inline bool ColumnIndexHasBeenSet() const { return m_columnIndexHasBeenSet; }
202 inline void SetColumnIndex(int value) {
203 m_columnIndexHasBeenSet = true;
204 m_columnIndex = value;
205 }
206 inline Block& WithColumnIndex(int value) {
207 SetColumnIndex(value);
208 return *this;
209 }
211
213
218 inline int GetRowSpan() const { return m_rowSpan; }
219 inline bool RowSpanHasBeenSet() const { return m_rowSpanHasBeenSet; }
220 inline void SetRowSpan(int value) {
221 m_rowSpanHasBeenSet = true;
222 m_rowSpan = value;
223 }
224 inline Block& WithRowSpan(int value) {
225 SetRowSpan(value);
226 return *this;
227 }
229
231
236 inline int GetColumnSpan() const { return m_columnSpan; }
237 inline bool ColumnSpanHasBeenSet() const { return m_columnSpanHasBeenSet; }
238 inline void SetColumnSpan(int value) {
239 m_columnSpanHasBeenSet = true;
240 m_columnSpan = value;
241 }
242 inline Block& WithColumnSpan(int value) {
243 SetColumnSpan(value);
244 return *this;
245 }
247
249
254 inline const Geometry& GetGeometry() const { return m_geometry; }
255 inline bool GeometryHasBeenSet() const { return m_geometryHasBeenSet; }
256 template <typename GeometryT = Geometry>
257 void SetGeometry(GeometryT&& value) {
258 m_geometryHasBeenSet = true;
259 m_geometry = std::forward<GeometryT>(value);
260 }
261 template <typename GeometryT = Geometry>
262 Block& WithGeometry(GeometryT&& value) {
263 SetGeometry(std::forward<GeometryT>(value));
264 return *this;
265 }
267
269
273 inline const Aws::String& GetId() const { return m_id; }
274 inline bool IdHasBeenSet() const { return m_idHasBeenSet; }
275 template <typename IdT = Aws::String>
276 void SetId(IdT&& value) {
277 m_idHasBeenSet = true;
278 m_id = std::forward<IdT>(value);
279 }
280 template <typename IdT = Aws::String>
281 Block& WithId(IdT&& value) {
282 SetId(std::forward<IdT>(value));
283 return *this;
284 }
286
288
295 inline const Aws::Vector<Relationship>& GetRelationships() const { return m_relationships; }
296 inline bool RelationshipsHasBeenSet() const { return m_relationshipsHasBeenSet; }
297 template <typename RelationshipsT = Aws::Vector<Relationship>>
298 void SetRelationships(RelationshipsT&& value) {
299 m_relationshipsHasBeenSet = true;
300 m_relationships = std::forward<RelationshipsT>(value);
301 }
302 template <typename RelationshipsT = Aws::Vector<Relationship>>
303 Block& WithRelationships(RelationshipsT&& value) {
304 SetRelationships(std::forward<RelationshipsT>(value));
305 return *this;
306 }
307 template <typename RelationshipsT = Relationship>
308 Block& AddRelationships(RelationshipsT&& value) {
309 m_relationshipsHasBeenSet = true;
310 m_relationships.emplace_back(std::forward<RelationshipsT>(value));
311 return *this;
312 }
314
316
336 inline const Aws::Vector<EntityType>& GetEntityTypes() const { return m_entityTypes; }
337 inline bool EntityTypesHasBeenSet() const { return m_entityTypesHasBeenSet; }
338 template <typename EntityTypesT = Aws::Vector<EntityType>>
339 void SetEntityTypes(EntityTypesT&& value) {
340 m_entityTypesHasBeenSet = true;
341 m_entityTypes = std::forward<EntityTypesT>(value);
342 }
343 template <typename EntityTypesT = Aws::Vector<EntityType>>
344 Block& WithEntityTypes(EntityTypesT&& value) {
345 SetEntityTypes(std::forward<EntityTypesT>(value));
346 return *this;
347 }
349 m_entityTypesHasBeenSet = true;
350 m_entityTypes.push_back(value);
351 return *this;
352 }
354
356
360 inline SelectionStatus GetSelectionStatus() const { return m_selectionStatus; }
361 inline bool SelectionStatusHasBeenSet() const { return m_selectionStatusHasBeenSet; }
363 m_selectionStatusHasBeenSet = true;
364 m_selectionStatus = value;
365 }
367 SetSelectionStatus(value);
368 return *this;
369 }
371
373
381 inline int GetPage() const { return m_page; }
382 inline bool PageHasBeenSet() const { return m_pageHasBeenSet; }
383 inline void SetPage(int value) {
384 m_pageHasBeenSet = true;
385 m_page = value;
386 }
387 inline Block& WithPage(int value) {
388 SetPage(value);
389 return *this;
390 }
392
394
397 inline const Query& GetQuery() const { return m_query; }
398 inline bool QueryHasBeenSet() const { return m_queryHasBeenSet; }
399 template <typename QueryT = Query>
400 void SetQuery(QueryT&& value) {
401 m_queryHasBeenSet = true;
402 m_query = std::forward<QueryT>(value);
403 }
404 template <typename QueryT = Query>
405 Block& WithQuery(QueryT&& value) {
406 SetQuery(std::forward<QueryT>(value));
407 return *this;
408 }
410 private:
411 BlockType m_blockType{BlockType::NOT_SET};
412
413 double m_confidence{0.0};
414
415 Aws::String m_text;
416
417 TextType m_textType{TextType::NOT_SET};
418
419 int m_rowIndex{0};
420
421 int m_columnIndex{0};
422
423 int m_rowSpan{0};
424
425 int m_columnSpan{0};
426
427 Geometry m_geometry;
428
429 Aws::String m_id;
430
431 Aws::Vector<Relationship> m_relationships;
432
433 Aws::Vector<EntityType> m_entityTypes;
434
435 SelectionStatus m_selectionStatus{SelectionStatus::NOT_SET};
436
437 int m_page{0};
438
439 Query m_query;
440 bool m_blockTypeHasBeenSet = false;
441 bool m_confidenceHasBeenSet = false;
442 bool m_textHasBeenSet = false;
443 bool m_textTypeHasBeenSet = false;
444 bool m_rowIndexHasBeenSet = false;
445 bool m_columnIndexHasBeenSet = false;
446 bool m_rowSpanHasBeenSet = false;
447 bool m_columnSpanHasBeenSet = false;
448 bool m_geometryHasBeenSet = false;
449 bool m_idHasBeenSet = false;
450 bool m_relationshipsHasBeenSet = false;
451 bool m_entityTypesHasBeenSet = false;
452 bool m_selectionStatusHasBeenSet = false;
453 bool m_pageHasBeenSet = false;
454 bool m_queryHasBeenSet = false;
455};
456
457} // namespace Model
458} // namespace Textract
459} // namespace Aws
AWS_TEXTRACT_API Block()=default
bool RelationshipsHasBeenSet() const
Definition Block.h:296
bool TextHasBeenSet() const
Definition Block.h:146
Block & WithRelationships(RelationshipsT &&value)
Definition Block.h:303
Block & WithGeometry(GeometryT &&value)
Definition Block.h:262
TextType GetTextType() const
Definition Block.h:164
Block & WithRowSpan(int value)
Definition Block.h:224
Block & WithText(TextT &&value)
Definition Block.h:153
bool PageHasBeenSet() const
Definition Block.h:382
Block & WithSelectionStatus(SelectionStatus value)
Definition Block.h:366
AWS_TEXTRACT_API Block & operator=(Aws::Utils::Json::JsonView jsonValue)
bool QueryHasBeenSet() const
Definition Block.h:398
Block & WithPage(int value)
Definition Block.h:387
const Aws::Vector< EntityType > & GetEntityTypes() const
Definition Block.h:336
int GetColumnIndex() const
Definition Block.h:200
bool ColumnIndexHasBeenSet() const
Definition Block.h:201
bool EntityTypesHasBeenSet() const
Definition Block.h:337
Block & WithColumnSpan(int value)
Definition Block.h:242
SelectionStatus GetSelectionStatus() const
Definition Block.h:360
int GetRowIndex() const
Definition Block.h:182
bool SelectionStatusHasBeenSet() const
Definition Block.h:361
void SetQuery(QueryT &&value)
Definition Block.h:400
Block & WithTextType(TextType value)
Definition Block.h:170
Block & WithQuery(QueryT &&value)
Definition Block.h:405
Block & WithId(IdT &&value)
Definition Block.h:281
void SetRowIndex(int value)
Definition Block.h:184
Block & WithColumnIndex(int value)
Definition Block.h:206
void SetRelationships(RelationshipsT &&value)
Definition Block.h:298
const Aws::Vector< Relationship > & GetRelationships() const
Definition Block.h:295
const Geometry & GetGeometry() const
Definition Block.h:254
AWS_TEXTRACT_API Aws::Utils::Json::JsonValue Jsonize() const
bool BlockTypeHasBeenSet() const
Definition Block.h:112
void SetGeometry(GeometryT &&value)
Definition Block.h:257
void SetColumnSpan(int value)
Definition Block.h:238
void SetBlockType(BlockType value)
Definition Block.h:113
bool RowIndexHasBeenSet() const
Definition Block.h:183
Block & WithEntityTypes(EntityTypesT &&value)
Definition Block.h:344
void SetEntityTypes(EntityTypesT &&value)
Definition Block.h:339
bool RowSpanHasBeenSet() const
Definition Block.h:219
bool GeometryHasBeenSet() const
Definition Block.h:255
void SetPage(int value)
Definition Block.h:383
bool ColumnSpanHasBeenSet() const
Definition Block.h:237
void SetRowSpan(int value)
Definition Block.h:220
Block & WithConfidence(double value)
Definition Block.h:135
Block & AddRelationships(RelationshipsT &&value)
Definition Block.h:308
BlockType GetBlockType() const
Definition Block.h:111
bool ConfidenceHasBeenSet() const
Definition Block.h:130
void SetText(TextT &&value)
Definition Block.h:148
Block & WithBlockType(BlockType value)
Definition Block.h:117
void SetConfidence(double value)
Definition Block.h:131
void SetColumnIndex(int value)
Definition Block.h:202
Block & WithRowIndex(int value)
Definition Block.h:188
void SetTextType(TextType value)
Definition Block.h:166
const Aws::String & GetText() const
Definition Block.h:145
AWS_TEXTRACT_API Block(Aws::Utils::Json::JsonView jsonValue)
const Aws::String & GetId() const
Definition Block.h:273
double GetConfidence() const
Definition Block.h:129
bool TextTypeHasBeenSet() const
Definition Block.h:165
void SetSelectionStatus(SelectionStatus value)
Definition Block.h:362
void SetId(IdT &&value)
Definition Block.h:276
int GetColumnSpan() const
Definition Block.h:236
bool IdHasBeenSet() const
Definition Block.h:274
const Query & GetQuery() const
Definition Block.h:397
Block & AddEntityTypes(EntityType value)
Definition Block.h:348
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue