AWS SDK for C++

AWS SDK for C++ Version 1.11.874

Loading...
Searching...
No Matches
Geometry.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSVector.h>
8#include <aws/textract/Textract_EXPORTS.h>
9#include <aws/textract/model/BoundingBox.h>
10#include <aws/textract/model/Point.h>
11
12#include <utility>
13
14namespace Aws {
15namespace Utils {
16namespace Json {
17class JsonValue;
18class JsonView;
19} // namespace Json
20} // namespace Utils
21namespace Textract {
22namespace Model {
23
31class Geometry {
32 public:
33 AWS_TEXTRACT_API Geometry() = default;
34 AWS_TEXTRACT_API Geometry(Aws::Utils::Json::JsonView jsonValue);
35 AWS_TEXTRACT_API Geometry& operator=(Aws::Utils::Json::JsonView jsonValue);
36 AWS_TEXTRACT_API Aws::Utils::Json::JsonValue Jsonize() const;
37
39
43 inline const BoundingBox& GetBoundingBox() const { return m_boundingBox; }
44 inline bool BoundingBoxHasBeenSet() const { return m_boundingBoxHasBeenSet; }
45 template <typename BoundingBoxT = BoundingBox>
46 void SetBoundingBox(BoundingBoxT&& value) {
47 m_boundingBoxHasBeenSet = true;
48 m_boundingBox = std::forward<BoundingBoxT>(value);
49 }
50 template <typename BoundingBoxT = BoundingBox>
51 Geometry& WithBoundingBox(BoundingBoxT&& value) {
52 SetBoundingBox(std::forward<BoundingBoxT>(value));
53 return *this;
54 }
56
58
62 inline const Aws::Vector<Point>& GetPolygon() const { return m_polygon; }
63 inline bool PolygonHasBeenSet() const { return m_polygonHasBeenSet; }
64 template <typename PolygonT = Aws::Vector<Point>>
65 void SetPolygon(PolygonT&& value) {
66 m_polygonHasBeenSet = true;
67 m_polygon = std::forward<PolygonT>(value);
68 }
69 template <typename PolygonT = Aws::Vector<Point>>
70 Geometry& WithPolygon(PolygonT&& value) {
71 SetPolygon(std::forward<PolygonT>(value));
72 return *this;
73 }
74 template <typename PolygonT = Point>
75 Geometry& AddPolygon(PolygonT&& value) {
76 m_polygonHasBeenSet = true;
77 m_polygon.emplace_back(std::forward<PolygonT>(value));
78 return *this;
79 }
81
83
87 inline double GetRotationAngle() const { return m_rotationAngle; }
88 inline bool RotationAngleHasBeenSet() const { return m_rotationAngleHasBeenSet; }
89 inline void SetRotationAngle(double value) {
90 m_rotationAngleHasBeenSet = true;
91 m_rotationAngle = value;
92 }
93 inline Geometry& WithRotationAngle(double value) {
94 SetRotationAngle(value);
95 return *this;
96 }
98 private:
99 BoundingBox m_boundingBox;
100
101 Aws::Vector<Point> m_polygon;
102
103 double m_rotationAngle{0.0};
104 bool m_boundingBoxHasBeenSet = false;
105 bool m_polygonHasBeenSet = false;
106 bool m_rotationAngleHasBeenSet = false;
107};
108
109} // namespace Model
110} // namespace Textract
111} // namespace Aws
Geometry & WithRotationAngle(double value)
Definition Geometry.h:93
Geometry & WithPolygon(PolygonT &&value)
Definition Geometry.h:70
const BoundingBox & GetBoundingBox() const
Definition Geometry.h:43
bool RotationAngleHasBeenSet() const
Definition Geometry.h:88
AWS_TEXTRACT_API Aws::Utils::Json::JsonValue Jsonize() const
bool BoundingBoxHasBeenSet() const
Definition Geometry.h:44
Geometry & AddPolygon(PolygonT &&value)
Definition Geometry.h:75
AWS_TEXTRACT_API Geometry(Aws::Utils::Json::JsonView jsonValue)
void SetRotationAngle(double value)
Definition Geometry.h:89
AWS_TEXTRACT_API Geometry & operator=(Aws::Utils::Json::JsonView jsonValue)
void SetBoundingBox(BoundingBoxT &&value)
Definition Geometry.h:46
void SetPolygon(PolygonT &&value)
Definition Geometry.h:65
double GetRotationAngle() const
Definition Geometry.h:87
Geometry & WithBoundingBox(BoundingBoxT &&value)
Definition Geometry.h:51
const Aws::Vector< Point > & GetPolygon() const
Definition Geometry.h:62
AWS_TEXTRACT_API Geometry()=default
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue