aws_sdk_lightsail/operation/attach_disk/_attach_disk_input.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct AttachDiskInput {
6 /// <p>The unique Lightsail disk name (<code>my-disk</code>).</p>
7 pub disk_name: ::std::option::Option<::std::string::String>,
8 /// <p>The name of the Lightsail instance where you want to utilize the storage disk.</p>
9 pub instance_name: ::std::option::Option<::std::string::String>,
10 /// <p>The disk path to expose to the instance (<code>/dev/xvdf</code>).</p>
11 pub disk_path: ::std::option::Option<::std::string::String>,
12 /// <p>A Boolean value used to determine the automatic mounting of a storage volume to a virtual computer. The default value is <code>False</code>.</p><important>
13 /// <p>This value only applies to Lightsail for Research resources.</p>
14 /// </important>
15 pub auto_mounting: ::std::option::Option<bool>,
16}
17impl AttachDiskInput {
18 /// <p>The unique Lightsail disk name (<code>my-disk</code>).</p>
19 pub fn disk_name(&self) -> ::std::option::Option<&str> {
20 self.disk_name.as_deref()
21 }
22 /// <p>The name of the Lightsail instance where you want to utilize the storage disk.</p>
23 pub fn instance_name(&self) -> ::std::option::Option<&str> {
24 self.instance_name.as_deref()
25 }
26 /// <p>The disk path to expose to the instance (<code>/dev/xvdf</code>).</p>
27 pub fn disk_path(&self) -> ::std::option::Option<&str> {
28 self.disk_path.as_deref()
29 }
30 /// <p>A Boolean value used to determine the automatic mounting of a storage volume to a virtual computer. The default value is <code>False</code>.</p><important>
31 /// <p>This value only applies to Lightsail for Research resources.</p>
32 /// </important>
33 pub fn auto_mounting(&self) -> ::std::option::Option<bool> {
34 self.auto_mounting
35 }
36}
37impl AttachDiskInput {
38 /// Creates a new builder-style object to manufacture [`AttachDiskInput`](crate::operation::attach_disk::AttachDiskInput).
39 pub fn builder() -> crate::operation::attach_disk::builders::AttachDiskInputBuilder {
40 crate::operation::attach_disk::builders::AttachDiskInputBuilder::default()
41 }
42}
43
44/// A builder for [`AttachDiskInput`](crate::operation::attach_disk::AttachDiskInput).
45#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
46#[non_exhaustive]
47pub struct AttachDiskInputBuilder {
48 pub(crate) disk_name: ::std::option::Option<::std::string::String>,
49 pub(crate) instance_name: ::std::option::Option<::std::string::String>,
50 pub(crate) disk_path: ::std::option::Option<::std::string::String>,
51 pub(crate) auto_mounting: ::std::option::Option<bool>,
52}
53impl AttachDiskInputBuilder {
54 /// <p>The unique Lightsail disk name (<code>my-disk</code>).</p>
55 /// This field is required.
56 pub fn disk_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
57 self.disk_name = ::std::option::Option::Some(input.into());
58 self
59 }
60 /// <p>The unique Lightsail disk name (<code>my-disk</code>).</p>
61 pub fn set_disk_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
62 self.disk_name = input;
63 self
64 }
65 /// <p>The unique Lightsail disk name (<code>my-disk</code>).</p>
66 pub fn get_disk_name(&self) -> &::std::option::Option<::std::string::String> {
67 &self.disk_name
68 }
69 /// <p>The name of the Lightsail instance where you want to utilize the storage disk.</p>
70 /// This field is required.
71 pub fn instance_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
72 self.instance_name = ::std::option::Option::Some(input.into());
73 self
74 }
75 /// <p>The name of the Lightsail instance where you want to utilize the storage disk.</p>
76 pub fn set_instance_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
77 self.instance_name = input;
78 self
79 }
80 /// <p>The name of the Lightsail instance where you want to utilize the storage disk.</p>
81 pub fn get_instance_name(&self) -> &::std::option::Option<::std::string::String> {
82 &self.instance_name
83 }
84 /// <p>The disk path to expose to the instance (<code>/dev/xvdf</code>).</p>
85 /// This field is required.
86 pub fn disk_path(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
87 self.disk_path = ::std::option::Option::Some(input.into());
88 self
89 }
90 /// <p>The disk path to expose to the instance (<code>/dev/xvdf</code>).</p>
91 pub fn set_disk_path(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
92 self.disk_path = input;
93 self
94 }
95 /// <p>The disk path to expose to the instance (<code>/dev/xvdf</code>).</p>
96 pub fn get_disk_path(&self) -> &::std::option::Option<::std::string::String> {
97 &self.disk_path
98 }
99 /// <p>A Boolean value used to determine the automatic mounting of a storage volume to a virtual computer. The default value is <code>False</code>.</p><important>
100 /// <p>This value only applies to Lightsail for Research resources.</p>
101 /// </important>
102 pub fn auto_mounting(mut self, input: bool) -> Self {
103 self.auto_mounting = ::std::option::Option::Some(input);
104 self
105 }
106 /// <p>A Boolean value used to determine the automatic mounting of a storage volume to a virtual computer. The default value is <code>False</code>.</p><important>
107 /// <p>This value only applies to Lightsail for Research resources.</p>
108 /// </important>
109 pub fn set_auto_mounting(mut self, input: ::std::option::Option<bool>) -> Self {
110 self.auto_mounting = input;
111 self
112 }
113 /// <p>A Boolean value used to determine the automatic mounting of a storage volume to a virtual computer. The default value is <code>False</code>.</p><important>
114 /// <p>This value only applies to Lightsail for Research resources.</p>
115 /// </important>
116 pub fn get_auto_mounting(&self) -> &::std::option::Option<bool> {
117 &self.auto_mounting
118 }
119 /// Consumes the builder and constructs a [`AttachDiskInput`](crate::operation::attach_disk::AttachDiskInput).
120 pub fn build(self) -> ::std::result::Result<crate::operation::attach_disk::AttachDiskInput, ::aws_smithy_types::error::operation::BuildError> {
121 ::std::result::Result::Ok(crate::operation::attach_disk::AttachDiskInput {
122 disk_name: self.disk_name,
123 instance_name: self.instance_name,
124 disk_path: self.disk_path,
125 auto_mounting: self.auto_mounting,
126 })
127 }
128}