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
// 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 agent version. This parameter is set to <code>INHERIT</code> if the instance inherits the default stack setting or to a a version number for a fixed agent version.</p>
    pub agent_version: ::std::option::Option<::std::string::String>,
    /// <p>A custom AMI ID to be used to create the instance. For more information, see <a href="https://docs.aws.amazon.com/opsworks/latest/userguide/workinginstances-custom-ami.html">Instances</a></p>
    pub ami_id: ::std::option::Option<::std::string::String>,
    /// <p>The instance architecture: "i386" or "x86_64".</p>
    pub architecture: ::std::option::Option<crate::types::Architecture>,
    /// <p>The instance's Amazon Resource Number (ARN).</p>
    pub arn: ::std::option::Option<::std::string::String>,
    /// <p>For load-based or time-based instances, the type.</p>
    pub auto_scaling_type: ::std::option::Option<crate::types::AutoScalingType>,
    /// <p>The instance Availability Zone. For more information, see <a href="https://docs.aws.amazon.com/general/latest/gr/rande.html">Regions and Endpoints</a>.</p>
    pub availability_zone: ::std::option::Option<::std::string::String>,
    /// <p>An array of <code>BlockDeviceMapping</code> objects that specify the instance's block device mappings.</p>
    pub block_device_mappings: ::std::option::Option<::std::vec::Vec<crate::types::BlockDeviceMapping>>,
    /// <p>The time that the instance was created.</p>
    pub created_at: ::std::option::Option<::std::string::String>,
    /// <p>Whether this is an Amazon EBS-optimized instance.</p>
    pub ebs_optimized: ::std::option::Option<bool>,
    /// <p>The ID of the associated Amazon EC2 instance.</p>
    pub ec2_instance_id: ::std::option::Option<::std::string::String>,
    /// <p>For container instances, the Amazon ECS cluster's ARN.</p>
    pub ecs_cluster_arn: ::std::option::Option<::std::string::String>,
    /// <p>For container instances, the instance's ARN.</p>
    pub ecs_container_instance_arn: ::std::option::Option<::std::string::String>,
    /// <p>The instance <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html">Elastic IP address</a>.</p>
    pub elastic_ip: ::std::option::Option<::std::string::String>,
    /// <p>The instance host name. The following are character limits for instance host names.</p>
    /// <ul>
    /// <li>
    /// <p>Linux-based instances: 63 characters</p></li>
    /// <li>
    /// <p>Windows-based instances: 15 characters</p></li>
    /// </ul>
    pub hostname: ::std::option::Option<::std::string::String>,
    /// <p>For registered instances, the infrastructure class: <code>ec2</code> or <code>on-premises</code>.</p>
    pub infrastructure_class: ::std::option::Option<::std::string::String>,
    /// <p>Whether to install operating system and package updates when the instance boots. The default value is <code>true</code>. If this value is set to <code>false</code>, you must update instances manually by using <code>CreateDeployment</code> to run the <code>update_dependencies</code> stack command or by manually running <code>yum</code> (Amazon Linux) or <code>apt-get</code> (Ubuntu) on the instances.</p><note>
    /// <p>We strongly recommend using the default value of <code>true</code> to ensure that your instances have the latest security updates.</p>
    /// </note>
    pub install_updates_on_boot: ::std::option::Option<bool>,
    /// <p>The instance ID.</p>
    pub instance_id: ::std::option::Option<::std::string::String>,
    /// <p>The ARN of the instance's IAM profile. For more information about IAM ARNs, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html">Using Identifiers</a>.</p>
    pub instance_profile_arn: ::std::option::Option<::std::string::String>,
    /// <p>The instance type, such as <code>t2.micro</code>.</p>
    pub instance_type: ::std::option::Option<::std::string::String>,
    /// <p>The ID of the last service error. For more information, call <code>DescribeServiceErrors</code>.</p>
    pub last_service_error_id: ::std::option::Option<::std::string::String>,
    /// <p>An array containing the instance layer IDs.</p>
    pub layer_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    /// <p>The instance's operating system.</p>
    pub os: ::std::option::Option<::std::string::String>,
    /// <p>The instance's platform.</p>
    pub platform: ::std::option::Option<::std::string::String>,
    /// <p>The instance's private DNS name.</p>
    pub private_dns: ::std::option::Option<::std::string::String>,
    /// <p>The instance's private IP address.</p>
    pub private_ip: ::std::option::Option<::std::string::String>,
    /// <p>The instance public DNS name.</p>
    pub public_dns: ::std::option::Option<::std::string::String>,
    /// <p>The instance public IP address.</p>
    pub public_ip: ::std::option::Option<::std::string::String>,
    /// <p>For registered instances, who performed the registration.</p>
    pub registered_by: ::std::option::Option<::std::string::String>,
    /// <p>The instance's reported OpsWorks Stacks agent version.</p>
    pub reported_agent_version: ::std::option::Option<::std::string::String>,
    /// <p>For registered instances, the reported operating system.</p>
    pub reported_os: ::std::option::Option<crate::types::ReportedOs>,
    /// <p>The instance's root device type. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ComponentsAMIs.html#storage-for-the-root-device">Storage for the Root Device</a>.</p>
    pub root_device_type: ::std::option::Option<crate::types::RootDeviceType>,
    /// <p>The root device volume ID.</p>
    pub root_device_volume_id: ::std::option::Option<::std::string::String>,
    /// <p>An array containing the instance security group IDs.</p>
    pub security_group_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    /// <p>The SSH key's Deep Security Agent (DSA) fingerprint.</p>
    pub ssh_host_dsa_key_fingerprint: ::std::option::Option<::std::string::String>,
    /// <p>The SSH key's RSA fingerprint.</p>
    pub ssh_host_rsa_key_fingerprint: ::std::option::Option<::std::string::String>,
    /// <p>The instance's Amazon EC2 key-pair name.</p>
    pub ssh_key_name: ::std::option::Option<::std::string::String>,
    /// <p>The stack ID.</p>
    pub stack_id: ::std::option::Option<::std::string::String>,
    /// <p>The instance status:</p>
    /// <ul>
    /// <li>
    /// <p><code>booting</code></p></li>
    /// <li>
    /// <p><code>connection_lost</code></p></li>
    /// <li>
    /// <p><code>online</code></p></li>
    /// <li>
    /// <p><code>pending</code></p></li>
    /// <li>
    /// <p><code>rebooting</code></p></li>
    /// <li>
    /// <p><code>requested</code></p></li>
    /// <li>
    /// <p><code>running_setup</code></p></li>
    /// <li>
    /// <p><code>setup_failed</code></p></li>
    /// <li>
    /// <p><code>shutting_down</code></p></li>
    /// <li>
    /// <p><code>start_failed</code></p></li>
    /// <li>
    /// <p><code>stop_failed</code></p></li>
    /// <li>
    /// <p><code>stopped</code></p></li>
    /// <li>
    /// <p><code>stopping</code></p></li>
    /// <li>
    /// <p><code>terminated</code></p></li>
    /// <li>
    /// <p><code>terminating</code></p></li>
    /// </ul>
    pub status: ::std::option::Option<::std::string::String>,
    /// <p>The instance's subnet ID; applicable only if the stack is running in a VPC.</p>
    pub subnet_id: ::std::option::Option<::std::string::String>,
    /// <p>The instance's tenancy option, such as <code>dedicated</code> or <code>host</code>.</p>
    pub tenancy: ::std::option::Option<::std::string::String>,
    /// <p>The instance's virtualization type: <code>paravirtual</code> or <code>hvm</code>.</p>
    pub virtualization_type: ::std::option::Option<crate::types::VirtualizationType>,
}
impl Instance {
    /// <p>The agent version. This parameter is set to <code>INHERIT</code> if the instance inherits the default stack setting or to a a version number for a fixed agent version.</p>
    pub fn agent_version(&self) -> ::std::option::Option<&str> {
        self.agent_version.as_deref()
    }
    /// <p>A custom AMI ID to be used to create the instance. For more information, see <a href="https://docs.aws.amazon.com/opsworks/latest/userguide/workinginstances-custom-ami.html">Instances</a></p>
    pub fn ami_id(&self) -> ::std::option::Option<&str> {
        self.ami_id.as_deref()
    }
    /// <p>The instance architecture: "i386" or "x86_64".</p>
    pub fn architecture(&self) -> ::std::option::Option<&crate::types::Architecture> {
        self.architecture.as_ref()
    }
    /// <p>The instance's Amazon Resource Number (ARN).</p>
    pub fn arn(&self) -> ::std::option::Option<&str> {
        self.arn.as_deref()
    }
    /// <p>For load-based or time-based instances, the type.</p>
    pub fn auto_scaling_type(&self) -> ::std::option::Option<&crate::types::AutoScalingType> {
        self.auto_scaling_type.as_ref()
    }
    /// <p>The instance Availability Zone. For more information, see <a href="https://docs.aws.amazon.com/general/latest/gr/rande.html">Regions and Endpoints</a>.</p>
    pub fn availability_zone(&self) -> ::std::option::Option<&str> {
        self.availability_zone.as_deref()
    }
    /// <p>An array of <code>BlockDeviceMapping</code> objects that specify the instance's block device mappings.</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::BlockDeviceMapping] {
        self.block_device_mappings.as_deref().unwrap_or_default()
    }
    /// <p>The time that the instance was created.</p>
    pub fn created_at(&self) -> ::std::option::Option<&str> {
        self.created_at.as_deref()
    }
    /// <p>Whether this is an Amazon EBS-optimized instance.</p>
    pub fn ebs_optimized(&self) -> ::std::option::Option<bool> {
        self.ebs_optimized
    }
    /// <p>The ID of the associated Amazon EC2 instance.</p>
    pub fn ec2_instance_id(&self) -> ::std::option::Option<&str> {
        self.ec2_instance_id.as_deref()
    }
    /// <p>For container instances, the Amazon ECS cluster's ARN.</p>
    pub fn ecs_cluster_arn(&self) -> ::std::option::Option<&str> {
        self.ecs_cluster_arn.as_deref()
    }
    /// <p>For container instances, the instance's ARN.</p>
    pub fn ecs_container_instance_arn(&self) -> ::std::option::Option<&str> {
        self.ecs_container_instance_arn.as_deref()
    }
    /// <p>The instance <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html">Elastic IP address</a>.</p>
    pub fn elastic_ip(&self) -> ::std::option::Option<&str> {
        self.elastic_ip.as_deref()
    }
    /// <p>The instance host name. The following are character limits for instance host names.</p>
    /// <ul>
    /// <li>
    /// <p>Linux-based instances: 63 characters</p></li>
    /// <li>
    /// <p>Windows-based instances: 15 characters</p></li>
    /// </ul>
    pub fn hostname(&self) -> ::std::option::Option<&str> {
        self.hostname.as_deref()
    }
    /// <p>For registered instances, the infrastructure class: <code>ec2</code> or <code>on-premises</code>.</p>
    pub fn infrastructure_class(&self) -> ::std::option::Option<&str> {
        self.infrastructure_class.as_deref()
    }
    /// <p>Whether to install operating system and package updates when the instance boots. The default value is <code>true</code>. If this value is set to <code>false</code>, you must update instances manually by using <code>CreateDeployment</code> to run the <code>update_dependencies</code> stack command or by manually running <code>yum</code> (Amazon Linux) or <code>apt-get</code> (Ubuntu) on the instances.</p><note>
    /// <p>We strongly recommend using the default value of <code>true</code> to ensure that your instances have the latest security updates.</p>
    /// </note>
    pub fn install_updates_on_boot(&self) -> ::std::option::Option<bool> {
        self.install_updates_on_boot
    }
    /// <p>The instance ID.</p>
    pub fn instance_id(&self) -> ::std::option::Option<&str> {
        self.instance_id.as_deref()
    }
    /// <p>The ARN of the instance's IAM profile. For more information about IAM ARNs, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html">Using Identifiers</a>.</p>
    pub fn instance_profile_arn(&self) -> ::std::option::Option<&str> {
        self.instance_profile_arn.as_deref()
    }
    /// <p>The instance type, such as <code>t2.micro</code>.</p>
    pub fn instance_type(&self) -> ::std::option::Option<&str> {
        self.instance_type.as_deref()
    }
    /// <p>The ID of the last service error. For more information, call <code>DescribeServiceErrors</code>.</p>
    pub fn last_service_error_id(&self) -> ::std::option::Option<&str> {
        self.last_service_error_id.as_deref()
    }
    /// <p>An array containing the instance layer IDs.</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 `.layer_ids.is_none()`.
    pub fn layer_ids(&self) -> &[::std::string::String] {
        self.layer_ids.as_deref().unwrap_or_default()
    }
    /// <p>The instance's operating system.</p>
    pub fn os(&self) -> ::std::option::Option<&str> {
        self.os.as_deref()
    }
    /// <p>The instance's platform.</p>
    pub fn platform(&self) -> ::std::option::Option<&str> {
        self.platform.as_deref()
    }
    /// <p>The instance's private DNS name.</p>
    pub fn private_dns(&self) -> ::std::option::Option<&str> {
        self.private_dns.as_deref()
    }
    /// <p>The instance's private IP address.</p>
    pub fn private_ip(&self) -> ::std::option::Option<&str> {
        self.private_ip.as_deref()
    }
    /// <p>The instance public DNS name.</p>
    pub fn public_dns(&self) -> ::std::option::Option<&str> {
        self.public_dns.as_deref()
    }
    /// <p>The instance public IP address.</p>
    pub fn public_ip(&self) -> ::std::option::Option<&str> {
        self.public_ip.as_deref()
    }
    /// <p>For registered instances, who performed the registration.</p>
    pub fn registered_by(&self) -> ::std::option::Option<&str> {
        self.registered_by.as_deref()
    }
    /// <p>The instance's reported OpsWorks Stacks agent version.</p>
    pub fn reported_agent_version(&self) -> ::std::option::Option<&str> {
        self.reported_agent_version.as_deref()
    }
    /// <p>For registered instances, the reported operating system.</p>
    pub fn reported_os(&self) -> ::std::option::Option<&crate::types::ReportedOs> {
        self.reported_os.as_ref()
    }
    /// <p>The instance's root device type. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ComponentsAMIs.html#storage-for-the-root-device">Storage for the Root Device</a>.</p>
    pub fn root_device_type(&self) -> ::std::option::Option<&crate::types::RootDeviceType> {
        self.root_device_type.as_ref()
    }
    /// <p>The root device volume ID.</p>
    pub fn root_device_volume_id(&self) -> ::std::option::Option<&str> {
        self.root_device_volume_id.as_deref()
    }
    /// <p>An array containing the instance security group IDs.</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_group_ids.is_none()`.
    pub fn security_group_ids(&self) -> &[::std::string::String] {
        self.security_group_ids.as_deref().unwrap_or_default()
    }
    /// <p>The SSH key's Deep Security Agent (DSA) fingerprint.</p>
    pub fn ssh_host_dsa_key_fingerprint(&self) -> ::std::option::Option<&str> {
        self.ssh_host_dsa_key_fingerprint.as_deref()
    }
    /// <p>The SSH key's RSA fingerprint.</p>
    pub fn ssh_host_rsa_key_fingerprint(&self) -> ::std::option::Option<&str> {
        self.ssh_host_rsa_key_fingerprint.as_deref()
    }
    /// <p>The instance's Amazon EC2 key-pair name.</p>
    pub fn ssh_key_name(&self) -> ::std::option::Option<&str> {
        self.ssh_key_name.as_deref()
    }
    /// <p>The stack ID.</p>
    pub fn stack_id(&self) -> ::std::option::Option<&str> {
        self.stack_id.as_deref()
    }
    /// <p>The instance status:</p>
    /// <ul>
    /// <li>
    /// <p><code>booting</code></p></li>
    /// <li>
    /// <p><code>connection_lost</code></p></li>
    /// <li>
    /// <p><code>online</code></p></li>
    /// <li>
    /// <p><code>pending</code></p></li>
    /// <li>
    /// <p><code>rebooting</code></p></li>
    /// <li>
    /// <p><code>requested</code></p></li>
    /// <li>
    /// <p><code>running_setup</code></p></li>
    /// <li>
    /// <p><code>setup_failed</code></p></li>
    /// <li>
    /// <p><code>shutting_down</code></p></li>
    /// <li>
    /// <p><code>start_failed</code></p></li>
    /// <li>
    /// <p><code>stop_failed</code></p></li>
    /// <li>
    /// <p><code>stopped</code></p></li>
    /// <li>
    /// <p><code>stopping</code></p></li>
    /// <li>
    /// <p><code>terminated</code></p></li>
    /// <li>
    /// <p><code>terminating</code></p></li>
    /// </ul>
    pub fn status(&self) -> ::std::option::Option<&str> {
        self.status.as_deref()
    }
    /// <p>The instance's subnet ID; applicable only if the stack is running in a VPC.</p>
    pub fn subnet_id(&self) -> ::std::option::Option<&str> {
        self.subnet_id.as_deref()
    }
    /// <p>The instance's tenancy option, such as <code>dedicated</code> or <code>host</code>.</p>
    pub fn tenancy(&self) -> ::std::option::Option<&str> {
        self.tenancy.as_deref()
    }
    /// <p>The instance's virtualization type: <code>paravirtual</code> or <code>hvm</code>.</p>
    pub fn virtualization_type(&self) -> ::std::option::Option<&crate::types::VirtualizationType> {
        self.virtualization_type.as_ref()
    }
}
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) agent_version: ::std::option::Option<::std::string::String>,
    pub(crate) ami_id: ::std::option::Option<::std::string::String>,
    pub(crate) architecture: ::std::option::Option<crate::types::Architecture>,
    pub(crate) arn: ::std::option::Option<::std::string::String>,
    pub(crate) auto_scaling_type: ::std::option::Option<crate::types::AutoScalingType>,
    pub(crate) availability_zone: ::std::option::Option<::std::string::String>,
    pub(crate) block_device_mappings: ::std::option::Option<::std::vec::Vec<crate::types::BlockDeviceMapping>>,
    pub(crate) created_at: ::std::option::Option<::std::string::String>,
    pub(crate) ebs_optimized: ::std::option::Option<bool>,
    pub(crate) ec2_instance_id: ::std::option::Option<::std::string::String>,
    pub(crate) ecs_cluster_arn: ::std::option::Option<::std::string::String>,
    pub(crate) ecs_container_instance_arn: ::std::option::Option<::std::string::String>,
    pub(crate) elastic_ip: ::std::option::Option<::std::string::String>,
    pub(crate) hostname: ::std::option::Option<::std::string::String>,
    pub(crate) infrastructure_class: ::std::option::Option<::std::string::String>,
    pub(crate) install_updates_on_boot: ::std::option::Option<bool>,
    pub(crate) instance_id: ::std::option::Option<::std::string::String>,
    pub(crate) instance_profile_arn: ::std::option::Option<::std::string::String>,
    pub(crate) instance_type: ::std::option::Option<::std::string::String>,
    pub(crate) last_service_error_id: ::std::option::Option<::std::string::String>,
    pub(crate) layer_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    pub(crate) os: ::std::option::Option<::std::string::String>,
    pub(crate) platform: ::std::option::Option<::std::string::String>,
    pub(crate) private_dns: ::std::option::Option<::std::string::String>,
    pub(crate) private_ip: ::std::option::Option<::std::string::String>,
    pub(crate) public_dns: ::std::option::Option<::std::string::String>,
    pub(crate) public_ip: ::std::option::Option<::std::string::String>,
    pub(crate) registered_by: ::std::option::Option<::std::string::String>,
    pub(crate) reported_agent_version: ::std::option::Option<::std::string::String>,
    pub(crate) reported_os: ::std::option::Option<crate::types::ReportedOs>,
    pub(crate) root_device_type: ::std::option::Option<crate::types::RootDeviceType>,
    pub(crate) root_device_volume_id: ::std::option::Option<::std::string::String>,
    pub(crate) security_group_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    pub(crate) ssh_host_dsa_key_fingerprint: ::std::option::Option<::std::string::String>,
    pub(crate) ssh_host_rsa_key_fingerprint: ::std::option::Option<::std::string::String>,
    pub(crate) ssh_key_name: ::std::option::Option<::std::string::String>,
    pub(crate) stack_id: ::std::option::Option<::std::string::String>,
    pub(crate) status: ::std::option::Option<::std::string::String>,
    pub(crate) subnet_id: ::std::option::Option<::std::string::String>,
    pub(crate) tenancy: ::std::option::Option<::std::string::String>,
    pub(crate) virtualization_type: ::std::option::Option<crate::types::VirtualizationType>,
}
impl InstanceBuilder {
    /// <p>The agent version. This parameter is set to <code>INHERIT</code> if the instance inherits the default stack setting or to a a version number for a fixed agent version.</p>
    pub fn agent_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.agent_version = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The agent version. This parameter is set to <code>INHERIT</code> if the instance inherits the default stack setting or to a a version number for a fixed agent version.</p>
    pub fn set_agent_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.agent_version = input;
        self
    }
    /// <p>The agent version. This parameter is set to <code>INHERIT</code> if the instance inherits the default stack setting or to a a version number for a fixed agent version.</p>
    pub fn get_agent_version(&self) -> &::std::option::Option<::std::string::String> {
        &self.agent_version
    }
    /// <p>A custom AMI ID to be used to create the instance. For more information, see <a href="https://docs.aws.amazon.com/opsworks/latest/userguide/workinginstances-custom-ami.html">Instances</a></p>
    pub fn ami_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.ami_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>A custom AMI ID to be used to create the instance. For more information, see <a href="https://docs.aws.amazon.com/opsworks/latest/userguide/workinginstances-custom-ami.html">Instances</a></p>
    pub fn set_ami_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.ami_id = input;
        self
    }
    /// <p>A custom AMI ID to be used to create the instance. For more information, see <a href="https://docs.aws.amazon.com/opsworks/latest/userguide/workinginstances-custom-ami.html">Instances</a></p>
    pub fn get_ami_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.ami_id
    }
    /// <p>The instance architecture: "i386" or "x86_64".</p>
    pub fn architecture(mut self, input: crate::types::Architecture) -> Self {
        self.architecture = ::std::option::Option::Some(input);
        self
    }
    /// <p>The instance architecture: "i386" or "x86_64".</p>
    pub fn set_architecture(mut self, input: ::std::option::Option<crate::types::Architecture>) -> Self {
        self.architecture = input;
        self
    }
    /// <p>The instance architecture: "i386" or "x86_64".</p>
    pub fn get_architecture(&self) -> &::std::option::Option<crate::types::Architecture> {
        &self.architecture
    }
    /// <p>The instance's Amazon Resource Number (ARN).</p>
    pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The instance's Amazon Resource Number (ARN).</p>
    pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.arn = input;
        self
    }
    /// <p>The instance's Amazon Resource Number (ARN).</p>
    pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.arn
    }
    /// <p>For load-based or time-based instances, the type.</p>
    pub fn auto_scaling_type(mut self, input: crate::types::AutoScalingType) -> Self {
        self.auto_scaling_type = ::std::option::Option::Some(input);
        self
    }
    /// <p>For load-based or time-based instances, the type.</p>
    pub fn set_auto_scaling_type(mut self, input: ::std::option::Option<crate::types::AutoScalingType>) -> Self {
        self.auto_scaling_type = input;
        self
    }
    /// <p>For load-based or time-based instances, the type.</p>
    pub fn get_auto_scaling_type(&self) -> &::std::option::Option<crate::types::AutoScalingType> {
        &self.auto_scaling_type
    }
    /// <p>The instance Availability Zone. For more information, see <a href="https://docs.aws.amazon.com/general/latest/gr/rande.html">Regions and Endpoints</a>.</p>
    pub fn availability_zone(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.availability_zone = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The instance Availability Zone. For more information, see <a href="https://docs.aws.amazon.com/general/latest/gr/rande.html">Regions and Endpoints</a>.</p>
    pub fn set_availability_zone(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.availability_zone = input;
        self
    }
    /// <p>The instance Availability Zone. For more information, see <a href="https://docs.aws.amazon.com/general/latest/gr/rande.html">Regions and Endpoints</a>.</p>
    pub fn get_availability_zone(&self) -> &::std::option::Option<::std::string::String> {
        &self.availability_zone
    }
    /// 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>An array of <code>BlockDeviceMapping</code> objects that specify the instance's block device mappings.</p>
    pub fn block_device_mappings(mut self, input: crate::types::BlockDeviceMapping) -> 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>An array of <code>BlockDeviceMapping</code> objects that specify the instance's block device mappings.</p>
    pub fn set_block_device_mappings(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::BlockDeviceMapping>>) -> Self {
        self.block_device_mappings = input;
        self
    }
    /// <p>An array of <code>BlockDeviceMapping</code> objects that specify the instance's block device mappings.</p>
    pub fn get_block_device_mappings(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::BlockDeviceMapping>> {
        &self.block_device_mappings
    }
    /// <p>The time that the instance was created.</p>
    pub fn created_at(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.created_at = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The time that the instance was created.</p>
    pub fn set_created_at(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.created_at = input;
        self
    }
    /// <p>The time that the instance was created.</p>
    pub fn get_created_at(&self) -> &::std::option::Option<::std::string::String> {
        &self.created_at
    }
    /// <p>Whether this is an Amazon EBS-optimized instance.</p>
    pub fn ebs_optimized(mut self, input: bool) -> Self {
        self.ebs_optimized = ::std::option::Option::Some(input);
        self
    }
    /// <p>Whether this is an Amazon EBS-optimized instance.</p>
    pub fn set_ebs_optimized(mut self, input: ::std::option::Option<bool>) -> Self {
        self.ebs_optimized = input;
        self
    }
    /// <p>Whether this is an Amazon EBS-optimized instance.</p>
    pub fn get_ebs_optimized(&self) -> &::std::option::Option<bool> {
        &self.ebs_optimized
    }
    /// <p>The ID of the associated Amazon EC2 instance.</p>
    pub fn ec2_instance_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.ec2_instance_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the associated Amazon EC2 instance.</p>
    pub fn set_ec2_instance_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.ec2_instance_id = input;
        self
    }
    /// <p>The ID of the associated Amazon EC2 instance.</p>
    pub fn get_ec2_instance_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.ec2_instance_id
    }
    /// <p>For container instances, the Amazon ECS cluster's ARN.</p>
    pub fn ecs_cluster_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.ecs_cluster_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>For container instances, the Amazon ECS cluster's ARN.</p>
    pub fn set_ecs_cluster_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.ecs_cluster_arn = input;
        self
    }
    /// <p>For container instances, the Amazon ECS cluster's ARN.</p>
    pub fn get_ecs_cluster_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.ecs_cluster_arn
    }
    /// <p>For container instances, the instance's ARN.</p>
    pub fn ecs_container_instance_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.ecs_container_instance_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>For container instances, the instance's ARN.</p>
    pub fn set_ecs_container_instance_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.ecs_container_instance_arn = input;
        self
    }
    /// <p>For container instances, the instance's ARN.</p>
    pub fn get_ecs_container_instance_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.ecs_container_instance_arn
    }
    /// <p>The instance <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html">Elastic IP address</a>.</p>
    pub fn elastic_ip(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.elastic_ip = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The instance <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html">Elastic IP address</a>.</p>
    pub fn set_elastic_ip(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.elastic_ip = input;
        self
    }
    /// <p>The instance <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html">Elastic IP address</a>.</p>
    pub fn get_elastic_ip(&self) -> &::std::option::Option<::std::string::String> {
        &self.elastic_ip
    }
    /// <p>The instance host name. The following are character limits for instance host names.</p>
    /// <ul>
    /// <li>
    /// <p>Linux-based instances: 63 characters</p></li>
    /// <li>
    /// <p>Windows-based instances: 15 characters</p></li>
    /// </ul>
    pub fn hostname(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.hostname = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The instance host name. The following are character limits for instance host names.</p>
    /// <ul>
    /// <li>
    /// <p>Linux-based instances: 63 characters</p></li>
    /// <li>
    /// <p>Windows-based instances: 15 characters</p></li>
    /// </ul>
    pub fn set_hostname(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.hostname = input;
        self
    }
    /// <p>The instance host name. The following are character limits for instance host names.</p>
    /// <ul>
    /// <li>
    /// <p>Linux-based instances: 63 characters</p></li>
    /// <li>
    /// <p>Windows-based instances: 15 characters</p></li>
    /// </ul>
    pub fn get_hostname(&self) -> &::std::option::Option<::std::string::String> {
        &self.hostname
    }
    /// <p>For registered instances, the infrastructure class: <code>ec2</code> or <code>on-premises</code>.</p>
    pub fn infrastructure_class(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.infrastructure_class = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>For registered instances, the infrastructure class: <code>ec2</code> or <code>on-premises</code>.</p>
    pub fn set_infrastructure_class(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.infrastructure_class = input;
        self
    }
    /// <p>For registered instances, the infrastructure class: <code>ec2</code> or <code>on-premises</code>.</p>
    pub fn get_infrastructure_class(&self) -> &::std::option::Option<::std::string::String> {
        &self.infrastructure_class
    }
    /// <p>Whether to install operating system and package updates when the instance boots. The default value is <code>true</code>. If this value is set to <code>false</code>, you must update instances manually by using <code>CreateDeployment</code> to run the <code>update_dependencies</code> stack command or by manually running <code>yum</code> (Amazon Linux) or <code>apt-get</code> (Ubuntu) on the instances.</p><note>
    /// <p>We strongly recommend using the default value of <code>true</code> to ensure that your instances have the latest security updates.</p>
    /// </note>
    pub fn install_updates_on_boot(mut self, input: bool) -> Self {
        self.install_updates_on_boot = ::std::option::Option::Some(input);
        self
    }
    /// <p>Whether to install operating system and package updates when the instance boots. The default value is <code>true</code>. If this value is set to <code>false</code>, you must update instances manually by using <code>CreateDeployment</code> to run the <code>update_dependencies</code> stack command or by manually running <code>yum</code> (Amazon Linux) or <code>apt-get</code> (Ubuntu) on the instances.</p><note>
    /// <p>We strongly recommend using the default value of <code>true</code> to ensure that your instances have the latest security updates.</p>
    /// </note>
    pub fn set_install_updates_on_boot(mut self, input: ::std::option::Option<bool>) -> Self {
        self.install_updates_on_boot = input;
        self
    }
    /// <p>Whether to install operating system and package updates when the instance boots. The default value is <code>true</code>. If this value is set to <code>false</code>, you must update instances manually by using <code>CreateDeployment</code> to run the <code>update_dependencies</code> stack command or by manually running <code>yum</code> (Amazon Linux) or <code>apt-get</code> (Ubuntu) on the instances.</p><note>
    /// <p>We strongly recommend using the default value of <code>true</code> to ensure that your instances have the latest security updates.</p>
    /// </note>
    pub fn get_install_updates_on_boot(&self) -> &::std::option::Option<bool> {
        &self.install_updates_on_boot
    }
    /// <p>The instance ID.</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 instance ID.</p>
    pub fn set_instance_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.instance_id = input;
        self
    }
    /// <p>The instance ID.</p>
    pub fn get_instance_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.instance_id
    }
    /// <p>The ARN of the instance's IAM profile. For more information about IAM ARNs, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html">Using Identifiers</a>.</p>
    pub fn instance_profile_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.instance_profile_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ARN of the instance's IAM profile. For more information about IAM ARNs, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html">Using Identifiers</a>.</p>
    pub fn set_instance_profile_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.instance_profile_arn = input;
        self
    }
    /// <p>The ARN of the instance's IAM profile. For more information about IAM ARNs, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html">Using Identifiers</a>.</p>
    pub fn get_instance_profile_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.instance_profile_arn
    }
    /// <p>The instance type, such as <code>t2.micro</code>.</p>
    pub fn instance_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.instance_type = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The instance type, such as <code>t2.micro</code>.</p>
    pub fn set_instance_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.instance_type = input;
        self
    }
    /// <p>The instance type, such as <code>t2.micro</code>.</p>
    pub fn get_instance_type(&self) -> &::std::option::Option<::std::string::String> {
        &self.instance_type
    }
    /// <p>The ID of the last service error. For more information, call <code>DescribeServiceErrors</code>.</p>
    pub fn last_service_error_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.last_service_error_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the last service error. For more information, call <code>DescribeServiceErrors</code>.</p>
    pub fn set_last_service_error_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.last_service_error_id = input;
        self
    }
    /// <p>The ID of the last service error. For more information, call <code>DescribeServiceErrors</code>.</p>
    pub fn get_last_service_error_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.last_service_error_id
    }
    /// Appends an item to `layer_ids`.
    ///
    /// To override the contents of this collection use [`set_layer_ids`](Self::set_layer_ids).
    ///
    /// <p>An array containing the instance layer IDs.</p>
    pub fn layer_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.layer_ids.unwrap_or_default();
        v.push(input.into());
        self.layer_ids = ::std::option::Option::Some(v);
        self
    }
    /// <p>An array containing the instance layer IDs.</p>
    pub fn set_layer_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.layer_ids = input;
        self
    }
    /// <p>An array containing the instance layer IDs.</p>
    pub fn get_layer_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.layer_ids
    }
    /// <p>The instance's operating system.</p>
    pub fn os(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.os = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The instance's operating system.</p>
    pub fn set_os(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.os = input;
        self
    }
    /// <p>The instance's operating system.</p>
    pub fn get_os(&self) -> &::std::option::Option<::std::string::String> {
        &self.os
    }
    /// <p>The instance's platform.</p>
    pub fn platform(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.platform = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The instance's platform.</p>
    pub fn set_platform(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.platform = input;
        self
    }
    /// <p>The instance's platform.</p>
    pub fn get_platform(&self) -> &::std::option::Option<::std::string::String> {
        &self.platform
    }
    /// <p>The instance's private DNS name.</p>
    pub fn private_dns(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.private_dns = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The instance's private DNS name.</p>
    pub fn set_private_dns(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.private_dns = input;
        self
    }
    /// <p>The instance's private DNS name.</p>
    pub fn get_private_dns(&self) -> &::std::option::Option<::std::string::String> {
        &self.private_dns
    }
    /// <p>The instance's private IP address.</p>
    pub fn private_ip(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.private_ip = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The instance's private IP address.</p>
    pub fn set_private_ip(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.private_ip = input;
        self
    }
    /// <p>The instance's private IP address.</p>
    pub fn get_private_ip(&self) -> &::std::option::Option<::std::string::String> {
        &self.private_ip
    }
    /// <p>The instance public DNS name.</p>
    pub fn public_dns(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.public_dns = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The instance public DNS name.</p>
    pub fn set_public_dns(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.public_dns = input;
        self
    }
    /// <p>The instance public DNS name.</p>
    pub fn get_public_dns(&self) -> &::std::option::Option<::std::string::String> {
        &self.public_dns
    }
    /// <p>The instance public IP address.</p>
    pub fn public_ip(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.public_ip = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The instance public IP address.</p>
    pub fn set_public_ip(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.public_ip = input;
        self
    }
    /// <p>The instance public IP address.</p>
    pub fn get_public_ip(&self) -> &::std::option::Option<::std::string::String> {
        &self.public_ip
    }
    /// <p>For registered instances, who performed the registration.</p>
    pub fn registered_by(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.registered_by = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>For registered instances, who performed the registration.</p>
    pub fn set_registered_by(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.registered_by = input;
        self
    }
    /// <p>For registered instances, who performed the registration.</p>
    pub fn get_registered_by(&self) -> &::std::option::Option<::std::string::String> {
        &self.registered_by
    }
    /// <p>The instance's reported OpsWorks Stacks agent version.</p>
    pub fn reported_agent_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.reported_agent_version = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The instance's reported OpsWorks Stacks agent version.</p>
    pub fn set_reported_agent_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.reported_agent_version = input;
        self
    }
    /// <p>The instance's reported OpsWorks Stacks agent version.</p>
    pub fn get_reported_agent_version(&self) -> &::std::option::Option<::std::string::String> {
        &self.reported_agent_version
    }
    /// <p>For registered instances, the reported operating system.</p>
    pub fn reported_os(mut self, input: crate::types::ReportedOs) -> Self {
        self.reported_os = ::std::option::Option::Some(input);
        self
    }
    /// <p>For registered instances, the reported operating system.</p>
    pub fn set_reported_os(mut self, input: ::std::option::Option<crate::types::ReportedOs>) -> Self {
        self.reported_os = input;
        self
    }
    /// <p>For registered instances, the reported operating system.</p>
    pub fn get_reported_os(&self) -> &::std::option::Option<crate::types::ReportedOs> {
        &self.reported_os
    }
    /// <p>The instance's root device type. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ComponentsAMIs.html#storage-for-the-root-device">Storage for the Root Device</a>.</p>
    pub fn root_device_type(mut self, input: crate::types::RootDeviceType) -> Self {
        self.root_device_type = ::std::option::Option::Some(input);
        self
    }
    /// <p>The instance's root device type. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ComponentsAMIs.html#storage-for-the-root-device">Storage for the Root Device</a>.</p>
    pub fn set_root_device_type(mut self, input: ::std::option::Option<crate::types::RootDeviceType>) -> Self {
        self.root_device_type = input;
        self
    }
    /// <p>The instance's root device type. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ComponentsAMIs.html#storage-for-the-root-device">Storage for the Root Device</a>.</p>
    pub fn get_root_device_type(&self) -> &::std::option::Option<crate::types::RootDeviceType> {
        &self.root_device_type
    }
    /// <p>The root device volume ID.</p>
    pub fn root_device_volume_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.root_device_volume_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The root device volume ID.</p>
    pub fn set_root_device_volume_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.root_device_volume_id = input;
        self
    }
    /// <p>The root device volume ID.</p>
    pub fn get_root_device_volume_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.root_device_volume_id
    }
    /// Appends an item to `security_group_ids`.
    ///
    /// To override the contents of this collection use [`set_security_group_ids`](Self::set_security_group_ids).
    ///
    /// <p>An array containing the instance security group IDs.</p>
    pub fn security_group_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.security_group_ids.unwrap_or_default();
        v.push(input.into());
        self.security_group_ids = ::std::option::Option::Some(v);
        self
    }
    /// <p>An array containing the instance security group IDs.</p>
    pub fn set_security_group_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.security_group_ids = input;
        self
    }
    /// <p>An array containing the instance security group IDs.</p>
    pub fn get_security_group_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.security_group_ids
    }
    /// <p>The SSH key's Deep Security Agent (DSA) fingerprint.</p>
    pub fn ssh_host_dsa_key_fingerprint(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.ssh_host_dsa_key_fingerprint = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The SSH key's Deep Security Agent (DSA) fingerprint.</p>
    pub fn set_ssh_host_dsa_key_fingerprint(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.ssh_host_dsa_key_fingerprint = input;
        self
    }
    /// <p>The SSH key's Deep Security Agent (DSA) fingerprint.</p>
    pub fn get_ssh_host_dsa_key_fingerprint(&self) -> &::std::option::Option<::std::string::String> {
        &self.ssh_host_dsa_key_fingerprint
    }
    /// <p>The SSH key's RSA fingerprint.</p>
    pub fn ssh_host_rsa_key_fingerprint(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.ssh_host_rsa_key_fingerprint = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The SSH key's RSA fingerprint.</p>
    pub fn set_ssh_host_rsa_key_fingerprint(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.ssh_host_rsa_key_fingerprint = input;
        self
    }
    /// <p>The SSH key's RSA fingerprint.</p>
    pub fn get_ssh_host_rsa_key_fingerprint(&self) -> &::std::option::Option<::std::string::String> {
        &self.ssh_host_rsa_key_fingerprint
    }
    /// <p>The instance's Amazon EC2 key-pair name.</p>
    pub fn ssh_key_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.ssh_key_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The instance's Amazon EC2 key-pair name.</p>
    pub fn set_ssh_key_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.ssh_key_name = input;
        self
    }
    /// <p>The instance's Amazon EC2 key-pair name.</p>
    pub fn get_ssh_key_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.ssh_key_name
    }
    /// <p>The stack ID.</p>
    pub fn stack_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.stack_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The stack ID.</p>
    pub fn set_stack_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.stack_id = input;
        self
    }
    /// <p>The stack ID.</p>
    pub fn get_stack_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.stack_id
    }
    /// <p>The instance status:</p>
    /// <ul>
    /// <li>
    /// <p><code>booting</code></p></li>
    /// <li>
    /// <p><code>connection_lost</code></p></li>
    /// <li>
    /// <p><code>online</code></p></li>
    /// <li>
    /// <p><code>pending</code></p></li>
    /// <li>
    /// <p><code>rebooting</code></p></li>
    /// <li>
    /// <p><code>requested</code></p></li>
    /// <li>
    /// <p><code>running_setup</code></p></li>
    /// <li>
    /// <p><code>setup_failed</code></p></li>
    /// <li>
    /// <p><code>shutting_down</code></p></li>
    /// <li>
    /// <p><code>start_failed</code></p></li>
    /// <li>
    /// <p><code>stop_failed</code></p></li>
    /// <li>
    /// <p><code>stopped</code></p></li>
    /// <li>
    /// <p><code>stopping</code></p></li>
    /// <li>
    /// <p><code>terminated</code></p></li>
    /// <li>
    /// <p><code>terminating</code></p></li>
    /// </ul>
    pub fn status(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.status = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The instance status:</p>
    /// <ul>
    /// <li>
    /// <p><code>booting</code></p></li>
    /// <li>
    /// <p><code>connection_lost</code></p></li>
    /// <li>
    /// <p><code>online</code></p></li>
    /// <li>
    /// <p><code>pending</code></p></li>
    /// <li>
    /// <p><code>rebooting</code></p></li>
    /// <li>
    /// <p><code>requested</code></p></li>
    /// <li>
    /// <p><code>running_setup</code></p></li>
    /// <li>
    /// <p><code>setup_failed</code></p></li>
    /// <li>
    /// <p><code>shutting_down</code></p></li>
    /// <li>
    /// <p><code>start_failed</code></p></li>
    /// <li>
    /// <p><code>stop_failed</code></p></li>
    /// <li>
    /// <p><code>stopped</code></p></li>
    /// <li>
    /// <p><code>stopping</code></p></li>
    /// <li>
    /// <p><code>terminated</code></p></li>
    /// <li>
    /// <p><code>terminating</code></p></li>
    /// </ul>
    pub fn set_status(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.status = input;
        self
    }
    /// <p>The instance status:</p>
    /// <ul>
    /// <li>
    /// <p><code>booting</code></p></li>
    /// <li>
    /// <p><code>connection_lost</code></p></li>
    /// <li>
    /// <p><code>online</code></p></li>
    /// <li>
    /// <p><code>pending</code></p></li>
    /// <li>
    /// <p><code>rebooting</code></p></li>
    /// <li>
    /// <p><code>requested</code></p></li>
    /// <li>
    /// <p><code>running_setup</code></p></li>
    /// <li>
    /// <p><code>setup_failed</code></p></li>
    /// <li>
    /// <p><code>shutting_down</code></p></li>
    /// <li>
    /// <p><code>start_failed</code></p></li>
    /// <li>
    /// <p><code>stop_failed</code></p></li>
    /// <li>
    /// <p><code>stopped</code></p></li>
    /// <li>
    /// <p><code>stopping</code></p></li>
    /// <li>
    /// <p><code>terminated</code></p></li>
    /// <li>
    /// <p><code>terminating</code></p></li>
    /// </ul>
    pub fn get_status(&self) -> &::std::option::Option<::std::string::String> {
        &self.status
    }
    /// <p>The instance's subnet ID; applicable only if the stack is running in a VPC.</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 instance's subnet ID; applicable only if the stack is running in a VPC.</p>
    pub fn set_subnet_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.subnet_id = input;
        self
    }
    /// <p>The instance's subnet ID; applicable only if the stack is running in a VPC.</p>
    pub fn get_subnet_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.subnet_id
    }
    /// <p>The instance's tenancy option, such as <code>dedicated</code> or <code>host</code>.</p>
    pub fn tenancy(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.tenancy = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The instance's tenancy option, such as <code>dedicated</code> or <code>host</code>.</p>
    pub fn set_tenancy(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.tenancy = input;
        self
    }
    /// <p>The instance's tenancy option, such as <code>dedicated</code> or <code>host</code>.</p>
    pub fn get_tenancy(&self) -> &::std::option::Option<::std::string::String> {
        &self.tenancy
    }
    /// <p>The instance's virtualization type: <code>paravirtual</code> or <code>hvm</code>.</p>
    pub fn virtualization_type(mut self, input: crate::types::VirtualizationType) -> Self {
        self.virtualization_type = ::std::option::Option::Some(input);
        self
    }
    /// <p>The instance's virtualization type: <code>paravirtual</code> or <code>hvm</code>.</p>
    pub fn set_virtualization_type(mut self, input: ::std::option::Option<crate::types::VirtualizationType>) -> Self {
        self.virtualization_type = input;
        self
    }
    /// <p>The instance's virtualization type: <code>paravirtual</code> or <code>hvm</code>.</p>
    pub fn get_virtualization_type(&self) -> &::std::option::Option<crate::types::VirtualizationType> {
        &self.virtualization_type
    }
    /// Consumes the builder and constructs a [`Instance`](crate::types::Instance).
    pub fn build(self) -> crate::types::Instance {
        crate::types::Instance {
            agent_version: self.agent_version,
            ami_id: self.ami_id,
            architecture: self.architecture,
            arn: self.arn,
            auto_scaling_type: self.auto_scaling_type,
            availability_zone: self.availability_zone,
            block_device_mappings: self.block_device_mappings,
            created_at: self.created_at,
            ebs_optimized: self.ebs_optimized,
            ec2_instance_id: self.ec2_instance_id,
            ecs_cluster_arn: self.ecs_cluster_arn,
            ecs_container_instance_arn: self.ecs_container_instance_arn,
            elastic_ip: self.elastic_ip,
            hostname: self.hostname,
            infrastructure_class: self.infrastructure_class,
            install_updates_on_boot: self.install_updates_on_boot,
            instance_id: self.instance_id,
            instance_profile_arn: self.instance_profile_arn,
            instance_type: self.instance_type,
            last_service_error_id: self.last_service_error_id,
            layer_ids: self.layer_ids,
            os: self.os,
            platform: self.platform,
            private_dns: self.private_dns,
            private_ip: self.private_ip,
            public_dns: self.public_dns,
            public_ip: self.public_ip,
            registered_by: self.registered_by,
            reported_agent_version: self.reported_agent_version,
            reported_os: self.reported_os,
            root_device_type: self.root_device_type,
            root_device_volume_id: self.root_device_volume_id,
            security_group_ids: self.security_group_ids,
            ssh_host_dsa_key_fingerprint: self.ssh_host_dsa_key_fingerprint,
            ssh_host_rsa_key_fingerprint: self.ssh_host_rsa_key_fingerprint,
            ssh_key_name: self.ssh_key_name,
            stack_id: self.stack_id,
            status: self.status,
            subnet_id: self.subnet_id,
            tenancy: self.tenancy,
            virtualization_type: self.virtualization_type,
        }
    }
}