aws_sdk_s3/operation/upload_part/
_upload_part_output.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
5pub struct UploadPartOutput {
6    /// <p>The server-side encryption algorithm used when you store this object in Amazon S3 or Amazon FSx.</p><note>
7    /// <p>When accessing data stored in Amazon FSx file systems using S3 access points, the only valid server side encryption option is <code>aws:fsx</code>.</p>
8    /// </note>
9    pub server_side_encryption: ::std::option::Option<crate::types::ServerSideEncryption>,
10    /// <p>Entity tag for the uploaded object.</p>
11    pub e_tag: ::std::option::Option<::std::string::String>,
12    /// <p>The Base64 encoded, 32-bit <code>CRC32 checksum</code> of the object. This checksum is only be present if the checksum was uploaded with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated with multipart uploads, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums"> Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
13    pub checksum_crc32: ::std::option::Option<::std::string::String>,
14    /// <p>The Base64 encoded, 32-bit <code>CRC32C</code> checksum of the object. This checksum is only present if the checksum was uploaded with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated with multipart uploads, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums"> Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
15    pub checksum_crc32_c: ::std::option::Option<::std::string::String>,
16    /// <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 64-bit <code>CRC64NVME</code> checksum of the part. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
17    pub checksum_crc64_nvme: ::std::option::Option<::std::string::String>,
18    /// <p>The Base64 encoded, 160-bit <code>SHA1</code> digest of the object. This will only be present if the object was uploaded with the object. When you use the API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated with multipart uploads, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums"> Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
19    pub checksum_sha1: ::std::option::Option<::std::string::String>,
20    /// <p>The Base64 encoded, 256-bit <code>SHA256</code> digest of the object. This will only be present if the object was uploaded with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated with multipart uploads, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums"> Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
21    pub checksum_sha256: ::std::option::Option<::std::string::String>,
22    /// <p>If server-side encryption with a customer-provided encryption key was requested, the response will include this header to confirm the encryption algorithm that's used.</p><note>
23    /// <p>This functionality is not supported for directory buckets.</p>
24    /// </note>
25    pub sse_customer_algorithm: ::std::option::Option<::std::string::String>,
26    /// <p>If server-side encryption with a customer-provided encryption key was requested, the response will include this header to provide the round-trip message integrity verification of the customer-provided encryption key.</p><note>
27    /// <p>This functionality is not supported for directory buckets.</p>
28    /// </note>
29    pub sse_customer_key_md5: ::std::option::Option<::std::string::String>,
30    /// <p>If present, indicates the ID of the KMS key that was used for object encryption.</p>
31    pub ssekms_key_id: ::std::option::Option<::std::string::String>,
32    /// <p>Indicates whether the multipart upload uses an S3 Bucket Key for server-side encryption with Key Management Service (KMS) keys (SSE-KMS).</p>
33    pub bucket_key_enabled: ::std::option::Option<bool>,
34    /// <p>If present, indicates that the requester was successfully charged for the request. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/RequesterPaysBuckets.html">Using Requester Pays buckets for storage transfers and usage</a> in the <i>Amazon Simple Storage Service user guide</i>.</p><note>
35    /// <p>This functionality is not supported for directory buckets.</p>
36    /// </note>
37    pub request_charged: ::std::option::Option<crate::types::RequestCharged>,
38    _extended_request_id: Option<String>,
39    _request_id: Option<String>,
40}
41impl UploadPartOutput {
42    /// <p>The server-side encryption algorithm used when you store this object in Amazon S3 or Amazon FSx.</p><note>
43    /// <p>When accessing data stored in Amazon FSx file systems using S3 access points, the only valid server side encryption option is <code>aws:fsx</code>.</p>
44    /// </note>
45    pub fn server_side_encryption(&self) -> ::std::option::Option<&crate::types::ServerSideEncryption> {
46        self.server_side_encryption.as_ref()
47    }
48    /// <p>Entity tag for the uploaded object.</p>
49    pub fn e_tag(&self) -> ::std::option::Option<&str> {
50        self.e_tag.as_deref()
51    }
52    /// <p>The Base64 encoded, 32-bit <code>CRC32 checksum</code> of the object. This checksum is only be present if the checksum was uploaded with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated with multipart uploads, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums"> Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
53    pub fn checksum_crc32(&self) -> ::std::option::Option<&str> {
54        self.checksum_crc32.as_deref()
55    }
56    /// <p>The Base64 encoded, 32-bit <code>CRC32C</code> checksum of the object. This checksum is only present if the checksum was uploaded with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated with multipart uploads, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums"> Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
57    pub fn checksum_crc32_c(&self) -> ::std::option::Option<&str> {
58        self.checksum_crc32_c.as_deref()
59    }
60    /// <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 64-bit <code>CRC64NVME</code> checksum of the part. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
61    pub fn checksum_crc64_nvme(&self) -> ::std::option::Option<&str> {
62        self.checksum_crc64_nvme.as_deref()
63    }
64    /// <p>The Base64 encoded, 160-bit <code>SHA1</code> digest of the object. This will only be present if the object was uploaded with the object. When you use the API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated with multipart uploads, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums"> Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
65    pub fn checksum_sha1(&self) -> ::std::option::Option<&str> {
66        self.checksum_sha1.as_deref()
67    }
68    /// <p>The Base64 encoded, 256-bit <code>SHA256</code> digest of the object. This will only be present if the object was uploaded with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated with multipart uploads, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums"> Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
69    pub fn checksum_sha256(&self) -> ::std::option::Option<&str> {
70        self.checksum_sha256.as_deref()
71    }
72    /// <p>If server-side encryption with a customer-provided encryption key was requested, the response will include this header to confirm the encryption algorithm that's used.</p><note>
73    /// <p>This functionality is not supported for directory buckets.</p>
74    /// </note>
75    pub fn sse_customer_algorithm(&self) -> ::std::option::Option<&str> {
76        self.sse_customer_algorithm.as_deref()
77    }
78    /// <p>If server-side encryption with a customer-provided encryption key was requested, the response will include this header to provide the round-trip message integrity verification of the customer-provided encryption key.</p><note>
79    /// <p>This functionality is not supported for directory buckets.</p>
80    /// </note>
81    pub fn sse_customer_key_md5(&self) -> ::std::option::Option<&str> {
82        self.sse_customer_key_md5.as_deref()
83    }
84    /// <p>If present, indicates the ID of the KMS key that was used for object encryption.</p>
85    pub fn ssekms_key_id(&self) -> ::std::option::Option<&str> {
86        self.ssekms_key_id.as_deref()
87    }
88    /// <p>Indicates whether the multipart upload uses an S3 Bucket Key for server-side encryption with Key Management Service (KMS) keys (SSE-KMS).</p>
89    pub fn bucket_key_enabled(&self) -> ::std::option::Option<bool> {
90        self.bucket_key_enabled
91    }
92    /// <p>If present, indicates that the requester was successfully charged for the request. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/RequesterPaysBuckets.html">Using Requester Pays buckets for storage transfers and usage</a> in the <i>Amazon Simple Storage Service user guide</i>.</p><note>
93    /// <p>This functionality is not supported for directory buckets.</p>
94    /// </note>
95    pub fn request_charged(&self) -> ::std::option::Option<&crate::types::RequestCharged> {
96        self.request_charged.as_ref()
97    }
98}
99impl ::std::fmt::Debug for UploadPartOutput {
100    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
101        let mut formatter = f.debug_struct("UploadPartOutput");
102        formatter.field("server_side_encryption", &self.server_side_encryption);
103        formatter.field("e_tag", &self.e_tag);
104        formatter.field("checksum_crc32", &self.checksum_crc32);
105        formatter.field("checksum_crc32_c", &self.checksum_crc32_c);
106        formatter.field("checksum_crc64_nvme", &self.checksum_crc64_nvme);
107        formatter.field("checksum_sha1", &self.checksum_sha1);
108        formatter.field("checksum_sha256", &self.checksum_sha256);
109        formatter.field("sse_customer_algorithm", &self.sse_customer_algorithm);
110        formatter.field("sse_customer_key_md5", &self.sse_customer_key_md5);
111        formatter.field("ssekms_key_id", &"*** Sensitive Data Redacted ***");
112        formatter.field("bucket_key_enabled", &self.bucket_key_enabled);
113        formatter.field("request_charged", &self.request_charged);
114        formatter.field("_extended_request_id", &self._extended_request_id);
115        formatter.field("_request_id", &self._request_id);
116        formatter.finish()
117    }
118}
119impl crate::s3_request_id::RequestIdExt for UploadPartOutput {
120    fn extended_request_id(&self) -> Option<&str> {
121        self._extended_request_id.as_deref()
122    }
123}
124impl ::aws_types::request_id::RequestId for UploadPartOutput {
125    fn request_id(&self) -> Option<&str> {
126        self._request_id.as_deref()
127    }
128}
129impl UploadPartOutput {
130    /// Creates a new builder-style object to manufacture [`UploadPartOutput`](crate::operation::upload_part::UploadPartOutput).
131    pub fn builder() -> crate::operation::upload_part::builders::UploadPartOutputBuilder {
132        crate::operation::upload_part::builders::UploadPartOutputBuilder::default()
133    }
134}
135
136/// A builder for [`UploadPartOutput`](crate::operation::upload_part::UploadPartOutput).
137#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
138#[non_exhaustive]
139pub struct UploadPartOutputBuilder {
140    pub(crate) server_side_encryption: ::std::option::Option<crate::types::ServerSideEncryption>,
141    pub(crate) e_tag: ::std::option::Option<::std::string::String>,
142    pub(crate) checksum_crc32: ::std::option::Option<::std::string::String>,
143    pub(crate) checksum_crc32_c: ::std::option::Option<::std::string::String>,
144    pub(crate) checksum_crc64_nvme: ::std::option::Option<::std::string::String>,
145    pub(crate) checksum_sha1: ::std::option::Option<::std::string::String>,
146    pub(crate) checksum_sha256: ::std::option::Option<::std::string::String>,
147    pub(crate) sse_customer_algorithm: ::std::option::Option<::std::string::String>,
148    pub(crate) sse_customer_key_md5: ::std::option::Option<::std::string::String>,
149    pub(crate) ssekms_key_id: ::std::option::Option<::std::string::String>,
150    pub(crate) bucket_key_enabled: ::std::option::Option<bool>,
151    pub(crate) request_charged: ::std::option::Option<crate::types::RequestCharged>,
152    _extended_request_id: Option<String>,
153    _request_id: Option<String>,
154}
155impl UploadPartOutputBuilder {
156    /// <p>The server-side encryption algorithm used when you store this object in Amazon S3 or Amazon FSx.</p><note>
157    /// <p>When accessing data stored in Amazon FSx file systems using S3 access points, the only valid server side encryption option is <code>aws:fsx</code>.</p>
158    /// </note>
159    pub fn server_side_encryption(mut self, input: crate::types::ServerSideEncryption) -> Self {
160        self.server_side_encryption = ::std::option::Option::Some(input);
161        self
162    }
163    /// <p>The server-side encryption algorithm used when you store this object in Amazon S3 or Amazon FSx.</p><note>
164    /// <p>When accessing data stored in Amazon FSx file systems using S3 access points, the only valid server side encryption option is <code>aws:fsx</code>.</p>
165    /// </note>
166    pub fn set_server_side_encryption(mut self, input: ::std::option::Option<crate::types::ServerSideEncryption>) -> Self {
167        self.server_side_encryption = input;
168        self
169    }
170    /// <p>The server-side encryption algorithm used when you store this object in Amazon S3 or Amazon FSx.</p><note>
171    /// <p>When accessing data stored in Amazon FSx file systems using S3 access points, the only valid server side encryption option is <code>aws:fsx</code>.</p>
172    /// </note>
173    pub fn get_server_side_encryption(&self) -> &::std::option::Option<crate::types::ServerSideEncryption> {
174        &self.server_side_encryption
175    }
176    /// <p>Entity tag for the uploaded object.</p>
177    pub fn e_tag(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
178        self.e_tag = ::std::option::Option::Some(input.into());
179        self
180    }
181    /// <p>Entity tag for the uploaded object.</p>
182    pub fn set_e_tag(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
183        self.e_tag = input;
184        self
185    }
186    /// <p>Entity tag for the uploaded object.</p>
187    pub fn get_e_tag(&self) -> &::std::option::Option<::std::string::String> {
188        &self.e_tag
189    }
190    /// <p>The Base64 encoded, 32-bit <code>CRC32 checksum</code> of the object. This checksum is only be present if the checksum was uploaded with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated with multipart uploads, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums"> Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
191    pub fn checksum_crc32(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
192        self.checksum_crc32 = ::std::option::Option::Some(input.into());
193        self
194    }
195    /// <p>The Base64 encoded, 32-bit <code>CRC32 checksum</code> of the object. This checksum is only be present if the checksum was uploaded with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated with multipart uploads, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums"> Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
196    pub fn set_checksum_crc32(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
197        self.checksum_crc32 = input;
198        self
199    }
200    /// <p>The Base64 encoded, 32-bit <code>CRC32 checksum</code> of the object. This checksum is only be present if the checksum was uploaded with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated with multipart uploads, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums"> Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
201    pub fn get_checksum_crc32(&self) -> &::std::option::Option<::std::string::String> {
202        &self.checksum_crc32
203    }
204    /// <p>The Base64 encoded, 32-bit <code>CRC32C</code> checksum of the object. This checksum is only present if the checksum was uploaded with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated with multipart uploads, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums"> Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
205    pub fn checksum_crc32_c(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
206        self.checksum_crc32_c = ::std::option::Option::Some(input.into());
207        self
208    }
209    /// <p>The Base64 encoded, 32-bit <code>CRC32C</code> checksum of the object. This checksum is only present if the checksum was uploaded with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated with multipart uploads, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums"> Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
210    pub fn set_checksum_crc32_c(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
211        self.checksum_crc32_c = input;
212        self
213    }
214    /// <p>The Base64 encoded, 32-bit <code>CRC32C</code> checksum of the object. This checksum is only present if the checksum was uploaded with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated with multipart uploads, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums"> Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
215    pub fn get_checksum_crc32_c(&self) -> &::std::option::Option<::std::string::String> {
216        &self.checksum_crc32_c
217    }
218    /// <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 64-bit <code>CRC64NVME</code> checksum of the part. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
219    pub fn checksum_crc64_nvme(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
220        self.checksum_crc64_nvme = ::std::option::Option::Some(input.into());
221        self
222    }
223    /// <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 64-bit <code>CRC64NVME</code> checksum of the part. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
224    pub fn set_checksum_crc64_nvme(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
225        self.checksum_crc64_nvme = input;
226        self
227    }
228    /// <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 64-bit <code>CRC64NVME</code> checksum of the part. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
229    pub fn get_checksum_crc64_nvme(&self) -> &::std::option::Option<::std::string::String> {
230        &self.checksum_crc64_nvme
231    }
232    /// <p>The Base64 encoded, 160-bit <code>SHA1</code> digest of the object. This will only be present if the object was uploaded with the object. When you use the API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated with multipart uploads, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums"> Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
233    pub fn checksum_sha1(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
234        self.checksum_sha1 = ::std::option::Option::Some(input.into());
235        self
236    }
237    /// <p>The Base64 encoded, 160-bit <code>SHA1</code> digest of the object. This will only be present if the object was uploaded with the object. When you use the API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated with multipart uploads, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums"> Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
238    pub fn set_checksum_sha1(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
239        self.checksum_sha1 = input;
240        self
241    }
242    /// <p>The Base64 encoded, 160-bit <code>SHA1</code> digest of the object. This will only be present if the object was uploaded with the object. When you use the API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated with multipart uploads, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums"> Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
243    pub fn get_checksum_sha1(&self) -> &::std::option::Option<::std::string::String> {
244        &self.checksum_sha1
245    }
246    /// <p>The Base64 encoded, 256-bit <code>SHA256</code> digest of the object. This will only be present if the object was uploaded with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated with multipart uploads, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums"> Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
247    pub fn checksum_sha256(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
248        self.checksum_sha256 = ::std::option::Option::Some(input.into());
249        self
250    }
251    /// <p>The Base64 encoded, 256-bit <code>SHA256</code> digest of the object. This will only be present if the object was uploaded with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated with multipart uploads, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums"> Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
252    pub fn set_checksum_sha256(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
253        self.checksum_sha256 = input;
254        self
255    }
256    /// <p>The Base64 encoded, 256-bit <code>SHA256</code> digest of the object. This will only be present if the object was uploaded with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated with multipart uploads, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums"> Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
257    pub fn get_checksum_sha256(&self) -> &::std::option::Option<::std::string::String> {
258        &self.checksum_sha256
259    }
260    /// <p>If server-side encryption with a customer-provided encryption key was requested, the response will include this header to confirm the encryption algorithm that's used.</p><note>
261    /// <p>This functionality is not supported for directory buckets.</p>
262    /// </note>
263    pub fn sse_customer_algorithm(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
264        self.sse_customer_algorithm = ::std::option::Option::Some(input.into());
265        self
266    }
267    /// <p>If server-side encryption with a customer-provided encryption key was requested, the response will include this header to confirm the encryption algorithm that's used.</p><note>
268    /// <p>This functionality is not supported for directory buckets.</p>
269    /// </note>
270    pub fn set_sse_customer_algorithm(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
271        self.sse_customer_algorithm = input;
272        self
273    }
274    /// <p>If server-side encryption with a customer-provided encryption key was requested, the response will include this header to confirm the encryption algorithm that's used.</p><note>
275    /// <p>This functionality is not supported for directory buckets.</p>
276    /// </note>
277    pub fn get_sse_customer_algorithm(&self) -> &::std::option::Option<::std::string::String> {
278        &self.sse_customer_algorithm
279    }
280    /// <p>If server-side encryption with a customer-provided encryption key was requested, the response will include this header to provide the round-trip message integrity verification of the customer-provided encryption key.</p><note>
281    /// <p>This functionality is not supported for directory buckets.</p>
282    /// </note>
283    pub fn sse_customer_key_md5(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
284        self.sse_customer_key_md5 = ::std::option::Option::Some(input.into());
285        self
286    }
287    /// <p>If server-side encryption with a customer-provided encryption key was requested, the response will include this header to provide the round-trip message integrity verification of the customer-provided encryption key.</p><note>
288    /// <p>This functionality is not supported for directory buckets.</p>
289    /// </note>
290    pub fn set_sse_customer_key_md5(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
291        self.sse_customer_key_md5 = input;
292        self
293    }
294    /// <p>If server-side encryption with a customer-provided encryption key was requested, the response will include this header to provide the round-trip message integrity verification of the customer-provided encryption key.</p><note>
295    /// <p>This functionality is not supported for directory buckets.</p>
296    /// </note>
297    pub fn get_sse_customer_key_md5(&self) -> &::std::option::Option<::std::string::String> {
298        &self.sse_customer_key_md5
299    }
300    /// <p>If present, indicates the ID of the KMS key that was used for object encryption.</p>
301    pub fn ssekms_key_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
302        self.ssekms_key_id = ::std::option::Option::Some(input.into());
303        self
304    }
305    /// <p>If present, indicates the ID of the KMS key that was used for object encryption.</p>
306    pub fn set_ssekms_key_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
307        self.ssekms_key_id = input;
308        self
309    }
310    /// <p>If present, indicates the ID of the KMS key that was used for object encryption.</p>
311    pub fn get_ssekms_key_id(&self) -> &::std::option::Option<::std::string::String> {
312        &self.ssekms_key_id
313    }
314    /// <p>Indicates whether the multipart upload uses an S3 Bucket Key for server-side encryption with Key Management Service (KMS) keys (SSE-KMS).</p>
315    pub fn bucket_key_enabled(mut self, input: bool) -> Self {
316        self.bucket_key_enabled = ::std::option::Option::Some(input);
317        self
318    }
319    /// <p>Indicates whether the multipart upload uses an S3 Bucket Key for server-side encryption with Key Management Service (KMS) keys (SSE-KMS).</p>
320    pub fn set_bucket_key_enabled(mut self, input: ::std::option::Option<bool>) -> Self {
321        self.bucket_key_enabled = input;
322        self
323    }
324    /// <p>Indicates whether the multipart upload uses an S3 Bucket Key for server-side encryption with Key Management Service (KMS) keys (SSE-KMS).</p>
325    pub fn get_bucket_key_enabled(&self) -> &::std::option::Option<bool> {
326        &self.bucket_key_enabled
327    }
328    /// <p>If present, indicates that the requester was successfully charged for the request. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/RequesterPaysBuckets.html">Using Requester Pays buckets for storage transfers and usage</a> in the <i>Amazon Simple Storage Service user guide</i>.</p><note>
329    /// <p>This functionality is not supported for directory buckets.</p>
330    /// </note>
331    pub fn request_charged(mut self, input: crate::types::RequestCharged) -> Self {
332        self.request_charged = ::std::option::Option::Some(input);
333        self
334    }
335    /// <p>If present, indicates that the requester was successfully charged for the request. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/RequesterPaysBuckets.html">Using Requester Pays buckets for storage transfers and usage</a> in the <i>Amazon Simple Storage Service user guide</i>.</p><note>
336    /// <p>This functionality is not supported for directory buckets.</p>
337    /// </note>
338    pub fn set_request_charged(mut self, input: ::std::option::Option<crate::types::RequestCharged>) -> Self {
339        self.request_charged = input;
340        self
341    }
342    /// <p>If present, indicates that the requester was successfully charged for the request. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/RequesterPaysBuckets.html">Using Requester Pays buckets for storage transfers and usage</a> in the <i>Amazon Simple Storage Service user guide</i>.</p><note>
343    /// <p>This functionality is not supported for directory buckets.</p>
344    /// </note>
345    pub fn get_request_charged(&self) -> &::std::option::Option<crate::types::RequestCharged> {
346        &self.request_charged
347    }
348    pub(crate) fn _extended_request_id(mut self, extended_request_id: impl Into<String>) -> Self {
349        self._extended_request_id = Some(extended_request_id.into());
350        self
351    }
352
353    pub(crate) fn _set_extended_request_id(&mut self, extended_request_id: Option<String>) -> &mut Self {
354        self._extended_request_id = extended_request_id;
355        self
356    }
357    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
358        self._request_id = Some(request_id.into());
359        self
360    }
361
362    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
363        self._request_id = request_id;
364        self
365    }
366    /// Consumes the builder and constructs a [`UploadPartOutput`](crate::operation::upload_part::UploadPartOutput).
367    pub fn build(self) -> crate::operation::upload_part::UploadPartOutput {
368        crate::operation::upload_part::UploadPartOutput {
369            server_side_encryption: self.server_side_encryption,
370            e_tag: self.e_tag,
371            checksum_crc32: self.checksum_crc32,
372            checksum_crc32_c: self.checksum_crc32_c,
373            checksum_crc64_nvme: self.checksum_crc64_nvme,
374            checksum_sha1: self.checksum_sha1,
375            checksum_sha256: self.checksum_sha256,
376            sse_customer_algorithm: self.sse_customer_algorithm,
377            sse_customer_key_md5: self.sse_customer_key_md5,
378            ssekms_key_id: self.ssekms_key_id,
379            bucket_key_enabled: self.bucket_key_enabled,
380            request_charged: self.request_charged,
381            _extended_request_id: self._extended_request_id,
382            _request_id: self._request_id,
383        }
384    }
385}
386impl ::std::fmt::Debug for UploadPartOutputBuilder {
387    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
388        let mut formatter = f.debug_struct("UploadPartOutputBuilder");
389        formatter.field("server_side_encryption", &self.server_side_encryption);
390        formatter.field("e_tag", &self.e_tag);
391        formatter.field("checksum_crc32", &self.checksum_crc32);
392        formatter.field("checksum_crc32_c", &self.checksum_crc32_c);
393        formatter.field("checksum_crc64_nvme", &self.checksum_crc64_nvme);
394        formatter.field("checksum_sha1", &self.checksum_sha1);
395        formatter.field("checksum_sha256", &self.checksum_sha256);
396        formatter.field("sse_customer_algorithm", &self.sse_customer_algorithm);
397        formatter.field("sse_customer_key_md5", &self.sse_customer_key_md5);
398        formatter.field("ssekms_key_id", &"*** Sensitive Data Redacted ***");
399        formatter.field("bucket_key_enabled", &self.bucket_key_enabled);
400        formatter.field("request_charged", &self.request_charged);
401        formatter.field("_extended_request_id", &self._extended_request_id);
402        formatter.field("_request_id", &self._request_id);
403        formatter.finish()
404    }
405}