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

The reason that the cluster changed to its current state.

See * Also:

AWS * API Reference

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

The programmatic code for the state change reason.

*/ inline const ClusterStateChangeReasonCode& GetCode() const{ return m_code; } /** *

The programmatic code for the state change reason.

*/ inline bool CodeHasBeenSet() const { return m_codeHasBeenSet; } /** *

The programmatic code for the state change reason.

*/ inline void SetCode(const ClusterStateChangeReasonCode& value) { m_codeHasBeenSet = true; m_code = value; } /** *

The programmatic code for the state change reason.

*/ inline void SetCode(ClusterStateChangeReasonCode&& value) { m_codeHasBeenSet = true; m_code = std::move(value); } /** *

The programmatic code for the state change reason.

*/ inline ClusterStateChangeReason& WithCode(const ClusterStateChangeReasonCode& value) { SetCode(value); return *this;} /** *

The programmatic code for the state change reason.

*/ inline ClusterStateChangeReason& WithCode(ClusterStateChangeReasonCode&& value) { SetCode(std::move(value)); return *this;} /** *

The descriptive message for the state change reason.

*/ inline const Aws::String& GetMessage() const{ return m_message; } /** *

The descriptive message for the state change reason.

*/ inline bool MessageHasBeenSet() const { return m_messageHasBeenSet; } /** *

The descriptive message for the state change reason.

*/ inline void SetMessage(const Aws::String& value) { m_messageHasBeenSet = true; m_message = value; } /** *

The descriptive message for the state change reason.

*/ inline void SetMessage(Aws::String&& value) { m_messageHasBeenSet = true; m_message = std::move(value); } /** *

The descriptive message for the state change reason.

*/ inline void SetMessage(const char* value) { m_messageHasBeenSet = true; m_message.assign(value); } /** *

The descriptive message for the state change reason.

*/ inline ClusterStateChangeReason& WithMessage(const Aws::String& value) { SetMessage(value); return *this;} /** *

The descriptive message for the state change reason.

*/ inline ClusterStateChangeReason& WithMessage(Aws::String&& value) { SetMessage(std::move(value)); return *this;} /** *

The descriptive message for the state change reason.

*/ inline ClusterStateChangeReason& WithMessage(const char* value) { SetMessage(value); return *this;} private: ClusterStateChangeReasonCode m_code; bool m_codeHasBeenSet = false; Aws::String m_message; bool m_messageHasBeenSet = false; }; } // namespace Model } // namespace EMR } // namespace Aws