aws_sdk_s3/operation/put_object/
_put_object_input.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]
4pub struct PutObjectInput {
5    /// <p>The canned ACL to apply to the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#CannedACL">Canned ACL</a> in the <i>Amazon S3 User Guide</i>.</p>
6    /// <p>When adding a new object, you can use headers to grant ACL-based permissions to individual Amazon Web Services accounts or to predefined groups defined by Amazon S3. These permissions are then added to the ACL on the object. By default, all objects are private. Only the owner has full access control. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html">Access Control List (ACL) Overview</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-using-rest-api.html">Managing ACLs Using the REST API</a> in the <i>Amazon S3 User Guide</i>.</p>
7    /// <p>If the bucket that you're uploading objects to uses the bucket owner enforced setting for S3 Object Ownership, ACLs are disabled and no longer affect permissions. Buckets that use this setting only accept PUT requests that don't specify an ACL or PUT requests that specify bucket owner full control ACLs, such as the <code>bucket-owner-full-control</code> canned ACL or an equivalent form of this ACL expressed in the XML format. PUT requests that contain other ACLs (for example, custom grants to certain Amazon Web Services accounts) fail and return a <code>400</code> error with the error code <code>AccessControlListNotSupported</code>. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html"> Controlling ownership of objects and disabling ACLs</a> in the <i>Amazon S3 User Guide</i>.</p><note>
8    /// <ul>
9    /// <li>
10    /// <p>This functionality is not supported for directory buckets.</p></li>
11    /// <li>
12    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
13    /// </ul>
14    /// </note>
15    pub acl: ::std::option::Option<crate::types::ObjectCannedAcl>,
16    /// <p>Object data.</p>
17    pub body: ::aws_smithy_types::byte_stream::ByteStream,
18    /// <p>The bucket name to which the PUT action was initiated.</p>
19    /// <p><b>Directory buckets</b> - When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format <code> <i>Bucket_name</i>.s3express-<i>az_id</i>.<i>region</i>.amazonaws.com</code>. Path-style requests are not supported. Directory bucket names must be unique in the chosen Availability Zone. Bucket names must follow the format <code> <i>bucket_base_name</i>--<i>az-id</i>--x-s3</code> (for example, <code> <i>DOC-EXAMPLE-BUCKET</i>--<i>usw2-az1</i>--x-s3</code>). For information about bucket naming restrictions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-bucket-naming-rules.html">Directory bucket naming rules</a> in the <i>Amazon S3 User Guide</i>.</p>
20    /// <p><b>Access points</b> - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form <i>AccessPointName</i>-<i>AccountId</i>.s3-accesspoint.<i>Region</i>.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html">Using access points</a> in the <i>Amazon S3 User Guide</i>.</p><note>
21    /// <p>Access points and Object Lambda access points are not supported by directory buckets.</p>
22    /// </note>
23    /// <p><b>S3 on Outposts</b> - When you use this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form <code> <i>AccessPointName</i>-<i>AccountId</i>.<i>outpostID</i>.s3-outposts.<i>Region</i>.amazonaws.com</code>. When you use this action with S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts access point ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html">What is S3 on Outposts?</a> in the <i>Amazon S3 User Guide</i>.</p>
24    pub bucket: ::std::option::Option<::std::string::String>,
25    /// <p>Can be used to specify caching behavior along the request/reply chain. For more information, see <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9">http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9</a>.</p>
26    pub cache_control: ::std::option::Option<::std::string::String>,
27    /// <p>Specifies presentational information for the object. For more information, see <a href="https://www.rfc-editor.org/rfc/rfc6266#section-4">https://www.rfc-editor.org/rfc/rfc6266#section-4</a>.</p>
28    pub content_disposition: ::std::option::Option<::std::string::String>,
29    /// <p>Specifies what content encodings have been applied to the object and thus what decoding mechanisms must be applied to obtain the media-type referenced by the Content-Type header field. For more information, see <a href="https://www.rfc-editor.org/rfc/rfc9110.html#field.content-encoding">https://www.rfc-editor.org/rfc/rfc9110.html#field.content-encoding</a>.</p>
30    pub content_encoding: ::std::option::Option<::std::string::String>,
31    /// <p>The language the content is in.</p>
32    pub content_language: ::std::option::Option<::std::string::String>,
33    /// <p>Size of the body in bytes. This parameter is useful when the size of the body cannot be determined automatically. For more information, see <a href="https://www.rfc-editor.org/rfc/rfc9110.html#name-content-length">https://www.rfc-editor.org/rfc/rfc9110.html#name-content-length</a>.</p>
34    pub content_length: ::std::option::Option<i64>,
35    /// <p>The base64-encoded 128-bit MD5 digest of the message (without the headers) according to RFC 1864. This header can be used as a message integrity check to verify that the data is the same data that was originally sent. Although it is optional, we recommend using the Content-MD5 mechanism as an end-to-end integrity check. For more information about REST request authentication, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html">REST Authentication</a>.</p><note>
36    /// <p>The <code>Content-MD5</code> header is required for any request to upload an object with a retention period configured using Amazon S3 Object Lock. For more information about Amazon S3 Object Lock, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock-overview.html">Amazon S3 Object Lock Overview</a> in the <i>Amazon S3 User Guide</i>.</p>
37    /// </note> <note>
38    /// <p>This functionality is not supported for directory buckets.</p>
39    /// </note>
40    pub content_md5: ::std::option::Option<::std::string::String>,
41    /// <p>A standard MIME type describing the format of the contents. For more information, see <a href="https://www.rfc-editor.org/rfc/rfc9110.html#name-content-type">https://www.rfc-editor.org/rfc/rfc9110.html#name-content-type</a>.</p>
42    pub content_type: ::std::option::Option<::std::string::String>,
43    /// <p>Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any additional functionality if you don't use the SDK. When you send this header, there must be a corresponding <code>x-amz-checksum-<i>algorithm</i> </code> or <code>x-amz-trailer</code> header sent. Otherwise, Amazon S3 fails the request with the HTTP status code <code>400 Bad Request</code>.</p>
44    /// <p>For the <code>x-amz-checksum-<i>algorithm</i> </code> header, replace <code> <i>algorithm</i> </code> with the supported algorithm from the following list:</p>
45    /// <ul>
46    /// <li>
47    /// <p>CRC32</p></li>
48    /// <li>
49    /// <p>CRC32C</p></li>
50    /// <li>
51    /// <p>SHA1</p></li>
52    /// <li>
53    /// <p>SHA256</p></li>
54    /// </ul>
55    /// <p>For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
56    /// <p>If the individual checksum value you provide through <code>x-amz-checksum-<i>algorithm</i> </code> doesn't match the checksum algorithm you set through <code>x-amz-sdk-checksum-algorithm</code>, Amazon S3 ignores any provided <code>ChecksumAlgorithm</code> parameter and uses the checksum algorithm that matches the provided value in <code>x-amz-checksum-<i>algorithm</i> </code>.</p><note>
57    /// <p>For directory buckets, when you use Amazon Web Services SDKs, <code>CRC32</code> is the default checksum algorithm that's used for performance.</p>
58    /// </note>
59    pub checksum_algorithm: ::std::option::Option<crate::types::ChecksumAlgorithm>,
60    /// <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the base64-encoded, 32-bit CRC32 checksum of the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
61    pub checksum_crc32: ::std::option::Option<::std::string::String>,
62    /// <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the base64-encoded, 32-bit CRC32C checksum of the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
63    pub checksum_crc32_c: ::std::option::Option<::std::string::String>,
64    /// <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the base64-encoded, 160-bit SHA-1 digest of the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
65    pub checksum_sha1: ::std::option::Option<::std::string::String>,
66    /// <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the base64-encoded, 256-bit SHA-256 digest of the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
67    pub checksum_sha256: ::std::option::Option<::std::string::String>,
68    /// <p>The date and time at which the object is no longer cacheable. For more information, see <a href="https://www.rfc-editor.org/rfc/rfc7234#section-5.3">https://www.rfc-editor.org/rfc/rfc7234#section-5.3</a>.</p>
69    pub expires: ::std::option::Option<::aws_smithy_types::DateTime>,
70    /// <p>Uploads the object only if the object key name does not already exist in the bucket specified. Otherwise, Amazon S3 returns a <code>412 Precondition Failed</code> error.</p>
71    /// <p>If a conflicting operation occurs during the upload S3 returns a <code>409 ConditionalRequestConflict</code> response. On a 409 failure you should retry the upload.</p>
72    /// <p>Expects the '*' (asterisk) character.</p>
73    /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>, or <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/conditional-requests.html">Conditional requests</a> in the <i>Amazon S3 User Guide</i>.</p>
74    pub if_none_match: ::std::option::Option<::std::string::String>,
75    /// <p>Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.</p><note>
76    /// <ul>
77    /// <li>
78    /// <p>This functionality is not supported for directory buckets.</p></li>
79    /// <li>
80    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
81    /// </ul>
82    /// </note>
83    pub grant_full_control: ::std::option::Option<::std::string::String>,
84    /// <p>Allows grantee to read the object data and its metadata.</p><note>
85    /// <ul>
86    /// <li>
87    /// <p>This functionality is not supported for directory buckets.</p></li>
88    /// <li>
89    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
90    /// </ul>
91    /// </note>
92    pub grant_read: ::std::option::Option<::std::string::String>,
93    /// <p>Allows grantee to read the object ACL.</p><note>
94    /// <ul>
95    /// <li>
96    /// <p>This functionality is not supported for directory buckets.</p></li>
97    /// <li>
98    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
99    /// </ul>
100    /// </note>
101    pub grant_read_acp: ::std::option::Option<::std::string::String>,
102    /// <p>Allows grantee to write the ACL for the applicable object.</p><note>
103    /// <ul>
104    /// <li>
105    /// <p>This functionality is not supported for directory buckets.</p></li>
106    /// <li>
107    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
108    /// </ul>
109    /// </note>
110    pub grant_write_acp: ::std::option::Option<::std::string::String>,
111    /// <p>Object key for which the PUT action was initiated.</p>
112    pub key: ::std::option::Option<::std::string::String>,
113    /// <p>A map of metadata to store with the object in S3.</p>
114    pub metadata: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
115    /// <p>The server-side encryption algorithm that was used when you store this object in Amazon S3 (for example, <code>AES256</code>, <code>aws:kms</code>, <code>aws:kms:dsse</code>).</p>
116    /// <p><b>General purpose buckets </b> - You have four mutually exclusive options to protect data using server-side encryption in Amazon S3, depending on how you choose to manage the encryption keys. Specifically, the encryption key options are Amazon S3 managed keys (SSE-S3), Amazon Web Services KMS keys (SSE-KMS or DSSE-KMS), and customer-provided keys (SSE-C). Amazon S3 encrypts data with server-side encryption by using Amazon S3 managed keys (SSE-S3) by default. You can optionally tell Amazon S3 to encrypt data at rest by using server-side encryption with other key options. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingServerSideEncryption.html">Using Server-Side Encryption</a> in the <i>Amazon S3 User Guide</i>.</p>
117    /// <p><b>Directory buckets </b> - For directory buckets, only the server-side encryption with Amazon S3 managed keys (SSE-S3) (<code>AES256</code>) value is supported.</p>
118    pub server_side_encryption: ::std::option::Option<crate::types::ServerSideEncryption>,
119    /// <p>By default, Amazon S3 uses the STANDARD Storage Class to store newly created objects. The STANDARD storage class provides high durability and high availability. Depending on performance needs, you can specify a different Storage Class. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html">Storage Classes</a> in the <i>Amazon S3 User Guide</i>.</p><note>
120    /// <ul>
121    /// <li>
122    /// <p>For directory buckets, only the S3 Express One Zone storage class is supported to store newly created objects.</p></li>
123    /// <li>
124    /// <p>Amazon S3 on Outposts only uses the OUTPOSTS Storage Class.</p></li>
125    /// </ul>
126    /// </note>
127    pub storage_class: ::std::option::Option<crate::types::StorageClass>,
128    /// <p>If the bucket is configured as a website, redirects requests for this object to another object in the same bucket or to an external URL. Amazon S3 stores the value of this header in the object metadata. For information about object metadata, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMetadata.html">Object Key and Metadata</a> in the <i>Amazon S3 User Guide</i>.</p>
129    /// <p>In the following example, the request header sets the redirect to an object (anotherPage.html) in the same bucket:</p>
130    /// <p><code>x-amz-website-redirect-location: /anotherPage.html</code></p>
131    /// <p>In the following example, the request header sets the object redirect to another website:</p>
132    /// <p><code>x-amz-website-redirect-location: http://www.example.com/</code></p>
133    /// <p>For more information about website hosting in Amazon S3, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/WebsiteHosting.html">Hosting Websites on Amazon S3</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/how-to-page-redirect.html">How to Configure Website Page Redirects</a> in the <i>Amazon S3 User Guide</i>.</p><note>
134    /// <p>This functionality is not supported for directory buckets.</p>
135    /// </note>
136    pub website_redirect_location: ::std::option::Option<::std::string::String>,
137    /// <p>Specifies the algorithm to use when encrypting the object (for example, <code>AES256</code>).</p><note>
138    /// <p>This functionality is not supported for directory buckets.</p>
139    /// </note>
140    pub sse_customer_algorithm: ::std::option::Option<::std::string::String>,
141    /// <p>Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This value is used to store the object and then it is discarded; Amazon S3 does not store the encryption key. The key must be appropriate for use with the algorithm specified in the <code>x-amz-server-side-encryption-customer-algorithm</code> header.</p><note>
142    /// <p>This functionality is not supported for directory buckets.</p>
143    /// </note>
144    pub sse_customer_key: ::std::option::Option<::std::string::String>,
145    /// <p>Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses this header for a message integrity check to ensure that the encryption key was transmitted without error.</p><note>
146    /// <p>This functionality is not supported for directory buckets.</p>
147    /// </note>
148    pub sse_customer_key_md5: ::std::option::Option<::std::string::String>,
149    /// <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 specifies the ID (Key ID, Key ARN, or Key Alias) of the Key Management Service (KMS) symmetric encryption customer managed key that was used for the object. If you specify <code>x-amz-server-side-encryption:aws:kms</code> or <code>x-amz-server-side-encryption:aws:kms:dsse</code>, but do not provide<code> x-amz-server-side-encryption-aws-kms-key-id</code>, Amazon S3 uses the Amazon Web Services managed key (<code>aws/s3</code>) to protect the data. If the KMS key does not exist in the same account that's issuing the command, you must use the full ARN and not just the ID.</p><note>
150    /// <p>This functionality is not supported for directory buckets.</p>
151    /// </note>
152    pub ssekms_key_id: ::std::option::Option<::std::string::String>,
153    /// <p>Specifies the Amazon Web Services KMS Encryption Context to use for object encryption. The value of this header is a base64-encoded UTF-8 string holding JSON with the encryption context key-value pairs. 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. This value must be explicitly added during <code>CopyObject</code> operations.</p><note>
154    /// <p>This functionality is not supported for directory buckets.</p>
155    /// </note>
156    pub ssekms_encryption_context: ::std::option::Option<::std::string::String>,
157    /// <p>Specifies whether Amazon S3 should use an S3 Bucket Key for object encryption with server-side encryption using Key Management Service (KMS) keys (SSE-KMS). Setting this header to <code>true</code> causes Amazon S3 to use an S3 Bucket Key for object encryption with SSE-KMS.</p>
158    /// <p>Specifying this header with a PUT action doesn’t affect bucket-level settings for S3 Bucket Key.</p><note>
159    /// <p>This functionality is not supported for directory buckets.</p>
160    /// </note>
161    pub bucket_key_enabled: ::std::option::Option<bool>,
162    /// <p>Confirms that the requester knows that they will be charged for the request. Bucket owners need not specify this parameter in their requests. If either the source or destination S3 bucket has Requester Pays enabled, the requester will pay for corresponding charges to copy the object. For information about downloading objects from Requester Pays buckets, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html">Downloading Objects in Requester Pays Buckets</a> in the <i>Amazon S3 User Guide</i>.</p><note>
163    /// <p>This functionality is not supported for directory buckets.</p>
164    /// </note>
165    pub request_payer: ::std::option::Option<crate::types::RequestPayer>,
166    /// <p>The tag-set for the object. The tag-set must be encoded as URL Query parameters. (For example, "Key1=Value1")</p><note>
167    /// <p>This functionality is not supported for directory buckets.</p>
168    /// </note>
169    pub tagging: ::std::option::Option<::std::string::String>,
170    /// <p>The Object Lock mode that you want to apply to this object.</p><note>
171    /// <p>This functionality is not supported for directory buckets.</p>
172    /// </note>
173    pub object_lock_mode: ::std::option::Option<crate::types::ObjectLockMode>,
174    /// <p>The date and time when you want this object's Object Lock to expire. Must be formatted as a timestamp parameter.</p><note>
175    /// <p>This functionality is not supported for directory buckets.</p>
176    /// </note>
177    pub object_lock_retain_until_date: ::std::option::Option<::aws_smithy_types::DateTime>,
178    /// <p>Specifies whether a legal hold will be applied to this object. For more information about S3 Object Lock, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html">Object Lock</a> in the <i>Amazon S3 User Guide</i>.</p><note>
179    /// <p>This functionality is not supported for directory buckets.</p>
180    /// </note>
181    pub object_lock_legal_hold_status: ::std::option::Option<crate::types::ObjectLockLegalHoldStatus>,
182    /// <p>The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code <code>403 Forbidden</code> (access denied).</p>
183    pub expected_bucket_owner: ::std::option::Option<::std::string::String>,
184}
185impl PutObjectInput {
186    /// <p>The canned ACL to apply to the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#CannedACL">Canned ACL</a> in the <i>Amazon S3 User Guide</i>.</p>
187    /// <p>When adding a new object, you can use headers to grant ACL-based permissions to individual Amazon Web Services accounts or to predefined groups defined by Amazon S3. These permissions are then added to the ACL on the object. By default, all objects are private. Only the owner has full access control. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html">Access Control List (ACL) Overview</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-using-rest-api.html">Managing ACLs Using the REST API</a> in the <i>Amazon S3 User Guide</i>.</p>
188    /// <p>If the bucket that you're uploading objects to uses the bucket owner enforced setting for S3 Object Ownership, ACLs are disabled and no longer affect permissions. Buckets that use this setting only accept PUT requests that don't specify an ACL or PUT requests that specify bucket owner full control ACLs, such as the <code>bucket-owner-full-control</code> canned ACL or an equivalent form of this ACL expressed in the XML format. PUT requests that contain other ACLs (for example, custom grants to certain Amazon Web Services accounts) fail and return a <code>400</code> error with the error code <code>AccessControlListNotSupported</code>. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html"> Controlling ownership of objects and disabling ACLs</a> in the <i>Amazon S3 User Guide</i>.</p><note>
189    /// <ul>
190    /// <li>
191    /// <p>This functionality is not supported for directory buckets.</p></li>
192    /// <li>
193    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
194    /// </ul>
195    /// </note>
196    pub fn acl(&self) -> ::std::option::Option<&crate::types::ObjectCannedAcl> {
197        self.acl.as_ref()
198    }
199    /// <p>Object data.</p>
200    pub fn body(&self) -> &::aws_smithy_types::byte_stream::ByteStream {
201        &self.body
202    }
203    /// <p>The bucket name to which the PUT action was initiated.</p>
204    /// <p><b>Directory buckets</b> - When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format <code> <i>Bucket_name</i>.s3express-<i>az_id</i>.<i>region</i>.amazonaws.com</code>. Path-style requests are not supported. Directory bucket names must be unique in the chosen Availability Zone. Bucket names must follow the format <code> <i>bucket_base_name</i>--<i>az-id</i>--x-s3</code> (for example, <code> <i>DOC-EXAMPLE-BUCKET</i>--<i>usw2-az1</i>--x-s3</code>). For information about bucket naming restrictions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-bucket-naming-rules.html">Directory bucket naming rules</a> in the <i>Amazon S3 User Guide</i>.</p>
205    /// <p><b>Access points</b> - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form <i>AccessPointName</i>-<i>AccountId</i>.s3-accesspoint.<i>Region</i>.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html">Using access points</a> in the <i>Amazon S3 User Guide</i>.</p><note>
206    /// <p>Access points and Object Lambda access points are not supported by directory buckets.</p>
207    /// </note>
208    /// <p><b>S3 on Outposts</b> - When you use this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form <code> <i>AccessPointName</i>-<i>AccountId</i>.<i>outpostID</i>.s3-outposts.<i>Region</i>.amazonaws.com</code>. When you use this action with S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts access point ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html">What is S3 on Outposts?</a> in the <i>Amazon S3 User Guide</i>.</p>
209    pub fn bucket(&self) -> ::std::option::Option<&str> {
210        self.bucket.as_deref()
211    }
212    /// <p>Can be used to specify caching behavior along the request/reply chain. For more information, see <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9">http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9</a>.</p>
213    pub fn cache_control(&self) -> ::std::option::Option<&str> {
214        self.cache_control.as_deref()
215    }
216    /// <p>Specifies presentational information for the object. For more information, see <a href="https://www.rfc-editor.org/rfc/rfc6266#section-4">https://www.rfc-editor.org/rfc/rfc6266#section-4</a>.</p>
217    pub fn content_disposition(&self) -> ::std::option::Option<&str> {
218        self.content_disposition.as_deref()
219    }
220    /// <p>Specifies what content encodings have been applied to the object and thus what decoding mechanisms must be applied to obtain the media-type referenced by the Content-Type header field. For more information, see <a href="https://www.rfc-editor.org/rfc/rfc9110.html#field.content-encoding">https://www.rfc-editor.org/rfc/rfc9110.html#field.content-encoding</a>.</p>
221    pub fn content_encoding(&self) -> ::std::option::Option<&str> {
222        self.content_encoding.as_deref()
223    }
224    /// <p>The language the content is in.</p>
225    pub fn content_language(&self) -> ::std::option::Option<&str> {
226        self.content_language.as_deref()
227    }
228    /// <p>Size of the body in bytes. This parameter is useful when the size of the body cannot be determined automatically. For more information, see <a href="https://www.rfc-editor.org/rfc/rfc9110.html#name-content-length">https://www.rfc-editor.org/rfc/rfc9110.html#name-content-length</a>.</p>
229    pub fn content_length(&self) -> ::std::option::Option<i64> {
230        self.content_length
231    }
232    /// <p>The base64-encoded 128-bit MD5 digest of the message (without the headers) according to RFC 1864. This header can be used as a message integrity check to verify that the data is the same data that was originally sent. Although it is optional, we recommend using the Content-MD5 mechanism as an end-to-end integrity check. For more information about REST request authentication, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html">REST Authentication</a>.</p><note>
233    /// <p>The <code>Content-MD5</code> header is required for any request to upload an object with a retention period configured using Amazon S3 Object Lock. For more information about Amazon S3 Object Lock, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock-overview.html">Amazon S3 Object Lock Overview</a> in the <i>Amazon S3 User Guide</i>.</p>
234    /// </note> <note>
235    /// <p>This functionality is not supported for directory buckets.</p>
236    /// </note>
237    pub fn content_md5(&self) -> ::std::option::Option<&str> {
238        self.content_md5.as_deref()
239    }
240    /// <p>A standard MIME type describing the format of the contents. For more information, see <a href="https://www.rfc-editor.org/rfc/rfc9110.html#name-content-type">https://www.rfc-editor.org/rfc/rfc9110.html#name-content-type</a>.</p>
241    pub fn content_type(&self) -> ::std::option::Option<&str> {
242        self.content_type.as_deref()
243    }
244    /// <p>Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any additional functionality if you don't use the SDK. When you send this header, there must be a corresponding <code>x-amz-checksum-<i>algorithm</i> </code> or <code>x-amz-trailer</code> header sent. Otherwise, Amazon S3 fails the request with the HTTP status code <code>400 Bad Request</code>.</p>
245    /// <p>For the <code>x-amz-checksum-<i>algorithm</i> </code> header, replace <code> <i>algorithm</i> </code> with the supported algorithm from the following list:</p>
246    /// <ul>
247    /// <li>
248    /// <p>CRC32</p></li>
249    /// <li>
250    /// <p>CRC32C</p></li>
251    /// <li>
252    /// <p>SHA1</p></li>
253    /// <li>
254    /// <p>SHA256</p></li>
255    /// </ul>
256    /// <p>For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
257    /// <p>If the individual checksum value you provide through <code>x-amz-checksum-<i>algorithm</i> </code> doesn't match the checksum algorithm you set through <code>x-amz-sdk-checksum-algorithm</code>, Amazon S3 ignores any provided <code>ChecksumAlgorithm</code> parameter and uses the checksum algorithm that matches the provided value in <code>x-amz-checksum-<i>algorithm</i> </code>.</p><note>
258    /// <p>For directory buckets, when you use Amazon Web Services SDKs, <code>CRC32</code> is the default checksum algorithm that's used for performance.</p>
259    /// </note>
260    pub fn checksum_algorithm(&self) -> ::std::option::Option<&crate::types::ChecksumAlgorithm> {
261        self.checksum_algorithm.as_ref()
262    }
263    /// <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the base64-encoded, 32-bit CRC32 checksum of the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
264    pub fn checksum_crc32(&self) -> ::std::option::Option<&str> {
265        self.checksum_crc32.as_deref()
266    }
267    /// <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the base64-encoded, 32-bit CRC32C checksum of the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
268    pub fn checksum_crc32_c(&self) -> ::std::option::Option<&str> {
269        self.checksum_crc32_c.as_deref()
270    }
271    /// <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the base64-encoded, 160-bit SHA-1 digest of the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
272    pub fn checksum_sha1(&self) -> ::std::option::Option<&str> {
273        self.checksum_sha1.as_deref()
274    }
275    /// <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the base64-encoded, 256-bit SHA-256 digest of the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
276    pub fn checksum_sha256(&self) -> ::std::option::Option<&str> {
277        self.checksum_sha256.as_deref()
278    }
279    /// <p>The date and time at which the object is no longer cacheable. For more information, see <a href="https://www.rfc-editor.org/rfc/rfc7234#section-5.3">https://www.rfc-editor.org/rfc/rfc7234#section-5.3</a>.</p>
280    pub fn expires(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
281        self.expires.as_ref()
282    }
283    /// <p>Uploads the object only if the object key name does not already exist in the bucket specified. Otherwise, Amazon S3 returns a <code>412 Precondition Failed</code> error.</p>
284    /// <p>If a conflicting operation occurs during the upload S3 returns a <code>409 ConditionalRequestConflict</code> response. On a 409 failure you should retry the upload.</p>
285    /// <p>Expects the '*' (asterisk) character.</p>
286    /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>, or <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/conditional-requests.html">Conditional requests</a> in the <i>Amazon S3 User Guide</i>.</p>
287    pub fn if_none_match(&self) -> ::std::option::Option<&str> {
288        self.if_none_match.as_deref()
289    }
290    /// <p>Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.</p><note>
291    /// <ul>
292    /// <li>
293    /// <p>This functionality is not supported for directory buckets.</p></li>
294    /// <li>
295    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
296    /// </ul>
297    /// </note>
298    pub fn grant_full_control(&self) -> ::std::option::Option<&str> {
299        self.grant_full_control.as_deref()
300    }
301    /// <p>Allows grantee to read the object data and its metadata.</p><note>
302    /// <ul>
303    /// <li>
304    /// <p>This functionality is not supported for directory buckets.</p></li>
305    /// <li>
306    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
307    /// </ul>
308    /// </note>
309    pub fn grant_read(&self) -> ::std::option::Option<&str> {
310        self.grant_read.as_deref()
311    }
312    /// <p>Allows grantee to read the object ACL.</p><note>
313    /// <ul>
314    /// <li>
315    /// <p>This functionality is not supported for directory buckets.</p></li>
316    /// <li>
317    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
318    /// </ul>
319    /// </note>
320    pub fn grant_read_acp(&self) -> ::std::option::Option<&str> {
321        self.grant_read_acp.as_deref()
322    }
323    /// <p>Allows grantee to write the ACL for the applicable object.</p><note>
324    /// <ul>
325    /// <li>
326    /// <p>This functionality is not supported for directory buckets.</p></li>
327    /// <li>
328    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
329    /// </ul>
330    /// </note>
331    pub fn grant_write_acp(&self) -> ::std::option::Option<&str> {
332        self.grant_write_acp.as_deref()
333    }
334    /// <p>Object key for which the PUT action was initiated.</p>
335    pub fn key(&self) -> ::std::option::Option<&str> {
336        self.key.as_deref()
337    }
338    /// <p>A map of metadata to store with the object in S3.</p>
339    pub fn metadata(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
340        self.metadata.as_ref()
341    }
342    /// <p>The server-side encryption algorithm that was used when you store this object in Amazon S3 (for example, <code>AES256</code>, <code>aws:kms</code>, <code>aws:kms:dsse</code>).</p>
343    /// <p><b>General purpose buckets </b> - You have four mutually exclusive options to protect data using server-side encryption in Amazon S3, depending on how you choose to manage the encryption keys. Specifically, the encryption key options are Amazon S3 managed keys (SSE-S3), Amazon Web Services KMS keys (SSE-KMS or DSSE-KMS), and customer-provided keys (SSE-C). Amazon S3 encrypts data with server-side encryption by using Amazon S3 managed keys (SSE-S3) by default. You can optionally tell Amazon S3 to encrypt data at rest by using server-side encryption with other key options. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingServerSideEncryption.html">Using Server-Side Encryption</a> in the <i>Amazon S3 User Guide</i>.</p>
344    /// <p><b>Directory buckets </b> - For directory buckets, only the server-side encryption with Amazon S3 managed keys (SSE-S3) (<code>AES256</code>) value is supported.</p>
345    pub fn server_side_encryption(&self) -> ::std::option::Option<&crate::types::ServerSideEncryption> {
346        self.server_side_encryption.as_ref()
347    }
348    /// <p>By default, Amazon S3 uses the STANDARD Storage Class to store newly created objects. The STANDARD storage class provides high durability and high availability. Depending on performance needs, you can specify a different Storage Class. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html">Storage Classes</a> in the <i>Amazon S3 User Guide</i>.</p><note>
349    /// <ul>
350    /// <li>
351    /// <p>For directory buckets, only the S3 Express One Zone storage class is supported to store newly created objects.</p></li>
352    /// <li>
353    /// <p>Amazon S3 on Outposts only uses the OUTPOSTS Storage Class.</p></li>
354    /// </ul>
355    /// </note>
356    pub fn storage_class(&self) -> ::std::option::Option<&crate::types::StorageClass> {
357        self.storage_class.as_ref()
358    }
359    /// <p>If the bucket is configured as a website, redirects requests for this object to another object in the same bucket or to an external URL. Amazon S3 stores the value of this header in the object metadata. For information about object metadata, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMetadata.html">Object Key and Metadata</a> in the <i>Amazon S3 User Guide</i>.</p>
360    /// <p>In the following example, the request header sets the redirect to an object (anotherPage.html) in the same bucket:</p>
361    /// <p><code>x-amz-website-redirect-location: /anotherPage.html</code></p>
362    /// <p>In the following example, the request header sets the object redirect to another website:</p>
363    /// <p><code>x-amz-website-redirect-location: http://www.example.com/</code></p>
364    /// <p>For more information about website hosting in Amazon S3, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/WebsiteHosting.html">Hosting Websites on Amazon S3</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/how-to-page-redirect.html">How to Configure Website Page Redirects</a> in the <i>Amazon S3 User Guide</i>.</p><note>
365    /// <p>This functionality is not supported for directory buckets.</p>
366    /// </note>
367    pub fn website_redirect_location(&self) -> ::std::option::Option<&str> {
368        self.website_redirect_location.as_deref()
369    }
370    /// <p>Specifies the algorithm to use when encrypting the object (for example, <code>AES256</code>).</p><note>
371    /// <p>This functionality is not supported for directory buckets.</p>
372    /// </note>
373    pub fn sse_customer_algorithm(&self) -> ::std::option::Option<&str> {
374        self.sse_customer_algorithm.as_deref()
375    }
376    /// <p>Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This value is used to store the object and then it is discarded; Amazon S3 does not store the encryption key. The key must be appropriate for use with the algorithm specified in the <code>x-amz-server-side-encryption-customer-algorithm</code> header.</p><note>
377    /// <p>This functionality is not supported for directory buckets.</p>
378    /// </note>
379    pub fn sse_customer_key(&self) -> ::std::option::Option<&str> {
380        self.sse_customer_key.as_deref()
381    }
382    /// <p>Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses this header for a message integrity check to ensure that the encryption key was transmitted without error.</p><note>
383    /// <p>This functionality is not supported for directory buckets.</p>
384    /// </note>
385    pub fn sse_customer_key_md5(&self) -> ::std::option::Option<&str> {
386        self.sse_customer_key_md5.as_deref()
387    }
388    /// <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 specifies the ID (Key ID, Key ARN, or Key Alias) of the Key Management Service (KMS) symmetric encryption customer managed key that was used for the object. If you specify <code>x-amz-server-side-encryption:aws:kms</code> or <code>x-amz-server-side-encryption:aws:kms:dsse</code>, but do not provide<code> x-amz-server-side-encryption-aws-kms-key-id</code>, Amazon S3 uses the Amazon Web Services managed key (<code>aws/s3</code>) to protect the data. If the KMS key does not exist in the same account that's issuing the command, you must use the full ARN and not just the ID.</p><note>
389    /// <p>This functionality is not supported for directory buckets.</p>
390    /// </note>
391    pub fn ssekms_key_id(&self) -> ::std::option::Option<&str> {
392        self.ssekms_key_id.as_deref()
393    }
394    /// <p>Specifies the Amazon Web Services KMS Encryption Context to use for object encryption. The value of this header is a base64-encoded UTF-8 string holding JSON with the encryption context key-value pairs. 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. This value must be explicitly added during <code>CopyObject</code> operations.</p><note>
395    /// <p>This functionality is not supported for directory buckets.</p>
396    /// </note>
397    pub fn ssekms_encryption_context(&self) -> ::std::option::Option<&str> {
398        self.ssekms_encryption_context.as_deref()
399    }
400    /// <p>Specifies whether Amazon S3 should use an S3 Bucket Key for object encryption with server-side encryption using Key Management Service (KMS) keys (SSE-KMS). Setting this header to <code>true</code> causes Amazon S3 to use an S3 Bucket Key for object encryption with SSE-KMS.</p>
401    /// <p>Specifying this header with a PUT action doesn’t affect bucket-level settings for S3 Bucket Key.</p><note>
402    /// <p>This functionality is not supported for directory buckets.</p>
403    /// </note>
404    pub fn bucket_key_enabled(&self) -> ::std::option::Option<bool> {
405        self.bucket_key_enabled
406    }
407    /// <p>Confirms that the requester knows that they will be charged for the request. Bucket owners need not specify this parameter in their requests. If either the source or destination S3 bucket has Requester Pays enabled, the requester will pay for corresponding charges to copy the object. For information about downloading objects from Requester Pays buckets, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html">Downloading Objects in Requester Pays Buckets</a> in the <i>Amazon S3 User Guide</i>.</p><note>
408    /// <p>This functionality is not supported for directory buckets.</p>
409    /// </note>
410    pub fn request_payer(&self) -> ::std::option::Option<&crate::types::RequestPayer> {
411        self.request_payer.as_ref()
412    }
413    /// <p>The tag-set for the object. The tag-set must be encoded as URL Query parameters. (For example, "Key1=Value1")</p><note>
414    /// <p>This functionality is not supported for directory buckets.</p>
415    /// </note>
416    pub fn tagging(&self) -> ::std::option::Option<&str> {
417        self.tagging.as_deref()
418    }
419    /// <p>The Object Lock mode that you want to apply to this object.</p><note>
420    /// <p>This functionality is not supported for directory buckets.</p>
421    /// </note>
422    pub fn object_lock_mode(&self) -> ::std::option::Option<&crate::types::ObjectLockMode> {
423        self.object_lock_mode.as_ref()
424    }
425    /// <p>The date and time when you want this object's Object Lock to expire. Must be formatted as a timestamp parameter.</p><note>
426    /// <p>This functionality is not supported for directory buckets.</p>
427    /// </note>
428    pub fn object_lock_retain_until_date(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
429        self.object_lock_retain_until_date.as_ref()
430    }
431    /// <p>Specifies whether a legal hold will be applied to this object. For more information about S3 Object Lock, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html">Object Lock</a> in the <i>Amazon S3 User Guide</i>.</p><note>
432    /// <p>This functionality is not supported for directory buckets.</p>
433    /// </note>
434    pub fn object_lock_legal_hold_status(&self) -> ::std::option::Option<&crate::types::ObjectLockLegalHoldStatus> {
435        self.object_lock_legal_hold_status.as_ref()
436    }
437    /// <p>The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code <code>403 Forbidden</code> (access denied).</p>
438    pub fn expected_bucket_owner(&self) -> ::std::option::Option<&str> {
439        self.expected_bucket_owner.as_deref()
440    }
441}
442impl ::std::fmt::Debug for PutObjectInput {
443    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
444        let mut formatter = f.debug_struct("PutObjectInput");
445        formatter.field("acl", &self.acl);
446        formatter.field("body", &self.body);
447        formatter.field("bucket", &self.bucket);
448        formatter.field("cache_control", &self.cache_control);
449        formatter.field("content_disposition", &self.content_disposition);
450        formatter.field("content_encoding", &self.content_encoding);
451        formatter.field("content_language", &self.content_language);
452        formatter.field("content_length", &self.content_length);
453        formatter.field("content_md5", &self.content_md5);
454        formatter.field("content_type", &self.content_type);
455        formatter.field("checksum_algorithm", &self.checksum_algorithm);
456        formatter.field("checksum_crc32", &self.checksum_crc32);
457        formatter.field("checksum_crc32_c", &self.checksum_crc32_c);
458        formatter.field("checksum_sha1", &self.checksum_sha1);
459        formatter.field("checksum_sha256", &self.checksum_sha256);
460        formatter.field("expires", &self.expires);
461        formatter.field("if_none_match", &self.if_none_match);
462        formatter.field("grant_full_control", &self.grant_full_control);
463        formatter.field("grant_read", &self.grant_read);
464        formatter.field("grant_read_acp", &self.grant_read_acp);
465        formatter.field("grant_write_acp", &self.grant_write_acp);
466        formatter.field("key", &self.key);
467        formatter.field("metadata", &self.metadata);
468        formatter.field("server_side_encryption", &self.server_side_encryption);
469        formatter.field("storage_class", &self.storage_class);
470        formatter.field("website_redirect_location", &self.website_redirect_location);
471        formatter.field("sse_customer_algorithm", &self.sse_customer_algorithm);
472        formatter.field("sse_customer_key", &"*** Sensitive Data Redacted ***");
473        formatter.field("sse_customer_key_md5", &self.sse_customer_key_md5);
474        formatter.field("ssekms_key_id", &"*** Sensitive Data Redacted ***");
475        formatter.field("ssekms_encryption_context", &"*** Sensitive Data Redacted ***");
476        formatter.field("bucket_key_enabled", &self.bucket_key_enabled);
477        formatter.field("request_payer", &self.request_payer);
478        formatter.field("tagging", &self.tagging);
479        formatter.field("object_lock_mode", &self.object_lock_mode);
480        formatter.field("object_lock_retain_until_date", &self.object_lock_retain_until_date);
481        formatter.field("object_lock_legal_hold_status", &self.object_lock_legal_hold_status);
482        formatter.field("expected_bucket_owner", &self.expected_bucket_owner);
483        formatter.finish()
484    }
485}
486impl PutObjectInput {
487    /// Creates a new builder-style object to manufacture [`PutObjectInput`](crate::operation::put_object::PutObjectInput).
488    pub fn builder() -> crate::operation::put_object::builders::PutObjectInputBuilder {
489        crate::operation::put_object::builders::PutObjectInputBuilder::default()
490    }
491}
492
493/// A builder for [`PutObjectInput`](crate::operation::put_object::PutObjectInput).
494#[derive(::std::default::Default)]
495#[non_exhaustive]
496pub struct PutObjectInputBuilder {
497    pub(crate) acl: ::std::option::Option<crate::types::ObjectCannedAcl>,
498    pub(crate) body: ::std::option::Option<::aws_smithy_types::byte_stream::ByteStream>,
499    pub(crate) bucket: ::std::option::Option<::std::string::String>,
500    pub(crate) cache_control: ::std::option::Option<::std::string::String>,
501    pub(crate) content_disposition: ::std::option::Option<::std::string::String>,
502    pub(crate) content_encoding: ::std::option::Option<::std::string::String>,
503    pub(crate) content_language: ::std::option::Option<::std::string::String>,
504    pub(crate) content_length: ::std::option::Option<i64>,
505    pub(crate) content_md5: ::std::option::Option<::std::string::String>,
506    pub(crate) content_type: ::std::option::Option<::std::string::String>,
507    pub(crate) checksum_algorithm: ::std::option::Option<crate::types::ChecksumAlgorithm>,
508    pub(crate) checksum_crc32: ::std::option::Option<::std::string::String>,
509    pub(crate) checksum_crc32_c: ::std::option::Option<::std::string::String>,
510    pub(crate) checksum_sha1: ::std::option::Option<::std::string::String>,
511    pub(crate) checksum_sha256: ::std::option::Option<::std::string::String>,
512    pub(crate) expires: ::std::option::Option<::aws_smithy_types::DateTime>,
513    pub(crate) if_none_match: ::std::option::Option<::std::string::String>,
514    pub(crate) grant_full_control: ::std::option::Option<::std::string::String>,
515    pub(crate) grant_read: ::std::option::Option<::std::string::String>,
516    pub(crate) grant_read_acp: ::std::option::Option<::std::string::String>,
517    pub(crate) grant_write_acp: ::std::option::Option<::std::string::String>,
518    pub(crate) key: ::std::option::Option<::std::string::String>,
519    pub(crate) metadata: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
520    pub(crate) server_side_encryption: ::std::option::Option<crate::types::ServerSideEncryption>,
521    pub(crate) storage_class: ::std::option::Option<crate::types::StorageClass>,
522    pub(crate) website_redirect_location: ::std::option::Option<::std::string::String>,
523    pub(crate) sse_customer_algorithm: ::std::option::Option<::std::string::String>,
524    pub(crate) sse_customer_key: ::std::option::Option<::std::string::String>,
525    pub(crate) sse_customer_key_md5: ::std::option::Option<::std::string::String>,
526    pub(crate) ssekms_key_id: ::std::option::Option<::std::string::String>,
527    pub(crate) ssekms_encryption_context: ::std::option::Option<::std::string::String>,
528    pub(crate) bucket_key_enabled: ::std::option::Option<bool>,
529    pub(crate) request_payer: ::std::option::Option<crate::types::RequestPayer>,
530    pub(crate) tagging: ::std::option::Option<::std::string::String>,
531    pub(crate) object_lock_mode: ::std::option::Option<crate::types::ObjectLockMode>,
532    pub(crate) object_lock_retain_until_date: ::std::option::Option<::aws_smithy_types::DateTime>,
533    pub(crate) object_lock_legal_hold_status: ::std::option::Option<crate::types::ObjectLockLegalHoldStatus>,
534    pub(crate) expected_bucket_owner: ::std::option::Option<::std::string::String>,
535}
536impl PutObjectInputBuilder {
537    /// <p>The canned ACL to apply to the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#CannedACL">Canned ACL</a> in the <i>Amazon S3 User Guide</i>.</p>
538    /// <p>When adding a new object, you can use headers to grant ACL-based permissions to individual Amazon Web Services accounts or to predefined groups defined by Amazon S3. These permissions are then added to the ACL on the object. By default, all objects are private. Only the owner has full access control. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html">Access Control List (ACL) Overview</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-using-rest-api.html">Managing ACLs Using the REST API</a> in the <i>Amazon S3 User Guide</i>.</p>
539    /// <p>If the bucket that you're uploading objects to uses the bucket owner enforced setting for S3 Object Ownership, ACLs are disabled and no longer affect permissions. Buckets that use this setting only accept PUT requests that don't specify an ACL or PUT requests that specify bucket owner full control ACLs, such as the <code>bucket-owner-full-control</code> canned ACL or an equivalent form of this ACL expressed in the XML format. PUT requests that contain other ACLs (for example, custom grants to certain Amazon Web Services accounts) fail and return a <code>400</code> error with the error code <code>AccessControlListNotSupported</code>. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html"> Controlling ownership of objects and disabling ACLs</a> in the <i>Amazon S3 User Guide</i>.</p><note>
540    /// <ul>
541    /// <li>
542    /// <p>This functionality is not supported for directory buckets.</p></li>
543    /// <li>
544    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
545    /// </ul>
546    /// </note>
547    pub fn acl(mut self, input: crate::types::ObjectCannedAcl) -> Self {
548        self.acl = ::std::option::Option::Some(input);
549        self
550    }
551    /// <p>The canned ACL to apply to the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#CannedACL">Canned ACL</a> in the <i>Amazon S3 User Guide</i>.</p>
552    /// <p>When adding a new object, you can use headers to grant ACL-based permissions to individual Amazon Web Services accounts or to predefined groups defined by Amazon S3. These permissions are then added to the ACL on the object. By default, all objects are private. Only the owner has full access control. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html">Access Control List (ACL) Overview</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-using-rest-api.html">Managing ACLs Using the REST API</a> in the <i>Amazon S3 User Guide</i>.</p>
553    /// <p>If the bucket that you're uploading objects to uses the bucket owner enforced setting for S3 Object Ownership, ACLs are disabled and no longer affect permissions. Buckets that use this setting only accept PUT requests that don't specify an ACL or PUT requests that specify bucket owner full control ACLs, such as the <code>bucket-owner-full-control</code> canned ACL or an equivalent form of this ACL expressed in the XML format. PUT requests that contain other ACLs (for example, custom grants to certain Amazon Web Services accounts) fail and return a <code>400</code> error with the error code <code>AccessControlListNotSupported</code>. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html"> Controlling ownership of objects and disabling ACLs</a> in the <i>Amazon S3 User Guide</i>.</p><note>
554    /// <ul>
555    /// <li>
556    /// <p>This functionality is not supported for directory buckets.</p></li>
557    /// <li>
558    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
559    /// </ul>
560    /// </note>
561    pub fn set_acl(mut self, input: ::std::option::Option<crate::types::ObjectCannedAcl>) -> Self {
562        self.acl = input;
563        self
564    }
565    /// <p>The canned ACL to apply to the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#CannedACL">Canned ACL</a> in the <i>Amazon S3 User Guide</i>.</p>
566    /// <p>When adding a new object, you can use headers to grant ACL-based permissions to individual Amazon Web Services accounts or to predefined groups defined by Amazon S3. These permissions are then added to the ACL on the object. By default, all objects are private. Only the owner has full access control. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html">Access Control List (ACL) Overview</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-using-rest-api.html">Managing ACLs Using the REST API</a> in the <i>Amazon S3 User Guide</i>.</p>
567    /// <p>If the bucket that you're uploading objects to uses the bucket owner enforced setting for S3 Object Ownership, ACLs are disabled and no longer affect permissions. Buckets that use this setting only accept PUT requests that don't specify an ACL or PUT requests that specify bucket owner full control ACLs, such as the <code>bucket-owner-full-control</code> canned ACL or an equivalent form of this ACL expressed in the XML format. PUT requests that contain other ACLs (for example, custom grants to certain Amazon Web Services accounts) fail and return a <code>400</code> error with the error code <code>AccessControlListNotSupported</code>. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html"> Controlling ownership of objects and disabling ACLs</a> in the <i>Amazon S3 User Guide</i>.</p><note>
568    /// <ul>
569    /// <li>
570    /// <p>This functionality is not supported for directory buckets.</p></li>
571    /// <li>
572    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
573    /// </ul>
574    /// </note>
575    pub fn get_acl(&self) -> &::std::option::Option<crate::types::ObjectCannedAcl> {
576        &self.acl
577    }
578    /// <p>Object data.</p>
579    pub fn body(mut self, input: ::aws_smithy_types::byte_stream::ByteStream) -> Self {
580        self.body = ::std::option::Option::Some(input);
581        self
582    }
583    /// <p>Object data.</p>
584    pub fn set_body(mut self, input: ::std::option::Option<::aws_smithy_types::byte_stream::ByteStream>) -> Self {
585        self.body = input;
586        self
587    }
588    /// <p>Object data.</p>
589    pub fn get_body(&self) -> &::std::option::Option<::aws_smithy_types::byte_stream::ByteStream> {
590        &self.body
591    }
592    /// <p>The bucket name to which the PUT action was initiated.</p>
593    /// <p><b>Directory buckets</b> - When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format <code> <i>Bucket_name</i>.s3express-<i>az_id</i>.<i>region</i>.amazonaws.com</code>. Path-style requests are not supported. Directory bucket names must be unique in the chosen Availability Zone. Bucket names must follow the format <code> <i>bucket_base_name</i>--<i>az-id</i>--x-s3</code> (for example, <code> <i>DOC-EXAMPLE-BUCKET</i>--<i>usw2-az1</i>--x-s3</code>). For information about bucket naming restrictions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-bucket-naming-rules.html">Directory bucket naming rules</a> in the <i>Amazon S3 User Guide</i>.</p>
594    /// <p><b>Access points</b> - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form <i>AccessPointName</i>-<i>AccountId</i>.s3-accesspoint.<i>Region</i>.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html">Using access points</a> in the <i>Amazon S3 User Guide</i>.</p><note>
595    /// <p>Access points and Object Lambda access points are not supported by directory buckets.</p>
596    /// </note>
597    /// <p><b>S3 on Outposts</b> - When you use this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form <code> <i>AccessPointName</i>-<i>AccountId</i>.<i>outpostID</i>.s3-outposts.<i>Region</i>.amazonaws.com</code>. When you use this action with S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts access point ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html">What is S3 on Outposts?</a> in the <i>Amazon S3 User Guide</i>.</p>
598    /// This field is required.
599    pub fn bucket(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
600        self.bucket = ::std::option::Option::Some(input.into());
601        self
602    }
603    /// <p>The bucket name to which the PUT action was initiated.</p>
604    /// <p><b>Directory buckets</b> - When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format <code> <i>Bucket_name</i>.s3express-<i>az_id</i>.<i>region</i>.amazonaws.com</code>. Path-style requests are not supported. Directory bucket names must be unique in the chosen Availability Zone. Bucket names must follow the format <code> <i>bucket_base_name</i>--<i>az-id</i>--x-s3</code> (for example, <code> <i>DOC-EXAMPLE-BUCKET</i>--<i>usw2-az1</i>--x-s3</code>). For information about bucket naming restrictions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-bucket-naming-rules.html">Directory bucket naming rules</a> in the <i>Amazon S3 User Guide</i>.</p>
605    /// <p><b>Access points</b> - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form <i>AccessPointName</i>-<i>AccountId</i>.s3-accesspoint.<i>Region</i>.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html">Using access points</a> in the <i>Amazon S3 User Guide</i>.</p><note>
606    /// <p>Access points and Object Lambda access points are not supported by directory buckets.</p>
607    /// </note>
608    /// <p><b>S3 on Outposts</b> - When you use this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form <code> <i>AccessPointName</i>-<i>AccountId</i>.<i>outpostID</i>.s3-outposts.<i>Region</i>.amazonaws.com</code>. When you use this action with S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts access point ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html">What is S3 on Outposts?</a> in the <i>Amazon S3 User Guide</i>.</p>
609    pub fn set_bucket(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
610        self.bucket = input;
611        self
612    }
613    /// <p>The bucket name to which the PUT action was initiated.</p>
614    /// <p><b>Directory buckets</b> - When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format <code> <i>Bucket_name</i>.s3express-<i>az_id</i>.<i>region</i>.amazonaws.com</code>. Path-style requests are not supported. Directory bucket names must be unique in the chosen Availability Zone. Bucket names must follow the format <code> <i>bucket_base_name</i>--<i>az-id</i>--x-s3</code> (for example, <code> <i>DOC-EXAMPLE-BUCKET</i>--<i>usw2-az1</i>--x-s3</code>). For information about bucket naming restrictions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-bucket-naming-rules.html">Directory bucket naming rules</a> in the <i>Amazon S3 User Guide</i>.</p>
615    /// <p><b>Access points</b> - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form <i>AccessPointName</i>-<i>AccountId</i>.s3-accesspoint.<i>Region</i>.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html">Using access points</a> in the <i>Amazon S3 User Guide</i>.</p><note>
616    /// <p>Access points and Object Lambda access points are not supported by directory buckets.</p>
617    /// </note>
618    /// <p><b>S3 on Outposts</b> - When you use this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form <code> <i>AccessPointName</i>-<i>AccountId</i>.<i>outpostID</i>.s3-outposts.<i>Region</i>.amazonaws.com</code>. When you use this action with S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts access point ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html">What is S3 on Outposts?</a> in the <i>Amazon S3 User Guide</i>.</p>
619    pub fn get_bucket(&self) -> &::std::option::Option<::std::string::String> {
620        &self.bucket
621    }
622    /// <p>Can be used to specify caching behavior along the request/reply chain. For more information, see <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9">http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9</a>.</p>
623    pub fn cache_control(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
624        self.cache_control = ::std::option::Option::Some(input.into());
625        self
626    }
627    /// <p>Can be used to specify caching behavior along the request/reply chain. For more information, see <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9">http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9</a>.</p>
628    pub fn set_cache_control(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
629        self.cache_control = input;
630        self
631    }
632    /// <p>Can be used to specify caching behavior along the request/reply chain. For more information, see <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9">http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9</a>.</p>
633    pub fn get_cache_control(&self) -> &::std::option::Option<::std::string::String> {
634        &self.cache_control
635    }
636    /// <p>Specifies presentational information for the object. For more information, see <a href="https://www.rfc-editor.org/rfc/rfc6266#section-4">https://www.rfc-editor.org/rfc/rfc6266#section-4</a>.</p>
637    pub fn content_disposition(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
638        self.content_disposition = ::std::option::Option::Some(input.into());
639        self
640    }
641    /// <p>Specifies presentational information for the object. For more information, see <a href="https://www.rfc-editor.org/rfc/rfc6266#section-4">https://www.rfc-editor.org/rfc/rfc6266#section-4</a>.</p>
642    pub fn set_content_disposition(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
643        self.content_disposition = input;
644        self
645    }
646    /// <p>Specifies presentational information for the object. For more information, see <a href="https://www.rfc-editor.org/rfc/rfc6266#section-4">https://www.rfc-editor.org/rfc/rfc6266#section-4</a>.</p>
647    pub fn get_content_disposition(&self) -> &::std::option::Option<::std::string::String> {
648        &self.content_disposition
649    }
650    /// <p>Specifies what content encodings have been applied to the object and thus what decoding mechanisms must be applied to obtain the media-type referenced by the Content-Type header field. For more information, see <a href="https://www.rfc-editor.org/rfc/rfc9110.html#field.content-encoding">https://www.rfc-editor.org/rfc/rfc9110.html#field.content-encoding</a>.</p>
651    pub fn content_encoding(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
652        self.content_encoding = ::std::option::Option::Some(input.into());
653        self
654    }
655    /// <p>Specifies what content encodings have been applied to the object and thus what decoding mechanisms must be applied to obtain the media-type referenced by the Content-Type header field. For more information, see <a href="https://www.rfc-editor.org/rfc/rfc9110.html#field.content-encoding">https://www.rfc-editor.org/rfc/rfc9110.html#field.content-encoding</a>.</p>
656    pub fn set_content_encoding(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
657        self.content_encoding = input;
658        self
659    }
660    /// <p>Specifies what content encodings have been applied to the object and thus what decoding mechanisms must be applied to obtain the media-type referenced by the Content-Type header field. For more information, see <a href="https://www.rfc-editor.org/rfc/rfc9110.html#field.content-encoding">https://www.rfc-editor.org/rfc/rfc9110.html#field.content-encoding</a>.</p>
661    pub fn get_content_encoding(&self) -> &::std::option::Option<::std::string::String> {
662        &self.content_encoding
663    }
664    /// <p>The language the content is in.</p>
665    pub fn content_language(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
666        self.content_language = ::std::option::Option::Some(input.into());
667        self
668    }
669    /// <p>The language the content is in.</p>
670    pub fn set_content_language(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
671        self.content_language = input;
672        self
673    }
674    /// <p>The language the content is in.</p>
675    pub fn get_content_language(&self) -> &::std::option::Option<::std::string::String> {
676        &self.content_language
677    }
678    /// <p>Size of the body in bytes. This parameter is useful when the size of the body cannot be determined automatically. For more information, see <a href="https://www.rfc-editor.org/rfc/rfc9110.html#name-content-length">https://www.rfc-editor.org/rfc/rfc9110.html#name-content-length</a>.</p>
679    pub fn content_length(mut self, input: i64) -> Self {
680        self.content_length = ::std::option::Option::Some(input);
681        self
682    }
683    /// <p>Size of the body in bytes. This parameter is useful when the size of the body cannot be determined automatically. For more information, see <a href="https://www.rfc-editor.org/rfc/rfc9110.html#name-content-length">https://www.rfc-editor.org/rfc/rfc9110.html#name-content-length</a>.</p>
684    pub fn set_content_length(mut self, input: ::std::option::Option<i64>) -> Self {
685        self.content_length = input;
686        self
687    }
688    /// <p>Size of the body in bytes. This parameter is useful when the size of the body cannot be determined automatically. For more information, see <a href="https://www.rfc-editor.org/rfc/rfc9110.html#name-content-length">https://www.rfc-editor.org/rfc/rfc9110.html#name-content-length</a>.</p>
689    pub fn get_content_length(&self) -> &::std::option::Option<i64> {
690        &self.content_length
691    }
692    /// <p>The base64-encoded 128-bit MD5 digest of the message (without the headers) according to RFC 1864. This header can be used as a message integrity check to verify that the data is the same data that was originally sent. Although it is optional, we recommend using the Content-MD5 mechanism as an end-to-end integrity check. For more information about REST request authentication, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html">REST Authentication</a>.</p><note>
693    /// <p>The <code>Content-MD5</code> header is required for any request to upload an object with a retention period configured using Amazon S3 Object Lock. For more information about Amazon S3 Object Lock, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock-overview.html">Amazon S3 Object Lock Overview</a> in the <i>Amazon S3 User Guide</i>.</p>
694    /// </note> <note>
695    /// <p>This functionality is not supported for directory buckets.</p>
696    /// </note>
697    pub fn content_md5(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
698        self.content_md5 = ::std::option::Option::Some(input.into());
699        self
700    }
701    /// <p>The base64-encoded 128-bit MD5 digest of the message (without the headers) according to RFC 1864. This header can be used as a message integrity check to verify that the data is the same data that was originally sent. Although it is optional, we recommend using the Content-MD5 mechanism as an end-to-end integrity check. For more information about REST request authentication, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html">REST Authentication</a>.</p><note>
702    /// <p>The <code>Content-MD5</code> header is required for any request to upload an object with a retention period configured using Amazon S3 Object Lock. For more information about Amazon S3 Object Lock, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock-overview.html">Amazon S3 Object Lock Overview</a> in the <i>Amazon S3 User Guide</i>.</p>
703    /// </note> <note>
704    /// <p>This functionality is not supported for directory buckets.</p>
705    /// </note>
706    pub fn set_content_md5(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
707        self.content_md5 = input;
708        self
709    }
710    /// <p>The base64-encoded 128-bit MD5 digest of the message (without the headers) according to RFC 1864. This header can be used as a message integrity check to verify that the data is the same data that was originally sent. Although it is optional, we recommend using the Content-MD5 mechanism as an end-to-end integrity check. For more information about REST request authentication, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html">REST Authentication</a>.</p><note>
711    /// <p>The <code>Content-MD5</code> header is required for any request to upload an object with a retention period configured using Amazon S3 Object Lock. For more information about Amazon S3 Object Lock, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock-overview.html">Amazon S3 Object Lock Overview</a> in the <i>Amazon S3 User Guide</i>.</p>
712    /// </note> <note>
713    /// <p>This functionality is not supported for directory buckets.</p>
714    /// </note>
715    pub fn get_content_md5(&self) -> &::std::option::Option<::std::string::String> {
716        &self.content_md5
717    }
718    /// <p>A standard MIME type describing the format of the contents. For more information, see <a href="https://www.rfc-editor.org/rfc/rfc9110.html#name-content-type">https://www.rfc-editor.org/rfc/rfc9110.html#name-content-type</a>.</p>
719    pub fn content_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
720        self.content_type = ::std::option::Option::Some(input.into());
721        self
722    }
723    /// <p>A standard MIME type describing the format of the contents. For more information, see <a href="https://www.rfc-editor.org/rfc/rfc9110.html#name-content-type">https://www.rfc-editor.org/rfc/rfc9110.html#name-content-type</a>.</p>
724    pub fn set_content_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
725        self.content_type = input;
726        self
727    }
728    /// <p>A standard MIME type describing the format of the contents. For more information, see <a href="https://www.rfc-editor.org/rfc/rfc9110.html#name-content-type">https://www.rfc-editor.org/rfc/rfc9110.html#name-content-type</a>.</p>
729    pub fn get_content_type(&self) -> &::std::option::Option<::std::string::String> {
730        &self.content_type
731    }
732    /// <p>Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any additional functionality if you don't use the SDK. When you send this header, there must be a corresponding <code>x-amz-checksum-<i>algorithm</i> </code> or <code>x-amz-trailer</code> header sent. Otherwise, Amazon S3 fails the request with the HTTP status code <code>400 Bad Request</code>.</p>
733    /// <p>For the <code>x-amz-checksum-<i>algorithm</i> </code> header, replace <code> <i>algorithm</i> </code> with the supported algorithm from the following list:</p>
734    /// <ul>
735    /// <li>
736    /// <p>CRC32</p></li>
737    /// <li>
738    /// <p>CRC32C</p></li>
739    /// <li>
740    /// <p>SHA1</p></li>
741    /// <li>
742    /// <p>SHA256</p></li>
743    /// </ul>
744    /// <p>For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
745    /// <p>If the individual checksum value you provide through <code>x-amz-checksum-<i>algorithm</i> </code> doesn't match the checksum algorithm you set through <code>x-amz-sdk-checksum-algorithm</code>, Amazon S3 ignores any provided <code>ChecksumAlgorithm</code> parameter and uses the checksum algorithm that matches the provided value in <code>x-amz-checksum-<i>algorithm</i> </code>.</p><note>
746    /// <p>For directory buckets, when you use Amazon Web Services SDKs, <code>CRC32</code> is the default checksum algorithm that's used for performance.</p>
747    /// </note>
748    pub fn checksum_algorithm(mut self, input: crate::types::ChecksumAlgorithm) -> Self {
749        self.checksum_algorithm = ::std::option::Option::Some(input);
750        self
751    }
752    /// <p>Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any additional functionality if you don't use the SDK. When you send this header, there must be a corresponding <code>x-amz-checksum-<i>algorithm</i> </code> or <code>x-amz-trailer</code> header sent. Otherwise, Amazon S3 fails the request with the HTTP status code <code>400 Bad Request</code>.</p>
753    /// <p>For the <code>x-amz-checksum-<i>algorithm</i> </code> header, replace <code> <i>algorithm</i> </code> with the supported algorithm from the following list:</p>
754    /// <ul>
755    /// <li>
756    /// <p>CRC32</p></li>
757    /// <li>
758    /// <p>CRC32C</p></li>
759    /// <li>
760    /// <p>SHA1</p></li>
761    /// <li>
762    /// <p>SHA256</p></li>
763    /// </ul>
764    /// <p>For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
765    /// <p>If the individual checksum value you provide through <code>x-amz-checksum-<i>algorithm</i> </code> doesn't match the checksum algorithm you set through <code>x-amz-sdk-checksum-algorithm</code>, Amazon S3 ignores any provided <code>ChecksumAlgorithm</code> parameter and uses the checksum algorithm that matches the provided value in <code>x-amz-checksum-<i>algorithm</i> </code>.</p><note>
766    /// <p>For directory buckets, when you use Amazon Web Services SDKs, <code>CRC32</code> is the default checksum algorithm that's used for performance.</p>
767    /// </note>
768    pub fn set_checksum_algorithm(mut self, input: ::std::option::Option<crate::types::ChecksumAlgorithm>) -> Self {
769        self.checksum_algorithm = input;
770        self
771    }
772    /// <p>Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any additional functionality if you don't use the SDK. When you send this header, there must be a corresponding <code>x-amz-checksum-<i>algorithm</i> </code> or <code>x-amz-trailer</code> header sent. Otherwise, Amazon S3 fails the request with the HTTP status code <code>400 Bad Request</code>.</p>
773    /// <p>For the <code>x-amz-checksum-<i>algorithm</i> </code> header, replace <code> <i>algorithm</i> </code> with the supported algorithm from the following list:</p>
774    /// <ul>
775    /// <li>
776    /// <p>CRC32</p></li>
777    /// <li>
778    /// <p>CRC32C</p></li>
779    /// <li>
780    /// <p>SHA1</p></li>
781    /// <li>
782    /// <p>SHA256</p></li>
783    /// </ul>
784    /// <p>For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
785    /// <p>If the individual checksum value you provide through <code>x-amz-checksum-<i>algorithm</i> </code> doesn't match the checksum algorithm you set through <code>x-amz-sdk-checksum-algorithm</code>, Amazon S3 ignores any provided <code>ChecksumAlgorithm</code> parameter and uses the checksum algorithm that matches the provided value in <code>x-amz-checksum-<i>algorithm</i> </code>.</p><note>
786    /// <p>For directory buckets, when you use Amazon Web Services SDKs, <code>CRC32</code> is the default checksum algorithm that's used for performance.</p>
787    /// </note>
788    pub fn get_checksum_algorithm(&self) -> &::std::option::Option<crate::types::ChecksumAlgorithm> {
789        &self.checksum_algorithm
790    }
791    /// <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the base64-encoded, 32-bit CRC32 checksum of the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
792    pub fn checksum_crc32(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
793        self.checksum_crc32 = ::std::option::Option::Some(input.into());
794        self
795    }
796    /// <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the base64-encoded, 32-bit CRC32 checksum of the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
797    pub fn set_checksum_crc32(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
798        self.checksum_crc32 = input;
799        self
800    }
801    /// <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the base64-encoded, 32-bit CRC32 checksum of the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
802    pub fn get_checksum_crc32(&self) -> &::std::option::Option<::std::string::String> {
803        &self.checksum_crc32
804    }
805    /// <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the base64-encoded, 32-bit CRC32C checksum of the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
806    pub fn checksum_crc32_c(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
807        self.checksum_crc32_c = ::std::option::Option::Some(input.into());
808        self
809    }
810    /// <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the base64-encoded, 32-bit CRC32C checksum of the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
811    pub fn set_checksum_crc32_c(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
812        self.checksum_crc32_c = input;
813        self
814    }
815    /// <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the base64-encoded, 32-bit CRC32C checksum of the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
816    pub fn get_checksum_crc32_c(&self) -> &::std::option::Option<::std::string::String> {
817        &self.checksum_crc32_c
818    }
819    /// <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the base64-encoded, 160-bit SHA-1 digest of the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
820    pub fn checksum_sha1(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
821        self.checksum_sha1 = ::std::option::Option::Some(input.into());
822        self
823    }
824    /// <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the base64-encoded, 160-bit SHA-1 digest of the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
825    pub fn set_checksum_sha1(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
826        self.checksum_sha1 = input;
827        self
828    }
829    /// <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the base64-encoded, 160-bit SHA-1 digest of the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
830    pub fn get_checksum_sha1(&self) -> &::std::option::Option<::std::string::String> {
831        &self.checksum_sha1
832    }
833    /// <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the base64-encoded, 256-bit SHA-256 digest of the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
834    pub fn checksum_sha256(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
835        self.checksum_sha256 = ::std::option::Option::Some(input.into());
836        self
837    }
838    /// <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the base64-encoded, 256-bit SHA-256 digest of the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
839    pub fn set_checksum_sha256(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
840        self.checksum_sha256 = input;
841        self
842    }
843    /// <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the base64-encoded, 256-bit SHA-256 digest of the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
844    pub fn get_checksum_sha256(&self) -> &::std::option::Option<::std::string::String> {
845        &self.checksum_sha256
846    }
847    /// <p>The date and time at which the object is no longer cacheable. For more information, see <a href="https://www.rfc-editor.org/rfc/rfc7234#section-5.3">https://www.rfc-editor.org/rfc/rfc7234#section-5.3</a>.</p>
848    pub fn expires(mut self, input: ::aws_smithy_types::DateTime) -> Self {
849        self.expires = ::std::option::Option::Some(input);
850        self
851    }
852    /// <p>The date and time at which the object is no longer cacheable. For more information, see <a href="https://www.rfc-editor.org/rfc/rfc7234#section-5.3">https://www.rfc-editor.org/rfc/rfc7234#section-5.3</a>.</p>
853    pub fn set_expires(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
854        self.expires = input;
855        self
856    }
857    /// <p>The date and time at which the object is no longer cacheable. For more information, see <a href="https://www.rfc-editor.org/rfc/rfc7234#section-5.3">https://www.rfc-editor.org/rfc/rfc7234#section-5.3</a>.</p>
858    pub fn get_expires(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
859        &self.expires
860    }
861    /// <p>Uploads the object only if the object key name does not already exist in the bucket specified. Otherwise, Amazon S3 returns a <code>412 Precondition Failed</code> error.</p>
862    /// <p>If a conflicting operation occurs during the upload S3 returns a <code>409 ConditionalRequestConflict</code> response. On a 409 failure you should retry the upload.</p>
863    /// <p>Expects the '*' (asterisk) character.</p>
864    /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>, or <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/conditional-requests.html">Conditional requests</a> in the <i>Amazon S3 User Guide</i>.</p>
865    pub fn if_none_match(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
866        self.if_none_match = ::std::option::Option::Some(input.into());
867        self
868    }
869    /// <p>Uploads the object only if the object key name does not already exist in the bucket specified. Otherwise, Amazon S3 returns a <code>412 Precondition Failed</code> error.</p>
870    /// <p>If a conflicting operation occurs during the upload S3 returns a <code>409 ConditionalRequestConflict</code> response. On a 409 failure you should retry the upload.</p>
871    /// <p>Expects the '*' (asterisk) character.</p>
872    /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>, or <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/conditional-requests.html">Conditional requests</a> in the <i>Amazon S3 User Guide</i>.</p>
873    pub fn set_if_none_match(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
874        self.if_none_match = input;
875        self
876    }
877    /// <p>Uploads the object only if the object key name does not already exist in the bucket specified. Otherwise, Amazon S3 returns a <code>412 Precondition Failed</code> error.</p>
878    /// <p>If a conflicting operation occurs during the upload S3 returns a <code>409 ConditionalRequestConflict</code> response. On a 409 failure you should retry the upload.</p>
879    /// <p>Expects the '*' (asterisk) character.</p>
880    /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>, or <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/conditional-requests.html">Conditional requests</a> in the <i>Amazon S3 User Guide</i>.</p>
881    pub fn get_if_none_match(&self) -> &::std::option::Option<::std::string::String> {
882        &self.if_none_match
883    }
884    /// <p>Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.</p><note>
885    /// <ul>
886    /// <li>
887    /// <p>This functionality is not supported for directory buckets.</p></li>
888    /// <li>
889    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
890    /// </ul>
891    /// </note>
892    pub fn grant_full_control(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
893        self.grant_full_control = ::std::option::Option::Some(input.into());
894        self
895    }
896    /// <p>Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.</p><note>
897    /// <ul>
898    /// <li>
899    /// <p>This functionality is not supported for directory buckets.</p></li>
900    /// <li>
901    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
902    /// </ul>
903    /// </note>
904    pub fn set_grant_full_control(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
905        self.grant_full_control = input;
906        self
907    }
908    /// <p>Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.</p><note>
909    /// <ul>
910    /// <li>
911    /// <p>This functionality is not supported for directory buckets.</p></li>
912    /// <li>
913    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
914    /// </ul>
915    /// </note>
916    pub fn get_grant_full_control(&self) -> &::std::option::Option<::std::string::String> {
917        &self.grant_full_control
918    }
919    /// <p>Allows grantee to read the object data and its metadata.</p><note>
920    /// <ul>
921    /// <li>
922    /// <p>This functionality is not supported for directory buckets.</p></li>
923    /// <li>
924    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
925    /// </ul>
926    /// </note>
927    pub fn grant_read(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
928        self.grant_read = ::std::option::Option::Some(input.into());
929        self
930    }
931    /// <p>Allows grantee to read the object data and its metadata.</p><note>
932    /// <ul>
933    /// <li>
934    /// <p>This functionality is not supported for directory buckets.</p></li>
935    /// <li>
936    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
937    /// </ul>
938    /// </note>
939    pub fn set_grant_read(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
940        self.grant_read = input;
941        self
942    }
943    /// <p>Allows grantee to read the object data and its metadata.</p><note>
944    /// <ul>
945    /// <li>
946    /// <p>This functionality is not supported for directory buckets.</p></li>
947    /// <li>
948    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
949    /// </ul>
950    /// </note>
951    pub fn get_grant_read(&self) -> &::std::option::Option<::std::string::String> {
952        &self.grant_read
953    }
954    /// <p>Allows grantee to read the object ACL.</p><note>
955    /// <ul>
956    /// <li>
957    /// <p>This functionality is not supported for directory buckets.</p></li>
958    /// <li>
959    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
960    /// </ul>
961    /// </note>
962    pub fn grant_read_acp(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
963        self.grant_read_acp = ::std::option::Option::Some(input.into());
964        self
965    }
966    /// <p>Allows grantee to read the object ACL.</p><note>
967    /// <ul>
968    /// <li>
969    /// <p>This functionality is not supported for directory buckets.</p></li>
970    /// <li>
971    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
972    /// </ul>
973    /// </note>
974    pub fn set_grant_read_acp(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
975        self.grant_read_acp = input;
976        self
977    }
978    /// <p>Allows grantee to read the object ACL.</p><note>
979    /// <ul>
980    /// <li>
981    /// <p>This functionality is not supported for directory buckets.</p></li>
982    /// <li>
983    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
984    /// </ul>
985    /// </note>
986    pub fn get_grant_read_acp(&self) -> &::std::option::Option<::std::string::String> {
987        &self.grant_read_acp
988    }
989    /// <p>Allows grantee to write the ACL for the applicable object.</p><note>
990    /// <ul>
991    /// <li>
992    /// <p>This functionality is not supported for directory buckets.</p></li>
993    /// <li>
994    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
995    /// </ul>
996    /// </note>
997    pub fn grant_write_acp(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
998        self.grant_write_acp = ::std::option::Option::Some(input.into());
999        self
1000    }
1001    /// <p>Allows grantee to write the ACL for the applicable object.</p><note>
1002    /// <ul>
1003    /// <li>
1004    /// <p>This functionality is not supported for directory buckets.</p></li>
1005    /// <li>
1006    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
1007    /// </ul>
1008    /// </note>
1009    pub fn set_grant_write_acp(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1010        self.grant_write_acp = input;
1011        self
1012    }
1013    /// <p>Allows grantee to write the ACL for the applicable object.</p><note>
1014    /// <ul>
1015    /// <li>
1016    /// <p>This functionality is not supported for directory buckets.</p></li>
1017    /// <li>
1018    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
1019    /// </ul>
1020    /// </note>
1021    pub fn get_grant_write_acp(&self) -> &::std::option::Option<::std::string::String> {
1022        &self.grant_write_acp
1023    }
1024    /// <p>Object key for which the PUT action was initiated.</p>
1025    /// This field is required.
1026    pub fn key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1027        self.key = ::std::option::Option::Some(input.into());
1028        self
1029    }
1030    /// <p>Object key for which the PUT action was initiated.</p>
1031    pub fn set_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1032        self.key = input;
1033        self
1034    }
1035    /// <p>Object key for which the PUT action was initiated.</p>
1036    pub fn get_key(&self) -> &::std::option::Option<::std::string::String> {
1037        &self.key
1038    }
1039    /// Adds a key-value pair to `metadata`.
1040    ///
1041    /// To override the contents of this collection use [`set_metadata`](Self::set_metadata).
1042    ///
1043    /// <p>A map of metadata to store with the object in S3.</p>
1044    pub fn metadata(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
1045        let mut hash_map = self.metadata.unwrap_or_default();
1046        hash_map.insert(k.into(), v.into());
1047        self.metadata = ::std::option::Option::Some(hash_map);
1048        self
1049    }
1050    /// <p>A map of metadata to store with the object in S3.</p>
1051    pub fn set_metadata(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
1052        self.metadata = input;
1053        self
1054    }
1055    /// <p>A map of metadata to store with the object in S3.</p>
1056    pub fn get_metadata(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
1057        &self.metadata
1058    }
1059    /// <p>The server-side encryption algorithm that was used when you store this object in Amazon S3 (for example, <code>AES256</code>, <code>aws:kms</code>, <code>aws:kms:dsse</code>).</p>
1060    /// <p><b>General purpose buckets </b> - You have four mutually exclusive options to protect data using server-side encryption in Amazon S3, depending on how you choose to manage the encryption keys. Specifically, the encryption key options are Amazon S3 managed keys (SSE-S3), Amazon Web Services KMS keys (SSE-KMS or DSSE-KMS), and customer-provided keys (SSE-C). Amazon S3 encrypts data with server-side encryption by using Amazon S3 managed keys (SSE-S3) by default. You can optionally tell Amazon S3 to encrypt data at rest by using server-side encryption with other key options. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingServerSideEncryption.html">Using Server-Side Encryption</a> in the <i>Amazon S3 User Guide</i>.</p>
1061    /// <p><b>Directory buckets </b> - For directory buckets, only the server-side encryption with Amazon S3 managed keys (SSE-S3) (<code>AES256</code>) value is supported.</p>
1062    pub fn server_side_encryption(mut self, input: crate::types::ServerSideEncryption) -> Self {
1063        self.server_side_encryption = ::std::option::Option::Some(input);
1064        self
1065    }
1066    /// <p>The server-side encryption algorithm that was used when you store this object in Amazon S3 (for example, <code>AES256</code>, <code>aws:kms</code>, <code>aws:kms:dsse</code>).</p>
1067    /// <p><b>General purpose buckets </b> - You have four mutually exclusive options to protect data using server-side encryption in Amazon S3, depending on how you choose to manage the encryption keys. Specifically, the encryption key options are Amazon S3 managed keys (SSE-S3), Amazon Web Services KMS keys (SSE-KMS or DSSE-KMS), and customer-provided keys (SSE-C). Amazon S3 encrypts data with server-side encryption by using Amazon S3 managed keys (SSE-S3) by default. You can optionally tell Amazon S3 to encrypt data at rest by using server-side encryption with other key options. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingServerSideEncryption.html">Using Server-Side Encryption</a> in the <i>Amazon S3 User Guide</i>.</p>
1068    /// <p><b>Directory buckets </b> - For directory buckets, only the server-side encryption with Amazon S3 managed keys (SSE-S3) (<code>AES256</code>) value is supported.</p>
1069    pub fn set_server_side_encryption(mut self, input: ::std::option::Option<crate::types::ServerSideEncryption>) -> Self {
1070        self.server_side_encryption = input;
1071        self
1072    }
1073    /// <p>The server-side encryption algorithm that was used when you store this object in Amazon S3 (for example, <code>AES256</code>, <code>aws:kms</code>, <code>aws:kms:dsse</code>).</p>
1074    /// <p><b>General purpose buckets </b> - You have four mutually exclusive options to protect data using server-side encryption in Amazon S3, depending on how you choose to manage the encryption keys. Specifically, the encryption key options are Amazon S3 managed keys (SSE-S3), Amazon Web Services KMS keys (SSE-KMS or DSSE-KMS), and customer-provided keys (SSE-C). Amazon S3 encrypts data with server-side encryption by using Amazon S3 managed keys (SSE-S3) by default. You can optionally tell Amazon S3 to encrypt data at rest by using server-side encryption with other key options. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingServerSideEncryption.html">Using Server-Side Encryption</a> in the <i>Amazon S3 User Guide</i>.</p>
1075    /// <p><b>Directory buckets </b> - For directory buckets, only the server-side encryption with Amazon S3 managed keys (SSE-S3) (<code>AES256</code>) value is supported.</p>
1076    pub fn get_server_side_encryption(&self) -> &::std::option::Option<crate::types::ServerSideEncryption> {
1077        &self.server_side_encryption
1078    }
1079    /// <p>By default, Amazon S3 uses the STANDARD Storage Class to store newly created objects. The STANDARD storage class provides high durability and high availability. Depending on performance needs, you can specify a different Storage Class. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html">Storage Classes</a> in the <i>Amazon S3 User Guide</i>.</p><note>
1080    /// <ul>
1081    /// <li>
1082    /// <p>For directory buckets, only the S3 Express One Zone storage class is supported to store newly created objects.</p></li>
1083    /// <li>
1084    /// <p>Amazon S3 on Outposts only uses the OUTPOSTS Storage Class.</p></li>
1085    /// </ul>
1086    /// </note>
1087    pub fn storage_class(mut self, input: crate::types::StorageClass) -> Self {
1088        self.storage_class = ::std::option::Option::Some(input);
1089        self
1090    }
1091    /// <p>By default, Amazon S3 uses the STANDARD Storage Class to store newly created objects. The STANDARD storage class provides high durability and high availability. Depending on performance needs, you can specify a different Storage Class. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html">Storage Classes</a> in the <i>Amazon S3 User Guide</i>.</p><note>
1092    /// <ul>
1093    /// <li>
1094    /// <p>For directory buckets, only the S3 Express One Zone storage class is supported to store newly created objects.</p></li>
1095    /// <li>
1096    /// <p>Amazon S3 on Outposts only uses the OUTPOSTS Storage Class.</p></li>
1097    /// </ul>
1098    /// </note>
1099    pub fn set_storage_class(mut self, input: ::std::option::Option<crate::types::StorageClass>) -> Self {
1100        self.storage_class = input;
1101        self
1102    }
1103    /// <p>By default, Amazon S3 uses the STANDARD Storage Class to store newly created objects. The STANDARD storage class provides high durability and high availability. Depending on performance needs, you can specify a different Storage Class. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html">Storage Classes</a> in the <i>Amazon S3 User Guide</i>.</p><note>
1104    /// <ul>
1105    /// <li>
1106    /// <p>For directory buckets, only the S3 Express One Zone storage class is supported to store newly created objects.</p></li>
1107    /// <li>
1108    /// <p>Amazon S3 on Outposts only uses the OUTPOSTS Storage Class.</p></li>
1109    /// </ul>
1110    /// </note>
1111    pub fn get_storage_class(&self) -> &::std::option::Option<crate::types::StorageClass> {
1112        &self.storage_class
1113    }
1114    /// <p>If the bucket is configured as a website, redirects requests for this object to another object in the same bucket or to an external URL. Amazon S3 stores the value of this header in the object metadata. For information about object metadata, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMetadata.html">Object Key and Metadata</a> in the <i>Amazon S3 User Guide</i>.</p>
1115    /// <p>In the following example, the request header sets the redirect to an object (anotherPage.html) in the same bucket:</p>
1116    /// <p><code>x-amz-website-redirect-location: /anotherPage.html</code></p>
1117    /// <p>In the following example, the request header sets the object redirect to another website:</p>
1118    /// <p><code>x-amz-website-redirect-location: http://www.example.com/</code></p>
1119    /// <p>For more information about website hosting in Amazon S3, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/WebsiteHosting.html">Hosting Websites on Amazon S3</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/how-to-page-redirect.html">How to Configure Website Page Redirects</a> in the <i>Amazon S3 User Guide</i>.</p><note>
1120    /// <p>This functionality is not supported for directory buckets.</p>
1121    /// </note>
1122    pub fn website_redirect_location(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1123        self.website_redirect_location = ::std::option::Option::Some(input.into());
1124        self
1125    }
1126    /// <p>If the bucket is configured as a website, redirects requests for this object to another object in the same bucket or to an external URL. Amazon S3 stores the value of this header in the object metadata. For information about object metadata, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMetadata.html">Object Key and Metadata</a> in the <i>Amazon S3 User Guide</i>.</p>
1127    /// <p>In the following example, the request header sets the redirect to an object (anotherPage.html) in the same bucket:</p>
1128    /// <p><code>x-amz-website-redirect-location: /anotherPage.html</code></p>
1129    /// <p>In the following example, the request header sets the object redirect to another website:</p>
1130    /// <p><code>x-amz-website-redirect-location: http://www.example.com/</code></p>
1131    /// <p>For more information about website hosting in Amazon S3, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/WebsiteHosting.html">Hosting Websites on Amazon S3</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/how-to-page-redirect.html">How to Configure Website Page Redirects</a> in the <i>Amazon S3 User Guide</i>.</p><note>
1132    /// <p>This functionality is not supported for directory buckets.</p>
1133    /// </note>
1134    pub fn set_website_redirect_location(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1135        self.website_redirect_location = input;
1136        self
1137    }
1138    /// <p>If the bucket is configured as a website, redirects requests for this object to another object in the same bucket or to an external URL. Amazon S3 stores the value of this header in the object metadata. For information about object metadata, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMetadata.html">Object Key and Metadata</a> in the <i>Amazon S3 User Guide</i>.</p>
1139    /// <p>In the following example, the request header sets the redirect to an object (anotherPage.html) in the same bucket:</p>
1140    /// <p><code>x-amz-website-redirect-location: /anotherPage.html</code></p>
1141    /// <p>In the following example, the request header sets the object redirect to another website:</p>
1142    /// <p><code>x-amz-website-redirect-location: http://www.example.com/</code></p>
1143    /// <p>For more information about website hosting in Amazon S3, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/WebsiteHosting.html">Hosting Websites on Amazon S3</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/how-to-page-redirect.html">How to Configure Website Page Redirects</a> in the <i>Amazon S3 User Guide</i>.</p><note>
1144    /// <p>This functionality is not supported for directory buckets.</p>
1145    /// </note>
1146    pub fn get_website_redirect_location(&self) -> &::std::option::Option<::std::string::String> {
1147        &self.website_redirect_location
1148    }
1149    /// <p>Specifies the algorithm to use when encrypting the object (for example, <code>AES256</code>).</p><note>
1150    /// <p>This functionality is not supported for directory buckets.</p>
1151    /// </note>
1152    pub fn sse_customer_algorithm(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1153        self.sse_customer_algorithm = ::std::option::Option::Some(input.into());
1154        self
1155    }
1156    /// <p>Specifies the algorithm to use when encrypting the object (for example, <code>AES256</code>).</p><note>
1157    /// <p>This functionality is not supported for directory buckets.</p>
1158    /// </note>
1159    pub fn set_sse_customer_algorithm(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1160        self.sse_customer_algorithm = input;
1161        self
1162    }
1163    /// <p>Specifies the algorithm to use when encrypting the object (for example, <code>AES256</code>).</p><note>
1164    /// <p>This functionality is not supported for directory buckets.</p>
1165    /// </note>
1166    pub fn get_sse_customer_algorithm(&self) -> &::std::option::Option<::std::string::String> {
1167        &self.sse_customer_algorithm
1168    }
1169    /// <p>Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This value is used to store the object and then it is discarded; Amazon S3 does not store the encryption key. The key must be appropriate for use with the algorithm specified in the <code>x-amz-server-side-encryption-customer-algorithm</code> header.</p><note>
1170    /// <p>This functionality is not supported for directory buckets.</p>
1171    /// </note>
1172    pub fn sse_customer_key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1173        self.sse_customer_key = ::std::option::Option::Some(input.into());
1174        self
1175    }
1176    /// <p>Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This value is used to store the object and then it is discarded; Amazon S3 does not store the encryption key. The key must be appropriate for use with the algorithm specified in the <code>x-amz-server-side-encryption-customer-algorithm</code> header.</p><note>
1177    /// <p>This functionality is not supported for directory buckets.</p>
1178    /// </note>
1179    pub fn set_sse_customer_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1180        self.sse_customer_key = input;
1181        self
1182    }
1183    /// <p>Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This value is used to store the object and then it is discarded; Amazon S3 does not store the encryption key. The key must be appropriate for use with the algorithm specified in the <code>x-amz-server-side-encryption-customer-algorithm</code> header.</p><note>
1184    /// <p>This functionality is not supported for directory buckets.</p>
1185    /// </note>
1186    pub fn get_sse_customer_key(&self) -> &::std::option::Option<::std::string::String> {
1187        &self.sse_customer_key
1188    }
1189    /// <p>Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses this header for a message integrity check to ensure that the encryption key was transmitted without error.</p><note>
1190    /// <p>This functionality is not supported for directory buckets.</p>
1191    /// </note>
1192    pub fn sse_customer_key_md5(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1193        self.sse_customer_key_md5 = ::std::option::Option::Some(input.into());
1194        self
1195    }
1196    /// <p>Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses this header for a message integrity check to ensure that the encryption key was transmitted without error.</p><note>
1197    /// <p>This functionality is not supported for directory buckets.</p>
1198    /// </note>
1199    pub fn set_sse_customer_key_md5(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1200        self.sse_customer_key_md5 = input;
1201        self
1202    }
1203    /// <p>Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses this header for a message integrity check to ensure that the encryption key was transmitted without error.</p><note>
1204    /// <p>This functionality is not supported for directory buckets.</p>
1205    /// </note>
1206    pub fn get_sse_customer_key_md5(&self) -> &::std::option::Option<::std::string::String> {
1207        &self.sse_customer_key_md5
1208    }
1209    /// <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 specifies the ID (Key ID, Key ARN, or Key Alias) of the Key Management Service (KMS) symmetric encryption customer managed key that was used for the object. If you specify <code>x-amz-server-side-encryption:aws:kms</code> or <code>x-amz-server-side-encryption:aws:kms:dsse</code>, but do not provide<code> x-amz-server-side-encryption-aws-kms-key-id</code>, Amazon S3 uses the Amazon Web Services managed key (<code>aws/s3</code>) to protect the data. If the KMS key does not exist in the same account that's issuing the command, you must use the full ARN and not just the ID.</p><note>
1210    /// <p>This functionality is not supported for directory buckets.</p>
1211    /// </note>
1212    pub fn ssekms_key_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1213        self.ssekms_key_id = ::std::option::Option::Some(input.into());
1214        self
1215    }
1216    /// <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 specifies the ID (Key ID, Key ARN, or Key Alias) of the Key Management Service (KMS) symmetric encryption customer managed key that was used for the object. If you specify <code>x-amz-server-side-encryption:aws:kms</code> or <code>x-amz-server-side-encryption:aws:kms:dsse</code>, but do not provide<code> x-amz-server-side-encryption-aws-kms-key-id</code>, Amazon S3 uses the Amazon Web Services managed key (<code>aws/s3</code>) to protect the data. If the KMS key does not exist in the same account that's issuing the command, you must use the full ARN and not just the ID.</p><note>
1217    /// <p>This functionality is not supported for directory buckets.</p>
1218    /// </note>
1219    pub fn set_ssekms_key_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1220        self.ssekms_key_id = input;
1221        self
1222    }
1223    /// <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 specifies the ID (Key ID, Key ARN, or Key Alias) of the Key Management Service (KMS) symmetric encryption customer managed key that was used for the object. If you specify <code>x-amz-server-side-encryption:aws:kms</code> or <code>x-amz-server-side-encryption:aws:kms:dsse</code>, but do not provide<code> x-amz-server-side-encryption-aws-kms-key-id</code>, Amazon S3 uses the Amazon Web Services managed key (<code>aws/s3</code>) to protect the data. If the KMS key does not exist in the same account that's issuing the command, you must use the full ARN and not just the ID.</p><note>
1224    /// <p>This functionality is not supported for directory buckets.</p>
1225    /// </note>
1226    pub fn get_ssekms_key_id(&self) -> &::std::option::Option<::std::string::String> {
1227        &self.ssekms_key_id
1228    }
1229    /// <p>Specifies the Amazon Web Services KMS Encryption Context to use for object encryption. The value of this header is a base64-encoded UTF-8 string holding JSON with the encryption context key-value pairs. 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. This value must be explicitly added during <code>CopyObject</code> operations.</p><note>
1230    /// <p>This functionality is not supported for directory buckets.</p>
1231    /// </note>
1232    pub fn ssekms_encryption_context(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1233        self.ssekms_encryption_context = ::std::option::Option::Some(input.into());
1234        self
1235    }
1236    /// <p>Specifies the Amazon Web Services KMS Encryption Context to use for object encryption. The value of this header is a base64-encoded UTF-8 string holding JSON with the encryption context key-value pairs. 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. This value must be explicitly added during <code>CopyObject</code> operations.</p><note>
1237    /// <p>This functionality is not supported for directory buckets.</p>
1238    /// </note>
1239    pub fn set_ssekms_encryption_context(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1240        self.ssekms_encryption_context = input;
1241        self
1242    }
1243    /// <p>Specifies the Amazon Web Services KMS Encryption Context to use for object encryption. The value of this header is a base64-encoded UTF-8 string holding JSON with the encryption context key-value pairs. 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. This value must be explicitly added during <code>CopyObject</code> operations.</p><note>
1244    /// <p>This functionality is not supported for directory buckets.</p>
1245    /// </note>
1246    pub fn get_ssekms_encryption_context(&self) -> &::std::option::Option<::std::string::String> {
1247        &self.ssekms_encryption_context
1248    }
1249    /// <p>Specifies whether Amazon S3 should use an S3 Bucket Key for object encryption with server-side encryption using Key Management Service (KMS) keys (SSE-KMS). Setting this header to <code>true</code> causes Amazon S3 to use an S3 Bucket Key for object encryption with SSE-KMS.</p>
1250    /// <p>Specifying this header with a PUT action doesn’t affect bucket-level settings for S3 Bucket Key.</p><note>
1251    /// <p>This functionality is not supported for directory buckets.</p>
1252    /// </note>
1253    pub fn bucket_key_enabled(mut self, input: bool) -> Self {
1254        self.bucket_key_enabled = ::std::option::Option::Some(input);
1255        self
1256    }
1257    /// <p>Specifies whether Amazon S3 should use an S3 Bucket Key for object encryption with server-side encryption using Key Management Service (KMS) keys (SSE-KMS). Setting this header to <code>true</code> causes Amazon S3 to use an S3 Bucket Key for object encryption with SSE-KMS.</p>
1258    /// <p>Specifying this header with a PUT action doesn’t affect bucket-level settings for S3 Bucket Key.</p><note>
1259    /// <p>This functionality is not supported for directory buckets.</p>
1260    /// </note>
1261    pub fn set_bucket_key_enabled(mut self, input: ::std::option::Option<bool>) -> Self {
1262        self.bucket_key_enabled = input;
1263        self
1264    }
1265    /// <p>Specifies whether Amazon S3 should use an S3 Bucket Key for object encryption with server-side encryption using Key Management Service (KMS) keys (SSE-KMS). Setting this header to <code>true</code> causes Amazon S3 to use an S3 Bucket Key for object encryption with SSE-KMS.</p>
1266    /// <p>Specifying this header with a PUT action doesn’t affect bucket-level settings for S3 Bucket Key.</p><note>
1267    /// <p>This functionality is not supported for directory buckets.</p>
1268    /// </note>
1269    pub fn get_bucket_key_enabled(&self) -> &::std::option::Option<bool> {
1270        &self.bucket_key_enabled
1271    }
1272    /// <p>Confirms that the requester knows that they will be charged for the request. Bucket owners need not specify this parameter in their requests. If either the source or destination S3 bucket has Requester Pays enabled, the requester will pay for corresponding charges to copy the object. For information about downloading objects from Requester Pays buckets, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html">Downloading Objects in Requester Pays Buckets</a> in the <i>Amazon S3 User Guide</i>.</p><note>
1273    /// <p>This functionality is not supported for directory buckets.</p>
1274    /// </note>
1275    pub fn request_payer(mut self, input: crate::types::RequestPayer) -> Self {
1276        self.request_payer = ::std::option::Option::Some(input);
1277        self
1278    }
1279    /// <p>Confirms that the requester knows that they will be charged for the request. Bucket owners need not specify this parameter in their requests. If either the source or destination S3 bucket has Requester Pays enabled, the requester will pay for corresponding charges to copy the object. For information about downloading objects from Requester Pays buckets, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html">Downloading Objects in Requester Pays Buckets</a> in the <i>Amazon S3 User Guide</i>.</p><note>
1280    /// <p>This functionality is not supported for directory buckets.</p>
1281    /// </note>
1282    pub fn set_request_payer(mut self, input: ::std::option::Option<crate::types::RequestPayer>) -> Self {
1283        self.request_payer = input;
1284        self
1285    }
1286    /// <p>Confirms that the requester knows that they will be charged for the request. Bucket owners need not specify this parameter in their requests. If either the source or destination S3 bucket has Requester Pays enabled, the requester will pay for corresponding charges to copy the object. For information about downloading objects from Requester Pays buckets, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html">Downloading Objects in Requester Pays Buckets</a> in the <i>Amazon S3 User Guide</i>.</p><note>
1287    /// <p>This functionality is not supported for directory buckets.</p>
1288    /// </note>
1289    pub fn get_request_payer(&self) -> &::std::option::Option<crate::types::RequestPayer> {
1290        &self.request_payer
1291    }
1292    /// <p>The tag-set for the object. The tag-set must be encoded as URL Query parameters. (For example, "Key1=Value1")</p><note>
1293    /// <p>This functionality is not supported for directory buckets.</p>
1294    /// </note>
1295    pub fn tagging(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1296        self.tagging = ::std::option::Option::Some(input.into());
1297        self
1298    }
1299    /// <p>The tag-set for the object. The tag-set must be encoded as URL Query parameters. (For example, "Key1=Value1")</p><note>
1300    /// <p>This functionality is not supported for directory buckets.</p>
1301    /// </note>
1302    pub fn set_tagging(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1303        self.tagging = input;
1304        self
1305    }
1306    /// <p>The tag-set for the object. The tag-set must be encoded as URL Query parameters. (For example, "Key1=Value1")</p><note>
1307    /// <p>This functionality is not supported for directory buckets.</p>
1308    /// </note>
1309    pub fn get_tagging(&self) -> &::std::option::Option<::std::string::String> {
1310        &self.tagging
1311    }
1312    /// <p>The Object Lock mode that you want to apply to this object.</p><note>
1313    /// <p>This functionality is not supported for directory buckets.</p>
1314    /// </note>
1315    pub fn object_lock_mode(mut self, input: crate::types::ObjectLockMode) -> Self {
1316        self.object_lock_mode = ::std::option::Option::Some(input);
1317        self
1318    }
1319    /// <p>The Object Lock mode that you want to apply to this object.</p><note>
1320    /// <p>This functionality is not supported for directory buckets.</p>
1321    /// </note>
1322    pub fn set_object_lock_mode(mut self, input: ::std::option::Option<crate::types::ObjectLockMode>) -> Self {
1323        self.object_lock_mode = input;
1324        self
1325    }
1326    /// <p>The Object Lock mode that you want to apply to this object.</p><note>
1327    /// <p>This functionality is not supported for directory buckets.</p>
1328    /// </note>
1329    pub fn get_object_lock_mode(&self) -> &::std::option::Option<crate::types::ObjectLockMode> {
1330        &self.object_lock_mode
1331    }
1332    /// <p>The date and time when you want this object's Object Lock to expire. Must be formatted as a timestamp parameter.</p><note>
1333    /// <p>This functionality is not supported for directory buckets.</p>
1334    /// </note>
1335    pub fn object_lock_retain_until_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
1336        self.object_lock_retain_until_date = ::std::option::Option::Some(input);
1337        self
1338    }
1339    /// <p>The date and time when you want this object's Object Lock to expire. Must be formatted as a timestamp parameter.</p><note>
1340    /// <p>This functionality is not supported for directory buckets.</p>
1341    /// </note>
1342    pub fn set_object_lock_retain_until_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
1343        self.object_lock_retain_until_date = input;
1344        self
1345    }
1346    /// <p>The date and time when you want this object's Object Lock to expire. Must be formatted as a timestamp parameter.</p><note>
1347    /// <p>This functionality is not supported for directory buckets.</p>
1348    /// </note>
1349    pub fn get_object_lock_retain_until_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
1350        &self.object_lock_retain_until_date
1351    }
1352    /// <p>Specifies whether a legal hold will be applied to this object. For more information about S3 Object Lock, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html">Object Lock</a> in the <i>Amazon S3 User Guide</i>.</p><note>
1353    /// <p>This functionality is not supported for directory buckets.</p>
1354    /// </note>
1355    pub fn object_lock_legal_hold_status(mut self, input: crate::types::ObjectLockLegalHoldStatus) -> Self {
1356        self.object_lock_legal_hold_status = ::std::option::Option::Some(input);
1357        self
1358    }
1359    /// <p>Specifies whether a legal hold will be applied to this object. For more information about S3 Object Lock, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html">Object Lock</a> in the <i>Amazon S3 User Guide</i>.</p><note>
1360    /// <p>This functionality is not supported for directory buckets.</p>
1361    /// </note>
1362    pub fn set_object_lock_legal_hold_status(mut self, input: ::std::option::Option<crate::types::ObjectLockLegalHoldStatus>) -> Self {
1363        self.object_lock_legal_hold_status = input;
1364        self
1365    }
1366    /// <p>Specifies whether a legal hold will be applied to this object. For more information about S3 Object Lock, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html">Object Lock</a> in the <i>Amazon S3 User Guide</i>.</p><note>
1367    /// <p>This functionality is not supported for directory buckets.</p>
1368    /// </note>
1369    pub fn get_object_lock_legal_hold_status(&self) -> &::std::option::Option<crate::types::ObjectLockLegalHoldStatus> {
1370        &self.object_lock_legal_hold_status
1371    }
1372    /// <p>The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code <code>403 Forbidden</code> (access denied).</p>
1373    pub fn expected_bucket_owner(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1374        self.expected_bucket_owner = ::std::option::Option::Some(input.into());
1375        self
1376    }
1377    /// <p>The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code <code>403 Forbidden</code> (access denied).</p>
1378    pub fn set_expected_bucket_owner(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1379        self.expected_bucket_owner = input;
1380        self
1381    }
1382    /// <p>The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code <code>403 Forbidden</code> (access denied).</p>
1383    pub fn get_expected_bucket_owner(&self) -> &::std::option::Option<::std::string::String> {
1384        &self.expected_bucket_owner
1385    }
1386    /// Consumes the builder and constructs a [`PutObjectInput`](crate::operation::put_object::PutObjectInput).
1387    pub fn build(self) -> ::std::result::Result<crate::operation::put_object::PutObjectInput, ::aws_smithy_types::error::operation::BuildError> {
1388        ::std::result::Result::Ok(crate::operation::put_object::PutObjectInput {
1389            acl: self.acl,
1390            body: self.body.unwrap_or_default(),
1391            bucket: self.bucket,
1392            cache_control: self.cache_control,
1393            content_disposition: self.content_disposition,
1394            content_encoding: self.content_encoding,
1395            content_language: self.content_language,
1396            content_length: self.content_length,
1397            content_md5: self.content_md5,
1398            content_type: self.content_type,
1399            checksum_algorithm: self.checksum_algorithm,
1400            checksum_crc32: self.checksum_crc32,
1401            checksum_crc32_c: self.checksum_crc32_c,
1402            checksum_sha1: self.checksum_sha1,
1403            checksum_sha256: self.checksum_sha256,
1404            expires: self.expires,
1405            if_none_match: self.if_none_match,
1406            grant_full_control: self.grant_full_control,
1407            grant_read: self.grant_read,
1408            grant_read_acp: self.grant_read_acp,
1409            grant_write_acp: self.grant_write_acp,
1410            key: self.key,
1411            metadata: self.metadata,
1412            server_side_encryption: self.server_side_encryption,
1413            storage_class: self.storage_class,
1414            website_redirect_location: self.website_redirect_location,
1415            sse_customer_algorithm: self.sse_customer_algorithm,
1416            sse_customer_key: self.sse_customer_key,
1417            sse_customer_key_md5: self.sse_customer_key_md5,
1418            ssekms_key_id: self.ssekms_key_id,
1419            ssekms_encryption_context: self.ssekms_encryption_context,
1420            bucket_key_enabled: self.bucket_key_enabled,
1421            request_payer: self.request_payer,
1422            tagging: self.tagging,
1423            object_lock_mode: self.object_lock_mode,
1424            object_lock_retain_until_date: self.object_lock_retain_until_date,
1425            object_lock_legal_hold_status: self.object_lock_legal_hold_status,
1426            expected_bucket_owner: self.expected_bucket_owner,
1427        })
1428    }
1429}
1430impl ::std::fmt::Debug for PutObjectInputBuilder {
1431    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
1432        let mut formatter = f.debug_struct("PutObjectInputBuilder");
1433        formatter.field("acl", &self.acl);
1434        formatter.field("body", &self.body);
1435        formatter.field("bucket", &self.bucket);
1436        formatter.field("cache_control", &self.cache_control);
1437        formatter.field("content_disposition", &self.content_disposition);
1438        formatter.field("content_encoding", &self.content_encoding);
1439        formatter.field("content_language", &self.content_language);
1440        formatter.field("content_length", &self.content_length);
1441        formatter.field("content_md5", &self.content_md5);
1442        formatter.field("content_type", &self.content_type);
1443        formatter.field("checksum_algorithm", &self.checksum_algorithm);
1444        formatter.field("checksum_crc32", &self.checksum_crc32);
1445        formatter.field("checksum_crc32_c", &self.checksum_crc32_c);
1446        formatter.field("checksum_sha1", &self.checksum_sha1);
1447        formatter.field("checksum_sha256", &self.checksum_sha256);
1448        formatter.field("expires", &self.expires);
1449        formatter.field("if_none_match", &self.if_none_match);
1450        formatter.field("grant_full_control", &self.grant_full_control);
1451        formatter.field("grant_read", &self.grant_read);
1452        formatter.field("grant_read_acp", &self.grant_read_acp);
1453        formatter.field("grant_write_acp", &self.grant_write_acp);
1454        formatter.field("key", &self.key);
1455        formatter.field("metadata", &self.metadata);
1456        formatter.field("server_side_encryption", &self.server_side_encryption);
1457        formatter.field("storage_class", &self.storage_class);
1458        formatter.field("website_redirect_location", &self.website_redirect_location);
1459        formatter.field("sse_customer_algorithm", &self.sse_customer_algorithm);
1460        formatter.field("sse_customer_key", &"*** Sensitive Data Redacted ***");
1461        formatter.field("sse_customer_key_md5", &self.sse_customer_key_md5);
1462        formatter.field("ssekms_key_id", &"*** Sensitive Data Redacted ***");
1463        formatter.field("ssekms_encryption_context", &"*** Sensitive Data Redacted ***");
1464        formatter.field("bucket_key_enabled", &self.bucket_key_enabled);
1465        formatter.field("request_payer", &self.request_payer);
1466        formatter.field("tagging", &self.tagging);
1467        formatter.field("object_lock_mode", &self.object_lock_mode);
1468        formatter.field("object_lock_retain_until_date", &self.object_lock_retain_until_date);
1469        formatter.field("object_lock_legal_hold_status", &self.object_lock_legal_hold_status);
1470        formatter.field("expected_bucket_owner", &self.expected_bucket_owner);
1471        formatter.finish()
1472    }
1473}