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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct CompleteSnapshotInput {
/// <p>The ID of the snapshot.</p>
pub snapshot_id: ::std::option::Option<::std::string::String>,
/// <p>The number of blocks that were written to the snapshot.</p>
pub changed_blocks_count: ::std::option::Option<i32>,
/// <p>An aggregated Base-64 SHA256 checksum based on the checksums of each written block.</p>
/// <p>To generate the aggregated checksum using the linear aggregation method, arrange the checksums for each written block in ascending order of their block index, concatenate them to form a single string, and then generate the checksum on the entire string using the SHA256 algorithm.</p>
pub checksum: ::std::option::Option<::std::string::String>,
/// <p>The algorithm used to generate the checksum. Currently, the only supported algorithm is <code>SHA256</code>.</p>
pub checksum_algorithm: ::std::option::Option<crate::types::ChecksumAlgorithm>,
/// <p>The aggregation method used to generate the checksum. Currently, the only supported aggregation method is <code>LINEAR</code>.</p>
pub checksum_aggregation_method: ::std::option::Option<crate::types::ChecksumAggregationMethod>,
}
impl CompleteSnapshotInput {
/// <p>The ID of the snapshot.</p>
pub fn snapshot_id(&self) -> ::std::option::Option<&str> {
self.snapshot_id.as_deref()
}
/// <p>The number of blocks that were written to the snapshot.</p>
pub fn changed_blocks_count(&self) -> ::std::option::Option<i32> {
self.changed_blocks_count
}
/// <p>An aggregated Base-64 SHA256 checksum based on the checksums of each written block.</p>
/// <p>To generate the aggregated checksum using the linear aggregation method, arrange the checksums for each written block in ascending order of their block index, concatenate them to form a single string, and then generate the checksum on the entire string using the SHA256 algorithm.</p>
pub fn checksum(&self) -> ::std::option::Option<&str> {
self.checksum.as_deref()
}
/// <p>The algorithm used to generate the checksum. Currently, the only supported algorithm is <code>SHA256</code>.</p>
pub fn checksum_algorithm(&self) -> ::std::option::Option<&crate::types::ChecksumAlgorithm> {
self.checksum_algorithm.as_ref()
}
/// <p>The aggregation method used to generate the checksum. Currently, the only supported aggregation method is <code>LINEAR</code>.</p>
pub fn checksum_aggregation_method(&self) -> ::std::option::Option<&crate::types::ChecksumAggregationMethod> {
self.checksum_aggregation_method.as_ref()
}
}
impl CompleteSnapshotInput {
/// Creates a new builder-style object to manufacture [`CompleteSnapshotInput`](crate::operation::complete_snapshot::CompleteSnapshotInput).
pub fn builder() -> crate::operation::complete_snapshot::builders::CompleteSnapshotInputBuilder {
crate::operation::complete_snapshot::builders::CompleteSnapshotInputBuilder::default()
}
}
/// A builder for [`CompleteSnapshotInput`](crate::operation::complete_snapshot::CompleteSnapshotInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CompleteSnapshotInputBuilder {
pub(crate) snapshot_id: ::std::option::Option<::std::string::String>,
pub(crate) changed_blocks_count: ::std::option::Option<i32>,
pub(crate) checksum: ::std::option::Option<::std::string::String>,
pub(crate) checksum_algorithm: ::std::option::Option<crate::types::ChecksumAlgorithm>,
pub(crate) checksum_aggregation_method: ::std::option::Option<crate::types::ChecksumAggregationMethod>,
}
impl CompleteSnapshotInputBuilder {
/// <p>The ID of the snapshot.</p>
/// This field is required.
pub fn snapshot_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.snapshot_id = ::std::option::Option::Some(input.into());
self
}
/// <p>The ID of the snapshot.</p>
pub fn set_snapshot_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.snapshot_id = input;
self
}
/// <p>The ID of the snapshot.</p>
pub fn get_snapshot_id(&self) -> &::std::option::Option<::std::string::String> {
&self.snapshot_id
}
/// <p>The number of blocks that were written to the snapshot.</p>
/// This field is required.
pub fn changed_blocks_count(mut self, input: i32) -> Self {
self.changed_blocks_count = ::std::option::Option::Some(input);
self
}
/// <p>The number of blocks that were written to the snapshot.</p>
pub fn set_changed_blocks_count(mut self, input: ::std::option::Option<i32>) -> Self {
self.changed_blocks_count = input;
self
}
/// <p>The number of blocks that were written to the snapshot.</p>
pub fn get_changed_blocks_count(&self) -> &::std::option::Option<i32> {
&self.changed_blocks_count
}
/// <p>An aggregated Base-64 SHA256 checksum based on the checksums of each written block.</p>
/// <p>To generate the aggregated checksum using the linear aggregation method, arrange the checksums for each written block in ascending order of their block index, concatenate them to form a single string, and then generate the checksum on the entire string using the SHA256 algorithm.</p>
pub fn checksum(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.checksum = ::std::option::Option::Some(input.into());
self
}
/// <p>An aggregated Base-64 SHA256 checksum based on the checksums of each written block.</p>
/// <p>To generate the aggregated checksum using the linear aggregation method, arrange the checksums for each written block in ascending order of their block index, concatenate them to form a single string, and then generate the checksum on the entire string using the SHA256 algorithm.</p>
pub fn set_checksum(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.checksum = input;
self
}
/// <p>An aggregated Base-64 SHA256 checksum based on the checksums of each written block.</p>
/// <p>To generate the aggregated checksum using the linear aggregation method, arrange the checksums for each written block in ascending order of their block index, concatenate them to form a single string, and then generate the checksum on the entire string using the SHA256 algorithm.</p>
pub fn get_checksum(&self) -> &::std::option::Option<::std::string::String> {
&self.checksum
}
/// <p>The algorithm used to generate the checksum. Currently, the only supported algorithm is <code>SHA256</code>.</p>
pub fn checksum_algorithm(mut self, input: crate::types::ChecksumAlgorithm) -> Self {
self.checksum_algorithm = ::std::option::Option::Some(input);
self
}
/// <p>The algorithm used to generate the checksum. Currently, the only supported algorithm is <code>SHA256</code>.</p>
pub fn set_checksum_algorithm(mut self, input: ::std::option::Option<crate::types::ChecksumAlgorithm>) -> Self {
self.checksum_algorithm = input;
self
}
/// <p>The algorithm used to generate the checksum. Currently, the only supported algorithm is <code>SHA256</code>.</p>
pub fn get_checksum_algorithm(&self) -> &::std::option::Option<crate::types::ChecksumAlgorithm> {
&self.checksum_algorithm
}
/// <p>The aggregation method used to generate the checksum. Currently, the only supported aggregation method is <code>LINEAR</code>.</p>
pub fn checksum_aggregation_method(mut self, input: crate::types::ChecksumAggregationMethod) -> Self {
self.checksum_aggregation_method = ::std::option::Option::Some(input);
self
}
/// <p>The aggregation method used to generate the checksum. Currently, the only supported aggregation method is <code>LINEAR</code>.</p>
pub fn set_checksum_aggregation_method(mut self, input: ::std::option::Option<crate::types::ChecksumAggregationMethod>) -> Self {
self.checksum_aggregation_method = input;
self
}
/// <p>The aggregation method used to generate the checksum. Currently, the only supported aggregation method is <code>LINEAR</code>.</p>
pub fn get_checksum_aggregation_method(&self) -> &::std::option::Option<crate::types::ChecksumAggregationMethod> {
&self.checksum_aggregation_method
}
/// Consumes the builder and constructs a [`CompleteSnapshotInput`](crate::operation::complete_snapshot::CompleteSnapshotInput).
pub fn build(
self,
) -> ::std::result::Result<crate::operation::complete_snapshot::CompleteSnapshotInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::complete_snapshot::CompleteSnapshotInput {
snapshot_id: self.snapshot_id,
changed_blocks_count: self.changed_blocks_count,
checksum: self.checksum,
checksum_algorithm: self.checksum_algorithm,
checksum_aggregation_method: self.checksum_aggregation_method,
})
}
}