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

An operation performed by the control.

See Also:

AWS * API Reference

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

The time that the operation finished.

*/ inline const Aws::Utils::DateTime& GetEndTime() const{ return m_endTime; } /** *

The time that the operation finished.

*/ inline bool EndTimeHasBeenSet() const { return m_endTimeHasBeenSet; } /** *

The time that the operation finished.

*/ inline void SetEndTime(const Aws::Utils::DateTime& value) { m_endTimeHasBeenSet = true; m_endTime = value; } /** *

The time that the operation finished.

*/ inline void SetEndTime(Aws::Utils::DateTime&& value) { m_endTimeHasBeenSet = true; m_endTime = std::move(value); } /** *

The time that the operation finished.

*/ inline ControlOperation& WithEndTime(const Aws::Utils::DateTime& value) { SetEndTime(value); return *this;} /** *

The time that the operation finished.

*/ inline ControlOperation& WithEndTime(Aws::Utils::DateTime&& value) { SetEndTime(std::move(value)); return *this;} /** *

One of ENABLE_CONTROL or DISABLE_CONTROL.

*/ inline const ControlOperationType& GetOperationType() const{ return m_operationType; } /** *

One of ENABLE_CONTROL or DISABLE_CONTROL.

*/ inline bool OperationTypeHasBeenSet() const { return m_operationTypeHasBeenSet; } /** *

One of ENABLE_CONTROL or DISABLE_CONTROL.

*/ inline void SetOperationType(const ControlOperationType& value) { m_operationTypeHasBeenSet = true; m_operationType = value; } /** *

One of ENABLE_CONTROL or DISABLE_CONTROL.

*/ inline void SetOperationType(ControlOperationType&& value) { m_operationTypeHasBeenSet = true; m_operationType = std::move(value); } /** *

One of ENABLE_CONTROL or DISABLE_CONTROL.

*/ inline ControlOperation& WithOperationType(const ControlOperationType& value) { SetOperationType(value); return *this;} /** *

One of ENABLE_CONTROL or DISABLE_CONTROL.

*/ inline ControlOperation& WithOperationType(ControlOperationType&& value) { SetOperationType(std::move(value)); return *this;} /** *

The time that the operation began.

*/ inline const Aws::Utils::DateTime& GetStartTime() const{ return m_startTime; } /** *

The time that the operation began.

*/ inline bool StartTimeHasBeenSet() const { return m_startTimeHasBeenSet; } /** *

The time that the operation began.

*/ inline void SetStartTime(const Aws::Utils::DateTime& value) { m_startTimeHasBeenSet = true; m_startTime = value; } /** *

The time that the operation began.

*/ inline void SetStartTime(Aws::Utils::DateTime&& value) { m_startTimeHasBeenSet = true; m_startTime = std::move(value); } /** *

The time that the operation began.

*/ inline ControlOperation& WithStartTime(const Aws::Utils::DateTime& value) { SetStartTime(value); return *this;} /** *

The time that the operation began.

*/ inline ControlOperation& WithStartTime(Aws::Utils::DateTime&& value) { SetStartTime(std::move(value)); return *this;} /** *

One of IN_PROGRESS, SUCEEDED, or * FAILED.

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

One of IN_PROGRESS, SUCEEDED, or * FAILED.

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

One of IN_PROGRESS, SUCEEDED, or * FAILED.

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

One of IN_PROGRESS, SUCEEDED, or * FAILED.

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

One of IN_PROGRESS, SUCEEDED, or * FAILED.

*/ inline ControlOperation& WithStatus(const ControlOperationStatus& value) { SetStatus(value); return *this;} /** *

One of IN_PROGRESS, SUCEEDED, or * FAILED.

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

If the operation result is FAILED, this string contains a * message explaining why the operation failed.

*/ inline const Aws::String& GetStatusMessage() const{ return m_statusMessage; } /** *

If the operation result is FAILED, this string contains a * message explaining why the operation failed.

*/ inline bool StatusMessageHasBeenSet() const { return m_statusMessageHasBeenSet; } /** *

If the operation result is FAILED, this string contains a * message explaining why the operation failed.

*/ inline void SetStatusMessage(const Aws::String& value) { m_statusMessageHasBeenSet = true; m_statusMessage = value; } /** *

If the operation result is FAILED, this string contains a * message explaining why the operation failed.

*/ inline void SetStatusMessage(Aws::String&& value) { m_statusMessageHasBeenSet = true; m_statusMessage = std::move(value); } /** *

If the operation result is FAILED, this string contains a * message explaining why the operation failed.

*/ inline void SetStatusMessage(const char* value) { m_statusMessageHasBeenSet = true; m_statusMessage.assign(value); } /** *

If the operation result is FAILED, this string contains a * message explaining why the operation failed.

*/ inline ControlOperation& WithStatusMessage(const Aws::String& value) { SetStatusMessage(value); return *this;} /** *

If the operation result is FAILED, this string contains a * message explaining why the operation failed.

*/ inline ControlOperation& WithStatusMessage(Aws::String&& value) { SetStatusMessage(std::move(value)); return *this;} /** *

If the operation result is FAILED, this string contains a * message explaining why the operation failed.

*/ inline ControlOperation& WithStatusMessage(const char* value) { SetStatusMessage(value); return *this;} private: Aws::Utils::DateTime m_endTime; bool m_endTimeHasBeenSet = false; ControlOperationType m_operationType; bool m_operationTypeHasBeenSet = false; Aws::Utils::DateTime m_startTime; bool m_startTimeHasBeenSet = false; ControlOperationStatus m_status; bool m_statusHasBeenSet = false; Aws::String m_statusMessage; bool m_statusMessageHasBeenSet = false; }; } // namespace Model } // namespace ControlTower } // namespace Aws