/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace IoT { namespace Model { /** *

Describes an action that updates a CloudWatch alarm.

See Also:

* AWS * API Reference

*/ class CloudwatchAlarmAction { public: AWS_IOT_API CloudwatchAlarmAction(); AWS_IOT_API CloudwatchAlarmAction(Aws::Utils::Json::JsonView jsonValue); AWS_IOT_API CloudwatchAlarmAction& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_IOT_API Aws::Utils::Json::JsonValue Jsonize() const; /** *

The IAM role that allows access to the CloudWatch alarm.

*/ inline const Aws::String& GetRoleArn() const{ return m_roleArn; } /** *

The IAM role that allows access to the CloudWatch alarm.

*/ inline bool RoleArnHasBeenSet() const { return m_roleArnHasBeenSet; } /** *

The IAM role that allows access to the CloudWatch alarm.

*/ inline void SetRoleArn(const Aws::String& value) { m_roleArnHasBeenSet = true; m_roleArn = value; } /** *

The IAM role that allows access to the CloudWatch alarm.

*/ inline void SetRoleArn(Aws::String&& value) { m_roleArnHasBeenSet = true; m_roleArn = std::move(value); } /** *

The IAM role that allows access to the CloudWatch alarm.

*/ inline void SetRoleArn(const char* value) { m_roleArnHasBeenSet = true; m_roleArn.assign(value); } /** *

The IAM role that allows access to the CloudWatch alarm.

*/ inline CloudwatchAlarmAction& WithRoleArn(const Aws::String& value) { SetRoleArn(value); return *this;} /** *

The IAM role that allows access to the CloudWatch alarm.

*/ inline CloudwatchAlarmAction& WithRoleArn(Aws::String&& value) { SetRoleArn(std::move(value)); return *this;} /** *

The IAM role that allows access to the CloudWatch alarm.

*/ inline CloudwatchAlarmAction& WithRoleArn(const char* value) { SetRoleArn(value); return *this;} /** *

The CloudWatch alarm name.

*/ inline const Aws::String& GetAlarmName() const{ return m_alarmName; } /** *

The CloudWatch alarm name.

*/ inline bool AlarmNameHasBeenSet() const { return m_alarmNameHasBeenSet; } /** *

The CloudWatch alarm name.

*/ inline void SetAlarmName(const Aws::String& value) { m_alarmNameHasBeenSet = true; m_alarmName = value; } /** *

The CloudWatch alarm name.

*/ inline void SetAlarmName(Aws::String&& value) { m_alarmNameHasBeenSet = true; m_alarmName = std::move(value); } /** *

The CloudWatch alarm name.

*/ inline void SetAlarmName(const char* value) { m_alarmNameHasBeenSet = true; m_alarmName.assign(value); } /** *

The CloudWatch alarm name.

*/ inline CloudwatchAlarmAction& WithAlarmName(const Aws::String& value) { SetAlarmName(value); return *this;} /** *

The CloudWatch alarm name.

*/ inline CloudwatchAlarmAction& WithAlarmName(Aws::String&& value) { SetAlarmName(std::move(value)); return *this;} /** *

The CloudWatch alarm name.

*/ inline CloudwatchAlarmAction& WithAlarmName(const char* value) { SetAlarmName(value); return *this;} /** *

The reason for the alarm change.

*/ inline const Aws::String& GetStateReason() const{ return m_stateReason; } /** *

The reason for the alarm change.

*/ inline bool StateReasonHasBeenSet() const { return m_stateReasonHasBeenSet; } /** *

The reason for the alarm change.

*/ inline void SetStateReason(const Aws::String& value) { m_stateReasonHasBeenSet = true; m_stateReason = value; } /** *

The reason for the alarm change.

*/ inline void SetStateReason(Aws::String&& value) { m_stateReasonHasBeenSet = true; m_stateReason = std::move(value); } /** *

The reason for the alarm change.

*/ inline void SetStateReason(const char* value) { m_stateReasonHasBeenSet = true; m_stateReason.assign(value); } /** *

The reason for the alarm change.

*/ inline CloudwatchAlarmAction& WithStateReason(const Aws::String& value) { SetStateReason(value); return *this;} /** *

The reason for the alarm change.

*/ inline CloudwatchAlarmAction& WithStateReason(Aws::String&& value) { SetStateReason(std::move(value)); return *this;} /** *

The reason for the alarm change.

*/ inline CloudwatchAlarmAction& WithStateReason(const char* value) { SetStateReason(value); return *this;} /** *

The value of the alarm state. Acceptable values are: OK, ALARM, * INSUFFICIENT_DATA.

*/ inline const Aws::String& GetStateValue() const{ return m_stateValue; } /** *

The value of the alarm state. Acceptable values are: OK, ALARM, * INSUFFICIENT_DATA.

*/ inline bool StateValueHasBeenSet() const { return m_stateValueHasBeenSet; } /** *

The value of the alarm state. Acceptable values are: OK, ALARM, * INSUFFICIENT_DATA.

*/ inline void SetStateValue(const Aws::String& value) { m_stateValueHasBeenSet = true; m_stateValue = value; } /** *

The value of the alarm state. Acceptable values are: OK, ALARM, * INSUFFICIENT_DATA.

*/ inline void SetStateValue(Aws::String&& value) { m_stateValueHasBeenSet = true; m_stateValue = std::move(value); } /** *

The value of the alarm state. Acceptable values are: OK, ALARM, * INSUFFICIENT_DATA.

*/ inline void SetStateValue(const char* value) { m_stateValueHasBeenSet = true; m_stateValue.assign(value); } /** *

The value of the alarm state. Acceptable values are: OK, ALARM, * INSUFFICIENT_DATA.

*/ inline CloudwatchAlarmAction& WithStateValue(const Aws::String& value) { SetStateValue(value); return *this;} /** *

The value of the alarm state. Acceptable values are: OK, ALARM, * INSUFFICIENT_DATA.

*/ inline CloudwatchAlarmAction& WithStateValue(Aws::String&& value) { SetStateValue(std::move(value)); return *this;} /** *

The value of the alarm state. Acceptable values are: OK, ALARM, * INSUFFICIENT_DATA.

*/ inline CloudwatchAlarmAction& WithStateValue(const char* value) { SetStateValue(value); return *this;} private: Aws::String m_roleArn; bool m_roleArnHasBeenSet = false; Aws::String m_alarmName; bool m_alarmNameHasBeenSet = false; Aws::String m_stateReason; bool m_stateReasonHasBeenSet = false; Aws::String m_stateValue; bool m_stateValueHasBeenSet = false; }; } // namespace Model } // namespace IoT } // namespace Aws