aws-sdk-ec2 1.223.0

AWS SDK for Amazon Elastic Compute Cloud
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
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>Describes an instance.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Instance {
    /// <p>The architecture of the image.</p>
    pub architecture: ::std::option::Option<crate::types::ArchitectureValues>,
    /// <p>Any block device mapping entries for the instance.</p>
    pub block_device_mappings: ::std::option::Option<::std::vec::Vec<crate::types::InstanceBlockDeviceMapping>>,
    /// <p>The idempotency token you provided when you launched the instance, if applicable.</p>
    pub client_token: ::std::option::Option<::std::string::String>,
    /// <p>Indicates whether the instance is optimized for Amazon EBS I/O. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS Optimized instance.</p>
    pub ebs_optimized: ::std::option::Option<bool>,
    /// <p>Specifies whether enhanced networking with ENA is enabled.</p>
    pub ena_support: ::std::option::Option<bool>,
    /// <p>The hypervisor type of the instance. The value <code>xen</code> is used for both Xen and Nitro hypervisors.</p>
    pub hypervisor: ::std::option::Option<crate::types::HypervisorType>,
    /// <p>The IAM instance profile associated with the instance, if applicable.</p>
    pub iam_instance_profile: ::std::option::Option<crate::types::IamInstanceProfile>,
    /// <p>Indicates whether this is a Spot Instance or a Scheduled Instance.</p>
    pub instance_lifecycle: ::std::option::Option<crate::types::InstanceLifecycleType>,
    /// <p>Deprecated.</p><note>
    /// <p>Amazon Elastic Graphics reached end of life on January 8, 2024.</p>
    /// </note>
    pub elastic_gpu_associations: ::std::option::Option<::std::vec::Vec<crate::types::ElasticGpuAssociation>>,
    /// <p>Deprecated</p><note>
    /// <p>Amazon Elastic Inference is no longer available.</p>
    /// </note>
    pub elastic_inference_accelerator_associations: ::std::option::Option<::std::vec::Vec<crate::types::ElasticInferenceAcceleratorAssociation>>,
    /// <p>The network interfaces for the instance.</p>
    pub network_interfaces: ::std::option::Option<::std::vec::Vec<crate::types::InstanceNetworkInterface>>,
    /// <p>The Amazon Resource Name (ARN) of the Outpost.</p>
    pub outpost_arn: ::std::option::Option<::std::string::String>,
    /// <p>The device name of the root device volume (for example, <code>/dev/sda1</code>).</p>
    pub root_device_name: ::std::option::Option<::std::string::String>,
    /// <p>The root device type used by the AMI. The AMI can use an EBS volume or an instance store volume.</p>
    pub root_device_type: ::std::option::Option<crate::types::DeviceType>,
    /// <p>The security groups for the instance.</p>
    pub security_groups: ::std::option::Option<::std::vec::Vec<crate::types::GroupIdentifier>>,
    /// <p>Indicates whether source/destination checking is enabled.</p>
    pub source_dest_check: ::std::option::Option<bool>,
    /// <p>If the request is a Spot Instance request, the ID of the request.</p>
    pub spot_instance_request_id: ::std::option::Option<::std::string::String>,
    /// <p>Specifies whether enhanced networking with the Intel 82599 Virtual Function interface is enabled.</p>
    pub sriov_net_support: ::std::option::Option<::std::string::String>,
    /// <p>The reason for the most recent state transition.</p>
    pub state_reason: ::std::option::Option<crate::types::StateReason>,
    /// <p>Any tags assigned to the instance.</p>
    pub tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
    /// <p>The virtualization type of the instance.</p>
    pub virtualization_type: ::std::option::Option<crate::types::VirtualizationType>,
    /// <p>The CPU options for the instance.</p>
    pub cpu_options: ::std::option::Option<crate::types::CpuOptions>,
    /// <p>The ID of the Capacity Block.</p><note>
    /// <p>For P5 instances, a Capacity Block ID refers to a group of instances. For Trn2u instances, a capacity block ID refers to an EC2 UltraServer.</p>
    /// </note>
    pub capacity_block_id: ::std::option::Option<::std::string::String>,
    /// <p>The ID of the Capacity Reservation.</p>
    pub capacity_reservation_id: ::std::option::Option<::std::string::String>,
    /// <p>Information about the Capacity Reservation targeting option.</p>
    pub capacity_reservation_specification: ::std::option::Option<crate::types::CapacityReservationSpecificationResponse>,
    /// <p>Indicates whether the instance is enabled for hibernation.</p>
    pub hibernation_options: ::std::option::Option<crate::types::HibernationOptions>,
    /// <p>The license configurations for the instance.</p>
    pub licenses: ::std::option::Option<::std::vec::Vec<crate::types::LicenseConfiguration>>,
    /// <p>The metadata options for the instance.</p>
    pub metadata_options: ::std::option::Option<crate::types::InstanceMetadataOptionsResponse>,
    /// <p>Indicates whether the instance is enabled for Amazon Web Services Nitro Enclaves.</p>
    pub enclave_options: ::std::option::Option<crate::types::EnclaveOptions>,
    /// <p>The boot mode that was specified by the AMI. If the value is <code>uefi-preferred</code>, the AMI supports both UEFI and Legacy BIOS. The <code>currentInstanceBootMode</code> parameter is the boot mode that is used to boot the instance at launch or start.</p><note>
    /// <p>The operating system contained in the AMI must be configured to support the specified boot mode.</p>
    /// </note>
    /// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-boot.html">Boot modes</a> in the <i>Amazon EC2 User Guide</i>.</p>
    pub boot_mode: ::std::option::Option<crate::types::BootModeValues>,
    /// <p>The platform details value for the instance. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/billing-info-fields.html">AMI billing information fields</a> in the <i>Amazon EC2 User Guide</i>.</p>
    pub platform_details: ::std::option::Option<::std::string::String>,
    /// <p>The usage operation value for the instance. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/billing-info-fields.html">AMI billing information fields</a> in the <i>Amazon EC2 User Guide</i>.</p>
    pub usage_operation: ::std::option::Option<::std::string::String>,
    /// <p>The time that the usage operation was last updated.</p>
    pub usage_operation_update_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>The options for the instance hostname.</p>
    pub private_dns_name_options: ::std::option::Option<crate::types::PrivateDnsNameOptionsResponse>,
    /// <p>The IPv6 address assigned to the instance.</p>
    pub ipv6_address: ::std::option::Option<::std::string::String>,
    /// <p>If the instance is configured for NitroTPM support, the value is <code>v2.0</code>. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/nitrotpm.html">NitroTPM</a> in the <i>Amazon EC2 User Guide</i>.</p>
    pub tpm_support: ::std::option::Option<::std::string::String>,
    /// <p>Provides information on the recovery and maintenance options of your instance.</p>
    pub maintenance_options: ::std::option::Option<crate::types::InstanceMaintenanceOptions>,
    /// <p>The boot mode that is used to boot the instance at launch or start. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-boot.html">Boot modes</a> in the <i>Amazon EC2 User Guide</i>.</p>
    pub current_instance_boot_mode: ::std::option::Option<crate::types::InstanceBootModeValues>,
    /// <p>Contains settings for the network performance options for your instance.</p>
    pub network_performance_options: ::std::option::Option<crate::types::InstanceNetworkPerformanceOptions>,
    /// <p>The service provider that manages the instance.</p>
    pub operator: ::std::option::Option<crate::types::OperatorResponse>,
    /// <p>The secondary interfaces for the instance.</p>
    pub secondary_interfaces: ::std::option::Option<::std::vec::Vec<crate::types::InstanceSecondaryInterface>>,
    /// <p>The ID of the instance.</p>
    pub instance_id: ::std::option::Option<::std::string::String>,
    /// <p>The ID of the AMI used to launch the instance.</p>
    pub image_id: ::std::option::Option<::std::string::String>,
    /// <p>The current state of the instance.</p>
    pub state: ::std::option::Option<crate::types::InstanceState>,
    /// <p>\[IPv4 only\] The private DNS hostname name assigned to the instance. This DNS hostname can only be used inside the Amazon EC2 network. This name is not available until the instance enters the running state.</p>
    /// <p>The Amazon-provided DNS server resolves Amazon-provided private DNS hostnames if you've enabled DNS resolution and DNS hostnames in your VPC. If you are not using the Amazon-provided DNS server in your VPC, your custom domain name servers must resolve the hostname as appropriate.</p>
    pub private_dns_name: ::std::option::Option<::std::string::String>,
    /// <p>The public DNS name assigned to the instance. This name is not available until the instance enters the <code>running</code> state. This name is only available if you've enabled DNS hostnames for your VPC. The format of this name depends on the <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/hostname-types.html#public-hostnames">public hostname type</a>.</p>
    pub public_dns_name: ::std::option::Option<::std::string::String>,
    /// <p>The reason for the most recent state transition. This might be an empty string.</p>
    pub state_transition_reason: ::std::option::Option<::std::string::String>,
    /// <p>The name of the key pair, if this instance was launched with an associated key pair.</p>
    pub key_name: ::std::option::Option<::std::string::String>,
    /// <p>The AMI launch index, which can be used to find this instance in the launch group.</p>
    pub ami_launch_index: ::std::option::Option<i32>,
    /// <p>The product codes attached to this instance, if applicable.</p>
    pub product_codes: ::std::option::Option<::std::vec::Vec<crate::types::ProductCode>>,
    /// <p>The instance type.</p>
    pub instance_type: ::std::option::Option<crate::types::InstanceType>,
    /// <p>The time that the instance was last launched. To determine the time that instance was first launched, see the attachment time for the primary network interface.</p>
    pub launch_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>The location where the instance launched, if applicable.</p>
    pub placement: ::std::option::Option<crate::types::Placement>,
    /// <p>The kernel associated with this instance, if applicable.</p>
    pub kernel_id: ::std::option::Option<::std::string::String>,
    /// <p>The RAM disk associated with this instance, if applicable.</p>
    pub ramdisk_id: ::std::option::Option<::std::string::String>,
    /// <p>The platform. This value is <code>windows</code> for Windows instances; otherwise, it is empty.</p>
    pub platform: ::std::option::Option<crate::types::PlatformValues>,
    /// <p>The monitoring for the instance.</p>
    pub monitoring: ::std::option::Option<crate::types::Monitoring>,
    /// <p>The ID of the subnet in which the instance is running.</p>
    pub subnet_id: ::std::option::Option<::std::string::String>,
    /// <p>The ID of the VPC in which the instance is running.</p>
    pub vpc_id: ::std::option::Option<::std::string::String>,
    /// <p>The private IPv4 address assigned to the instance.</p>
    pub private_ip_address: ::std::option::Option<::std::string::String>,
    /// <p>The public IPv4 address, or the Carrier IP address assigned to the instance, if applicable.</p>
    /// <p>A Carrier IP address only applies to an instance launched in a subnet associated with a Wavelength Zone.</p>
    pub public_ip_address: ::std::option::Option<::std::string::String>,
}
impl Instance {
    /// <p>The architecture of the image.</p>
    pub fn architecture(&self) -> ::std::option::Option<&crate::types::ArchitectureValues> {
        self.architecture.as_ref()
    }
    /// <p>Any block device mapping entries for the instance.</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 `.block_device_mappings.is_none()`.
    pub fn block_device_mappings(&self) -> &[crate::types::InstanceBlockDeviceMapping] {
        self.block_device_mappings.as_deref().unwrap_or_default()
    }
    /// <p>The idempotency token you provided when you launched the instance, if applicable.</p>
    pub fn client_token(&self) -> ::std::option::Option<&str> {
        self.client_token.as_deref()
    }
    /// <p>Indicates whether the instance is optimized for Amazon EBS I/O. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS Optimized instance.</p>
    pub fn ebs_optimized(&self) -> ::std::option::Option<bool> {
        self.ebs_optimized
    }
    /// <p>Specifies whether enhanced networking with ENA is enabled.</p>
    pub fn ena_support(&self) -> ::std::option::Option<bool> {
        self.ena_support
    }
    /// <p>The hypervisor type of the instance. The value <code>xen</code> is used for both Xen and Nitro hypervisors.</p>
    pub fn hypervisor(&self) -> ::std::option::Option<&crate::types::HypervisorType> {
        self.hypervisor.as_ref()
    }
    /// <p>The IAM instance profile associated with the instance, if applicable.</p>
    pub fn iam_instance_profile(&self) -> ::std::option::Option<&crate::types::IamInstanceProfile> {
        self.iam_instance_profile.as_ref()
    }
    /// <p>Indicates whether this is a Spot Instance or a Scheduled Instance.</p>
    pub fn instance_lifecycle(&self) -> ::std::option::Option<&crate::types::InstanceLifecycleType> {
        self.instance_lifecycle.as_ref()
    }
    /// <p>Deprecated.</p><note>
    /// <p>Amazon Elastic Graphics reached end of life on January 8, 2024.</p>
    /// </note>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.elastic_gpu_associations.is_none()`.
    pub fn elastic_gpu_associations(&self) -> &[crate::types::ElasticGpuAssociation] {
        self.elastic_gpu_associations.as_deref().unwrap_or_default()
    }
    /// <p>Deprecated</p><note>
    /// <p>Amazon Elastic Inference is no longer available.</p>
    /// </note>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.elastic_inference_accelerator_associations.is_none()`.
    pub fn elastic_inference_accelerator_associations(&self) -> &[crate::types::ElasticInferenceAcceleratorAssociation] {
        self.elastic_inference_accelerator_associations.as_deref().unwrap_or_default()
    }
    /// <p>The network interfaces for the instance.</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 `.network_interfaces.is_none()`.
    pub fn network_interfaces(&self) -> &[crate::types::InstanceNetworkInterface] {
        self.network_interfaces.as_deref().unwrap_or_default()
    }
    /// <p>The Amazon Resource Name (ARN) of the Outpost.</p>
    pub fn outpost_arn(&self) -> ::std::option::Option<&str> {
        self.outpost_arn.as_deref()
    }
    /// <p>The device name of the root device volume (for example, <code>/dev/sda1</code>).</p>
    pub fn root_device_name(&self) -> ::std::option::Option<&str> {
        self.root_device_name.as_deref()
    }
    /// <p>The root device type used by the AMI. The AMI can use an EBS volume or an instance store volume.</p>
    pub fn root_device_type(&self) -> ::std::option::Option<&crate::types::DeviceType> {
        self.root_device_type.as_ref()
    }
    /// <p>The security groups for the instance.</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 `.security_groups.is_none()`.
    pub fn security_groups(&self) -> &[crate::types::GroupIdentifier] {
        self.security_groups.as_deref().unwrap_or_default()
    }
    /// <p>Indicates whether source/destination checking is enabled.</p>
    pub fn source_dest_check(&self) -> ::std::option::Option<bool> {
        self.source_dest_check
    }
    /// <p>If the request is a Spot Instance request, the ID of the request.</p>
    pub fn spot_instance_request_id(&self) -> ::std::option::Option<&str> {
        self.spot_instance_request_id.as_deref()
    }
    /// <p>Specifies whether enhanced networking with the Intel 82599 Virtual Function interface is enabled.</p>
    pub fn sriov_net_support(&self) -> ::std::option::Option<&str> {
        self.sriov_net_support.as_deref()
    }
    /// <p>The reason for the most recent state transition.</p>
    pub fn state_reason(&self) -> ::std::option::Option<&crate::types::StateReason> {
        self.state_reason.as_ref()
    }
    /// <p>Any tags assigned to the instance.</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 `.tags.is_none()`.
    pub fn tags(&self) -> &[crate::types::Tag] {
        self.tags.as_deref().unwrap_or_default()
    }
    /// <p>The virtualization type of the instance.</p>
    pub fn virtualization_type(&self) -> ::std::option::Option<&crate::types::VirtualizationType> {
        self.virtualization_type.as_ref()
    }
    /// <p>The CPU options for the instance.</p>
    pub fn cpu_options(&self) -> ::std::option::Option<&crate::types::CpuOptions> {
        self.cpu_options.as_ref()
    }
    /// <p>The ID of the Capacity Block.</p><note>
    /// <p>For P5 instances, a Capacity Block ID refers to a group of instances. For Trn2u instances, a capacity block ID refers to an EC2 UltraServer.</p>
    /// </note>
    pub fn capacity_block_id(&self) -> ::std::option::Option<&str> {
        self.capacity_block_id.as_deref()
    }
    /// <p>The ID of the Capacity Reservation.</p>
    pub fn capacity_reservation_id(&self) -> ::std::option::Option<&str> {
        self.capacity_reservation_id.as_deref()
    }
    /// <p>Information about the Capacity Reservation targeting option.</p>
    pub fn capacity_reservation_specification(&self) -> ::std::option::Option<&crate::types::CapacityReservationSpecificationResponse> {
        self.capacity_reservation_specification.as_ref()
    }
    /// <p>Indicates whether the instance is enabled for hibernation.</p>
    pub fn hibernation_options(&self) -> ::std::option::Option<&crate::types::HibernationOptions> {
        self.hibernation_options.as_ref()
    }
    /// <p>The license configurations for the instance.</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 `.licenses.is_none()`.
    pub fn licenses(&self) -> &[crate::types::LicenseConfiguration] {
        self.licenses.as_deref().unwrap_or_default()
    }
    /// <p>The metadata options for the instance.</p>
    pub fn metadata_options(&self) -> ::std::option::Option<&crate::types::InstanceMetadataOptionsResponse> {
        self.metadata_options.as_ref()
    }
    /// <p>Indicates whether the instance is enabled for Amazon Web Services Nitro Enclaves.</p>
    pub fn enclave_options(&self) -> ::std::option::Option<&crate::types::EnclaveOptions> {
        self.enclave_options.as_ref()
    }
    /// <p>The boot mode that was specified by the AMI. If the value is <code>uefi-preferred</code>, the AMI supports both UEFI and Legacy BIOS. The <code>currentInstanceBootMode</code> parameter is the boot mode that is used to boot the instance at launch or start.</p><note>
    /// <p>The operating system contained in the AMI must be configured to support the specified boot mode.</p>
    /// </note>
    /// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-boot.html">Boot modes</a> in the <i>Amazon EC2 User Guide</i>.</p>
    pub fn boot_mode(&self) -> ::std::option::Option<&crate::types::BootModeValues> {
        self.boot_mode.as_ref()
    }
    /// <p>The platform details value for the instance. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/billing-info-fields.html">AMI billing information fields</a> in the <i>Amazon EC2 User Guide</i>.</p>
    pub fn platform_details(&self) -> ::std::option::Option<&str> {
        self.platform_details.as_deref()
    }
    /// <p>The usage operation value for the instance. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/billing-info-fields.html">AMI billing information fields</a> in the <i>Amazon EC2 User Guide</i>.</p>
    pub fn usage_operation(&self) -> ::std::option::Option<&str> {
        self.usage_operation.as_deref()
    }
    /// <p>The time that the usage operation was last updated.</p>
    pub fn usage_operation_update_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.usage_operation_update_time.as_ref()
    }
    /// <p>The options for the instance hostname.</p>
    pub fn private_dns_name_options(&self) -> ::std::option::Option<&crate::types::PrivateDnsNameOptionsResponse> {
        self.private_dns_name_options.as_ref()
    }
    /// <p>The IPv6 address assigned to the instance.</p>
    pub fn ipv6_address(&self) -> ::std::option::Option<&str> {
        self.ipv6_address.as_deref()
    }
    /// <p>If the instance is configured for NitroTPM support, the value is <code>v2.0</code>. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/nitrotpm.html">NitroTPM</a> in the <i>Amazon EC2 User Guide</i>.</p>
    pub fn tpm_support(&self) -> ::std::option::Option<&str> {
        self.tpm_support.as_deref()
    }
    /// <p>Provides information on the recovery and maintenance options of your instance.</p>
    pub fn maintenance_options(&self) -> ::std::option::Option<&crate::types::InstanceMaintenanceOptions> {
        self.maintenance_options.as_ref()
    }
    /// <p>The boot mode that is used to boot the instance at launch or start. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-boot.html">Boot modes</a> in the <i>Amazon EC2 User Guide</i>.</p>
    pub fn current_instance_boot_mode(&self) -> ::std::option::Option<&crate::types::InstanceBootModeValues> {
        self.current_instance_boot_mode.as_ref()
    }
    /// <p>Contains settings for the network performance options for your instance.</p>
    pub fn network_performance_options(&self) -> ::std::option::Option<&crate::types::InstanceNetworkPerformanceOptions> {
        self.network_performance_options.as_ref()
    }
    /// <p>The service provider that manages the instance.</p>
    pub fn operator(&self) -> ::std::option::Option<&crate::types::OperatorResponse> {
        self.operator.as_ref()
    }
    /// <p>The secondary interfaces for the instance.</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 `.secondary_interfaces.is_none()`.
    pub fn secondary_interfaces(&self) -> &[crate::types::InstanceSecondaryInterface] {
        self.secondary_interfaces.as_deref().unwrap_or_default()
    }
    /// <p>The ID of the instance.</p>
    pub fn instance_id(&self) -> ::std::option::Option<&str> {
        self.instance_id.as_deref()
    }
    /// <p>The ID of the AMI used to launch the instance.</p>
    pub fn image_id(&self) -> ::std::option::Option<&str> {
        self.image_id.as_deref()
    }
    /// <p>The current state of the instance.</p>
    pub fn state(&self) -> ::std::option::Option<&crate::types::InstanceState> {
        self.state.as_ref()
    }
    /// <p>\[IPv4 only\] The private DNS hostname name assigned to the instance. This DNS hostname can only be used inside the Amazon EC2 network. This name is not available until the instance enters the running state.</p>
    /// <p>The Amazon-provided DNS server resolves Amazon-provided private DNS hostnames if you've enabled DNS resolution and DNS hostnames in your VPC. If you are not using the Amazon-provided DNS server in your VPC, your custom domain name servers must resolve the hostname as appropriate.</p>
    pub fn private_dns_name(&self) -> ::std::option::Option<&str> {
        self.private_dns_name.as_deref()
    }
    /// <p>The public DNS name assigned to the instance. This name is not available until the instance enters the <code>running</code> state. This name is only available if you've enabled DNS hostnames for your VPC. The format of this name depends on the <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/hostname-types.html#public-hostnames">public hostname type</a>.</p>
    pub fn public_dns_name(&self) -> ::std::option::Option<&str> {
        self.public_dns_name.as_deref()
    }
    /// <p>The reason for the most recent state transition. This might be an empty string.</p>
    pub fn state_transition_reason(&self) -> ::std::option::Option<&str> {
        self.state_transition_reason.as_deref()
    }
    /// <p>The name of the key pair, if this instance was launched with an associated key pair.</p>
    pub fn key_name(&self) -> ::std::option::Option<&str> {
        self.key_name.as_deref()
    }
    /// <p>The AMI launch index, which can be used to find this instance in the launch group.</p>
    pub fn ami_launch_index(&self) -> ::std::option::Option<i32> {
        self.ami_launch_index
    }
    /// <p>The product codes attached to this instance, if applicable.</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 `.product_codes.is_none()`.
    pub fn product_codes(&self) -> &[crate::types::ProductCode] {
        self.product_codes.as_deref().unwrap_or_default()
    }
    /// <p>The instance type.</p>
    pub fn instance_type(&self) -> ::std::option::Option<&crate::types::InstanceType> {
        self.instance_type.as_ref()
    }
    /// <p>The time that the instance was last launched. To determine the time that instance was first launched, see the attachment time for the primary network interface.</p>
    pub fn launch_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.launch_time.as_ref()
    }
    /// <p>The location where the instance launched, if applicable.</p>
    pub fn placement(&self) -> ::std::option::Option<&crate::types::Placement> {
        self.placement.as_ref()
    }
    /// <p>The kernel associated with this instance, if applicable.</p>
    pub fn kernel_id(&self) -> ::std::option::Option<&str> {
        self.kernel_id.as_deref()
    }
    /// <p>The RAM disk associated with this instance, if applicable.</p>
    pub fn ramdisk_id(&self) -> ::std::option::Option<&str> {
        self.ramdisk_id.as_deref()
    }
    /// <p>The platform. This value is <code>windows</code> for Windows instances; otherwise, it is empty.</p>
    pub fn platform(&self) -> ::std::option::Option<&crate::types::PlatformValues> {
        self.platform.as_ref()
    }
    /// <p>The monitoring for the instance.</p>
    pub fn monitoring(&self) -> ::std::option::Option<&crate::types::Monitoring> {
        self.monitoring.as_ref()
    }
    /// <p>The ID of the subnet in which the instance is running.</p>
    pub fn subnet_id(&self) -> ::std::option::Option<&str> {
        self.subnet_id.as_deref()
    }
    /// <p>The ID of the VPC in which the instance is running.</p>
    pub fn vpc_id(&self) -> ::std::option::Option<&str> {
        self.vpc_id.as_deref()
    }
    /// <p>The private IPv4 address assigned to the instance.</p>
    pub fn private_ip_address(&self) -> ::std::option::Option<&str> {
        self.private_ip_address.as_deref()
    }
    /// <p>The public IPv4 address, or the Carrier IP address assigned to the instance, if applicable.</p>
    /// <p>A Carrier IP address only applies to an instance launched in a subnet associated with a Wavelength Zone.</p>
    pub fn public_ip_address(&self) -> ::std::option::Option<&str> {
        self.public_ip_address.as_deref()
    }
}
impl Instance {
    /// Creates a new builder-style object to manufacture [`Instance`](crate::types::Instance).
    pub fn builder() -> crate::types::builders::InstanceBuilder {
        crate::types::builders::InstanceBuilder::default()
    }
}

/// A builder for [`Instance`](crate::types::Instance).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct InstanceBuilder {
    pub(crate) architecture: ::std::option::Option<crate::types::ArchitectureValues>,
    pub(crate) block_device_mappings: ::std::option::Option<::std::vec::Vec<crate::types::InstanceBlockDeviceMapping>>,
    pub(crate) client_token: ::std::option::Option<::std::string::String>,
    pub(crate) ebs_optimized: ::std::option::Option<bool>,
    pub(crate) ena_support: ::std::option::Option<bool>,
    pub(crate) hypervisor: ::std::option::Option<crate::types::HypervisorType>,
    pub(crate) iam_instance_profile: ::std::option::Option<crate::types::IamInstanceProfile>,
    pub(crate) instance_lifecycle: ::std::option::Option<crate::types::InstanceLifecycleType>,
    pub(crate) elastic_gpu_associations: ::std::option::Option<::std::vec::Vec<crate::types::ElasticGpuAssociation>>,
    pub(crate) elastic_inference_accelerator_associations:
        ::std::option::Option<::std::vec::Vec<crate::types::ElasticInferenceAcceleratorAssociation>>,
    pub(crate) network_interfaces: ::std::option::Option<::std::vec::Vec<crate::types::InstanceNetworkInterface>>,
    pub(crate) outpost_arn: ::std::option::Option<::std::string::String>,
    pub(crate) root_device_name: ::std::option::Option<::std::string::String>,
    pub(crate) root_device_type: ::std::option::Option<crate::types::DeviceType>,
    pub(crate) security_groups: ::std::option::Option<::std::vec::Vec<crate::types::GroupIdentifier>>,
    pub(crate) source_dest_check: ::std::option::Option<bool>,
    pub(crate) spot_instance_request_id: ::std::option::Option<::std::string::String>,
    pub(crate) sriov_net_support: ::std::option::Option<::std::string::String>,
    pub(crate) state_reason: ::std::option::Option<crate::types::StateReason>,
    pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
    pub(crate) virtualization_type: ::std::option::Option<crate::types::VirtualizationType>,
    pub(crate) cpu_options: ::std::option::Option<crate::types::CpuOptions>,
    pub(crate) capacity_block_id: ::std::option::Option<::std::string::String>,
    pub(crate) capacity_reservation_id: ::std::option::Option<::std::string::String>,
    pub(crate) capacity_reservation_specification: ::std::option::Option<crate::types::CapacityReservationSpecificationResponse>,
    pub(crate) hibernation_options: ::std::option::Option<crate::types::HibernationOptions>,
    pub(crate) licenses: ::std::option::Option<::std::vec::Vec<crate::types::LicenseConfiguration>>,
    pub(crate) metadata_options: ::std::option::Option<crate::types::InstanceMetadataOptionsResponse>,
    pub(crate) enclave_options: ::std::option::Option<crate::types::EnclaveOptions>,
    pub(crate) boot_mode: ::std::option::Option<crate::types::BootModeValues>,
    pub(crate) platform_details: ::std::option::Option<::std::string::String>,
    pub(crate) usage_operation: ::std::option::Option<::std::string::String>,
    pub(crate) usage_operation_update_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) private_dns_name_options: ::std::option::Option<crate::types::PrivateDnsNameOptionsResponse>,
    pub(crate) ipv6_address: ::std::option::Option<::std::string::String>,
    pub(crate) tpm_support: ::std::option::Option<::std::string::String>,
    pub(crate) maintenance_options: ::std::option::Option<crate::types::InstanceMaintenanceOptions>,
    pub(crate) current_instance_boot_mode: ::std::option::Option<crate::types::InstanceBootModeValues>,
    pub(crate) network_performance_options: ::std::option::Option<crate::types::InstanceNetworkPerformanceOptions>,
    pub(crate) operator: ::std::option::Option<crate::types::OperatorResponse>,
    pub(crate) secondary_interfaces: ::std::option::Option<::std::vec::Vec<crate::types::InstanceSecondaryInterface>>,
    pub(crate) instance_id: ::std::option::Option<::std::string::String>,
    pub(crate) image_id: ::std::option::Option<::std::string::String>,
    pub(crate) state: ::std::option::Option<crate::types::InstanceState>,
    pub(crate) private_dns_name: ::std::option::Option<::std::string::String>,
    pub(crate) public_dns_name: ::std::option::Option<::std::string::String>,
    pub(crate) state_transition_reason: ::std::option::Option<::std::string::String>,
    pub(crate) key_name: ::std::option::Option<::std::string::String>,
    pub(crate) ami_launch_index: ::std::option::Option<i32>,
    pub(crate) product_codes: ::std::option::Option<::std::vec::Vec<crate::types::ProductCode>>,
    pub(crate) instance_type: ::std::option::Option<crate::types::InstanceType>,
    pub(crate) launch_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) placement: ::std::option::Option<crate::types::Placement>,
    pub(crate) kernel_id: ::std::option::Option<::std::string::String>,
    pub(crate) ramdisk_id: ::std::option::Option<::std::string::String>,
    pub(crate) platform: ::std::option::Option<crate::types::PlatformValues>,
    pub(crate) monitoring: ::std::option::Option<crate::types::Monitoring>,
    pub(crate) subnet_id: ::std::option::Option<::std::string::String>,
    pub(crate) vpc_id: ::std::option::Option<::std::string::String>,
    pub(crate) private_ip_address: ::std::option::Option<::std::string::String>,
    pub(crate) public_ip_address: ::std::option::Option<::std::string::String>,
}
impl InstanceBuilder {
    /// <p>The architecture of the image.</p>
    pub fn architecture(mut self, input: crate::types::ArchitectureValues) -> Self {
        self.architecture = ::std::option::Option::Some(input);
        self
    }
    /// <p>The architecture of the image.</p>
    pub fn set_architecture(mut self, input: ::std::option::Option<crate::types::ArchitectureValues>) -> Self {
        self.architecture = input;
        self
    }
    /// <p>The architecture of the image.</p>
    pub fn get_architecture(&self) -> &::std::option::Option<crate::types::ArchitectureValues> {
        &self.architecture
    }
    /// Appends an item to `block_device_mappings`.
    ///
    /// To override the contents of this collection use [`set_block_device_mappings`](Self::set_block_device_mappings).
    ///
    /// <p>Any block device mapping entries for the instance.</p>
    pub fn block_device_mappings(mut self, input: crate::types::InstanceBlockDeviceMapping) -> Self {
        let mut v = self.block_device_mappings.unwrap_or_default();
        v.push(input);
        self.block_device_mappings = ::std::option::Option::Some(v);
        self
    }
    /// <p>Any block device mapping entries for the instance.</p>
    pub fn set_block_device_mappings(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::InstanceBlockDeviceMapping>>) -> Self {
        self.block_device_mappings = input;
        self
    }
    /// <p>Any block device mapping entries for the instance.</p>
    pub fn get_block_device_mappings(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::InstanceBlockDeviceMapping>> {
        &self.block_device_mappings
    }
    /// <p>The idempotency token you provided when you launched the instance, if applicable.</p>
    pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.client_token = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The idempotency token you provided when you launched the instance, if applicable.</p>
    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.client_token = input;
        self
    }
    /// <p>The idempotency token you provided when you launched the instance, if applicable.</p>
    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
        &self.client_token
    }
    /// <p>Indicates whether the instance is optimized for Amazon EBS I/O. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS Optimized instance.</p>
    pub fn ebs_optimized(mut self, input: bool) -> Self {
        self.ebs_optimized = ::std::option::Option::Some(input);
        self
    }
    /// <p>Indicates whether the instance is optimized for Amazon EBS I/O. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS Optimized instance.</p>
    pub fn set_ebs_optimized(mut self, input: ::std::option::Option<bool>) -> Self {
        self.ebs_optimized = input;
        self
    }
    /// <p>Indicates whether the instance is optimized for Amazon EBS I/O. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS Optimized instance.</p>
    pub fn get_ebs_optimized(&self) -> &::std::option::Option<bool> {
        &self.ebs_optimized
    }
    /// <p>Specifies whether enhanced networking with ENA is enabled.</p>
    pub fn ena_support(mut self, input: bool) -> Self {
        self.ena_support = ::std::option::Option::Some(input);
        self
    }
    /// <p>Specifies whether enhanced networking with ENA is enabled.</p>
    pub fn set_ena_support(mut self, input: ::std::option::Option<bool>) -> Self {
        self.ena_support = input;
        self
    }
    /// <p>Specifies whether enhanced networking with ENA is enabled.</p>
    pub fn get_ena_support(&self) -> &::std::option::Option<bool> {
        &self.ena_support
    }
    /// <p>The hypervisor type of the instance. The value <code>xen</code> is used for both Xen and Nitro hypervisors.</p>
    pub fn hypervisor(mut self, input: crate::types::HypervisorType) -> Self {
        self.hypervisor = ::std::option::Option::Some(input);
        self
    }
    /// <p>The hypervisor type of the instance. The value <code>xen</code> is used for both Xen and Nitro hypervisors.</p>
    pub fn set_hypervisor(mut self, input: ::std::option::Option<crate::types::HypervisorType>) -> Self {
        self.hypervisor = input;
        self
    }
    /// <p>The hypervisor type of the instance. The value <code>xen</code> is used for both Xen and Nitro hypervisors.</p>
    pub fn get_hypervisor(&self) -> &::std::option::Option<crate::types::HypervisorType> {
        &self.hypervisor
    }
    /// <p>The IAM instance profile associated with the instance, if applicable.</p>
    pub fn iam_instance_profile(mut self, input: crate::types::IamInstanceProfile) -> Self {
        self.iam_instance_profile = ::std::option::Option::Some(input);
        self
    }
    /// <p>The IAM instance profile associated with the instance, if applicable.</p>
    pub fn set_iam_instance_profile(mut self, input: ::std::option::Option<crate::types::IamInstanceProfile>) -> Self {
        self.iam_instance_profile = input;
        self
    }
    /// <p>The IAM instance profile associated with the instance, if applicable.</p>
    pub fn get_iam_instance_profile(&self) -> &::std::option::Option<crate::types::IamInstanceProfile> {
        &self.iam_instance_profile
    }
    /// <p>Indicates whether this is a Spot Instance or a Scheduled Instance.</p>
    pub fn instance_lifecycle(mut self, input: crate::types::InstanceLifecycleType) -> Self {
        self.instance_lifecycle = ::std::option::Option::Some(input);
        self
    }
    /// <p>Indicates whether this is a Spot Instance or a Scheduled Instance.</p>
    pub fn set_instance_lifecycle(mut self, input: ::std::option::Option<crate::types::InstanceLifecycleType>) -> Self {
        self.instance_lifecycle = input;
        self
    }
    /// <p>Indicates whether this is a Spot Instance or a Scheduled Instance.</p>
    pub fn get_instance_lifecycle(&self) -> &::std::option::Option<crate::types::InstanceLifecycleType> {
        &self.instance_lifecycle
    }
    /// Appends an item to `elastic_gpu_associations`.
    ///
    /// To override the contents of this collection use [`set_elastic_gpu_associations`](Self::set_elastic_gpu_associations).
    ///
    /// <p>Deprecated.</p><note>
    /// <p>Amazon Elastic Graphics reached end of life on January 8, 2024.</p>
    /// </note>
    pub fn elastic_gpu_associations(mut self, input: crate::types::ElasticGpuAssociation) -> Self {
        let mut v = self.elastic_gpu_associations.unwrap_or_default();
        v.push(input);
        self.elastic_gpu_associations = ::std::option::Option::Some(v);
        self
    }
    /// <p>Deprecated.</p><note>
    /// <p>Amazon Elastic Graphics reached end of life on January 8, 2024.</p>
    /// </note>
    pub fn set_elastic_gpu_associations(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ElasticGpuAssociation>>) -> Self {
        self.elastic_gpu_associations = input;
        self
    }
    /// <p>Deprecated.</p><note>
    /// <p>Amazon Elastic Graphics reached end of life on January 8, 2024.</p>
    /// </note>
    pub fn get_elastic_gpu_associations(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ElasticGpuAssociation>> {
        &self.elastic_gpu_associations
    }
    /// Appends an item to `elastic_inference_accelerator_associations`.
    ///
    /// To override the contents of this collection use [`set_elastic_inference_accelerator_associations`](Self::set_elastic_inference_accelerator_associations).
    ///
    /// <p>Deprecated</p><note>
    /// <p>Amazon Elastic Inference is no longer available.</p>
    /// </note>
    pub fn elastic_inference_accelerator_associations(mut self, input: crate::types::ElasticInferenceAcceleratorAssociation) -> Self {
        let mut v = self.elastic_inference_accelerator_associations.unwrap_or_default();
        v.push(input);
        self.elastic_inference_accelerator_associations = ::std::option::Option::Some(v);
        self
    }
    /// <p>Deprecated</p><note>
    /// <p>Amazon Elastic Inference is no longer available.</p>
    /// </note>
    pub fn set_elastic_inference_accelerator_associations(
        mut self,
        input: ::std::option::Option<::std::vec::Vec<crate::types::ElasticInferenceAcceleratorAssociation>>,
    ) -> Self {
        self.elastic_inference_accelerator_associations = input;
        self
    }
    /// <p>Deprecated</p><note>
    /// <p>Amazon Elastic Inference is no longer available.</p>
    /// </note>
    pub fn get_elastic_inference_accelerator_associations(
        &self,
    ) -> &::std::option::Option<::std::vec::Vec<crate::types::ElasticInferenceAcceleratorAssociation>> {
        &self.elastic_inference_accelerator_associations
    }
    /// Appends an item to `network_interfaces`.
    ///
    /// To override the contents of this collection use [`set_network_interfaces`](Self::set_network_interfaces).
    ///
    /// <p>The network interfaces for the instance.</p>
    pub fn network_interfaces(mut self, input: crate::types::InstanceNetworkInterface) -> Self {
        let mut v = self.network_interfaces.unwrap_or_default();
        v.push(input);
        self.network_interfaces = ::std::option::Option::Some(v);
        self
    }
    /// <p>The network interfaces for the instance.</p>
    pub fn set_network_interfaces(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::InstanceNetworkInterface>>) -> Self {
        self.network_interfaces = input;
        self
    }
    /// <p>The network interfaces for the instance.</p>
    pub fn get_network_interfaces(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::InstanceNetworkInterface>> {
        &self.network_interfaces
    }
    /// <p>The Amazon Resource Name (ARN) of the Outpost.</p>
    pub fn outpost_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.outpost_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the Outpost.</p>
    pub fn set_outpost_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.outpost_arn = input;
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the Outpost.</p>
    pub fn get_outpost_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.outpost_arn
    }
    /// <p>The device name of the root device volume (for example, <code>/dev/sda1</code>).</p>
    pub fn root_device_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.root_device_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The device name of the root device volume (for example, <code>/dev/sda1</code>).</p>
    pub fn set_root_device_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.root_device_name = input;
        self
    }
    /// <p>The device name of the root device volume (for example, <code>/dev/sda1</code>).</p>
    pub fn get_root_device_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.root_device_name
    }
    /// <p>The root device type used by the AMI. The AMI can use an EBS volume or an instance store volume.</p>
    pub fn root_device_type(mut self, input: crate::types::DeviceType) -> Self {
        self.root_device_type = ::std::option::Option::Some(input);
        self
    }
    /// <p>The root device type used by the AMI. The AMI can use an EBS volume or an instance store volume.</p>
    pub fn set_root_device_type(mut self, input: ::std::option::Option<crate::types::DeviceType>) -> Self {
        self.root_device_type = input;
        self
    }
    /// <p>The root device type used by the AMI. The AMI can use an EBS volume or an instance store volume.</p>
    pub fn get_root_device_type(&self) -> &::std::option::Option<crate::types::DeviceType> {
        &self.root_device_type
    }
    /// Appends an item to `security_groups`.
    ///
    /// To override the contents of this collection use [`set_security_groups`](Self::set_security_groups).
    ///
    /// <p>The security groups for the instance.</p>
    pub fn security_groups(mut self, input: crate::types::GroupIdentifier) -> Self {
        let mut v = self.security_groups.unwrap_or_default();
        v.push(input);
        self.security_groups = ::std::option::Option::Some(v);
        self
    }
    /// <p>The security groups for the instance.</p>
    pub fn set_security_groups(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::GroupIdentifier>>) -> Self {
        self.security_groups = input;
        self
    }
    /// <p>The security groups for the instance.</p>
    pub fn get_security_groups(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::GroupIdentifier>> {
        &self.security_groups
    }
    /// <p>Indicates whether source/destination checking is enabled.</p>
    pub fn source_dest_check(mut self, input: bool) -> Self {
        self.source_dest_check = ::std::option::Option::Some(input);
        self
    }
    /// <p>Indicates whether source/destination checking is enabled.</p>
    pub fn set_source_dest_check(mut self, input: ::std::option::Option<bool>) -> Self {
        self.source_dest_check = input;
        self
    }
    /// <p>Indicates whether source/destination checking is enabled.</p>
    pub fn get_source_dest_check(&self) -> &::std::option::Option<bool> {
        &self.source_dest_check
    }
    /// <p>If the request is a Spot Instance request, the ID of the request.</p>
    pub fn spot_instance_request_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.spot_instance_request_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>If the request is a Spot Instance request, the ID of the request.</p>
    pub fn set_spot_instance_request_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.spot_instance_request_id = input;
        self
    }
    /// <p>If the request is a Spot Instance request, the ID of the request.</p>
    pub fn get_spot_instance_request_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.spot_instance_request_id
    }
    /// <p>Specifies whether enhanced networking with the Intel 82599 Virtual Function interface is enabled.</p>
    pub fn sriov_net_support(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.sriov_net_support = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Specifies whether enhanced networking with the Intel 82599 Virtual Function interface is enabled.</p>
    pub fn set_sriov_net_support(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.sriov_net_support = input;
        self
    }
    /// <p>Specifies whether enhanced networking with the Intel 82599 Virtual Function interface is enabled.</p>
    pub fn get_sriov_net_support(&self) -> &::std::option::Option<::std::string::String> {
        &self.sriov_net_support
    }
    /// <p>The reason for the most recent state transition.</p>
    pub fn state_reason(mut self, input: crate::types::StateReason) -> Self {
        self.state_reason = ::std::option::Option::Some(input);
        self
    }
    /// <p>The reason for the most recent state transition.</p>
    pub fn set_state_reason(mut self, input: ::std::option::Option<crate::types::StateReason>) -> Self {
        self.state_reason = input;
        self
    }
    /// <p>The reason for the most recent state transition.</p>
    pub fn get_state_reason(&self) -> &::std::option::Option<crate::types::StateReason> {
        &self.state_reason
    }
    /// Appends an item to `tags`.
    ///
    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
    ///
    /// <p>Any tags assigned to the instance.</p>
    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>Any tags assigned to the instance.</p>
    pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
        self.tags = input;
        self
    }
    /// <p>Any tags assigned to the instance.</p>
    pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
        &self.tags
    }
    /// <p>The virtualization type of the instance.</p>
    pub fn virtualization_type(mut self, input: crate::types::VirtualizationType) -> Self {
        self.virtualization_type = ::std::option::Option::Some(input);
        self
    }
    /// <p>The virtualization type of the instance.</p>
    pub fn set_virtualization_type(mut self, input: ::std::option::Option<crate::types::VirtualizationType>) -> Self {
        self.virtualization_type = input;
        self
    }
    /// <p>The virtualization type of the instance.</p>
    pub fn get_virtualization_type(&self) -> &::std::option::Option<crate::types::VirtualizationType> {
        &self.virtualization_type
    }
    /// <p>The CPU options for the instance.</p>
    pub fn cpu_options(mut self, input: crate::types::CpuOptions) -> Self {
        self.cpu_options = ::std::option::Option::Some(input);
        self
    }
    /// <p>The CPU options for the instance.</p>
    pub fn set_cpu_options(mut self, input: ::std::option::Option<crate::types::CpuOptions>) -> Self {
        self.cpu_options = input;
        self
    }
    /// <p>The CPU options for the instance.</p>
    pub fn get_cpu_options(&self) -> &::std::option::Option<crate::types::CpuOptions> {
        &self.cpu_options
    }
    /// <p>The ID of the Capacity Block.</p><note>
    /// <p>For P5 instances, a Capacity Block ID refers to a group of instances. For Trn2u instances, a capacity block ID refers to an EC2 UltraServer.</p>
    /// </note>
    pub fn capacity_block_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.capacity_block_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the Capacity Block.</p><note>
    /// <p>For P5 instances, a Capacity Block ID refers to a group of instances. For Trn2u instances, a capacity block ID refers to an EC2 UltraServer.</p>
    /// </note>
    pub fn set_capacity_block_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.capacity_block_id = input;
        self
    }
    /// <p>The ID of the Capacity Block.</p><note>
    /// <p>For P5 instances, a Capacity Block ID refers to a group of instances. For Trn2u instances, a capacity block ID refers to an EC2 UltraServer.</p>
    /// </note>
    pub fn get_capacity_block_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.capacity_block_id
    }
    /// <p>The ID of the Capacity Reservation.</p>
    pub fn capacity_reservation_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.capacity_reservation_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the Capacity Reservation.</p>
    pub fn set_capacity_reservation_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.capacity_reservation_id = input;
        self
    }
    /// <p>The ID of the Capacity Reservation.</p>
    pub fn get_capacity_reservation_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.capacity_reservation_id
    }
    /// <p>Information about the Capacity Reservation targeting option.</p>
    pub fn capacity_reservation_specification(mut self, input: crate::types::CapacityReservationSpecificationResponse) -> Self {
        self.capacity_reservation_specification = ::std::option::Option::Some(input);
        self
    }
    /// <p>Information about the Capacity Reservation targeting option.</p>
    pub fn set_capacity_reservation_specification(
        mut self,
        input: ::std::option::Option<crate::types::CapacityReservationSpecificationResponse>,
    ) -> Self {
        self.capacity_reservation_specification = input;
        self
    }
    /// <p>Information about the Capacity Reservation targeting option.</p>
    pub fn get_capacity_reservation_specification(&self) -> &::std::option::Option<crate::types::CapacityReservationSpecificationResponse> {
        &self.capacity_reservation_specification
    }
    /// <p>Indicates whether the instance is enabled for hibernation.</p>
    pub fn hibernation_options(mut self, input: crate::types::HibernationOptions) -> Self {
        self.hibernation_options = ::std::option::Option::Some(input);
        self
    }
    /// <p>Indicates whether the instance is enabled for hibernation.</p>
    pub fn set_hibernation_options(mut self, input: ::std::option::Option<crate::types::HibernationOptions>) -> Self {
        self.hibernation_options = input;
        self
    }
    /// <p>Indicates whether the instance is enabled for hibernation.</p>
    pub fn get_hibernation_options(&self) -> &::std::option::Option<crate::types::HibernationOptions> {
        &self.hibernation_options
    }
    /// Appends an item to `licenses`.
    ///
    /// To override the contents of this collection use [`set_licenses`](Self::set_licenses).
    ///
    /// <p>The license configurations for the instance.</p>
    pub fn licenses(mut self, input: crate::types::LicenseConfiguration) -> Self {
        let mut v = self.licenses.unwrap_or_default();
        v.push(input);
        self.licenses = ::std::option::Option::Some(v);
        self
    }
    /// <p>The license configurations for the instance.</p>
    pub fn set_licenses(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::LicenseConfiguration>>) -> Self {
        self.licenses = input;
        self
    }
    /// <p>The license configurations for the instance.</p>
    pub fn get_licenses(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::LicenseConfiguration>> {
        &self.licenses
    }
    /// <p>The metadata options for the instance.</p>
    pub fn metadata_options(mut self, input: crate::types::InstanceMetadataOptionsResponse) -> Self {
        self.metadata_options = ::std::option::Option::Some(input);
        self
    }
    /// <p>The metadata options for the instance.</p>
    pub fn set_metadata_options(mut self, input: ::std::option::Option<crate::types::InstanceMetadataOptionsResponse>) -> Self {
        self.metadata_options = input;
        self
    }
    /// <p>The metadata options for the instance.</p>
    pub fn get_metadata_options(&self) -> &::std::option::Option<crate::types::InstanceMetadataOptionsResponse> {
        &self.metadata_options
    }
    /// <p>Indicates whether the instance is enabled for Amazon Web Services Nitro Enclaves.</p>
    pub fn enclave_options(mut self, input: crate::types::EnclaveOptions) -> Self {
        self.enclave_options = ::std::option::Option::Some(input);
        self
    }
    /// <p>Indicates whether the instance is enabled for Amazon Web Services Nitro Enclaves.</p>
    pub fn set_enclave_options(mut self, input: ::std::option::Option<crate::types::EnclaveOptions>) -> Self {
        self.enclave_options = input;
        self
    }
    /// <p>Indicates whether the instance is enabled for Amazon Web Services Nitro Enclaves.</p>
    pub fn get_enclave_options(&self) -> &::std::option::Option<crate::types::EnclaveOptions> {
        &self.enclave_options
    }
    /// <p>The boot mode that was specified by the AMI. If the value is <code>uefi-preferred</code>, the AMI supports both UEFI and Legacy BIOS. The <code>currentInstanceBootMode</code> parameter is the boot mode that is used to boot the instance at launch or start.</p><note>
    /// <p>The operating system contained in the AMI must be configured to support the specified boot mode.</p>
    /// </note>
    /// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-boot.html">Boot modes</a> in the <i>Amazon EC2 User Guide</i>.</p>
    pub fn boot_mode(mut self, input: crate::types::BootModeValues) -> Self {
        self.boot_mode = ::std::option::Option::Some(input);
        self
    }
    /// <p>The boot mode that was specified by the AMI. If the value is <code>uefi-preferred</code>, the AMI supports both UEFI and Legacy BIOS. The <code>currentInstanceBootMode</code> parameter is the boot mode that is used to boot the instance at launch or start.</p><note>
    /// <p>The operating system contained in the AMI must be configured to support the specified boot mode.</p>
    /// </note>
    /// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-boot.html">Boot modes</a> in the <i>Amazon EC2 User Guide</i>.</p>
    pub fn set_boot_mode(mut self, input: ::std::option::Option<crate::types::BootModeValues>) -> Self {
        self.boot_mode = input;
        self
    }
    /// <p>The boot mode that was specified by the AMI. If the value is <code>uefi-preferred</code>, the AMI supports both UEFI and Legacy BIOS. The <code>currentInstanceBootMode</code> parameter is the boot mode that is used to boot the instance at launch or start.</p><note>
    /// <p>The operating system contained in the AMI must be configured to support the specified boot mode.</p>
    /// </note>
    /// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-boot.html">Boot modes</a> in the <i>Amazon EC2 User Guide</i>.</p>
    pub fn get_boot_mode(&self) -> &::std::option::Option<crate::types::BootModeValues> {
        &self.boot_mode
    }
    /// <p>The platform details value for the instance. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/billing-info-fields.html">AMI billing information fields</a> in the <i>Amazon EC2 User Guide</i>.</p>
    pub fn platform_details(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.platform_details = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The platform details value for the instance. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/billing-info-fields.html">AMI billing information fields</a> in the <i>Amazon EC2 User Guide</i>.</p>
    pub fn set_platform_details(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.platform_details = input;
        self
    }
    /// <p>The platform details value for the instance. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/billing-info-fields.html">AMI billing information fields</a> in the <i>Amazon EC2 User Guide</i>.</p>
    pub fn get_platform_details(&self) -> &::std::option::Option<::std::string::String> {
        &self.platform_details
    }
    /// <p>The usage operation value for the instance. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/billing-info-fields.html">AMI billing information fields</a> in the <i>Amazon EC2 User Guide</i>.</p>
    pub fn usage_operation(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.usage_operation = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The usage operation value for the instance. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/billing-info-fields.html">AMI billing information fields</a> in the <i>Amazon EC2 User Guide</i>.</p>
    pub fn set_usage_operation(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.usage_operation = input;
        self
    }
    /// <p>The usage operation value for the instance. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/billing-info-fields.html">AMI billing information fields</a> in the <i>Amazon EC2 User Guide</i>.</p>
    pub fn get_usage_operation(&self) -> &::std::option::Option<::std::string::String> {
        &self.usage_operation
    }
    /// <p>The time that the usage operation was last updated.</p>
    pub fn usage_operation_update_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.usage_operation_update_time = ::std::option::Option::Some(input);
        self
    }
    /// <p>The time that the usage operation was last updated.</p>
    pub fn set_usage_operation_update_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.usage_operation_update_time = input;
        self
    }
    /// <p>The time that the usage operation was last updated.</p>
    pub fn get_usage_operation_update_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.usage_operation_update_time
    }
    /// <p>The options for the instance hostname.</p>
    pub fn private_dns_name_options(mut self, input: crate::types::PrivateDnsNameOptionsResponse) -> Self {
        self.private_dns_name_options = ::std::option::Option::Some(input);
        self
    }
    /// <p>The options for the instance hostname.</p>
    pub fn set_private_dns_name_options(mut self, input: ::std::option::Option<crate::types::PrivateDnsNameOptionsResponse>) -> Self {
        self.private_dns_name_options = input;
        self
    }
    /// <p>The options for the instance hostname.</p>
    pub fn get_private_dns_name_options(&self) -> &::std::option::Option<crate::types::PrivateDnsNameOptionsResponse> {
        &self.private_dns_name_options
    }
    /// <p>The IPv6 address assigned to the instance.</p>
    pub fn ipv6_address(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.ipv6_address = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The IPv6 address assigned to the instance.</p>
    pub fn set_ipv6_address(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.ipv6_address = input;
        self
    }
    /// <p>The IPv6 address assigned to the instance.</p>
    pub fn get_ipv6_address(&self) -> &::std::option::Option<::std::string::String> {
        &self.ipv6_address
    }
    /// <p>If the instance is configured for NitroTPM support, the value is <code>v2.0</code>. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/nitrotpm.html">NitroTPM</a> in the <i>Amazon EC2 User Guide</i>.</p>
    pub fn tpm_support(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.tpm_support = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>If the instance is configured for NitroTPM support, the value is <code>v2.0</code>. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/nitrotpm.html">NitroTPM</a> in the <i>Amazon EC2 User Guide</i>.</p>
    pub fn set_tpm_support(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.tpm_support = input;
        self
    }
    /// <p>If the instance is configured for NitroTPM support, the value is <code>v2.0</code>. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/nitrotpm.html">NitroTPM</a> in the <i>Amazon EC2 User Guide</i>.</p>
    pub fn get_tpm_support(&self) -> &::std::option::Option<::std::string::String> {
        &self.tpm_support
    }
    /// <p>Provides information on the recovery and maintenance options of your instance.</p>
    pub fn maintenance_options(mut self, input: crate::types::InstanceMaintenanceOptions) -> Self {
        self.maintenance_options = ::std::option::Option::Some(input);
        self
    }
    /// <p>Provides information on the recovery and maintenance options of your instance.</p>
    pub fn set_maintenance_options(mut self, input: ::std::option::Option<crate::types::InstanceMaintenanceOptions>) -> Self {
        self.maintenance_options = input;
        self
    }
    /// <p>Provides information on the recovery and maintenance options of your instance.</p>
    pub fn get_maintenance_options(&self) -> &::std::option::Option<crate::types::InstanceMaintenanceOptions> {
        &self.maintenance_options
    }
    /// <p>The boot mode that is used to boot the instance at launch or start. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-boot.html">Boot modes</a> in the <i>Amazon EC2 User Guide</i>.</p>
    pub fn current_instance_boot_mode(mut self, input: crate::types::InstanceBootModeValues) -> Self {
        self.current_instance_boot_mode = ::std::option::Option::Some(input);
        self
    }
    /// <p>The boot mode that is used to boot the instance at launch or start. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-boot.html">Boot modes</a> in the <i>Amazon EC2 User Guide</i>.</p>
    pub fn set_current_instance_boot_mode(mut self, input: ::std::option::Option<crate::types::InstanceBootModeValues>) -> Self {
        self.current_instance_boot_mode = input;
        self
    }
    /// <p>The boot mode that is used to boot the instance at launch or start. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-boot.html">Boot modes</a> in the <i>Amazon EC2 User Guide</i>.</p>
    pub fn get_current_instance_boot_mode(&self) -> &::std::option::Option<crate::types::InstanceBootModeValues> {
        &self.current_instance_boot_mode
    }
    /// <p>Contains settings for the network performance options for your instance.</p>
    pub fn network_performance_options(mut self, input: crate::types::InstanceNetworkPerformanceOptions) -> Self {
        self.network_performance_options = ::std::option::Option::Some(input);
        self
    }
    /// <p>Contains settings for the network performance options for your instance.</p>
    pub fn set_network_performance_options(mut self, input: ::std::option::Option<crate::types::InstanceNetworkPerformanceOptions>) -> Self {
        self.network_performance_options = input;
        self
    }
    /// <p>Contains settings for the network performance options for your instance.</p>
    pub fn get_network_performance_options(&self) -> &::std::option::Option<crate::types::InstanceNetworkPerformanceOptions> {
        &self.network_performance_options
    }
    /// <p>The service provider that manages the instance.</p>
    pub fn operator(mut self, input: crate::types::OperatorResponse) -> Self {
        self.operator = ::std::option::Option::Some(input);
        self
    }
    /// <p>The service provider that manages the instance.</p>
    pub fn set_operator(mut self, input: ::std::option::Option<crate::types::OperatorResponse>) -> Self {
        self.operator = input;
        self
    }
    /// <p>The service provider that manages the instance.</p>
    pub fn get_operator(&self) -> &::std::option::Option<crate::types::OperatorResponse> {
        &self.operator
    }
    /// Appends an item to `secondary_interfaces`.
    ///
    /// To override the contents of this collection use [`set_secondary_interfaces`](Self::set_secondary_interfaces).
    ///
    /// <p>The secondary interfaces for the instance.</p>
    pub fn secondary_interfaces(mut self, input: crate::types::InstanceSecondaryInterface) -> Self {
        let mut v = self.secondary_interfaces.unwrap_or_default();
        v.push(input);
        self.secondary_interfaces = ::std::option::Option::Some(v);
        self
    }
    /// <p>The secondary interfaces for the instance.</p>
    pub fn set_secondary_interfaces(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::InstanceSecondaryInterface>>) -> Self {
        self.secondary_interfaces = input;
        self
    }
    /// <p>The secondary interfaces for the instance.</p>
    pub fn get_secondary_interfaces(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::InstanceSecondaryInterface>> {
        &self.secondary_interfaces
    }
    /// <p>The ID of the instance.</p>
    pub fn instance_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.instance_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the instance.</p>
    pub fn set_instance_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.instance_id = input;
        self
    }
    /// <p>The ID of the instance.</p>
    pub fn get_instance_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.instance_id
    }
    /// <p>The ID of the AMI used to launch the instance.</p>
    pub fn image_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.image_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the AMI used to launch the instance.</p>
    pub fn set_image_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.image_id = input;
        self
    }
    /// <p>The ID of the AMI used to launch the instance.</p>
    pub fn get_image_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.image_id
    }
    /// <p>The current state of the instance.</p>
    pub fn state(mut self, input: crate::types::InstanceState) -> Self {
        self.state = ::std::option::Option::Some(input);
        self
    }
    /// <p>The current state of the instance.</p>
    pub fn set_state(mut self, input: ::std::option::Option<crate::types::InstanceState>) -> Self {
        self.state = input;
        self
    }
    /// <p>The current state of the instance.</p>
    pub fn get_state(&self) -> &::std::option::Option<crate::types::InstanceState> {
        &self.state
    }
    /// <p>\[IPv4 only\] The private DNS hostname name assigned to the instance. This DNS hostname can only be used inside the Amazon EC2 network. This name is not available until the instance enters the running state.</p>
    /// <p>The Amazon-provided DNS server resolves Amazon-provided private DNS hostnames if you've enabled DNS resolution and DNS hostnames in your VPC. If you are not using the Amazon-provided DNS server in your VPC, your custom domain name servers must resolve the hostname as appropriate.</p>
    pub fn private_dns_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.private_dns_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>\[IPv4 only\] The private DNS hostname name assigned to the instance. This DNS hostname can only be used inside the Amazon EC2 network. This name is not available until the instance enters the running state.</p>
    /// <p>The Amazon-provided DNS server resolves Amazon-provided private DNS hostnames if you've enabled DNS resolution and DNS hostnames in your VPC. If you are not using the Amazon-provided DNS server in your VPC, your custom domain name servers must resolve the hostname as appropriate.</p>
    pub fn set_private_dns_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.private_dns_name = input;
        self
    }
    /// <p>\[IPv4 only\] The private DNS hostname name assigned to the instance. This DNS hostname can only be used inside the Amazon EC2 network. This name is not available until the instance enters the running state.</p>
    /// <p>The Amazon-provided DNS server resolves Amazon-provided private DNS hostnames if you've enabled DNS resolution and DNS hostnames in your VPC. If you are not using the Amazon-provided DNS server in your VPC, your custom domain name servers must resolve the hostname as appropriate.</p>
    pub fn get_private_dns_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.private_dns_name
    }
    /// <p>The public DNS name assigned to the instance. This name is not available until the instance enters the <code>running</code> state. This name is only available if you've enabled DNS hostnames for your VPC. The format of this name depends on the <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/hostname-types.html#public-hostnames">public hostname type</a>.</p>
    pub fn public_dns_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.public_dns_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The public DNS name assigned to the instance. This name is not available until the instance enters the <code>running</code> state. This name is only available if you've enabled DNS hostnames for your VPC. The format of this name depends on the <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/hostname-types.html#public-hostnames">public hostname type</a>.</p>
    pub fn set_public_dns_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.public_dns_name = input;
        self
    }
    /// <p>The public DNS name assigned to the instance. This name is not available until the instance enters the <code>running</code> state. This name is only available if you've enabled DNS hostnames for your VPC. The format of this name depends on the <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/hostname-types.html#public-hostnames">public hostname type</a>.</p>
    pub fn get_public_dns_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.public_dns_name
    }
    /// <p>The reason for the most recent state transition. This might be an empty string.</p>
    pub fn state_transition_reason(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.state_transition_reason = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The reason for the most recent state transition. This might be an empty string.</p>
    pub fn set_state_transition_reason(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.state_transition_reason = input;
        self
    }
    /// <p>The reason for the most recent state transition. This might be an empty string.</p>
    pub fn get_state_transition_reason(&self) -> &::std::option::Option<::std::string::String> {
        &self.state_transition_reason
    }
    /// <p>The name of the key pair, if this instance was launched with an associated key pair.</p>
    pub fn key_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.key_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the key pair, if this instance was launched with an associated key pair.</p>
    pub fn set_key_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.key_name = input;
        self
    }
    /// <p>The name of the key pair, if this instance was launched with an associated key pair.</p>
    pub fn get_key_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.key_name
    }
    /// <p>The AMI launch index, which can be used to find this instance in the launch group.</p>
    pub fn ami_launch_index(mut self, input: i32) -> Self {
        self.ami_launch_index = ::std::option::Option::Some(input);
        self
    }
    /// <p>The AMI launch index, which can be used to find this instance in the launch group.</p>
    pub fn set_ami_launch_index(mut self, input: ::std::option::Option<i32>) -> Self {
        self.ami_launch_index = input;
        self
    }
    /// <p>The AMI launch index, which can be used to find this instance in the launch group.</p>
    pub fn get_ami_launch_index(&self) -> &::std::option::Option<i32> {
        &self.ami_launch_index
    }
    /// Appends an item to `product_codes`.
    ///
    /// To override the contents of this collection use [`set_product_codes`](Self::set_product_codes).
    ///
    /// <p>The product codes attached to this instance, if applicable.</p>
    pub fn product_codes(mut self, input: crate::types::ProductCode) -> Self {
        let mut v = self.product_codes.unwrap_or_default();
        v.push(input);
        self.product_codes = ::std::option::Option::Some(v);
        self
    }
    /// <p>The product codes attached to this instance, if applicable.</p>
    pub fn set_product_codes(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ProductCode>>) -> Self {
        self.product_codes = input;
        self
    }
    /// <p>The product codes attached to this instance, if applicable.</p>
    pub fn get_product_codes(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ProductCode>> {
        &self.product_codes
    }
    /// <p>The instance type.</p>
    pub fn instance_type(mut self, input: crate::types::InstanceType) -> Self {
        self.instance_type = ::std::option::Option::Some(input);
        self
    }
    /// <p>The instance type.</p>
    pub fn set_instance_type(mut self, input: ::std::option::Option<crate::types::InstanceType>) -> Self {
        self.instance_type = input;
        self
    }
    /// <p>The instance type.</p>
    pub fn get_instance_type(&self) -> &::std::option::Option<crate::types::InstanceType> {
        &self.instance_type
    }
    /// <p>The time that the instance was last launched. To determine the time that instance was first launched, see the attachment time for the primary network interface.</p>
    pub fn launch_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.launch_time = ::std::option::Option::Some(input);
        self
    }
    /// <p>The time that the instance was last launched. To determine the time that instance was first launched, see the attachment time for the primary network interface.</p>
    pub fn set_launch_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.launch_time = input;
        self
    }
    /// <p>The time that the instance was last launched. To determine the time that instance was first launched, see the attachment time for the primary network interface.</p>
    pub fn get_launch_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.launch_time
    }
    /// <p>The location where the instance launched, if applicable.</p>
    pub fn placement(mut self, input: crate::types::Placement) -> Self {
        self.placement = ::std::option::Option::Some(input);
        self
    }
    /// <p>The location where the instance launched, if applicable.</p>
    pub fn set_placement(mut self, input: ::std::option::Option<crate::types::Placement>) -> Self {
        self.placement = input;
        self
    }
    /// <p>The location where the instance launched, if applicable.</p>
    pub fn get_placement(&self) -> &::std::option::Option<crate::types::Placement> {
        &self.placement
    }
    /// <p>The kernel associated with this instance, if applicable.</p>
    pub fn kernel_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.kernel_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The kernel associated with this instance, if applicable.</p>
    pub fn set_kernel_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.kernel_id = input;
        self
    }
    /// <p>The kernel associated with this instance, if applicable.</p>
    pub fn get_kernel_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.kernel_id
    }
    /// <p>The RAM disk associated with this instance, if applicable.</p>
    pub fn ramdisk_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.ramdisk_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The RAM disk associated with this instance, if applicable.</p>
    pub fn set_ramdisk_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.ramdisk_id = input;
        self
    }
    /// <p>The RAM disk associated with this instance, if applicable.</p>
    pub fn get_ramdisk_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.ramdisk_id
    }
    /// <p>The platform. This value is <code>windows</code> for Windows instances; otherwise, it is empty.</p>
    pub fn platform(mut self, input: crate::types::PlatformValues) -> Self {
        self.platform = ::std::option::Option::Some(input);
        self
    }
    /// <p>The platform. This value is <code>windows</code> for Windows instances; otherwise, it is empty.</p>
    pub fn set_platform(mut self, input: ::std::option::Option<crate::types::PlatformValues>) -> Self {
        self.platform = input;
        self
    }
    /// <p>The platform. This value is <code>windows</code> for Windows instances; otherwise, it is empty.</p>
    pub fn get_platform(&self) -> &::std::option::Option<crate::types::PlatformValues> {
        &self.platform
    }
    /// <p>The monitoring for the instance.</p>
    pub fn monitoring(mut self, input: crate::types::Monitoring) -> Self {
        self.monitoring = ::std::option::Option::Some(input);
        self
    }
    /// <p>The monitoring for the instance.</p>
    pub fn set_monitoring(mut self, input: ::std::option::Option<crate::types::Monitoring>) -> Self {
        self.monitoring = input;
        self
    }
    /// <p>The monitoring for the instance.</p>
    pub fn get_monitoring(&self) -> &::std::option::Option<crate::types::Monitoring> {
        &self.monitoring
    }
    /// <p>The ID of the subnet in which the instance is running.</p>
    pub fn subnet_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.subnet_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the subnet in which the instance is running.</p>
    pub fn set_subnet_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.subnet_id = input;
        self
    }
    /// <p>The ID of the subnet in which the instance is running.</p>
    pub fn get_subnet_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.subnet_id
    }
    /// <p>The ID of the VPC in which the instance is running.</p>
    pub fn vpc_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.vpc_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the VPC in which the instance is running.</p>
    pub fn set_vpc_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.vpc_id = input;
        self
    }
    /// <p>The ID of the VPC in which the instance is running.</p>
    pub fn get_vpc_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.vpc_id
    }
    /// <p>The private IPv4 address assigned to the instance.</p>
    pub fn private_ip_address(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.private_ip_address = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The private IPv4 address assigned to the instance.</p>
    pub fn set_private_ip_address(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.private_ip_address = input;
        self
    }
    /// <p>The private IPv4 address assigned to the instance.</p>
    pub fn get_private_ip_address(&self) -> &::std::option::Option<::std::string::String> {
        &self.private_ip_address
    }
    /// <p>The public IPv4 address, or the Carrier IP address assigned to the instance, if applicable.</p>
    /// <p>A Carrier IP address only applies to an instance launched in a subnet associated with a Wavelength Zone.</p>
    pub fn public_ip_address(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.public_ip_address = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The public IPv4 address, or the Carrier IP address assigned to the instance, if applicable.</p>
    /// <p>A Carrier IP address only applies to an instance launched in a subnet associated with a Wavelength Zone.</p>
    pub fn set_public_ip_address(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.public_ip_address = input;
        self
    }
    /// <p>The public IPv4 address, or the Carrier IP address assigned to the instance, if applicable.</p>
    /// <p>A Carrier IP address only applies to an instance launched in a subnet associated with a Wavelength Zone.</p>
    pub fn get_public_ip_address(&self) -> &::std::option::Option<::std::string::String> {
        &self.public_ip_address
    }
    /// Consumes the builder and constructs a [`Instance`](crate::types::Instance).
    pub fn build(self) -> crate::types::Instance {
        crate::types::Instance {
            architecture: self.architecture,
            block_device_mappings: self.block_device_mappings,
            client_token: self.client_token,
            ebs_optimized: self.ebs_optimized,
            ena_support: self.ena_support,
            hypervisor: self.hypervisor,
            iam_instance_profile: self.iam_instance_profile,
            instance_lifecycle: self.instance_lifecycle,
            elastic_gpu_associations: self.elastic_gpu_associations,
            elastic_inference_accelerator_associations: self.elastic_inference_accelerator_associations,
            network_interfaces: self.network_interfaces,
            outpost_arn: self.outpost_arn,
            root_device_name: self.root_device_name,
            root_device_type: self.root_device_type,
            security_groups: self.security_groups,
            source_dest_check: self.source_dest_check,
            spot_instance_request_id: self.spot_instance_request_id,
            sriov_net_support: self.sriov_net_support,
            state_reason: self.state_reason,
            tags: self.tags,
            virtualization_type: self.virtualization_type,
            cpu_options: self.cpu_options,
            capacity_block_id: self.capacity_block_id,
            capacity_reservation_id: self.capacity_reservation_id,
            capacity_reservation_specification: self.capacity_reservation_specification,
            hibernation_options: self.hibernation_options,
            licenses: self.licenses,
            metadata_options: self.metadata_options,
            enclave_options: self.enclave_options,
            boot_mode: self.boot_mode,
            platform_details: self.platform_details,
            usage_operation: self.usage_operation,
            usage_operation_update_time: self.usage_operation_update_time,
            private_dns_name_options: self.private_dns_name_options,
            ipv6_address: self.ipv6_address,
            tpm_support: self.tpm_support,
            maintenance_options: self.maintenance_options,
            current_instance_boot_mode: self.current_instance_boot_mode,
            network_performance_options: self.network_performance_options,
            operator: self.operator,
            secondary_interfaces: self.secondary_interfaces,
            instance_id: self.instance_id,
            image_id: self.image_id,
            state: self.state,
            private_dns_name: self.private_dns_name,
            public_dns_name: self.public_dns_name,
            state_transition_reason: self.state_transition_reason,
            key_name: self.key_name,
            ami_launch_index: self.ami_launch_index,
            product_codes: self.product_codes,
            instance_type: self.instance_type,
            launch_time: self.launch_time,
            placement: self.placement,
            kernel_id: self.kernel_id,
            ramdisk_id: self.ramdisk_id,
            platform: self.platform,
            monitoring: self.monitoring,
            subnet_id: self.subnet_id,
            vpc_id: self.vpc_id,
            private_ip_address: self.private_ip_address,
            public_ip_address: self.public_ip_address,
        }
    }
}