aws_sdk_s3/operation/put_object/
_put_object_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 PutObjectOutput {
6    /// <p>If the expiration is configured for the object (see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycleConfiguration.html">PutBucketLifecycleConfiguration</a>) in the <i>Amazon S3 User Guide</i>, the response includes this header. It includes the <code>expiry-date</code> and <code>rule-id</code> key-value pairs that provide information about object expiration. The value of the <code>rule-id</code> is URL-encoded.</p><note>
7    /// <p>This functionality is not supported for directory buckets.</p>
8    /// </note>
9    pub expiration: ::std::option::Option<::std::string::String>,
10    /// <p>Entity tag for the uploaded object.</p>
11    /// <p><b>General purpose buckets </b> - To ensure that data is not corrupted traversing the network, for objects where the ETag is the MD5 digest of the object, you can calculate the MD5 while putting an object to Amazon S3 and compare the returned ETag to the calculated MD5 value.</p>
12    /// <p><b>Directory buckets </b> - The ETag for the object in a directory bucket isn't the MD5 digest of the object.</p>
13    pub e_tag: ::std::option::Option<::std::string::String>,
14    /// <p>The base64-encoded, 32-bit CRC32 checksum of the object. This will only be present if it 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: ::std::option::Option<::std::string::String>,
16    /// <p>The base64-encoded, 32-bit CRC32C checksum of the object. This will only be present if it 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>
17    pub checksum_crc32_c: ::std::option::Option<::std::string::String>,
18    /// <p>The base64-encoded, 160-bit SHA-1 digest of the object. This will only be present if it 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 SHA-256 digest of the object. This will only be present if it 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>The server-side encryption algorithm used when you store this object in Amazon S3 (for example, <code>AES256</code>, <code>aws:kms</code>, <code>aws:kms:dsse</code>).</p><note>
23    /// <p>For directory buckets, only server-side encryption with Amazon S3 managed keys (SSE-S3) (<code>AES256</code>) is supported.</p>
24    /// </note>
25    pub server_side_encryption: ::std::option::Option<crate::types::ServerSideEncryption>,
26    /// <p>Version ID of the object.</p>
27    /// <p>If you enable versioning for a bucket, Amazon S3 automatically generates a unique version ID for the object being stored. Amazon S3 returns this ID in the response. When you enable versioning for a bucket, if Amazon S3 receives multiple write requests for the same object simultaneously, it stores all of the objects. For more information about versioning, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/AddingObjectstoVersioningEnabledBuckets.html">Adding Objects to Versioning-Enabled Buckets</a> in the <i>Amazon S3 User Guide</i>. For information about returning the versioning state of a bucket, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketVersioning.html">GetBucketVersioning</a>.</p><note>
28    /// <p>This functionality is not supported for directory buckets.</p>
29    /// </note>
30    pub version_id: ::std::option::Option<::std::string::String>,
31    /// <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>
32    /// <p>This functionality is not supported for directory buckets.</p>
33    /// </note>
34    pub sse_customer_algorithm: ::std::option::Option<::std::string::String>,
35    /// <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>
36    /// <p>This functionality is not supported for directory buckets.</p>
37    /// </note>
38    pub sse_customer_key_md5: ::std::option::Option<::std::string::String>,
39    /// <p>If <code>x-amz-server-side-encryption</code> has a valid value of <code>aws:kms</code> or <code>aws:kms:dsse</code>, this header indicates the ID of the Key Management Service (KMS) symmetric encryption customer managed key that was used for the object.</p><note>
40    /// <p>This functionality is not supported for directory buckets.</p>
41    /// </note>
42    pub ssekms_key_id: ::std::option::Option<::std::string::String>,
43    /// <p>If present, indicates 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. This value is stored as object metadata and automatically gets passed on to Amazon Web Services KMS for future <code>GetObject</code> or <code>CopyObject</code> operations on this object.</p><note>
44    /// <p>This functionality is not supported for directory buckets.</p>
45    /// </note>
46    pub ssekms_encryption_context: ::std::option::Option<::std::string::String>,
47    /// <p>Indicates whether the uploaded object uses an S3 Bucket Key for server-side encryption with Key Management Service (KMS) keys (SSE-KMS).</p><note>
48    /// <p>This functionality is not supported for directory buckets.</p>
49    /// </note>
50    pub bucket_key_enabled: ::std::option::Option<bool>,
51    /// <p>If present, indicates that the requester was successfully charged for the request.</p><note>
52    /// <p>This functionality is not supported for directory buckets.</p>
53    /// </note>
54    pub request_charged: ::std::option::Option<crate::types::RequestCharged>,
55    _extended_request_id: Option<String>,
56    _request_id: Option<String>,
57}
58impl PutObjectOutput {
59    /// <p>If the expiration is configured for the object (see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycleConfiguration.html">PutBucketLifecycleConfiguration</a>) in the <i>Amazon S3 User Guide</i>, the response includes this header. It includes the <code>expiry-date</code> and <code>rule-id</code> key-value pairs that provide information about object expiration. The value of the <code>rule-id</code> is URL-encoded.</p><note>
60    /// <p>This functionality is not supported for directory buckets.</p>
61    /// </note>
62    pub fn expiration(&self) -> ::std::option::Option<&str> {
63        self.expiration.as_deref()
64    }
65    /// <p>Entity tag for the uploaded object.</p>
66    /// <p><b>General purpose buckets </b> - To ensure that data is not corrupted traversing the network, for objects where the ETag is the MD5 digest of the object, you can calculate the MD5 while putting an object to Amazon S3 and compare the returned ETag to the calculated MD5 value.</p>
67    /// <p><b>Directory buckets </b> - The ETag for the object in a directory bucket isn't the MD5 digest of the object.</p>
68    pub fn e_tag(&self) -> ::std::option::Option<&str> {
69        self.e_tag.as_deref()
70    }
71    /// <p>The base64-encoded, 32-bit CRC32 checksum of the object. This will only be present if it 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>
72    pub fn checksum_crc32(&self) -> ::std::option::Option<&str> {
73        self.checksum_crc32.as_deref()
74    }
75    /// <p>The base64-encoded, 32-bit CRC32C checksum of the object. This will only be present if it 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>
76    pub fn checksum_crc32_c(&self) -> ::std::option::Option<&str> {
77        self.checksum_crc32_c.as_deref()
78    }
79    /// <p>The base64-encoded, 160-bit SHA-1 digest of the object. This will only be present if it 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>
80    pub fn checksum_sha1(&self) -> ::std::option::Option<&str> {
81        self.checksum_sha1.as_deref()
82    }
83    /// <p>The base64-encoded, 256-bit SHA-256 digest of the object. This will only be present if it 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>
84    pub fn checksum_sha256(&self) -> ::std::option::Option<&str> {
85        self.checksum_sha256.as_deref()
86    }
87    /// <p>The server-side encryption algorithm used when you store this object in Amazon S3 (for example, <code>AES256</code>, <code>aws:kms</code>, <code>aws:kms:dsse</code>).</p><note>
88    /// <p>For directory buckets, only server-side encryption with Amazon S3 managed keys (SSE-S3) (<code>AES256</code>) is supported.</p>
89    /// </note>
90    pub fn server_side_encryption(&self) -> ::std::option::Option<&crate::types::ServerSideEncryption> {
91        self.server_side_encryption.as_ref()
92    }
93    /// <p>Version ID of the object.</p>
94    /// <p>If you enable versioning for a bucket, Amazon S3 automatically generates a unique version ID for the object being stored. Amazon S3 returns this ID in the response. When you enable versioning for a bucket, if Amazon S3 receives multiple write requests for the same object simultaneously, it stores all of the objects. For more information about versioning, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/AddingObjectstoVersioningEnabledBuckets.html">Adding Objects to Versioning-Enabled Buckets</a> in the <i>Amazon S3 User Guide</i>. For information about returning the versioning state of a bucket, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketVersioning.html">GetBucketVersioning</a>.</p><note>
95    /// <p>This functionality is not supported for directory buckets.</p>
96    /// </note>
97    pub fn version_id(&self) -> ::std::option::Option<&str> {
98        self.version_id.as_deref()
99    }
100    /// <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>
101    /// <p>This functionality is not supported for directory buckets.</p>
102    /// </note>
103    pub fn sse_customer_algorithm(&self) -> ::std::option::Option<&str> {
104        self.sse_customer_algorithm.as_deref()
105    }
106    /// <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>
107    /// <p>This functionality is not supported for directory buckets.</p>
108    /// </note>
109    pub fn sse_customer_key_md5(&self) -> ::std::option::Option<&str> {
110        self.sse_customer_key_md5.as_deref()
111    }
112    /// <p>If <code>x-amz-server-side-encryption</code> has a valid value of <code>aws:kms</code> or <code>aws:kms:dsse</code>, this header indicates the ID of the Key Management Service (KMS) symmetric encryption customer managed key that was used for the object.</p><note>
113    /// <p>This functionality is not supported for directory buckets.</p>
114    /// </note>
115    pub fn ssekms_key_id(&self) -> ::std::option::Option<&str> {
116        self.ssekms_key_id.as_deref()
117    }
118    /// <p>If present, indicates 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. This value is stored as object metadata and automatically gets passed on to Amazon Web Services KMS for future <code>GetObject</code> or <code>CopyObject</code> operations on this object.</p><note>
119    /// <p>This functionality is not supported for directory buckets.</p>
120    /// </note>
121    pub fn ssekms_encryption_context(&self) -> ::std::option::Option<&str> {
122        self.ssekms_encryption_context.as_deref()
123    }
124    /// <p>Indicates whether the uploaded object uses an S3 Bucket Key for server-side encryption with Key Management Service (KMS) keys (SSE-KMS).</p><note>
125    /// <p>This functionality is not supported for directory buckets.</p>
126    /// </note>
127    pub fn bucket_key_enabled(&self) -> ::std::option::Option<bool> {
128        self.bucket_key_enabled
129    }
130    /// <p>If present, indicates that the requester was successfully charged for the request.</p><note>
131    /// <p>This functionality is not supported for directory buckets.</p>
132    /// </note>
133    pub fn request_charged(&self) -> ::std::option::Option<&crate::types::RequestCharged> {
134        self.request_charged.as_ref()
135    }
136}
137impl ::std::fmt::Debug for PutObjectOutput {
138    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
139        let mut formatter = f.debug_struct("PutObjectOutput");
140        formatter.field("expiration", &self.expiration);
141        formatter.field("e_tag", &self.e_tag);
142        formatter.field("checksum_crc32", &self.checksum_crc32);
143        formatter.field("checksum_crc32_c", &self.checksum_crc32_c);
144        formatter.field("checksum_sha1", &self.checksum_sha1);
145        formatter.field("checksum_sha256", &self.checksum_sha256);
146        formatter.field("server_side_encryption", &self.server_side_encryption);
147        formatter.field("version_id", &self.version_id);
148        formatter.field("sse_customer_algorithm", &self.sse_customer_algorithm);
149        formatter.field("sse_customer_key_md5", &self.sse_customer_key_md5);
150        formatter.field("ssekms_key_id", &"*** Sensitive Data Redacted ***");
151        formatter.field("ssekms_encryption_context", &"*** Sensitive Data Redacted ***");
152        formatter.field("bucket_key_enabled", &self.bucket_key_enabled);
153        formatter.field("request_charged", &self.request_charged);
154        formatter.field("_extended_request_id", &self._extended_request_id);
155        formatter.field("_request_id", &self._request_id);
156        formatter.finish()
157    }
158}
159impl crate::s3_request_id::RequestIdExt for PutObjectOutput {
160    fn extended_request_id(&self) -> Option<&str> {
161        self._extended_request_id.as_deref()
162    }
163}
164impl ::aws_types::request_id::RequestId for PutObjectOutput {
165    fn request_id(&self) -> Option<&str> {
166        self._request_id.as_deref()
167    }
168}
169impl PutObjectOutput {
170    /// Creates a new builder-style object to manufacture [`PutObjectOutput`](crate::operation::put_object::PutObjectOutput).
171    pub fn builder() -> crate::operation::put_object::builders::PutObjectOutputBuilder {
172        crate::operation::put_object::builders::PutObjectOutputBuilder::default()
173    }
174}
175
176/// A builder for [`PutObjectOutput`](crate::operation::put_object::PutObjectOutput).
177#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
178#[non_exhaustive]
179pub struct PutObjectOutputBuilder {
180    pub(crate) expiration: ::std::option::Option<::std::string::String>,
181    pub(crate) e_tag: ::std::option::Option<::std::string::String>,
182    pub(crate) checksum_crc32: ::std::option::Option<::std::string::String>,
183    pub(crate) checksum_crc32_c: ::std::option::Option<::std::string::String>,
184    pub(crate) checksum_sha1: ::std::option::Option<::std::string::String>,
185    pub(crate) checksum_sha256: ::std::option::Option<::std::string::String>,
186    pub(crate) server_side_encryption: ::std::option::Option<crate::types::ServerSideEncryption>,
187    pub(crate) version_id: ::std::option::Option<::std::string::String>,
188    pub(crate) sse_customer_algorithm: ::std::option::Option<::std::string::String>,
189    pub(crate) sse_customer_key_md5: ::std::option::Option<::std::string::String>,
190    pub(crate) ssekms_key_id: ::std::option::Option<::std::string::String>,
191    pub(crate) ssekms_encryption_context: ::std::option::Option<::std::string::String>,
192    pub(crate) bucket_key_enabled: ::std::option::Option<bool>,
193    pub(crate) request_charged: ::std::option::Option<crate::types::RequestCharged>,
194    _extended_request_id: Option<String>,
195    _request_id: Option<String>,
196}
197impl PutObjectOutputBuilder {
198    /// <p>If the expiration is configured for the object (see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycleConfiguration.html">PutBucketLifecycleConfiguration</a>) in the <i>Amazon S3 User Guide</i>, the response includes this header. It includes the <code>expiry-date</code> and <code>rule-id</code> key-value pairs that provide information about object expiration. The value of the <code>rule-id</code> is URL-encoded.</p><note>
199    /// <p>This functionality is not supported for directory buckets.</p>
200    /// </note>
201    pub fn expiration(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
202        self.expiration = ::std::option::Option::Some(input.into());
203        self
204    }
205    /// <p>If the expiration is configured for the object (see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycleConfiguration.html">PutBucketLifecycleConfiguration</a>) in the <i>Amazon S3 User Guide</i>, the response includes this header. It includes the <code>expiry-date</code> and <code>rule-id</code> key-value pairs that provide information about object expiration. The value of the <code>rule-id</code> is URL-encoded.</p><note>
206    /// <p>This functionality is not supported for directory buckets.</p>
207    /// </note>
208    pub fn set_expiration(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
209        self.expiration = input;
210        self
211    }
212    /// <p>If the expiration is configured for the object (see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycleConfiguration.html">PutBucketLifecycleConfiguration</a>) in the <i>Amazon S3 User Guide</i>, the response includes this header. It includes the <code>expiry-date</code> and <code>rule-id</code> key-value pairs that provide information about object expiration. The value of the <code>rule-id</code> is URL-encoded.</p><note>
213    /// <p>This functionality is not supported for directory buckets.</p>
214    /// </note>
215    pub fn get_expiration(&self) -> &::std::option::Option<::std::string::String> {
216        &self.expiration
217    }
218    /// <p>Entity tag for the uploaded object.</p>
219    /// <p><b>General purpose buckets </b> - To ensure that data is not corrupted traversing the network, for objects where the ETag is the MD5 digest of the object, you can calculate the MD5 while putting an object to Amazon S3 and compare the returned ETag to the calculated MD5 value.</p>
220    /// <p><b>Directory buckets </b> - The ETag for the object in a directory bucket isn't the MD5 digest of the object.</p>
221    pub fn e_tag(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
222        self.e_tag = ::std::option::Option::Some(input.into());
223        self
224    }
225    /// <p>Entity tag for the uploaded object.</p>
226    /// <p><b>General purpose buckets </b> - To ensure that data is not corrupted traversing the network, for objects where the ETag is the MD5 digest of the object, you can calculate the MD5 while putting an object to Amazon S3 and compare the returned ETag to the calculated MD5 value.</p>
227    /// <p><b>Directory buckets </b> - The ETag for the object in a directory bucket isn't the MD5 digest of the object.</p>
228    pub fn set_e_tag(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
229        self.e_tag = input;
230        self
231    }
232    /// <p>Entity tag for the uploaded object.</p>
233    /// <p><b>General purpose buckets </b> - To ensure that data is not corrupted traversing the network, for objects where the ETag is the MD5 digest of the object, you can calculate the MD5 while putting an object to Amazon S3 and compare the returned ETag to the calculated MD5 value.</p>
234    /// <p><b>Directory buckets </b> - The ETag for the object in a directory bucket isn't the MD5 digest of the object.</p>
235    pub fn get_e_tag(&self) -> &::std::option::Option<::std::string::String> {
236        &self.e_tag
237    }
238    /// <p>The base64-encoded, 32-bit CRC32 checksum of the object. This will only be present if it 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>
239    pub fn checksum_crc32(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
240        self.checksum_crc32 = ::std::option::Option::Some(input.into());
241        self
242    }
243    /// <p>The base64-encoded, 32-bit CRC32 checksum of the object. This will only be present if it 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>
244    pub fn set_checksum_crc32(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
245        self.checksum_crc32 = input;
246        self
247    }
248    /// <p>The base64-encoded, 32-bit CRC32 checksum of the object. This will only be present if it 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>
249    pub fn get_checksum_crc32(&self) -> &::std::option::Option<::std::string::String> {
250        &self.checksum_crc32
251    }
252    /// <p>The base64-encoded, 32-bit CRC32C checksum of the object. This will only be present if it 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>
253    pub fn checksum_crc32_c(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
254        self.checksum_crc32_c = ::std::option::Option::Some(input.into());
255        self
256    }
257    /// <p>The base64-encoded, 32-bit CRC32C checksum of the object. This will only be present if it 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>
258    pub fn set_checksum_crc32_c(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
259        self.checksum_crc32_c = input;
260        self
261    }
262    /// <p>The base64-encoded, 32-bit CRC32C checksum of the object. This will only be present if it 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>
263    pub fn get_checksum_crc32_c(&self) -> &::std::option::Option<::std::string::String> {
264        &self.checksum_crc32_c
265    }
266    /// <p>The base64-encoded, 160-bit SHA-1 digest of the object. This will only be present if it 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>
267    pub fn checksum_sha1(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
268        self.checksum_sha1 = ::std::option::Option::Some(input.into());
269        self
270    }
271    /// <p>The base64-encoded, 160-bit SHA-1 digest of the object. This will only be present if it 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>
272    pub fn set_checksum_sha1(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
273        self.checksum_sha1 = input;
274        self
275    }
276    /// <p>The base64-encoded, 160-bit SHA-1 digest of the object. This will only be present if it 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>
277    pub fn get_checksum_sha1(&self) -> &::std::option::Option<::std::string::String> {
278        &self.checksum_sha1
279    }
280    /// <p>The base64-encoded, 256-bit SHA-256 digest of the object. This will only be present if it 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>
281    pub fn checksum_sha256(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
282        self.checksum_sha256 = ::std::option::Option::Some(input.into());
283        self
284    }
285    /// <p>The base64-encoded, 256-bit SHA-256 digest of the object. This will only be present if it 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>
286    pub fn set_checksum_sha256(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
287        self.checksum_sha256 = input;
288        self
289    }
290    /// <p>The base64-encoded, 256-bit SHA-256 digest of the object. This will only be present if it 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>
291    pub fn get_checksum_sha256(&self) -> &::std::option::Option<::std::string::String> {
292        &self.checksum_sha256
293    }
294    /// <p>The server-side encryption algorithm used when you store this object in Amazon S3 (for example, <code>AES256</code>, <code>aws:kms</code>, <code>aws:kms:dsse</code>).</p><note>
295    /// <p>For directory buckets, only server-side encryption with Amazon S3 managed keys (SSE-S3) (<code>AES256</code>) is supported.</p>
296    /// </note>
297    pub fn server_side_encryption(mut self, input: crate::types::ServerSideEncryption) -> Self {
298        self.server_side_encryption = ::std::option::Option::Some(input);
299        self
300    }
301    /// <p>The server-side encryption algorithm used when you store this object in Amazon S3 (for example, <code>AES256</code>, <code>aws:kms</code>, <code>aws:kms:dsse</code>).</p><note>
302    /// <p>For directory buckets, only server-side encryption with Amazon S3 managed keys (SSE-S3) (<code>AES256</code>) is supported.</p>
303    /// </note>
304    pub fn set_server_side_encryption(mut self, input: ::std::option::Option<crate::types::ServerSideEncryption>) -> Self {
305        self.server_side_encryption = input;
306        self
307    }
308    /// <p>The server-side encryption algorithm used when you store this object in Amazon S3 (for example, <code>AES256</code>, <code>aws:kms</code>, <code>aws:kms:dsse</code>).</p><note>
309    /// <p>For directory buckets, only server-side encryption with Amazon S3 managed keys (SSE-S3) (<code>AES256</code>) is supported.</p>
310    /// </note>
311    pub fn get_server_side_encryption(&self) -> &::std::option::Option<crate::types::ServerSideEncryption> {
312        &self.server_side_encryption
313    }
314    /// <p>Version ID of the object.</p>
315    /// <p>If you enable versioning for a bucket, Amazon S3 automatically generates a unique version ID for the object being stored. Amazon S3 returns this ID in the response. When you enable versioning for a bucket, if Amazon S3 receives multiple write requests for the same object simultaneously, it stores all of the objects. For more information about versioning, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/AddingObjectstoVersioningEnabledBuckets.html">Adding Objects to Versioning-Enabled Buckets</a> in the <i>Amazon S3 User Guide</i>. For information about returning the versioning state of a bucket, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketVersioning.html">GetBucketVersioning</a>.</p><note>
316    /// <p>This functionality is not supported for directory buckets.</p>
317    /// </note>
318    pub fn version_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
319        self.version_id = ::std::option::Option::Some(input.into());
320        self
321    }
322    /// <p>Version ID of the object.</p>
323    /// <p>If you enable versioning for a bucket, Amazon S3 automatically generates a unique version ID for the object being stored. Amazon S3 returns this ID in the response. When you enable versioning for a bucket, if Amazon S3 receives multiple write requests for the same object simultaneously, it stores all of the objects. For more information about versioning, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/AddingObjectstoVersioningEnabledBuckets.html">Adding Objects to Versioning-Enabled Buckets</a> in the <i>Amazon S3 User Guide</i>. For information about returning the versioning state of a bucket, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketVersioning.html">GetBucketVersioning</a>.</p><note>
324    /// <p>This functionality is not supported for directory buckets.</p>
325    /// </note>
326    pub fn set_version_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
327        self.version_id = input;
328        self
329    }
330    /// <p>Version ID of the object.</p>
331    /// <p>If you enable versioning for a bucket, Amazon S3 automatically generates a unique version ID for the object being stored. Amazon S3 returns this ID in the response. When you enable versioning for a bucket, if Amazon S3 receives multiple write requests for the same object simultaneously, it stores all of the objects. For more information about versioning, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/AddingObjectstoVersioningEnabledBuckets.html">Adding Objects to Versioning-Enabled Buckets</a> in the <i>Amazon S3 User Guide</i>. For information about returning the versioning state of a bucket, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketVersioning.html">GetBucketVersioning</a>.</p><note>
332    /// <p>This functionality is not supported for directory buckets.</p>
333    /// </note>
334    pub fn get_version_id(&self) -> &::std::option::Option<::std::string::String> {
335        &self.version_id
336    }
337    /// <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>
338    /// <p>This functionality is not supported for directory buckets.</p>
339    /// </note>
340    pub fn sse_customer_algorithm(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
341        self.sse_customer_algorithm = ::std::option::Option::Some(input.into());
342        self
343    }
344    /// <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>
345    /// <p>This functionality is not supported for directory buckets.</p>
346    /// </note>
347    pub fn set_sse_customer_algorithm(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
348        self.sse_customer_algorithm = input;
349        self
350    }
351    /// <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>
352    /// <p>This functionality is not supported for directory buckets.</p>
353    /// </note>
354    pub fn get_sse_customer_algorithm(&self) -> &::std::option::Option<::std::string::String> {
355        &self.sse_customer_algorithm
356    }
357    /// <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>
358    /// <p>This functionality is not supported for directory buckets.</p>
359    /// </note>
360    pub fn sse_customer_key_md5(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
361        self.sse_customer_key_md5 = ::std::option::Option::Some(input.into());
362        self
363    }
364    /// <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>
365    /// <p>This functionality is not supported for directory buckets.</p>
366    /// </note>
367    pub fn set_sse_customer_key_md5(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
368        self.sse_customer_key_md5 = input;
369        self
370    }
371    /// <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>
372    /// <p>This functionality is not supported for directory buckets.</p>
373    /// </note>
374    pub fn get_sse_customer_key_md5(&self) -> &::std::option::Option<::std::string::String> {
375        &self.sse_customer_key_md5
376    }
377    /// <p>If <code>x-amz-server-side-encryption</code> has a valid value of <code>aws:kms</code> or <code>aws:kms:dsse</code>, this header indicates the ID of the Key Management Service (KMS) symmetric encryption customer managed key that was used for the object.</p><note>
378    /// <p>This functionality is not supported for directory buckets.</p>
379    /// </note>
380    pub fn ssekms_key_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
381        self.ssekms_key_id = ::std::option::Option::Some(input.into());
382        self
383    }
384    /// <p>If <code>x-amz-server-side-encryption</code> has a valid value of <code>aws:kms</code> or <code>aws:kms:dsse</code>, this header indicates the ID of the Key Management Service (KMS) symmetric encryption customer managed key that was used for the object.</p><note>
385    /// <p>This functionality is not supported for directory buckets.</p>
386    /// </note>
387    pub fn set_ssekms_key_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
388        self.ssekms_key_id = input;
389        self
390    }
391    /// <p>If <code>x-amz-server-side-encryption</code> has a valid value of <code>aws:kms</code> or <code>aws:kms:dsse</code>, this header indicates the ID of the Key Management Service (KMS) symmetric encryption customer managed key that was used for the object.</p><note>
392    /// <p>This functionality is not supported for directory buckets.</p>
393    /// </note>
394    pub fn get_ssekms_key_id(&self) -> &::std::option::Option<::std::string::String> {
395        &self.ssekms_key_id
396    }
397    /// <p>If present, indicates 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. This value is stored as object metadata and automatically gets passed on to Amazon Web Services KMS for future <code>GetObject</code> or <code>CopyObject</code> operations on this object.</p><note>
398    /// <p>This functionality is not supported for directory buckets.</p>
399    /// </note>
400    pub fn ssekms_encryption_context(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
401        self.ssekms_encryption_context = ::std::option::Option::Some(input.into());
402        self
403    }
404    /// <p>If present, indicates 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. This value is stored as object metadata and automatically gets passed on to Amazon Web Services KMS for future <code>GetObject</code> or <code>CopyObject</code> operations on this object.</p><note>
405    /// <p>This functionality is not supported for directory buckets.</p>
406    /// </note>
407    pub fn set_ssekms_encryption_context(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
408        self.ssekms_encryption_context = input;
409        self
410    }
411    /// <p>If present, indicates 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. This value is stored as object metadata and automatically gets passed on to Amazon Web Services KMS for future <code>GetObject</code> or <code>CopyObject</code> operations on this object.</p><note>
412    /// <p>This functionality is not supported for directory buckets.</p>
413    /// </note>
414    pub fn get_ssekms_encryption_context(&self) -> &::std::option::Option<::std::string::String> {
415        &self.ssekms_encryption_context
416    }
417    /// <p>Indicates whether the uploaded object uses an S3 Bucket Key for server-side encryption with Key Management Service (KMS) keys (SSE-KMS).</p><note>
418    /// <p>This functionality is not supported for directory buckets.</p>
419    /// </note>
420    pub fn bucket_key_enabled(mut self, input: bool) -> Self {
421        self.bucket_key_enabled = ::std::option::Option::Some(input);
422        self
423    }
424    /// <p>Indicates whether the uploaded object uses an S3 Bucket Key for server-side encryption with Key Management Service (KMS) keys (SSE-KMS).</p><note>
425    /// <p>This functionality is not supported for directory buckets.</p>
426    /// </note>
427    pub fn set_bucket_key_enabled(mut self, input: ::std::option::Option<bool>) -> Self {
428        self.bucket_key_enabled = input;
429        self
430    }
431    /// <p>Indicates whether the uploaded object uses an S3 Bucket Key for server-side encryption with Key Management Service (KMS) keys (SSE-KMS).</p><note>
432    /// <p>This functionality is not supported for directory buckets.</p>
433    /// </note>
434    pub fn get_bucket_key_enabled(&self) -> &::std::option::Option<bool> {
435        &self.bucket_key_enabled
436    }
437    /// <p>If present, indicates that the requester was successfully charged for the request.</p><note>
438    /// <p>This functionality is not supported for directory buckets.</p>
439    /// </note>
440    pub fn request_charged(mut self, input: crate::types::RequestCharged) -> Self {
441        self.request_charged = ::std::option::Option::Some(input);
442        self
443    }
444    /// <p>If present, indicates that the requester was successfully charged for the request.</p><note>
445    /// <p>This functionality is not supported for directory buckets.</p>
446    /// </note>
447    pub fn set_request_charged(mut self, input: ::std::option::Option<crate::types::RequestCharged>) -> Self {
448        self.request_charged = input;
449        self
450    }
451    /// <p>If present, indicates that the requester was successfully charged for the request.</p><note>
452    /// <p>This functionality is not supported for directory buckets.</p>
453    /// </note>
454    pub fn get_request_charged(&self) -> &::std::option::Option<crate::types::RequestCharged> {
455        &self.request_charged
456    }
457    pub(crate) fn _extended_request_id(mut self, extended_request_id: impl Into<String>) -> Self {
458        self._extended_request_id = Some(extended_request_id.into());
459        self
460    }
461
462    pub(crate) fn _set_extended_request_id(&mut self, extended_request_id: Option<String>) -> &mut Self {
463        self._extended_request_id = extended_request_id;
464        self
465    }
466    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
467        self._request_id = Some(request_id.into());
468        self
469    }
470
471    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
472        self._request_id = request_id;
473        self
474    }
475    /// Consumes the builder and constructs a [`PutObjectOutput`](crate::operation::put_object::PutObjectOutput).
476    pub fn build(self) -> crate::operation::put_object::PutObjectOutput {
477        crate::operation::put_object::PutObjectOutput {
478            expiration: self.expiration,
479            e_tag: self.e_tag,
480            checksum_crc32: self.checksum_crc32,
481            checksum_crc32_c: self.checksum_crc32_c,
482            checksum_sha1: self.checksum_sha1,
483            checksum_sha256: self.checksum_sha256,
484            server_side_encryption: self.server_side_encryption,
485            version_id: self.version_id,
486            sse_customer_algorithm: self.sse_customer_algorithm,
487            sse_customer_key_md5: self.sse_customer_key_md5,
488            ssekms_key_id: self.ssekms_key_id,
489            ssekms_encryption_context: self.ssekms_encryption_context,
490            bucket_key_enabled: self.bucket_key_enabled,
491            request_charged: self.request_charged,
492            _extended_request_id: self._extended_request_id,
493            _request_id: self._request_id,
494        }
495    }
496}
497impl ::std::fmt::Debug for PutObjectOutputBuilder {
498    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
499        let mut formatter = f.debug_struct("PutObjectOutputBuilder");
500        formatter.field("expiration", &self.expiration);
501        formatter.field("e_tag", &self.e_tag);
502        formatter.field("checksum_crc32", &self.checksum_crc32);
503        formatter.field("checksum_crc32_c", &self.checksum_crc32_c);
504        formatter.field("checksum_sha1", &self.checksum_sha1);
505        formatter.field("checksum_sha256", &self.checksum_sha256);
506        formatter.field("server_side_encryption", &self.server_side_encryption);
507        formatter.field("version_id", &self.version_id);
508        formatter.field("sse_customer_algorithm", &self.sse_customer_algorithm);
509        formatter.field("sse_customer_key_md5", &self.sse_customer_key_md5);
510        formatter.field("ssekms_key_id", &"*** Sensitive Data Redacted ***");
511        formatter.field("ssekms_encryption_context", &"*** Sensitive Data Redacted ***");
512        formatter.field("bucket_key_enabled", &self.bucket_key_enabled);
513        formatter.field("request_charged", &self.request_charged);
514        formatter.field("_extended_request_id", &self._extended_request_id);
515        formatter.field("_request_id", &self._request_id);
516        formatter.finish()
517    }
518}