1 /**
2  * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3  * SPDX-License-Identifier: Apache-2.0.
4  */
5 
6 #pragma once
7 #include <aws/s3/S3_EXPORTS.h>
8 #include <aws/core/utils/memory/stl/AWSString.h>
9 #include <aws/s3/model/ServerSideEncryption.h>
10 #include <aws/s3/model/RequestCharged.h>
11 #include <aws/s3/model/CopyObjectResultDetails.h>
12 #include <utility>
13 
14 namespace Aws
15 {
16 template<typename RESULT_TYPE>
17 class AmazonWebServiceResult;
18 
19 namespace Utils
20 {
21 namespace Xml
22 {
23   class XmlDocument;
24 } // namespace Xml
25 } // namespace Utils
26 namespace S3
27 {
28 namespace Model
29 {
30   class AWS_S3_API CopyObjectResult
31   {
32   public:
33     CopyObjectResult();
34     CopyObjectResult(const Aws::AmazonWebServiceResult<Aws::Utils::Xml::XmlDocument>& result);
35     CopyObjectResult& operator=(const Aws::AmazonWebServiceResult<Aws::Utils::Xml::XmlDocument>& result);
36 
37 
38     /**
39      * <p>If the object expiration is configured, the response includes this
40      * header.</p>
41      */
GetExpiration()42     inline const Aws::String& GetExpiration() const{ return m_expiration; }
43 
44     /**
45      * <p>If the object expiration is configured, the response includes this
46      * header.</p>
47      */
SetExpiration(const Aws::String & value)48     inline void SetExpiration(const Aws::String& value) { m_expiration = value; }
49 
50     /**
51      * <p>If the object expiration is configured, the response includes this
52      * header.</p>
53      */
SetExpiration(Aws::String && value)54     inline void SetExpiration(Aws::String&& value) { m_expiration = std::move(value); }
55 
56     /**
57      * <p>If the object expiration is configured, the response includes this
58      * header.</p>
59      */
SetExpiration(const char * value)60     inline void SetExpiration(const char* value) { m_expiration.assign(value); }
61 
62     /**
63      * <p>If the object expiration is configured, the response includes this
64      * header.</p>
65      */
WithExpiration(const Aws::String & value)66     inline CopyObjectResult& WithExpiration(const Aws::String& value) { SetExpiration(value); return *this;}
67 
68     /**
69      * <p>If the object expiration is configured, the response includes this
70      * header.</p>
71      */
WithExpiration(Aws::String && value)72     inline CopyObjectResult& WithExpiration(Aws::String&& value) { SetExpiration(std::move(value)); return *this;}
73 
74     /**
75      * <p>If the object expiration is configured, the response includes this
76      * header.</p>
77      */
WithExpiration(const char * value)78     inline CopyObjectResult& WithExpiration(const char* value) { SetExpiration(value); return *this;}
79 
80 
81     /**
82      * <p>Version of the copied object in the destination bucket.</p>
83      */
GetCopySourceVersionId()84     inline const Aws::String& GetCopySourceVersionId() const{ return m_copySourceVersionId; }
85 
86     /**
87      * <p>Version of the copied object in the destination bucket.</p>
88      */
SetCopySourceVersionId(const Aws::String & value)89     inline void SetCopySourceVersionId(const Aws::String& value) { m_copySourceVersionId = value; }
90 
91     /**
92      * <p>Version of the copied object in the destination bucket.</p>
93      */
SetCopySourceVersionId(Aws::String && value)94     inline void SetCopySourceVersionId(Aws::String&& value) { m_copySourceVersionId = std::move(value); }
95 
96     /**
97      * <p>Version of the copied object in the destination bucket.</p>
98      */
SetCopySourceVersionId(const char * value)99     inline void SetCopySourceVersionId(const char* value) { m_copySourceVersionId.assign(value); }
100 
101     /**
102      * <p>Version of the copied object in the destination bucket.</p>
103      */
WithCopySourceVersionId(const Aws::String & value)104     inline CopyObjectResult& WithCopySourceVersionId(const Aws::String& value) { SetCopySourceVersionId(value); return *this;}
105 
106     /**
107      * <p>Version of the copied object in the destination bucket.</p>
108      */
WithCopySourceVersionId(Aws::String && value)109     inline CopyObjectResult& WithCopySourceVersionId(Aws::String&& value) { SetCopySourceVersionId(std::move(value)); return *this;}
110 
111     /**
112      * <p>Version of the copied object in the destination bucket.</p>
113      */
WithCopySourceVersionId(const char * value)114     inline CopyObjectResult& WithCopySourceVersionId(const char* value) { SetCopySourceVersionId(value); return *this;}
115 
116 
117     /**
118      * <p>Version ID of the newly created copy.</p>
119      */
GetVersionId()120     inline const Aws::String& GetVersionId() const{ return m_versionId; }
121 
122     /**
123      * <p>Version ID of the newly created copy.</p>
124      */
SetVersionId(const Aws::String & value)125     inline void SetVersionId(const Aws::String& value) { m_versionId = value; }
126 
127     /**
128      * <p>Version ID of the newly created copy.</p>
129      */
SetVersionId(Aws::String && value)130     inline void SetVersionId(Aws::String&& value) { m_versionId = std::move(value); }
131 
132     /**
133      * <p>Version ID of the newly created copy.</p>
134      */
SetVersionId(const char * value)135     inline void SetVersionId(const char* value) { m_versionId.assign(value); }
136 
137     /**
138      * <p>Version ID of the newly created copy.</p>
139      */
WithVersionId(const Aws::String & value)140     inline CopyObjectResult& WithVersionId(const Aws::String& value) { SetVersionId(value); return *this;}
141 
142     /**
143      * <p>Version ID of the newly created copy.</p>
144      */
WithVersionId(Aws::String && value)145     inline CopyObjectResult& WithVersionId(Aws::String&& value) { SetVersionId(std::move(value)); return *this;}
146 
147     /**
148      * <p>Version ID of the newly created copy.</p>
149      */
WithVersionId(const char * value)150     inline CopyObjectResult& WithVersionId(const char* value) { SetVersionId(value); return *this;}
151 
152 
153     /**
154      * <p>The server-side encryption algorithm used when storing this object in Amazon
155      * S3 (for example, AES256, aws:kms).</p>
156      */
GetServerSideEncryption()157     inline const ServerSideEncryption& GetServerSideEncryption() const{ return m_serverSideEncryption; }
158 
159     /**
160      * <p>The server-side encryption algorithm used when storing this object in Amazon
161      * S3 (for example, AES256, aws:kms).</p>
162      */
SetServerSideEncryption(const ServerSideEncryption & value)163     inline void SetServerSideEncryption(const ServerSideEncryption& value) { m_serverSideEncryption = value; }
164 
165     /**
166      * <p>The server-side encryption algorithm used when storing this object in Amazon
167      * S3 (for example, AES256, aws:kms).</p>
168      */
SetServerSideEncryption(ServerSideEncryption && value)169     inline void SetServerSideEncryption(ServerSideEncryption&& value) { m_serverSideEncryption = std::move(value); }
170 
171     /**
172      * <p>The server-side encryption algorithm used when storing this object in Amazon
173      * S3 (for example, AES256, aws:kms).</p>
174      */
WithServerSideEncryption(const ServerSideEncryption & value)175     inline CopyObjectResult& WithServerSideEncryption(const ServerSideEncryption& value) { SetServerSideEncryption(value); return *this;}
176 
177     /**
178      * <p>The server-side encryption algorithm used when storing this object in Amazon
179      * S3 (for example, AES256, aws:kms).</p>
180      */
WithServerSideEncryption(ServerSideEncryption && value)181     inline CopyObjectResult& WithServerSideEncryption(ServerSideEncryption&& value) { SetServerSideEncryption(std::move(value)); return *this;}
182 
183 
184     /**
185      * <p>If server-side encryption with a customer-provided encryption key was
186      * requested, the response will include this header confirming the encryption
187      * algorithm used.</p>
188      */
GetSSECustomerAlgorithm()189     inline const Aws::String& GetSSECustomerAlgorithm() const{ return m_sSECustomerAlgorithm; }
190 
191     /**
192      * <p>If server-side encryption with a customer-provided encryption key was
193      * requested, the response will include this header confirming the encryption
194      * algorithm used.</p>
195      */
SetSSECustomerAlgorithm(const Aws::String & value)196     inline void SetSSECustomerAlgorithm(const Aws::String& value) { m_sSECustomerAlgorithm = value; }
197 
198     /**
199      * <p>If server-side encryption with a customer-provided encryption key was
200      * requested, the response will include this header confirming the encryption
201      * algorithm used.</p>
202      */
SetSSECustomerAlgorithm(Aws::String && value)203     inline void SetSSECustomerAlgorithm(Aws::String&& value) { m_sSECustomerAlgorithm = std::move(value); }
204 
205     /**
206      * <p>If server-side encryption with a customer-provided encryption key was
207      * requested, the response will include this header confirming the encryption
208      * algorithm used.</p>
209      */
SetSSECustomerAlgorithm(const char * value)210     inline void SetSSECustomerAlgorithm(const char* value) { m_sSECustomerAlgorithm.assign(value); }
211 
212     /**
213      * <p>If server-side encryption with a customer-provided encryption key was
214      * requested, the response will include this header confirming the encryption
215      * algorithm used.</p>
216      */
WithSSECustomerAlgorithm(const Aws::String & value)217     inline CopyObjectResult& WithSSECustomerAlgorithm(const Aws::String& value) { SetSSECustomerAlgorithm(value); return *this;}
218 
219     /**
220      * <p>If server-side encryption with a customer-provided encryption key was
221      * requested, the response will include this header confirming the encryption
222      * algorithm used.</p>
223      */
WithSSECustomerAlgorithm(Aws::String && value)224     inline CopyObjectResult& WithSSECustomerAlgorithm(Aws::String&& value) { SetSSECustomerAlgorithm(std::move(value)); return *this;}
225 
226     /**
227      * <p>If server-side encryption with a customer-provided encryption key was
228      * requested, the response will include this header confirming the encryption
229      * algorithm used.</p>
230      */
WithSSECustomerAlgorithm(const char * value)231     inline CopyObjectResult& WithSSECustomerAlgorithm(const char* value) { SetSSECustomerAlgorithm(value); return *this;}
232 
233 
234     /**
235      * <p>If server-side encryption with a customer-provided encryption key was
236      * requested, the response will include this header to provide round-trip message
237      * integrity verification of the customer-provided encryption key.</p>
238      */
GetSSECustomerKeyMD5()239     inline const Aws::String& GetSSECustomerKeyMD5() const{ return m_sSECustomerKeyMD5; }
240 
241     /**
242      * <p>If server-side encryption with a customer-provided encryption key was
243      * requested, the response will include this header to provide round-trip message
244      * integrity verification of the customer-provided encryption key.</p>
245      */
SetSSECustomerKeyMD5(const Aws::String & value)246     inline void SetSSECustomerKeyMD5(const Aws::String& value) { m_sSECustomerKeyMD5 = value; }
247 
248     /**
249      * <p>If server-side encryption with a customer-provided encryption key was
250      * requested, the response will include this header to provide round-trip message
251      * integrity verification of the customer-provided encryption key.</p>
252      */
SetSSECustomerKeyMD5(Aws::String && value)253     inline void SetSSECustomerKeyMD5(Aws::String&& value) { m_sSECustomerKeyMD5 = std::move(value); }
254 
255     /**
256      * <p>If server-side encryption with a customer-provided encryption key was
257      * requested, the response will include this header to provide round-trip message
258      * integrity verification of the customer-provided encryption key.</p>
259      */
SetSSECustomerKeyMD5(const char * value)260     inline void SetSSECustomerKeyMD5(const char* value) { m_sSECustomerKeyMD5.assign(value); }
261 
262     /**
263      * <p>If server-side encryption with a customer-provided encryption key was
264      * requested, the response will include this header to provide round-trip message
265      * integrity verification of the customer-provided encryption key.</p>
266      */
WithSSECustomerKeyMD5(const Aws::String & value)267     inline CopyObjectResult& WithSSECustomerKeyMD5(const Aws::String& value) { SetSSECustomerKeyMD5(value); return *this;}
268 
269     /**
270      * <p>If server-side encryption with a customer-provided encryption key was
271      * requested, the response will include this header to provide round-trip message
272      * integrity verification of the customer-provided encryption key.</p>
273      */
WithSSECustomerKeyMD5(Aws::String && value)274     inline CopyObjectResult& WithSSECustomerKeyMD5(Aws::String&& value) { SetSSECustomerKeyMD5(std::move(value)); return *this;}
275 
276     /**
277      * <p>If server-side encryption with a customer-provided encryption key was
278      * requested, the response will include this header to provide round-trip message
279      * integrity verification of the customer-provided encryption key.</p>
280      */
WithSSECustomerKeyMD5(const char * value)281     inline CopyObjectResult& WithSSECustomerKeyMD5(const char* value) { SetSSECustomerKeyMD5(value); return *this;}
282 
283 
284     /**
285      * <p>If present, specifies the ID of the Amazon Web Services Key Management
286      * Service (Amazon Web Services KMS) symmetric customer managed key that was used
287      * for the object.</p>
288      */
GetSSEKMSKeyId()289     inline const Aws::String& GetSSEKMSKeyId() const{ return m_sSEKMSKeyId; }
290 
291     /**
292      * <p>If present, specifies the ID of the Amazon Web Services Key Management
293      * Service (Amazon Web Services KMS) symmetric customer managed key that was used
294      * for the object.</p>
295      */
SetSSEKMSKeyId(const Aws::String & value)296     inline void SetSSEKMSKeyId(const Aws::String& value) { m_sSEKMSKeyId = value; }
297 
298     /**
299      * <p>If present, specifies the ID of the Amazon Web Services Key Management
300      * Service (Amazon Web Services KMS) symmetric customer managed key that was used
301      * for the object.</p>
302      */
SetSSEKMSKeyId(Aws::String && value)303     inline void SetSSEKMSKeyId(Aws::String&& value) { m_sSEKMSKeyId = std::move(value); }
304 
305     /**
306      * <p>If present, specifies the ID of the Amazon Web Services Key Management
307      * Service (Amazon Web Services KMS) symmetric customer managed key that was used
308      * for the object.</p>
309      */
SetSSEKMSKeyId(const char * value)310     inline void SetSSEKMSKeyId(const char* value) { m_sSEKMSKeyId.assign(value); }
311 
312     /**
313      * <p>If present, specifies the ID of the Amazon Web Services Key Management
314      * Service (Amazon Web Services KMS) symmetric customer managed key that was used
315      * for the object.</p>
316      */
WithSSEKMSKeyId(const Aws::String & value)317     inline CopyObjectResult& WithSSEKMSKeyId(const Aws::String& value) { SetSSEKMSKeyId(value); return *this;}
318 
319     /**
320      * <p>If present, specifies the ID of the Amazon Web Services Key Management
321      * Service (Amazon Web Services KMS) symmetric customer managed key that was used
322      * for the object.</p>
323      */
WithSSEKMSKeyId(Aws::String && value)324     inline CopyObjectResult& WithSSEKMSKeyId(Aws::String&& value) { SetSSEKMSKeyId(std::move(value)); return *this;}
325 
326     /**
327      * <p>If present, specifies the ID of the Amazon Web Services Key Management
328      * Service (Amazon Web Services KMS) symmetric customer managed key that was used
329      * for the object.</p>
330      */
WithSSEKMSKeyId(const char * value)331     inline CopyObjectResult& WithSSEKMSKeyId(const char* value) { SetSSEKMSKeyId(value); return *this;}
332 
333 
334     /**
335      * <p>If present, specifies the Amazon Web Services KMS Encryption Context to use
336      * for object encryption. The value of this header is a base64-encoded UTF-8 string
337      * holding JSON with the encryption context key-value pairs.</p>
338      */
GetSSEKMSEncryptionContext()339     inline const Aws::String& GetSSEKMSEncryptionContext() const{ return m_sSEKMSEncryptionContext; }
340 
341     /**
342      * <p>If present, specifies the Amazon Web Services KMS Encryption Context to use
343      * for object encryption. The value of this header is a base64-encoded UTF-8 string
344      * holding JSON with the encryption context key-value pairs.</p>
345      */
SetSSEKMSEncryptionContext(const Aws::String & value)346     inline void SetSSEKMSEncryptionContext(const Aws::String& value) { m_sSEKMSEncryptionContext = value; }
347 
348     /**
349      * <p>If present, specifies the Amazon Web Services KMS Encryption Context to use
350      * for object encryption. The value of this header is a base64-encoded UTF-8 string
351      * holding JSON with the encryption context key-value pairs.</p>
352      */
SetSSEKMSEncryptionContext(Aws::String && value)353     inline void SetSSEKMSEncryptionContext(Aws::String&& value) { m_sSEKMSEncryptionContext = std::move(value); }
354 
355     /**
356      * <p>If present, specifies the Amazon Web Services KMS Encryption Context to use
357      * for object encryption. The value of this header is a base64-encoded UTF-8 string
358      * holding JSON with the encryption context key-value pairs.</p>
359      */
SetSSEKMSEncryptionContext(const char * value)360     inline void SetSSEKMSEncryptionContext(const char* value) { m_sSEKMSEncryptionContext.assign(value); }
361 
362     /**
363      * <p>If present, specifies the Amazon Web Services KMS Encryption Context to use
364      * for object encryption. The value of this header is a base64-encoded UTF-8 string
365      * holding JSON with the encryption context key-value pairs.</p>
366      */
WithSSEKMSEncryptionContext(const Aws::String & value)367     inline CopyObjectResult& WithSSEKMSEncryptionContext(const Aws::String& value) { SetSSEKMSEncryptionContext(value); return *this;}
368 
369     /**
370      * <p>If present, specifies the Amazon Web Services KMS Encryption Context to use
371      * for object encryption. The value of this header is a base64-encoded UTF-8 string
372      * holding JSON with the encryption context key-value pairs.</p>
373      */
WithSSEKMSEncryptionContext(Aws::String && value)374     inline CopyObjectResult& WithSSEKMSEncryptionContext(Aws::String&& value) { SetSSEKMSEncryptionContext(std::move(value)); return *this;}
375 
376     /**
377      * <p>If present, specifies the Amazon Web Services KMS Encryption Context to use
378      * for object encryption. The value of this header is a base64-encoded UTF-8 string
379      * holding JSON with the encryption context key-value pairs.</p>
380      */
WithSSEKMSEncryptionContext(const char * value)381     inline CopyObjectResult& WithSSEKMSEncryptionContext(const char* value) { SetSSEKMSEncryptionContext(value); return *this;}
382 
383 
384     /**
385      * <p>Indicates whether the copied object uses an S3 Bucket Key for server-side
386      * encryption with Amazon Web Services KMS (SSE-KMS).</p>
387      */
GetBucketKeyEnabled()388     inline bool GetBucketKeyEnabled() const{ return m_bucketKeyEnabled; }
389 
390     /**
391      * <p>Indicates whether the copied object uses an S3 Bucket Key for server-side
392      * encryption with Amazon Web Services KMS (SSE-KMS).</p>
393      */
SetBucketKeyEnabled(bool value)394     inline void SetBucketKeyEnabled(bool value) { m_bucketKeyEnabled = value; }
395 
396     /**
397      * <p>Indicates whether the copied object uses an S3 Bucket Key for server-side
398      * encryption with Amazon Web Services KMS (SSE-KMS).</p>
399      */
WithBucketKeyEnabled(bool value)400     inline CopyObjectResult& WithBucketKeyEnabled(bool value) { SetBucketKeyEnabled(value); return *this;}
401 
402 
403 
GetRequestCharged()404     inline const RequestCharged& GetRequestCharged() const{ return m_requestCharged; }
405 
406 
SetRequestCharged(const RequestCharged & value)407     inline void SetRequestCharged(const RequestCharged& value) { m_requestCharged = value; }
408 
409 
SetRequestCharged(RequestCharged && value)410     inline void SetRequestCharged(RequestCharged&& value) { m_requestCharged = std::move(value); }
411 
412 
WithRequestCharged(const RequestCharged & value)413     inline CopyObjectResult& WithRequestCharged(const RequestCharged& value) { SetRequestCharged(value); return *this;}
414 
415 
WithRequestCharged(RequestCharged && value)416     inline CopyObjectResult& WithRequestCharged(RequestCharged&& value) { SetRequestCharged(std::move(value)); return *this;}
417 
418 
419     /**
420      * <p>Container for all response elements.</p>
421      */
GetCopyObjectResultDetails()422     inline const CopyObjectResultDetails& GetCopyObjectResultDetails() const{ return m_copyObjectResultDetails; }
423 
424     /**
425      * <p>Container for all response elements.</p>
426      */
SetCopyObjectResultDetails(const CopyObjectResultDetails & value)427     inline void SetCopyObjectResultDetails(const CopyObjectResultDetails& value) { m_copyObjectResultDetails = value; }
428 
429     /**
430      * <p>Container for all response elements.</p>
431      */
SetCopyObjectResultDetails(CopyObjectResultDetails && value)432     inline void SetCopyObjectResultDetails(CopyObjectResultDetails&& value) { m_copyObjectResultDetails = std::move(value); }
433 
434     /**
435      * <p>Container for all response elements.</p>
436      */
WithCopyObjectResultDetails(const CopyObjectResultDetails & value)437     inline CopyObjectResult& WithCopyObjectResultDetails(const CopyObjectResultDetails& value) { SetCopyObjectResultDetails(value); return *this;}
438 
439     /**
440      * <p>Container for all response elements.</p>
441      */
WithCopyObjectResultDetails(CopyObjectResultDetails && value)442     inline CopyObjectResult& WithCopyObjectResultDetails(CopyObjectResultDetails&& value) { SetCopyObjectResultDetails(std::move(value)); return *this;}
443 
444   private:
445 
446     Aws::String m_expiration;
447 
448     Aws::String m_copySourceVersionId;
449 
450     Aws::String m_versionId;
451 
452     ServerSideEncryption m_serverSideEncryption;
453 
454     Aws::String m_sSECustomerAlgorithm;
455 
456     Aws::String m_sSECustomerKeyMD5;
457 
458     Aws::String m_sSEKMSKeyId;
459 
460     Aws::String m_sSEKMSEncryptionContext;
461 
462     bool m_bucketKeyEnabled;
463 
464     RequestCharged m_requestCharged;
465 
466     CopyObjectResultDetails m_copyObjectResultDetails;
467   };
468 
469 } // namespace Model
470 } // namespace S3
471 } // namespace Aws
472