AWS SDK for C++

AWS SDK for C++ Version 1.11.719

Loading...
Searching...
No Matches
AlarmHistoryItem.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#include <aws/monitoring/model/AlarmType.h>
13#include <aws/monitoring/model/HistoryItemType.h>
14
15#include <utility>
16
17namespace Aws {
18namespace Utils {
19namespace Cbor {
20class CborValue;
21} // namespace Cbor
22} // namespace Utils
23namespace CloudWatch {
24namespace Model {
25
32 public:
33 AWS_CLOUDWATCH_API AlarmHistoryItem() = default;
34 AWS_CLOUDWATCH_API AlarmHistoryItem(const std::shared_ptr<Aws::Crt::Cbor::CborDecoder>& decoder);
35 AWS_CLOUDWATCH_API AlarmHistoryItem& 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& GetAlarmName() const { return m_alarmName; }
43 inline bool AlarmNameHasBeenSet() const { return m_alarmNameHasBeenSet; }
44 template <typename AlarmNameT = Aws::String>
45 void SetAlarmName(AlarmNameT&& value) {
46 m_alarmNameHasBeenSet = true;
47 m_alarmName = std::forward<AlarmNameT>(value);
48 }
49 template <typename AlarmNameT = Aws::String>
50 AlarmHistoryItem& WithAlarmName(AlarmNameT&& value) {
51 SetAlarmName(std::forward<AlarmNameT>(value));
52 return *this;
53 }
55
57
61 inline const Aws::String& GetAlarmContributorId() const { return m_alarmContributorId; }
62 inline bool AlarmContributorIdHasBeenSet() const { return m_alarmContributorIdHasBeenSet; }
63 template <typename AlarmContributorIdT = Aws::String>
64 void SetAlarmContributorId(AlarmContributorIdT&& value) {
65 m_alarmContributorIdHasBeenSet = true;
66 m_alarmContributorId = std::forward<AlarmContributorIdT>(value);
67 }
68 template <typename AlarmContributorIdT = Aws::String>
69 AlarmHistoryItem& WithAlarmContributorId(AlarmContributorIdT&& value) {
70 SetAlarmContributorId(std::forward<AlarmContributorIdT>(value));
71 return *this;
72 }
74
76
79 inline AlarmType GetAlarmType() const { return m_alarmType; }
80 inline bool AlarmTypeHasBeenSet() const { return m_alarmTypeHasBeenSet; }
81 inline void SetAlarmType(AlarmType value) {
82 m_alarmTypeHasBeenSet = true;
83 m_alarmType = value;
84 }
86 SetAlarmType(value);
87 return *this;
88 }
90
92
95 inline const Aws::Utils::DateTime& GetTimestamp() const { return m_timestamp; }
96 inline bool TimestampHasBeenSet() const { return m_timestampHasBeenSet; }
97 template <typename TimestampT = Aws::Utils::DateTime>
98 void SetTimestamp(TimestampT&& value) {
99 m_timestampHasBeenSet = true;
100 m_timestamp = std::forward<TimestampT>(value);
101 }
102 template <typename TimestampT = Aws::Utils::DateTime>
103 AlarmHistoryItem& WithTimestamp(TimestampT&& value) {
104 SetTimestamp(std::forward<TimestampT>(value));
105 return *this;
106 }
108
110
113 inline HistoryItemType GetHistoryItemType() const { return m_historyItemType; }
114 inline bool HistoryItemTypeHasBeenSet() const { return m_historyItemTypeHasBeenSet; }
116 m_historyItemTypeHasBeenSet = true;
117 m_historyItemType = value;
118 }
120 SetHistoryItemType(value);
121 return *this;
122 }
124
126
129 inline const Aws::String& GetHistorySummary() const { return m_historySummary; }
130 inline bool HistorySummaryHasBeenSet() const { return m_historySummaryHasBeenSet; }
131 template <typename HistorySummaryT = Aws::String>
132 void SetHistorySummary(HistorySummaryT&& value) {
133 m_historySummaryHasBeenSet = true;
134 m_historySummary = std::forward<HistorySummaryT>(value);
135 }
136 template <typename HistorySummaryT = Aws::String>
137 AlarmHistoryItem& WithHistorySummary(HistorySummaryT&& value) {
138 SetHistorySummary(std::forward<HistorySummaryT>(value));
139 return *this;
140 }
142
144
147 inline const Aws::String& GetHistoryData() const { return m_historyData; }
148 inline bool HistoryDataHasBeenSet() const { return m_historyDataHasBeenSet; }
149 template <typename HistoryDataT = Aws::String>
150 void SetHistoryData(HistoryDataT&& value) {
151 m_historyDataHasBeenSet = true;
152 m_historyData = std::forward<HistoryDataT>(value);
153 }
154 template <typename HistoryDataT = Aws::String>
155 AlarmHistoryItem& WithHistoryData(HistoryDataT&& value) {
156 SetHistoryData(std::forward<HistoryDataT>(value));
157 return *this;
158 }
160
162
167 inline const Aws::Map<Aws::String, Aws::String>& GetAlarmContributorAttributes() const { return m_alarmContributorAttributes; }
168 inline bool AlarmContributorAttributesHasBeenSet() const { return m_alarmContributorAttributesHasBeenSet; }
169 template <typename AlarmContributorAttributesT = Aws::Map<Aws::String, Aws::String>>
170 void SetAlarmContributorAttributes(AlarmContributorAttributesT&& value) {
171 m_alarmContributorAttributesHasBeenSet = true;
172 m_alarmContributorAttributes = std::forward<AlarmContributorAttributesT>(value);
173 }
174 template <typename AlarmContributorAttributesT = Aws::Map<Aws::String, Aws::String>>
175 AlarmHistoryItem& WithAlarmContributorAttributes(AlarmContributorAttributesT&& value) {
176 SetAlarmContributorAttributes(std::forward<AlarmContributorAttributesT>(value));
177 return *this;
178 }
179 template <typename AlarmContributorAttributesKeyT = Aws::String, typename AlarmContributorAttributesValueT = Aws::String>
180 AlarmHistoryItem& AddAlarmContributorAttributes(AlarmContributorAttributesKeyT&& key, AlarmContributorAttributesValueT&& value) {
181 m_alarmContributorAttributesHasBeenSet = true;
182 m_alarmContributorAttributes.emplace(std::forward<AlarmContributorAttributesKeyT>(key),
183 std::forward<AlarmContributorAttributesValueT>(value));
184 return *this;
185 }
187 private:
188 Aws::String m_alarmName;
189
190 Aws::String m_alarmContributorId;
191
192 AlarmType m_alarmType{AlarmType::NOT_SET};
193
194 Aws::Utils::DateTime m_timestamp{};
195
196 HistoryItemType m_historyItemType{HistoryItemType::NOT_SET};
197
198 Aws::String m_historySummary;
199
200 Aws::String m_historyData;
201
202 Aws::Map<Aws::String, Aws::String> m_alarmContributorAttributes;
203 bool m_alarmNameHasBeenSet = false;
204 bool m_alarmContributorIdHasBeenSet = false;
205 bool m_alarmTypeHasBeenSet = false;
206 bool m_timestampHasBeenSet = false;
207 bool m_historyItemTypeHasBeenSet = false;
208 bool m_historySummaryHasBeenSet = false;
209 bool m_historyDataHasBeenSet = false;
210 bool m_alarmContributorAttributesHasBeenSet = false;
211};
212
213} // namespace Model
214} // namespace CloudWatch
215} // namespace Aws
AlarmHistoryItem & WithAlarmName(AlarmNameT &&value)
AWS_CLOUDWATCH_API void CborEncode(Aws::Crt::Cbor::CborEncoder &encoder) const
void SetHistoryData(HistoryDataT &&value)
AWS_CLOUDWATCH_API AlarmHistoryItem(const std::shared_ptr< Aws::Crt::Cbor::CborDecoder > &decoder)
void SetHistorySummary(HistorySummaryT &&value)
AlarmHistoryItem & WithTimestamp(TimestampT &&value)
AlarmHistoryItem & WithHistoryData(HistoryDataT &&value)
AlarmHistoryItem & WithAlarmContributorAttributes(AlarmContributorAttributesT &&value)
const Aws::String & GetHistorySummary() const
const Aws::String & GetHistoryData() const
const Aws::String & GetAlarmName() const
const Aws::String & GetAlarmContributorId() const
void SetAlarmContributorAttributes(AlarmContributorAttributesT &&value)
void SetHistoryItemType(HistoryItemType value)
const Aws::Map< Aws::String, Aws::String > & GetAlarmContributorAttributes() const
AlarmHistoryItem & WithHistoryItemType(HistoryItemType value)
const Aws::Utils::DateTime & GetTimestamp() const
void SetAlarmContributorId(AlarmContributorIdT &&value)
AlarmHistoryItem & AddAlarmContributorAttributes(AlarmContributorAttributesKeyT &&key, AlarmContributorAttributesValueT &&value)
AlarmHistoryItem & WithAlarmContributorId(AlarmContributorIdT &&value)
AlarmHistoryItem & WithHistorySummary(HistorySummaryT &&value)
AWS_CLOUDWATCH_API AlarmHistoryItem()=default
AWS_CLOUDWATCH_API AlarmHistoryItem & operator=(const std::shared_ptr< Aws::Crt::Cbor::CborDecoder > &decoder)
AlarmHistoryItem & WithAlarmType(AlarmType value)
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