AWS SDK for C++

AWS SDK for C++ Version 1.11.719

Loading...
Searching...
No Matches
Entity.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSMap.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/crt/cbor/Cbor.h>
10#include <aws/monitoring/CloudWatch_EXPORTS.h>
11
12#include <utility>
13
14namespace Aws {
15namespace Utils {
16namespace Cbor {
17class CborValue;
18} // namespace Cbor
19} // namespace Utils
20namespace CloudWatch {
21namespace Model {
22
32class Entity {
33 public:
34 AWS_CLOUDWATCH_API Entity() = default;
35 AWS_CLOUDWATCH_API Entity(const std::shared_ptr<Aws::Crt::Cbor::CborDecoder>& decoder);
36 AWS_CLOUDWATCH_API Entity& operator=(const std::shared_ptr<Aws::Crt::Cbor::CborDecoder>& decoder);
37 AWS_CLOUDWATCH_API void CborEncode(Aws::Crt::Cbor::CborEncoder& encoder) const;
38
40
53 inline const Aws::Map<Aws::String, Aws::String>& GetKeyAttributes() const { return m_keyAttributes; }
54 inline bool KeyAttributesHasBeenSet() const { return m_keyAttributesHasBeenSet; }
55 template <typename KeyAttributesT = Aws::Map<Aws::String, Aws::String>>
56 void SetKeyAttributes(KeyAttributesT&& value) {
57 m_keyAttributesHasBeenSet = true;
58 m_keyAttributes = std::forward<KeyAttributesT>(value);
59 }
60 template <typename KeyAttributesT = Aws::Map<Aws::String, Aws::String>>
61 Entity& WithKeyAttributes(KeyAttributesT&& value) {
62 SetKeyAttributes(std::forward<KeyAttributesT>(value));
63 return *this;
64 }
65 template <typename KeyAttributesKeyT = Aws::String, typename KeyAttributesValueT = Aws::String>
66 Entity& AddKeyAttributes(KeyAttributesKeyT&& key, KeyAttributesValueT&& value) {
67 m_keyAttributesHasBeenSet = true;
68 m_keyAttributes.emplace(std::forward<KeyAttributesKeyT>(key), std::forward<KeyAttributesValueT>(value));
69 return *this;
70 }
72
74
82 inline const Aws::Map<Aws::String, Aws::String>& GetAttributes() const { return m_attributes; }
83 inline bool AttributesHasBeenSet() const { return m_attributesHasBeenSet; }
84 template <typename AttributesT = Aws::Map<Aws::String, Aws::String>>
85 void SetAttributes(AttributesT&& value) {
86 m_attributesHasBeenSet = true;
87 m_attributes = std::forward<AttributesT>(value);
88 }
89 template <typename AttributesT = Aws::Map<Aws::String, Aws::String>>
90 Entity& WithAttributes(AttributesT&& value) {
91 SetAttributes(std::forward<AttributesT>(value));
92 return *this;
93 }
94 template <typename AttributesKeyT = Aws::String, typename AttributesValueT = Aws::String>
95 Entity& AddAttributes(AttributesKeyT&& key, AttributesValueT&& value) {
96 m_attributesHasBeenSet = true;
97 m_attributes.emplace(std::forward<AttributesKeyT>(key), std::forward<AttributesValueT>(value));
98 return *this;
99 }
101 private:
103
105 bool m_keyAttributesHasBeenSet = false;
106 bool m_attributesHasBeenSet = false;
107};
108
109} // namespace Model
110} // namespace CloudWatch
111} // namespace Aws
Entity & AddAttributes(AttributesKeyT &&key, AttributesValueT &&value)
Definition Entity.h:95
Entity & WithKeyAttributes(KeyAttributesT &&value)
Definition Entity.h:61
bool KeyAttributesHasBeenSet() const
Definition Entity.h:54
AWS_CLOUDWATCH_API Entity & operator=(const std::shared_ptr< Aws::Crt::Cbor::CborDecoder > &decoder)
void SetKeyAttributes(KeyAttributesT &&value)
Definition Entity.h:56
const Aws::Map< Aws::String, Aws::String > & GetKeyAttributes() const
Definition Entity.h:53
bool AttributesHasBeenSet() const
Definition Entity.h:83
void SetAttributes(AttributesT &&value)
Definition Entity.h:85
AWS_CLOUDWATCH_API Entity()=default
AWS_CLOUDWATCH_API Entity(const std::shared_ptr< Aws::Crt::Cbor::CborDecoder > &decoder)
const Aws::Map< Aws::String, Aws::String > & GetAttributes() const
Definition Entity.h:82
AWS_CLOUDWATCH_API void CborEncode(Aws::Crt::Cbor::CborEncoder &encoder) const
Entity & WithAttributes(AttributesT &&value)
Definition Entity.h:90
Entity & AddKeyAttributes(KeyAttributesKeyT &&key, KeyAttributesValueT &&value)
Definition Entity.h:66
std::map< K, V, std::less< K >, Aws::Allocator< std::pair< const K, V > > > Map