/** * 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 #include #include namespace Aws { namespace ECS { namespace Model { /** */ class SubmitTaskStateChangeRequest : public ECSRequest { public: AWS_ECS_API SubmitTaskStateChangeRequest(); // Service request name is the Operation name which will send this request out, // each operation should has unique request name, so that we can get operation's name from this request. // Note: this is not true for response, multiple operations may have the same response name, // so we can not get operation's name from response. inline virtual const char* GetServiceRequestName() const override { return "SubmitTaskStateChange"; } AWS_ECS_API Aws::String SerializePayload() const override; AWS_ECS_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; /** *

The short name or full Amazon Resource Name (ARN) of the cluster that hosts * the task.

*/ inline const Aws::String& GetCluster() const{ return m_cluster; } /** *

The short name or full Amazon Resource Name (ARN) of the cluster that hosts * the task.

*/ inline bool ClusterHasBeenSet() const { return m_clusterHasBeenSet; } /** *

The short name or full Amazon Resource Name (ARN) of the cluster that hosts * the task.

*/ inline void SetCluster(const Aws::String& value) { m_clusterHasBeenSet = true; m_cluster = value; } /** *

The short name or full Amazon Resource Name (ARN) of the cluster that hosts * the task.

*/ inline void SetCluster(Aws::String&& value) { m_clusterHasBeenSet = true; m_cluster = std::move(value); } /** *

The short name or full Amazon Resource Name (ARN) of the cluster that hosts * the task.

*/ inline void SetCluster(const char* value) { m_clusterHasBeenSet = true; m_cluster.assign(value); } /** *

The short name or full Amazon Resource Name (ARN) of the cluster that hosts * the task.

*/ inline SubmitTaskStateChangeRequest& WithCluster(const Aws::String& value) { SetCluster(value); return *this;} /** *

The short name or full Amazon Resource Name (ARN) of the cluster that hosts * the task.

*/ inline SubmitTaskStateChangeRequest& WithCluster(Aws::String&& value) { SetCluster(std::move(value)); return *this;} /** *

The short name or full Amazon Resource Name (ARN) of the cluster that hosts * the task.

*/ inline SubmitTaskStateChangeRequest& WithCluster(const char* value) { SetCluster(value); return *this;} /** *

The task ID or full ARN of the task in the state change request.

*/ inline const Aws::String& GetTask() const{ return m_task; } /** *

The task ID or full ARN of the task in the state change request.

*/ inline bool TaskHasBeenSet() const { return m_taskHasBeenSet; } /** *

The task ID or full ARN of the task in the state change request.

*/ inline void SetTask(const Aws::String& value) { m_taskHasBeenSet = true; m_task = value; } /** *

The task ID or full ARN of the task in the state change request.

*/ inline void SetTask(Aws::String&& value) { m_taskHasBeenSet = true; m_task = std::move(value); } /** *

The task ID or full ARN of the task in the state change request.

*/ inline void SetTask(const char* value) { m_taskHasBeenSet = true; m_task.assign(value); } /** *

The task ID or full ARN of the task in the state change request.

*/ inline SubmitTaskStateChangeRequest& WithTask(const Aws::String& value) { SetTask(value); return *this;} /** *

The task ID or full ARN of the task in the state change request.

*/ inline SubmitTaskStateChangeRequest& WithTask(Aws::String&& value) { SetTask(std::move(value)); return *this;} /** *

The task ID or full ARN of the task in the state change request.

*/ inline SubmitTaskStateChangeRequest& WithTask(const char* value) { SetTask(value); return *this;} /** *

The status of the state change request.

*/ inline const Aws::String& GetStatus() const{ return m_status; } /** *

The status of the state change request.

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

The status of the state change request.

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

The status of the state change request.

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

The status of the state change request.

*/ inline void SetStatus(const char* value) { m_statusHasBeenSet = true; m_status.assign(value); } /** *

The status of the state change request.

*/ inline SubmitTaskStateChangeRequest& WithStatus(const Aws::String& value) { SetStatus(value); return *this;} /** *

The status of the state change request.

*/ inline SubmitTaskStateChangeRequest& WithStatus(Aws::String&& value) { SetStatus(std::move(value)); return *this;} /** *

The status of the state change request.

*/ inline SubmitTaskStateChangeRequest& WithStatus(const char* value) { SetStatus(value); return *this;} /** *

The reason for the state change request.

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

The reason for the state change request.

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

The reason for the state change request.

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

The reason for the state change request.

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

The reason for the state change request.

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

The reason for the state change request.

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

The reason for the state change request.

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

The reason for the state change request.

*/ inline SubmitTaskStateChangeRequest& WithReason(const char* value) { SetReason(value); return *this;} /** *

Any containers that's associated with the state change request.

*/ inline const Aws::Vector& GetContainers() const{ return m_containers; } /** *

Any containers that's associated with the state change request.

*/ inline bool ContainersHasBeenSet() const { return m_containersHasBeenSet; } /** *

Any containers that's associated with the state change request.

*/ inline void SetContainers(const Aws::Vector& value) { m_containersHasBeenSet = true; m_containers = value; } /** *

Any containers that's associated with the state change request.

*/ inline void SetContainers(Aws::Vector&& value) { m_containersHasBeenSet = true; m_containers = std::move(value); } /** *

Any containers that's associated with the state change request.

*/ inline SubmitTaskStateChangeRequest& WithContainers(const Aws::Vector& value) { SetContainers(value); return *this;} /** *

Any containers that's associated with the state change request.

*/ inline SubmitTaskStateChangeRequest& WithContainers(Aws::Vector&& value) { SetContainers(std::move(value)); return *this;} /** *

Any containers that's associated with the state change request.

*/ inline SubmitTaskStateChangeRequest& AddContainers(const ContainerStateChange& value) { m_containersHasBeenSet = true; m_containers.push_back(value); return *this; } /** *

Any containers that's associated with the state change request.

*/ inline SubmitTaskStateChangeRequest& AddContainers(ContainerStateChange&& value) { m_containersHasBeenSet = true; m_containers.push_back(std::move(value)); return *this; } /** *

Any attachments associated with the state change request.

*/ inline const Aws::Vector& GetAttachments() const{ return m_attachments; } /** *

Any attachments associated with the state change request.

*/ inline bool AttachmentsHasBeenSet() const { return m_attachmentsHasBeenSet; } /** *

Any attachments associated with the state change request.

*/ inline void SetAttachments(const Aws::Vector& value) { m_attachmentsHasBeenSet = true; m_attachments = value; } /** *

Any attachments associated with the state change request.

*/ inline void SetAttachments(Aws::Vector&& value) { m_attachmentsHasBeenSet = true; m_attachments = std::move(value); } /** *

Any attachments associated with the state change request.

*/ inline SubmitTaskStateChangeRequest& WithAttachments(const Aws::Vector& value) { SetAttachments(value); return *this;} /** *

Any attachments associated with the state change request.

*/ inline SubmitTaskStateChangeRequest& WithAttachments(Aws::Vector&& value) { SetAttachments(std::move(value)); return *this;} /** *

Any attachments associated with the state change request.

*/ inline SubmitTaskStateChangeRequest& AddAttachments(const AttachmentStateChange& value) { m_attachmentsHasBeenSet = true; m_attachments.push_back(value); return *this; } /** *

Any attachments associated with the state change request.

*/ inline SubmitTaskStateChangeRequest& AddAttachments(AttachmentStateChange&& value) { m_attachmentsHasBeenSet = true; m_attachments.push_back(std::move(value)); return *this; } /** *

The details for the managed agent that's associated with the task.

*/ inline const Aws::Vector& GetManagedAgents() const{ return m_managedAgents; } /** *

The details for the managed agent that's associated with the task.

*/ inline bool ManagedAgentsHasBeenSet() const { return m_managedAgentsHasBeenSet; } /** *

The details for the managed agent that's associated with the task.

*/ inline void SetManagedAgents(const Aws::Vector& value) { m_managedAgentsHasBeenSet = true; m_managedAgents = value; } /** *

The details for the managed agent that's associated with the task.

*/ inline void SetManagedAgents(Aws::Vector&& value) { m_managedAgentsHasBeenSet = true; m_managedAgents = std::move(value); } /** *

The details for the managed agent that's associated with the task.

*/ inline SubmitTaskStateChangeRequest& WithManagedAgents(const Aws::Vector& value) { SetManagedAgents(value); return *this;} /** *

The details for the managed agent that's associated with the task.

*/ inline SubmitTaskStateChangeRequest& WithManagedAgents(Aws::Vector&& value) { SetManagedAgents(std::move(value)); return *this;} /** *

The details for the managed agent that's associated with the task.

*/ inline SubmitTaskStateChangeRequest& AddManagedAgents(const ManagedAgentStateChange& value) { m_managedAgentsHasBeenSet = true; m_managedAgents.push_back(value); return *this; } /** *

The details for the managed agent that's associated with the task.

*/ inline SubmitTaskStateChangeRequest& AddManagedAgents(ManagedAgentStateChange&& value) { m_managedAgentsHasBeenSet = true; m_managedAgents.push_back(std::move(value)); return *this; } /** *

The Unix timestamp for the time when the container image pull started.

*/ inline const Aws::Utils::DateTime& GetPullStartedAt() const{ return m_pullStartedAt; } /** *

The Unix timestamp for the time when the container image pull started.

*/ inline bool PullStartedAtHasBeenSet() const { return m_pullStartedAtHasBeenSet; } /** *

The Unix timestamp for the time when the container image pull started.

*/ inline void SetPullStartedAt(const Aws::Utils::DateTime& value) { m_pullStartedAtHasBeenSet = true; m_pullStartedAt = value; } /** *

The Unix timestamp for the time when the container image pull started.

*/ inline void SetPullStartedAt(Aws::Utils::DateTime&& value) { m_pullStartedAtHasBeenSet = true; m_pullStartedAt = std::move(value); } /** *

The Unix timestamp for the time when the container image pull started.

*/ inline SubmitTaskStateChangeRequest& WithPullStartedAt(const Aws::Utils::DateTime& value) { SetPullStartedAt(value); return *this;} /** *

The Unix timestamp for the time when the container image pull started.

*/ inline SubmitTaskStateChangeRequest& WithPullStartedAt(Aws::Utils::DateTime&& value) { SetPullStartedAt(std::move(value)); return *this;} /** *

The Unix timestamp for the time when the container image pull completed.

*/ inline const Aws::Utils::DateTime& GetPullStoppedAt() const{ return m_pullStoppedAt; } /** *

The Unix timestamp for the time when the container image pull completed.

*/ inline bool PullStoppedAtHasBeenSet() const { return m_pullStoppedAtHasBeenSet; } /** *

The Unix timestamp for the time when the container image pull completed.

*/ inline void SetPullStoppedAt(const Aws::Utils::DateTime& value) { m_pullStoppedAtHasBeenSet = true; m_pullStoppedAt = value; } /** *

The Unix timestamp for the time when the container image pull completed.

*/ inline void SetPullStoppedAt(Aws::Utils::DateTime&& value) { m_pullStoppedAtHasBeenSet = true; m_pullStoppedAt = std::move(value); } /** *

The Unix timestamp for the time when the container image pull completed.

*/ inline SubmitTaskStateChangeRequest& WithPullStoppedAt(const Aws::Utils::DateTime& value) { SetPullStoppedAt(value); return *this;} /** *

The Unix timestamp for the time when the container image pull completed.

*/ inline SubmitTaskStateChangeRequest& WithPullStoppedAt(Aws::Utils::DateTime&& value) { SetPullStoppedAt(std::move(value)); return *this;} /** *

The Unix timestamp for the time when the task execution stopped.

*/ inline const Aws::Utils::DateTime& GetExecutionStoppedAt() const{ return m_executionStoppedAt; } /** *

The Unix timestamp for the time when the task execution stopped.

*/ inline bool ExecutionStoppedAtHasBeenSet() const { return m_executionStoppedAtHasBeenSet; } /** *

The Unix timestamp for the time when the task execution stopped.

*/ inline void SetExecutionStoppedAt(const Aws::Utils::DateTime& value) { m_executionStoppedAtHasBeenSet = true; m_executionStoppedAt = value; } /** *

The Unix timestamp for the time when the task execution stopped.

*/ inline void SetExecutionStoppedAt(Aws::Utils::DateTime&& value) { m_executionStoppedAtHasBeenSet = true; m_executionStoppedAt = std::move(value); } /** *

The Unix timestamp for the time when the task execution stopped.

*/ inline SubmitTaskStateChangeRequest& WithExecutionStoppedAt(const Aws::Utils::DateTime& value) { SetExecutionStoppedAt(value); return *this;} /** *

The Unix timestamp for the time when the task execution stopped.

*/ inline SubmitTaskStateChangeRequest& WithExecutionStoppedAt(Aws::Utils::DateTime&& value) { SetExecutionStoppedAt(std::move(value)); return *this;} private: Aws::String m_cluster; bool m_clusterHasBeenSet = false; Aws::String m_task; bool m_taskHasBeenSet = false; Aws::String m_status; bool m_statusHasBeenSet = false; Aws::String m_reason; bool m_reasonHasBeenSet = false; Aws::Vector m_containers; bool m_containersHasBeenSet = false; Aws::Vector m_attachments; bool m_attachmentsHasBeenSet = false; Aws::Vector m_managedAgents; bool m_managedAgentsHasBeenSet = false; Aws::Utils::DateTime m_pullStartedAt; bool m_pullStartedAtHasBeenSet = false; Aws::Utils::DateTime m_pullStoppedAt; bool m_pullStoppedAtHasBeenSet = false; Aws::Utils::DateTime m_executionStoppedAt; bool m_executionStoppedAtHasBeenSet = false; }; } // namespace Model } // namespace ECS } // namespace Aws