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