aws_sdk_s3/operation/put_object_acl/
_put_object_acl_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]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct PutObjectAclInput {
6    /// <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>.</p>
7    pub acl: ::std::option::Option<crate::types::ObjectCannedAcl>,
8    /// <p>Contains the elements that set the ACL permissions for an object per grantee.</p>
9    pub access_control_policy: ::std::option::Option<crate::types::AccessControlPolicy>,
10    /// <p>The bucket name that contains the object to which you want to attach the ACL.</p>
11    /// <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>
12    /// <p><b>S3 on Outposts</b> - When you use this action with 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, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, 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>
13    pub bucket: ::std::option::Option<::std::string::String>,
14    /// <p>The Base64 encoded 128-bit <code>MD5</code> digest of the data. This header must be used as a message integrity check to verify that the request body was not corrupted in transit. For more information, go to <a href="http://www.ietf.org/rfc/rfc1864.txt">RFC 1864.&gt;</a></p>
15    /// <p>For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.</p>
16    pub content_md5: ::std::option::Option<::std::string::String>,
17    /// <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</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>. 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>
18    /// <p>If you provide an individual checksum, Amazon S3 ignores any provided <code>ChecksumAlgorithm</code> parameter.</p>
19    pub checksum_algorithm: ::std::option::Option<crate::types::ChecksumAlgorithm>,
20    /// <p>Allows grantee the read, write, read ACP, and write ACP permissions on the bucket.</p>
21    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p>
22    pub grant_full_control: ::std::option::Option<::std::string::String>,
23    /// <p>Allows grantee to list the objects in the bucket.</p>
24    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p>
25    pub grant_read: ::std::option::Option<::std::string::String>,
26    /// <p>Allows grantee to read the bucket ACL.</p>
27    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p>
28    pub grant_read_acp: ::std::option::Option<::std::string::String>,
29    /// <p>Allows grantee to create new objects in the bucket.</p>
30    /// <p>For the bucket and object owners of existing objects, also allows deletions and overwrites of those objects.</p>
31    pub grant_write: ::std::option::Option<::std::string::String>,
32    /// <p>Allows grantee to write the ACL for the applicable bucket.</p>
33    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p>
34    pub grant_write_acp: ::std::option::Option<::std::string::String>,
35    /// <p>Key for which the PUT action was initiated.</p>
36    pub key: ::std::option::Option<::std::string::String>,
37    /// <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>
38    /// <p>This functionality is not supported for directory buckets.</p>
39    /// </note>
40    pub request_payer: ::std::option::Option<crate::types::RequestPayer>,
41    /// <p>Version ID used to reference a specific version of the object.</p><note>
42    /// <p>This functionality is not supported for directory buckets.</p>
43    /// </note>
44    pub version_id: ::std::option::Option<::std::string::String>,
45    /// <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>
46    pub expected_bucket_owner: ::std::option::Option<::std::string::String>,
47}
48impl PutObjectAclInput {
49    /// <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>.</p>
50    pub fn acl(&self) -> ::std::option::Option<&crate::types::ObjectCannedAcl> {
51        self.acl.as_ref()
52    }
53    /// <p>Contains the elements that set the ACL permissions for an object per grantee.</p>
54    pub fn access_control_policy(&self) -> ::std::option::Option<&crate::types::AccessControlPolicy> {
55        self.access_control_policy.as_ref()
56    }
57    /// <p>The bucket name that contains the object to which you want to attach the ACL.</p>
58    /// <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>
59    /// <p><b>S3 on Outposts</b> - When you use this action with 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, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, 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>
60    pub fn bucket(&self) -> ::std::option::Option<&str> {
61        self.bucket.as_deref()
62    }
63    /// <p>The Base64 encoded 128-bit <code>MD5</code> digest of the data. This header must be used as a message integrity check to verify that the request body was not corrupted in transit. For more information, go to <a href="http://www.ietf.org/rfc/rfc1864.txt">RFC 1864.&gt;</a></p>
64    /// <p>For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.</p>
65    pub fn content_md5(&self) -> ::std::option::Option<&str> {
66        self.content_md5.as_deref()
67    }
68    /// <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</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>. 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>
69    /// <p>If you provide an individual checksum, Amazon S3 ignores any provided <code>ChecksumAlgorithm</code> parameter.</p>
70    pub fn checksum_algorithm(&self) -> ::std::option::Option<&crate::types::ChecksumAlgorithm> {
71        self.checksum_algorithm.as_ref()
72    }
73    /// <p>Allows grantee the read, write, read ACP, and write ACP permissions on the bucket.</p>
74    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p>
75    pub fn grant_full_control(&self) -> ::std::option::Option<&str> {
76        self.grant_full_control.as_deref()
77    }
78    /// <p>Allows grantee to list the objects in the bucket.</p>
79    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p>
80    pub fn grant_read(&self) -> ::std::option::Option<&str> {
81        self.grant_read.as_deref()
82    }
83    /// <p>Allows grantee to read the bucket ACL.</p>
84    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p>
85    pub fn grant_read_acp(&self) -> ::std::option::Option<&str> {
86        self.grant_read_acp.as_deref()
87    }
88    /// <p>Allows grantee to create new objects in the bucket.</p>
89    /// <p>For the bucket and object owners of existing objects, also allows deletions and overwrites of those objects.</p>
90    pub fn grant_write(&self) -> ::std::option::Option<&str> {
91        self.grant_write.as_deref()
92    }
93    /// <p>Allows grantee to write the ACL for the applicable bucket.</p>
94    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p>
95    pub fn grant_write_acp(&self) -> ::std::option::Option<&str> {
96        self.grant_write_acp.as_deref()
97    }
98    /// <p>Key for which the PUT action was initiated.</p>
99    pub fn key(&self) -> ::std::option::Option<&str> {
100        self.key.as_deref()
101    }
102    /// <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>
103    /// <p>This functionality is not supported for directory buckets.</p>
104    /// </note>
105    pub fn request_payer(&self) -> ::std::option::Option<&crate::types::RequestPayer> {
106        self.request_payer.as_ref()
107    }
108    /// <p>Version ID used to reference a specific version of the object.</p><note>
109    /// <p>This functionality is not supported for directory buckets.</p>
110    /// </note>
111    pub fn version_id(&self) -> ::std::option::Option<&str> {
112        self.version_id.as_deref()
113    }
114    /// <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>
115    pub fn expected_bucket_owner(&self) -> ::std::option::Option<&str> {
116        self.expected_bucket_owner.as_deref()
117    }
118}
119impl PutObjectAclInput {
120    /// Creates a new builder-style object to manufacture [`PutObjectAclInput`](crate::operation::put_object_acl::PutObjectAclInput).
121    pub fn builder() -> crate::operation::put_object_acl::builders::PutObjectAclInputBuilder {
122        crate::operation::put_object_acl::builders::PutObjectAclInputBuilder::default()
123    }
124}
125
126/// A builder for [`PutObjectAclInput`](crate::operation::put_object_acl::PutObjectAclInput).
127#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
128#[non_exhaustive]
129pub struct PutObjectAclInputBuilder {
130    pub(crate) acl: ::std::option::Option<crate::types::ObjectCannedAcl>,
131    pub(crate) access_control_policy: ::std::option::Option<crate::types::AccessControlPolicy>,
132    pub(crate) bucket: ::std::option::Option<::std::string::String>,
133    pub(crate) content_md5: ::std::option::Option<::std::string::String>,
134    pub(crate) checksum_algorithm: ::std::option::Option<crate::types::ChecksumAlgorithm>,
135    pub(crate) grant_full_control: ::std::option::Option<::std::string::String>,
136    pub(crate) grant_read: ::std::option::Option<::std::string::String>,
137    pub(crate) grant_read_acp: ::std::option::Option<::std::string::String>,
138    pub(crate) grant_write: ::std::option::Option<::std::string::String>,
139    pub(crate) grant_write_acp: ::std::option::Option<::std::string::String>,
140    pub(crate) key: ::std::option::Option<::std::string::String>,
141    pub(crate) request_payer: ::std::option::Option<crate::types::RequestPayer>,
142    pub(crate) version_id: ::std::option::Option<::std::string::String>,
143    pub(crate) expected_bucket_owner: ::std::option::Option<::std::string::String>,
144}
145impl PutObjectAclInputBuilder {
146    /// <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>.</p>
147    pub fn acl(mut self, input: crate::types::ObjectCannedAcl) -> Self {
148        self.acl = ::std::option::Option::Some(input);
149        self
150    }
151    /// <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>.</p>
152    pub fn set_acl(mut self, input: ::std::option::Option<crate::types::ObjectCannedAcl>) -> Self {
153        self.acl = input;
154        self
155    }
156    /// <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>.</p>
157    pub fn get_acl(&self) -> &::std::option::Option<crate::types::ObjectCannedAcl> {
158        &self.acl
159    }
160    /// <p>Contains the elements that set the ACL permissions for an object per grantee.</p>
161    pub fn access_control_policy(mut self, input: crate::types::AccessControlPolicy) -> Self {
162        self.access_control_policy = ::std::option::Option::Some(input);
163        self
164    }
165    /// <p>Contains the elements that set the ACL permissions for an object per grantee.</p>
166    pub fn set_access_control_policy(mut self, input: ::std::option::Option<crate::types::AccessControlPolicy>) -> Self {
167        self.access_control_policy = input;
168        self
169    }
170    /// <p>Contains the elements that set the ACL permissions for an object per grantee.</p>
171    pub fn get_access_control_policy(&self) -> &::std::option::Option<crate::types::AccessControlPolicy> {
172        &self.access_control_policy
173    }
174    /// <p>The bucket name that contains the object to which you want to attach the ACL.</p>
175    /// <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>
176    /// <p><b>S3 on Outposts</b> - When you use this action with 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, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, 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>
177    /// This field is required.
178    pub fn bucket(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
179        self.bucket = ::std::option::Option::Some(input.into());
180        self
181    }
182    /// <p>The bucket name that contains the object to which you want to attach the ACL.</p>
183    /// <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>
184    /// <p><b>S3 on Outposts</b> - When you use this action with 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, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, 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>
185    pub fn set_bucket(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
186        self.bucket = input;
187        self
188    }
189    /// <p>The bucket name that contains the object to which you want to attach the ACL.</p>
190    /// <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>
191    /// <p><b>S3 on Outposts</b> - When you use this action with 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, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, 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>
192    pub fn get_bucket(&self) -> &::std::option::Option<::std::string::String> {
193        &self.bucket
194    }
195    /// <p>The Base64 encoded 128-bit <code>MD5</code> digest of the data. This header must be used as a message integrity check to verify that the request body was not corrupted in transit. For more information, go to <a href="http://www.ietf.org/rfc/rfc1864.txt">RFC 1864.&gt;</a></p>
196    /// <p>For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.</p>
197    pub fn content_md5(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
198        self.content_md5 = ::std::option::Option::Some(input.into());
199        self
200    }
201    /// <p>The Base64 encoded 128-bit <code>MD5</code> digest of the data. This header must be used as a message integrity check to verify that the request body was not corrupted in transit. For more information, go to <a href="http://www.ietf.org/rfc/rfc1864.txt">RFC 1864.&gt;</a></p>
202    /// <p>For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.</p>
203    pub fn set_content_md5(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
204        self.content_md5 = input;
205        self
206    }
207    /// <p>The Base64 encoded 128-bit <code>MD5</code> digest of the data. This header must be used as a message integrity check to verify that the request body was not corrupted in transit. For more information, go to <a href="http://www.ietf.org/rfc/rfc1864.txt">RFC 1864.&gt;</a></p>
208    /// <p>For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.</p>
209    pub fn get_content_md5(&self) -> &::std::option::Option<::std::string::String> {
210        &self.content_md5
211    }
212    /// <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</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>. 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>
213    /// <p>If you provide an individual checksum, Amazon S3 ignores any provided <code>ChecksumAlgorithm</code> parameter.</p>
214    pub fn checksum_algorithm(mut self, input: crate::types::ChecksumAlgorithm) -> Self {
215        self.checksum_algorithm = ::std::option::Option::Some(input);
216        self
217    }
218    /// <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</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>. 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>
219    /// <p>If you provide an individual checksum, Amazon S3 ignores any provided <code>ChecksumAlgorithm</code> parameter.</p>
220    pub fn set_checksum_algorithm(mut self, input: ::std::option::Option<crate::types::ChecksumAlgorithm>) -> Self {
221        self.checksum_algorithm = input;
222        self
223    }
224    /// <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</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>. 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>
225    /// <p>If you provide an individual checksum, Amazon S3 ignores any provided <code>ChecksumAlgorithm</code> parameter.</p>
226    pub fn get_checksum_algorithm(&self) -> &::std::option::Option<crate::types::ChecksumAlgorithm> {
227        &self.checksum_algorithm
228    }
229    /// <p>Allows grantee the read, write, read ACP, and write ACP permissions on the bucket.</p>
230    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p>
231    pub fn grant_full_control(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
232        self.grant_full_control = ::std::option::Option::Some(input.into());
233        self
234    }
235    /// <p>Allows grantee the read, write, read ACP, and write ACP permissions on the bucket.</p>
236    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p>
237    pub fn set_grant_full_control(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
238        self.grant_full_control = input;
239        self
240    }
241    /// <p>Allows grantee the read, write, read ACP, and write ACP permissions on the bucket.</p>
242    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p>
243    pub fn get_grant_full_control(&self) -> &::std::option::Option<::std::string::String> {
244        &self.grant_full_control
245    }
246    /// <p>Allows grantee to list the objects in the bucket.</p>
247    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p>
248    pub fn grant_read(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
249        self.grant_read = ::std::option::Option::Some(input.into());
250        self
251    }
252    /// <p>Allows grantee to list the objects in the bucket.</p>
253    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p>
254    pub fn set_grant_read(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
255        self.grant_read = input;
256        self
257    }
258    /// <p>Allows grantee to list the objects in the bucket.</p>
259    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p>
260    pub fn get_grant_read(&self) -> &::std::option::Option<::std::string::String> {
261        &self.grant_read
262    }
263    /// <p>Allows grantee to read the bucket ACL.</p>
264    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p>
265    pub fn grant_read_acp(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
266        self.grant_read_acp = ::std::option::Option::Some(input.into());
267        self
268    }
269    /// <p>Allows grantee to read the bucket ACL.</p>
270    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p>
271    pub fn set_grant_read_acp(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
272        self.grant_read_acp = input;
273        self
274    }
275    /// <p>Allows grantee to read the bucket ACL.</p>
276    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p>
277    pub fn get_grant_read_acp(&self) -> &::std::option::Option<::std::string::String> {
278        &self.grant_read_acp
279    }
280    /// <p>Allows grantee to create new objects in the bucket.</p>
281    /// <p>For the bucket and object owners of existing objects, also allows deletions and overwrites of those objects.</p>
282    pub fn grant_write(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
283        self.grant_write = ::std::option::Option::Some(input.into());
284        self
285    }
286    /// <p>Allows grantee to create new objects in the bucket.</p>
287    /// <p>For the bucket and object owners of existing objects, also allows deletions and overwrites of those objects.</p>
288    pub fn set_grant_write(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
289        self.grant_write = input;
290        self
291    }
292    /// <p>Allows grantee to create new objects in the bucket.</p>
293    /// <p>For the bucket and object owners of existing objects, also allows deletions and overwrites of those objects.</p>
294    pub fn get_grant_write(&self) -> &::std::option::Option<::std::string::String> {
295        &self.grant_write
296    }
297    /// <p>Allows grantee to write the ACL for the applicable bucket.</p>
298    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p>
299    pub fn grant_write_acp(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
300        self.grant_write_acp = ::std::option::Option::Some(input.into());
301        self
302    }
303    /// <p>Allows grantee to write the ACL for the applicable bucket.</p>
304    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p>
305    pub fn set_grant_write_acp(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
306        self.grant_write_acp = input;
307        self
308    }
309    /// <p>Allows grantee to write the ACL for the applicable bucket.</p>
310    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p>
311    pub fn get_grant_write_acp(&self) -> &::std::option::Option<::std::string::String> {
312        &self.grant_write_acp
313    }
314    /// <p>Key for which the PUT action was initiated.</p>
315    /// This field is required.
316    pub fn key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
317        self.key = ::std::option::Option::Some(input.into());
318        self
319    }
320    /// <p>Key for which the PUT action was initiated.</p>
321    pub fn set_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
322        self.key = input;
323        self
324    }
325    /// <p>Key for which the PUT action was initiated.</p>
326    pub fn get_key(&self) -> &::std::option::Option<::std::string::String> {
327        &self.key
328    }
329    /// <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>
330    /// <p>This functionality is not supported for directory buckets.</p>
331    /// </note>
332    pub fn request_payer(mut self, input: crate::types::RequestPayer) -> Self {
333        self.request_payer = ::std::option::Option::Some(input);
334        self
335    }
336    /// <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>
337    /// <p>This functionality is not supported for directory buckets.</p>
338    /// </note>
339    pub fn set_request_payer(mut self, input: ::std::option::Option<crate::types::RequestPayer>) -> Self {
340        self.request_payer = input;
341        self
342    }
343    /// <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>
344    /// <p>This functionality is not supported for directory buckets.</p>
345    /// </note>
346    pub fn get_request_payer(&self) -> &::std::option::Option<crate::types::RequestPayer> {
347        &self.request_payer
348    }
349    /// <p>Version ID used to reference a specific version of the object.</p><note>
350    /// <p>This functionality is not supported for directory buckets.</p>
351    /// </note>
352    pub fn version_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
353        self.version_id = ::std::option::Option::Some(input.into());
354        self
355    }
356    /// <p>Version ID used to reference a specific version of the object.</p><note>
357    /// <p>This functionality is not supported for directory buckets.</p>
358    /// </note>
359    pub fn set_version_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
360        self.version_id = input;
361        self
362    }
363    /// <p>Version ID used to reference a specific version of the object.</p><note>
364    /// <p>This functionality is not supported for directory buckets.</p>
365    /// </note>
366    pub fn get_version_id(&self) -> &::std::option::Option<::std::string::String> {
367        &self.version_id
368    }
369    /// <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>
370    pub fn expected_bucket_owner(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
371        self.expected_bucket_owner = ::std::option::Option::Some(input.into());
372        self
373    }
374    /// <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>
375    pub fn set_expected_bucket_owner(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
376        self.expected_bucket_owner = input;
377        self
378    }
379    /// <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>
380    pub fn get_expected_bucket_owner(&self) -> &::std::option::Option<::std::string::String> {
381        &self.expected_bucket_owner
382    }
383    /// Consumes the builder and constructs a [`PutObjectAclInput`](crate::operation::put_object_acl::PutObjectAclInput).
384    pub fn build(
385        self,
386    ) -> ::std::result::Result<crate::operation::put_object_acl::PutObjectAclInput, ::aws_smithy_types::error::operation::BuildError> {
387        ::std::result::Result::Ok(crate::operation::put_object_acl::PutObjectAclInput {
388            acl: self.acl,
389            access_control_policy: self.access_control_policy,
390            bucket: self.bucket,
391            content_md5: self.content_md5,
392            checksum_algorithm: self.checksum_algorithm,
393            grant_full_control: self.grant_full_control,
394            grant_read: self.grant_read,
395            grant_read_acp: self.grant_read_acp,
396            grant_write: self.grant_write,
397            grant_write_acp: self.grant_write_acp,
398            key: self.key,
399            request_payer: self.request_payer,
400            version_id: self.version_id,
401            expected_bucket_owner: self.expected_bucket_owner,
402        })
403    }
404}