AWS SDK for C++

AWS SDK for C++ Version 1.11.945

Loading...
Searching...
No Matches
Geometry.h
1
6#pragma once
7#include <aws/comprehend/Comprehend_EXPORTS.h>
8#include <aws/comprehend/model/BoundingBox.h>
9#include <aws/comprehend/model/Point.h>
10#include <aws/core/utils/memory/stl/AWSVector.h>
11#include <aws/crt/cbor/Cbor.h>
12
13#include <utility>
14
15namespace Aws {
16namespace Utils {
17namespace Cbor {
18class CborValue;
19} // namespace Cbor
20} // namespace Utils
21namespace Comprehend {
22namespace Model {
23
32class Geometry {
33 public:
34 AWS_COMPREHEND_API Geometry() = default;
35 AWS_COMPREHEND_API Geometry(const std::shared_ptr<Aws::Crt::Cbor::CborDecoder>& decoder);
36 AWS_COMPREHEND_API Geometry& operator=(const std::shared_ptr<Aws::Crt::Cbor::CborDecoder>& decoder);
37 AWS_COMPREHEND_API void CborEncode(Aws::Crt::Cbor::CborEncoder& encoder) const;
38
40
44 inline const BoundingBox& GetBoundingBox() const { return m_boundingBox; }
45 inline bool BoundingBoxHasBeenSet() const { return m_boundingBoxHasBeenSet; }
46 template <typename BoundingBoxT = BoundingBox>
47 void SetBoundingBox(BoundingBoxT&& value) {
48 m_boundingBoxHasBeenSet = true;
49 m_boundingBox = std::forward<BoundingBoxT>(value);
50 }
51 template <typename BoundingBoxT = BoundingBox>
52 Geometry& WithBoundingBox(BoundingBoxT&& value) {
53 SetBoundingBox(std::forward<BoundingBoxT>(value));
54 return *this;
55 }
57
59
63 inline const Aws::Vector<Point>& GetPolygon() const { return m_polygon; }
64 inline bool PolygonHasBeenSet() const { return m_polygonHasBeenSet; }
65 template <typename PolygonT = Aws::Vector<Point>>
66 void SetPolygon(PolygonT&& value) {
67 m_polygonHasBeenSet = true;
68 m_polygon = std::forward<PolygonT>(value);
69 }
70 template <typename PolygonT = Aws::Vector<Point>>
71 Geometry& WithPolygon(PolygonT&& value) {
72 SetPolygon(std::forward<PolygonT>(value));
73 return *this;
74 }
75 template <typename PolygonT = Point>
76 Geometry& AddPolygon(PolygonT&& value) {
77 m_polygonHasBeenSet = true;
78 m_polygon.emplace_back(std::forward<PolygonT>(value));
79 return *this;
80 }
82 private:
83 BoundingBox m_boundingBox;
84
85 Aws::Vector<Point> m_polygon;
86 bool m_boundingBoxHasBeenSet = false;
87 bool m_polygonHasBeenSet = false;
88};
89
90} // namespace Model
91} // namespace Comprehend
92} // namespace Aws
AWS_COMPREHEND_API Geometry(const std::shared_ptr< Aws::Crt::Cbor::CborDecoder > &decoder)
const BoundingBox & GetBoundingBox() const
Definition Geometry.h:44
AWS_COMPREHEND_API Geometry & operator=(const std::shared_ptr< Aws::Crt::Cbor::CborDecoder > &decoder)
Geometry & AddPolygon(PolygonT &&value)
Definition Geometry.h:76
void SetBoundingBox(BoundingBoxT &&value)
Definition Geometry.h:47
Geometry & WithPolygon(PolygonT &&value)
Definition Geometry.h:71
AWS_COMPREHEND_API Geometry()=default
void SetPolygon(PolygonT &&value)
Definition Geometry.h:66
Geometry & WithBoundingBox(BoundingBoxT &&value)
Definition Geometry.h:52
const Aws::Vector< Point > & GetPolygon() const
Definition Geometry.h:63
AWS_COMPREHEND_API void CborEncode(Aws::Crt::Cbor::CborEncoder &encoder) const
std::vector< T, Aws::Allocator< T > > Vector