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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>The attributes for the instance types. When you specify instance attributes, Amazon EC2 will identify instance types with these attributes.</p>
/// <p>You must specify <code>VCpuCount</code> and <code>MemoryMiB</code>. All other attributes are optional. Any unspecified optional attribute is set to its default.</p>
/// <p>When you specify multiple attributes, you get instance types that satisfy all of the specified attributes. If you specify multiple values for an attribute, you get instance types that satisfy any of the specified values.</p>
/// <p>To limit the list of instance types from which Amazon EC2 can identify matching instance types, you can use one of the following parameters, but not both in the same request:</p>
/// <ul>
/// <li> <p> <code>AllowedInstanceTypes</code> - The instance types to include in the list. All other instance types are ignored, even if they match your specified attributes.</p> </li>
/// <li> <p> <code>ExcludedInstanceTypes</code> - The instance types to exclude from the list, even if they match your specified attributes.</p> </li>
/// </ul> <note>
/// <p>If you specify <code>InstanceRequirements</code>, you can't specify <code>InstanceType</code>.</p>
/// <p>Attribute-based instance type selection is only supported when using Auto Scaling groups, EC2 Fleet, and Spot Fleet to launch instances. If you plan to use the launch template in the <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-launch-instance-wizard.html">launch instance wizard</a> or with the <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_RunInstances.html">RunInstances API</a>, you can't specify <code>InstanceRequirements</code>.</p>
/// </note>
/// <p>For more information, see <a href="https://docs.aws.amazon.com/autoscaling/ec2/userguide/create-mixed-instances-group-attribute-based-instance-type-selection.html">Create a mixed instances group using attribute-based instance type selection</a> in the <i>Amazon EC2 Auto Scaling User Guide</i>, and also <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-fleet-attribute-based-instance-type-selection.html">Attribute-based instance type selection for EC2 Fleet</a>, <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-fleet-attribute-based-instance-type-selection.html">Attribute-based instance type selection for Spot Fleet</a>, and <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-placement-score.html">Spot placement score</a> in the <i>Amazon EC2 User Guide</i>.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct InstanceRequirements {
    /// <p>The minimum and maximum number of vCPUs.</p>
    pub v_cpu_count: ::std::option::Option<crate::types::VCpuCountRange>,
    /// <p>The minimum and maximum amount of memory, in MiB.</p>
    pub memory_mib: ::std::option::Option<crate::types::MemoryMiB>,
    /// <p>The CPU manufacturers to include.</p>
    /// <ul>
    /// <li> <p>For instance types with Intel CPUs, specify <code>intel</code>.</p> </li>
    /// <li> <p>For instance types with AMD CPUs, specify <code>amd</code>.</p> </li>
    /// <li> <p>For instance types with Amazon Web Services CPUs, specify <code>amazon-web-services</code>.</p> </li>
    /// </ul> <note>
    /// <p>Don't confuse the CPU manufacturer with the CPU architecture. Instances will be launched with a compatible CPU architecture based on the Amazon Machine Image (AMI) that you specify in your launch template.</p>
    /// </note>
    /// <p>Default: Any manufacturer</p>
    pub cpu_manufacturers: ::std::option::Option<::std::vec::Vec<crate::types::CpuManufacturer>>,
    /// <p>The minimum and maximum amount of memory per vCPU, in GiB.</p>
    /// <p>Default: No minimum or maximum limits</p>
    pub memory_gib_per_v_cpu: ::std::option::Option<crate::types::MemoryGiBPerVCpu>,
    /// <p>The instance types to exclude.</p>
    /// <p>You can use strings with one or more wild cards, represented by an asterisk (<code>*</code>), to exclude an instance type, size, or generation. The following are examples: <code>m5.8xlarge</code>, <code>c5*.*</code>, <code>m5a.*</code>, <code>r*</code>, <code>*3*</code>.</p>
    /// <p>For example, if you specify <code>c5*</code>,Amazon EC2 will exclude the entire C5 instance family, which includes all C5a and C5n instance types. If you specify <code>m5a.*</code>, Amazon EC2 will exclude all the M5a instance types, but not the M5n instance types.</p> <note>
    /// <p>If you specify <code>ExcludedInstanceTypes</code>, you can't specify <code>AllowedInstanceTypes</code>.</p>
    /// </note>
    /// <p>Default: No excluded instance types</p>
    pub excluded_instance_types: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    /// <p>Indicates whether current or previous generation instance types are included. The current generation instance types are recommended for use. Current generation instance types are typically the latest two to three generations in each instance family. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html">Instance types</a> in the <i>Amazon EC2 User Guide</i>.</p>
    /// <p>For current generation instance types, specify <code>current</code>.</p>
    /// <p>For previous generation instance types, specify <code>previous</code>.</p>
    /// <p>Default: Current and previous generation instance types</p>
    pub instance_generations: ::std::option::Option<::std::vec::Vec<crate::types::InstanceGeneration>>,
    /// <p>The price protection threshold for Spot Instances. This is the maximum you’ll pay for a Spot Instance, expressed as a percentage above the least expensive current generation M, C, or R instance type with your specified attributes. When Amazon EC2 selects instance types with your attributes, it excludes instance types priced above your threshold.</p>
    /// <p>The parameter accepts an integer, which Amazon EC2 interprets as a percentage.</p>
    /// <p>To turn off price protection, specify a high value, such as <code>999999</code>.</p>
    /// <p>This parameter is not supported for <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetSpotPlacementScores.html">GetSpotPlacementScores</a> and <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetInstanceTypesFromInstanceRequirements.html">GetInstanceTypesFromInstanceRequirements</a>.</p> <note>
    /// <p>If you set <code>TargetCapacityUnitType</code> to <code>vcpu</code> or <code>memory-mib</code>, the price protection threshold is applied based on the per-vCPU or per-memory price instead of the per-instance price.</p>
    /// </note>
    /// <p>Default: <code>100</code> </p>
    pub spot_max_price_percentage_over_lowest_price: ::std::option::Option<i32>,
    /// <p>The price protection threshold for On-Demand Instances. This is the maximum you’ll pay for an On-Demand Instance, expressed as a percentage above the least expensive current generation M, C, or R instance type with your specified attributes. When Amazon EC2 selects instance types with your attributes, it excludes instance types priced above your threshold.</p>
    /// <p>The parameter accepts an integer, which Amazon EC2 interprets as a percentage.</p>
    /// <p>To turn off price protection, specify a high value, such as <code>999999</code>.</p>
    /// <p>This parameter is not supported for <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetSpotPlacementScores.html">GetSpotPlacementScores</a> and <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetInstanceTypesFromInstanceRequirements.html">GetInstanceTypesFromInstanceRequirements</a>.</p> <note>
    /// <p>If you set <code>TargetCapacityUnitType</code> to <code>vcpu</code> or <code>memory-mib</code>, the price protection threshold is applied based on the per-vCPU or per-memory price instead of the per-instance price.</p>
    /// </note>
    /// <p>Default: <code>20</code> </p>
    pub on_demand_max_price_percentage_over_lowest_price: ::std::option::Option<i32>,
    /// <p>Indicates whether bare metal instance types must be included, excluded, or required.</p>
    /// <ul>
    /// <li> <p>To include bare metal instance types, specify <code>included</code>.</p> </li>
    /// <li> <p>To require only bare metal instance types, specify <code>required</code>.</p> </li>
    /// <li> <p>To exclude bare metal instance types, specify <code>excluded</code>.</p> </li>
    /// </ul>
    /// <p>Default: <code>excluded</code> </p>
    pub bare_metal: ::std::option::Option<crate::types::BareMetal>,
    /// <p>Indicates whether burstable performance T instance types are included, excluded, or required. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/burstable-performance-instances.html">Burstable performance instances</a>.</p>
    /// <ul>
    /// <li> <p>To include burstable performance instance types, specify <code>included</code>.</p> </li>
    /// <li> <p>To require only burstable performance instance types, specify <code>required</code>.</p> </li>
    /// <li> <p>To exclude burstable performance instance types, specify <code>excluded</code>.</p> </li>
    /// </ul>
    /// <p>Default: <code>excluded</code> </p>
    pub burstable_performance: ::std::option::Option<crate::types::BurstablePerformance>,
    /// <p>Indicates whether instance types must support hibernation for On-Demand Instances.</p>
    /// <p>This parameter is not supported for <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetSpotPlacementScores.html">GetSpotPlacementScores</a>.</p>
    /// <p>Default: <code>false</code> </p>
    pub require_hibernate_support: ::std::option::Option<bool>,
    /// <p>The minimum and maximum number of network interfaces.</p>
    /// <p>Default: No minimum or maximum limits</p>
    pub network_interface_count: ::std::option::Option<crate::types::NetworkInterfaceCount>,
    /// <p>Indicates whether instance types with instance store volumes are included, excluded, or required. For more information, <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/InstanceStorage.html">Amazon EC2 instance store</a> in the <i>Amazon EC2 User Guide</i>.</p>
    /// <ul>
    /// <li> <p>To include instance types with instance store volumes, specify <code>included</code>.</p> </li>
    /// <li> <p>To require only instance types with instance store volumes, specify <code>required</code>.</p> </li>
    /// <li> <p>To exclude instance types with instance store volumes, specify <code>excluded</code>.</p> </li>
    /// </ul>
    /// <p>Default: <code>included</code> </p>
    pub local_storage: ::std::option::Option<crate::types::LocalStorage>,
    /// <p>The type of local storage that is required.</p>
    /// <ul>
    /// <li> <p>For instance types with hard disk drive (HDD) storage, specify <code>hdd</code>.</p> </li>
    /// <li> <p>For instance types with solid state drive (SSD) storage, specify <code>ssd</code>.</p> </li>
    /// </ul>
    /// <p>Default: <code>hdd</code> and <code>ssd</code> </p>
    pub local_storage_types: ::std::option::Option<::std::vec::Vec<crate::types::LocalStorageType>>,
    /// <p>The minimum and maximum amount of total local storage, in GB.</p>
    /// <p>Default: No minimum or maximum limits</p>
    pub total_local_storage_gb: ::std::option::Option<crate::types::TotalLocalStorageGb>,
    /// <p>The minimum and maximum baseline bandwidth to Amazon EBS, in Mbps. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-optimized.html">Amazon EBS–optimized instances</a> in the <i>Amazon EC2 User Guide</i>.</p>
    /// <p>Default: No minimum or maximum limits</p>
    pub baseline_ebs_bandwidth_mbps: ::std::option::Option<crate::types::BaselineEbsBandwidthMbps>,
    /// <p>The accelerator types that must be on the instance type.</p>
    /// <ul>
    /// <li> <p>For instance types with GPU accelerators, specify <code>gpu</code>.</p> </li>
    /// <li> <p>For instance types with FPGA accelerators, specify <code>fpga</code>.</p> </li>
    /// <li> <p>For instance types with inference accelerators, specify <code>inference</code>.</p> </li>
    /// </ul>
    /// <p>Default: Any accelerator type</p>
    pub accelerator_types: ::std::option::Option<::std::vec::Vec<crate::types::AcceleratorType>>,
    /// <p>The minimum and maximum number of accelerators (GPUs, FPGAs, or Amazon Web Services Inferentia chips) on an instance.</p>
    /// <p>To exclude accelerator-enabled instance types, set <code>Max</code> to <code>0</code>.</p>
    /// <p>Default: No minimum or maximum limits</p>
    pub accelerator_count: ::std::option::Option<crate::types::AcceleratorCount>,
    /// <p>Indicates whether instance types must have accelerators by specific manufacturers.</p>
    /// <ul>
    /// <li> <p>For instance types with Amazon Web Services devices, specify <code>amazon-web-services</code>.</p> </li>
    /// <li> <p>For instance types with AMD devices, specify <code>amd</code>.</p> </li>
    /// <li> <p>For instance types with Habana devices, specify <code>habana</code>.</p> </li>
    /// <li> <p>For instance types with NVIDIA devices, specify <code>nvidia</code>.</p> </li>
    /// <li> <p>For instance types with Xilinx devices, specify <code>xilinx</code>.</p> </li>
    /// </ul>
    /// <p>Default: Any manufacturer</p>
    pub accelerator_manufacturers: ::std::option::Option<::std::vec::Vec<crate::types::AcceleratorManufacturer>>,
    /// <p>The accelerators that must be on the instance type.</p>
    /// <ul>
    /// <li> <p>For instance types with NVIDIA A10G GPUs, specify <code>a10g</code>.</p> </li>
    /// <li> <p>For instance types with NVIDIA A100 GPUs, specify <code>a100</code>.</p> </li>
    /// <li> <p>For instance types with NVIDIA H100 GPUs, specify <code>h100</code>.</p> </li>
    /// <li> <p>For instance types with Amazon Web Services Inferentia chips, specify <code>inferentia</code>.</p> </li>
    /// <li> <p>For instance types with NVIDIA GRID K520 GPUs, specify <code>k520</code>.</p> </li>
    /// <li> <p>For instance types with NVIDIA K80 GPUs, specify <code>k80</code>.</p> </li>
    /// <li> <p>For instance types with NVIDIA M60 GPUs, specify <code>m60</code>.</p> </li>
    /// <li> <p>For instance types with AMD Radeon Pro V520 GPUs, specify <code>radeon-pro-v520</code>.</p> </li>
    /// <li> <p>For instance types with NVIDIA T4 GPUs, specify <code>t4</code>.</p> </li>
    /// <li> <p>For instance types with NVIDIA T4G GPUs, specify <code>t4g</code>.</p> </li>
    /// <li> <p>For instance types with Xilinx VU9P FPGAs, specify <code>vu9p</code>.</p> </li>
    /// <li> <p>For instance types with NVIDIA V100 GPUs, specify <code>v100</code>.</p> </li>
    /// </ul>
    /// <p>Default: Any accelerator</p>
    pub accelerator_names: ::std::option::Option<::std::vec::Vec<crate::types::AcceleratorName>>,
    /// <p>The minimum and maximum amount of total accelerator memory, in MiB.</p>
    /// <p>Default: No minimum or maximum limits</p>
    pub accelerator_total_memory_mib: ::std::option::Option<crate::types::AcceleratorTotalMemoryMiB>,
    /// <p>The minimum and maximum amount of network bandwidth, in gigabits per second (Gbps).</p>
    /// <p>Default: No minimum or maximum limits</p>
    pub network_bandwidth_gbps: ::std::option::Option<crate::types::NetworkBandwidthGbps>,
    /// <p>The instance types to apply your specified attributes against. All other instance types are ignored, even if they match your specified attributes.</p>
    /// <p>You can use strings with one or more wild cards, represented by an asterisk (<code>*</code>), to allow an instance type, size, or generation. The following are examples: <code>m5.8xlarge</code>, <code>c5*.*</code>, <code>m5a.*</code>, <code>r*</code>, <code>*3*</code>.</p>
    /// <p>For example, if you specify <code>c5*</code>,Amazon EC2 will allow the entire C5 instance family, which includes all C5a and C5n instance types. If you specify <code>m5a.*</code>, Amazon EC2 will allow all the M5a instance types, but not the M5n instance types.</p> <note>
    /// <p>If you specify <code>AllowedInstanceTypes</code>, you can't specify <code>ExcludedInstanceTypes</code>.</p>
    /// </note>
    /// <p>Default: All instance types</p>
    pub allowed_instance_types: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl InstanceRequirements {
    /// <p>The minimum and maximum number of vCPUs.</p>
    pub fn v_cpu_count(&self) -> ::std::option::Option<&crate::types::VCpuCountRange> {
        self.v_cpu_count.as_ref()
    }
    /// <p>The minimum and maximum amount of memory, in MiB.</p>
    pub fn memory_mib(&self) -> ::std::option::Option<&crate::types::MemoryMiB> {
        self.memory_mib.as_ref()
    }
    /// <p>The CPU manufacturers to include.</p>
    /// <ul>
    /// <li> <p>For instance types with Intel CPUs, specify <code>intel</code>.</p> </li>
    /// <li> <p>For instance types with AMD CPUs, specify <code>amd</code>.</p> </li>
    /// <li> <p>For instance types with Amazon Web Services CPUs, specify <code>amazon-web-services</code>.</p> </li>
    /// </ul> <note>
    /// <p>Don't confuse the CPU manufacturer with the CPU architecture. Instances will be launched with a compatible CPU architecture based on the Amazon Machine Image (AMI) that you specify in your launch template.</p>
    /// </note>
    /// <p>Default: Any manufacturer</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 `.cpu_manufacturers.is_none()`.
    pub fn cpu_manufacturers(&self) -> &[crate::types::CpuManufacturer] {
        self.cpu_manufacturers.as_deref().unwrap_or_default()
    }
    /// <p>The minimum and maximum amount of memory per vCPU, in GiB.</p>
    /// <p>Default: No minimum or maximum limits</p>
    pub fn memory_gib_per_v_cpu(&self) -> ::std::option::Option<&crate::types::MemoryGiBPerVCpu> {
        self.memory_gib_per_v_cpu.as_ref()
    }
    /// <p>The instance types to exclude.</p>
    /// <p>You can use strings with one or more wild cards, represented by an asterisk (<code>*</code>), to exclude an instance type, size, or generation. The following are examples: <code>m5.8xlarge</code>, <code>c5*.*</code>, <code>m5a.*</code>, <code>r*</code>, <code>*3*</code>.</p>
    /// <p>For example, if you specify <code>c5*</code>,Amazon EC2 will exclude the entire C5 instance family, which includes all C5a and C5n instance types. If you specify <code>m5a.*</code>, Amazon EC2 will exclude all the M5a instance types, but not the M5n instance types.</p> <note>
    /// <p>If you specify <code>ExcludedInstanceTypes</code>, you can't specify <code>AllowedInstanceTypes</code>.</p>
    /// </note>
    /// <p>Default: No excluded instance types</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 `.excluded_instance_types.is_none()`.
    pub fn excluded_instance_types(&self) -> &[::std::string::String] {
        self.excluded_instance_types.as_deref().unwrap_or_default()
    }
    /// <p>Indicates whether current or previous generation instance types are included. The current generation instance types are recommended for use. Current generation instance types are typically the latest two to three generations in each instance family. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html">Instance types</a> in the <i>Amazon EC2 User Guide</i>.</p>
    /// <p>For current generation instance types, specify <code>current</code>.</p>
    /// <p>For previous generation instance types, specify <code>previous</code>.</p>
    /// <p>Default: Current and previous generation instance types</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 `.instance_generations.is_none()`.
    pub fn instance_generations(&self) -> &[crate::types::InstanceGeneration] {
        self.instance_generations.as_deref().unwrap_or_default()
    }
    /// <p>The price protection threshold for Spot Instances. This is the maximum you’ll pay for a Spot Instance, expressed as a percentage above the least expensive current generation M, C, or R instance type with your specified attributes. When Amazon EC2 selects instance types with your attributes, it excludes instance types priced above your threshold.</p>
    /// <p>The parameter accepts an integer, which Amazon EC2 interprets as a percentage.</p>
    /// <p>To turn off price protection, specify a high value, such as <code>999999</code>.</p>
    /// <p>This parameter is not supported for <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetSpotPlacementScores.html">GetSpotPlacementScores</a> and <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetInstanceTypesFromInstanceRequirements.html">GetInstanceTypesFromInstanceRequirements</a>.</p> <note>
    /// <p>If you set <code>TargetCapacityUnitType</code> to <code>vcpu</code> or <code>memory-mib</code>, the price protection threshold is applied based on the per-vCPU or per-memory price instead of the per-instance price.</p>
    /// </note>
    /// <p>Default: <code>100</code> </p>
    pub fn spot_max_price_percentage_over_lowest_price(&self) -> ::std::option::Option<i32> {
        self.spot_max_price_percentage_over_lowest_price
    }
    /// <p>The price protection threshold for On-Demand Instances. This is the maximum you’ll pay for an On-Demand Instance, expressed as a percentage above the least expensive current generation M, C, or R instance type with your specified attributes. When Amazon EC2 selects instance types with your attributes, it excludes instance types priced above your threshold.</p>
    /// <p>The parameter accepts an integer, which Amazon EC2 interprets as a percentage.</p>
    /// <p>To turn off price protection, specify a high value, such as <code>999999</code>.</p>
    /// <p>This parameter is not supported for <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetSpotPlacementScores.html">GetSpotPlacementScores</a> and <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetInstanceTypesFromInstanceRequirements.html">GetInstanceTypesFromInstanceRequirements</a>.</p> <note>
    /// <p>If you set <code>TargetCapacityUnitType</code> to <code>vcpu</code> or <code>memory-mib</code>, the price protection threshold is applied based on the per-vCPU or per-memory price instead of the per-instance price.</p>
    /// </note>
    /// <p>Default: <code>20</code> </p>
    pub fn on_demand_max_price_percentage_over_lowest_price(&self) -> ::std::option::Option<i32> {
        self.on_demand_max_price_percentage_over_lowest_price
    }
    /// <p>Indicates whether bare metal instance types must be included, excluded, or required.</p>
    /// <ul>
    /// <li> <p>To include bare metal instance types, specify <code>included</code>.</p> </li>
    /// <li> <p>To require only bare metal instance types, specify <code>required</code>.</p> </li>
    /// <li> <p>To exclude bare metal instance types, specify <code>excluded</code>.</p> </li>
    /// </ul>
    /// <p>Default: <code>excluded</code> </p>
    pub fn bare_metal(&self) -> ::std::option::Option<&crate::types::BareMetal> {
        self.bare_metal.as_ref()
    }
    /// <p>Indicates whether burstable performance T instance types are included, excluded, or required. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/burstable-performance-instances.html">Burstable performance instances</a>.</p>
    /// <ul>
    /// <li> <p>To include burstable performance instance types, specify <code>included</code>.</p> </li>
    /// <li> <p>To require only burstable performance instance types, specify <code>required</code>.</p> </li>
    /// <li> <p>To exclude burstable performance instance types, specify <code>excluded</code>.</p> </li>
    /// </ul>
    /// <p>Default: <code>excluded</code> </p>
    pub fn burstable_performance(&self) -> ::std::option::Option<&crate::types::BurstablePerformance> {
        self.burstable_performance.as_ref()
    }
    /// <p>Indicates whether instance types must support hibernation for On-Demand Instances.</p>
    /// <p>This parameter is not supported for <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetSpotPlacementScores.html">GetSpotPlacementScores</a>.</p>
    /// <p>Default: <code>false</code> </p>
    pub fn require_hibernate_support(&self) -> ::std::option::Option<bool> {
        self.require_hibernate_support
    }
    /// <p>The minimum and maximum number of network interfaces.</p>
    /// <p>Default: No minimum or maximum limits</p>
    pub fn network_interface_count(&self) -> ::std::option::Option<&crate::types::NetworkInterfaceCount> {
        self.network_interface_count.as_ref()
    }
    /// <p>Indicates whether instance types with instance store volumes are included, excluded, or required. For more information, <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/InstanceStorage.html">Amazon EC2 instance store</a> in the <i>Amazon EC2 User Guide</i>.</p>
    /// <ul>
    /// <li> <p>To include instance types with instance store volumes, specify <code>included</code>.</p> </li>
    /// <li> <p>To require only instance types with instance store volumes, specify <code>required</code>.</p> </li>
    /// <li> <p>To exclude instance types with instance store volumes, specify <code>excluded</code>.</p> </li>
    /// </ul>
    /// <p>Default: <code>included</code> </p>
    pub fn local_storage(&self) -> ::std::option::Option<&crate::types::LocalStorage> {
        self.local_storage.as_ref()
    }
    /// <p>The type of local storage that is required.</p>
    /// <ul>
    /// <li> <p>For instance types with hard disk drive (HDD) storage, specify <code>hdd</code>.</p> </li>
    /// <li> <p>For instance types with solid state drive (SSD) storage, specify <code>ssd</code>.</p> </li>
    /// </ul>
    /// <p>Default: <code>hdd</code> and <code>ssd</code> </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 `.local_storage_types.is_none()`.
    pub fn local_storage_types(&self) -> &[crate::types::LocalStorageType] {
        self.local_storage_types.as_deref().unwrap_or_default()
    }
    /// <p>The minimum and maximum amount of total local storage, in GB.</p>
    /// <p>Default: No minimum or maximum limits</p>
    pub fn total_local_storage_gb(&self) -> ::std::option::Option<&crate::types::TotalLocalStorageGb> {
        self.total_local_storage_gb.as_ref()
    }
    /// <p>The minimum and maximum baseline bandwidth to Amazon EBS, in Mbps. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-optimized.html">Amazon EBS–optimized instances</a> in the <i>Amazon EC2 User Guide</i>.</p>
    /// <p>Default: No minimum or maximum limits</p>
    pub fn baseline_ebs_bandwidth_mbps(&self) -> ::std::option::Option<&crate::types::BaselineEbsBandwidthMbps> {
        self.baseline_ebs_bandwidth_mbps.as_ref()
    }
    /// <p>The accelerator types that must be on the instance type.</p>
    /// <ul>
    /// <li> <p>For instance types with GPU accelerators, specify <code>gpu</code>.</p> </li>
    /// <li> <p>For instance types with FPGA accelerators, specify <code>fpga</code>.</p> </li>
    /// <li> <p>For instance types with inference accelerators, specify <code>inference</code>.</p> </li>
    /// </ul>
    /// <p>Default: Any accelerator type</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 `.accelerator_types.is_none()`.
    pub fn accelerator_types(&self) -> &[crate::types::AcceleratorType] {
        self.accelerator_types.as_deref().unwrap_or_default()
    }
    /// <p>The minimum and maximum number of accelerators (GPUs, FPGAs, or Amazon Web Services Inferentia chips) on an instance.</p>
    /// <p>To exclude accelerator-enabled instance types, set <code>Max</code> to <code>0</code>.</p>
    /// <p>Default: No minimum or maximum limits</p>
    pub fn accelerator_count(&self) -> ::std::option::Option<&crate::types::AcceleratorCount> {
        self.accelerator_count.as_ref()
    }
    /// <p>Indicates whether instance types must have accelerators by specific manufacturers.</p>
    /// <ul>
    /// <li> <p>For instance types with Amazon Web Services devices, specify <code>amazon-web-services</code>.</p> </li>
    /// <li> <p>For instance types with AMD devices, specify <code>amd</code>.</p> </li>
    /// <li> <p>For instance types with Habana devices, specify <code>habana</code>.</p> </li>
    /// <li> <p>For instance types with NVIDIA devices, specify <code>nvidia</code>.</p> </li>
    /// <li> <p>For instance types with Xilinx devices, specify <code>xilinx</code>.</p> </li>
    /// </ul>
    /// <p>Default: Any manufacturer</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 `.accelerator_manufacturers.is_none()`.
    pub fn accelerator_manufacturers(&self) -> &[crate::types::AcceleratorManufacturer] {
        self.accelerator_manufacturers.as_deref().unwrap_or_default()
    }
    /// <p>The accelerators that must be on the instance type.</p>
    /// <ul>
    /// <li> <p>For instance types with NVIDIA A10G GPUs, specify <code>a10g</code>.</p> </li>
    /// <li> <p>For instance types with NVIDIA A100 GPUs, specify <code>a100</code>.</p> </li>
    /// <li> <p>For instance types with NVIDIA H100 GPUs, specify <code>h100</code>.</p> </li>
    /// <li> <p>For instance types with Amazon Web Services Inferentia chips, specify <code>inferentia</code>.</p> </li>
    /// <li> <p>For instance types with NVIDIA GRID K520 GPUs, specify <code>k520</code>.</p> </li>
    /// <li> <p>For instance types with NVIDIA K80 GPUs, specify <code>k80</code>.</p> </li>
    /// <li> <p>For instance types with NVIDIA M60 GPUs, specify <code>m60</code>.</p> </li>
    /// <li> <p>For instance types with AMD Radeon Pro V520 GPUs, specify <code>radeon-pro-v520</code>.</p> </li>
    /// <li> <p>For instance types with NVIDIA T4 GPUs, specify <code>t4</code>.</p> </li>
    /// <li> <p>For instance types with NVIDIA T4G GPUs, specify <code>t4g</code>.</p> </li>
    /// <li> <p>For instance types with Xilinx VU9P FPGAs, specify <code>vu9p</code>.</p> </li>
    /// <li> <p>For instance types with NVIDIA V100 GPUs, specify <code>v100</code>.</p> </li>
    /// </ul>
    /// <p>Default: Any accelerator</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 `.accelerator_names.is_none()`.
    pub fn accelerator_names(&self) -> &[crate::types::AcceleratorName] {
        self.accelerator_names.as_deref().unwrap_or_default()
    }
    /// <p>The minimum and maximum amount of total accelerator memory, in MiB.</p>
    /// <p>Default: No minimum or maximum limits</p>
    pub fn accelerator_total_memory_mib(&self) -> ::std::option::Option<&crate::types::AcceleratorTotalMemoryMiB> {
        self.accelerator_total_memory_mib.as_ref()
    }
    /// <p>The minimum and maximum amount of network bandwidth, in gigabits per second (Gbps).</p>
    /// <p>Default: No minimum or maximum limits</p>
    pub fn network_bandwidth_gbps(&self) -> ::std::option::Option<&crate::types::NetworkBandwidthGbps> {
        self.network_bandwidth_gbps.as_ref()
    }
    /// <p>The instance types to apply your specified attributes against. All other instance types are ignored, even if they match your specified attributes.</p>
    /// <p>You can use strings with one or more wild cards, represented by an asterisk (<code>*</code>), to allow an instance type, size, or generation. The following are examples: <code>m5.8xlarge</code>, <code>c5*.*</code>, <code>m5a.*</code>, <code>r*</code>, <code>*3*</code>.</p>
    /// <p>For example, if you specify <code>c5*</code>,Amazon EC2 will allow the entire C5 instance family, which includes all C5a and C5n instance types. If you specify <code>m5a.*</code>, Amazon EC2 will allow all the M5a instance types, but not the M5n instance types.</p> <note>
    /// <p>If you specify <code>AllowedInstanceTypes</code>, you can't specify <code>ExcludedInstanceTypes</code>.</p>
    /// </note>
    /// <p>Default: All instance types</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 `.allowed_instance_types.is_none()`.
    pub fn allowed_instance_types(&self) -> &[::std::string::String] {
        self.allowed_instance_types.as_deref().unwrap_or_default()
    }
}
impl InstanceRequirements {
    /// Creates a new builder-style object to manufacture [`InstanceRequirements`](crate::types::InstanceRequirements).
    pub fn builder() -> crate::types::builders::InstanceRequirementsBuilder {
        crate::types::builders::InstanceRequirementsBuilder::default()
    }
}

/// A builder for [`InstanceRequirements`](crate::types::InstanceRequirements).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct InstanceRequirementsBuilder {
    pub(crate) v_cpu_count: ::std::option::Option<crate::types::VCpuCountRange>,
    pub(crate) memory_mib: ::std::option::Option<crate::types::MemoryMiB>,
    pub(crate) cpu_manufacturers: ::std::option::Option<::std::vec::Vec<crate::types::CpuManufacturer>>,
    pub(crate) memory_gib_per_v_cpu: ::std::option::Option<crate::types::MemoryGiBPerVCpu>,
    pub(crate) excluded_instance_types: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    pub(crate) instance_generations: ::std::option::Option<::std::vec::Vec<crate::types::InstanceGeneration>>,
    pub(crate) spot_max_price_percentage_over_lowest_price: ::std::option::Option<i32>,
    pub(crate) on_demand_max_price_percentage_over_lowest_price: ::std::option::Option<i32>,
    pub(crate) bare_metal: ::std::option::Option<crate::types::BareMetal>,
    pub(crate) burstable_performance: ::std::option::Option<crate::types::BurstablePerformance>,
    pub(crate) require_hibernate_support: ::std::option::Option<bool>,
    pub(crate) network_interface_count: ::std::option::Option<crate::types::NetworkInterfaceCount>,
    pub(crate) local_storage: ::std::option::Option<crate::types::LocalStorage>,
    pub(crate) local_storage_types: ::std::option::Option<::std::vec::Vec<crate::types::LocalStorageType>>,
    pub(crate) total_local_storage_gb: ::std::option::Option<crate::types::TotalLocalStorageGb>,
    pub(crate) baseline_ebs_bandwidth_mbps: ::std::option::Option<crate::types::BaselineEbsBandwidthMbps>,
    pub(crate) accelerator_types: ::std::option::Option<::std::vec::Vec<crate::types::AcceleratorType>>,
    pub(crate) accelerator_count: ::std::option::Option<crate::types::AcceleratorCount>,
    pub(crate) accelerator_manufacturers: ::std::option::Option<::std::vec::Vec<crate::types::AcceleratorManufacturer>>,
    pub(crate) accelerator_names: ::std::option::Option<::std::vec::Vec<crate::types::AcceleratorName>>,
    pub(crate) accelerator_total_memory_mib: ::std::option::Option<crate::types::AcceleratorTotalMemoryMiB>,
    pub(crate) network_bandwidth_gbps: ::std::option::Option<crate::types::NetworkBandwidthGbps>,
    pub(crate) allowed_instance_types: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl InstanceRequirementsBuilder {
    /// <p>The minimum and maximum number of vCPUs.</p>
    pub fn v_cpu_count(mut self, input: crate::types::VCpuCountRange) -> Self {
        self.v_cpu_count = ::std::option::Option::Some(input);
        self
    }
    /// <p>The minimum and maximum number of vCPUs.</p>
    pub fn set_v_cpu_count(mut self, input: ::std::option::Option<crate::types::VCpuCountRange>) -> Self {
        self.v_cpu_count = input;
        self
    }
    /// <p>The minimum and maximum number of vCPUs.</p>
    pub fn get_v_cpu_count(&self) -> &::std::option::Option<crate::types::VCpuCountRange> {
        &self.v_cpu_count
    }
    /// <p>The minimum and maximum amount of memory, in MiB.</p>
    pub fn memory_mib(mut self, input: crate::types::MemoryMiB) -> Self {
        self.memory_mib = ::std::option::Option::Some(input);
        self
    }
    /// <p>The minimum and maximum amount of memory, in MiB.</p>
    pub fn set_memory_mib(mut self, input: ::std::option::Option<crate::types::MemoryMiB>) -> Self {
        self.memory_mib = input;
        self
    }
    /// <p>The minimum and maximum amount of memory, in MiB.</p>
    pub fn get_memory_mib(&self) -> &::std::option::Option<crate::types::MemoryMiB> {
        &self.memory_mib
    }
    /// Appends an item to `cpu_manufacturers`.
    ///
    /// To override the contents of this collection use [`set_cpu_manufacturers`](Self::set_cpu_manufacturers).
    ///
    /// <p>The CPU manufacturers to include.</p>
    /// <ul>
    /// <li> <p>For instance types with Intel CPUs, specify <code>intel</code>.</p> </li>
    /// <li> <p>For instance types with AMD CPUs, specify <code>amd</code>.</p> </li>
    /// <li> <p>For instance types with Amazon Web Services CPUs, specify <code>amazon-web-services</code>.</p> </li>
    /// </ul> <note>
    /// <p>Don't confuse the CPU manufacturer with the CPU architecture. Instances will be launched with a compatible CPU architecture based on the Amazon Machine Image (AMI) that you specify in your launch template.</p>
    /// </note>
    /// <p>Default: Any manufacturer</p>
    pub fn cpu_manufacturers(mut self, input: crate::types::CpuManufacturer) -> Self {
        let mut v = self.cpu_manufacturers.unwrap_or_default();
        v.push(input);
        self.cpu_manufacturers = ::std::option::Option::Some(v);
        self
    }
    /// <p>The CPU manufacturers to include.</p>
    /// <ul>
    /// <li> <p>For instance types with Intel CPUs, specify <code>intel</code>.</p> </li>
    /// <li> <p>For instance types with AMD CPUs, specify <code>amd</code>.</p> </li>
    /// <li> <p>For instance types with Amazon Web Services CPUs, specify <code>amazon-web-services</code>.</p> </li>
    /// </ul> <note>
    /// <p>Don't confuse the CPU manufacturer with the CPU architecture. Instances will be launched with a compatible CPU architecture based on the Amazon Machine Image (AMI) that you specify in your launch template.</p>
    /// </note>
    /// <p>Default: Any manufacturer</p>
    pub fn set_cpu_manufacturers(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::CpuManufacturer>>) -> Self {
        self.cpu_manufacturers = input;
        self
    }
    /// <p>The CPU manufacturers to include.</p>
    /// <ul>
    /// <li> <p>For instance types with Intel CPUs, specify <code>intel</code>.</p> </li>
    /// <li> <p>For instance types with AMD CPUs, specify <code>amd</code>.</p> </li>
    /// <li> <p>For instance types with Amazon Web Services CPUs, specify <code>amazon-web-services</code>.</p> </li>
    /// </ul> <note>
    /// <p>Don't confuse the CPU manufacturer with the CPU architecture. Instances will be launched with a compatible CPU architecture based on the Amazon Machine Image (AMI) that you specify in your launch template.</p>
    /// </note>
    /// <p>Default: Any manufacturer</p>
    pub fn get_cpu_manufacturers(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::CpuManufacturer>> {
        &self.cpu_manufacturers
    }
    /// <p>The minimum and maximum amount of memory per vCPU, in GiB.</p>
    /// <p>Default: No minimum or maximum limits</p>
    pub fn memory_gib_per_v_cpu(mut self, input: crate::types::MemoryGiBPerVCpu) -> Self {
        self.memory_gib_per_v_cpu = ::std::option::Option::Some(input);
        self
    }
    /// <p>The minimum and maximum amount of memory per vCPU, in GiB.</p>
    /// <p>Default: No minimum or maximum limits</p>
    pub fn set_memory_gib_per_v_cpu(mut self, input: ::std::option::Option<crate::types::MemoryGiBPerVCpu>) -> Self {
        self.memory_gib_per_v_cpu = input;
        self
    }
    /// <p>The minimum and maximum amount of memory per vCPU, in GiB.</p>
    /// <p>Default: No minimum or maximum limits</p>
    pub fn get_memory_gib_per_v_cpu(&self) -> &::std::option::Option<crate::types::MemoryGiBPerVCpu> {
        &self.memory_gib_per_v_cpu
    }
    /// Appends an item to `excluded_instance_types`.
    ///
    /// To override the contents of this collection use [`set_excluded_instance_types`](Self::set_excluded_instance_types).
    ///
    /// <p>The instance types to exclude.</p>
    /// <p>You can use strings with one or more wild cards, represented by an asterisk (<code>*</code>), to exclude an instance type, size, or generation. The following are examples: <code>m5.8xlarge</code>, <code>c5*.*</code>, <code>m5a.*</code>, <code>r*</code>, <code>*3*</code>.</p>
    /// <p>For example, if you specify <code>c5*</code>,Amazon EC2 will exclude the entire C5 instance family, which includes all C5a and C5n instance types. If you specify <code>m5a.*</code>, Amazon EC2 will exclude all the M5a instance types, but not the M5n instance types.</p> <note>
    /// <p>If you specify <code>ExcludedInstanceTypes</code>, you can't specify <code>AllowedInstanceTypes</code>.</p>
    /// </note>
    /// <p>Default: No excluded instance types</p>
    pub fn excluded_instance_types(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.excluded_instance_types.unwrap_or_default();
        v.push(input.into());
        self.excluded_instance_types = ::std::option::Option::Some(v);
        self
    }
    /// <p>The instance types to exclude.</p>
    /// <p>You can use strings with one or more wild cards, represented by an asterisk (<code>*</code>), to exclude an instance type, size, or generation. The following are examples: <code>m5.8xlarge</code>, <code>c5*.*</code>, <code>m5a.*</code>, <code>r*</code>, <code>*3*</code>.</p>
    /// <p>For example, if you specify <code>c5*</code>,Amazon EC2 will exclude the entire C5 instance family, which includes all C5a and C5n instance types. If you specify <code>m5a.*</code>, Amazon EC2 will exclude all the M5a instance types, but not the M5n instance types.</p> <note>
    /// <p>If you specify <code>ExcludedInstanceTypes</code>, you can't specify <code>AllowedInstanceTypes</code>.</p>
    /// </note>
    /// <p>Default: No excluded instance types</p>
    pub fn set_excluded_instance_types(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.excluded_instance_types = input;
        self
    }
    /// <p>The instance types to exclude.</p>
    /// <p>You can use strings with one or more wild cards, represented by an asterisk (<code>*</code>), to exclude an instance type, size, or generation. The following are examples: <code>m5.8xlarge</code>, <code>c5*.*</code>, <code>m5a.*</code>, <code>r*</code>, <code>*3*</code>.</p>
    /// <p>For example, if you specify <code>c5*</code>,Amazon EC2 will exclude the entire C5 instance family, which includes all C5a and C5n instance types. If you specify <code>m5a.*</code>, Amazon EC2 will exclude all the M5a instance types, but not the M5n instance types.</p> <note>
    /// <p>If you specify <code>ExcludedInstanceTypes</code>, you can't specify <code>AllowedInstanceTypes</code>.</p>
    /// </note>
    /// <p>Default: No excluded instance types</p>
    pub fn get_excluded_instance_types(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.excluded_instance_types
    }
    /// Appends an item to `instance_generations`.
    ///
    /// To override the contents of this collection use [`set_instance_generations`](Self::set_instance_generations).
    ///
    /// <p>Indicates whether current or previous generation instance types are included. The current generation instance types are recommended for use. Current generation instance types are typically the latest two to three generations in each instance family. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html">Instance types</a> in the <i>Amazon EC2 User Guide</i>.</p>
    /// <p>For current generation instance types, specify <code>current</code>.</p>
    /// <p>For previous generation instance types, specify <code>previous</code>.</p>
    /// <p>Default: Current and previous generation instance types</p>
    pub fn instance_generations(mut self, input: crate::types::InstanceGeneration) -> Self {
        let mut v = self.instance_generations.unwrap_or_default();
        v.push(input);
        self.instance_generations = ::std::option::Option::Some(v);
        self
    }
    /// <p>Indicates whether current or previous generation instance types are included. The current generation instance types are recommended for use. Current generation instance types are typically the latest two to three generations in each instance family. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html">Instance types</a> in the <i>Amazon EC2 User Guide</i>.</p>
    /// <p>For current generation instance types, specify <code>current</code>.</p>
    /// <p>For previous generation instance types, specify <code>previous</code>.</p>
    /// <p>Default: Current and previous generation instance types</p>
    pub fn set_instance_generations(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::InstanceGeneration>>) -> Self {
        self.instance_generations = input;
        self
    }
    /// <p>Indicates whether current or previous generation instance types are included. The current generation instance types are recommended for use. Current generation instance types are typically the latest two to three generations in each instance family. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html">Instance types</a> in the <i>Amazon EC2 User Guide</i>.</p>
    /// <p>For current generation instance types, specify <code>current</code>.</p>
    /// <p>For previous generation instance types, specify <code>previous</code>.</p>
    /// <p>Default: Current and previous generation instance types</p>
    pub fn get_instance_generations(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::InstanceGeneration>> {
        &self.instance_generations
    }
    /// <p>The price protection threshold for Spot Instances. This is the maximum you’ll pay for a Spot Instance, expressed as a percentage above the least expensive current generation M, C, or R instance type with your specified attributes. When Amazon EC2 selects instance types with your attributes, it excludes instance types priced above your threshold.</p>
    /// <p>The parameter accepts an integer, which Amazon EC2 interprets as a percentage.</p>
    /// <p>To turn off price protection, specify a high value, such as <code>999999</code>.</p>
    /// <p>This parameter is not supported for <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetSpotPlacementScores.html">GetSpotPlacementScores</a> and <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetInstanceTypesFromInstanceRequirements.html">GetInstanceTypesFromInstanceRequirements</a>.</p> <note>
    /// <p>If you set <code>TargetCapacityUnitType</code> to <code>vcpu</code> or <code>memory-mib</code>, the price protection threshold is applied based on the per-vCPU or per-memory price instead of the per-instance price.</p>
    /// </note>
    /// <p>Default: <code>100</code> </p>
    pub fn spot_max_price_percentage_over_lowest_price(mut self, input: i32) -> Self {
        self.spot_max_price_percentage_over_lowest_price = ::std::option::Option::Some(input);
        self
    }
    /// <p>The price protection threshold for Spot Instances. This is the maximum you’ll pay for a Spot Instance, expressed as a percentage above the least expensive current generation M, C, or R instance type with your specified attributes. When Amazon EC2 selects instance types with your attributes, it excludes instance types priced above your threshold.</p>
    /// <p>The parameter accepts an integer, which Amazon EC2 interprets as a percentage.</p>
    /// <p>To turn off price protection, specify a high value, such as <code>999999</code>.</p>
    /// <p>This parameter is not supported for <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetSpotPlacementScores.html">GetSpotPlacementScores</a> and <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetInstanceTypesFromInstanceRequirements.html">GetInstanceTypesFromInstanceRequirements</a>.</p> <note>
    /// <p>If you set <code>TargetCapacityUnitType</code> to <code>vcpu</code> or <code>memory-mib</code>, the price protection threshold is applied based on the per-vCPU or per-memory price instead of the per-instance price.</p>
    /// </note>
    /// <p>Default: <code>100</code> </p>
    pub fn set_spot_max_price_percentage_over_lowest_price(mut self, input: ::std::option::Option<i32>) -> Self {
        self.spot_max_price_percentage_over_lowest_price = input;
        self
    }
    /// <p>The price protection threshold for Spot Instances. This is the maximum you’ll pay for a Spot Instance, expressed as a percentage above the least expensive current generation M, C, or R instance type with your specified attributes. When Amazon EC2 selects instance types with your attributes, it excludes instance types priced above your threshold.</p>
    /// <p>The parameter accepts an integer, which Amazon EC2 interprets as a percentage.</p>
    /// <p>To turn off price protection, specify a high value, such as <code>999999</code>.</p>
    /// <p>This parameter is not supported for <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetSpotPlacementScores.html">GetSpotPlacementScores</a> and <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetInstanceTypesFromInstanceRequirements.html">GetInstanceTypesFromInstanceRequirements</a>.</p> <note>
    /// <p>If you set <code>TargetCapacityUnitType</code> to <code>vcpu</code> or <code>memory-mib</code>, the price protection threshold is applied based on the per-vCPU or per-memory price instead of the per-instance price.</p>
    /// </note>
    /// <p>Default: <code>100</code> </p>
    pub fn get_spot_max_price_percentage_over_lowest_price(&self) -> &::std::option::Option<i32> {
        &self.spot_max_price_percentage_over_lowest_price
    }
    /// <p>The price protection threshold for On-Demand Instances. This is the maximum you’ll pay for an On-Demand Instance, expressed as a percentage above the least expensive current generation M, C, or R instance type with your specified attributes. When Amazon EC2 selects instance types with your attributes, it excludes instance types priced above your threshold.</p>
    /// <p>The parameter accepts an integer, which Amazon EC2 interprets as a percentage.</p>
    /// <p>To turn off price protection, specify a high value, such as <code>999999</code>.</p>
    /// <p>This parameter is not supported for <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetSpotPlacementScores.html">GetSpotPlacementScores</a> and <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetInstanceTypesFromInstanceRequirements.html">GetInstanceTypesFromInstanceRequirements</a>.</p> <note>
    /// <p>If you set <code>TargetCapacityUnitType</code> to <code>vcpu</code> or <code>memory-mib</code>, the price protection threshold is applied based on the per-vCPU or per-memory price instead of the per-instance price.</p>
    /// </note>
    /// <p>Default: <code>20</code> </p>
    pub fn on_demand_max_price_percentage_over_lowest_price(mut self, input: i32) -> Self {
        self.on_demand_max_price_percentage_over_lowest_price = ::std::option::Option::Some(input);
        self
    }
    /// <p>The price protection threshold for On-Demand Instances. This is the maximum you’ll pay for an On-Demand Instance, expressed as a percentage above the least expensive current generation M, C, or R instance type with your specified attributes. When Amazon EC2 selects instance types with your attributes, it excludes instance types priced above your threshold.</p>
    /// <p>The parameter accepts an integer, which Amazon EC2 interprets as a percentage.</p>
    /// <p>To turn off price protection, specify a high value, such as <code>999999</code>.</p>
    /// <p>This parameter is not supported for <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetSpotPlacementScores.html">GetSpotPlacementScores</a> and <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetInstanceTypesFromInstanceRequirements.html">GetInstanceTypesFromInstanceRequirements</a>.</p> <note>
    /// <p>If you set <code>TargetCapacityUnitType</code> to <code>vcpu</code> or <code>memory-mib</code>, the price protection threshold is applied based on the per-vCPU or per-memory price instead of the per-instance price.</p>
    /// </note>
    /// <p>Default: <code>20</code> </p>
    pub fn set_on_demand_max_price_percentage_over_lowest_price(mut self, input: ::std::option::Option<i32>) -> Self {
        self.on_demand_max_price_percentage_over_lowest_price = input;
        self
    }
    /// <p>The price protection threshold for On-Demand Instances. This is the maximum you’ll pay for an On-Demand Instance, expressed as a percentage above the least expensive current generation M, C, or R instance type with your specified attributes. When Amazon EC2 selects instance types with your attributes, it excludes instance types priced above your threshold.</p>
    /// <p>The parameter accepts an integer, which Amazon EC2 interprets as a percentage.</p>
    /// <p>To turn off price protection, specify a high value, such as <code>999999</code>.</p>
    /// <p>This parameter is not supported for <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetSpotPlacementScores.html">GetSpotPlacementScores</a> and <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetInstanceTypesFromInstanceRequirements.html">GetInstanceTypesFromInstanceRequirements</a>.</p> <note>
    /// <p>If you set <code>TargetCapacityUnitType</code> to <code>vcpu</code> or <code>memory-mib</code>, the price protection threshold is applied based on the per-vCPU or per-memory price instead of the per-instance price.</p>
    /// </note>
    /// <p>Default: <code>20</code> </p>
    pub fn get_on_demand_max_price_percentage_over_lowest_price(&self) -> &::std::option::Option<i32> {
        &self.on_demand_max_price_percentage_over_lowest_price
    }
    /// <p>Indicates whether bare metal instance types must be included, excluded, or required.</p>
    /// <ul>
    /// <li> <p>To include bare metal instance types, specify <code>included</code>.</p> </li>
    /// <li> <p>To require only bare metal instance types, specify <code>required</code>.</p> </li>
    /// <li> <p>To exclude bare metal instance types, specify <code>excluded</code>.</p> </li>
    /// </ul>
    /// <p>Default: <code>excluded</code> </p>
    pub fn bare_metal(mut self, input: crate::types::BareMetal) -> Self {
        self.bare_metal = ::std::option::Option::Some(input);
        self
    }
    /// <p>Indicates whether bare metal instance types must be included, excluded, or required.</p>
    /// <ul>
    /// <li> <p>To include bare metal instance types, specify <code>included</code>.</p> </li>
    /// <li> <p>To require only bare metal instance types, specify <code>required</code>.</p> </li>
    /// <li> <p>To exclude bare metal instance types, specify <code>excluded</code>.</p> </li>
    /// </ul>
    /// <p>Default: <code>excluded</code> </p>
    pub fn set_bare_metal(mut self, input: ::std::option::Option<crate::types::BareMetal>) -> Self {
        self.bare_metal = input;
        self
    }
    /// <p>Indicates whether bare metal instance types must be included, excluded, or required.</p>
    /// <ul>
    /// <li> <p>To include bare metal instance types, specify <code>included</code>.</p> </li>
    /// <li> <p>To require only bare metal instance types, specify <code>required</code>.</p> </li>
    /// <li> <p>To exclude bare metal instance types, specify <code>excluded</code>.</p> </li>
    /// </ul>
    /// <p>Default: <code>excluded</code> </p>
    pub fn get_bare_metal(&self) -> &::std::option::Option<crate::types::BareMetal> {
        &self.bare_metal
    }
    /// <p>Indicates whether burstable performance T instance types are included, excluded, or required. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/burstable-performance-instances.html">Burstable performance instances</a>.</p>
    /// <ul>
    /// <li> <p>To include burstable performance instance types, specify <code>included</code>.</p> </li>
    /// <li> <p>To require only burstable performance instance types, specify <code>required</code>.</p> </li>
    /// <li> <p>To exclude burstable performance instance types, specify <code>excluded</code>.</p> </li>
    /// </ul>
    /// <p>Default: <code>excluded</code> </p>
    pub fn burstable_performance(mut self, input: crate::types::BurstablePerformance) -> Self {
        self.burstable_performance = ::std::option::Option::Some(input);
        self
    }
    /// <p>Indicates whether burstable performance T instance types are included, excluded, or required. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/burstable-performance-instances.html">Burstable performance instances</a>.</p>
    /// <ul>
    /// <li> <p>To include burstable performance instance types, specify <code>included</code>.</p> </li>
    /// <li> <p>To require only burstable performance instance types, specify <code>required</code>.</p> </li>
    /// <li> <p>To exclude burstable performance instance types, specify <code>excluded</code>.</p> </li>
    /// </ul>
    /// <p>Default: <code>excluded</code> </p>
    pub fn set_burstable_performance(mut self, input: ::std::option::Option<crate::types::BurstablePerformance>) -> Self {
        self.burstable_performance = input;
        self
    }
    /// <p>Indicates whether burstable performance T instance types are included, excluded, or required. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/burstable-performance-instances.html">Burstable performance instances</a>.</p>
    /// <ul>
    /// <li> <p>To include burstable performance instance types, specify <code>included</code>.</p> </li>
    /// <li> <p>To require only burstable performance instance types, specify <code>required</code>.</p> </li>
    /// <li> <p>To exclude burstable performance instance types, specify <code>excluded</code>.</p> </li>
    /// </ul>
    /// <p>Default: <code>excluded</code> </p>
    pub fn get_burstable_performance(&self) -> &::std::option::Option<crate::types::BurstablePerformance> {
        &self.burstable_performance
    }
    /// <p>Indicates whether instance types must support hibernation for On-Demand Instances.</p>
    /// <p>This parameter is not supported for <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetSpotPlacementScores.html">GetSpotPlacementScores</a>.</p>
    /// <p>Default: <code>false</code> </p>
    pub fn require_hibernate_support(mut self, input: bool) -> Self {
        self.require_hibernate_support = ::std::option::Option::Some(input);
        self
    }
    /// <p>Indicates whether instance types must support hibernation for On-Demand Instances.</p>
    /// <p>This parameter is not supported for <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetSpotPlacementScores.html">GetSpotPlacementScores</a>.</p>
    /// <p>Default: <code>false</code> </p>
    pub fn set_require_hibernate_support(mut self, input: ::std::option::Option<bool>) -> Self {
        self.require_hibernate_support = input;
        self
    }
    /// <p>Indicates whether instance types must support hibernation for On-Demand Instances.</p>
    /// <p>This parameter is not supported for <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetSpotPlacementScores.html">GetSpotPlacementScores</a>.</p>
    /// <p>Default: <code>false</code> </p>
    pub fn get_require_hibernate_support(&self) -> &::std::option::Option<bool> {
        &self.require_hibernate_support
    }
    /// <p>The minimum and maximum number of network interfaces.</p>
    /// <p>Default: No minimum or maximum limits</p>
    pub fn network_interface_count(mut self, input: crate::types::NetworkInterfaceCount) -> Self {
        self.network_interface_count = ::std::option::Option::Some(input);
        self
    }
    /// <p>The minimum and maximum number of network interfaces.</p>
    /// <p>Default: No minimum or maximum limits</p>
    pub fn set_network_interface_count(mut self, input: ::std::option::Option<crate::types::NetworkInterfaceCount>) -> Self {
        self.network_interface_count = input;
        self
    }
    /// <p>The minimum and maximum number of network interfaces.</p>
    /// <p>Default: No minimum or maximum limits</p>
    pub fn get_network_interface_count(&self) -> &::std::option::Option<crate::types::NetworkInterfaceCount> {
        &self.network_interface_count
    }
    /// <p>Indicates whether instance types with instance store volumes are included, excluded, or required. For more information, <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/InstanceStorage.html">Amazon EC2 instance store</a> in the <i>Amazon EC2 User Guide</i>.</p>
    /// <ul>
    /// <li> <p>To include instance types with instance store volumes, specify <code>included</code>.</p> </li>
    /// <li> <p>To require only instance types with instance store volumes, specify <code>required</code>.</p> </li>
    /// <li> <p>To exclude instance types with instance store volumes, specify <code>excluded</code>.</p> </li>
    /// </ul>
    /// <p>Default: <code>included</code> </p>
    pub fn local_storage(mut self, input: crate::types::LocalStorage) -> Self {
        self.local_storage = ::std::option::Option::Some(input);
        self
    }
    /// <p>Indicates whether instance types with instance store volumes are included, excluded, or required. For more information, <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/InstanceStorage.html">Amazon EC2 instance store</a> in the <i>Amazon EC2 User Guide</i>.</p>
    /// <ul>
    /// <li> <p>To include instance types with instance store volumes, specify <code>included</code>.</p> </li>
    /// <li> <p>To require only instance types with instance store volumes, specify <code>required</code>.</p> </li>
    /// <li> <p>To exclude instance types with instance store volumes, specify <code>excluded</code>.</p> </li>
    /// </ul>
    /// <p>Default: <code>included</code> </p>
    pub fn set_local_storage(mut self, input: ::std::option::Option<crate::types::LocalStorage>) -> Self {
        self.local_storage = input;
        self
    }
    /// <p>Indicates whether instance types with instance store volumes are included, excluded, or required. For more information, <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/InstanceStorage.html">Amazon EC2 instance store</a> in the <i>Amazon EC2 User Guide</i>.</p>
    /// <ul>
    /// <li> <p>To include instance types with instance store volumes, specify <code>included</code>.</p> </li>
    /// <li> <p>To require only instance types with instance store volumes, specify <code>required</code>.</p> </li>
    /// <li> <p>To exclude instance types with instance store volumes, specify <code>excluded</code>.</p> </li>
    /// </ul>
    /// <p>Default: <code>included</code> </p>
    pub fn get_local_storage(&self) -> &::std::option::Option<crate::types::LocalStorage> {
        &self.local_storage
    }
    /// Appends an item to `local_storage_types`.
    ///
    /// To override the contents of this collection use [`set_local_storage_types`](Self::set_local_storage_types).
    ///
    /// <p>The type of local storage that is required.</p>
    /// <ul>
    /// <li> <p>For instance types with hard disk drive (HDD) storage, specify <code>hdd</code>.</p> </li>
    /// <li> <p>For instance types with solid state drive (SSD) storage, specify <code>ssd</code>.</p> </li>
    /// </ul>
    /// <p>Default: <code>hdd</code> and <code>ssd</code> </p>
    pub fn local_storage_types(mut self, input: crate::types::LocalStorageType) -> Self {
        let mut v = self.local_storage_types.unwrap_or_default();
        v.push(input);
        self.local_storage_types = ::std::option::Option::Some(v);
        self
    }
    /// <p>The type of local storage that is required.</p>
    /// <ul>
    /// <li> <p>For instance types with hard disk drive (HDD) storage, specify <code>hdd</code>.</p> </li>
    /// <li> <p>For instance types with solid state drive (SSD) storage, specify <code>ssd</code>.</p> </li>
    /// </ul>
    /// <p>Default: <code>hdd</code> and <code>ssd</code> </p>
    pub fn set_local_storage_types(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::LocalStorageType>>) -> Self {
        self.local_storage_types = input;
        self
    }
    /// <p>The type of local storage that is required.</p>
    /// <ul>
    /// <li> <p>For instance types with hard disk drive (HDD) storage, specify <code>hdd</code>.</p> </li>
    /// <li> <p>For instance types with solid state drive (SSD) storage, specify <code>ssd</code>.</p> </li>
    /// </ul>
    /// <p>Default: <code>hdd</code> and <code>ssd</code> </p>
    pub fn get_local_storage_types(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::LocalStorageType>> {
        &self.local_storage_types
    }
    /// <p>The minimum and maximum amount of total local storage, in GB.</p>
    /// <p>Default: No minimum or maximum limits</p>
    pub fn total_local_storage_gb(mut self, input: crate::types::TotalLocalStorageGb) -> Self {
        self.total_local_storage_gb = ::std::option::Option::Some(input);
        self
    }
    /// <p>The minimum and maximum amount of total local storage, in GB.</p>
    /// <p>Default: No minimum or maximum limits</p>
    pub fn set_total_local_storage_gb(mut self, input: ::std::option::Option<crate::types::TotalLocalStorageGb>) -> Self {
        self.total_local_storage_gb = input;
        self
    }
    /// <p>The minimum and maximum amount of total local storage, in GB.</p>
    /// <p>Default: No minimum or maximum limits</p>
    pub fn get_total_local_storage_gb(&self) -> &::std::option::Option<crate::types::TotalLocalStorageGb> {
        &self.total_local_storage_gb
    }
    /// <p>The minimum and maximum baseline bandwidth to Amazon EBS, in Mbps. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-optimized.html">Amazon EBS–optimized instances</a> in the <i>Amazon EC2 User Guide</i>.</p>
    /// <p>Default: No minimum or maximum limits</p>
    pub fn baseline_ebs_bandwidth_mbps(mut self, input: crate::types::BaselineEbsBandwidthMbps) -> Self {
        self.baseline_ebs_bandwidth_mbps = ::std::option::Option::Some(input);
        self
    }
    /// <p>The minimum and maximum baseline bandwidth to Amazon EBS, in Mbps. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-optimized.html">Amazon EBS–optimized instances</a> in the <i>Amazon EC2 User Guide</i>.</p>
    /// <p>Default: No minimum or maximum limits</p>
    pub fn set_baseline_ebs_bandwidth_mbps(mut self, input: ::std::option::Option<crate::types::BaselineEbsBandwidthMbps>) -> Self {
        self.baseline_ebs_bandwidth_mbps = input;
        self
    }
    /// <p>The minimum and maximum baseline bandwidth to Amazon EBS, in Mbps. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-optimized.html">Amazon EBS–optimized instances</a> in the <i>Amazon EC2 User Guide</i>.</p>
    /// <p>Default: No minimum or maximum limits</p>
    pub fn get_baseline_ebs_bandwidth_mbps(&self) -> &::std::option::Option<crate::types::BaselineEbsBandwidthMbps> {
        &self.baseline_ebs_bandwidth_mbps
    }
    /// Appends an item to `accelerator_types`.
    ///
    /// To override the contents of this collection use [`set_accelerator_types`](Self::set_accelerator_types).
    ///
    /// <p>The accelerator types that must be on the instance type.</p>
    /// <ul>
    /// <li> <p>For instance types with GPU accelerators, specify <code>gpu</code>.</p> </li>
    /// <li> <p>For instance types with FPGA accelerators, specify <code>fpga</code>.</p> </li>
    /// <li> <p>For instance types with inference accelerators, specify <code>inference</code>.</p> </li>
    /// </ul>
    /// <p>Default: Any accelerator type</p>
    pub fn accelerator_types(mut self, input: crate::types::AcceleratorType) -> Self {
        let mut v = self.accelerator_types.unwrap_or_default();
        v.push(input);
        self.accelerator_types = ::std::option::Option::Some(v);
        self
    }
    /// <p>The accelerator types that must be on the instance type.</p>
    /// <ul>
    /// <li> <p>For instance types with GPU accelerators, specify <code>gpu</code>.</p> </li>
    /// <li> <p>For instance types with FPGA accelerators, specify <code>fpga</code>.</p> </li>
    /// <li> <p>For instance types with inference accelerators, specify <code>inference</code>.</p> </li>
    /// </ul>
    /// <p>Default: Any accelerator type</p>
    pub fn set_accelerator_types(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::AcceleratorType>>) -> Self {
        self.accelerator_types = input;
        self
    }
    /// <p>The accelerator types that must be on the instance type.</p>
    /// <ul>
    /// <li> <p>For instance types with GPU accelerators, specify <code>gpu</code>.</p> </li>
    /// <li> <p>For instance types with FPGA accelerators, specify <code>fpga</code>.</p> </li>
    /// <li> <p>For instance types with inference accelerators, specify <code>inference</code>.</p> </li>
    /// </ul>
    /// <p>Default: Any accelerator type</p>
    pub fn get_accelerator_types(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::AcceleratorType>> {
        &self.accelerator_types
    }
    /// <p>The minimum and maximum number of accelerators (GPUs, FPGAs, or Amazon Web Services Inferentia chips) on an instance.</p>
    /// <p>To exclude accelerator-enabled instance types, set <code>Max</code> to <code>0</code>.</p>
    /// <p>Default: No minimum or maximum limits</p>
    pub fn accelerator_count(mut self, input: crate::types::AcceleratorCount) -> Self {
        self.accelerator_count = ::std::option::Option::Some(input);
        self
    }
    /// <p>The minimum and maximum number of accelerators (GPUs, FPGAs, or Amazon Web Services Inferentia chips) on an instance.</p>
    /// <p>To exclude accelerator-enabled instance types, set <code>Max</code> to <code>0</code>.</p>
    /// <p>Default: No minimum or maximum limits</p>
    pub fn set_accelerator_count(mut self, input: ::std::option::Option<crate::types::AcceleratorCount>) -> Self {
        self.accelerator_count = input;
        self
    }
    /// <p>The minimum and maximum number of accelerators (GPUs, FPGAs, or Amazon Web Services Inferentia chips) on an instance.</p>
    /// <p>To exclude accelerator-enabled instance types, set <code>Max</code> to <code>0</code>.</p>
    /// <p>Default: No minimum or maximum limits</p>
    pub fn get_accelerator_count(&self) -> &::std::option::Option<crate::types::AcceleratorCount> {
        &self.accelerator_count
    }
    /// Appends an item to `accelerator_manufacturers`.
    ///
    /// To override the contents of this collection use [`set_accelerator_manufacturers`](Self::set_accelerator_manufacturers).
    ///
    /// <p>Indicates whether instance types must have accelerators by specific manufacturers.</p>
    /// <ul>
    /// <li> <p>For instance types with Amazon Web Services devices, specify <code>amazon-web-services</code>.</p> </li>
    /// <li> <p>For instance types with AMD devices, specify <code>amd</code>.</p> </li>
    /// <li> <p>For instance types with Habana devices, specify <code>habana</code>.</p> </li>
    /// <li> <p>For instance types with NVIDIA devices, specify <code>nvidia</code>.</p> </li>
    /// <li> <p>For instance types with Xilinx devices, specify <code>xilinx</code>.</p> </li>
    /// </ul>
    /// <p>Default: Any manufacturer</p>
    pub fn accelerator_manufacturers(mut self, input: crate::types::AcceleratorManufacturer) -> Self {
        let mut v = self.accelerator_manufacturers.unwrap_or_default();
        v.push(input);
        self.accelerator_manufacturers = ::std::option::Option::Some(v);
        self
    }
    /// <p>Indicates whether instance types must have accelerators by specific manufacturers.</p>
    /// <ul>
    /// <li> <p>For instance types with Amazon Web Services devices, specify <code>amazon-web-services</code>.</p> </li>
    /// <li> <p>For instance types with AMD devices, specify <code>amd</code>.</p> </li>
    /// <li> <p>For instance types with Habana devices, specify <code>habana</code>.</p> </li>
    /// <li> <p>For instance types with NVIDIA devices, specify <code>nvidia</code>.</p> </li>
    /// <li> <p>For instance types with Xilinx devices, specify <code>xilinx</code>.</p> </li>
    /// </ul>
    /// <p>Default: Any manufacturer</p>
    pub fn set_accelerator_manufacturers(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::AcceleratorManufacturer>>) -> Self {
        self.accelerator_manufacturers = input;
        self
    }
    /// <p>Indicates whether instance types must have accelerators by specific manufacturers.</p>
    /// <ul>
    /// <li> <p>For instance types with Amazon Web Services devices, specify <code>amazon-web-services</code>.</p> </li>
    /// <li> <p>For instance types with AMD devices, specify <code>amd</code>.</p> </li>
    /// <li> <p>For instance types with Habana devices, specify <code>habana</code>.</p> </li>
    /// <li> <p>For instance types with NVIDIA devices, specify <code>nvidia</code>.</p> </li>
    /// <li> <p>For instance types with Xilinx devices, specify <code>xilinx</code>.</p> </li>
    /// </ul>
    /// <p>Default: Any manufacturer</p>
    pub fn get_accelerator_manufacturers(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::AcceleratorManufacturer>> {
        &self.accelerator_manufacturers
    }
    /// Appends an item to `accelerator_names`.
    ///
    /// To override the contents of this collection use [`set_accelerator_names`](Self::set_accelerator_names).
    ///
    /// <p>The accelerators that must be on the instance type.</p>
    /// <ul>
    /// <li> <p>For instance types with NVIDIA A10G GPUs, specify <code>a10g</code>.</p> </li>
    /// <li> <p>For instance types with NVIDIA A100 GPUs, specify <code>a100</code>.</p> </li>
    /// <li> <p>For instance types with NVIDIA H100 GPUs, specify <code>h100</code>.</p> </li>
    /// <li> <p>For instance types with Amazon Web Services Inferentia chips, specify <code>inferentia</code>.</p> </li>
    /// <li> <p>For instance types with NVIDIA GRID K520 GPUs, specify <code>k520</code>.</p> </li>
    /// <li> <p>For instance types with NVIDIA K80 GPUs, specify <code>k80</code>.</p> </li>
    /// <li> <p>For instance types with NVIDIA M60 GPUs, specify <code>m60</code>.</p> </li>
    /// <li> <p>For instance types with AMD Radeon Pro V520 GPUs, specify <code>radeon-pro-v520</code>.</p> </li>
    /// <li> <p>For instance types with NVIDIA T4 GPUs, specify <code>t4</code>.</p> </li>
    /// <li> <p>For instance types with NVIDIA T4G GPUs, specify <code>t4g</code>.</p> </li>
    /// <li> <p>For instance types with Xilinx VU9P FPGAs, specify <code>vu9p</code>.</p> </li>
    /// <li> <p>For instance types with NVIDIA V100 GPUs, specify <code>v100</code>.</p> </li>
    /// </ul>
    /// <p>Default: Any accelerator</p>
    pub fn accelerator_names(mut self, input: crate::types::AcceleratorName) -> Self {
        let mut v = self.accelerator_names.unwrap_or_default();
        v.push(input);
        self.accelerator_names = ::std::option::Option::Some(v);
        self
    }
    /// <p>The accelerators that must be on the instance type.</p>
    /// <ul>
    /// <li> <p>For instance types with NVIDIA A10G GPUs, specify <code>a10g</code>.</p> </li>
    /// <li> <p>For instance types with NVIDIA A100 GPUs, specify <code>a100</code>.</p> </li>
    /// <li> <p>For instance types with NVIDIA H100 GPUs, specify <code>h100</code>.</p> </li>
    /// <li> <p>For instance types with Amazon Web Services Inferentia chips, specify <code>inferentia</code>.</p> </li>
    /// <li> <p>For instance types with NVIDIA GRID K520 GPUs, specify <code>k520</code>.</p> </li>
    /// <li> <p>For instance types with NVIDIA K80 GPUs, specify <code>k80</code>.</p> </li>
    /// <li> <p>For instance types with NVIDIA M60 GPUs, specify <code>m60</code>.</p> </li>
    /// <li> <p>For instance types with AMD Radeon Pro V520 GPUs, specify <code>radeon-pro-v520</code>.</p> </li>
    /// <li> <p>For instance types with NVIDIA T4 GPUs, specify <code>t4</code>.</p> </li>
    /// <li> <p>For instance types with NVIDIA T4G GPUs, specify <code>t4g</code>.</p> </li>
    /// <li> <p>For instance types with Xilinx VU9P FPGAs, specify <code>vu9p</code>.</p> </li>
    /// <li> <p>For instance types with NVIDIA V100 GPUs, specify <code>v100</code>.</p> </li>
    /// </ul>
    /// <p>Default: Any accelerator</p>
    pub fn set_accelerator_names(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::AcceleratorName>>) -> Self {
        self.accelerator_names = input;
        self
    }
    /// <p>The accelerators that must be on the instance type.</p>
    /// <ul>
    /// <li> <p>For instance types with NVIDIA A10G GPUs, specify <code>a10g</code>.</p> </li>
    /// <li> <p>For instance types with NVIDIA A100 GPUs, specify <code>a100</code>.</p> </li>
    /// <li> <p>For instance types with NVIDIA H100 GPUs, specify <code>h100</code>.</p> </li>
    /// <li> <p>For instance types with Amazon Web Services Inferentia chips, specify <code>inferentia</code>.</p> </li>
    /// <li> <p>For instance types with NVIDIA GRID K520 GPUs, specify <code>k520</code>.</p> </li>
    /// <li> <p>For instance types with NVIDIA K80 GPUs, specify <code>k80</code>.</p> </li>
    /// <li> <p>For instance types with NVIDIA M60 GPUs, specify <code>m60</code>.</p> </li>
    /// <li> <p>For instance types with AMD Radeon Pro V520 GPUs, specify <code>radeon-pro-v520</code>.</p> </li>
    /// <li> <p>For instance types with NVIDIA T4 GPUs, specify <code>t4</code>.</p> </li>
    /// <li> <p>For instance types with NVIDIA T4G GPUs, specify <code>t4g</code>.</p> </li>
    /// <li> <p>For instance types with Xilinx VU9P FPGAs, specify <code>vu9p</code>.</p> </li>
    /// <li> <p>For instance types with NVIDIA V100 GPUs, specify <code>v100</code>.</p> </li>
    /// </ul>
    /// <p>Default: Any accelerator</p>
    pub fn get_accelerator_names(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::AcceleratorName>> {
        &self.accelerator_names
    }
    /// <p>The minimum and maximum amount of total accelerator memory, in MiB.</p>
    /// <p>Default: No minimum or maximum limits</p>
    pub fn accelerator_total_memory_mib(mut self, input: crate::types::AcceleratorTotalMemoryMiB) -> Self {
        self.accelerator_total_memory_mib = ::std::option::Option::Some(input);
        self
    }
    /// <p>The minimum and maximum amount of total accelerator memory, in MiB.</p>
    /// <p>Default: No minimum or maximum limits</p>
    pub fn set_accelerator_total_memory_mib(mut self, input: ::std::option::Option<crate::types::AcceleratorTotalMemoryMiB>) -> Self {
        self.accelerator_total_memory_mib = input;
        self
    }
    /// <p>The minimum and maximum amount of total accelerator memory, in MiB.</p>
    /// <p>Default: No minimum or maximum limits</p>
    pub fn get_accelerator_total_memory_mib(&self) -> &::std::option::Option<crate::types::AcceleratorTotalMemoryMiB> {
        &self.accelerator_total_memory_mib
    }
    /// <p>The minimum and maximum amount of network bandwidth, in gigabits per second (Gbps).</p>
    /// <p>Default: No minimum or maximum limits</p>
    pub fn network_bandwidth_gbps(mut self, input: crate::types::NetworkBandwidthGbps) -> Self {
        self.network_bandwidth_gbps = ::std::option::Option::Some(input);
        self
    }
    /// <p>The minimum and maximum amount of network bandwidth, in gigabits per second (Gbps).</p>
    /// <p>Default: No minimum or maximum limits</p>
    pub fn set_network_bandwidth_gbps(mut self, input: ::std::option::Option<crate::types::NetworkBandwidthGbps>) -> Self {
        self.network_bandwidth_gbps = input;
        self
    }
    /// <p>The minimum and maximum amount of network bandwidth, in gigabits per second (Gbps).</p>
    /// <p>Default: No minimum or maximum limits</p>
    pub fn get_network_bandwidth_gbps(&self) -> &::std::option::Option<crate::types::NetworkBandwidthGbps> {
        &self.network_bandwidth_gbps
    }
    /// Appends an item to `allowed_instance_types`.
    ///
    /// To override the contents of this collection use [`set_allowed_instance_types`](Self::set_allowed_instance_types).
    ///
    /// <p>The instance types to apply your specified attributes against. All other instance types are ignored, even if they match your specified attributes.</p>
    /// <p>You can use strings with one or more wild cards, represented by an asterisk (<code>*</code>), to allow an instance type, size, or generation. The following are examples: <code>m5.8xlarge</code>, <code>c5*.*</code>, <code>m5a.*</code>, <code>r*</code>, <code>*3*</code>.</p>
    /// <p>For example, if you specify <code>c5*</code>,Amazon EC2 will allow the entire C5 instance family, which includes all C5a and C5n instance types. If you specify <code>m5a.*</code>, Amazon EC2 will allow all the M5a instance types, but not the M5n instance types.</p> <note>
    /// <p>If you specify <code>AllowedInstanceTypes</code>, you can't specify <code>ExcludedInstanceTypes</code>.</p>
    /// </note>
    /// <p>Default: All instance types</p>
    pub fn allowed_instance_types(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.allowed_instance_types.unwrap_or_default();
        v.push(input.into());
        self.allowed_instance_types = ::std::option::Option::Some(v);
        self
    }
    /// <p>The instance types to apply your specified attributes against. All other instance types are ignored, even if they match your specified attributes.</p>
    /// <p>You can use strings with one or more wild cards, represented by an asterisk (<code>*</code>), to allow an instance type, size, or generation. The following are examples: <code>m5.8xlarge</code>, <code>c5*.*</code>, <code>m5a.*</code>, <code>r*</code>, <code>*3*</code>.</p>
    /// <p>For example, if you specify <code>c5*</code>,Amazon EC2 will allow the entire C5 instance family, which includes all C5a and C5n instance types. If you specify <code>m5a.*</code>, Amazon EC2 will allow all the M5a instance types, but not the M5n instance types.</p> <note>
    /// <p>If you specify <code>AllowedInstanceTypes</code>, you can't specify <code>ExcludedInstanceTypes</code>.</p>
    /// </note>
    /// <p>Default: All instance types</p>
    pub fn set_allowed_instance_types(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.allowed_instance_types = input;
        self
    }
    /// <p>The instance types to apply your specified attributes against. All other instance types are ignored, even if they match your specified attributes.</p>
    /// <p>You can use strings with one or more wild cards, represented by an asterisk (<code>*</code>), to allow an instance type, size, or generation. The following are examples: <code>m5.8xlarge</code>, <code>c5*.*</code>, <code>m5a.*</code>, <code>r*</code>, <code>*3*</code>.</p>
    /// <p>For example, if you specify <code>c5*</code>,Amazon EC2 will allow the entire C5 instance family, which includes all C5a and C5n instance types. If you specify <code>m5a.*</code>, Amazon EC2 will allow all the M5a instance types, but not the M5n instance types.</p> <note>
    /// <p>If you specify <code>AllowedInstanceTypes</code>, you can't specify <code>ExcludedInstanceTypes</code>.</p>
    /// </note>
    /// <p>Default: All instance types</p>
    pub fn get_allowed_instance_types(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.allowed_instance_types
    }
    /// Consumes the builder and constructs a [`InstanceRequirements`](crate::types::InstanceRequirements).
    pub fn build(self) -> crate::types::InstanceRequirements {
        crate::types::InstanceRequirements {
            v_cpu_count: self.v_cpu_count,
            memory_mib: self.memory_mib,
            cpu_manufacturers: self.cpu_manufacturers,
            memory_gib_per_v_cpu: self.memory_gib_per_v_cpu,
            excluded_instance_types: self.excluded_instance_types,
            instance_generations: self.instance_generations,
            spot_max_price_percentage_over_lowest_price: self.spot_max_price_percentage_over_lowest_price,
            on_demand_max_price_percentage_over_lowest_price: self.on_demand_max_price_percentage_over_lowest_price,
            bare_metal: self.bare_metal,
            burstable_performance: self.burstable_performance,
            require_hibernate_support: self.require_hibernate_support,
            network_interface_count: self.network_interface_count,
            local_storage: self.local_storage,
            local_storage_types: self.local_storage_types,
            total_local_storage_gb: self.total_local_storage_gb,
            baseline_ebs_bandwidth_mbps: self.baseline_ebs_bandwidth_mbps,
            accelerator_types: self.accelerator_types,
            accelerator_count: self.accelerator_count,
            accelerator_manufacturers: self.accelerator_manufacturers,
            accelerator_names: self.accelerator_names,
            accelerator_total_memory_mib: self.accelerator_total_memory_mib,
            network_bandwidth_gbps: self.network_bandwidth_gbps,
            allowed_instance_types: self.allowed_instance_types,
        }
    }
}