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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>An instance type that the specified Amazon EMR release supports.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct SupportedInstanceType {
    /// <p>The <a href="http://aws.amazon.com/ec2/instance-types/">Amazon EC2 instance type</a>, for example <code>m5.xlarge</code>, of the <code>SupportedInstanceType</code>.</p>
    pub r#type: ::std::option::Option<::std::string::String>,
    /// <p>The amount of memory that is available to Amazon EMR from the <code>SupportedInstanceType</code>. The kernel and hypervisor software consume some memory, so this value might be lower than the overall memory for the instance type.</p>
    pub memory_gb: ::std::option::Option<f32>,
    /// <p><code>StorageGB</code> represents the storage capacity of the <code>SupportedInstanceType</code>. This value is <code>0</code> for Amazon EBS-only instance types.</p>
    pub storage_gb: ::std::option::Option<i32>,
    /// <p>The number of vCPUs available for the <code>SupportedInstanceType</code>.</p>
    pub vcpu: ::std::option::Option<i32>,
    /// <p>Indicates whether the <code>SupportedInstanceType</code> only supports 64-bit architecture.</p>
    pub is64_bits_only: ::std::option::Option<bool>,
    /// <p>The Amazon EC2 family and generation for the <code>SupportedInstanceType</code>.</p>
    pub instance_family_id: ::std::option::Option<::std::string::String>,
    /// <p>Indicates whether the <code>SupportedInstanceType</code> supports Amazon EBS optimization.</p>
    pub ebs_optimized_available: ::std::option::Option<bool>,
    /// <p>Indicates whether the <code>SupportedInstanceType</code> uses Amazon EBS optimization by default.</p>
    pub ebs_optimized_by_default: ::std::option::Option<bool>,
    /// <p>Number of disks for the <code>SupportedInstanceType</code>. This value is <code>0</code> for Amazon EBS-only instance types.</p>
    pub number_of_disks: ::std::option::Option<i32>,
    /// <p>Indicates whether the <code>SupportedInstanceType</code> only supports Amazon EBS.</p>
    pub ebs_storage_only: ::std::option::Option<bool>,
    /// <p>The CPU architecture, for example <code>X86_64</code> or <code>AARCH64</code>.</p>
    pub architecture: ::std::option::Option<::std::string::String>,
}
impl SupportedInstanceType {
    /// <p>The <a href="http://aws.amazon.com/ec2/instance-types/">Amazon EC2 instance type</a>, for example <code>m5.xlarge</code>, of the <code>SupportedInstanceType</code>.</p>
    pub fn r#type(&self) -> ::std::option::Option<&str> {
        self.r#type.as_deref()
    }
    /// <p>The amount of memory that is available to Amazon EMR from the <code>SupportedInstanceType</code>. The kernel and hypervisor software consume some memory, so this value might be lower than the overall memory for the instance type.</p>
    pub fn memory_gb(&self) -> ::std::option::Option<f32> {
        self.memory_gb
    }
    /// <p><code>StorageGB</code> represents the storage capacity of the <code>SupportedInstanceType</code>. This value is <code>0</code> for Amazon EBS-only instance types.</p>
    pub fn storage_gb(&self) -> ::std::option::Option<i32> {
        self.storage_gb
    }
    /// <p>The number of vCPUs available for the <code>SupportedInstanceType</code>.</p>
    pub fn vcpu(&self) -> ::std::option::Option<i32> {
        self.vcpu
    }
    /// <p>Indicates whether the <code>SupportedInstanceType</code> only supports 64-bit architecture.</p>
    pub fn is64_bits_only(&self) -> ::std::option::Option<bool> {
        self.is64_bits_only
    }
    /// <p>The Amazon EC2 family and generation for the <code>SupportedInstanceType</code>.</p>
    pub fn instance_family_id(&self) -> ::std::option::Option<&str> {
        self.instance_family_id.as_deref()
    }
    /// <p>Indicates whether the <code>SupportedInstanceType</code> supports Amazon EBS optimization.</p>
    pub fn ebs_optimized_available(&self) -> ::std::option::Option<bool> {
        self.ebs_optimized_available
    }
    /// <p>Indicates whether the <code>SupportedInstanceType</code> uses Amazon EBS optimization by default.</p>
    pub fn ebs_optimized_by_default(&self) -> ::std::option::Option<bool> {
        self.ebs_optimized_by_default
    }
    /// <p>Number of disks for the <code>SupportedInstanceType</code>. This value is <code>0</code> for Amazon EBS-only instance types.</p>
    pub fn number_of_disks(&self) -> ::std::option::Option<i32> {
        self.number_of_disks
    }
    /// <p>Indicates whether the <code>SupportedInstanceType</code> only supports Amazon EBS.</p>
    pub fn ebs_storage_only(&self) -> ::std::option::Option<bool> {
        self.ebs_storage_only
    }
    /// <p>The CPU architecture, for example <code>X86_64</code> or <code>AARCH64</code>.</p>
    pub fn architecture(&self) -> ::std::option::Option<&str> {
        self.architecture.as_deref()
    }
}
impl SupportedInstanceType {
    /// Creates a new builder-style object to manufacture [`SupportedInstanceType`](crate::types::SupportedInstanceType).
    pub fn builder() -> crate::types::builders::SupportedInstanceTypeBuilder {
        crate::types::builders::SupportedInstanceTypeBuilder::default()
    }
}

/// A builder for [`SupportedInstanceType`](crate::types::SupportedInstanceType).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct SupportedInstanceTypeBuilder {
    pub(crate) r#type: ::std::option::Option<::std::string::String>,
    pub(crate) memory_gb: ::std::option::Option<f32>,
    pub(crate) storage_gb: ::std::option::Option<i32>,
    pub(crate) vcpu: ::std::option::Option<i32>,
    pub(crate) is64_bits_only: ::std::option::Option<bool>,
    pub(crate) instance_family_id: ::std::option::Option<::std::string::String>,
    pub(crate) ebs_optimized_available: ::std::option::Option<bool>,
    pub(crate) ebs_optimized_by_default: ::std::option::Option<bool>,
    pub(crate) number_of_disks: ::std::option::Option<i32>,
    pub(crate) ebs_storage_only: ::std::option::Option<bool>,
    pub(crate) architecture: ::std::option::Option<::std::string::String>,
}
impl SupportedInstanceTypeBuilder {
    /// <p>The <a href="http://aws.amazon.com/ec2/instance-types/">Amazon EC2 instance type</a>, for example <code>m5.xlarge</code>, of the <code>SupportedInstanceType</code>.</p>
    pub fn r#type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.r#type = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The <a href="http://aws.amazon.com/ec2/instance-types/">Amazon EC2 instance type</a>, for example <code>m5.xlarge</code>, of the <code>SupportedInstanceType</code>.</p>
    pub fn set_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.r#type = input;
        self
    }
    /// <p>The <a href="http://aws.amazon.com/ec2/instance-types/">Amazon EC2 instance type</a>, for example <code>m5.xlarge</code>, of the <code>SupportedInstanceType</code>.</p>
    pub fn get_type(&self) -> &::std::option::Option<::std::string::String> {
        &self.r#type
    }
    /// <p>The amount of memory that is available to Amazon EMR from the <code>SupportedInstanceType</code>. The kernel and hypervisor software consume some memory, so this value might be lower than the overall memory for the instance type.</p>
    pub fn memory_gb(mut self, input: f32) -> Self {
        self.memory_gb = ::std::option::Option::Some(input);
        self
    }
    /// <p>The amount of memory that is available to Amazon EMR from the <code>SupportedInstanceType</code>. The kernel and hypervisor software consume some memory, so this value might be lower than the overall memory for the instance type.</p>
    pub fn set_memory_gb(mut self, input: ::std::option::Option<f32>) -> Self {
        self.memory_gb = input;
        self
    }
    /// <p>The amount of memory that is available to Amazon EMR from the <code>SupportedInstanceType</code>. The kernel and hypervisor software consume some memory, so this value might be lower than the overall memory for the instance type.</p>
    pub fn get_memory_gb(&self) -> &::std::option::Option<f32> {
        &self.memory_gb
    }
    /// <p><code>StorageGB</code> represents the storage capacity of the <code>SupportedInstanceType</code>. This value is <code>0</code> for Amazon EBS-only instance types.</p>
    pub fn storage_gb(mut self, input: i32) -> Self {
        self.storage_gb = ::std::option::Option::Some(input);
        self
    }
    /// <p><code>StorageGB</code> represents the storage capacity of the <code>SupportedInstanceType</code>. This value is <code>0</code> for Amazon EBS-only instance types.</p>
    pub fn set_storage_gb(mut self, input: ::std::option::Option<i32>) -> Self {
        self.storage_gb = input;
        self
    }
    /// <p><code>StorageGB</code> represents the storage capacity of the <code>SupportedInstanceType</code>. This value is <code>0</code> for Amazon EBS-only instance types.</p>
    pub fn get_storage_gb(&self) -> &::std::option::Option<i32> {
        &self.storage_gb
    }
    /// <p>The number of vCPUs available for the <code>SupportedInstanceType</code>.</p>
    pub fn vcpu(mut self, input: i32) -> Self {
        self.vcpu = ::std::option::Option::Some(input);
        self
    }
    /// <p>The number of vCPUs available for the <code>SupportedInstanceType</code>.</p>
    pub fn set_vcpu(mut self, input: ::std::option::Option<i32>) -> Self {
        self.vcpu = input;
        self
    }
    /// <p>The number of vCPUs available for the <code>SupportedInstanceType</code>.</p>
    pub fn get_vcpu(&self) -> &::std::option::Option<i32> {
        &self.vcpu
    }
    /// <p>Indicates whether the <code>SupportedInstanceType</code> only supports 64-bit architecture.</p>
    pub fn is64_bits_only(mut self, input: bool) -> Self {
        self.is64_bits_only = ::std::option::Option::Some(input);
        self
    }
    /// <p>Indicates whether the <code>SupportedInstanceType</code> only supports 64-bit architecture.</p>
    pub fn set_is64_bits_only(mut self, input: ::std::option::Option<bool>) -> Self {
        self.is64_bits_only = input;
        self
    }
    /// <p>Indicates whether the <code>SupportedInstanceType</code> only supports 64-bit architecture.</p>
    pub fn get_is64_bits_only(&self) -> &::std::option::Option<bool> {
        &self.is64_bits_only
    }
    /// <p>The Amazon EC2 family and generation for the <code>SupportedInstanceType</code>.</p>
    pub fn instance_family_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.instance_family_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon EC2 family and generation for the <code>SupportedInstanceType</code>.</p>
    pub fn set_instance_family_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.instance_family_id = input;
        self
    }
    /// <p>The Amazon EC2 family and generation for the <code>SupportedInstanceType</code>.</p>
    pub fn get_instance_family_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.instance_family_id
    }
    /// <p>Indicates whether the <code>SupportedInstanceType</code> supports Amazon EBS optimization.</p>
    pub fn ebs_optimized_available(mut self, input: bool) -> Self {
        self.ebs_optimized_available = ::std::option::Option::Some(input);
        self
    }
    /// <p>Indicates whether the <code>SupportedInstanceType</code> supports Amazon EBS optimization.</p>
    pub fn set_ebs_optimized_available(mut self, input: ::std::option::Option<bool>) -> Self {
        self.ebs_optimized_available = input;
        self
    }
    /// <p>Indicates whether the <code>SupportedInstanceType</code> supports Amazon EBS optimization.</p>
    pub fn get_ebs_optimized_available(&self) -> &::std::option::Option<bool> {
        &self.ebs_optimized_available
    }
    /// <p>Indicates whether the <code>SupportedInstanceType</code> uses Amazon EBS optimization by default.</p>
    pub fn ebs_optimized_by_default(mut self, input: bool) -> Self {
        self.ebs_optimized_by_default = ::std::option::Option::Some(input);
        self
    }
    /// <p>Indicates whether the <code>SupportedInstanceType</code> uses Amazon EBS optimization by default.</p>
    pub fn set_ebs_optimized_by_default(mut self, input: ::std::option::Option<bool>) -> Self {
        self.ebs_optimized_by_default = input;
        self
    }
    /// <p>Indicates whether the <code>SupportedInstanceType</code> uses Amazon EBS optimization by default.</p>
    pub fn get_ebs_optimized_by_default(&self) -> &::std::option::Option<bool> {
        &self.ebs_optimized_by_default
    }
    /// <p>Number of disks for the <code>SupportedInstanceType</code>. This value is <code>0</code> for Amazon EBS-only instance types.</p>
    pub fn number_of_disks(mut self, input: i32) -> Self {
        self.number_of_disks = ::std::option::Option::Some(input);
        self
    }
    /// <p>Number of disks for the <code>SupportedInstanceType</code>. This value is <code>0</code> for Amazon EBS-only instance types.</p>
    pub fn set_number_of_disks(mut self, input: ::std::option::Option<i32>) -> Self {
        self.number_of_disks = input;
        self
    }
    /// <p>Number of disks for the <code>SupportedInstanceType</code>. This value is <code>0</code> for Amazon EBS-only instance types.</p>
    pub fn get_number_of_disks(&self) -> &::std::option::Option<i32> {
        &self.number_of_disks
    }
    /// <p>Indicates whether the <code>SupportedInstanceType</code> only supports Amazon EBS.</p>
    pub fn ebs_storage_only(mut self, input: bool) -> Self {
        self.ebs_storage_only = ::std::option::Option::Some(input);
        self
    }
    /// <p>Indicates whether the <code>SupportedInstanceType</code> only supports Amazon EBS.</p>
    pub fn set_ebs_storage_only(mut self, input: ::std::option::Option<bool>) -> Self {
        self.ebs_storage_only = input;
        self
    }
    /// <p>Indicates whether the <code>SupportedInstanceType</code> only supports Amazon EBS.</p>
    pub fn get_ebs_storage_only(&self) -> &::std::option::Option<bool> {
        &self.ebs_storage_only
    }
    /// <p>The CPU architecture, for example <code>X86_64</code> or <code>AARCH64</code>.</p>
    pub fn architecture(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.architecture = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The CPU architecture, for example <code>X86_64</code> or <code>AARCH64</code>.</p>
    pub fn set_architecture(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.architecture = input;
        self
    }
    /// <p>The CPU architecture, for example <code>X86_64</code> or <code>AARCH64</code>.</p>
    pub fn get_architecture(&self) -> &::std::option::Option<::std::string::String> {
        &self.architecture
    }
    /// Consumes the builder and constructs a [`SupportedInstanceType`](crate::types::SupportedInstanceType).
    pub fn build(self) -> crate::types::SupportedInstanceType {
        crate::types::SupportedInstanceType {
            r#type: self.r#type,
            memory_gb: self.memory_gb,
            storage_gb: self.storage_gb,
            vcpu: self.vcpu,
            is64_bits_only: self.is64_bits_only,
            instance_family_id: self.instance_family_id,
            ebs_optimized_available: self.ebs_optimized_available,
            ebs_optimized_by_default: self.ebs_optimized_by_default,
            number_of_disks: self.number_of_disks,
            ebs_storage_only: self.ebs_storage_only,
            architecture: self.architecture,
        }
    }
}