1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct CopyObjectOutput {
    /// <p>Container for all response elements.</p>
    #[doc(hidden)]
    pub copy_object_result: std::option::Option<crate::types::CopyObjectResult>,
    /// <p>If the object expiration is configured, the response includes this header.</p>
    #[doc(hidden)]
    pub expiration: std::option::Option<std::string::String>,
    /// <p>Version of the copied object in the destination bucket.</p>
    #[doc(hidden)]
    pub copy_source_version_id: std::option::Option<std::string::String>,
    /// <p>Version ID of the newly created copy.</p>
    #[doc(hidden)]
    pub version_id: std::option::Option<std::string::String>,
    /// <p>The server-side encryption algorithm used when storing this object in Amazon S3 (for example, AES256, aws:kms).</p>
    #[doc(hidden)]
    pub server_side_encryption: std::option::Option<crate::types::ServerSideEncryption>,
    /// <p>If server-side encryption with a customer-provided encryption key was requested, the response will include this header confirming the encryption algorithm used.</p>
    #[doc(hidden)]
    pub sse_customer_algorithm: std::option::Option<std::string::String>,
    /// <p>If server-side encryption with a customer-provided encryption key was requested, the response will include this header to provide round-trip message integrity verification of the customer-provided encryption key.</p>
    #[doc(hidden)]
    pub sse_customer_key_md5: std::option::Option<std::string::String>,
    /// <p>If present, specifies the ID of the Amazon Web Services Key Management Service (Amazon Web Services KMS) symmetric customer managed key that was used for the object.</p>
    #[doc(hidden)]
    pub ssekms_key_id: std::option::Option<std::string::String>,
    /// <p>If present, specifies the Amazon Web Services KMS Encryption Context to use for object encryption. The value of this header is a base64-encoded UTF-8 string holding JSON with the encryption context key-value pairs.</p>
    #[doc(hidden)]
    pub ssekms_encryption_context: std::option::Option<std::string::String>,
    /// <p>Indicates whether the copied object uses an S3 Bucket Key for server-side encryption with Amazon Web Services KMS (SSE-KMS).</p>
    #[doc(hidden)]
    pub bucket_key_enabled: bool,
    /// <p>If present, indicates that the requester was successfully charged for the request.</p>
    #[doc(hidden)]
    pub request_charged: std::option::Option<crate::types::RequestCharged>,
    _extended_request_id: Option<String>,
    _request_id: Option<String>,
}
impl CopyObjectOutput {
    /// <p>Container for all response elements.</p>
    pub fn copy_object_result(&self) -> std::option::Option<&crate::types::CopyObjectResult> {
        self.copy_object_result.as_ref()
    }
    /// <p>If the object expiration is configured, the response includes this header.</p>
    pub fn expiration(&self) -> std::option::Option<&str> {
        self.expiration.as_deref()
    }
    /// <p>Version of the copied object in the destination bucket.</p>
    pub fn copy_source_version_id(&self) -> std::option::Option<&str> {
        self.copy_source_version_id.as_deref()
    }
    /// <p>Version ID of the newly created copy.</p>
    pub fn version_id(&self) -> std::option::Option<&str> {
        self.version_id.as_deref()
    }
    /// <p>The server-side encryption algorithm used when storing this object in Amazon S3 (for example, AES256, aws:kms).</p>
    pub fn server_side_encryption(
        &self,
    ) -> std::option::Option<&crate::types::ServerSideEncryption> {
        self.server_side_encryption.as_ref()
    }
    /// <p>If server-side encryption with a customer-provided encryption key was requested, the response will include this header confirming the encryption algorithm used.</p>
    pub fn sse_customer_algorithm(&self) -> std::option::Option<&str> {
        self.sse_customer_algorithm.as_deref()
    }
    /// <p>If server-side encryption with a customer-provided encryption key was requested, the response will include this header to provide round-trip message integrity verification of the customer-provided encryption key.</p>
    pub fn sse_customer_key_md5(&self) -> std::option::Option<&str> {
        self.sse_customer_key_md5.as_deref()
    }
    /// <p>If present, specifies the ID of the Amazon Web Services Key Management Service (Amazon Web Services KMS) symmetric customer managed key that was used for the object.</p>
    pub fn ssekms_key_id(&self) -> std::option::Option<&str> {
        self.ssekms_key_id.as_deref()
    }
    /// <p>If present, specifies the Amazon Web Services KMS Encryption Context to use for object encryption. The value of this header is a base64-encoded UTF-8 string holding JSON with the encryption context key-value pairs.</p>
    pub fn ssekms_encryption_context(&self) -> std::option::Option<&str> {
        self.ssekms_encryption_context.as_deref()
    }
    /// <p>Indicates whether the copied object uses an S3 Bucket Key for server-side encryption with Amazon Web Services KMS (SSE-KMS).</p>
    pub fn bucket_key_enabled(&self) -> bool {
        self.bucket_key_enabled
    }
    /// <p>If present, indicates that the requester was successfully charged for the request.</p>
    pub fn request_charged(&self) -> std::option::Option<&crate::types::RequestCharged> {
        self.request_charged.as_ref()
    }
}
impl std::fmt::Debug for CopyObjectOutput {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut formatter = f.debug_struct("CopyObjectOutput");
        formatter.field("copy_object_result", &self.copy_object_result);
        formatter.field("expiration", &self.expiration);
        formatter.field("copy_source_version_id", &self.copy_source_version_id);
        formatter.field("version_id", &self.version_id);
        formatter.field("server_side_encryption", &self.server_side_encryption);
        formatter.field("sse_customer_algorithm", &self.sse_customer_algorithm);
        formatter.field("sse_customer_key_md5", &self.sse_customer_key_md5);
        formatter.field("ssekms_key_id", &"*** Sensitive Data Redacted ***");
        formatter.field(
            "ssekms_encryption_context",
            &"*** Sensitive Data Redacted ***",
        );
        formatter.field("bucket_key_enabled", &self.bucket_key_enabled);
        formatter.field("request_charged", &self.request_charged);
        formatter.field("_extended_request_id", &self._extended_request_id);
        formatter.field("_request_id", &self._request_id);
        formatter.finish()
    }
}
impl crate::s3_request_id::RequestIdExt for CopyObjectOutput {
    fn extended_request_id(&self) -> Option<&str> {
        self._extended_request_id.as_deref()
    }
}
impl aws_http::request_id::RequestId for CopyObjectOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl CopyObjectOutput {
    /// Creates a new builder-style object to manufacture [`CopyObjectOutput`](crate::operation::copy_object::CopyObjectOutput).
    pub fn builder() -> crate::operation::copy_object::builders::CopyObjectOutputBuilder {
        crate::operation::copy_object::builders::CopyObjectOutputBuilder::default()
    }
}

/// A builder for [`CopyObjectOutput`](crate::operation::copy_object::CopyObjectOutput).
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default)]
pub struct CopyObjectOutputBuilder {
    pub(crate) copy_object_result: std::option::Option<crate::types::CopyObjectResult>,
    pub(crate) expiration: std::option::Option<std::string::String>,
    pub(crate) copy_source_version_id: std::option::Option<std::string::String>,
    pub(crate) version_id: std::option::Option<std::string::String>,
    pub(crate) server_side_encryption: std::option::Option<crate::types::ServerSideEncryption>,
    pub(crate) sse_customer_algorithm: std::option::Option<std::string::String>,
    pub(crate) sse_customer_key_md5: std::option::Option<std::string::String>,
    pub(crate) ssekms_key_id: std::option::Option<std::string::String>,
    pub(crate) ssekms_encryption_context: std::option::Option<std::string::String>,
    pub(crate) bucket_key_enabled: std::option::Option<bool>,
    pub(crate) request_charged: std::option::Option<crate::types::RequestCharged>,
    _extended_request_id: Option<String>,
    _request_id: Option<String>,
}
impl CopyObjectOutputBuilder {
    /// <p>Container for all response elements.</p>
    pub fn copy_object_result(mut self, input: crate::types::CopyObjectResult) -> Self {
        self.copy_object_result = Some(input);
        self
    }
    /// <p>Container for all response elements.</p>
    pub fn set_copy_object_result(
        mut self,
        input: std::option::Option<crate::types::CopyObjectResult>,
    ) -> Self {
        self.copy_object_result = input;
        self
    }
    /// <p>If the object expiration is configured, the response includes this header.</p>
    pub fn expiration(mut self, input: impl Into<std::string::String>) -> Self {
        self.expiration = Some(input.into());
        self
    }
    /// <p>If the object expiration is configured, the response includes this header.</p>
    pub fn set_expiration(mut self, input: std::option::Option<std::string::String>) -> Self {
        self.expiration = input;
        self
    }
    /// <p>Version of the copied object in the destination bucket.</p>
    pub fn copy_source_version_id(mut self, input: impl Into<std::string::String>) -> Self {
        self.copy_source_version_id = Some(input.into());
        self
    }
    /// <p>Version of the copied object in the destination bucket.</p>
    pub fn set_copy_source_version_id(
        mut self,
        input: std::option::Option<std::string::String>,
    ) -> Self {
        self.copy_source_version_id = input;
        self
    }
    /// <p>Version ID of the newly created copy.</p>
    pub fn version_id(mut self, input: impl Into<std::string::String>) -> Self {
        self.version_id = Some(input.into());
        self
    }
    /// <p>Version ID of the newly created copy.</p>
    pub fn set_version_id(mut self, input: std::option::Option<std::string::String>) -> Self {
        self.version_id = input;
        self
    }
    /// <p>The server-side encryption algorithm used when storing this object in Amazon S3 (for example, AES256, aws:kms).</p>
    pub fn server_side_encryption(mut self, input: crate::types::ServerSideEncryption) -> Self {
        self.server_side_encryption = Some(input);
        self
    }
    /// <p>The server-side encryption algorithm used when storing this object in Amazon S3 (for example, AES256, aws:kms).</p>
    pub fn set_server_side_encryption(
        mut self,
        input: std::option::Option<crate::types::ServerSideEncryption>,
    ) -> Self {
        self.server_side_encryption = input;
        self
    }
    /// <p>If server-side encryption with a customer-provided encryption key was requested, the response will include this header confirming the encryption algorithm used.</p>
    pub fn sse_customer_algorithm(mut self, input: impl Into<std::string::String>) -> Self {
        self.sse_customer_algorithm = Some(input.into());
        self
    }
    /// <p>If server-side encryption with a customer-provided encryption key was requested, the response will include this header confirming the encryption algorithm used.</p>
    pub fn set_sse_customer_algorithm(
        mut self,
        input: std::option::Option<std::string::String>,
    ) -> Self {
        self.sse_customer_algorithm = input;
        self
    }
    /// <p>If server-side encryption with a customer-provided encryption key was requested, the response will include this header to provide round-trip message integrity verification of the customer-provided encryption key.</p>
    pub fn sse_customer_key_md5(mut self, input: impl Into<std::string::String>) -> Self {
        self.sse_customer_key_md5 = Some(input.into());
        self
    }
    /// <p>If server-side encryption with a customer-provided encryption key was requested, the response will include this header to provide round-trip message integrity verification of the customer-provided encryption key.</p>
    pub fn set_sse_customer_key_md5(
        mut self,
        input: std::option::Option<std::string::String>,
    ) -> Self {
        self.sse_customer_key_md5 = input;
        self
    }
    /// <p>If present, specifies the ID of the Amazon Web Services Key Management Service (Amazon Web Services KMS) symmetric customer managed key that was used for the object.</p>
    pub fn ssekms_key_id(mut self, input: impl Into<std::string::String>) -> Self {
        self.ssekms_key_id = Some(input.into());
        self
    }
    /// <p>If present, specifies the ID of the Amazon Web Services Key Management Service (Amazon Web Services KMS) symmetric customer managed key that was used for the object.</p>
    pub fn set_ssekms_key_id(mut self, input: std::option::Option<std::string::String>) -> Self {
        self.ssekms_key_id = input;
        self
    }
    /// <p>If present, specifies the Amazon Web Services KMS Encryption Context to use for object encryption. The value of this header is a base64-encoded UTF-8 string holding JSON with the encryption context key-value pairs.</p>
    pub fn ssekms_encryption_context(mut self, input: impl Into<std::string::String>) -> Self {
        self.ssekms_encryption_context = Some(input.into());
        self
    }
    /// <p>If present, specifies the Amazon Web Services KMS Encryption Context to use for object encryption. The value of this header is a base64-encoded UTF-8 string holding JSON with the encryption context key-value pairs.</p>
    pub fn set_ssekms_encryption_context(
        mut self,
        input: std::option::Option<std::string::String>,
    ) -> Self {
        self.ssekms_encryption_context = input;
        self
    }
    /// <p>Indicates whether the copied object uses an S3 Bucket Key for server-side encryption with Amazon Web Services KMS (SSE-KMS).</p>
    pub fn bucket_key_enabled(mut self, input: bool) -> Self {
        self.bucket_key_enabled = Some(input);
        self
    }
    /// <p>Indicates whether the copied object uses an S3 Bucket Key for server-side encryption with Amazon Web Services KMS (SSE-KMS).</p>
    pub fn set_bucket_key_enabled(mut self, input: std::option::Option<bool>) -> Self {
        self.bucket_key_enabled = input;
        self
    }
    /// <p>If present, indicates that the requester was successfully charged for the request.</p>
    pub fn request_charged(mut self, input: crate::types::RequestCharged) -> Self {
        self.request_charged = Some(input);
        self
    }
    /// <p>If present, indicates that the requester was successfully charged for the request.</p>
    pub fn set_request_charged(
        mut self,
        input: std::option::Option<crate::types::RequestCharged>,
    ) -> Self {
        self.request_charged = input;
        self
    }
    pub(crate) fn _extended_request_id(mut self, extended_request_id: impl Into<String>) -> Self {
        self._extended_request_id = Some(extended_request_id.into());
        self
    }

    pub(crate) fn _set_extended_request_id(
        &mut self,
        extended_request_id: Option<String>,
    ) -> &mut Self {
        self._extended_request_id = extended_request_id;
        self
    }
    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
        self._request_id = Some(request_id.into());
        self
    }

    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
        self._request_id = request_id;
        self
    }
    /// Consumes the builder and constructs a [`CopyObjectOutput`](crate::operation::copy_object::CopyObjectOutput).
    pub fn build(self) -> crate::operation::copy_object::CopyObjectOutput {
        crate::operation::copy_object::CopyObjectOutput {
            copy_object_result: self.copy_object_result,
            expiration: self.expiration,
            copy_source_version_id: self.copy_source_version_id,
            version_id: self.version_id,
            server_side_encryption: self.server_side_encryption,
            sse_customer_algorithm: self.sse_customer_algorithm,
            sse_customer_key_md5: self.sse_customer_key_md5,
            ssekms_key_id: self.ssekms_key_id,
            ssekms_encryption_context: self.ssekms_encryption_context,
            bucket_key_enabled: self.bucket_key_enabled.unwrap_or_default(),
            request_charged: self.request_charged,
            _extended_request_id: self._extended_request_id,
            _request_id: self._request_id,
        }
    }
}
impl std::fmt::Debug for CopyObjectOutputBuilder {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut formatter = f.debug_struct("CopyObjectOutputBuilder");
        formatter.field("copy_object_result", &self.copy_object_result);
        formatter.field("expiration", &self.expiration);
        formatter.field("copy_source_version_id", &self.copy_source_version_id);
        formatter.field("version_id", &self.version_id);
        formatter.field("server_side_encryption", &self.server_side_encryption);
        formatter.field("sse_customer_algorithm", &self.sse_customer_algorithm);
        formatter.field("sse_customer_key_md5", &self.sse_customer_key_md5);
        formatter.field("ssekms_key_id", &"*** Sensitive Data Redacted ***");
        formatter.field(
            "ssekms_encryption_context",
            &"*** Sensitive Data Redacted ***",
        );
        formatter.field("bucket_key_enabled", &self.bucket_key_enabled);
        formatter.field("request_charged", &self.request_charged);
        formatter.field("_extended_request_id", &self._extended_request_id);
        formatter.field("_request_id", &self._request_id);
        formatter.finish()
    }
}