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>
9pub copy_source_version_id: ::std::option::Option<::std::string::String>,
10/// <p>Container for all response elements.</p>
11pub 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>
13pub 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>
17pub 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>
21pub 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>
23pub 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>
25pub 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>
29pub 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>
37pub fn copy_source_version_id(&self) -> ::std::option::Option<&str> {
38self.copy_source_version_id.as_deref()
39 }
40/// <p>Container for all response elements.</p>
41pub fn copy_part_result(&self) -> ::std::option::Option<&crate::types::CopyPartResult> {
42self.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>
45pub fn server_side_encryption(&self) -> ::std::option::Option<&crate::types::ServerSideEncryption> {
46self.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>
51pub fn sse_customer_algorithm(&self) -> ::std::option::Option<&str> {
52self.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>
57pub fn sse_customer_key_md5(&self) -> ::std::option::Option<&str> {
58self.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>
61pub fn ssekms_key_id(&self) -> ::std::option::Option<&str> {
62self.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>
65pub fn bucket_key_enabled(&self) -> ::std::option::Option<bool> {
66self.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>
71pub fn request_charged(&self) -> ::std::option::Option<&crate::types::RequestCharged> {
72self.request_charged.as_ref()
73 }
74}
75impl ::std::fmt::Debug for UploadPartCopyOutput {
76fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
77let 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 {
92fn extended_request_id(&self) -> Option<&str> {
93self._extended_request_id.as_deref()
94 }
95}
96impl ::aws_types::request_id::RequestId for UploadPartCopyOutput {
97fn request_id(&self) -> Option<&str> {
98self._request_id.as_deref()
99 }
100}
101impl UploadPartCopyOutput {
102/// Creates a new builder-style object to manufacture [`UploadPartCopyOutput`](crate::operation::upload_part_copy::UploadPartCopyOutput).
103pub fn builder() -> crate::operation::upload_part_copy::builders::UploadPartCopyOutputBuilder {
104crate::operation::upload_part_copy::builders::UploadPartCopyOutputBuilder::default()
105 }
106}
107108/// 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 {
112pub(crate) copy_source_version_id: ::std::option::Option<::std::string::String>,
113pub(crate) copy_part_result: ::std::option::Option<crate::types::CopyPartResult>,
114pub(crate) server_side_encryption: ::std::option::Option<crate::types::ServerSideEncryption>,
115pub(crate) sse_customer_algorithm: ::std::option::Option<::std::string::String>,
116pub(crate) sse_customer_key_md5: ::std::option::Option<::std::string::String>,
117pub(crate) ssekms_key_id: ::std::option::Option<::std::string::String>,
118pub(crate) bucket_key_enabled: ::std::option::Option<bool>,
119pub(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>
127pub fn copy_source_version_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
128self.copy_source_version_id = ::std::option::Option::Some(input.into());
129self
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>
134pub fn set_copy_source_version_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
135self.copy_source_version_id = input;
136self
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>
141pub 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>
145pub fn copy_part_result(mut self, input: crate::types::CopyPartResult) -> Self {
146self.copy_part_result = ::std::option::Option::Some(input);
147self
148}
149/// <p>Container for all response elements.</p>
150pub fn set_copy_part_result(mut self, input: ::std::option::Option<crate::types::CopyPartResult>) -> Self {
151self.copy_part_result = input;
152self
153}
154/// <p>Container for all response elements.</p>
155pub 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>
159pub fn server_side_encryption(mut self, input: crate::types::ServerSideEncryption) -> Self {
160self.server_side_encryption = ::std::option::Option::Some(input);
161self
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>
164pub fn set_server_side_encryption(mut self, input: ::std::option::Option<crate::types::ServerSideEncryption>) -> Self {
165self.server_side_encryption = input;
166self
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>
169pub 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>
175pub fn sse_customer_algorithm(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
176self.sse_customer_algorithm = ::std::option::Option::Some(input.into());
177self
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>
182pub fn set_sse_customer_algorithm(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
183self.sse_customer_algorithm = input;
184self
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>
189pub 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>
195pub fn sse_customer_key_md5(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
196self.sse_customer_key_md5 = ::std::option::Option::Some(input.into());
197self
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>
202pub fn set_sse_customer_key_md5(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
203self.sse_customer_key_md5 = input;
204self
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>
209pub 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>
213pub fn ssekms_key_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
214self.ssekms_key_id = ::std::option::Option::Some(input.into());
215self
216}
217/// <p>If present, indicates the ID of the KMS key that was used for object encryption.</p>
218pub fn set_ssekms_key_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
219self.ssekms_key_id = input;
220self
221}
222/// <p>If present, indicates the ID of the KMS key that was used for object encryption.</p>
223pub 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>
227pub fn bucket_key_enabled(mut self, input: bool) -> Self {
228self.bucket_key_enabled = ::std::option::Option::Some(input);
229self
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>
232pub fn set_bucket_key_enabled(mut self, input: ::std::option::Option<bool>) -> Self {
233self.bucket_key_enabled = input;
234self
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>
237pub 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>
243pub fn request_charged(mut self, input: crate::types::RequestCharged) -> Self {
244self.request_charged = ::std::option::Option::Some(input);
245self
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>
250pub fn set_request_charged(mut self, input: ::std::option::Option<crate::types::RequestCharged>) -> Self {
251self.request_charged = input;
252self
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>
257pub fn get_request_charged(&self) -> &::std::option::Option<crate::types::RequestCharged> {
258&self.request_charged
259 }
260pub(crate) fn _extended_request_id(mut self, extended_request_id: impl Into<String>) -> Self {
261self._extended_request_id = Some(extended_request_id.into());
262self
263}
264265pub(crate) fn _set_extended_request_id(&mut self, extended_request_id: Option<String>) -> &mut Self {
266self._extended_request_id = extended_request_id;
267self
268}
269pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
270self._request_id = Some(request_id.into());
271self
272}
273274pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
275self._request_id = request_id;
276self
277}
278/// Consumes the builder and constructs a [`UploadPartCopyOutput`](crate::operation::upload_part_copy::UploadPartCopyOutput).
279pub fn build(self) -> crate::operation::upload_part_copy::UploadPartCopyOutput {
280crate::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 {
295fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
296let 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}