/** * 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 { template class AmazonWebServiceResult; namespace Utils { namespace Json { class JsonValue; } // namespace Json } // namespace Utils namespace ECS { namespace Model { class GetTaskProtectionResult { public: AWS_ECS_API GetTaskProtectionResult(); AWS_ECS_API GetTaskProtectionResult(const Aws::AmazonWebServiceResult& result); AWS_ECS_API GetTaskProtectionResult& operator=(const Aws::AmazonWebServiceResult& result); /** *

A list of tasks with the following information.

  • * taskArn: The task ARN.

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

  • expirationDate: The * epoch time when protection for the task will expire.

*/ inline const Aws::Vector& GetProtectedTasks() const{ return m_protectedTasks; } /** *

A list of tasks with the following information.

  • * taskArn: The task ARN.

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

  • expirationDate: The * epoch time when protection for the task will expire.

*/ inline void SetProtectedTasks(const Aws::Vector& value) { m_protectedTasks = value; } /** *

A list of tasks with the following information.

  • * taskArn: The task ARN.

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

  • expirationDate: The * epoch time when protection for the task will expire.

*/ inline void SetProtectedTasks(Aws::Vector&& value) { m_protectedTasks = std::move(value); } /** *

A list of tasks with the following information.

  • * taskArn: The task ARN.

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

  • expirationDate: The * epoch time when protection for the task will expire.

*/ inline GetTaskProtectionResult& WithProtectedTasks(const Aws::Vector& value) { SetProtectedTasks(value); return *this;} /** *

A list of tasks with the following information.

  • * taskArn: The task ARN.

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

  • expirationDate: The * epoch time when protection for the task will expire.

*/ inline GetTaskProtectionResult& WithProtectedTasks(Aws::Vector&& value) { SetProtectedTasks(std::move(value)); return *this;} /** *

A list of tasks with the following information.

  • * taskArn: The task ARN.

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

  • expirationDate: The * epoch time when protection for the task will expire.

*/ inline GetTaskProtectionResult& AddProtectedTasks(const ProtectedTask& value) { m_protectedTasks.push_back(value); return *this; } /** *

A list of tasks with the following information.

  • * taskArn: The task ARN.

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

  • expirationDate: The * epoch time when protection for the task will expire.

*/ inline GetTaskProtectionResult& AddProtectedTasks(ProtectedTask&& value) { m_protectedTasks.push_back(std::move(value)); return *this; } /** *

Any failures associated with the call.

*/ inline const Aws::Vector& GetFailures() const{ return m_failures; } /** *

Any failures associated with the call.

*/ inline void SetFailures(const Aws::Vector& value) { m_failures = value; } /** *

Any failures associated with the call.

*/ inline void SetFailures(Aws::Vector&& value) { m_failures = std::move(value); } /** *

Any failures associated with the call.

*/ inline GetTaskProtectionResult& WithFailures(const Aws::Vector& value) { SetFailures(value); return *this;} /** *

Any failures associated with the call.

*/ inline GetTaskProtectionResult& WithFailures(Aws::Vector&& value) { SetFailures(std::move(value)); return *this;} /** *

Any failures associated with the call.

*/ inline GetTaskProtectionResult& AddFailures(const Failure& value) { m_failures.push_back(value); return *this; } /** *

Any failures associated with the call.

*/ inline GetTaskProtectionResult& AddFailures(Failure&& value) { m_failures.push_back(std::move(value)); return *this; } inline const Aws::String& GetRequestId() const{ return m_requestId; } inline void SetRequestId(const Aws::String& value) { m_requestId = value; } inline void SetRequestId(Aws::String&& value) { m_requestId = std::move(value); } inline void SetRequestId(const char* value) { m_requestId.assign(value); } inline GetTaskProtectionResult& WithRequestId(const Aws::String& value) { SetRequestId(value); return *this;} inline GetTaskProtectionResult& WithRequestId(Aws::String&& value) { SetRequestId(std::move(value)); return *this;} inline GetTaskProtectionResult& WithRequestId(const char* value) { SetRequestId(value); return *this;} private: Aws::Vector m_protectedTasks; Aws::Vector m_failures; Aws::String m_requestId; }; } // namespace Model } // namespace ECS } // namespace Aws