/** * 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 details of the status change reason for the instance.

See * Also:

AWS * API Reference

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

The programmable code for the state change reason.

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

The programmable code for the state change reason.

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

The programmable code for the state change reason.

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

The programmable code for the state change reason.

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

The programmable code for the state change reason.

*/ inline InstanceStateChangeReason& WithCode(const InstanceStateChangeReasonCode& value) { SetCode(value); return *this;} /** *

The programmable code for the state change reason.

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

The status change reason description.

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

The status change reason description.

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

The status change reason description.

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

The status change reason description.

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

The status change reason description.

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

The status change reason description.

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

The status change reason description.

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

The status change reason description.

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