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

The detailed status of the cluster.

See Also:

AWS * API Reference

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

The current state of the cluster.

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

The current state of the cluster.

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

The current state of the cluster.

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

The current state of the cluster.

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

The current state of the cluster.

*/ inline ClusterStatus& WithState(const ClusterState& value) { SetState(value); return *this;} /** *

The current state of the cluster.

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

The reason for the cluster status change.

*/ inline const ClusterStateChangeReason& GetStateChangeReason() const{ return m_stateChangeReason; } /** *

The reason for the cluster status change.

*/ inline bool StateChangeReasonHasBeenSet() const { return m_stateChangeReasonHasBeenSet; } /** *

The reason for the cluster status change.

*/ inline void SetStateChangeReason(const ClusterStateChangeReason& value) { m_stateChangeReasonHasBeenSet = true; m_stateChangeReason = value; } /** *

The reason for the cluster status change.

*/ inline void SetStateChangeReason(ClusterStateChangeReason&& value) { m_stateChangeReasonHasBeenSet = true; m_stateChangeReason = std::move(value); } /** *

The reason for the cluster status change.

*/ inline ClusterStatus& WithStateChangeReason(const ClusterStateChangeReason& value) { SetStateChangeReason(value); return *this;} /** *

The reason for the cluster status change.

*/ inline ClusterStatus& WithStateChangeReason(ClusterStateChangeReason&& value) { SetStateChangeReason(std::move(value)); return *this;} /** *

A timeline that represents the status of a cluster over the lifetime of the * cluster.

*/ inline const ClusterTimeline& GetTimeline() const{ return m_timeline; } /** *

A timeline that represents the status of a cluster over the lifetime of the * cluster.

*/ inline bool TimelineHasBeenSet() const { return m_timelineHasBeenSet; } /** *

A timeline that represents the status of a cluster over the lifetime of the * cluster.

*/ inline void SetTimeline(const ClusterTimeline& value) { m_timelineHasBeenSet = true; m_timeline = value; } /** *

A timeline that represents the status of a cluster over the lifetime of the * cluster.

*/ inline void SetTimeline(ClusterTimeline&& value) { m_timelineHasBeenSet = true; m_timeline = std::move(value); } /** *

A timeline that represents the status of a cluster over the lifetime of the * cluster.

*/ inline ClusterStatus& WithTimeline(const ClusterTimeline& value) { SetTimeline(value); return *this;} /** *

A timeline that represents the status of a cluster over the lifetime of the * cluster.

*/ inline ClusterStatus& WithTimeline(ClusterTimeline&& value) { SetTimeline(std::move(value)); return *this;} /** *

A list of tuples that provides information about the errors that caused a * cluster to terminate. This structure can contain up to 10 different * ErrorDetail tuples.

*/ inline const Aws::Vector& GetErrorDetails() const{ return m_errorDetails; } /** *

A list of tuples that provides information about the errors that caused a * cluster to terminate. This structure can contain up to 10 different * ErrorDetail tuples.

*/ inline bool ErrorDetailsHasBeenSet() const { return m_errorDetailsHasBeenSet; } /** *

A list of tuples that provides information about the errors that caused a * cluster to terminate. This structure can contain up to 10 different * ErrorDetail tuples.

*/ inline void SetErrorDetails(const Aws::Vector& value) { m_errorDetailsHasBeenSet = true; m_errorDetails = value; } /** *

A list of tuples that provides information about the errors that caused a * cluster to terminate. This structure can contain up to 10 different * ErrorDetail tuples.

*/ inline void SetErrorDetails(Aws::Vector&& value) { m_errorDetailsHasBeenSet = true; m_errorDetails = std::move(value); } /** *

A list of tuples that provides information about the errors that caused a * cluster to terminate. This structure can contain up to 10 different * ErrorDetail tuples.

*/ inline ClusterStatus& WithErrorDetails(const Aws::Vector& value) { SetErrorDetails(value); return *this;} /** *

A list of tuples that provides information about the errors that caused a * cluster to terminate. This structure can contain up to 10 different * ErrorDetail tuples.

*/ inline ClusterStatus& WithErrorDetails(Aws::Vector&& value) { SetErrorDetails(std::move(value)); return *this;} /** *

A list of tuples that provides information about the errors that caused a * cluster to terminate. This structure can contain up to 10 different * ErrorDetail tuples.

*/ inline ClusterStatus& AddErrorDetails(const ErrorDetail& value) { m_errorDetailsHasBeenSet = true; m_errorDetails.push_back(value); return *this; } /** *

A list of tuples that provides information about the errors that caused a * cluster to terminate. This structure can contain up to 10 different * ErrorDetail tuples.

*/ inline ClusterStatus& AddErrorDetails(ErrorDetail&& value) { m_errorDetailsHasBeenSet = true; m_errorDetails.push_back(std::move(value)); return *this; } private: ClusterState m_state; bool m_stateHasBeenSet = false; ClusterStateChangeReason m_stateChangeReason; bool m_stateChangeReasonHasBeenSet = false; ClusterTimeline m_timeline; bool m_timelineHasBeenSet = false; Aws::Vector m_errorDetails; bool m_errorDetailsHasBeenSet = false; }; } // namespace Model } // namespace EMR } // namespace Aws