AWS SDK for C++

AWS SDK for C++ Version 1.11.719

Loading...
Searching...
No Matches
AlarmConfiguration.h
1
6#pragma once
7#include <aws/codedeploy/CodeDeploy_EXPORTS.h>
8#include <aws/codedeploy/model/Alarm.h>
9#include <aws/core/utils/memory/stl/AWSVector.h>
10
11#include <utility>
12
13namespace Aws {
14namespace Utils {
15namespace Json {
16class JsonValue;
17class JsonView;
18} // namespace Json
19} // namespace Utils
20namespace CodeDeploy {
21namespace Model {
22
30 public:
31 AWS_CODEDEPLOY_API AlarmConfiguration() = default;
32 AWS_CODEDEPLOY_API AlarmConfiguration(Aws::Utils::Json::JsonView jsonValue);
34 AWS_CODEDEPLOY_API Aws::Utils::Json::JsonValue Jsonize() const;
35
37
40 inline bool GetEnabled() const { return m_enabled; }
41 inline bool EnabledHasBeenSet() const { return m_enabledHasBeenSet; }
42 inline void SetEnabled(bool value) {
43 m_enabledHasBeenSet = true;
44 m_enabled = value;
45 }
46 inline AlarmConfiguration& WithEnabled(bool value) {
47 SetEnabled(value);
48 return *this;
49 }
51
53
61 inline bool GetIgnorePollAlarmFailure() const { return m_ignorePollAlarmFailure; }
62 inline bool IgnorePollAlarmFailureHasBeenSet() const { return m_ignorePollAlarmFailureHasBeenSet; }
63 inline void SetIgnorePollAlarmFailure(bool value) {
64 m_ignorePollAlarmFailureHasBeenSet = true;
65 m_ignorePollAlarmFailure = value;
66 }
69 return *this;
70 }
72
74
78 inline const Aws::Vector<Alarm>& GetAlarms() const { return m_alarms; }
79 inline bool AlarmsHasBeenSet() const { return m_alarmsHasBeenSet; }
80 template <typename AlarmsT = Aws::Vector<Alarm>>
81 void SetAlarms(AlarmsT&& value) {
82 m_alarmsHasBeenSet = true;
83 m_alarms = std::forward<AlarmsT>(value);
84 }
85 template <typename AlarmsT = Aws::Vector<Alarm>>
86 AlarmConfiguration& WithAlarms(AlarmsT&& value) {
87 SetAlarms(std::forward<AlarmsT>(value));
88 return *this;
89 }
90 template <typename AlarmsT = Alarm>
91 AlarmConfiguration& AddAlarms(AlarmsT&& value) {
92 m_alarmsHasBeenSet = true;
93 m_alarms.emplace_back(std::forward<AlarmsT>(value));
94 return *this;
95 }
97 private:
98 bool m_enabled{false};
99
100 bool m_ignorePollAlarmFailure{false};
101
102 Aws::Vector<Alarm> m_alarms;
103 bool m_enabledHasBeenSet = false;
104 bool m_ignorePollAlarmFailureHasBeenSet = false;
105 bool m_alarmsHasBeenSet = false;
106};
107
108} // namespace Model
109} // namespace CodeDeploy
110} // namespace Aws
AlarmConfiguration & WithAlarms(AlarmsT &&value)
AWS_CODEDEPLOY_API AlarmConfiguration(Aws::Utils::Json::JsonView jsonValue)
AlarmConfiguration & WithEnabled(bool value)
const Aws::Vector< Alarm > & GetAlarms() const
AWS_CODEDEPLOY_API Aws::Utils::Json::JsonValue Jsonize() const
AlarmConfiguration & WithIgnorePollAlarmFailure(bool value)
AWS_CODEDEPLOY_API AlarmConfiguration()=default
AWS_CODEDEPLOY_API AlarmConfiguration & operator=(Aws::Utils::Json::JsonView jsonValue)
AlarmConfiguration & AddAlarms(AlarmsT &&value)
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue