AWS SDK for C++

AWS SDK for C++ Version 1.11.718

Loading...
Searching...
No Matches
Geometry.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSVector.h>
8#include <aws/rekognition/Rekognition_EXPORTS.h>
9#include <aws/rekognition/model/BoundingBox.h>
10#include <aws/rekognition/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 Rekognition {
22namespace Model {
23
30class Geometry {
31 public:
32 AWS_REKOGNITION_API Geometry() = default;
33 AWS_REKOGNITION_API Geometry(Aws::Utils::Json::JsonView jsonValue);
34 AWS_REKOGNITION_API Geometry& operator=(Aws::Utils::Json::JsonView jsonValue);
35 AWS_REKOGNITION_API Aws::Utils::Json::JsonValue Jsonize() const;
36
38
42 inline const BoundingBox& GetBoundingBox() const { return m_boundingBox; }
43 inline bool BoundingBoxHasBeenSet() const { return m_boundingBoxHasBeenSet; }
44 template <typename BoundingBoxT = BoundingBox>
45 void SetBoundingBox(BoundingBoxT&& value) {
46 m_boundingBoxHasBeenSet = true;
47 m_boundingBox = std::forward<BoundingBoxT>(value);
48 }
49 template <typename BoundingBoxT = BoundingBox>
50 Geometry& WithBoundingBox(BoundingBoxT&& value) {
51 SetBoundingBox(std::forward<BoundingBoxT>(value));
52 return *this;
53 }
55
57
60 inline const Aws::Vector<Point>& GetPolygon() const { return m_polygon; }
61 inline bool PolygonHasBeenSet() const { return m_polygonHasBeenSet; }
62 template <typename PolygonT = Aws::Vector<Point>>
63 void SetPolygon(PolygonT&& value) {
64 m_polygonHasBeenSet = true;
65 m_polygon = std::forward<PolygonT>(value);
66 }
67 template <typename PolygonT = Aws::Vector<Point>>
68 Geometry& WithPolygon(PolygonT&& value) {
69 SetPolygon(std::forward<PolygonT>(value));
70 return *this;
71 }
72 template <typename PolygonT = Point>
73 Geometry& AddPolygon(PolygonT&& value) {
74 m_polygonHasBeenSet = true;
75 m_polygon.emplace_back(std::forward<PolygonT>(value));
76 return *this;
77 }
79 private:
80 BoundingBox m_boundingBox;
81
82 Aws::Vector<Point> m_polygon;
83 bool m_boundingBoxHasBeenSet = false;
84 bool m_polygonHasBeenSet = false;
85};
86
87} // namespace Model
88} // namespace Rekognition
89} // namespace Aws
AWS_REKOGNITION_API Geometry & operator=(Aws::Utils::Json::JsonView jsonValue)
Geometry & WithPolygon(PolygonT &&value)
Definition Geometry.h:68
const BoundingBox & GetBoundingBox() const
Definition Geometry.h:42
AWS_REKOGNITION_API Aws::Utils::Json::JsonValue Jsonize() const
AWS_REKOGNITION_API Geometry(Aws::Utils::Json::JsonView jsonValue)
void SetPolygon(PolygonT &&value)
Definition Geometry.h:63
Geometry & WithBoundingBox(BoundingBoxT &&value)
Definition Geometry.h:50
AWS_REKOGNITION_API Geometry()=default
void SetBoundingBox(BoundingBoxT &&value)
Definition Geometry.h:45
Geometry & AddPolygon(PolygonT &&value)
Definition Geometry.h:73
const Aws::Vector< Point > & GetPolygon() const
Definition Geometry.h:60
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue