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/comprehend/Comprehend_EXPORTS.h>
8#include <aws/comprehend/model/BlockType.h>
9#include <aws/comprehend/model/Geometry.h>
10#include <aws/comprehend/model/RelationshipsListItem.h>
11#include <aws/core/utils/memory/stl/AWSString.h>
12#include <aws/core/utils/memory/stl/AWSVector.h>
13
14#include <utility>
15
16namespace Aws {
17namespace Utils {
18namespace Json {
19class JsonValue;
20class JsonView;
21} // namespace Json
22} // namespace Utils
23namespace Comprehend {
24namespace Model {
25
34class Block {
35 public:
36 AWS_COMPREHEND_API Block() = default;
37 AWS_COMPREHEND_API Block(Aws::Utils::Json::JsonView jsonValue);
38 AWS_COMPREHEND_API Block& operator=(Aws::Utils::Json::JsonView jsonValue);
39 AWS_COMPREHEND_API Aws::Utils::Json::JsonValue Jsonize() const;
40
42
45 inline const Aws::String& GetId() const { return m_id; }
46 inline bool IdHasBeenSet() const { return m_idHasBeenSet; }
47 template <typename IdT = Aws::String>
48 void SetId(IdT&& value) {
49 m_idHasBeenSet = true;
50 m_id = std::forward<IdT>(value);
51 }
52 template <typename IdT = Aws::String>
53 Block& WithId(IdT&& value) {
54 SetId(std::forward<IdT>(value));
55 return *this;
56 }
58
60
67 inline BlockType GetBlockType() const { return m_blockType; }
68 inline bool BlockTypeHasBeenSet() const { return m_blockTypeHasBeenSet; }
69 inline void SetBlockType(BlockType value) {
70 m_blockTypeHasBeenSet = true;
71 m_blockType = value;
72 }
73 inline Block& WithBlockType(BlockType value) {
74 SetBlockType(value);
75 return *this;
76 }
78
80
83 inline const Aws::String& GetText() const { return m_text; }
84 inline bool TextHasBeenSet() const { return m_textHasBeenSet; }
85 template <typename TextT = Aws::String>
86 void SetText(TextT&& value) {
87 m_textHasBeenSet = true;
88 m_text = std::forward<TextT>(value);
89 }
90 template <typename TextT = Aws::String>
91 Block& WithText(TextT&& value) {
92 SetText(std::forward<TextT>(value));
93 return *this;
94 }
96
98
101 inline int GetPage() const { return m_page; }
102 inline bool PageHasBeenSet() const { return m_pageHasBeenSet; }
103 inline void SetPage(int value) {
104 m_pageHasBeenSet = true;
105 m_page = value;
106 }
107 inline Block& WithPage(int value) {
108 SetPage(value);
109 return *this;
110 }
112
114
117 inline const Geometry& GetGeometry() const { return m_geometry; }
118 inline bool GeometryHasBeenSet() const { return m_geometryHasBeenSet; }
119 template <typename GeometryT = Geometry>
120 void SetGeometry(GeometryT&& value) {
121 m_geometryHasBeenSet = true;
122 m_geometry = std::forward<GeometryT>(value);
123 }
124 template <typename GeometryT = Geometry>
125 Block& WithGeometry(GeometryT&& value) {
126 SetGeometry(std::forward<GeometryT>(value));
127 return *this;
128 }
130
132
136 inline const Aws::Vector<RelationshipsListItem>& GetRelationships() const { return m_relationships; }
137 inline bool RelationshipsHasBeenSet() const { return m_relationshipsHasBeenSet; }
138 template <typename RelationshipsT = Aws::Vector<RelationshipsListItem>>
139 void SetRelationships(RelationshipsT&& value) {
140 m_relationshipsHasBeenSet = true;
141 m_relationships = std::forward<RelationshipsT>(value);
142 }
143 template <typename RelationshipsT = Aws::Vector<RelationshipsListItem>>
144 Block& WithRelationships(RelationshipsT&& value) {
145 SetRelationships(std::forward<RelationshipsT>(value));
146 return *this;
147 }
148 template <typename RelationshipsT = RelationshipsListItem>
149 Block& AddRelationships(RelationshipsT&& value) {
150 m_relationshipsHasBeenSet = true;
151 m_relationships.emplace_back(std::forward<RelationshipsT>(value));
152 return *this;
153 }
155 private:
156 Aws::String m_id;
157
158 BlockType m_blockType{BlockType::NOT_SET};
159
160 Aws::String m_text;
161
162 int m_page{0};
163
164 Geometry m_geometry;
165
167 bool m_idHasBeenSet = false;
168 bool m_blockTypeHasBeenSet = false;
169 bool m_textHasBeenSet = false;
170 bool m_pageHasBeenSet = false;
171 bool m_geometryHasBeenSet = false;
172 bool m_relationshipsHasBeenSet = false;
173};
174
175} // namespace Model
176} // namespace Comprehend
177} // namespace Aws
bool PageHasBeenSet() const
Definition Block.h:102
void SetText(TextT &&value)
Definition Block.h:86
void SetId(IdT &&value)
Definition Block.h:48
BlockType GetBlockType() const
Definition Block.h:67
Block & WithText(TextT &&value)
Definition Block.h:91
bool TextHasBeenSet() const
Definition Block.h:84
bool RelationshipsHasBeenSet() const
Definition Block.h:137
bool IdHasBeenSet() const
Definition Block.h:46
AWS_COMPREHEND_API Block & operator=(Aws::Utils::Json::JsonView jsonValue)
void SetGeometry(GeometryT &&value)
Definition Block.h:120
const Aws::String & GetId() const
Definition Block.h:45
AWS_COMPREHEND_API Aws::Utils::Json::JsonValue Jsonize() const
void SetRelationships(RelationshipsT &&value)
Definition Block.h:139
bool BlockTypeHasBeenSet() const
Definition Block.h:68
AWS_COMPREHEND_API Block()=default
Block & WithGeometry(GeometryT &&value)
Definition Block.h:125
void SetPage(int value)
Definition Block.h:103
const Aws::String & GetText() const
Definition Block.h:83
Block & WithRelationships(RelationshipsT &&value)
Definition Block.h:144
const Aws::Vector< RelationshipsListItem > & GetRelationships() const
Definition Block.h:136
bool GeometryHasBeenSet() const
Definition Block.h:118
AWS_COMPREHEND_API Block(Aws::Utils::Json::JsonView jsonValue)
const Geometry & GetGeometry() const
Definition Block.h:117
void SetBlockType(BlockType value)
Definition Block.h:69
Block & WithPage(int value)
Definition Block.h:107
Block & WithId(IdT &&value)
Definition Block.h:53
Block & WithBlockType(BlockType value)
Definition Block.h:73
Block & AddRelationships(RelationshipsT &&value)
Definition Block.h:149
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue