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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>Represents the amount of provisioned throughput capacity consumed on a table or an index.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Capacity {
/// <p>The total number of read capacity units consumed on a table or an index.</p>
pub read_capacity_units: ::std::option::Option<f64>,
/// <p>The total number of write capacity units consumed on a table or an index.</p>
pub write_capacity_units: ::std::option::Option<f64>,
/// <p>The total number of capacity units consumed on a table or an index.</p>
pub capacity_units: ::std::option::Option<f64>,
}
impl Capacity {
/// <p>The total number of read capacity units consumed on a table or an index.</p>
pub fn read_capacity_units(&self) -> ::std::option::Option<f64> {
self.read_capacity_units
}
/// <p>The total number of write capacity units consumed on a table or an index.</p>
pub fn write_capacity_units(&self) -> ::std::option::Option<f64> {
self.write_capacity_units
}
/// <p>The total number of capacity units consumed on a table or an index.</p>
pub fn capacity_units(&self) -> ::std::option::Option<f64> {
self.capacity_units
}
}
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).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CapacityBuilder {
pub(crate) read_capacity_units: ::std::option::Option<f64>,
pub(crate) write_capacity_units: ::std::option::Option<f64>,
pub(crate) capacity_units: ::std::option::Option<f64>,
}
impl CapacityBuilder {
/// <p>The total number of read capacity units consumed on a table or an index.</p>
pub fn read_capacity_units(mut self, input: f64) -> Self {
self.read_capacity_units = ::std::option::Option::Some(input);
self
}
/// <p>The total number of read capacity units consumed on a table or an index.</p>
pub fn set_read_capacity_units(mut self, input: ::std::option::Option<f64>) -> Self {
self.read_capacity_units = input;
self
}
/// <p>The total number of read capacity units consumed on a table or an index.</p>
pub fn get_read_capacity_units(&self) -> &::std::option::Option<f64> {
&self.read_capacity_units
}
/// <p>The total number of write capacity units consumed on a table or an index.</p>
pub fn write_capacity_units(mut self, input: f64) -> Self {
self.write_capacity_units = ::std::option::Option::Some(input);
self
}
/// <p>The total number of write capacity units consumed on a table or an index.</p>
pub fn set_write_capacity_units(mut self, input: ::std::option::Option<f64>) -> Self {
self.write_capacity_units = input;
self
}
/// <p>The total number of write capacity units consumed on a table or an index.</p>
pub fn get_write_capacity_units(&self) -> &::std::option::Option<f64> {
&self.write_capacity_units
}
/// <p>The total number of capacity units consumed on a table or an index.</p>
pub fn capacity_units(mut self, input: f64) -> Self {
self.capacity_units = ::std::option::Option::Some(input);
self
}
/// <p>The total number of capacity units consumed on a table or an index.</p>
pub fn set_capacity_units(mut self, input: ::std::option::Option<f64>) -> Self {
self.capacity_units = input;
self
}
/// <p>The total number of capacity units consumed on a table or an index.</p>
pub fn get_capacity_units(&self) -> &::std::option::Option<f64> {
&self.capacity_units
}
/// Consumes the builder and constructs a [`Capacity`](crate::types::Capacity).
pub fn build(self) -> crate::types::Capacity {
crate::types::Capacity {
read_capacity_units: self.read_capacity_units,
write_capacity_units: self.write_capacity_units,
capacity_units: self.capacity_units,
}
}
}