/** * 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 Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace Synthetics { namespace Model { /** *

This structure contains the status information about a canary * run.

See Also:

AWS * API Reference

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

The current state of the run.

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

The current state of the run.

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

The current state of the run.

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

The current state of the run.

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

The current state of the run.

*/ inline CanaryRunStatus& WithState(const CanaryRunState& value) { SetState(value); return *this;} /** *

The current state of the run.

*/ inline CanaryRunStatus& WithState(CanaryRunState&& value) { SetState(std::move(value)); return *this;} /** *

If run of the canary failed, this field contains the reason for the * error.

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

If run of the canary failed, this field contains the reason for the * error.

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

If run of the canary failed, this field contains the reason for the * error.

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

If run of the canary failed, this field contains the reason for the * error.

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

If run of the canary failed, this field contains the reason for the * error.

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

If run of the canary failed, this field contains the reason for the * error.

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

If run of the canary failed, this field contains the reason for the * error.

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

If run of the canary failed, this field contains the reason for the * error.

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

If this value is CANARY_FAILURE, an exception occurred in the * canary code. If this value is EXECUTION_FAILURE, an exception * occurred in CloudWatch Synthetics.

*/ inline const CanaryRunStateReasonCode& GetStateReasonCode() const{ return m_stateReasonCode; } /** *

If this value is CANARY_FAILURE, an exception occurred in the * canary code. If this value is EXECUTION_FAILURE, an exception * occurred in CloudWatch Synthetics.

*/ inline bool StateReasonCodeHasBeenSet() const { return m_stateReasonCodeHasBeenSet; } /** *

If this value is CANARY_FAILURE, an exception occurred in the * canary code. If this value is EXECUTION_FAILURE, an exception * occurred in CloudWatch Synthetics.

*/ inline void SetStateReasonCode(const CanaryRunStateReasonCode& value) { m_stateReasonCodeHasBeenSet = true; m_stateReasonCode = value; } /** *

If this value is CANARY_FAILURE, an exception occurred in the * canary code. If this value is EXECUTION_FAILURE, an exception * occurred in CloudWatch Synthetics.

*/ inline void SetStateReasonCode(CanaryRunStateReasonCode&& value) { m_stateReasonCodeHasBeenSet = true; m_stateReasonCode = std::move(value); } /** *

If this value is CANARY_FAILURE, an exception occurred in the * canary code. If this value is EXECUTION_FAILURE, an exception * occurred in CloudWatch Synthetics.

*/ inline CanaryRunStatus& WithStateReasonCode(const CanaryRunStateReasonCode& value) { SetStateReasonCode(value); return *this;} /** *

If this value is CANARY_FAILURE, an exception occurred in the * canary code. If this value is EXECUTION_FAILURE, an exception * occurred in CloudWatch Synthetics.

*/ inline CanaryRunStatus& WithStateReasonCode(CanaryRunStateReasonCode&& value) { SetStateReasonCode(std::move(value)); return *this;} private: CanaryRunState m_state; bool m_stateHasBeenSet = false; Aws::String m_stateReason; bool m_stateReasonHasBeenSet = false; CanaryRunStateReasonCode m_stateReasonCode; bool m_stateReasonCodeHasBeenSet = false; }; } // namespace Model } // namespace Synthetics } // namespace Aws