aws_sdk_s3/operation/upload_part_copy/
_upload_part_copy_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 UploadPartCopyOutput {
6    /// <p>The version of the source object that was copied, if you have enabled versioning on the source bucket.</p><note>
7    /// <p>This functionality is not supported when the source object is in a directory bucket.</p>
8    /// </note>
9    pub copy_source_version_id: ::std::option::Option<::std::string::String>,
10    /// <p>Container for all response elements.</p>
11    pub copy_part_result: ::std::option::Option<crate::types::CopyPartResult>,
12    /// <p>The server-side encryption algorithm used when you store this object in Amazon S3 (for example, <code>AES256</code>, <code>aws:kms</code>).</p>
13    pub server_side_encryption: ::std::option::Option<crate::types::ServerSideEncryption>,
14    /// <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>
15    /// <p>This functionality is not supported for directory buckets.</p>
16    /// </note>
17    pub sse_customer_algorithm: ::std::option::Option<::std::string::String>,
18    /// <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>
19    /// <p>This functionality is not supported for directory buckets.</p>
20    /// </note>
21    pub sse_customer_key_md5: ::std::option::Option<::std::string::String>,
22    /// <p>If present, indicates the ID of the KMS key that was used for object encryption.</p>
23    pub ssekms_key_id: ::std::option::Option<::std::string::String>,
24    /// <p>Indicates whether the multipart upload uses an S3 Bucket Key for server-side encryption with Key Management Service (KMS) keys (SSE-KMS).</p>
25    pub bucket_key_enabled: ::std::option::Option<bool>,
26    /// <p>If present, indicates that the requester was successfully charged for the request.</p><note>
27    /// <p>This functionality is not supported for directory buckets.</p>
28    /// </note>
29    pub request_charged: ::std::option::Option<crate::types::RequestCharged>,
30    _extended_request_id: Option<String>,
31    _request_id: Option<String>,
32}
33impl UploadPartCopyOutput {
34    /// <p>The version of the source object that was copied, if you have enabled versioning on the source bucket.</p><note>
35    /// <p>This functionality is not supported when the source object is in a directory bucket.</p>
36    /// </note>
37    pub fn copy_source_version_id(&self) -> ::std::option::Option<&str> {
38        self.copy_source_version_id.as_deref()
39    }
40    /// <p>Container for all response elements.</p>
41    pub fn copy_part_result(&self) -> ::std::option::Option<&crate::types::CopyPartResult> {
42        self.copy_part_result.as_ref()
43    }
44    /// <p>The server-side encryption algorithm used when you store this object in Amazon S3 (for example, <code>AES256</code>, <code>aws:kms</code>).</p>
45    pub fn server_side_encryption(&self) -> ::std::option::Option<&crate::types::ServerSideEncryption> {
46        self.server_side_encryption.as_ref()
47    }
48    /// <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>
49    /// <p>This functionality is not supported for directory buckets.</p>
50    /// </note>
51    pub fn sse_customer_algorithm(&self) -> ::std::option::Option<&str> {
52        self.sse_customer_algorithm.as_deref()
53    }
54    /// <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>
55    /// <p>This functionality is not supported for directory buckets.</p>
56    /// </note>
57    pub fn sse_customer_key_md5(&self) -> ::std::option::Option<&str> {
58        self.sse_customer_key_md5.as_deref()
59    }
60    /// <p>If present, indicates the ID of the KMS key that was used for object encryption.</p>
61    pub fn ssekms_key_id(&self) -> ::std::option::Option<&str> {
62        self.ssekms_key_id.as_deref()
63    }
64    /// <p>Indicates whether the multipart upload uses an S3 Bucket Key for server-side encryption with Key Management Service (KMS) keys (SSE-KMS).</p>
65    pub fn bucket_key_enabled(&self) -> ::std::option::Option<bool> {
66        self.bucket_key_enabled
67    }
68    /// <p>If present, indicates that the requester was successfully charged for the request.</p><note>
69    /// <p>This functionality is not supported for directory buckets.</p>
70    /// </note>
71    pub fn request_charged(&self) -> ::std::option::Option<&crate::types::RequestCharged> {
72        self.request_charged.as_ref()
73    }
74}
75impl ::std::fmt::Debug for UploadPartCopyOutput {
76    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
77        let mut formatter = f.debug_struct("UploadPartCopyOutput");
78        formatter.field("copy_source_version_id", &self.copy_source_version_id);
79        formatter.field("copy_part_result", &self.copy_part_result);
80        formatter.field("server_side_encryption", &self.server_side_encryption);
81        formatter.field("sse_customer_algorithm", &self.sse_customer_algorithm);
82        formatter.field("sse_customer_key_md5", &self.sse_customer_key_md5);
83        formatter.field("ssekms_key_id", &"*** Sensitive Data Redacted ***");
84        formatter.field("bucket_key_enabled", &self.bucket_key_enabled);
85        formatter.field("request_charged", &self.request_charged);
86        formatter.field("_extended_request_id", &self._extended_request_id);
87        formatter.field("_request_id", &self._request_id);
88        formatter.finish()
89    }
90}
91impl crate::s3_request_id::RequestIdExt for UploadPartCopyOutput {
92    fn extended_request_id(&self) -> Option<&str> {
93        self._extended_request_id.as_deref()
94    }
95}
96impl ::aws_types::request_id::RequestId for UploadPartCopyOutput {
97    fn request_id(&self) -> Option<&str> {
98        self._request_id.as_deref()
99    }
100}
101impl UploadPartCopyOutput {
102    /// Creates a new builder-style object to manufacture [`UploadPartCopyOutput`](crate::operation::upload_part_copy::UploadPartCopyOutput).
103    pub fn builder() -> crate::operation::upload_part_copy::builders::UploadPartCopyOutputBuilder {
104        crate::operation::upload_part_copy::builders::UploadPartCopyOutputBuilder::default()
105    }
106}
107
108/// A builder for [`UploadPartCopyOutput`](crate::operation::upload_part_copy::UploadPartCopyOutput).
109#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
110#[non_exhaustive]
111pub struct UploadPartCopyOutputBuilder {
112    pub(crate) copy_source_version_id: ::std::option::Option<::std::string::String>,
113    pub(crate) copy_part_result: ::std::option::Option<crate::types::CopyPartResult>,
114    pub(crate) server_side_encryption: ::std::option::Option<crate::types::ServerSideEncryption>,
115    pub(crate) sse_customer_algorithm: ::std::option::Option<::std::string::String>,
116    pub(crate) sse_customer_key_md5: ::std::option::Option<::std::string::String>,
117    pub(crate) ssekms_key_id: ::std::option::Option<::std::string::String>,
118    pub(crate) bucket_key_enabled: ::std::option::Option<bool>,
119    pub(crate) request_charged: ::std::option::Option<crate::types::RequestCharged>,
120    _extended_request_id: Option<String>,
121    _request_id: Option<String>,
122}
123impl UploadPartCopyOutputBuilder {
124    /// <p>The version of the source object that was copied, if you have enabled versioning on the source bucket.</p><note>
125    /// <p>This functionality is not supported when the source object is in a directory bucket.</p>
126    /// </note>
127    pub fn copy_source_version_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
128        self.copy_source_version_id = ::std::option::Option::Some(input.into());
129        self
130    }
131    /// <p>The version of the source object that was copied, if you have enabled versioning on the source bucket.</p><note>
132    /// <p>This functionality is not supported when the source object is in a directory bucket.</p>
133    /// </note>
134    pub fn set_copy_source_version_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
135        self.copy_source_version_id = input;
136        self
137    }
138    /// <p>The version of the source object that was copied, if you have enabled versioning on the source bucket.</p><note>
139    /// <p>This functionality is not supported when the source object is in a directory bucket.</p>
140    /// </note>
141    pub fn get_copy_source_version_id(&self) -> &::std::option::Option<::std::string::String> {
142        &self.copy_source_version_id
143    }
144    /// <p>Container for all response elements.</p>
145    pub fn copy_part_result(mut self, input: crate::types::CopyPartResult) -> Self {
146        self.copy_part_result = ::std::option::Option::Some(input);
147        self
148    }
149    /// <p>Container for all response elements.</p>
150    pub fn set_copy_part_result(mut self, input: ::std::option::Option<crate::types::CopyPartResult>) -> Self {
151        self.copy_part_result = input;
152        self
153    }
154    /// <p>Container for all response elements.</p>
155    pub fn get_copy_part_result(&self) -> &::std::option::Option<crate::types::CopyPartResult> {
156        &self.copy_part_result
157    }
158    /// <p>The server-side encryption algorithm used when you store this object in Amazon S3 (for example, <code>AES256</code>, <code>aws:kms</code>).</p>
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 (for example, <code>AES256</code>, <code>aws:kms</code>).</p>
164    pub fn set_server_side_encryption(mut self, input: ::std::option::Option<crate::types::ServerSideEncryption>) -> Self {
165        self.server_side_encryption = input;
166        self
167    }
168    /// <p>The server-side encryption algorithm used when you store this object in Amazon S3 (for example, <code>AES256</code>, <code>aws:kms</code>).</p>
169    pub fn get_server_side_encryption(&self) -> &::std::option::Option<crate::types::ServerSideEncryption> {
170        &self.server_side_encryption
171    }
172    /// <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>
173    /// <p>This functionality is not supported for directory buckets.</p>
174    /// </note>
175    pub fn sse_customer_algorithm(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
176        self.sse_customer_algorithm = ::std::option::Option::Some(input.into());
177        self
178    }
179    /// <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>
180    /// <p>This functionality is not supported for directory buckets.</p>
181    /// </note>
182    pub fn set_sse_customer_algorithm(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
183        self.sse_customer_algorithm = input;
184        self
185    }
186    /// <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>
187    /// <p>This functionality is not supported for directory buckets.</p>
188    /// </note>
189    pub fn get_sse_customer_algorithm(&self) -> &::std::option::Option<::std::string::String> {
190        &self.sse_customer_algorithm
191    }
192    /// <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>
193    /// <p>This functionality is not supported for directory buckets.</p>
194    /// </note>
195    pub fn sse_customer_key_md5(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
196        self.sse_customer_key_md5 = ::std::option::Option::Some(input.into());
197        self
198    }
199    /// <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>
200    /// <p>This functionality is not supported for directory buckets.</p>
201    /// </note>
202    pub fn set_sse_customer_key_md5(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
203        self.sse_customer_key_md5 = input;
204        self
205    }
206    /// <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>
207    /// <p>This functionality is not supported for directory buckets.</p>
208    /// </note>
209    pub fn get_sse_customer_key_md5(&self) -> &::std::option::Option<::std::string::String> {
210        &self.sse_customer_key_md5
211    }
212    /// <p>If present, indicates the ID of the KMS key that was used for object encryption.</p>
213    pub fn ssekms_key_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
214        self.ssekms_key_id = ::std::option::Option::Some(input.into());
215        self
216    }
217    /// <p>If present, indicates the ID of the KMS key that was used for object encryption.</p>
218    pub fn set_ssekms_key_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
219        self.ssekms_key_id = input;
220        self
221    }
222    /// <p>If present, indicates the ID of the KMS key that was used for object encryption.</p>
223    pub fn get_ssekms_key_id(&self) -> &::std::option::Option<::std::string::String> {
224        &self.ssekms_key_id
225    }
226    /// <p>Indicates whether the multipart upload uses an S3 Bucket Key for server-side encryption with Key Management Service (KMS) keys (SSE-KMS).</p>
227    pub fn bucket_key_enabled(mut self, input: bool) -> Self {
228        self.bucket_key_enabled = ::std::option::Option::Some(input);
229        self
230    }
231    /// <p>Indicates whether the multipart upload uses an S3 Bucket Key for server-side encryption with Key Management Service (KMS) keys (SSE-KMS).</p>
232    pub fn set_bucket_key_enabled(mut self, input: ::std::option::Option<bool>) -> Self {
233        self.bucket_key_enabled = input;
234        self
235    }
236    /// <p>Indicates whether the multipart upload uses an S3 Bucket Key for server-side encryption with Key Management Service (KMS) keys (SSE-KMS).</p>
237    pub fn get_bucket_key_enabled(&self) -> &::std::option::Option<bool> {
238        &self.bucket_key_enabled
239    }
240    /// <p>If present, indicates that the requester was successfully charged for the request.</p><note>
241    /// <p>This functionality is not supported for directory buckets.</p>
242    /// </note>
243    pub fn request_charged(mut self, input: crate::types::RequestCharged) -> Self {
244        self.request_charged = ::std::option::Option::Some(input);
245        self
246    }
247    /// <p>If present, indicates that the requester was successfully charged for the request.</p><note>
248    /// <p>This functionality is not supported for directory buckets.</p>
249    /// </note>
250    pub fn set_request_charged(mut self, input: ::std::option::Option<crate::types::RequestCharged>) -> Self {
251        self.request_charged = input;
252        self
253    }
254    /// <p>If present, indicates that the requester was successfully charged for the request.</p><note>
255    /// <p>This functionality is not supported for directory buckets.</p>
256    /// </note>
257    pub fn get_request_charged(&self) -> &::std::option::Option<crate::types::RequestCharged> {
258        &self.request_charged
259    }
260    pub(crate) fn _extended_request_id(mut self, extended_request_id: impl Into<String>) -> Self {
261        self._extended_request_id = Some(extended_request_id.into());
262        self
263    }
264
265    pub(crate) fn _set_extended_request_id(&mut self, extended_request_id: Option<String>) -> &mut Self {
266        self._extended_request_id = extended_request_id;
267        self
268    }
269    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
270        self._request_id = Some(request_id.into());
271        self
272    }
273
274    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
275        self._request_id = request_id;
276        self
277    }
278    /// Consumes the builder and constructs a [`UploadPartCopyOutput`](crate::operation::upload_part_copy::UploadPartCopyOutput).
279    pub fn build(self) -> crate::operation::upload_part_copy::UploadPartCopyOutput {
280        crate::operation::upload_part_copy::UploadPartCopyOutput {
281            copy_source_version_id: self.copy_source_version_id,
282            copy_part_result: self.copy_part_result,
283            server_side_encryption: self.server_side_encryption,
284            sse_customer_algorithm: self.sse_customer_algorithm,
285            sse_customer_key_md5: self.sse_customer_key_md5,
286            ssekms_key_id: self.ssekms_key_id,
287            bucket_key_enabled: self.bucket_key_enabled,
288            request_charged: self.request_charged,
289            _extended_request_id: self._extended_request_id,
290            _request_id: self._request_id,
291        }
292    }
293}
294impl ::std::fmt::Debug for UploadPartCopyOutputBuilder {
295    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
296        let mut formatter = f.debug_struct("UploadPartCopyOutputBuilder");
297        formatter.field("copy_source_version_id", &self.copy_source_version_id);
298        formatter.field("copy_part_result", &self.copy_part_result);
299        formatter.field("server_side_encryption", &self.server_side_encryption);
300        formatter.field("sse_customer_algorithm", &self.sse_customer_algorithm);
301        formatter.field("sse_customer_key_md5", &self.sse_customer_key_md5);
302        formatter.field("ssekms_key_id", &"*** Sensitive Data Redacted ***");
303        formatter.field("bucket_key_enabled", &self.bucket_key_enabled);
304        formatter.field("request_charged", &self.request_charged);
305        formatter.field("_extended_request_id", &self._extended_request_id);
306        formatter.field("_request_id", &self._request_id);
307        formatter.finish()
308    }
309}