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

An object representing the protection status details for a task. You can set * the protection status with the UpdateTaskProtection API and get the * status of tasks with the GetTaskProtection API.

See Also:

* AWS * API Reference

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

The task ARN.

*/ inline const Aws::String& GetTaskArn() const{ return m_taskArn; } /** *

The task ARN.

*/ inline bool TaskArnHasBeenSet() const { return m_taskArnHasBeenSet; } /** *

The task ARN.

*/ inline void SetTaskArn(const Aws::String& value) { m_taskArnHasBeenSet = true; m_taskArn = value; } /** *

The task ARN.

*/ inline void SetTaskArn(Aws::String&& value) { m_taskArnHasBeenSet = true; m_taskArn = std::move(value); } /** *

The task ARN.

*/ inline void SetTaskArn(const char* value) { m_taskArnHasBeenSet = true; m_taskArn.assign(value); } /** *

The task ARN.

*/ inline ProtectedTask& WithTaskArn(const Aws::String& value) { SetTaskArn(value); return *this;} /** *

The task ARN.

*/ inline ProtectedTask& WithTaskArn(Aws::String&& value) { SetTaskArn(std::move(value)); return *this;} /** *

The task ARN.

*/ inline ProtectedTask& WithTaskArn(const char* value) { SetTaskArn(value); return *this;} /** *

The protection status of the task. If scale-in protection is on for a task, * the value is true. Otherwise, it is false.

*/ inline bool GetProtectionEnabled() const{ return m_protectionEnabled; } /** *

The protection status of the task. If scale-in protection is on for a task, * the value is true. Otherwise, it is false.

*/ inline bool ProtectionEnabledHasBeenSet() const { return m_protectionEnabledHasBeenSet; } /** *

The protection status of the task. If scale-in protection is on for a task, * the value is true. Otherwise, it is false.

*/ inline void SetProtectionEnabled(bool value) { m_protectionEnabledHasBeenSet = true; m_protectionEnabled = value; } /** *

The protection status of the task. If scale-in protection is on for a task, * the value is true. Otherwise, it is false.

*/ inline ProtectedTask& WithProtectionEnabled(bool value) { SetProtectionEnabled(value); return *this;} /** *

The epoch time when protection for the task will expire.

*/ inline const Aws::Utils::DateTime& GetExpirationDate() const{ return m_expirationDate; } /** *

The epoch time when protection for the task will expire.

*/ inline bool ExpirationDateHasBeenSet() const { return m_expirationDateHasBeenSet; } /** *

The epoch time when protection for the task will expire.

*/ inline void SetExpirationDate(const Aws::Utils::DateTime& value) { m_expirationDateHasBeenSet = true; m_expirationDate = value; } /** *

The epoch time when protection for the task will expire.

*/ inline void SetExpirationDate(Aws::Utils::DateTime&& value) { m_expirationDateHasBeenSet = true; m_expirationDate = std::move(value); } /** *

The epoch time when protection for the task will expire.

*/ inline ProtectedTask& WithExpirationDate(const Aws::Utils::DateTime& value) { SetExpirationDate(value); return *this;} /** *

The epoch time when protection for the task will expire.

*/ inline ProtectedTask& WithExpirationDate(Aws::Utils::DateTime&& value) { SetExpirationDate(std::move(value)); return *this;} private: Aws::String m_taskArn; bool m_taskArnHasBeenSet = false; bool m_protectionEnabled; bool m_protectionEnabledHasBeenSet = false; Aws::Utils::DateTime m_expirationDate; bool m_expirationDateHasBeenSet = false; }; } // namespace Model } // namespace ECS } // namespace Aws