AWS SDK for C++

AWS SDK for C++ Version 1.11.719

Loading...
Searching...
No Matches
AlarmContributor.h
1
6#pragma once
7#include <aws/core/utils/DateTime.h>
8#include <aws/core/utils/memory/stl/AWSMap.h>
9#include <aws/core/utils/memory/stl/AWSString.h>
10#include <aws/crt/cbor/Cbor.h>
11#include <aws/monitoring/CloudWatch_EXPORTS.h>
12
13#include <utility>
14
15namespace Aws {
16namespace Utils {
17namespace Cbor {
18class CborValue;
19} // namespace Cbor
20} // namespace Utils
21namespace CloudWatch {
22namespace Model {
23
32 public:
33 AWS_CLOUDWATCH_API AlarmContributor() = default;
34 AWS_CLOUDWATCH_API AlarmContributor(const std::shared_ptr<Aws::Crt::Cbor::CborDecoder>& decoder);
35 AWS_CLOUDWATCH_API AlarmContributor& operator=(const std::shared_ptr<Aws::Crt::Cbor::CborDecoder>& decoder);
36 AWS_CLOUDWATCH_API void CborEncode(Aws::Crt::Cbor::CborEncoder& encoder) const;
37
39
42 inline const Aws::String& GetContributorId() const { return m_contributorId; }
43 inline bool ContributorIdHasBeenSet() const { return m_contributorIdHasBeenSet; }
44 template <typename ContributorIdT = Aws::String>
45 void SetContributorId(ContributorIdT&& value) {
46 m_contributorIdHasBeenSet = true;
47 m_contributorId = std::forward<ContributorIdT>(value);
48 }
49 template <typename ContributorIdT = Aws::String>
50 AlarmContributor& WithContributorId(ContributorIdT&& value) {
51 SetContributorId(std::forward<ContributorIdT>(value));
52 return *this;
53 }
55
57
61 inline const Aws::Map<Aws::String, Aws::String>& GetContributorAttributes() const { return m_contributorAttributes; }
62 inline bool ContributorAttributesHasBeenSet() const { return m_contributorAttributesHasBeenSet; }
63 template <typename ContributorAttributesT = Aws::Map<Aws::String, Aws::String>>
64 void SetContributorAttributes(ContributorAttributesT&& value) {
65 m_contributorAttributesHasBeenSet = true;
66 m_contributorAttributes = std::forward<ContributorAttributesT>(value);
67 }
68 template <typename ContributorAttributesT = Aws::Map<Aws::String, Aws::String>>
69 AlarmContributor& WithContributorAttributes(ContributorAttributesT&& value) {
70 SetContributorAttributes(std::forward<ContributorAttributesT>(value));
71 return *this;
72 }
73 template <typename ContributorAttributesKeyT = Aws::String, typename ContributorAttributesValueT = Aws::String>
74 AlarmContributor& AddContributorAttributes(ContributorAttributesKeyT&& key, ContributorAttributesValueT&& value) {
75 m_contributorAttributesHasBeenSet = true;
76 m_contributorAttributes.emplace(std::forward<ContributorAttributesKeyT>(key), std::forward<ContributorAttributesValueT>(value));
77 return *this;
78 }
80
82
86 inline const Aws::String& GetStateReason() const { return m_stateReason; }
87 inline bool StateReasonHasBeenSet() const { return m_stateReasonHasBeenSet; }
88 template <typename StateReasonT = Aws::String>
89 void SetStateReason(StateReasonT&& value) {
90 m_stateReasonHasBeenSet = true;
91 m_stateReason = std::forward<StateReasonT>(value);
92 }
93 template <typename StateReasonT = Aws::String>
94 AlarmContributor& WithStateReason(StateReasonT&& value) {
95 SetStateReason(std::forward<StateReasonT>(value));
96 return *this;
97 }
99
101
105 inline const Aws::Utils::DateTime& GetStateTransitionedTimestamp() const { return m_stateTransitionedTimestamp; }
106 inline bool StateTransitionedTimestampHasBeenSet() const { return m_stateTransitionedTimestampHasBeenSet; }
107 template <typename StateTransitionedTimestampT = Aws::Utils::DateTime>
108 void SetStateTransitionedTimestamp(StateTransitionedTimestampT&& value) {
109 m_stateTransitionedTimestampHasBeenSet = true;
110 m_stateTransitionedTimestamp = std::forward<StateTransitionedTimestampT>(value);
111 }
112 template <typename StateTransitionedTimestampT = Aws::Utils::DateTime>
113 AlarmContributor& WithStateTransitionedTimestamp(StateTransitionedTimestampT&& value) {
114 SetStateTransitionedTimestamp(std::forward<StateTransitionedTimestampT>(value));
115 return *this;
116 }
118 private:
119 Aws::String m_contributorId;
120
121 Aws::Map<Aws::String, Aws::String> m_contributorAttributes;
122
123 Aws::String m_stateReason;
124
125 Aws::Utils::DateTime m_stateTransitionedTimestamp{};
126 bool m_contributorIdHasBeenSet = false;
127 bool m_contributorAttributesHasBeenSet = false;
128 bool m_stateReasonHasBeenSet = false;
129 bool m_stateTransitionedTimestampHasBeenSet = false;
130};
131
132} // namespace Model
133} // namespace CloudWatch
134} // namespace Aws
AWS_CLOUDWATCH_API void CborEncode(Aws::Crt::Cbor::CborEncoder &encoder) const
const Aws::String & GetContributorId() const
AWS_CLOUDWATCH_API AlarmContributor & operator=(const std::shared_ptr< Aws::Crt::Cbor::CborDecoder > &decoder)
AWS_CLOUDWATCH_API AlarmContributor()=default
const Aws::Utils::DateTime & GetStateTransitionedTimestamp() const
AlarmContributor & WithStateReason(StateReasonT &&value)
AlarmContributor & AddContributorAttributes(ContributorAttributesKeyT &&key, ContributorAttributesValueT &&value)
void SetContributorId(ContributorIdT &&value)
AlarmContributor & WithStateTransitionedTimestamp(StateTransitionedTimestampT &&value)
void SetStateReason(StateReasonT &&value)
void SetContributorAttributes(ContributorAttributesT &&value)
AlarmContributor & WithContributorId(ContributorIdT &&value)
const Aws::Map< Aws::String, Aws::String > & GetContributorAttributes() const
void SetStateTransitionedTimestamp(StateTransitionedTimestampT &&value)
AWS_CLOUDWATCH_API AlarmContributor(const std::shared_ptr< Aws::Crt::Cbor::CborDecoder > &decoder)
AlarmContributor & WithContributorAttributes(ContributorAttributesT &&value)
const Aws::String & GetStateReason() const
std::map< K, V, std::less< K >, Aws::Allocator< std::pair< const K, V > > > Map
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String