/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include namespace Aws { namespace Lightsail { namespace Model { /** */ class AWS_LIGHTSAIL_API TestAlarmRequest : public LightsailRequest { public: TestAlarmRequest(); // Service request name is the Operation name which will send this request out, // each operation should has unique request name, so that we can get operation's name from this request. // Note: this is not true for response, multiple operations may have the same response name, // so we can not get operation's name from response. inline virtual const char* GetServiceRequestName() const override { return "TestAlarm"; } Aws::String SerializePayload() const override; Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; /** *

The name of the alarm to test.

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

The name of the alarm to test.

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

The name of the alarm to test.

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

The name of the alarm to test.

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

The name of the alarm to test.

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

The name of the alarm to test.

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

The name of the alarm to test.

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

The name of the alarm to test.

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

The alarm state to test.

An alarm has the following possible states * that can be tested:

  • ALARM - The metric is outside * of the defined threshold.

  • INSUFFICIENT_DATA - * The alarm has just started, the metric is not available, or not enough data is * available for the metric to determine the alarm state.

  • * OK - The metric is within the defined threshold.

*/ inline const AlarmState& GetState() const{ return m_state; } /** *

The alarm state to test.

An alarm has the following possible states * that can be tested:

  • ALARM - The metric is outside * of the defined threshold.

  • INSUFFICIENT_DATA - * The alarm has just started, the metric is not available, or not enough data is * available for the metric to determine the alarm state.

  • * OK - The metric is within the defined threshold.

*/ inline bool StateHasBeenSet() const { return m_stateHasBeenSet; } /** *

The alarm state to test.

An alarm has the following possible states * that can be tested:

  • ALARM - The metric is outside * of the defined threshold.

  • INSUFFICIENT_DATA - * The alarm has just started, the metric is not available, or not enough data is * available for the metric to determine the alarm state.

  • * OK - The metric is within the defined threshold.

*/ inline void SetState(const AlarmState& value) { m_stateHasBeenSet = true; m_state = value; } /** *

The alarm state to test.

An alarm has the following possible states * that can be tested:

  • ALARM - The metric is outside * of the defined threshold.

  • INSUFFICIENT_DATA - * The alarm has just started, the metric is not available, or not enough data is * available for the metric to determine the alarm state.

  • * OK - The metric is within the defined threshold.

*/ inline void SetState(AlarmState&& value) { m_stateHasBeenSet = true; m_state = std::move(value); } /** *

The alarm state to test.

An alarm has the following possible states * that can be tested:

  • ALARM - The metric is outside * of the defined threshold.

  • INSUFFICIENT_DATA - * The alarm has just started, the metric is not available, or not enough data is * available for the metric to determine the alarm state.

  • * OK - The metric is within the defined threshold.

*/ inline TestAlarmRequest& WithState(const AlarmState& value) { SetState(value); return *this;} /** *

The alarm state to test.

An alarm has the following possible states * that can be tested:

  • ALARM - The metric is outside * of the defined threshold.

  • INSUFFICIENT_DATA - * The alarm has just started, the metric is not available, or not enough data is * available for the metric to determine the alarm state.

  • * OK - The metric is within the defined threshold.

*/ inline TestAlarmRequest& WithState(AlarmState&& value) { SetState(std::move(value)); return *this;} private: Aws::String m_alarmName; bool m_alarmNameHasBeenSet; AlarmState m_state; bool m_stateHasBeenSet; }; } // namespace Model } // namespace Lightsail } // namespace Aws