1 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
|
2 + | /* StructureGenerator.kt:197 */
|
2 3 | #[allow(missing_docs)] // documentation missing in model
|
4 + | /* RustType.kt:516 */
|
3 5 | #[non_exhaustive]
|
4 - | pub struct PutSnapshotBlockInput {
|
5 - | /// <p>The ID of the snapshot.</p>
|
6 + | pub /* StructureGenerator.kt:201 */ struct PutSnapshotBlockInput {
|
7 + | /// /* StructureGenerator.kt:231 */<p>The ID of the snapshot.</p>
|
6 8 | pub snapshot_id: ::std::option::Option<::std::string::String>,
|
7 - | /// <p>The block index of the block in which to write the data. A block index is a logical index in units of <code>512</code> KiB blocks. To identify the block index, divide the logical offset of the data in the logical volume by the block size (logical offset of data/<code>524288</code>). The logical offset of the data must be <code>512</code> KiB aligned.</p>
|
9 + | /// /* StructureGenerator.kt:231 */<p>The block index of the block in which to write the data. A block index is a logical index in units of <code>512</code> KiB blocks. To identify the block index, divide the logical offset of the data in the logical volume by the block size (logical offset of data/<code>524288</code>). The logical offset of the data must be <code>512</code> KiB aligned.</p>
|
8 10 | pub block_index: ::std::option::Option<i32>,
|
9 - | /// <p>A Base64-encoded SHA256 checksum of the data. Only SHA256 checksums are supported.</p>
|
11 + | /// /* StructureGenerator.kt:231 */<p>A Base64-encoded SHA256 checksum of the data. Only SHA256 checksums are supported.</p>
|
10 12 | pub checksum: ::std::option::Option<::std::string::String>,
|
11 - | /// <p>The progress of the write process, as a percentage.</p>
|
13 + | /// /* StructureGenerator.kt:231 */<p>The progress of the write process, as a percentage.</p>
|
12 14 | pub progress: ::std::option::Option<i32>,
|
13 - | /// <p>The data to write to the block.</p>
|
15 + | /// /* StructureGenerator.kt:231 */<p>The data to write to the block.</p>
|
14 16 | /// <p>The block data is not signed as part of the Signature Version 4 signing process. As a result, you must generate and provide a Base64-encoded SHA256 checksum for the block data using the <b>x-amz-Checksum</b> header. Also, you must specify the checksum algorithm using the <b>x-amz-Checksum-Algorithm</b> header. The checksum that you provide is part of the Signature Version 4 signing process. It is validated against a checksum generated by Amazon EBS to ensure the validity and authenticity of the data. If the checksums do not correspond, the request fails. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-accessing-snapshot.html#ebsapis-using-checksums"> Using checksums with the EBS direct APIs</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
|
15 17 | pub block_data: ::aws_smithy_types::byte_stream::ByteStream,
|
16 - | /// <p>The size of the data to write to the block, in bytes. Currently, the only supported size is <code>524288</code>.</p>
|
18 + | /// /* StructureGenerator.kt:231 */<p>The size of the data to write to the block, in bytes. Currently, the only supported size is <code>524288</code>.</p>
|
17 19 | /// <p>Valid values: <code>524288</code></p>
|
18 20 | pub data_length: ::std::option::Option<i32>,
|
19 - | /// <p>The algorithm used to generate the checksum. Currently, the only supported algorithm is <code>SHA256</code>.</p>
|
21 + | /// /* StructureGenerator.kt:231 */<p>The algorithm used to generate the checksum. Currently, the only supported algorithm is <code>SHA256</code>.</p>
|
20 22 | pub checksum_algorithm: ::std::option::Option<crate::types::ChecksumAlgorithm>,
|
23 + | /* StructureGenerator.kt:201 */
|
21 24 | }
|
25 + | /* StructureGenerator.kt:135 */
|
22 26 | impl PutSnapshotBlockInput {
|
23 - | /// <p>The ID of the snapshot.</p>
|
27 + | /// /* StructureGenerator.kt:231 */<p>The ID of the snapshot.</p>
|
28 + | /* StructureGenerator.kt:166 */
|
24 29 | pub fn snapshot_id(&self) -> ::std::option::Option<&str> {
|
30 + | /* StructureGenerator.kt:169 */
|
25 31 | self.snapshot_id.as_deref()
|
32 + | /* StructureGenerator.kt:166 */
|
26 33 | }
|
27 - | /// <p>The block index of the block in which to write the data. A block index is a logical index in units of <code>512</code> KiB blocks. To identify the block index, divide the logical offset of the data in the logical volume by the block size (logical offset of data/<code>524288</code>). The logical offset of the data must be <code>512</code> KiB aligned.</p>
|
34 + | /// /* StructureGenerator.kt:231 */<p>The block index of the block in which to write the data. A block index is a logical index in units of <code>512</code> KiB blocks. To identify the block index, divide the logical offset of the data in the logical volume by the block size (logical offset of data/<code>524288</code>). The logical offset of the data must be <code>512</code> KiB aligned.</p>
|
35 + | /* StructureGenerator.kt:166 */
|
28 36 | pub fn block_index(&self) -> ::std::option::Option<i32> {
|
37 + | /* StructureGenerator.kt:168 */
|
29 38 | self.block_index
|
39 + | /* StructureGenerator.kt:166 */
|
30 40 | }
|
31 - | /// <p>A Base64-encoded SHA256 checksum of the data. Only SHA256 checksums are supported.</p>
|
41 + | /// /* StructureGenerator.kt:231 */<p>A Base64-encoded SHA256 checksum of the data. Only SHA256 checksums are supported.</p>
|
42 + | /* StructureGenerator.kt:166 */
|
32 43 | pub fn checksum(&self) -> ::std::option::Option<&str> {
|
44 + | /* StructureGenerator.kt:169 */
|
33 45 | self.checksum.as_deref()
|
46 + | /* StructureGenerator.kt:166 */
|
34 47 | }
|
35 - | /// <p>The progress of the write process, as a percentage.</p>
|
48 + | /// /* StructureGenerator.kt:231 */<p>The progress of the write process, as a percentage.</p>
|
49 + | /* StructureGenerator.kt:166 */
|
36 50 | pub fn progress(&self) -> ::std::option::Option<i32> {
|
51 + | /* StructureGenerator.kt:168 */
|
37 52 | self.progress
|
53 + | /* StructureGenerator.kt:166 */
|
38 54 | }
|
39 - | /// <p>The data to write to the block.</p>
|
55 + | /// /* StructureGenerator.kt:231 */<p>The data to write to the block.</p>
|
40 56 | /// <p>The block data is not signed as part of the Signature Version 4 signing process. As a result, you must generate and provide a Base64-encoded SHA256 checksum for the block data using the <b>x-amz-Checksum</b> header. Also, you must specify the checksum algorithm using the <b>x-amz-Checksum-Algorithm</b> header. The checksum that you provide is part of the Signature Version 4 signing process. It is validated against a checksum generated by Amazon EBS to ensure the validity and authenticity of the data. If the checksums do not correspond, the request fails. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-accessing-snapshot.html#ebsapis-using-checksums"> Using checksums with the EBS direct APIs</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
|
57 + | /* StructureGenerator.kt:166 */
|
41 58 | pub fn block_data(&self) -> &::aws_smithy_types::byte_stream::ByteStream {
|
59 + | /* StructureGenerator.kt:172 */
|
42 60 | &self.block_data
|
61 + | /* StructureGenerator.kt:166 */
|
43 62 | }
|
44 - | /// <p>The size of the data to write to the block, in bytes. Currently, the only supported size is <code>524288</code>.</p>
|
63 + | /// /* StructureGenerator.kt:231 */<p>The size of the data to write to the block, in bytes. Currently, the only supported size is <code>524288</code>.</p>
|
45 64 | /// <p>Valid values: <code>524288</code></p>
|
65 + | /* StructureGenerator.kt:166 */
|
46 66 | pub fn data_length(&self) -> ::std::option::Option<i32> {
|
67 + | /* StructureGenerator.kt:168 */
|
47 68 | self.data_length
|
69 + | /* StructureGenerator.kt:166 */
|
48 70 | }
|
49 - | /// <p>The algorithm used to generate the checksum. Currently, the only supported algorithm is <code>SHA256</code>.</p>
|
71 + | /// /* StructureGenerator.kt:231 */<p>The algorithm used to generate the checksum. Currently, the only supported algorithm is <code>SHA256</code>.</p>
|
72 + | /* StructureGenerator.kt:166 */
|
50 73 | pub fn checksum_algorithm(&self) -> ::std::option::Option<&crate::types::ChecksumAlgorithm> {
|
74 + | /* StructureGenerator.kt:170 */
|
51 75 | self.checksum_algorithm.as_ref()
|
76 + | /* StructureGenerator.kt:166 */
|
52 77 | }
|
78 + | /* StructureGenerator.kt:135 */
|
53 79 | }
|
80 + | /* StructureGenerator.kt:101 */
|
54 81 | impl ::std::fmt::Debug for PutSnapshotBlockInput {
|
82 + | /* StructureGenerator.kt:105 */
|
55 83 | fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
|
84 + | /* StructureGenerator.kt:106 */
|
56 85 | let mut formatter = f.debug_struct("PutSnapshotBlockInput");
|
86 + | /* StructureGenerator.kt:121 */
|
57 87 | formatter.field("snapshot_id", &self.snapshot_id);
|
88 + | /* StructureGenerator.kt:121 */
|
58 89 | formatter.field("block_index", &self.block_index);
|
90 + | /* StructureGenerator.kt:121 */
|
59 91 | formatter.field("checksum", &self.checksum);
|
92 + | /* StructureGenerator.kt:121 */
|
60 93 | formatter.field("progress", &self.progress);
|
94 + | /* StructureGenerator.kt:121 */
|
61 95 | formatter.field("block_data", &"*** Sensitive Data Redacted ***");
|
96 + | /* StructureGenerator.kt:121 */
|
62 97 | formatter.field("data_length", &self.data_length);
|
98 + | /* StructureGenerator.kt:121 */
|
63 99 | formatter.field("checksum_algorithm", &self.checksum_algorithm);
|
100 + | /* StructureGenerator.kt:126 */
|
64 101 | formatter.finish()
|
102 + | /* StructureGenerator.kt:105 */
|
65 103 | }
|
104 + | /* StructureGenerator.kt:101 */
|
66 105 | }
|
106 + | /* ClientCodegenVisitor.kt:237 */
|
67 107 | impl PutSnapshotBlockInput {
|
68 - | /// Creates a new builder-style object to manufacture [`PutSnapshotBlockInput`](crate::operation::put_snapshot_block::PutSnapshotBlockInput).
|
108 + | /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`PutSnapshotBlockInput`](crate::operation::put_snapshot_block::PutSnapshotBlockInput).
|
109 + | /* BuilderGenerator.kt:175 */
|
69 110 | pub fn builder() -> crate::operation::put_snapshot_block::builders::PutSnapshotBlockInputBuilder {
|
111 + | /* BuilderGenerator.kt:176 */
|
70 112 | crate::operation::put_snapshot_block::builders::PutSnapshotBlockInputBuilder::default()
|
113 + | /* BuilderGenerator.kt:175 */
|
71 114 | }
|
115 + | /* ClientCodegenVisitor.kt:237 */
|
72 116 | }
|
73 117 |
|
74 - | /// A builder for [`PutSnapshotBlockInput`](crate::operation::put_snapshot_block::PutSnapshotBlockInput).
|
118 + | /// /* BuilderGenerator.kt:342 */A builder for [`PutSnapshotBlockInput`](crate::operation::put_snapshot_block::PutSnapshotBlockInput).
|
119 + | /* RustType.kt:516 */
|
75 120 | #[derive(::std::default::Default)]
|
121 + | /* RustType.kt:516 */
|
76 122 | #[non_exhaustive]
|
123 + | /* BuilderGenerator.kt:345 */
|
77 124 | pub struct PutSnapshotBlockInputBuilder {
|
78 - | pub(crate) snapshot_id: ::std::option::Option<::std::string::String>,
|
79 - | pub(crate) block_index: ::std::option::Option<i32>,
|
80 - | pub(crate) checksum: ::std::option::Option<::std::string::String>,
|
81 - | pub(crate) progress: ::std::option::Option<i32>,
|
82 - | pub(crate) block_data: ::std::option::Option<::aws_smithy_types::byte_stream::ByteStream>,
|
83 - | pub(crate) data_length: ::std::option::Option<i32>,
|
125 + | /* BuilderGenerator.kt:275 */ pub(crate) snapshot_id: ::std::option::Option<::std::string::String>,
|
126 + | /* BuilderGenerator.kt:275 */ pub(crate) block_index: ::std::option::Option<i32>,
|
127 + | /* BuilderGenerator.kt:275 */ pub(crate) checksum: ::std::option::Option<::std::string::String>,
|
128 + | /* BuilderGenerator.kt:275 */ pub(crate) progress: ::std::option::Option<i32>,
|
129 + | /* BuilderGenerator.kt:275 */ pub(crate) block_data: ::std::option::Option<::aws_smithy_types::byte_stream::ByteStream>,
|
130 + | /* BuilderGenerator.kt:275 */ pub(crate) data_length: ::std::option::Option<i32>,
|
131 + | /* BuilderGenerator.kt:275 */
|
84 132 | pub(crate) checksum_algorithm: ::std::option::Option<crate::types::ChecksumAlgorithm>,
|
133 + | /* BuilderGenerator.kt:345 */
|
85 134 | }
|
135 + | /* BuilderGenerator.kt:355 */
|
86 136 | impl PutSnapshotBlockInputBuilder {
|
87 - | /// <p>The ID of the snapshot.</p>
|
88 - | /// This field is required.
|
137 + | /// /* BuilderGenerator.kt:286 */<p>The ID of the snapshot.</p>
|
138 + | /// /* BuilderGenerator.kt:288 */This field is required.
|
139 + | /* BuilderGenerator.kt:291 */
|
89 140 | pub fn snapshot_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
141 + | /* BuilderGenerator.kt:292 */
|
90 142 | self.snapshot_id = ::std::option::Option::Some(input.into());
|
143 + | /* BuilderGenerator.kt:293 */
|
91 144 | self
|
145 + | /* BuilderGenerator.kt:291 */
|
92 146 | }
|
93 - | /// <p>The ID of the snapshot.</p>
|
147 + | /// /* BuilderGenerator.kt:312 */<p>The ID of the snapshot.</p>
|
148 + | /* BuilderGenerator.kt:314 */
|
94 149 | pub fn set_snapshot_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
150 + | /* BuilderGenerator.kt:315 */
|
95 151 | self.snapshot_id = input;
|
96 152 | self
|
153 + | /* BuilderGenerator.kt:314 */
|
97 154 | }
|
98 - | /// <p>The ID of the snapshot.</p>
|
155 + | /// /* BuilderGenerator.kt:334 */<p>The ID of the snapshot.</p>
|
156 + | /* BuilderGenerator.kt:336 */
|
99 157 | pub fn get_snapshot_id(&self) -> &::std::option::Option<::std::string::String> {
|
158 + | /* BuilderGenerator.kt:337 */
|
100 159 | &self.snapshot_id
|
160 + | /* BuilderGenerator.kt:336 */
|
101 161 | }
|
102 - | /// <p>The block index of the block in which to write the data. A block index is a logical index in units of <code>512</code> KiB blocks. To identify the block index, divide the logical offset of the data in the logical volume by the block size (logical offset of data/<code>524288</code>). The logical offset of the data must be <code>512</code> KiB aligned.</p>
|
103 - | /// This field is required.
|
162 + | /// /* BuilderGenerator.kt:286 */<p>The block index of the block in which to write the data. A block index is a logical index in units of <code>512</code> KiB blocks. To identify the block index, divide the logical offset of the data in the logical volume by the block size (logical offset of data/<code>524288</code>). The logical offset of the data must be <code>512</code> KiB aligned.</p>
|
163 + | /// /* BuilderGenerator.kt:288 */This field is required.
|
164 + | /* BuilderGenerator.kt:291 */
|
104 165 | pub fn block_index(mut self, input: i32) -> Self {
|
166 + | /* BuilderGenerator.kt:292 */
|
105 167 | self.block_index = ::std::option::Option::Some(input);
|
168 + | /* BuilderGenerator.kt:293 */
|
106 169 | self
|
170 + | /* BuilderGenerator.kt:291 */
|
107 171 | }
|
108 - | /// <p>The block index of the block in which to write the data. A block index is a logical index in units of <code>512</code> KiB blocks. To identify the block index, divide the logical offset of the data in the logical volume by the block size (logical offset of data/<code>524288</code>). The logical offset of the data must be <code>512</code> KiB aligned.</p>
|
172 + | /// /* BuilderGenerator.kt:312 */<p>The block index of the block in which to write the data. A block index is a logical index in units of <code>512</code> KiB blocks. To identify the block index, divide the logical offset of the data in the logical volume by the block size (logical offset of data/<code>524288</code>). The logical offset of the data must be <code>512</code> KiB aligned.</p>
|
173 + | /* BuilderGenerator.kt:314 */
|
109 174 | pub fn set_block_index(mut self, input: ::std::option::Option<i32>) -> Self {
|
175 + | /* BuilderGenerator.kt:315 */
|
110 176 | self.block_index = input;
|
111 177 | self
|
178 + | /* BuilderGenerator.kt:314 */
|
112 179 | }
|
113 - | /// <p>The block index of the block in which to write the data. A block index is a logical index in units of <code>512</code> KiB blocks. To identify the block index, divide the logical offset of the data in the logical volume by the block size (logical offset of data/<code>524288</code>). The logical offset of the data must be <code>512</code> KiB aligned.</p>
|
180 + | /// /* BuilderGenerator.kt:334 */<p>The block index of the block in which to write the data. A block index is a logical index in units of <code>512</code> KiB blocks. To identify the block index, divide the logical offset of the data in the logical volume by the block size (logical offset of data/<code>524288</code>). The logical offset of the data must be <code>512</code> KiB aligned.</p>
|
181 + | /* BuilderGenerator.kt:336 */
|
114 182 | pub fn get_block_index(&self) -> &::std::option::Option<i32> {
|
183 + | /* BuilderGenerator.kt:337 */
|
115 184 | &self.block_index
|
185 + | /* BuilderGenerator.kt:336 */
|
116 186 | }
|
117 - | /// <p>A Base64-encoded SHA256 checksum of the data. Only SHA256 checksums are supported.</p>
|
118 - | /// This field is required.
|
187 + | /// /* BuilderGenerator.kt:286 */<p>A Base64-encoded SHA256 checksum of the data. Only SHA256 checksums are supported.</p>
|
188 + | /// /* BuilderGenerator.kt:288 */This field is required.
|
189 + | /* BuilderGenerator.kt:291 */
|
119 190 | pub fn checksum(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
191 + | /* BuilderGenerator.kt:292 */
|
120 192 | self.checksum = ::std::option::Option::Some(input.into());
|
193 + | /* BuilderGenerator.kt:293 */
|
121 194 | self
|
195 + | /* BuilderGenerator.kt:291 */
|
122 196 | }
|
123 - | /// <p>A Base64-encoded SHA256 checksum of the data. Only SHA256 checksums are supported.</p>
|
197 + | /// /* BuilderGenerator.kt:312 */<p>A Base64-encoded SHA256 checksum of the data. Only SHA256 checksums are supported.</p>
|
198 + | /* BuilderGenerator.kt:314 */
|
124 199 | pub fn set_checksum(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
200 + | /* BuilderGenerator.kt:315 */
|
125 201 | self.checksum = input;
|
126 202 | self
|
203 + | /* BuilderGenerator.kt:314 */
|
127 204 | }
|
128 - | /// <p>A Base64-encoded SHA256 checksum of the data. Only SHA256 checksums are supported.</p>
|
205 + | /// /* BuilderGenerator.kt:334 */<p>A Base64-encoded SHA256 checksum of the data. Only SHA256 checksums are supported.</p>
|
206 + | /* BuilderGenerator.kt:336 */
|
129 207 | pub fn get_checksum(&self) -> &::std::option::Option<::std::string::String> {
|
208 + | /* BuilderGenerator.kt:337 */
|
130 209 | &self.checksum
|
210 + | /* BuilderGenerator.kt:336 */
|
131 211 | }
|
132 - | /// <p>The progress of the write process, as a percentage.</p>
|
212 + | /// /* BuilderGenerator.kt:286 */<p>The progress of the write process, as a percentage.</p>
|
213 + | /* BuilderGenerator.kt:291 */
|
133 214 | pub fn progress(mut self, input: i32) -> Self {
|
215 + | /* BuilderGenerator.kt:292 */
|
134 216 | self.progress = ::std::option::Option::Some(input);
|
217 + | /* BuilderGenerator.kt:293 */
|
135 218 | self
|
219 + | /* BuilderGenerator.kt:291 */
|
136 220 | }
|
137 - | /// <p>The progress of the write process, as a percentage.</p>
|
221 + | /// /* BuilderGenerator.kt:312 */<p>The progress of the write process, as a percentage.</p>
|
222 + | /* BuilderGenerator.kt:314 */
|
138 223 | pub fn set_progress(mut self, input: ::std::option::Option<i32>) -> Self {
|
224 + | /* BuilderGenerator.kt:315 */
|
139 225 | self.progress = input;
|
140 226 | self
|
227 + | /* BuilderGenerator.kt:314 */
|
141 228 | }
|
142 - | /// <p>The progress of the write process, as a percentage.</p>
|
229 + | /// /* BuilderGenerator.kt:334 */<p>The progress of the write process, as a percentage.</p>
|
230 + | /* BuilderGenerator.kt:336 */
|
143 231 | pub fn get_progress(&self) -> &::std::option::Option<i32> {
|
232 + | /* BuilderGenerator.kt:337 */
|
144 233 | &self.progress
|
234 + | /* BuilderGenerator.kt:336 */
|
145 235 | }
|
146 - | /// <p>The data to write to the block.</p>
|
236 + | /// /* BuilderGenerator.kt:286 */<p>The data to write to the block.</p>
|
147 237 | /// <p>The block data is not signed as part of the Signature Version 4 signing process. As a result, you must generate and provide a Base64-encoded SHA256 checksum for the block data using the <b>x-amz-Checksum</b> header. Also, you must specify the checksum algorithm using the <b>x-amz-Checksum-Algorithm</b> header. The checksum that you provide is part of the Signature Version 4 signing process. It is validated against a checksum generated by Amazon EBS to ensure the validity and authenticity of the data. If the checksums do not correspond, the request fails. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-accessing-snapshot.html#ebsapis-using-checksums"> Using checksums with the EBS direct APIs</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
|
148 - | /// This field is required.
|
238 + | /// /* BuilderGenerator.kt:288 */This field is required.
|
239 + | /* BuilderGenerator.kt:291 */
|
149 240 | pub fn block_data(mut self, input: ::aws_smithy_types::byte_stream::ByteStream) -> Self {
|
241 + | /* BuilderGenerator.kt:292 */
|
150 242 | self.block_data = ::std::option::Option::Some(input);
|
243 + | /* BuilderGenerator.kt:293 */
|
151 244 | self
|
245 + | /* BuilderGenerator.kt:291 */
|
152 246 | }
|
153 - | /// <p>The data to write to the block.</p>
|
247 + | /// /* BuilderGenerator.kt:312 */<p>The data to write to the block.</p>
|
154 248 | /// <p>The block data is not signed as part of the Signature Version 4 signing process. As a result, you must generate and provide a Base64-encoded SHA256 checksum for the block data using the <b>x-amz-Checksum</b> header. Also, you must specify the checksum algorithm using the <b>x-amz-Checksum-Algorithm</b> header. The checksum that you provide is part of the Signature Version 4 signing process. It is validated against a checksum generated by Amazon EBS to ensure the validity and authenticity of the data. If the checksums do not correspond, the request fails. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-accessing-snapshot.html#ebsapis-using-checksums"> Using checksums with the EBS direct APIs</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
|
249 + | /* BuilderGenerator.kt:314 */
|
155 250 | pub fn set_block_data(mut self, input: ::std::option::Option<::aws_smithy_types::byte_stream::ByteStream>) -> Self {
|
251 + | /* BuilderGenerator.kt:315 */
|
156 252 | self.block_data = input;
|
157 253 | self
|
254 + | /* BuilderGenerator.kt:314 */
|
158 255 | }
|
159 - | /// <p>The data to write to the block.</p>
|
256 + | /// /* BuilderGenerator.kt:334 */<p>The data to write to the block.</p>
|
160 257 | /// <p>The block data is not signed as part of the Signature Version 4 signing process. As a result, you must generate and provide a Base64-encoded SHA256 checksum for the block data using the <b>x-amz-Checksum</b> header. Also, you must specify the checksum algorithm using the <b>x-amz-Checksum-Algorithm</b> header. The checksum that you provide is part of the Signature Version 4 signing process. It is validated against a checksum generated by Amazon EBS to ensure the validity and authenticity of the data. If the checksums do not correspond, the request fails. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-accessing-snapshot.html#ebsapis-using-checksums"> Using checksums with the EBS direct APIs</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
|
258 + | /* BuilderGenerator.kt:336 */
|
161 259 | pub fn get_block_data(&self) -> &::std::option::Option<::aws_smithy_types::byte_stream::ByteStream> {
|
260 + | /* BuilderGenerator.kt:337 */
|
162 261 | &self.block_data
|
262 + | /* BuilderGenerator.kt:336 */
|
163 263 | }
|
164 - | /// <p>The size of the data to write to the block, in bytes. Currently, the only supported size is <code>524288</code>.</p>
|
264 + | /// /* BuilderGenerator.kt:286 */<p>The size of the data to write to the block, in bytes. Currently, the only supported size is <code>524288</code>.</p>
|
165 265 | /// <p>Valid values: <code>524288</code></p>
|
166 - | /// This field is required.
|
266 + | /// /* BuilderGenerator.kt:288 */This field is required.
|
267 + | /* BuilderGenerator.kt:291 */
|
167 268 | pub fn data_length(mut self, input: i32) -> Self {
|
269 + | /* BuilderGenerator.kt:292 */
|
168 270 | self.data_length = ::std::option::Option::Some(input);
|
271 + | /* BuilderGenerator.kt:293 */
|
169 272 | self
|
273 + | /* BuilderGenerator.kt:291 */
|
170 274 | }
|
171 - | /// <p>The size of the data to write to the block, in bytes. Currently, the only supported size is <code>524288</code>.</p>
|
275 + | /// /* BuilderGenerator.kt:312 */<p>The size of the data to write to the block, in bytes. Currently, the only supported size is <code>524288</code>.</p>
|
172 276 | /// <p>Valid values: <code>524288</code></p>
|
277 + | /* BuilderGenerator.kt:314 */
|
173 278 | pub fn set_data_length(mut self, input: ::std::option::Option<i32>) -> Self {
|
279 + | /* BuilderGenerator.kt:315 */
|
174 280 | self.data_length = input;
|
175 281 | self
|
282 + | /* BuilderGenerator.kt:314 */
|
176 283 | }
|
177 - | /// <p>The size of the data to write to the block, in bytes. Currently, the only supported size is <code>524288</code>.</p>
|
284 + | /// /* BuilderGenerator.kt:334 */<p>The size of the data to write to the block, in bytes. Currently, the only supported size is <code>524288</code>.</p>
|
178 285 | /// <p>Valid values: <code>524288</code></p>
|
286 + | /* BuilderGenerator.kt:336 */
|
179 287 | pub fn get_data_length(&self) -> &::std::option::Option<i32> {
|
288 + | /* BuilderGenerator.kt:337 */
|
180 289 | &self.data_length
|
290 + | /* BuilderGenerator.kt:336 */
|
181 291 | }
|
182 - | /// <p>The algorithm used to generate the checksum. Currently, the only supported algorithm is <code>SHA256</code>.</p>
|
183 - | /// This field is required.
|
292 + | /// /* BuilderGenerator.kt:286 */<p>The algorithm used to generate the checksum. Currently, the only supported algorithm is <code>SHA256</code>.</p>
|
293 + | /// /* BuilderGenerator.kt:288 */This field is required.
|
294 + | /* BuilderGenerator.kt:291 */
|
184 295 | pub fn checksum_algorithm(mut self, input: crate::types::ChecksumAlgorithm) -> Self {
|
296 + | /* BuilderGenerator.kt:292 */
|
185 297 | self.checksum_algorithm = ::std::option::Option::Some(input);
|
298 + | /* BuilderGenerator.kt:293 */
|
186 299 | self
|
300 + | /* BuilderGenerator.kt:291 */
|
187 301 | }
|
188 - | /// <p>The algorithm used to generate the checksum. Currently, the only supported algorithm is <code>SHA256</code>.</p>
|
302 + | /// /* BuilderGenerator.kt:312 */<p>The algorithm used to generate the checksum. Currently, the only supported algorithm is <code>SHA256</code>.</p>
|
303 + | /* BuilderGenerator.kt:314 */
|
189 304 | pub fn set_checksum_algorithm(mut self, input: ::std::option::Option<crate::types::ChecksumAlgorithm>) -> Self {
|
305 + | /* BuilderGenerator.kt:315 */
|
190 306 | self.checksum_algorithm = input;
|
191 307 | self
|
308 + | /* BuilderGenerator.kt:314 */
|
192 309 | }
|
193 - | /// <p>The algorithm used to generate the checksum. Currently, the only supported algorithm is <code>SHA256</code>.</p>
|
310 + | /// /* BuilderGenerator.kt:334 */<p>The algorithm used to generate the checksum. Currently, the only supported algorithm is <code>SHA256</code>.</p>
|
311 + | /* BuilderGenerator.kt:336 */
|
194 312 | pub fn get_checksum_algorithm(&self) -> &::std::option::Option<crate::types::ChecksumAlgorithm> {
|
313 + | /* BuilderGenerator.kt:337 */
|
195 314 | &self.checksum_algorithm
|
315 + | /* BuilderGenerator.kt:336 */
|
196 316 | }
|
197 - | /// Consumes the builder and constructs a [`PutSnapshotBlockInput`](crate::operation::put_snapshot_block::PutSnapshotBlockInput).
|
317 + | /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`PutSnapshotBlockInput`](crate::operation::put_snapshot_block::PutSnapshotBlockInput).
|
318 + | /* BuilderGenerator.kt:253 */
|
198 319 | pub fn build(
|
199 320 | self,
|
200 321 | ) -> ::std::result::Result<crate::operation::put_snapshot_block::PutSnapshotBlockInput, ::aws_smithy_types::error::operation::BuildError> {
|
201 - | ::std::result::Result::Ok(crate::operation::put_snapshot_block::PutSnapshotBlockInput {
|
202 - | snapshot_id: self.snapshot_id,
|
203 - | block_index: self.block_index,
|
204 - | checksum: self.checksum,
|
205 - | progress: self.progress,
|
206 - | block_data: self.block_data.unwrap_or_default(),
|
207 - | data_length: self.data_length,
|
208 - | checksum_algorithm: self.checksum_algorithm,
|
209 - | })
|
210 - | }
|
322 + | /* BuilderGenerator.kt:254 */
|
323 + | ::std::result::Result::Ok(
|
324 + | /* BuilderGenerator.kt:477 */
|
325 + | crate::operation::put_snapshot_block::PutSnapshotBlockInput {
|
326 + | /* BuilderGenerator.kt:481 */ snapshot_id: self.snapshot_id,
|
327 + | /* BuilderGenerator.kt:481 */
|
328 + | block_index: self.block_index,
|
329 + | /* BuilderGenerator.kt:481 */
|
330 + | checksum: self.checksum,
|
331 + | /* BuilderGenerator.kt:481 */
|
332 + | progress: self.progress,
|
333 + | /* BuilderGenerator.kt:481 */
|
334 + | block_data: self
|
335 + | .block_data
|
336 + | /* BuilderGenerator.kt:487 */
|
337 + | .unwrap_or_default(),
|
338 + | /* BuilderGenerator.kt:481 */
|
339 + | data_length: self.data_length,
|
340 + | /* BuilderGenerator.kt:481 */
|
341 + | checksum_algorithm: self.checksum_algorithm,
|
342 + | /* BuilderGenerator.kt:477 */
|
343 + | }, /* BuilderGenerator.kt:254 */
|
344 + | )
|
345 + | /* BuilderGenerator.kt:253 */
|
346 + | }
|
347 + | /* BuilderGenerator.kt:355 */
|
211 348 | }
|
349 + | /* BuilderGenerator.kt:379 */
|
212 350 | impl ::std::fmt::Debug for PutSnapshotBlockInputBuilder {
|
351 + | /* BuilderGenerator.kt:380 */
|
213 352 | fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
|
353 + | /* BuilderGenerator.kt:381 */
|
214 354 | let mut formatter = f.debug_struct("PutSnapshotBlockInputBuilder");
|
355 + | /* BuilderGenerator.kt:395 */
|
215 356 | formatter.field("snapshot_id", &self.snapshot_id);
|
357 + | /* BuilderGenerator.kt:395 */
|
216 358 | formatter.field("block_index", &self.block_index);
|
359 + | /* BuilderGenerator.kt:395 */
|
217 360 | formatter.field("checksum", &self.checksum);
|
361 + | /* BuilderGenerator.kt:395 */
|
218 362 | formatter.field("progress", &self.progress);
|
363 + | /* BuilderGenerator.kt:395 */
|
219 364 | formatter.field("block_data", &"*** Sensitive Data Redacted ***");
|
365 + | /* BuilderGenerator.kt:395 */
|
220 366 | formatter.field("data_length", &self.data_length);
|
367 + | /* BuilderGenerator.kt:395 */
|
221 368 | formatter.field("checksum_algorithm", &self.checksum_algorithm);
|
369 + | /* BuilderGenerator.kt:400 */
|
222 370 | formatter.finish()
|
371 + | /* BuilderGenerator.kt:380 */
|
223 372 | }
|
373 + | /* BuilderGenerator.kt:379 */
|
224 374 | }
|