7#include <aws/ecs/ECS_EXPORTS.h>
8#include <aws/core/utils/memory/stl/AWSVector.h>
9#include <aws/core/utils/memory/stl/AWSString.h>
10#include <aws/ecs/model/Connectivity.h>
11#include <aws/core/utils/DateTime.h>
12#include <aws/ecs/model/HealthStatus.h>
13#include <aws/ecs/model/LaunchType.h>
14#include <aws/ecs/model/TaskOverride.h>
15#include <aws/ecs/model/TaskStopCode.h>
16#include <aws/ecs/model/EphemeralStorage.h>
17#include <aws/ecs/model/TaskEphemeralStorage.h>
18#include <aws/ecs/model/Attachment.h>
19#include <aws/ecs/model/Attribute.h>
20#include <aws/ecs/model/Container.h>
21#include <aws/ecs/model/InferenceAccelerator.h>
22#include <aws/ecs/model/Tag.h>
48 AWS_ECS_API
Task() =
default;
61 template<
typename AttachmentsT = Aws::Vector<Attachment>>
62 void SetAttachments(AttachmentsT&& value) { m_attachmentsHasBeenSet =
true; m_attachments = std::forward<AttachmentsT>(value); }
63 template<
typename AttachmentsT = Aws::Vector<Attachment>>
65 template<
typename AttachmentsT = Attachment>
66 Task&
AddAttachments(AttachmentsT&& value) { m_attachmentsHasBeenSet =
true; m_attachments.emplace_back(std::forward<AttachmentsT>(value));
return *
this; }
75 template<
typename AttributesT = Aws::Vector<Attribute>>
76 void SetAttributes(AttributesT&& value) { m_attributesHasBeenSet =
true; m_attributes = std::forward<AttributesT>(value); }
77 template<
typename AttributesT = Aws::Vector<Attribute>>
79 template<
typename AttributesT = Attribute>
80 Task&
AddAttributes(AttributesT&& value) { m_attributesHasBeenSet =
true; m_attributes.emplace_back(std::forward<AttributesT>(value));
return *
this; }
89 template<
typename AvailabilityZoneT = Aws::String>
90 void SetAvailabilityZone(AvailabilityZoneT&& value) { m_availabilityZoneHasBeenSet =
true; m_availabilityZone = std::forward<AvailabilityZoneT>(value); }
91 template<
typename AvailabilityZoneT = Aws::String>
101 template<
typename CapacityProv
iderNameT = Aws::String>
102 void SetCapacityProviderName(CapacityProviderNameT&& value) { m_capacityProviderNameHasBeenSet =
true; m_capacityProviderName = std::forward<CapacityProviderNameT>(value); }
103 template<
typename CapacityProv
iderNameT = Aws::String>
113 template<
typename ClusterArnT = Aws::String>
114 void SetClusterArn(ClusterArnT&& value) { m_clusterArnHasBeenSet =
true; m_clusterArn = std::forward<ClusterArnT>(value); }
115 template<
typename ClusterArnT = Aws::String>
136 template<
typename ConnectivityAtT = Aws::Utils::DateTime>
137 void SetConnectivityAt(ConnectivityAtT&& value) { m_connectivityAtHasBeenSet =
true; m_connectivityAt = std::forward<ConnectivityAtT>(value); }
138 template<
typename ConnectivityAtT = Aws::Utils::DateTime>
148 template<
typename ContainerInstanceArnT = Aws::String>
149 void SetContainerInstanceArn(ContainerInstanceArnT&& value) { m_containerInstanceArnHasBeenSet =
true; m_containerInstanceArn = std::forward<ContainerInstanceArnT>(value); }
150 template<
typename ContainerInstanceArnT = Aws::String>
160 template<
typename ContainersT = Aws::Vector<Container>>
161 void SetContainers(ContainersT&& value) { m_containersHasBeenSet =
true; m_containers = std::forward<ContainersT>(value); }
162 template<
typename ContainersT = Aws::Vector<Container>>
164 template<
typename ContainersT = Container>
165 Task&
AddContainers(ContainersT&& value) { m_containersHasBeenSet =
true; m_containers.emplace_back(std::forward<ContainersT>(value));
return *
this; }
186 template<
typename CpuT = Aws::String>
187 void SetCpu(CpuT&& value) { m_cpuHasBeenSet =
true; m_cpu = std::forward<CpuT>(value); }
188 template<
typename CpuT = Aws::String>
199 template<
typename CreatedAtT = Aws::Utils::DateTime>
200 void SetCreatedAt(CreatedAtT&& value) { m_createdAtHasBeenSet =
true; m_createdAt = std::forward<CreatedAtT>(value); }
201 template<
typename CreatedAtT = Aws::Utils::DateTime>
213 template<
typename DesiredStatusT = Aws::String>
214 void SetDesiredStatus(DesiredStatusT&& value) { m_desiredStatusHasBeenSet =
true; m_desiredStatus = std::forward<DesiredStatusT>(value); }
215 template<
typename DesiredStatusT = Aws::String>
237 template<
typename ExecutionStoppedAtT = Aws::Utils::DateTime>
238 void SetExecutionStoppedAt(ExecutionStoppedAtT&& value) { m_executionStoppedAtHasBeenSet =
true; m_executionStoppedAt = std::forward<ExecutionStoppedAtT>(value); }
239 template<
typename ExecutionStoppedAtT = Aws::Utils::DateTime>
249 template<
typename GroupT = Aws::String>
250 void SetGroup(GroupT&& value) { m_groupHasBeenSet =
true; m_group = std::forward<GroupT>(value); }
251 template<
typename GroupT = Aws::String>
282 template<
typename InferenceAcceleratorsT = Aws::Vector<InferenceAccelerator>>
283 void SetInferenceAccelerators(InferenceAcceleratorsT&& value) { m_inferenceAcceleratorsHasBeenSet =
true; m_inferenceAccelerators = std::forward<InferenceAcceleratorsT>(value); }
284 template<
typename InferenceAcceleratorsT = Aws::Vector<InferenceAccelerator>>
286 template<
typename InferenceAcceleratorsT = InferenceAccelerator>
287 Task&
AddInferenceAccelerators(InferenceAcceleratorsT&& value) { m_inferenceAcceleratorsHasBeenSet =
true; m_inferenceAccelerators.emplace_back(std::forward<InferenceAcceleratorsT>(value));
return *
this; }
298 template<
typename LastStatusT = Aws::String>
299 void SetLastStatus(LastStatusT&& value) { m_lastStatusHasBeenSet =
true; m_lastStatus = std::forward<LastStatusT>(value); }
300 template<
typename LastStatusT = Aws::String>
344 template<
typename MemoryT = Aws::String>
345 void SetMemory(MemoryT&& value) { m_memoryHasBeenSet =
true; m_memory = std::forward<MemoryT>(value); }
346 template<
typename MemoryT = Aws::String>
356 template<
typename Overr
idesT = TaskOverr
ide>
357 void SetOverrides(OverridesT&& value) { m_overridesHasBeenSet =
true; m_overrides = std::forward<OverridesT>(value); }
358 template<
typename Overr
idesT = TaskOverr
ide>
373 template<
typename PlatformVersionT = Aws::String>
374 void SetPlatformVersion(PlatformVersionT&& value) { m_platformVersionHasBeenSet =
true; m_platformVersion = std::forward<PlatformVersionT>(value); }
375 template<
typename PlatformVersionT = Aws::String>
388 template<
typename PlatformFamilyT = Aws::String>
389 void SetPlatformFamily(PlatformFamilyT&& value) { m_platformFamilyHasBeenSet =
true; m_platformFamily = std::forward<PlatformFamilyT>(value); }
390 template<
typename PlatformFamilyT = Aws::String>
400 template<
typename PullStartedAtT = Aws::Utils::DateTime>
401 void SetPullStartedAt(PullStartedAtT&& value) { m_pullStartedAtHasBeenSet =
true; m_pullStartedAt = std::forward<PullStartedAtT>(value); }
402 template<
typename PullStartedAtT = Aws::Utils::DateTime>
412 template<
typename PullStoppedAtT = Aws::Utils::DateTime>
413 void SetPullStoppedAt(PullStoppedAtT&& value) { m_pullStoppedAtHasBeenSet =
true; m_pullStoppedAt = std::forward<PullStoppedAtT>(value); }
414 template<
typename PullStoppedAtT = Aws::Utils::DateTime>
426 template<
typename StartedAtT = Aws::Utils::DateTime>
427 void SetStartedAt(StartedAtT&& value) { m_startedAtHasBeenSet =
true; m_startedAt = std::forward<StartedAtT>(value); }
428 template<
typename StartedAtT = Aws::Utils::DateTime>
440 template<
typename StartedByT = Aws::String>
441 void SetStartedBy(StartedByT&& value) { m_startedByHasBeenSet =
true; m_startedBy = std::forward<StartedByT>(value); }
442 template<
typename StartedByT = Aws::String>
468 template<
typename StoppedAtT = Aws::Utils::DateTime>
469 void SetStoppedAt(StoppedAtT&& value) { m_stoppedAtHasBeenSet =
true; m_stoppedAt = std::forward<StoppedAtT>(value); }
470 template<
typename StoppedAtT = Aws::Utils::DateTime>
480 template<
typename StoppedReasonT = Aws::String>
481 void SetStoppedReason(StoppedReasonT&& value) { m_stoppedReasonHasBeenSet =
true; m_stoppedReason = std::forward<StoppedReasonT>(value); }
482 template<
typename StoppedReasonT = Aws::String>
494 template<
typename StoppingAtT = Aws::Utils::DateTime>
495 void SetStoppingAt(StoppingAtT&& value) { m_stoppingAtHasBeenSet =
true; m_stoppingAt = std::forward<StoppingAtT>(value); }
496 template<
typename StoppingAtT = Aws::Utils::DateTime>
522 template<
typename TagsT = Aws::Vector<Tag>>
523 void SetTags(TagsT&& value) { m_tagsHasBeenSet =
true; m_tags = std::forward<TagsT>(value); }
524 template<
typename TagsT = Aws::Vector<Tag>>
526 template<
typename TagsT = Tag>
527 Task&
AddTags(TagsT&& value) { m_tagsHasBeenSet =
true; m_tags.emplace_back(std::forward<TagsT>(value));
return *
this; }
536 template<
typename TaskArnT = Aws::String>
537 void SetTaskArn(TaskArnT&& value) { m_taskArnHasBeenSet =
true; m_taskArn = std::forward<TaskArnT>(value); }
538 template<
typename TaskArnT = Aws::String>
548 template<
typename TaskDefinitionArnT = Aws::String>
549 void SetTaskDefinitionArn(TaskDefinitionArnT&& value) { m_taskDefinitionArnHasBeenSet =
true; m_taskDefinitionArn = std::forward<TaskDefinitionArnT>(value); }
550 template<
typename TaskDefinitionArnT = Aws::String>
565 inline void SetVersion(
long long value) { m_versionHasBeenSet =
true; m_version = value; }
575 template<
typename EphemeralStorageT = EphemeralStorage>
576 void SetEphemeralStorage(EphemeralStorageT&& value) { m_ephemeralStorageHasBeenSet =
true; m_ephemeralStorage = std::forward<EphemeralStorageT>(value); }
577 template<
typename EphemeralStorageT = EphemeralStorage>
587 template<
typename FargateEphemeralStorageT = TaskEphemeralStorage>
588 void SetFargateEphemeralStorage(FargateEphemeralStorageT&& value) { m_fargateEphemeralStorageHasBeenSet =
true; m_fargateEphemeralStorage = std::forward<FargateEphemeralStorageT>(value); }
589 template<
typename FargateEphemeralStorageT = TaskEphemeralStorage>
595 bool m_attachmentsHasBeenSet =
false;
598 bool m_attributesHasBeenSet =
false;
601 bool m_availabilityZoneHasBeenSet =
false;
604 bool m_capacityProviderNameHasBeenSet =
false;
607 bool m_clusterArnHasBeenSet =
false;
610 bool m_connectivityHasBeenSet =
false;
613 bool m_connectivityAtHasBeenSet =
false;
616 bool m_containerInstanceArnHasBeenSet =
false;
619 bool m_containersHasBeenSet =
false;
622 bool m_cpuHasBeenSet =
false;
625 bool m_createdAtHasBeenSet =
false;
628 bool m_desiredStatusHasBeenSet =
false;
630 bool m_enableExecuteCommand{
false};
631 bool m_enableExecuteCommandHasBeenSet =
false;
634 bool m_executionStoppedAtHasBeenSet =
false;
637 bool m_groupHasBeenSet =
false;
640 bool m_healthStatusHasBeenSet =
false;
643 bool m_inferenceAcceleratorsHasBeenSet =
false;
646 bool m_lastStatusHasBeenSet =
false;
649 bool m_launchTypeHasBeenSet =
false;
652 bool m_memoryHasBeenSet =
false;
654 TaskOverride m_overrides;
655 bool m_overridesHasBeenSet =
false;
658 bool m_platformVersionHasBeenSet =
false;
661 bool m_platformFamilyHasBeenSet =
false;
664 bool m_pullStartedAtHasBeenSet =
false;
667 bool m_pullStoppedAtHasBeenSet =
false;
670 bool m_startedAtHasBeenSet =
false;
673 bool m_startedByHasBeenSet =
false;
676 bool m_stopCodeHasBeenSet =
false;
679 bool m_stoppedAtHasBeenSet =
false;
682 bool m_stoppedReasonHasBeenSet =
false;
685 bool m_stoppingAtHasBeenSet =
false;
688 bool m_tagsHasBeenSet =
false;
691 bool m_taskArnHasBeenSet =
false;
694 bool m_taskDefinitionArnHasBeenSet =
false;
696 long long m_version{0};
697 bool m_versionHasBeenSet =
false;
699 EphemeralStorage m_ephemeralStorage;
700 bool m_ephemeralStorageHasBeenSet =
false;
702 TaskEphemeralStorage m_fargateEphemeralStorage;
703 bool m_fargateEphemeralStorageHasBeenSet =
false;
void SetLaunchType(LaunchType value)
Task & AddInferenceAccelerators(InferenceAcceleratorsT &&value)
bool EphemeralStorageHasBeenSet() const
void SetEphemeralStorage(EphemeralStorageT &&value)
void SetStopCode(TaskStopCode value)
void SetLastStatus(LastStatusT &&value)
Task & WithGroup(GroupT &&value)
Task & WithCpu(CpuT &&value)
TaskStopCode GetStopCode() const
void SetConnectivityAt(ConnectivityAtT &&value)
long long GetVersion() const
Task & AddContainers(ContainersT &&value)
Task & WithContainers(ContainersT &&value)
void SetTags(TagsT &&value)
Task & AddAttributes(AttributesT &&value)
bool VersionHasBeenSet() const
Task & WithCreatedAt(CreatedAtT &&value)
bool DesiredStatusHasBeenSet() const
void SetExecutionStoppedAt(ExecutionStoppedAtT &&value)
bool HealthStatusHasBeenSet() const
bool CapacityProviderNameHasBeenSet() const
const Aws::Vector< Attachment > & GetAttachments() const
void SetCapacityProviderName(CapacityProviderNameT &&value)
bool OverridesHasBeenSet() const
void SetPlatformVersion(PlatformVersionT &&value)
Task & WithAttributes(AttributesT &&value)
const Aws::String & GetAvailabilityZone() const
Task & WithFargateEphemeralStorage(FargateEphemeralStorageT &&value)
Task & WithInferenceAccelerators(InferenceAcceleratorsT &&value)
Task & WithDesiredStatus(DesiredStatusT &&value)
void SetCreatedAt(CreatedAtT &&value)
Task & WithCapacityProviderName(CapacityProviderNameT &&value)
Task & WithExecutionStoppedAt(ExecutionStoppedAtT &&value)
bool AttachmentsHasBeenSet() const
bool StartedAtHasBeenSet() const
const TaskOverride & GetOverrides() const
Task & WithAvailabilityZone(AvailabilityZoneT &&value)
Task & WithLastStatus(LastStatusT &&value)
void SetContainerInstanceArn(ContainerInstanceArnT &&value)
Task & WithStoppedReason(StoppedReasonT &&value)
Task & WithLaunchType(LaunchType value)
const Aws::Utils::DateTime & GetCreatedAt() const
Task & WithStopCode(TaskStopCode value)
void SetHealthStatus(HealthStatus value)
bool TaskArnHasBeenSet() const
bool LastStatusHasBeenSet() const
bool FargateEphemeralStorageHasBeenSet() const
void SetVersion(long long value)
Task & WithConnectivityAt(ConnectivityAtT &&value)
HealthStatus GetHealthStatus() const
bool EnableExecuteCommandHasBeenSet() const
Task & WithPullStoppedAt(PullStoppedAtT &&value)
Task & WithHealthStatus(HealthStatus value)
void SetFargateEphemeralStorage(FargateEphemeralStorageT &&value)
bool PlatformVersionHasBeenSet() const
bool StopCodeHasBeenSet() const
Task & WithEnableExecuteCommand(bool value)
const Aws::Utils::DateTime & GetStartedAt() const
Connectivity GetConnectivity() const
void SetAttachments(AttachmentsT &&value)
AWS_ECS_API Task & operator=(Aws::Utils::Json::JsonView jsonValue)
const Aws::String & GetStoppedReason() const
bool TaskDefinitionArnHasBeenSet() const
bool ExecutionStoppedAtHasBeenSet() const
bool AvailabilityZoneHasBeenSet() const
const Aws::String & GetContainerInstanceArn() const
const Aws::String & GetTaskArn() const
Task & WithStartedBy(StartedByT &&value)
void SetStoppingAt(StoppingAtT &&value)
Task & WithStoppingAt(StoppingAtT &&value)
bool PlatformFamilyHasBeenSet() const
void SetOverrides(OverridesT &&value)
bool ConnectivityHasBeenSet() const
Task & AddAttachments(AttachmentsT &&value)
bool ContainersHasBeenSet() const
bool CreatedAtHasBeenSet() const
Task & WithVersion(long long value)
const Aws::Utils::DateTime & GetConnectivityAt() const
AWS_ECS_API Task()=default
bool StoppingAtHasBeenSet() const
const Aws::String & GetClusterArn() const
const Aws::String & GetLastStatus() const
const Aws::String & GetMemory() const
void SetPullStartedAt(PullStartedAtT &&value)
const Aws::Utils::DateTime & GetStoppedAt() const
const Aws::String & GetCapacityProviderName() const
void SetPlatformFamily(PlatformFamilyT &&value)
Task & WithPullStartedAt(PullStartedAtT &&value)
Task & WithStoppedAt(StoppedAtT &&value)
const Aws::Utils::DateTime & GetPullStoppedAt() const
Task & WithAttachments(AttachmentsT &&value)
const Aws::Vector< Tag > & GetTags() const
bool MemoryHasBeenSet() const
bool TagsHasBeenSet() const
void SetStartedBy(StartedByT &&value)
const EphemeralStorage & GetEphemeralStorage() const
const Aws::String & GetCpu() const
Task & WithContainerInstanceArn(ContainerInstanceArnT &&value)
Task & WithClusterArn(ClusterArnT &&value)
void SetEnableExecuteCommand(bool value)
void SetTaskDefinitionArn(TaskDefinitionArnT &&value)
const Aws::String & GetGroup() const
const Aws::Vector< Container > & GetContainers() const
bool GroupHasBeenSet() const
void SetConnectivity(Connectivity value)
const Aws::String & GetDesiredStatus() const
bool StartedByHasBeenSet() const
void SetGroup(GroupT &&value)
const Aws::Utils::DateTime & GetStoppingAt() const
bool ClusterArnHasBeenSet() const
void SetAttributes(AttributesT &&value)
void SetStoppedAt(StoppedAtT &&value)
void SetTaskArn(TaskArnT &&value)
LaunchType GetLaunchType() const
Task & WithTags(TagsT &&value)
void SetAvailabilityZone(AvailabilityZoneT &&value)
bool PullStartedAtHasBeenSet() const
void SetClusterArn(ClusterArnT &&value)
bool AttributesHasBeenSet() const
const Aws::String & GetStartedBy() const
void SetStartedAt(StartedAtT &&value)
void SetContainers(ContainersT &&value)
bool InferenceAcceleratorsHasBeenSet() const
const Aws::String & GetPlatformVersion() const
void SetCpu(CpuT &&value)
void SetMemory(MemoryT &&value)
bool PullStoppedAtHasBeenSet() const
Task & WithEphemeralStorage(EphemeralStorageT &&value)
Task & WithTaskDefinitionArn(TaskDefinitionArnT &&value)
const Aws::Utils::DateTime & GetPullStartedAt() const
bool LaunchTypeHasBeenSet() const
Task & WithConnectivity(Connectivity value)
bool GetEnableExecuteCommand() const
bool StoppedAtHasBeenSet() const
Task & WithTaskArn(TaskArnT &&value)
void SetInferenceAccelerators(InferenceAcceleratorsT &&value)
bool CpuHasBeenSet() const
const TaskEphemeralStorage & GetFargateEphemeralStorage() const
bool StoppedReasonHasBeenSet() const
bool ConnectivityAtHasBeenSet() const
void SetDesiredStatus(DesiredStatusT &&value)
const Aws::Vector< Attribute > & GetAttributes() const
void SetStoppedReason(StoppedReasonT &&value)
AWS_ECS_API Task(Aws::Utils::Json::JsonView jsonValue)
const Aws::String & GetPlatformFamily() const
const Aws::String & GetTaskDefinitionArn() const
AWS_ECS_API Aws::Utils::Json::JsonValue Jsonize() const
Task & WithPlatformFamily(PlatformFamilyT &&value)
const Aws::Vector< InferenceAccelerator > & GetInferenceAccelerators() const
Task & WithOverrides(OverridesT &&value)
const Aws::Utils::DateTime & GetExecutionStoppedAt() const
Task & WithPlatformVersion(PlatformVersionT &&value)
Task & AddTags(TagsT &&value)
void SetPullStoppedAt(PullStoppedAtT &&value)
Task & WithStartedAt(StartedAtT &&value)
bool ContainerInstanceArnHasBeenSet() const
Task & WithMemory(MemoryT &&value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue