-
Notifications
You must be signed in to change notification settings - Fork 244
/
_volume_configuration.rs
193 lines (190 loc) · 8.89 KB
/
_volume_configuration.rs
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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>Describes the configuration of an Amazon Elastic Block Store (Amazon EBS) volume.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct VolumeConfiguration {
/// <p>The volume type.</p>
/// <p>This can be <code>gp2</code> for General Purpose SSD, <code>io1</code> or <code>io2</code> for Provisioned IOPS SSD, <code>st1</code> for Throughput Optimized HDD, <code>sc1</code> for Cold HDD, or <code>standard</code> for Magnetic volumes.</p>
pub volume_type: ::std::option::Option<::std::string::String>,
/// <p>The size of the volume, in GiB.</p>
pub volume_size: i32,
/// <p>The baseline IOPS of the volume.</p>
pub volume_baseline_iops: i32,
/// <p>The burst IOPS of the volume.</p>
pub volume_burst_iops: i32,
/// <p>The baseline throughput of the volume.</p>
pub volume_baseline_throughput: i32,
/// <p>The burst throughput of the volume.</p>
pub volume_burst_throughput: i32,
/// <p>Contains the image used to boot the instance during launch.</p>
pub root_volume: ::std::option::Option<bool>,
}
impl VolumeConfiguration {
/// <p>The volume type.</p>
/// <p>This can be <code>gp2</code> for General Purpose SSD, <code>io1</code> or <code>io2</code> for Provisioned IOPS SSD, <code>st1</code> for Throughput Optimized HDD, <code>sc1</code> for Cold HDD, or <code>standard</code> for Magnetic volumes.</p>
pub fn volume_type(&self) -> ::std::option::Option<& str> {
self.volume_type.as_deref()
}
/// <p>The size of the volume, in GiB.</p>
pub fn volume_size(&self) -> i32 {
self.volume_size
}
/// <p>The baseline IOPS of the volume.</p>
pub fn volume_baseline_iops(&self) -> i32 {
self.volume_baseline_iops
}
/// <p>The burst IOPS of the volume.</p>
pub fn volume_burst_iops(&self) -> i32 {
self.volume_burst_iops
}
/// <p>The baseline throughput of the volume.</p>
pub fn volume_baseline_throughput(&self) -> i32 {
self.volume_baseline_throughput
}
/// <p>The burst throughput of the volume.</p>
pub fn volume_burst_throughput(&self) -> i32 {
self.volume_burst_throughput
}
/// <p>Contains the image used to boot the instance during launch.</p>
pub fn root_volume(&self) -> ::std::option::Option<bool> {
self.root_volume
}
}
impl VolumeConfiguration {
/// Creates a new builder-style object to manufacture [`VolumeConfiguration`](crate::types::VolumeConfiguration).
pub fn builder() -> crate::types::builders::VolumeConfigurationBuilder {
crate::types::builders::VolumeConfigurationBuilder::default()
}
}
/// A builder for [`VolumeConfiguration`](crate::types::VolumeConfiguration).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct VolumeConfigurationBuilder {
pub(crate) volume_type: ::std::option::Option<::std::string::String>,
pub(crate) volume_size: ::std::option::Option<i32>,
pub(crate) volume_baseline_iops: ::std::option::Option<i32>,
pub(crate) volume_burst_iops: ::std::option::Option<i32>,
pub(crate) volume_baseline_throughput: ::std::option::Option<i32>,
pub(crate) volume_burst_throughput: ::std::option::Option<i32>,
pub(crate) root_volume: ::std::option::Option<bool>,
}
impl VolumeConfigurationBuilder {
/// <p>The volume type.</p>
/// <p>This can be <code>gp2</code> for General Purpose SSD, <code>io1</code> or <code>io2</code> for Provisioned IOPS SSD, <code>st1</code> for Throughput Optimized HDD, <code>sc1</code> for Cold HDD, or <code>standard</code> for Magnetic volumes.</p>
pub fn volume_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.volume_type = ::std::option::Option::Some(input.into());
self
}
/// <p>The volume type.</p>
/// <p>This can be <code>gp2</code> for General Purpose SSD, <code>io1</code> or <code>io2</code> for Provisioned IOPS SSD, <code>st1</code> for Throughput Optimized HDD, <code>sc1</code> for Cold HDD, or <code>standard</code> for Magnetic volumes.</p>
pub fn set_volume_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.volume_type = input; self
}
/// <p>The volume type.</p>
/// <p>This can be <code>gp2</code> for General Purpose SSD, <code>io1</code> or <code>io2</code> for Provisioned IOPS SSD, <code>st1</code> for Throughput Optimized HDD, <code>sc1</code> for Cold HDD, or <code>standard</code> for Magnetic volumes.</p>
pub fn get_volume_type(&self) -> &::std::option::Option<::std::string::String> {
&self.volume_type
}
/// <p>The size of the volume, in GiB.</p>
pub fn volume_size(mut self, input: i32) -> Self {
self.volume_size = ::std::option::Option::Some(input);
self
}
/// <p>The size of the volume, in GiB.</p>
pub fn set_volume_size(mut self, input: ::std::option::Option<i32>) -> Self {
self.volume_size = input; self
}
/// <p>The size of the volume, in GiB.</p>
pub fn get_volume_size(&self) -> &::std::option::Option<i32> {
&self.volume_size
}
/// <p>The baseline IOPS of the volume.</p>
pub fn volume_baseline_iops(mut self, input: i32) -> Self {
self.volume_baseline_iops = ::std::option::Option::Some(input);
self
}
/// <p>The baseline IOPS of the volume.</p>
pub fn set_volume_baseline_iops(mut self, input: ::std::option::Option<i32>) -> Self {
self.volume_baseline_iops = input; self
}
/// <p>The baseline IOPS of the volume.</p>
pub fn get_volume_baseline_iops(&self) -> &::std::option::Option<i32> {
&self.volume_baseline_iops
}
/// <p>The burst IOPS of the volume.</p>
pub fn volume_burst_iops(mut self, input: i32) -> Self {
self.volume_burst_iops = ::std::option::Option::Some(input);
self
}
/// <p>The burst IOPS of the volume.</p>
pub fn set_volume_burst_iops(mut self, input: ::std::option::Option<i32>) -> Self {
self.volume_burst_iops = input; self
}
/// <p>The burst IOPS of the volume.</p>
pub fn get_volume_burst_iops(&self) -> &::std::option::Option<i32> {
&self.volume_burst_iops
}
/// <p>The baseline throughput of the volume.</p>
pub fn volume_baseline_throughput(mut self, input: i32) -> Self {
self.volume_baseline_throughput = ::std::option::Option::Some(input);
self
}
/// <p>The baseline throughput of the volume.</p>
pub fn set_volume_baseline_throughput(mut self, input: ::std::option::Option<i32>) -> Self {
self.volume_baseline_throughput = input; self
}
/// <p>The baseline throughput of the volume.</p>
pub fn get_volume_baseline_throughput(&self) -> &::std::option::Option<i32> {
&self.volume_baseline_throughput
}
/// <p>The burst throughput of the volume.</p>
pub fn volume_burst_throughput(mut self, input: i32) -> Self {
self.volume_burst_throughput = ::std::option::Option::Some(input);
self
}
/// <p>The burst throughput of the volume.</p>
pub fn set_volume_burst_throughput(mut self, input: ::std::option::Option<i32>) -> Self {
self.volume_burst_throughput = input; self
}
/// <p>The burst throughput of the volume.</p>
pub fn get_volume_burst_throughput(&self) -> &::std::option::Option<i32> {
&self.volume_burst_throughput
}
/// <p>Contains the image used to boot the instance during launch.</p>
pub fn root_volume(mut self, input: bool) -> Self {
self.root_volume = ::std::option::Option::Some(input);
self
}
/// <p>Contains the image used to boot the instance during launch.</p>
pub fn set_root_volume(mut self, input: ::std::option::Option<bool>) -> Self {
self.root_volume = input; self
}
/// <p>Contains the image used to boot the instance during launch.</p>
pub fn get_root_volume(&self) -> &::std::option::Option<bool> {
&self.root_volume
}
/// Consumes the builder and constructs a [`VolumeConfiguration`](crate::types::VolumeConfiguration).
pub fn build(self) -> crate::types::VolumeConfiguration {
crate::types::VolumeConfiguration {
volume_type: self.volume_type
,
volume_size: self.volume_size
.unwrap_or_default()
,
volume_baseline_iops: self.volume_baseline_iops
.unwrap_or_default()
,
volume_burst_iops: self.volume_burst_iops
.unwrap_or_default()
,
volume_baseline_throughput: self.volume_baseline_throughput
.unwrap_or_default()
,
volume_burst_throughput: self.volume_burst_throughput
.unwrap_or_default()
,
root_volume: self.root_volume
,
}
}
}