/** * 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 imagebuilder { namespace Model { /** *

A group of fields that describe the current status of components that are no * longer active.

See Also:

AWS * API Reference

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

The current state of the component.

*/ inline const ComponentStatus& GetStatus() const{ return m_status; } /** *

The current state of the component.

*/ inline bool StatusHasBeenSet() const { return m_statusHasBeenSet; } /** *

The current state of the component.

*/ inline void SetStatus(const ComponentStatus& value) { m_statusHasBeenSet = true; m_status = value; } /** *

The current state of the component.

*/ inline void SetStatus(ComponentStatus&& value) { m_statusHasBeenSet = true; m_status = std::move(value); } /** *

The current state of the component.

*/ inline ComponentState& WithStatus(const ComponentStatus& value) { SetStatus(value); return *this;} /** *

The current state of the component.

*/ inline ComponentState& WithStatus(ComponentStatus&& value) { SetStatus(std::move(value)); return *this;} /** *

Describes how or why the component changed state.

*/ inline const Aws::String& GetReason() const{ return m_reason; } /** *

Describes how or why the component changed state.

*/ inline bool ReasonHasBeenSet() const { return m_reasonHasBeenSet; } /** *

Describes how or why the component changed state.

*/ inline void SetReason(const Aws::String& value) { m_reasonHasBeenSet = true; m_reason = value; } /** *

Describes how or why the component changed state.

*/ inline void SetReason(Aws::String&& value) { m_reasonHasBeenSet = true; m_reason = std::move(value); } /** *

Describes how or why the component changed state.

*/ inline void SetReason(const char* value) { m_reasonHasBeenSet = true; m_reason.assign(value); } /** *

Describes how or why the component changed state.

*/ inline ComponentState& WithReason(const Aws::String& value) { SetReason(value); return *this;} /** *

Describes how or why the component changed state.

*/ inline ComponentState& WithReason(Aws::String&& value) { SetReason(std::move(value)); return *this;} /** *

Describes how or why the component changed state.

*/ inline ComponentState& WithReason(const char* value) { SetReason(value); return *this;} private: ComponentStatus m_status; bool m_statusHasBeenSet = false; Aws::String m_reason; bool m_reasonHasBeenSet = false; }; } // namespace Model } // namespace imagebuilder } // namespace Aws