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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct AttachDiskInput {
/// <p>The unique Lightsail disk name (<code>my-disk</code>).</p>
pub disk_name: ::std::option::Option<::std::string::String>,
/// <p>The name of the Lightsail instance where you want to utilize the storage disk.</p>
pub instance_name: ::std::option::Option<::std::string::String>,
/// <p>The disk path to expose to the instance (<code>/dev/xvdf</code>).</p>
pub disk_path: ::std::option::Option<::std::string::String>,
/// <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>
/// <p>This value only applies to Lightsail for Research resources.</p>
/// </important>
pub auto_mounting: ::std::option::Option<bool>,
}
impl AttachDiskInput {
/// <p>The unique Lightsail disk name (<code>my-disk</code>).</p>
pub fn disk_name(&self) -> ::std::option::Option<&str> {
self.disk_name.as_deref()
}
/// <p>The name of the Lightsail instance where you want to utilize the storage disk.</p>
pub fn instance_name(&self) -> ::std::option::Option<&str> {
self.instance_name.as_deref()
}
/// <p>The disk path to expose to the instance (<code>/dev/xvdf</code>).</p>
pub fn disk_path(&self) -> ::std::option::Option<&str> {
self.disk_path.as_deref()
}
/// <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>
/// <p>This value only applies to Lightsail for Research resources.</p>
/// </important>
pub fn auto_mounting(&self) -> ::std::option::Option<bool> {
self.auto_mounting
}
}
impl AttachDiskInput {
/// Creates a new builder-style object to manufacture [`AttachDiskInput`](crate::operation::attach_disk::AttachDiskInput).
pub fn builder() -> crate::operation::attach_disk::builders::AttachDiskInputBuilder {
crate::operation::attach_disk::builders::AttachDiskInputBuilder::default()
}
}
/// A builder for [`AttachDiskInput`](crate::operation::attach_disk::AttachDiskInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct AttachDiskInputBuilder {
pub(crate) disk_name: ::std::option::Option<::std::string::String>,
pub(crate) instance_name: ::std::option::Option<::std::string::String>,
pub(crate) disk_path: ::std::option::Option<::std::string::String>,
pub(crate) auto_mounting: ::std::option::Option<bool>,
}
impl AttachDiskInputBuilder {
/// <p>The unique Lightsail disk name (<code>my-disk</code>).</p>
/// This field is required.
pub fn disk_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.disk_name = ::std::option::Option::Some(input.into());
self
}
/// <p>The unique Lightsail disk name (<code>my-disk</code>).</p>
pub fn set_disk_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.disk_name = input;
self
}
/// <p>The unique Lightsail disk name (<code>my-disk</code>).</p>
pub fn get_disk_name(&self) -> &::std::option::Option<::std::string::String> {
&self.disk_name
}
/// <p>The name of the Lightsail instance where you want to utilize the storage disk.</p>
/// This field is required.
pub fn instance_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.instance_name = ::std::option::Option::Some(input.into());
self
}
/// <p>The name of the Lightsail instance where you want to utilize the storage disk.</p>
pub fn set_instance_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.instance_name = input;
self
}
/// <p>The name of the Lightsail instance where you want to utilize the storage disk.</p>
pub fn get_instance_name(&self) -> &::std::option::Option<::std::string::String> {
&self.instance_name
}
/// <p>The disk path to expose to the instance (<code>/dev/xvdf</code>).</p>
/// This field is required.
pub fn disk_path(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.disk_path = ::std::option::Option::Some(input.into());
self
}
/// <p>The disk path to expose to the instance (<code>/dev/xvdf</code>).</p>
pub fn set_disk_path(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.disk_path = input;
self
}
/// <p>The disk path to expose to the instance (<code>/dev/xvdf</code>).</p>
pub fn get_disk_path(&self) -> &::std::option::Option<::std::string::String> {
&self.disk_path
}
/// <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>
/// <p>This value only applies to Lightsail for Research resources.</p>
/// </important>
pub fn auto_mounting(mut self, input: bool) -> Self {
self.auto_mounting = ::std::option::Option::Some(input);
self
}
/// <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>
/// <p>This value only applies to Lightsail for Research resources.</p>
/// </important>
pub fn set_auto_mounting(mut self, input: ::std::option::Option<bool>) -> Self {
self.auto_mounting = input;
self
}
/// <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>
/// <p>This value only applies to Lightsail for Research resources.</p>
/// </important>
pub fn get_auto_mounting(&self) -> &::std::option::Option<bool> {
&self.auto_mounting
}
/// Consumes the builder and constructs a [`AttachDiskInput`](crate::operation::attach_disk::AttachDiskInput).
pub fn build(self) -> ::std::result::Result<crate::operation::attach_disk::AttachDiskInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::attach_disk::AttachDiskInput {
disk_name: self.disk_name,
instance_name: self.instance_name,
disk_path: self.disk_path,
auto_mounting: self.auto_mounting,
})
}
}