aws-sdk-ecs 1.124.0

AWS SDK for Amazon EC2 Container Service
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>Details on a task in a cluster.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Task {
    /// <p>The Elastic Network Adapter that's associated with the task if the task uses the <code>awsvpc</code> network mode.</p>
    pub attachments: ::std::option::Option<::std::vec::Vec<crate::types::Attachment>>,
    /// <p>The attributes of the task</p>
    pub attributes: ::std::option::Option<::std::vec::Vec<crate::types::Attribute>>,
    /// <p>The Availability Zone for the task.</p>
    pub availability_zone: ::std::option::Option<::std::string::String>,
    /// <p>The capacity provider that's associated with the task.</p>
    pub capacity_provider_name: ::std::option::Option<::std::string::String>,
    /// <p>The ARN of the cluster that hosts the task.</p>
    pub cluster_arn: ::std::option::Option<::std::string::String>,
    /// <p>The connectivity status of a task.</p>
    pub connectivity: ::std::option::Option<crate::types::Connectivity>,
    /// <p>The Unix timestamp for the time when the task last went into <code>CONNECTED</code> status.</p>
    pub connectivity_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>The ARN of the container instances that host the task.</p>
    pub container_instance_arn: ::std::option::Option<::std::string::String>,
    /// <p>The containers that's associated with the task.</p>
    pub containers: ::std::option::Option<::std::vec::Vec<crate::types::Container>>,
    /// <p>The number of CPU units used by the task as expressed in a task definition. It can be expressed as an integer using CPU units (for example, <code>1024</code>). It can also be expressed as a string using vCPUs (for example, <code>1 vCPU</code> or <code>1 vcpu</code>). String values are converted to an integer that indicates the CPU units when the task definition is registered.</p>
    /// <p>If you're using the EC2 launch type or the external launch type, this field is optional. Supported values are between <code>128</code> CPU units (<code>0.125</code> vCPUs) and <code>196608</code> CPU units (<code>192</code> vCPUs). If you do not specify a value, the parameter is ignored.</p>
    /// <p>This field is required for Fargate. For information about the valid values, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definition_parameters.html#task_size">Task size</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p>
    pub cpu: ::std::option::Option<::std::string::String>,
    /// <p>The Unix timestamp for the time when the task was created. More specifically, it's for the time when the task entered the <code>PENDING</code> state.</p>
    pub created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>The desired status of the task. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-lifecycle.html">Task Lifecycle</a>.</p>
    pub desired_status: ::std::option::Option<::std::string::String>,
    /// <p>Determines whether execute command functionality is turned on for this task. If <code>true</code>, execute command functionality is turned on all the containers in the task.</p>
    pub enable_execute_command: bool,
    /// <p>The Unix timestamp for the time when the task execution stopped.</p>
    pub execution_stopped_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>The name of the task group that's associated with the task.</p>
    pub group: ::std::option::Option<::std::string::String>,
    /// <p>The health status for the task. It's determined by the health of the essential containers in the task. If all essential containers in the task are reporting as <code>HEALTHY</code>, the task status also reports as <code>HEALTHY</code>. If any essential containers in the task are reporting as <code>UNHEALTHY</code> or <code>UNKNOWN</code>, the task status also reports as <code>UNHEALTHY</code> or <code>UNKNOWN</code>.</p><note>
    /// <p>The Amazon ECS container agent doesn't monitor or report on Docker health checks that are embedded in a container image and not specified in the container definition. For example, this includes those specified in a parent image or from the image's Dockerfile. Health check parameters that are specified in a container definition override any Docker health checks that are found in the container image.</p>
    /// </note>
    pub health_status: ::std::option::Option<crate::types::HealthStatus>,
    /// <p>The Elastic Inference accelerator that's associated with the task.</p>
    pub inference_accelerators: ::std::option::Option<::std::vec::Vec<crate::types::InferenceAccelerator>>,
    /// <p>The last known status for the task. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-lifecycle.html">Task Lifecycle</a>.</p>
    pub last_status: ::std::option::Option<::std::string::String>,
    /// <p>The infrastructure where your task runs on. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html">Amazon ECS launch types</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p>
    pub launch_type: ::std::option::Option<crate::types::LaunchType>,
    /// <p>The amount of memory (in MiB) that the task uses as expressed in a task definition. It can be expressed as an integer using MiB (for example, <code>1024</code>). If it's expressed as a string using GB (for example, <code>1GB</code> or <code>1 GB</code>), it's converted to an integer indicating the MiB when the task definition is registered.</p>
    /// <p>If you use the EC2 launch type, this field is optional.</p>
    /// <p>If you use the Fargate launch type, this field is required. You must use one of the following values. The value that you choose determines the range of supported values for the <code>cpu</code> parameter.</p>
    /// <ul>
    /// <li>
    /// <p>512 (0.5 GB), 1024 (1 GB), 2048 (2 GB) - Available <code>cpu</code> values: 256 (.25 vCPU)</p></li>
    /// <li>
    /// <p>1024 (1 GB), 2048 (2 GB), 3072 (3 GB), 4096 (4 GB) - Available <code>cpu</code> values: 512 (.5 vCPU)</p></li>
    /// <li>
    /// <p>2048 (2 GB), 3072 (3 GB), 4096 (4 GB), 5120 (5 GB), 6144 (6 GB), 7168 (7 GB), 8192 (8 GB) - Available <code>cpu</code> values: 1024 (1 vCPU)</p></li>
    /// <li>
    /// <p>Between 4096 (4 GB) and 16384 (16 GB) in increments of 1024 (1 GB) - Available <code>cpu</code> values: 2048 (2 vCPU)</p></li>
    /// <li>
    /// <p>Between 8192 (8 GB) and 30720 (30 GB) in increments of 1024 (1 GB) - Available <code>cpu</code> values: 4096 (4 vCPU)</p></li>
    /// <li>
    /// <p>Between 16 GB and 60 GB in 4 GB increments - Available <code>cpu</code> values: 8192 (8 vCPU)</p>
    /// <p>This option requires Linux platform <code>1.4.0</code> or later.</p></li>
    /// <li>
    /// <p>Between 32GB and 120 GB in 8 GB increments - Available <code>cpu</code> values: 16384 (16 vCPU)</p>
    /// <p>This option requires Linux platform <code>1.4.0</code> or later.</p></li>
    /// </ul>
    pub memory: ::std::option::Option<::std::string::String>,
    /// <p>One or more container overrides.</p>
    pub overrides: ::std::option::Option<crate::types::TaskOverride>,
    /// <p>The platform version where your task runs on. A platform version is only specified for tasks that use the Fargate launch type. If you didn't specify one, the <code>LATEST</code> platform version is used. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/platform_versions.html">Fargate Platform Versions</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p>
    pub platform_version: ::std::option::Option<::std::string::String>,
    /// <p>The operating system that your tasks are running on. A platform family is specified only for tasks that use the Fargate launch type.</p>
    /// <p>All tasks that run as part of this service must use the same <code>platformFamily</code> value as the service (for example, <code>LINUX.</code>).</p>
    pub platform_family: ::std::option::Option<::std::string::String>,
    /// <p>The Unix timestamp for the time when the container image pull began.</p>
    pub pull_started_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>The Unix timestamp for the time when the container image pull completed.</p>
    pub pull_stopped_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>The Unix timestamp for the time when the task started. More specifically, it's for the time when the task transitioned from the <code>PENDING</code> state to the <code>RUNNING</code> state.</p>
    pub started_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>The tag specified when a task is started. If an Amazon ECS service started the task, the <code>startedBy</code> parameter contains the deployment ID of that service.</p>
    pub started_by: ::std::option::Option<::std::string::String>,
    /// <p>The stop code indicating why a task was stopped. The <code>stoppedReason</code> might contain additional details.</p>
    /// <p>For more information about stop code, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/stopped-task-error-codes.html">Stopped tasks error codes</a> in the <i>Amazon ECS Developer Guide</i>.</p>
    pub stop_code: ::std::option::Option<crate::types::TaskStopCode>,
    /// <p>The Unix timestamp for the time when the task was stopped. More specifically, it's for the time when the task transitioned from the <code>RUNNING</code> state to the <code>STOPPED</code> state.</p>
    pub stopped_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>The reason that the task was stopped.</p>
    pub stopped_reason: ::std::option::Option<::std::string::String>,
    /// <p>The Unix timestamp for the time when the task stops. More specifically, it's for the time when the task transitions from the <code>RUNNING</code> state to <code>STOPPING</code>.</p>
    pub stopping_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>The metadata that you apply to the task to help you categorize and organize the task. Each tag consists of a key and an optional value. You define both the key and value.</p>
    /// <p>The following basic restrictions apply to tags:</p>
    /// <ul>
    /// <li>
    /// <p>Maximum number of tags per resource - 50</p></li>
    /// <li>
    /// <p>For each resource, each tag key must be unique, and each tag key can have only one value.</p></li>
    /// <li>
    /// <p>Maximum key length - 128 Unicode characters in UTF-8</p></li>
    /// <li>
    /// <p>Maximum value length - 256 Unicode characters in UTF-8</p></li>
    /// <li>
    /// <p>If your tagging schema is used across multiple services and resources, remember that other services may have restrictions on allowed characters. Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following characters: + - = . _ : / @.</p></li>
    /// <li>
    /// <p>Tag keys and values are case-sensitive.</p></li>
    /// <li>
    /// <p>Do not use <code>aws:</code>, <code>AWS:</code>, or any upper or lowercase combination of such as a prefix for either keys or values as it is reserved for Amazon Web Services use. You cannot edit or delete tag keys or values with this prefix. Tags with this prefix do not count against your tags per resource limit.</p></li>
    /// </ul>
    pub tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
    /// <p>The Amazon Resource Name (ARN) of the task.</p>
    pub task_arn: ::std::option::Option<::std::string::String>,
    /// <p>The ARN of the task definition that creates the task.</p>
    pub task_definition_arn: ::std::option::Option<::std::string::String>,
    /// <p>The version counter for the task. Every time a task experiences a change that starts a CloudWatch event, the version counter is incremented. If you replicate your Amazon ECS task state with CloudWatch Events, you can compare the version of a task reported by the Amazon ECS API actions with the version reported in CloudWatch Events for the task (inside the <code>detail</code> object) to verify that the version in your event stream is current.</p>
    pub version: i64,
    /// <p>The ephemeral storage settings for the task.</p>
    pub ephemeral_storage: ::std::option::Option<crate::types::EphemeralStorage>,
    /// <p>The Fargate ephemeral storage settings for the task.</p>
    pub fargate_ephemeral_storage: ::std::option::Option<crate::types::TaskEphemeralStorage>,
}
impl Task {
    /// <p>The Elastic Network Adapter that's associated with the task if the task uses the <code>awsvpc</code> network mode.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.attachments.is_none()`.
    pub fn attachments(&self) -> &[crate::types::Attachment] {
        self.attachments.as_deref().unwrap_or_default()
    }
    /// <p>The attributes of the task</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.attributes.is_none()`.
    pub fn attributes(&self) -> &[crate::types::Attribute] {
        self.attributes.as_deref().unwrap_or_default()
    }
    /// <p>The Availability Zone for the task.</p>
    pub fn availability_zone(&self) -> ::std::option::Option<&str> {
        self.availability_zone.as_deref()
    }
    /// <p>The capacity provider that's associated with the task.</p>
    pub fn capacity_provider_name(&self) -> ::std::option::Option<&str> {
        self.capacity_provider_name.as_deref()
    }
    /// <p>The ARN of the cluster that hosts the task.</p>
    pub fn cluster_arn(&self) -> ::std::option::Option<&str> {
        self.cluster_arn.as_deref()
    }
    /// <p>The connectivity status of a task.</p>
    pub fn connectivity(&self) -> ::std::option::Option<&crate::types::Connectivity> {
        self.connectivity.as_ref()
    }
    /// <p>The Unix timestamp for the time when the task last went into <code>CONNECTED</code> status.</p>
    pub fn connectivity_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.connectivity_at.as_ref()
    }
    /// <p>The ARN of the container instances that host the task.</p>
    pub fn container_instance_arn(&self) -> ::std::option::Option<&str> {
        self.container_instance_arn.as_deref()
    }
    /// <p>The containers that's associated with the task.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.containers.is_none()`.
    pub fn containers(&self) -> &[crate::types::Container] {
        self.containers.as_deref().unwrap_or_default()
    }
    /// <p>The number of CPU units used by the task as expressed in a task definition. It can be expressed as an integer using CPU units (for example, <code>1024</code>). It can also be expressed as a string using vCPUs (for example, <code>1 vCPU</code> or <code>1 vcpu</code>). String values are converted to an integer that indicates the CPU units when the task definition is registered.</p>
    /// <p>If you're using the EC2 launch type or the external launch type, this field is optional. Supported values are between <code>128</code> CPU units (<code>0.125</code> vCPUs) and <code>196608</code> CPU units (<code>192</code> vCPUs). If you do not specify a value, the parameter is ignored.</p>
    /// <p>This field is required for Fargate. For information about the valid values, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definition_parameters.html#task_size">Task size</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p>
    pub fn cpu(&self) -> ::std::option::Option<&str> {
        self.cpu.as_deref()
    }
    /// <p>The Unix timestamp for the time when the task was created. More specifically, it's for the time when the task entered the <code>PENDING</code> state.</p>
    pub fn created_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.created_at.as_ref()
    }
    /// <p>The desired status of the task. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-lifecycle.html">Task Lifecycle</a>.</p>
    pub fn desired_status(&self) -> ::std::option::Option<&str> {
        self.desired_status.as_deref()
    }
    /// <p>Determines whether execute command functionality is turned on for this task. If <code>true</code>, execute command functionality is turned on all the containers in the task.</p>
    pub fn enable_execute_command(&self) -> bool {
        self.enable_execute_command
    }
    /// <p>The Unix timestamp for the time when the task execution stopped.</p>
    pub fn execution_stopped_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.execution_stopped_at.as_ref()
    }
    /// <p>The name of the task group that's associated with the task.</p>
    pub fn group(&self) -> ::std::option::Option<&str> {
        self.group.as_deref()
    }
    /// <p>The health status for the task. It's determined by the health of the essential containers in the task. If all essential containers in the task are reporting as <code>HEALTHY</code>, the task status also reports as <code>HEALTHY</code>. If any essential containers in the task are reporting as <code>UNHEALTHY</code> or <code>UNKNOWN</code>, the task status also reports as <code>UNHEALTHY</code> or <code>UNKNOWN</code>.</p><note>
    /// <p>The Amazon ECS container agent doesn't monitor or report on Docker health checks that are embedded in a container image and not specified in the container definition. For example, this includes those specified in a parent image or from the image's Dockerfile. Health check parameters that are specified in a container definition override any Docker health checks that are found in the container image.</p>
    /// </note>
    pub fn health_status(&self) -> ::std::option::Option<&crate::types::HealthStatus> {
        self.health_status.as_ref()
    }
    /// <p>The Elastic Inference accelerator that's associated with the task.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.inference_accelerators.is_none()`.
    pub fn inference_accelerators(&self) -> &[crate::types::InferenceAccelerator] {
        self.inference_accelerators.as_deref().unwrap_or_default()
    }
    /// <p>The last known status for the task. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-lifecycle.html">Task Lifecycle</a>.</p>
    pub fn last_status(&self) -> ::std::option::Option<&str> {
        self.last_status.as_deref()
    }
    /// <p>The infrastructure where your task runs on. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html">Amazon ECS launch types</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p>
    pub fn launch_type(&self) -> ::std::option::Option<&crate::types::LaunchType> {
        self.launch_type.as_ref()
    }
    /// <p>The amount of memory (in MiB) that the task uses as expressed in a task definition. It can be expressed as an integer using MiB (for example, <code>1024</code>). If it's expressed as a string using GB (for example, <code>1GB</code> or <code>1 GB</code>), it's converted to an integer indicating the MiB when the task definition is registered.</p>
    /// <p>If you use the EC2 launch type, this field is optional.</p>
    /// <p>If you use the Fargate launch type, this field is required. You must use one of the following values. The value that you choose determines the range of supported values for the <code>cpu</code> parameter.</p>
    /// <ul>
    /// <li>
    /// <p>512 (0.5 GB), 1024 (1 GB), 2048 (2 GB) - Available <code>cpu</code> values: 256 (.25 vCPU)</p></li>
    /// <li>
    /// <p>1024 (1 GB), 2048 (2 GB), 3072 (3 GB), 4096 (4 GB) - Available <code>cpu</code> values: 512 (.5 vCPU)</p></li>
    /// <li>
    /// <p>2048 (2 GB), 3072 (3 GB), 4096 (4 GB), 5120 (5 GB), 6144 (6 GB), 7168 (7 GB), 8192 (8 GB) - Available <code>cpu</code> values: 1024 (1 vCPU)</p></li>
    /// <li>
    /// <p>Between 4096 (4 GB) and 16384 (16 GB) in increments of 1024 (1 GB) - Available <code>cpu</code> values: 2048 (2 vCPU)</p></li>
    /// <li>
    /// <p>Between 8192 (8 GB) and 30720 (30 GB) in increments of 1024 (1 GB) - Available <code>cpu</code> values: 4096 (4 vCPU)</p></li>
    /// <li>
    /// <p>Between 16 GB and 60 GB in 4 GB increments - Available <code>cpu</code> values: 8192 (8 vCPU)</p>
    /// <p>This option requires Linux platform <code>1.4.0</code> or later.</p></li>
    /// <li>
    /// <p>Between 32GB and 120 GB in 8 GB increments - Available <code>cpu</code> values: 16384 (16 vCPU)</p>
    /// <p>This option requires Linux platform <code>1.4.0</code> or later.</p></li>
    /// </ul>
    pub fn memory(&self) -> ::std::option::Option<&str> {
        self.memory.as_deref()
    }
    /// <p>One or more container overrides.</p>
    pub fn overrides(&self) -> ::std::option::Option<&crate::types::TaskOverride> {
        self.overrides.as_ref()
    }
    /// <p>The platform version where your task runs on. A platform version is only specified for tasks that use the Fargate launch type. If you didn't specify one, the <code>LATEST</code> platform version is used. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/platform_versions.html">Fargate Platform Versions</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p>
    pub fn platform_version(&self) -> ::std::option::Option<&str> {
        self.platform_version.as_deref()
    }
    /// <p>The operating system that your tasks are running on. A platform family is specified only for tasks that use the Fargate launch type.</p>
    /// <p>All tasks that run as part of this service must use the same <code>platformFamily</code> value as the service (for example, <code>LINUX.</code>).</p>
    pub fn platform_family(&self) -> ::std::option::Option<&str> {
        self.platform_family.as_deref()
    }
    /// <p>The Unix timestamp for the time when the container image pull began.</p>
    pub fn pull_started_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.pull_started_at.as_ref()
    }
    /// <p>The Unix timestamp for the time when the container image pull completed.</p>
    pub fn pull_stopped_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.pull_stopped_at.as_ref()
    }
    /// <p>The Unix timestamp for the time when the task started. More specifically, it's for the time when the task transitioned from the <code>PENDING</code> state to the <code>RUNNING</code> state.</p>
    pub fn started_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.started_at.as_ref()
    }
    /// <p>The tag specified when a task is started. If an Amazon ECS service started the task, the <code>startedBy</code> parameter contains the deployment ID of that service.</p>
    pub fn started_by(&self) -> ::std::option::Option<&str> {
        self.started_by.as_deref()
    }
    /// <p>The stop code indicating why a task was stopped. The <code>stoppedReason</code> might contain additional details.</p>
    /// <p>For more information about stop code, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/stopped-task-error-codes.html">Stopped tasks error codes</a> in the <i>Amazon ECS Developer Guide</i>.</p>
    pub fn stop_code(&self) -> ::std::option::Option<&crate::types::TaskStopCode> {
        self.stop_code.as_ref()
    }
    /// <p>The Unix timestamp for the time when the task was stopped. More specifically, it's for the time when the task transitioned from the <code>RUNNING</code> state to the <code>STOPPED</code> state.</p>
    pub fn stopped_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.stopped_at.as_ref()
    }
    /// <p>The reason that the task was stopped.</p>
    pub fn stopped_reason(&self) -> ::std::option::Option<&str> {
        self.stopped_reason.as_deref()
    }
    /// <p>The Unix timestamp for the time when the task stops. More specifically, it's for the time when the task transitions from the <code>RUNNING</code> state to <code>STOPPING</code>.</p>
    pub fn stopping_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.stopping_at.as_ref()
    }
    /// <p>The metadata that you apply to the task to help you categorize and organize the task. Each tag consists of a key and an optional value. You define both the key and value.</p>
    /// <p>The following basic restrictions apply to tags:</p>
    /// <ul>
    /// <li>
    /// <p>Maximum number of tags per resource - 50</p></li>
    /// <li>
    /// <p>For each resource, each tag key must be unique, and each tag key can have only one value.</p></li>
    /// <li>
    /// <p>Maximum key length - 128 Unicode characters in UTF-8</p></li>
    /// <li>
    /// <p>Maximum value length - 256 Unicode characters in UTF-8</p></li>
    /// <li>
    /// <p>If your tagging schema is used across multiple services and resources, remember that other services may have restrictions on allowed characters. Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following characters: + - = . _ : / @.</p></li>
    /// <li>
    /// <p>Tag keys and values are case-sensitive.</p></li>
    /// <li>
    /// <p>Do not use <code>aws:</code>, <code>AWS:</code>, or any upper or lowercase combination of such as a prefix for either keys or values as it is reserved for Amazon Web Services use. You cannot edit or delete tag keys or values with this prefix. Tags with this prefix do not count against your tags per resource limit.</p></li>
    /// </ul>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.tags.is_none()`.
    pub fn tags(&self) -> &[crate::types::Tag] {
        self.tags.as_deref().unwrap_or_default()
    }
    /// <p>The Amazon Resource Name (ARN) of the task.</p>
    pub fn task_arn(&self) -> ::std::option::Option<&str> {
        self.task_arn.as_deref()
    }
    /// <p>The ARN of the task definition that creates the task.</p>
    pub fn task_definition_arn(&self) -> ::std::option::Option<&str> {
        self.task_definition_arn.as_deref()
    }
    /// <p>The version counter for the task. Every time a task experiences a change that starts a CloudWatch event, the version counter is incremented. If you replicate your Amazon ECS task state with CloudWatch Events, you can compare the version of a task reported by the Amazon ECS API actions with the version reported in CloudWatch Events for the task (inside the <code>detail</code> object) to verify that the version in your event stream is current.</p>
    pub fn version(&self) -> i64 {
        self.version
    }
    /// <p>The ephemeral storage settings for the task.</p>
    pub fn ephemeral_storage(&self) -> ::std::option::Option<&crate::types::EphemeralStorage> {
        self.ephemeral_storage.as_ref()
    }
    /// <p>The Fargate ephemeral storage settings for the task.</p>
    pub fn fargate_ephemeral_storage(&self) -> ::std::option::Option<&crate::types::TaskEphemeralStorage> {
        self.fargate_ephemeral_storage.as_ref()
    }
}
impl Task {
    /// Creates a new builder-style object to manufacture [`Task`](crate::types::Task).
    pub fn builder() -> crate::types::builders::TaskBuilder {
        crate::types::builders::TaskBuilder::default()
    }
}

/// A builder for [`Task`](crate::types::Task).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct TaskBuilder {
    pub(crate) attachments: ::std::option::Option<::std::vec::Vec<crate::types::Attachment>>,
    pub(crate) attributes: ::std::option::Option<::std::vec::Vec<crate::types::Attribute>>,
    pub(crate) availability_zone: ::std::option::Option<::std::string::String>,
    pub(crate) capacity_provider_name: ::std::option::Option<::std::string::String>,
    pub(crate) cluster_arn: ::std::option::Option<::std::string::String>,
    pub(crate) connectivity: ::std::option::Option<crate::types::Connectivity>,
    pub(crate) connectivity_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) container_instance_arn: ::std::option::Option<::std::string::String>,
    pub(crate) containers: ::std::option::Option<::std::vec::Vec<crate::types::Container>>,
    pub(crate) cpu: ::std::option::Option<::std::string::String>,
    pub(crate) created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) desired_status: ::std::option::Option<::std::string::String>,
    pub(crate) enable_execute_command: ::std::option::Option<bool>,
    pub(crate) execution_stopped_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) group: ::std::option::Option<::std::string::String>,
    pub(crate) health_status: ::std::option::Option<crate::types::HealthStatus>,
    pub(crate) inference_accelerators: ::std::option::Option<::std::vec::Vec<crate::types::InferenceAccelerator>>,
    pub(crate) last_status: ::std::option::Option<::std::string::String>,
    pub(crate) launch_type: ::std::option::Option<crate::types::LaunchType>,
    pub(crate) memory: ::std::option::Option<::std::string::String>,
    pub(crate) overrides: ::std::option::Option<crate::types::TaskOverride>,
    pub(crate) platform_version: ::std::option::Option<::std::string::String>,
    pub(crate) platform_family: ::std::option::Option<::std::string::String>,
    pub(crate) pull_started_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) pull_stopped_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) started_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) started_by: ::std::option::Option<::std::string::String>,
    pub(crate) stop_code: ::std::option::Option<crate::types::TaskStopCode>,
    pub(crate) stopped_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) stopped_reason: ::std::option::Option<::std::string::String>,
    pub(crate) stopping_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
    pub(crate) task_arn: ::std::option::Option<::std::string::String>,
    pub(crate) task_definition_arn: ::std::option::Option<::std::string::String>,
    pub(crate) version: ::std::option::Option<i64>,
    pub(crate) ephemeral_storage: ::std::option::Option<crate::types::EphemeralStorage>,
    pub(crate) fargate_ephemeral_storage: ::std::option::Option<crate::types::TaskEphemeralStorage>,
}
impl TaskBuilder {
    /// Appends an item to `attachments`.
    ///
    /// To override the contents of this collection use [`set_attachments`](Self::set_attachments).
    ///
    /// <p>The Elastic Network Adapter that's associated with the task if the task uses the <code>awsvpc</code> network mode.</p>
    pub fn attachments(mut self, input: crate::types::Attachment) -> Self {
        let mut v = self.attachments.unwrap_or_default();
        v.push(input);
        self.attachments = ::std::option::Option::Some(v);
        self
    }
    /// <p>The Elastic Network Adapter that's associated with the task if the task uses the <code>awsvpc</code> network mode.</p>
    pub fn set_attachments(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Attachment>>) -> Self {
        self.attachments = input;
        self
    }
    /// <p>The Elastic Network Adapter that's associated with the task if the task uses the <code>awsvpc</code> network mode.</p>
    pub fn get_attachments(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Attachment>> {
        &self.attachments
    }
    /// Appends an item to `attributes`.
    ///
    /// To override the contents of this collection use [`set_attributes`](Self::set_attributes).
    ///
    /// <p>The attributes of the task</p>
    pub fn attributes(mut self, input: crate::types::Attribute) -> Self {
        let mut v = self.attributes.unwrap_or_default();
        v.push(input);
        self.attributes = ::std::option::Option::Some(v);
        self
    }
    /// <p>The attributes of the task</p>
    pub fn set_attributes(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Attribute>>) -> Self {
        self.attributes = input;
        self
    }
    /// <p>The attributes of the task</p>
    pub fn get_attributes(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Attribute>> {
        &self.attributes
    }
    /// <p>The Availability Zone for the task.</p>
    pub fn availability_zone(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.availability_zone = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Availability Zone for the task.</p>
    pub fn set_availability_zone(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.availability_zone = input;
        self
    }
    /// <p>The Availability Zone for the task.</p>
    pub fn get_availability_zone(&self) -> &::std::option::Option<::std::string::String> {
        &self.availability_zone
    }
    /// <p>The capacity provider that's associated with the task.</p>
    pub fn capacity_provider_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.capacity_provider_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The capacity provider that's associated with the task.</p>
    pub fn set_capacity_provider_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.capacity_provider_name = input;
        self
    }
    /// <p>The capacity provider that's associated with the task.</p>
    pub fn get_capacity_provider_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.capacity_provider_name
    }
    /// <p>The ARN of the cluster that hosts the task.</p>
    pub fn cluster_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.cluster_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ARN of the cluster that hosts the task.</p>
    pub fn set_cluster_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.cluster_arn = input;
        self
    }
    /// <p>The ARN of the cluster that hosts the task.</p>
    pub fn get_cluster_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.cluster_arn
    }
    /// <p>The connectivity status of a task.</p>
    pub fn connectivity(mut self, input: crate::types::Connectivity) -> Self {
        self.connectivity = ::std::option::Option::Some(input);
        self
    }
    /// <p>The connectivity status of a task.</p>
    pub fn set_connectivity(mut self, input: ::std::option::Option<crate::types::Connectivity>) -> Self {
        self.connectivity = input;
        self
    }
    /// <p>The connectivity status of a task.</p>
    pub fn get_connectivity(&self) -> &::std::option::Option<crate::types::Connectivity> {
        &self.connectivity
    }
    /// <p>The Unix timestamp for the time when the task last went into <code>CONNECTED</code> status.</p>
    pub fn connectivity_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.connectivity_at = ::std::option::Option::Some(input);
        self
    }
    /// <p>The Unix timestamp for the time when the task last went into <code>CONNECTED</code> status.</p>
    pub fn set_connectivity_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.connectivity_at = input;
        self
    }
    /// <p>The Unix timestamp for the time when the task last went into <code>CONNECTED</code> status.</p>
    pub fn get_connectivity_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.connectivity_at
    }
    /// <p>The ARN of the container instances that host the task.</p>
    pub fn container_instance_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.container_instance_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ARN of the container instances that host the task.</p>
    pub fn set_container_instance_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.container_instance_arn = input;
        self
    }
    /// <p>The ARN of the container instances that host the task.</p>
    pub fn get_container_instance_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.container_instance_arn
    }
    /// Appends an item to `containers`.
    ///
    /// To override the contents of this collection use [`set_containers`](Self::set_containers).
    ///
    /// <p>The containers that's associated with the task.</p>
    pub fn containers(mut self, input: crate::types::Container) -> Self {
        let mut v = self.containers.unwrap_or_default();
        v.push(input);
        self.containers = ::std::option::Option::Some(v);
        self
    }
    /// <p>The containers that's associated with the task.</p>
    pub fn set_containers(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Container>>) -> Self {
        self.containers = input;
        self
    }
    /// <p>The containers that's associated with the task.</p>
    pub fn get_containers(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Container>> {
        &self.containers
    }
    /// <p>The number of CPU units used by the task as expressed in a task definition. It can be expressed as an integer using CPU units (for example, <code>1024</code>). It can also be expressed as a string using vCPUs (for example, <code>1 vCPU</code> or <code>1 vcpu</code>). String values are converted to an integer that indicates the CPU units when the task definition is registered.</p>
    /// <p>If you're using the EC2 launch type or the external launch type, this field is optional. Supported values are between <code>128</code> CPU units (<code>0.125</code> vCPUs) and <code>196608</code> CPU units (<code>192</code> vCPUs). If you do not specify a value, the parameter is ignored.</p>
    /// <p>This field is required for Fargate. For information about the valid values, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definition_parameters.html#task_size">Task size</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p>
    pub fn cpu(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.cpu = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The number of CPU units used by the task as expressed in a task definition. It can be expressed as an integer using CPU units (for example, <code>1024</code>). It can also be expressed as a string using vCPUs (for example, <code>1 vCPU</code> or <code>1 vcpu</code>). String values are converted to an integer that indicates the CPU units when the task definition is registered.</p>
    /// <p>If you're using the EC2 launch type or the external launch type, this field is optional. Supported values are between <code>128</code> CPU units (<code>0.125</code> vCPUs) and <code>196608</code> CPU units (<code>192</code> vCPUs). If you do not specify a value, the parameter is ignored.</p>
    /// <p>This field is required for Fargate. For information about the valid values, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definition_parameters.html#task_size">Task size</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p>
    pub fn set_cpu(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.cpu = input;
        self
    }
    /// <p>The number of CPU units used by the task as expressed in a task definition. It can be expressed as an integer using CPU units (for example, <code>1024</code>). It can also be expressed as a string using vCPUs (for example, <code>1 vCPU</code> or <code>1 vcpu</code>). String values are converted to an integer that indicates the CPU units when the task definition is registered.</p>
    /// <p>If you're using the EC2 launch type or the external launch type, this field is optional. Supported values are between <code>128</code> CPU units (<code>0.125</code> vCPUs) and <code>196608</code> CPU units (<code>192</code> vCPUs). If you do not specify a value, the parameter is ignored.</p>
    /// <p>This field is required for Fargate. For information about the valid values, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definition_parameters.html#task_size">Task size</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p>
    pub fn get_cpu(&self) -> &::std::option::Option<::std::string::String> {
        &self.cpu
    }
    /// <p>The Unix timestamp for the time when the task was created. More specifically, it's for the time when the task entered the <code>PENDING</code> state.</p>
    pub fn created_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.created_at = ::std::option::Option::Some(input);
        self
    }
    /// <p>The Unix timestamp for the time when the task was created. More specifically, it's for the time when the task entered the <code>PENDING</code> state.</p>
    pub fn set_created_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.created_at = input;
        self
    }
    /// <p>The Unix timestamp for the time when the task was created. More specifically, it's for the time when the task entered the <code>PENDING</code> state.</p>
    pub fn get_created_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.created_at
    }
    /// <p>The desired status of the task. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-lifecycle.html">Task Lifecycle</a>.</p>
    pub fn desired_status(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.desired_status = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The desired status of the task. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-lifecycle.html">Task Lifecycle</a>.</p>
    pub fn set_desired_status(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.desired_status = input;
        self
    }
    /// <p>The desired status of the task. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-lifecycle.html">Task Lifecycle</a>.</p>
    pub fn get_desired_status(&self) -> &::std::option::Option<::std::string::String> {
        &self.desired_status
    }
    /// <p>Determines whether execute command functionality is turned on for this task. If <code>true</code>, execute command functionality is turned on all the containers in the task.</p>
    pub fn enable_execute_command(mut self, input: bool) -> Self {
        self.enable_execute_command = ::std::option::Option::Some(input);
        self
    }
    /// <p>Determines whether execute command functionality is turned on for this task. If <code>true</code>, execute command functionality is turned on all the containers in the task.</p>
    pub fn set_enable_execute_command(mut self, input: ::std::option::Option<bool>) -> Self {
        self.enable_execute_command = input;
        self
    }
    /// <p>Determines whether execute command functionality is turned on for this task. If <code>true</code>, execute command functionality is turned on all the containers in the task.</p>
    pub fn get_enable_execute_command(&self) -> &::std::option::Option<bool> {
        &self.enable_execute_command
    }
    /// <p>The Unix timestamp for the time when the task execution stopped.</p>
    pub fn execution_stopped_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.execution_stopped_at = ::std::option::Option::Some(input);
        self
    }
    /// <p>The Unix timestamp for the time when the task execution stopped.</p>
    pub fn set_execution_stopped_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.execution_stopped_at = input;
        self
    }
    /// <p>The Unix timestamp for the time when the task execution stopped.</p>
    pub fn get_execution_stopped_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.execution_stopped_at
    }
    /// <p>The name of the task group that's associated with the task.</p>
    pub fn group(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.group = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the task group that's associated with the task.</p>
    pub fn set_group(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.group = input;
        self
    }
    /// <p>The name of the task group that's associated with the task.</p>
    pub fn get_group(&self) -> &::std::option::Option<::std::string::String> {
        &self.group
    }
    /// <p>The health status for the task. It's determined by the health of the essential containers in the task. If all essential containers in the task are reporting as <code>HEALTHY</code>, the task status also reports as <code>HEALTHY</code>. If any essential containers in the task are reporting as <code>UNHEALTHY</code> or <code>UNKNOWN</code>, the task status also reports as <code>UNHEALTHY</code> or <code>UNKNOWN</code>.</p><note>
    /// <p>The Amazon ECS container agent doesn't monitor or report on Docker health checks that are embedded in a container image and not specified in the container definition. For example, this includes those specified in a parent image or from the image's Dockerfile. Health check parameters that are specified in a container definition override any Docker health checks that are found in the container image.</p>
    /// </note>
    pub fn health_status(mut self, input: crate::types::HealthStatus) -> Self {
        self.health_status = ::std::option::Option::Some(input);
        self
    }
    /// <p>The health status for the task. It's determined by the health of the essential containers in the task. If all essential containers in the task are reporting as <code>HEALTHY</code>, the task status also reports as <code>HEALTHY</code>. If any essential containers in the task are reporting as <code>UNHEALTHY</code> or <code>UNKNOWN</code>, the task status also reports as <code>UNHEALTHY</code> or <code>UNKNOWN</code>.</p><note>
    /// <p>The Amazon ECS container agent doesn't monitor or report on Docker health checks that are embedded in a container image and not specified in the container definition. For example, this includes those specified in a parent image or from the image's Dockerfile. Health check parameters that are specified in a container definition override any Docker health checks that are found in the container image.</p>
    /// </note>
    pub fn set_health_status(mut self, input: ::std::option::Option<crate::types::HealthStatus>) -> Self {
        self.health_status = input;
        self
    }
    /// <p>The health status for the task. It's determined by the health of the essential containers in the task. If all essential containers in the task are reporting as <code>HEALTHY</code>, the task status also reports as <code>HEALTHY</code>. If any essential containers in the task are reporting as <code>UNHEALTHY</code> or <code>UNKNOWN</code>, the task status also reports as <code>UNHEALTHY</code> or <code>UNKNOWN</code>.</p><note>
    /// <p>The Amazon ECS container agent doesn't monitor or report on Docker health checks that are embedded in a container image and not specified in the container definition. For example, this includes those specified in a parent image or from the image's Dockerfile. Health check parameters that are specified in a container definition override any Docker health checks that are found in the container image.</p>
    /// </note>
    pub fn get_health_status(&self) -> &::std::option::Option<crate::types::HealthStatus> {
        &self.health_status
    }
    /// Appends an item to `inference_accelerators`.
    ///
    /// To override the contents of this collection use [`set_inference_accelerators`](Self::set_inference_accelerators).
    ///
    /// <p>The Elastic Inference accelerator that's associated with the task.</p>
    pub fn inference_accelerators(mut self, input: crate::types::InferenceAccelerator) -> Self {
        let mut v = self.inference_accelerators.unwrap_or_default();
        v.push(input);
        self.inference_accelerators = ::std::option::Option::Some(v);
        self
    }
    /// <p>The Elastic Inference accelerator that's associated with the task.</p>
    pub fn set_inference_accelerators(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::InferenceAccelerator>>) -> Self {
        self.inference_accelerators = input;
        self
    }
    /// <p>The Elastic Inference accelerator that's associated with the task.</p>
    pub fn get_inference_accelerators(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::InferenceAccelerator>> {
        &self.inference_accelerators
    }
    /// <p>The last known status for the task. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-lifecycle.html">Task Lifecycle</a>.</p>
    pub fn last_status(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.last_status = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The last known status for the task. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-lifecycle.html">Task Lifecycle</a>.</p>
    pub fn set_last_status(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.last_status = input;
        self
    }
    /// <p>The last known status for the task. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-lifecycle.html">Task Lifecycle</a>.</p>
    pub fn get_last_status(&self) -> &::std::option::Option<::std::string::String> {
        &self.last_status
    }
    /// <p>The infrastructure where your task runs on. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html">Amazon ECS launch types</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p>
    pub fn launch_type(mut self, input: crate::types::LaunchType) -> Self {
        self.launch_type = ::std::option::Option::Some(input);
        self
    }
    /// <p>The infrastructure where your task runs on. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html">Amazon ECS launch types</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p>
    pub fn set_launch_type(mut self, input: ::std::option::Option<crate::types::LaunchType>) -> Self {
        self.launch_type = input;
        self
    }
    /// <p>The infrastructure where your task runs on. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html">Amazon ECS launch types</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p>
    pub fn get_launch_type(&self) -> &::std::option::Option<crate::types::LaunchType> {
        &self.launch_type
    }
    /// <p>The amount of memory (in MiB) that the task uses as expressed in a task definition. It can be expressed as an integer using MiB (for example, <code>1024</code>). If it's expressed as a string using GB (for example, <code>1GB</code> or <code>1 GB</code>), it's converted to an integer indicating the MiB when the task definition is registered.</p>
    /// <p>If you use the EC2 launch type, this field is optional.</p>
    /// <p>If you use the Fargate launch type, this field is required. You must use one of the following values. The value that you choose determines the range of supported values for the <code>cpu</code> parameter.</p>
    /// <ul>
    /// <li>
    /// <p>512 (0.5 GB), 1024 (1 GB), 2048 (2 GB) - Available <code>cpu</code> values: 256 (.25 vCPU)</p></li>
    /// <li>
    /// <p>1024 (1 GB), 2048 (2 GB), 3072 (3 GB), 4096 (4 GB) - Available <code>cpu</code> values: 512 (.5 vCPU)</p></li>
    /// <li>
    /// <p>2048 (2 GB), 3072 (3 GB), 4096 (4 GB), 5120 (5 GB), 6144 (6 GB), 7168 (7 GB), 8192 (8 GB) - Available <code>cpu</code> values: 1024 (1 vCPU)</p></li>
    /// <li>
    /// <p>Between 4096 (4 GB) and 16384 (16 GB) in increments of 1024 (1 GB) - Available <code>cpu</code> values: 2048 (2 vCPU)</p></li>
    /// <li>
    /// <p>Between 8192 (8 GB) and 30720 (30 GB) in increments of 1024 (1 GB) - Available <code>cpu</code> values: 4096 (4 vCPU)</p></li>
    /// <li>
    /// <p>Between 16 GB and 60 GB in 4 GB increments - Available <code>cpu</code> values: 8192 (8 vCPU)</p>
    /// <p>This option requires Linux platform <code>1.4.0</code> or later.</p></li>
    /// <li>
    /// <p>Between 32GB and 120 GB in 8 GB increments - Available <code>cpu</code> values: 16384 (16 vCPU)</p>
    /// <p>This option requires Linux platform <code>1.4.0</code> or later.</p></li>
    /// </ul>
    pub fn memory(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.memory = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The amount of memory (in MiB) that the task uses as expressed in a task definition. It can be expressed as an integer using MiB (for example, <code>1024</code>). If it's expressed as a string using GB (for example, <code>1GB</code> or <code>1 GB</code>), it's converted to an integer indicating the MiB when the task definition is registered.</p>
    /// <p>If you use the EC2 launch type, this field is optional.</p>
    /// <p>If you use the Fargate launch type, this field is required. You must use one of the following values. The value that you choose determines the range of supported values for the <code>cpu</code> parameter.</p>
    /// <ul>
    /// <li>
    /// <p>512 (0.5 GB), 1024 (1 GB), 2048 (2 GB) - Available <code>cpu</code> values: 256 (.25 vCPU)</p></li>
    /// <li>
    /// <p>1024 (1 GB), 2048 (2 GB), 3072 (3 GB), 4096 (4 GB) - Available <code>cpu</code> values: 512 (.5 vCPU)</p></li>
    /// <li>
    /// <p>2048 (2 GB), 3072 (3 GB), 4096 (4 GB), 5120 (5 GB), 6144 (6 GB), 7168 (7 GB), 8192 (8 GB) - Available <code>cpu</code> values: 1024 (1 vCPU)</p></li>
    /// <li>
    /// <p>Between 4096 (4 GB) and 16384 (16 GB) in increments of 1024 (1 GB) - Available <code>cpu</code> values: 2048 (2 vCPU)</p></li>
    /// <li>
    /// <p>Between 8192 (8 GB) and 30720 (30 GB) in increments of 1024 (1 GB) - Available <code>cpu</code> values: 4096 (4 vCPU)</p></li>
    /// <li>
    /// <p>Between 16 GB and 60 GB in 4 GB increments - Available <code>cpu</code> values: 8192 (8 vCPU)</p>
    /// <p>This option requires Linux platform <code>1.4.0</code> or later.</p></li>
    /// <li>
    /// <p>Between 32GB and 120 GB in 8 GB increments - Available <code>cpu</code> values: 16384 (16 vCPU)</p>
    /// <p>This option requires Linux platform <code>1.4.0</code> or later.</p></li>
    /// </ul>
    pub fn set_memory(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.memory = input;
        self
    }
    /// <p>The amount of memory (in MiB) that the task uses as expressed in a task definition. It can be expressed as an integer using MiB (for example, <code>1024</code>). If it's expressed as a string using GB (for example, <code>1GB</code> or <code>1 GB</code>), it's converted to an integer indicating the MiB when the task definition is registered.</p>
    /// <p>If you use the EC2 launch type, this field is optional.</p>
    /// <p>If you use the Fargate launch type, this field is required. You must use one of the following values. The value that you choose determines the range of supported values for the <code>cpu</code> parameter.</p>
    /// <ul>
    /// <li>
    /// <p>512 (0.5 GB), 1024 (1 GB), 2048 (2 GB) - Available <code>cpu</code> values: 256 (.25 vCPU)</p></li>
    /// <li>
    /// <p>1024 (1 GB), 2048 (2 GB), 3072 (3 GB), 4096 (4 GB) - Available <code>cpu</code> values: 512 (.5 vCPU)</p></li>
    /// <li>
    /// <p>2048 (2 GB), 3072 (3 GB), 4096 (4 GB), 5120 (5 GB), 6144 (6 GB), 7168 (7 GB), 8192 (8 GB) - Available <code>cpu</code> values: 1024 (1 vCPU)</p></li>
    /// <li>
    /// <p>Between 4096 (4 GB) and 16384 (16 GB) in increments of 1024 (1 GB) - Available <code>cpu</code> values: 2048 (2 vCPU)</p></li>
    /// <li>
    /// <p>Between 8192 (8 GB) and 30720 (30 GB) in increments of 1024 (1 GB) - Available <code>cpu</code> values: 4096 (4 vCPU)</p></li>
    /// <li>
    /// <p>Between 16 GB and 60 GB in 4 GB increments - Available <code>cpu</code> values: 8192 (8 vCPU)</p>
    /// <p>This option requires Linux platform <code>1.4.0</code> or later.</p></li>
    /// <li>
    /// <p>Between 32GB and 120 GB in 8 GB increments - Available <code>cpu</code> values: 16384 (16 vCPU)</p>
    /// <p>This option requires Linux platform <code>1.4.0</code> or later.</p></li>
    /// </ul>
    pub fn get_memory(&self) -> &::std::option::Option<::std::string::String> {
        &self.memory
    }
    /// <p>One or more container overrides.</p>
    pub fn overrides(mut self, input: crate::types::TaskOverride) -> Self {
        self.overrides = ::std::option::Option::Some(input);
        self
    }
    /// <p>One or more container overrides.</p>
    pub fn set_overrides(mut self, input: ::std::option::Option<crate::types::TaskOverride>) -> Self {
        self.overrides = input;
        self
    }
    /// <p>One or more container overrides.</p>
    pub fn get_overrides(&self) -> &::std::option::Option<crate::types::TaskOverride> {
        &self.overrides
    }
    /// <p>The platform version where your task runs on. A platform version is only specified for tasks that use the Fargate launch type. If you didn't specify one, the <code>LATEST</code> platform version is used. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/platform_versions.html">Fargate Platform Versions</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p>
    pub fn platform_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.platform_version = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The platform version where your task runs on. A platform version is only specified for tasks that use the Fargate launch type. If you didn't specify one, the <code>LATEST</code> platform version is used. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/platform_versions.html">Fargate Platform Versions</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p>
    pub fn set_platform_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.platform_version = input;
        self
    }
    /// <p>The platform version where your task runs on. A platform version is only specified for tasks that use the Fargate launch type. If you didn't specify one, the <code>LATEST</code> platform version is used. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/platform_versions.html">Fargate Platform Versions</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p>
    pub fn get_platform_version(&self) -> &::std::option::Option<::std::string::String> {
        &self.platform_version
    }
    /// <p>The operating system that your tasks are running on. A platform family is specified only for tasks that use the Fargate launch type.</p>
    /// <p>All tasks that run as part of this service must use the same <code>platformFamily</code> value as the service (for example, <code>LINUX.</code>).</p>
    pub fn platform_family(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.platform_family = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The operating system that your tasks are running on. A platform family is specified only for tasks that use the Fargate launch type.</p>
    /// <p>All tasks that run as part of this service must use the same <code>platformFamily</code> value as the service (for example, <code>LINUX.</code>).</p>
    pub fn set_platform_family(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.platform_family = input;
        self
    }
    /// <p>The operating system that your tasks are running on. A platform family is specified only for tasks that use the Fargate launch type.</p>
    /// <p>All tasks that run as part of this service must use the same <code>platformFamily</code> value as the service (for example, <code>LINUX.</code>).</p>
    pub fn get_platform_family(&self) -> &::std::option::Option<::std::string::String> {
        &self.platform_family
    }
    /// <p>The Unix timestamp for the time when the container image pull began.</p>
    pub fn pull_started_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.pull_started_at = ::std::option::Option::Some(input);
        self
    }
    /// <p>The Unix timestamp for the time when the container image pull began.</p>
    pub fn set_pull_started_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.pull_started_at = input;
        self
    }
    /// <p>The Unix timestamp for the time when the container image pull began.</p>
    pub fn get_pull_started_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.pull_started_at
    }
    /// <p>The Unix timestamp for the time when the container image pull completed.</p>
    pub fn pull_stopped_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.pull_stopped_at = ::std::option::Option::Some(input);
        self
    }
    /// <p>The Unix timestamp for the time when the container image pull completed.</p>
    pub fn set_pull_stopped_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.pull_stopped_at = input;
        self
    }
    /// <p>The Unix timestamp for the time when the container image pull completed.</p>
    pub fn get_pull_stopped_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.pull_stopped_at
    }
    /// <p>The Unix timestamp for the time when the task started. More specifically, it's for the time when the task transitioned from the <code>PENDING</code> state to the <code>RUNNING</code> state.</p>
    pub fn started_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.started_at = ::std::option::Option::Some(input);
        self
    }
    /// <p>The Unix timestamp for the time when the task started. More specifically, it's for the time when the task transitioned from the <code>PENDING</code> state to the <code>RUNNING</code> state.</p>
    pub fn set_started_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.started_at = input;
        self
    }
    /// <p>The Unix timestamp for the time when the task started. More specifically, it's for the time when the task transitioned from the <code>PENDING</code> state to the <code>RUNNING</code> state.</p>
    pub fn get_started_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.started_at
    }
    /// <p>The tag specified when a task is started. If an Amazon ECS service started the task, the <code>startedBy</code> parameter contains the deployment ID of that service.</p>
    pub fn started_by(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.started_by = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The tag specified when a task is started. If an Amazon ECS service started the task, the <code>startedBy</code> parameter contains the deployment ID of that service.</p>
    pub fn set_started_by(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.started_by = input;
        self
    }
    /// <p>The tag specified when a task is started. If an Amazon ECS service started the task, the <code>startedBy</code> parameter contains the deployment ID of that service.</p>
    pub fn get_started_by(&self) -> &::std::option::Option<::std::string::String> {
        &self.started_by
    }
    /// <p>The stop code indicating why a task was stopped. The <code>stoppedReason</code> might contain additional details.</p>
    /// <p>For more information about stop code, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/stopped-task-error-codes.html">Stopped tasks error codes</a> in the <i>Amazon ECS Developer Guide</i>.</p>
    pub fn stop_code(mut self, input: crate::types::TaskStopCode) -> Self {
        self.stop_code = ::std::option::Option::Some(input);
        self
    }
    /// <p>The stop code indicating why a task was stopped. The <code>stoppedReason</code> might contain additional details.</p>
    /// <p>For more information about stop code, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/stopped-task-error-codes.html">Stopped tasks error codes</a> in the <i>Amazon ECS Developer Guide</i>.</p>
    pub fn set_stop_code(mut self, input: ::std::option::Option<crate::types::TaskStopCode>) -> Self {
        self.stop_code = input;
        self
    }
    /// <p>The stop code indicating why a task was stopped. The <code>stoppedReason</code> might contain additional details.</p>
    /// <p>For more information about stop code, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/stopped-task-error-codes.html">Stopped tasks error codes</a> in the <i>Amazon ECS Developer Guide</i>.</p>
    pub fn get_stop_code(&self) -> &::std::option::Option<crate::types::TaskStopCode> {
        &self.stop_code
    }
    /// <p>The Unix timestamp for the time when the task was stopped. More specifically, it's for the time when the task transitioned from the <code>RUNNING</code> state to the <code>STOPPED</code> state.</p>
    pub fn stopped_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.stopped_at = ::std::option::Option::Some(input);
        self
    }
    /// <p>The Unix timestamp for the time when the task was stopped. More specifically, it's for the time when the task transitioned from the <code>RUNNING</code> state to the <code>STOPPED</code> state.</p>
    pub fn set_stopped_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.stopped_at = input;
        self
    }
    /// <p>The Unix timestamp for the time when the task was stopped. More specifically, it's for the time when the task transitioned from the <code>RUNNING</code> state to the <code>STOPPED</code> state.</p>
    pub fn get_stopped_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.stopped_at
    }
    /// <p>The reason that the task was stopped.</p>
    pub fn stopped_reason(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.stopped_reason = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The reason that the task was stopped.</p>
    pub fn set_stopped_reason(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.stopped_reason = input;
        self
    }
    /// <p>The reason that the task was stopped.</p>
    pub fn get_stopped_reason(&self) -> &::std::option::Option<::std::string::String> {
        &self.stopped_reason
    }
    /// <p>The Unix timestamp for the time when the task stops. More specifically, it's for the time when the task transitions from the <code>RUNNING</code> state to <code>STOPPING</code>.</p>
    pub fn stopping_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.stopping_at = ::std::option::Option::Some(input);
        self
    }
    /// <p>The Unix timestamp for the time when the task stops. More specifically, it's for the time when the task transitions from the <code>RUNNING</code> state to <code>STOPPING</code>.</p>
    pub fn set_stopping_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.stopping_at = input;
        self
    }
    /// <p>The Unix timestamp for the time when the task stops. More specifically, it's for the time when the task transitions from the <code>RUNNING</code> state to <code>STOPPING</code>.</p>
    pub fn get_stopping_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.stopping_at
    }
    /// Appends an item to `tags`.
    ///
    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
    ///
    /// <p>The metadata that you apply to the task to help you categorize and organize the task. Each tag consists of a key and an optional value. You define both the key and value.</p>
    /// <p>The following basic restrictions apply to tags:</p>
    /// <ul>
    /// <li>
    /// <p>Maximum number of tags per resource - 50</p></li>
    /// <li>
    /// <p>For each resource, each tag key must be unique, and each tag key can have only one value.</p></li>
    /// <li>
    /// <p>Maximum key length - 128 Unicode characters in UTF-8</p></li>
    /// <li>
    /// <p>Maximum value length - 256 Unicode characters in UTF-8</p></li>
    /// <li>
    /// <p>If your tagging schema is used across multiple services and resources, remember that other services may have restrictions on allowed characters. Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following characters: + - = . _ : / @.</p></li>
    /// <li>
    /// <p>Tag keys and values are case-sensitive.</p></li>
    /// <li>
    /// <p>Do not use <code>aws:</code>, <code>AWS:</code>, or any upper or lowercase combination of such as a prefix for either keys or values as it is reserved for Amazon Web Services use. You cannot edit or delete tag keys or values with this prefix. Tags with this prefix do not count against your tags per resource limit.</p></li>
    /// </ul>
    pub fn tags(mut self, input: crate::types::Tag) -> Self {
        let mut v = self.tags.unwrap_or_default();
        v.push(input);
        self.tags = ::std::option::Option::Some(v);
        self
    }
    /// <p>The metadata that you apply to the task to help you categorize and organize the task. Each tag consists of a key and an optional value. You define both the key and value.</p>
    /// <p>The following basic restrictions apply to tags:</p>
    /// <ul>
    /// <li>
    /// <p>Maximum number of tags per resource - 50</p></li>
    /// <li>
    /// <p>For each resource, each tag key must be unique, and each tag key can have only one value.</p></li>
    /// <li>
    /// <p>Maximum key length - 128 Unicode characters in UTF-8</p></li>
    /// <li>
    /// <p>Maximum value length - 256 Unicode characters in UTF-8</p></li>
    /// <li>
    /// <p>If your tagging schema is used across multiple services and resources, remember that other services may have restrictions on allowed characters. Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following characters: + - = . _ : / @.</p></li>
    /// <li>
    /// <p>Tag keys and values are case-sensitive.</p></li>
    /// <li>
    /// <p>Do not use <code>aws:</code>, <code>AWS:</code>, or any upper or lowercase combination of such as a prefix for either keys or values as it is reserved for Amazon Web Services use. You cannot edit or delete tag keys or values with this prefix. Tags with this prefix do not count against your tags per resource limit.</p></li>
    /// </ul>
    pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
        self.tags = input;
        self
    }
    /// <p>The metadata that you apply to the task to help you categorize and organize the task. Each tag consists of a key and an optional value. You define both the key and value.</p>
    /// <p>The following basic restrictions apply to tags:</p>
    /// <ul>
    /// <li>
    /// <p>Maximum number of tags per resource - 50</p></li>
    /// <li>
    /// <p>For each resource, each tag key must be unique, and each tag key can have only one value.</p></li>
    /// <li>
    /// <p>Maximum key length - 128 Unicode characters in UTF-8</p></li>
    /// <li>
    /// <p>Maximum value length - 256 Unicode characters in UTF-8</p></li>
    /// <li>
    /// <p>If your tagging schema is used across multiple services and resources, remember that other services may have restrictions on allowed characters. Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following characters: + - = . _ : / @.</p></li>
    /// <li>
    /// <p>Tag keys and values are case-sensitive.</p></li>
    /// <li>
    /// <p>Do not use <code>aws:</code>, <code>AWS:</code>, or any upper or lowercase combination of such as a prefix for either keys or values as it is reserved for Amazon Web Services use. You cannot edit or delete tag keys or values with this prefix. Tags with this prefix do not count against your tags per resource limit.</p></li>
    /// </ul>
    pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
        &self.tags
    }
    /// <p>The Amazon Resource Name (ARN) of the task.</p>
    pub fn task_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.task_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the task.</p>
    pub fn set_task_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.task_arn = input;
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the task.</p>
    pub fn get_task_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.task_arn
    }
    /// <p>The ARN of the task definition that creates the task.</p>
    pub fn task_definition_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.task_definition_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ARN of the task definition that creates the task.</p>
    pub fn set_task_definition_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.task_definition_arn = input;
        self
    }
    /// <p>The ARN of the task definition that creates the task.</p>
    pub fn get_task_definition_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.task_definition_arn
    }
    /// <p>The version counter for the task. Every time a task experiences a change that starts a CloudWatch event, the version counter is incremented. If you replicate your Amazon ECS task state with CloudWatch Events, you can compare the version of a task reported by the Amazon ECS API actions with the version reported in CloudWatch Events for the task (inside the <code>detail</code> object) to verify that the version in your event stream is current.</p>
    pub fn version(mut self, input: i64) -> Self {
        self.version = ::std::option::Option::Some(input);
        self
    }
    /// <p>The version counter for the task. Every time a task experiences a change that starts a CloudWatch event, the version counter is incremented. If you replicate your Amazon ECS task state with CloudWatch Events, you can compare the version of a task reported by the Amazon ECS API actions with the version reported in CloudWatch Events for the task (inside the <code>detail</code> object) to verify that the version in your event stream is current.</p>
    pub fn set_version(mut self, input: ::std::option::Option<i64>) -> Self {
        self.version = input;
        self
    }
    /// <p>The version counter for the task. Every time a task experiences a change that starts a CloudWatch event, the version counter is incremented. If you replicate your Amazon ECS task state with CloudWatch Events, you can compare the version of a task reported by the Amazon ECS API actions with the version reported in CloudWatch Events for the task (inside the <code>detail</code> object) to verify that the version in your event stream is current.</p>
    pub fn get_version(&self) -> &::std::option::Option<i64> {
        &self.version
    }
    /// <p>The ephemeral storage settings for the task.</p>
    pub fn ephemeral_storage(mut self, input: crate::types::EphemeralStorage) -> Self {
        self.ephemeral_storage = ::std::option::Option::Some(input);
        self
    }
    /// <p>The ephemeral storage settings for the task.</p>
    pub fn set_ephemeral_storage(mut self, input: ::std::option::Option<crate::types::EphemeralStorage>) -> Self {
        self.ephemeral_storage = input;
        self
    }
    /// <p>The ephemeral storage settings for the task.</p>
    pub fn get_ephemeral_storage(&self) -> &::std::option::Option<crate::types::EphemeralStorage> {
        &self.ephemeral_storage
    }
    /// <p>The Fargate ephemeral storage settings for the task.</p>
    pub fn fargate_ephemeral_storage(mut self, input: crate::types::TaskEphemeralStorage) -> Self {
        self.fargate_ephemeral_storage = ::std::option::Option::Some(input);
        self
    }
    /// <p>The Fargate ephemeral storage settings for the task.</p>
    pub fn set_fargate_ephemeral_storage(mut self, input: ::std::option::Option<crate::types::TaskEphemeralStorage>) -> Self {
        self.fargate_ephemeral_storage = input;
        self
    }
    /// <p>The Fargate ephemeral storage settings for the task.</p>
    pub fn get_fargate_ephemeral_storage(&self) -> &::std::option::Option<crate::types::TaskEphemeralStorage> {
        &self.fargate_ephemeral_storage
    }
    /// Consumes the builder and constructs a [`Task`](crate::types::Task).
    pub fn build(self) -> crate::types::Task {
        crate::types::Task {
            attachments: self.attachments,
            attributes: self.attributes,
            availability_zone: self.availability_zone,
            capacity_provider_name: self.capacity_provider_name,
            cluster_arn: self.cluster_arn,
            connectivity: self.connectivity,
            connectivity_at: self.connectivity_at,
            container_instance_arn: self.container_instance_arn,
            containers: self.containers,
            cpu: self.cpu,
            created_at: self.created_at,
            desired_status: self.desired_status,
            enable_execute_command: self.enable_execute_command.unwrap_or_default(),
            execution_stopped_at: self.execution_stopped_at,
            group: self.group,
            health_status: self.health_status,
            inference_accelerators: self.inference_accelerators,
            last_status: self.last_status,
            launch_type: self.launch_type,
            memory: self.memory,
            overrides: self.overrides,
            platform_version: self.platform_version,
            platform_family: self.platform_family,
            pull_started_at: self.pull_started_at,
            pull_stopped_at: self.pull_stopped_at,
            started_at: self.started_at,
            started_by: self.started_by,
            stop_code: self.stop_code,
            stopped_at: self.stopped_at,
            stopped_reason: self.stopped_reason,
            stopping_at: self.stopping_at,
            tags: self.tags,
            task_arn: self.task_arn,
            task_definition_arn: self.task_definition_arn,
            version: self.version.unwrap_or_default(),
            ephemeral_storage: self.ephemeral_storage,
            fargate_ephemeral_storage: self.fargate_ephemeral_storage,
        }
    }
}