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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>Describes the GPU accelerators for the instance type.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Gpu {
/// <p>The number of GPUs for the instance type.</p>
pub gpu_count: i32,
/// <p>The total size of the memory for the GPU accelerators for the instance type, in MiB.</p>
pub gpu_memory_size_in_mib: i32,
}
impl Gpu {
/// <p>The number of GPUs for the instance type.</p>
pub fn gpu_count(&self) -> i32 {
self.gpu_count
}
/// <p>The total size of the memory for the GPU accelerators for the instance type, in MiB.</p>
pub fn gpu_memory_size_in_mib(&self) -> i32 {
self.gpu_memory_size_in_mib
}
}
impl Gpu {
/// Creates a new builder-style object to manufacture [`Gpu`](crate::types::Gpu).
pub fn builder() -> crate::types::builders::GpuBuilder {
crate::types::builders::GpuBuilder::default()
}
}
/// A builder for [`Gpu`](crate::types::Gpu).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GpuBuilder {
pub(crate) gpu_count: ::std::option::Option<i32>,
pub(crate) gpu_memory_size_in_mib: ::std::option::Option<i32>,
}
impl GpuBuilder {
/// <p>The number of GPUs for the instance type.</p>
pub fn gpu_count(mut self, input: i32) -> Self {
self.gpu_count = ::std::option::Option::Some(input);
self
}
/// <p>The number of GPUs for the instance type.</p>
pub fn set_gpu_count(mut self, input: ::std::option::Option<i32>) -> Self {
self.gpu_count = input;
self
}
/// <p>The number of GPUs for the instance type.</p>
pub fn get_gpu_count(&self) -> &::std::option::Option<i32> {
&self.gpu_count
}
/// <p>The total size of the memory for the GPU accelerators for the instance type, in MiB.</p>
pub fn gpu_memory_size_in_mib(mut self, input: i32) -> Self {
self.gpu_memory_size_in_mib = ::std::option::Option::Some(input);
self
}
/// <p>The total size of the memory for the GPU accelerators for the instance type, in MiB.</p>
pub fn set_gpu_memory_size_in_mib(mut self, input: ::std::option::Option<i32>) -> Self {
self.gpu_memory_size_in_mib = input;
self
}
/// <p>The total size of the memory for the GPU accelerators for the instance type, in MiB.</p>
pub fn get_gpu_memory_size_in_mib(&self) -> &::std::option::Option<i32> {
&self.gpu_memory_size_in_mib
}
/// Consumes the builder and constructs a [`Gpu`](crate::types::Gpu).
pub fn build(self) -> crate::types::Gpu {
crate::types::Gpu {
gpu_count: self.gpu_count.unwrap_or_default(),
gpu_memory_size_in_mib: self.gpu_memory_size_in_mib.unwrap_or_default(),
}
}
}