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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>The physical capacity of the Amazon Web Services Snow Family device. </p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Capacity {
/// <p>The name of the type of capacity, such as memory.</p>
#[doc(hidden)]
pub name: std::option::Option<std::string::String>,
/// <p>The unit of measure for the type of capacity.</p>
#[doc(hidden)]
pub unit: std::option::Option<std::string::String>,
/// <p>The total capacity on the device.</p>
#[doc(hidden)]
pub total: std::option::Option<i64>,
/// <p>The amount of capacity used on the device.</p>
#[doc(hidden)]
pub used: std::option::Option<i64>,
/// <p>The amount of capacity available for use on the device.</p>
#[doc(hidden)]
pub available: std::option::Option<i64>,
}
impl Capacity {
/// <p>The name of the type of capacity, such as memory.</p>
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
/// <p>The unit of measure for the type of capacity.</p>
pub fn unit(&self) -> std::option::Option<&str> {
self.unit.as_deref()
}
/// <p>The total capacity on the device.</p>
pub fn total(&self) -> std::option::Option<i64> {
self.total
}
/// <p>The amount of capacity used on the device.</p>
pub fn used(&self) -> std::option::Option<i64> {
self.used
}
/// <p>The amount of capacity available for use on the device.</p>
pub fn available(&self) -> std::option::Option<i64> {
self.available
}
}
impl Capacity {
/// Creates a new builder-style object to manufacture [`Capacity`](crate::types::Capacity).
pub fn builder() -> crate::types::builders::CapacityBuilder {
crate::types::builders::CapacityBuilder::default()
}
}
/// A builder for [`Capacity`](crate::types::Capacity).
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct CapacityBuilder {
pub(crate) name: std::option::Option<std::string::String>,
pub(crate) unit: std::option::Option<std::string::String>,
pub(crate) total: std::option::Option<i64>,
pub(crate) used: std::option::Option<i64>,
pub(crate) available: std::option::Option<i64>,
}
impl CapacityBuilder {
/// <p>The name of the type of capacity, such as memory.</p>
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.name = Some(input.into());
self
}
/// <p>The name of the type of capacity, such as memory.</p>
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.name = input;
self
}
/// <p>The unit of measure for the type of capacity.</p>
pub fn unit(mut self, input: impl Into<std::string::String>) -> Self {
self.unit = Some(input.into());
self
}
/// <p>The unit of measure for the type of capacity.</p>
pub fn set_unit(mut self, input: std::option::Option<std::string::String>) -> Self {
self.unit = input;
self
}
/// <p>The total capacity on the device.</p>
pub fn total(mut self, input: i64) -> Self {
self.total = Some(input);
self
}
/// <p>The total capacity on the device.</p>
pub fn set_total(mut self, input: std::option::Option<i64>) -> Self {
self.total = input;
self
}
/// <p>The amount of capacity used on the device.</p>
pub fn used(mut self, input: i64) -> Self {
self.used = Some(input);
self
}
/// <p>The amount of capacity used on the device.</p>
pub fn set_used(mut self, input: std::option::Option<i64>) -> Self {
self.used = input;
self
}
/// <p>The amount of capacity available for use on the device.</p>
pub fn available(mut self, input: i64) -> Self {
self.available = Some(input);
self
}
/// <p>The amount of capacity available for use on the device.</p>
pub fn set_available(mut self, input: std::option::Option<i64>) -> Self {
self.available = input;
self
}
/// Consumes the builder and constructs a [`Capacity`](crate::types::Capacity).
pub fn build(self) -> crate::types::Capacity {
crate::types::Capacity {
name: self.name,
unit: self.unit,
total: self.total,
used: self.used,
available: self.available,
}
}
}