aws_sdk_s3/operation/upload_part_copy/_upload_part_copy_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)]
5pub struct UploadPartCopyInput {
6 /// <p>The bucket name.</p>
7 /// <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>zone-id</i>.<i>region-code</i>.amazonaws.com</code>. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format <code> <i>bucket-base-name</i>--<i>zone-id</i>--x-s3</code> (for example, <code> <i>amzn-s3-demo-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><note>
8 /// <p>Copying objects across different Amazon Web Services Regions isn't supported when the source or destination bucket is in Amazon Web Services Local Zones. The source and destination buckets must have the same parent Amazon Web Services Region. Otherwise, you get an HTTP <code>400 Bad Request</code> error with the error code <code>InvalidRequest</code>.</p>
9 /// </note>
10 /// <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>
11 /// <p>Access points and Object Lambda access points are not supported by directory buckets.</p>
12 /// </note>
13 /// <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>
14 pub bucket: ::std::option::Option<::std::string::String>,
15 /// <p>Specifies the source object for the copy operation. You specify the value in one of two formats, depending on whether you want to access the source object through an <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/access-points.html">access point</a>:</p>
16 /// <ul>
17 /// <li>
18 /// <p>For objects not accessed through an access point, specify the name of the source bucket and key of the source object, separated by a slash (/). For example, to copy the object <code>reports/january.pdf</code> from the bucket <code>awsexamplebucket</code>, use <code>awsexamplebucket/reports/january.pdf</code>. The value must be URL-encoded.</p></li>
19 /// <li>
20 /// <p>For objects accessed through access points, specify the Amazon Resource Name (ARN) of the object as accessed through the access point, in the format <code>arn:aws:s3:<region>
21 /// :
22 /// <account-id>
23 /// :accesspoint/
24 /// <access-point-name>
25 /// /object/
26 /// <key></key>
27 /// </access-point-name>
28 /// </account-id>
29 /// </region></code>. For example, to copy the object <code>reports/january.pdf</code> through access point <code>my-access-point</code> owned by account <code>123456789012</code> in Region <code>us-west-2</code>, use the URL encoding of <code>arn:aws:s3:us-west-2:123456789012:accesspoint/my-access-point/object/reports/january.pdf</code>. The value must be URL encoded.</p><note>
30 /// <ul>
31 /// <li>
32 /// <p>Amazon S3 supports copy operations using Access points only when the source and destination buckets are in the same Amazon Web Services Region.</p></li>
33 /// <li>
34 /// <p>Access points are not supported by directory buckets.</p></li>
35 /// </ul>
36 /// </note>
37 /// <p>Alternatively, for objects accessed through Amazon S3 on Outposts, specify the ARN of the object as accessed in the format <code>arn:aws:s3-outposts:<region>
38 /// :
39 /// <account-id>
40 /// :outpost/
41 /// <outpost-id>
42 /// /object/
43 /// <key></key>
44 /// </outpost-id>
45 /// </account-id>
46 /// </region></code>. For example, to copy the object <code>reports/january.pdf</code> through outpost <code>my-outpost</code> owned by account <code>123456789012</code> in Region <code>us-west-2</code>, use the URL encoding of <code>arn:aws:s3-outposts:us-west-2:123456789012:outpost/my-outpost/object/reports/january.pdf</code>. The value must be URL-encoded.</p></li>
47 /// </ul>
48 /// <p>If your bucket has versioning enabled, you could have multiple versions of the same object. By default, <code>x-amz-copy-source</code> identifies the current version of the source object to copy. To copy a specific version of the source object to copy, append <code>?versionId=<version-id></version-id></code> to the <code>x-amz-copy-source</code> request header (for example, <code>x-amz-copy-source: /awsexamplebucket/reports/january.pdf?versionId=QUpfdndhfd8438MNFDN93jdnJFkdmqnh893</code>).</p>
49 /// <p>If the current version is a delete marker and you don't specify a versionId in the <code>x-amz-copy-source</code> request header, Amazon S3 returns a <code>404 Not Found</code> error, because the object does not exist. If you specify versionId in the <code>x-amz-copy-source</code> and the versionId is a delete marker, Amazon S3 returns an HTTP <code>400 Bad Request</code> error, because you are not allowed to specify a delete marker as a version for the <code>x-amz-copy-source</code>.</p><note>
50 /// <p><b>Directory buckets</b> - S3 Versioning isn't enabled and supported for directory buckets.</p>
51 /// </note>
52 pub copy_source: ::std::option::Option<::std::string::String>,
53 /// <p>Copies the object if its entity tag (ETag) matches the specified tag.</p>
54 /// <p>If both of the <code>x-amz-copy-source-if-match</code> and <code>x-amz-copy-source-if-unmodified-since</code> headers are present in the request as follows:</p>
55 /// <p><code>x-amz-copy-source-if-match</code> condition evaluates to <code>true</code>, and;</p>
56 /// <p><code>x-amz-copy-source-if-unmodified-since</code> condition evaluates to <code>false</code>;</p>
57 /// <p>Amazon S3 returns <code>200 OK</code> and copies the data.</p>
58 pub copy_source_if_match: ::std::option::Option<::std::string::String>,
59 /// <p>Copies the object if it has been modified since the specified time.</p>
60 /// <p>If both of the <code>x-amz-copy-source-if-none-match</code> and <code>x-amz-copy-source-if-modified-since</code> headers are present in the request as follows:</p>
61 /// <p><code>x-amz-copy-source-if-none-match</code> condition evaluates to <code>false</code>, and;</p>
62 /// <p><code>x-amz-copy-source-if-modified-since</code> condition evaluates to <code>true</code>;</p>
63 /// <p>Amazon S3 returns <code>412 Precondition Failed</code> response code.</p>
64 pub copy_source_if_modified_since: ::std::option::Option<::aws_smithy_types::DateTime>,
65 /// <p>Copies the object if its entity tag (ETag) is different than the specified ETag.</p>
66 /// <p>If both of the <code>x-amz-copy-source-if-none-match</code> and <code>x-amz-copy-source-if-modified-since</code> headers are present in the request as follows:</p>
67 /// <p><code>x-amz-copy-source-if-none-match</code> condition evaluates to <code>false</code>, and;</p>
68 /// <p><code>x-amz-copy-source-if-modified-since</code> condition evaluates to <code>true</code>;</p>
69 /// <p>Amazon S3 returns <code>412 Precondition Failed</code> response code.</p>
70 pub copy_source_if_none_match: ::std::option::Option<::std::string::String>,
71 /// <p>Copies the object if it hasn't been modified since the specified time.</p>
72 /// <p>If both of the <code>x-amz-copy-source-if-match</code> and <code>x-amz-copy-source-if-unmodified-since</code> headers are present in the request as follows:</p>
73 /// <p><code>x-amz-copy-source-if-match</code> condition evaluates to <code>true</code>, and;</p>
74 /// <p><code>x-amz-copy-source-if-unmodified-since</code> condition evaluates to <code>false</code>;</p>
75 /// <p>Amazon S3 returns <code>200 OK</code> and copies the data.</p>
76 pub copy_source_if_unmodified_since: ::std::option::Option<::aws_smithy_types::DateTime>,
77 /// <p>The range of bytes to copy from the source object. The range value must use the form bytes=first-last, where the first and last are the zero-based byte offsets to copy. For example, bytes=0-9 indicates that you want to copy the first 10 bytes of the source. You can copy a range only if the source object is greater than 5 MB.</p>
78 pub copy_source_range: ::std::option::Option<::std::string::String>,
79 /// <p>Object key for which the multipart upload was initiated.</p>
80 pub key: ::std::option::Option<::std::string::String>,
81 /// <p>Part number of part being copied. This is a positive integer between 1 and 10,000.</p>
82 pub part_number: ::std::option::Option<i32>,
83 /// <p>Upload ID identifying the multipart upload whose part is being copied.</p>
84 pub upload_id: ::std::option::Option<::std::string::String>,
85 /// <p>Specifies the algorithm to use when encrypting the object (for example, AES256).</p><note>
86 /// <p>This functionality is not supported when the destination bucket is a directory bucket.</p>
87 /// </note>
88 pub sse_customer_algorithm: ::std::option::Option<::std::string::String>,
89 /// <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. This must be the same encryption key specified in the initiate multipart upload request.</p><note>
90 /// <p>This functionality is not supported when the destination bucket is a directory bucket.</p>
91 /// </note>
92 pub sse_customer_key: ::std::option::Option<::std::string::String>,
93 /// <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>
94 /// <p>This functionality is not supported when the destination bucket is a directory bucket.</p>
95 /// </note>
96 pub sse_customer_key_md5: ::std::option::Option<::std::string::String>,
97 /// <p>Specifies the algorithm to use when decrypting the source object (for example, <code>AES256</code>).</p><note>
98 /// <p>This functionality is not supported when the source object is in a directory bucket.</p>
99 /// </note>
100 pub copy_source_sse_customer_algorithm: ::std::option::Option<::std::string::String>,
101 /// <p>Specifies the customer-provided encryption key for Amazon S3 to use to decrypt the source object. The encryption key provided in this header must be one that was used when the source object was created.</p><note>
102 /// <p>This functionality is not supported when the source object is in a directory bucket.</p>
103 /// </note>
104 pub copy_source_sse_customer_key: ::std::option::Option<::std::string::String>,
105 /// <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>
106 /// <p>This functionality is not supported when the source object is in a directory bucket.</p>
107 /// </note>
108 pub copy_source_sse_customer_key_md5: ::std::option::Option<::std::string::String>,
109 /// <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>
110 /// <p>This functionality is not supported for directory buckets.</p>
111 /// </note>
112 pub request_payer: ::std::option::Option<crate::types::RequestPayer>,
113 /// <p>The account ID of the expected destination bucket owner. If the account ID that you provide does not match the actual owner of the destination bucket, the request fails with the HTTP status code <code>403 Forbidden</code> (access denied).</p>
114 pub expected_bucket_owner: ::std::option::Option<::std::string::String>,
115 /// <p>The account ID of the expected source bucket owner. If the account ID that you provide does not match the actual owner of the source bucket, the request fails with the HTTP status code <code>403 Forbidden</code> (access denied).</p>
116 pub expected_source_bucket_owner: ::std::option::Option<::std::string::String>,
117}
118impl UploadPartCopyInput {
119 /// <p>The bucket name.</p>
120 /// <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>zone-id</i>.<i>region-code</i>.amazonaws.com</code>. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format <code> <i>bucket-base-name</i>--<i>zone-id</i>--x-s3</code> (for example, <code> <i>amzn-s3-demo-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><note>
121 /// <p>Copying objects across different Amazon Web Services Regions isn't supported when the source or destination bucket is in Amazon Web Services Local Zones. The source and destination buckets must have the same parent Amazon Web Services Region. Otherwise, you get an HTTP <code>400 Bad Request</code> error with the error code <code>InvalidRequest</code>.</p>
122 /// </note>
123 /// <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>
124 /// <p>Access points and Object Lambda access points are not supported by directory buckets.</p>
125 /// </note>
126 /// <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>
127 pub fn bucket(&self) -> ::std::option::Option<&str> {
128 self.bucket.as_deref()
129 }
130 /// <p>Specifies the source object for the copy operation. You specify the value in one of two formats, depending on whether you want to access the source object through an <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/access-points.html">access point</a>:</p>
131 /// <ul>
132 /// <li>
133 /// <p>For objects not accessed through an access point, specify the name of the source bucket and key of the source object, separated by a slash (/). For example, to copy the object <code>reports/january.pdf</code> from the bucket <code>awsexamplebucket</code>, use <code>awsexamplebucket/reports/january.pdf</code>. The value must be URL-encoded.</p></li>
134 /// <li>
135 /// <p>For objects accessed through access points, specify the Amazon Resource Name (ARN) of the object as accessed through the access point, in the format <code>arn:aws:s3:<region>
136 /// :
137 /// <account-id>
138 /// :accesspoint/
139 /// <access-point-name>
140 /// /object/
141 /// <key></key>
142 /// </access-point-name>
143 /// </account-id>
144 /// </region></code>. For example, to copy the object <code>reports/january.pdf</code> through access point <code>my-access-point</code> owned by account <code>123456789012</code> in Region <code>us-west-2</code>, use the URL encoding of <code>arn:aws:s3:us-west-2:123456789012:accesspoint/my-access-point/object/reports/january.pdf</code>. The value must be URL encoded.</p><note>
145 /// <ul>
146 /// <li>
147 /// <p>Amazon S3 supports copy operations using Access points only when the source and destination buckets are in the same Amazon Web Services Region.</p></li>
148 /// <li>
149 /// <p>Access points are not supported by directory buckets.</p></li>
150 /// </ul>
151 /// </note>
152 /// <p>Alternatively, for objects accessed through Amazon S3 on Outposts, specify the ARN of the object as accessed in the format <code>arn:aws:s3-outposts:<region>
153 /// :
154 /// <account-id>
155 /// :outpost/
156 /// <outpost-id>
157 /// /object/
158 /// <key></key>
159 /// </outpost-id>
160 /// </account-id>
161 /// </region></code>. For example, to copy the object <code>reports/january.pdf</code> through outpost <code>my-outpost</code> owned by account <code>123456789012</code> in Region <code>us-west-2</code>, use the URL encoding of <code>arn:aws:s3-outposts:us-west-2:123456789012:outpost/my-outpost/object/reports/january.pdf</code>. The value must be URL-encoded.</p></li>
162 /// </ul>
163 /// <p>If your bucket has versioning enabled, you could have multiple versions of the same object. By default, <code>x-amz-copy-source</code> identifies the current version of the source object to copy. To copy a specific version of the source object to copy, append <code>?versionId=<version-id></version-id></code> to the <code>x-amz-copy-source</code> request header (for example, <code>x-amz-copy-source: /awsexamplebucket/reports/january.pdf?versionId=QUpfdndhfd8438MNFDN93jdnJFkdmqnh893</code>).</p>
164 /// <p>If the current version is a delete marker and you don't specify a versionId in the <code>x-amz-copy-source</code> request header, Amazon S3 returns a <code>404 Not Found</code> error, because the object does not exist. If you specify versionId in the <code>x-amz-copy-source</code> and the versionId is a delete marker, Amazon S3 returns an HTTP <code>400 Bad Request</code> error, because you are not allowed to specify a delete marker as a version for the <code>x-amz-copy-source</code>.</p><note>
165 /// <p><b>Directory buckets</b> - S3 Versioning isn't enabled and supported for directory buckets.</p>
166 /// </note>
167 pub fn copy_source(&self) -> ::std::option::Option<&str> {
168 self.copy_source.as_deref()
169 }
170 /// <p>Copies the object if its entity tag (ETag) matches the specified tag.</p>
171 /// <p>If both of the <code>x-amz-copy-source-if-match</code> and <code>x-amz-copy-source-if-unmodified-since</code> headers are present in the request as follows:</p>
172 /// <p><code>x-amz-copy-source-if-match</code> condition evaluates to <code>true</code>, and;</p>
173 /// <p><code>x-amz-copy-source-if-unmodified-since</code> condition evaluates to <code>false</code>;</p>
174 /// <p>Amazon S3 returns <code>200 OK</code> and copies the data.</p>
175 pub fn copy_source_if_match(&self) -> ::std::option::Option<&str> {
176 self.copy_source_if_match.as_deref()
177 }
178 /// <p>Copies the object if it has been modified since the specified time.</p>
179 /// <p>If both of the <code>x-amz-copy-source-if-none-match</code> and <code>x-amz-copy-source-if-modified-since</code> headers are present in the request as follows:</p>
180 /// <p><code>x-amz-copy-source-if-none-match</code> condition evaluates to <code>false</code>, and;</p>
181 /// <p><code>x-amz-copy-source-if-modified-since</code> condition evaluates to <code>true</code>;</p>
182 /// <p>Amazon S3 returns <code>412 Precondition Failed</code> response code.</p>
183 pub fn copy_source_if_modified_since(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
184 self.copy_source_if_modified_since.as_ref()
185 }
186 /// <p>Copies the object if its entity tag (ETag) is different than the specified ETag.</p>
187 /// <p>If both of the <code>x-amz-copy-source-if-none-match</code> and <code>x-amz-copy-source-if-modified-since</code> headers are present in the request as follows:</p>
188 /// <p><code>x-amz-copy-source-if-none-match</code> condition evaluates to <code>false</code>, and;</p>
189 /// <p><code>x-amz-copy-source-if-modified-since</code> condition evaluates to <code>true</code>;</p>
190 /// <p>Amazon S3 returns <code>412 Precondition Failed</code> response code.</p>
191 pub fn copy_source_if_none_match(&self) -> ::std::option::Option<&str> {
192 self.copy_source_if_none_match.as_deref()
193 }
194 /// <p>Copies the object if it hasn't been modified since the specified time.</p>
195 /// <p>If both of the <code>x-amz-copy-source-if-match</code> and <code>x-amz-copy-source-if-unmodified-since</code> headers are present in the request as follows:</p>
196 /// <p><code>x-amz-copy-source-if-match</code> condition evaluates to <code>true</code>, and;</p>
197 /// <p><code>x-amz-copy-source-if-unmodified-since</code> condition evaluates to <code>false</code>;</p>
198 /// <p>Amazon S3 returns <code>200 OK</code> and copies the data.</p>
199 pub fn copy_source_if_unmodified_since(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
200 self.copy_source_if_unmodified_since.as_ref()
201 }
202 /// <p>The range of bytes to copy from the source object. The range value must use the form bytes=first-last, where the first and last are the zero-based byte offsets to copy. For example, bytes=0-9 indicates that you want to copy the first 10 bytes of the source. You can copy a range only if the source object is greater than 5 MB.</p>
203 pub fn copy_source_range(&self) -> ::std::option::Option<&str> {
204 self.copy_source_range.as_deref()
205 }
206 /// <p>Object key for which the multipart upload was initiated.</p>
207 pub fn key(&self) -> ::std::option::Option<&str> {
208 self.key.as_deref()
209 }
210 /// <p>Part number of part being copied. This is a positive integer between 1 and 10,000.</p>
211 pub fn part_number(&self) -> ::std::option::Option<i32> {
212 self.part_number
213 }
214 /// <p>Upload ID identifying the multipart upload whose part is being copied.</p>
215 pub fn upload_id(&self) -> ::std::option::Option<&str> {
216 self.upload_id.as_deref()
217 }
218 /// <p>Specifies the algorithm to use when encrypting the object (for example, AES256).</p><note>
219 /// <p>This functionality is not supported when the destination bucket is a directory bucket.</p>
220 /// </note>
221 pub fn sse_customer_algorithm(&self) -> ::std::option::Option<&str> {
222 self.sse_customer_algorithm.as_deref()
223 }
224 /// <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. This must be the same encryption key specified in the initiate multipart upload request.</p><note>
225 /// <p>This functionality is not supported when the destination bucket is a directory bucket.</p>
226 /// </note>
227 pub fn sse_customer_key(&self) -> ::std::option::Option<&str> {
228 self.sse_customer_key.as_deref()
229 }
230 /// <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>
231 /// <p>This functionality is not supported when the destination bucket is a directory bucket.</p>
232 /// </note>
233 pub fn sse_customer_key_md5(&self) -> ::std::option::Option<&str> {
234 self.sse_customer_key_md5.as_deref()
235 }
236 /// <p>Specifies the algorithm to use when decrypting the source object (for example, <code>AES256</code>).</p><note>
237 /// <p>This functionality is not supported when the source object is in a directory bucket.</p>
238 /// </note>
239 pub fn copy_source_sse_customer_algorithm(&self) -> ::std::option::Option<&str> {
240 self.copy_source_sse_customer_algorithm.as_deref()
241 }
242 /// <p>Specifies the customer-provided encryption key for Amazon S3 to use to decrypt the source object. The encryption key provided in this header must be one that was used when the source object was created.</p><note>
243 /// <p>This functionality is not supported when the source object is in a directory bucket.</p>
244 /// </note>
245 pub fn copy_source_sse_customer_key(&self) -> ::std::option::Option<&str> {
246 self.copy_source_sse_customer_key.as_deref()
247 }
248 /// <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>
249 /// <p>This functionality is not supported when the source object is in a directory bucket.</p>
250 /// </note>
251 pub fn copy_source_sse_customer_key_md5(&self) -> ::std::option::Option<&str> {
252 self.copy_source_sse_customer_key_md5.as_deref()
253 }
254 /// <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>
255 /// <p>This functionality is not supported for directory buckets.</p>
256 /// </note>
257 pub fn request_payer(&self) -> ::std::option::Option<&crate::types::RequestPayer> {
258 self.request_payer.as_ref()
259 }
260 /// <p>The account ID of the expected destination bucket owner. If the account ID that you provide does not match the actual owner of the destination bucket, the request fails with the HTTP status code <code>403 Forbidden</code> (access denied).</p>
261 pub fn expected_bucket_owner(&self) -> ::std::option::Option<&str> {
262 self.expected_bucket_owner.as_deref()
263 }
264 /// <p>The account ID of the expected source bucket owner. If the account ID that you provide does not match the actual owner of the source bucket, the request fails with the HTTP status code <code>403 Forbidden</code> (access denied).</p>
265 pub fn expected_source_bucket_owner(&self) -> ::std::option::Option<&str> {
266 self.expected_source_bucket_owner.as_deref()
267 }
268}
269impl ::std::fmt::Debug for UploadPartCopyInput {
270 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
271 let mut formatter = f.debug_struct("UploadPartCopyInput");
272 formatter.field("bucket", &self.bucket);
273 formatter.field("copy_source", &self.copy_source);
274 formatter.field("copy_source_if_match", &self.copy_source_if_match);
275 formatter.field("copy_source_if_modified_since", &self.copy_source_if_modified_since);
276 formatter.field("copy_source_if_none_match", &self.copy_source_if_none_match);
277 formatter.field("copy_source_if_unmodified_since", &self.copy_source_if_unmodified_since);
278 formatter.field("copy_source_range", &self.copy_source_range);
279 formatter.field("key", &self.key);
280 formatter.field("part_number", &self.part_number);
281 formatter.field("upload_id", &self.upload_id);
282 formatter.field("sse_customer_algorithm", &self.sse_customer_algorithm);
283 formatter.field("sse_customer_key", &"*** Sensitive Data Redacted ***");
284 formatter.field("sse_customer_key_md5", &self.sse_customer_key_md5);
285 formatter.field("copy_source_sse_customer_algorithm", &self.copy_source_sse_customer_algorithm);
286 formatter.field("copy_source_sse_customer_key", &"*** Sensitive Data Redacted ***");
287 formatter.field("copy_source_sse_customer_key_md5", &self.copy_source_sse_customer_key_md5);
288 formatter.field("request_payer", &self.request_payer);
289 formatter.field("expected_bucket_owner", &self.expected_bucket_owner);
290 formatter.field("expected_source_bucket_owner", &self.expected_source_bucket_owner);
291 formatter.finish()
292 }
293}
294impl UploadPartCopyInput {
295 /// Creates a new builder-style object to manufacture [`UploadPartCopyInput`](crate::operation::upload_part_copy::UploadPartCopyInput).
296 pub fn builder() -> crate::operation::upload_part_copy::builders::UploadPartCopyInputBuilder {
297 crate::operation::upload_part_copy::builders::UploadPartCopyInputBuilder::default()
298 }
299}
300
301/// A builder for [`UploadPartCopyInput`](crate::operation::upload_part_copy::UploadPartCopyInput).
302#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
303#[non_exhaustive]
304pub struct UploadPartCopyInputBuilder {
305 pub(crate) bucket: ::std::option::Option<::std::string::String>,
306 pub(crate) copy_source: ::std::option::Option<::std::string::String>,
307 pub(crate) copy_source_if_match: ::std::option::Option<::std::string::String>,
308 pub(crate) copy_source_if_modified_since: ::std::option::Option<::aws_smithy_types::DateTime>,
309 pub(crate) copy_source_if_none_match: ::std::option::Option<::std::string::String>,
310 pub(crate) copy_source_if_unmodified_since: ::std::option::Option<::aws_smithy_types::DateTime>,
311 pub(crate) copy_source_range: ::std::option::Option<::std::string::String>,
312 pub(crate) key: ::std::option::Option<::std::string::String>,
313 pub(crate) part_number: ::std::option::Option<i32>,
314 pub(crate) upload_id: ::std::option::Option<::std::string::String>,
315 pub(crate) sse_customer_algorithm: ::std::option::Option<::std::string::String>,
316 pub(crate) sse_customer_key: ::std::option::Option<::std::string::String>,
317 pub(crate) sse_customer_key_md5: ::std::option::Option<::std::string::String>,
318 pub(crate) copy_source_sse_customer_algorithm: ::std::option::Option<::std::string::String>,
319 pub(crate) copy_source_sse_customer_key: ::std::option::Option<::std::string::String>,
320 pub(crate) copy_source_sse_customer_key_md5: ::std::option::Option<::std::string::String>,
321 pub(crate) request_payer: ::std::option::Option<crate::types::RequestPayer>,
322 pub(crate) expected_bucket_owner: ::std::option::Option<::std::string::String>,
323 pub(crate) expected_source_bucket_owner: ::std::option::Option<::std::string::String>,
324}
325impl UploadPartCopyInputBuilder {
326 /// <p>The bucket name.</p>
327 /// <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>zone-id</i>.<i>region-code</i>.amazonaws.com</code>. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format <code> <i>bucket-base-name</i>--<i>zone-id</i>--x-s3</code> (for example, <code> <i>amzn-s3-demo-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><note>
328 /// <p>Copying objects across different Amazon Web Services Regions isn't supported when the source or destination bucket is in Amazon Web Services Local Zones. The source and destination buckets must have the same parent Amazon Web Services Region. Otherwise, you get an HTTP <code>400 Bad Request</code> error with the error code <code>InvalidRequest</code>.</p>
329 /// </note>
330 /// <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>
331 /// <p>Access points and Object Lambda access points are not supported by directory buckets.</p>
332 /// </note>
333 /// <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>
334 /// This field is required.
335 pub fn bucket(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
336 self.bucket = ::std::option::Option::Some(input.into());
337 self
338 }
339 /// <p>The bucket name.</p>
340 /// <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>zone-id</i>.<i>region-code</i>.amazonaws.com</code>. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format <code> <i>bucket-base-name</i>--<i>zone-id</i>--x-s3</code> (for example, <code> <i>amzn-s3-demo-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><note>
341 /// <p>Copying objects across different Amazon Web Services Regions isn't supported when the source or destination bucket is in Amazon Web Services Local Zones. The source and destination buckets must have the same parent Amazon Web Services Region. Otherwise, you get an HTTP <code>400 Bad Request</code> error with the error code <code>InvalidRequest</code>.</p>
342 /// </note>
343 /// <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>
344 /// <p>Access points and Object Lambda access points are not supported by directory buckets.</p>
345 /// </note>
346 /// <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>
347 pub fn set_bucket(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
348 self.bucket = input;
349 self
350 }
351 /// <p>The bucket name.</p>
352 /// <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>zone-id</i>.<i>region-code</i>.amazonaws.com</code>. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format <code> <i>bucket-base-name</i>--<i>zone-id</i>--x-s3</code> (for example, <code> <i>amzn-s3-demo-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><note>
353 /// <p>Copying objects across different Amazon Web Services Regions isn't supported when the source or destination bucket is in Amazon Web Services Local Zones. The source and destination buckets must have the same parent Amazon Web Services Region. Otherwise, you get an HTTP <code>400 Bad Request</code> error with the error code <code>InvalidRequest</code>.</p>
354 /// </note>
355 /// <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>
356 /// <p>Access points and Object Lambda access points are not supported by directory buckets.</p>
357 /// </note>
358 /// <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>
359 pub fn get_bucket(&self) -> &::std::option::Option<::std::string::String> {
360 &self.bucket
361 }
362 /// <p>Specifies the source object for the copy operation. You specify the value in one of two formats, depending on whether you want to access the source object through an <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/access-points.html">access point</a>:</p>
363 /// <ul>
364 /// <li>
365 /// <p>For objects not accessed through an access point, specify the name of the source bucket and key of the source object, separated by a slash (/). For example, to copy the object <code>reports/january.pdf</code> from the bucket <code>awsexamplebucket</code>, use <code>awsexamplebucket/reports/january.pdf</code>. The value must be URL-encoded.</p></li>
366 /// <li>
367 /// <p>For objects accessed through access points, specify the Amazon Resource Name (ARN) of the object as accessed through the access point, in the format <code>arn:aws:s3:<region>
368 /// :
369 /// <account-id>
370 /// :accesspoint/
371 /// <access-point-name>
372 /// /object/
373 /// <key></key>
374 /// </access-point-name>
375 /// </account-id>
376 /// </region></code>. For example, to copy the object <code>reports/january.pdf</code> through access point <code>my-access-point</code> owned by account <code>123456789012</code> in Region <code>us-west-2</code>, use the URL encoding of <code>arn:aws:s3:us-west-2:123456789012:accesspoint/my-access-point/object/reports/january.pdf</code>. The value must be URL encoded.</p><note>
377 /// <ul>
378 /// <li>
379 /// <p>Amazon S3 supports copy operations using Access points only when the source and destination buckets are in the same Amazon Web Services Region.</p></li>
380 /// <li>
381 /// <p>Access points are not supported by directory buckets.</p></li>
382 /// </ul>
383 /// </note>
384 /// <p>Alternatively, for objects accessed through Amazon S3 on Outposts, specify the ARN of the object as accessed in the format <code>arn:aws:s3-outposts:<region>
385 /// :
386 /// <account-id>
387 /// :outpost/
388 /// <outpost-id>
389 /// /object/
390 /// <key></key>
391 /// </outpost-id>
392 /// </account-id>
393 /// </region></code>. For example, to copy the object <code>reports/january.pdf</code> through outpost <code>my-outpost</code> owned by account <code>123456789012</code> in Region <code>us-west-2</code>, use the URL encoding of <code>arn:aws:s3-outposts:us-west-2:123456789012:outpost/my-outpost/object/reports/january.pdf</code>. The value must be URL-encoded.</p></li>
394 /// </ul>
395 /// <p>If your bucket has versioning enabled, you could have multiple versions of the same object. By default, <code>x-amz-copy-source</code> identifies the current version of the source object to copy. To copy a specific version of the source object to copy, append <code>?versionId=<version-id></version-id></code> to the <code>x-amz-copy-source</code> request header (for example, <code>x-amz-copy-source: /awsexamplebucket/reports/january.pdf?versionId=QUpfdndhfd8438MNFDN93jdnJFkdmqnh893</code>).</p>
396 /// <p>If the current version is a delete marker and you don't specify a versionId in the <code>x-amz-copy-source</code> request header, Amazon S3 returns a <code>404 Not Found</code> error, because the object does not exist. If you specify versionId in the <code>x-amz-copy-source</code> and the versionId is a delete marker, Amazon S3 returns an HTTP <code>400 Bad Request</code> error, because you are not allowed to specify a delete marker as a version for the <code>x-amz-copy-source</code>.</p><note>
397 /// <p><b>Directory buckets</b> - S3 Versioning isn't enabled and supported for directory buckets.</p>
398 /// </note>
399 /// This field is required.
400 pub fn copy_source(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
401 self.copy_source = ::std::option::Option::Some(input.into());
402 self
403 }
404 /// <p>Specifies the source object for the copy operation. You specify the value in one of two formats, depending on whether you want to access the source object through an <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/access-points.html">access point</a>:</p>
405 /// <ul>
406 /// <li>
407 /// <p>For objects not accessed through an access point, specify the name of the source bucket and key of the source object, separated by a slash (/). For example, to copy the object <code>reports/january.pdf</code> from the bucket <code>awsexamplebucket</code>, use <code>awsexamplebucket/reports/january.pdf</code>. The value must be URL-encoded.</p></li>
408 /// <li>
409 /// <p>For objects accessed through access points, specify the Amazon Resource Name (ARN) of the object as accessed through the access point, in the format <code>arn:aws:s3:<region>
410 /// :
411 /// <account-id>
412 /// :accesspoint/
413 /// <access-point-name>
414 /// /object/
415 /// <key></key>
416 /// </access-point-name>
417 /// </account-id>
418 /// </region></code>. For example, to copy the object <code>reports/january.pdf</code> through access point <code>my-access-point</code> owned by account <code>123456789012</code> in Region <code>us-west-2</code>, use the URL encoding of <code>arn:aws:s3:us-west-2:123456789012:accesspoint/my-access-point/object/reports/january.pdf</code>. The value must be URL encoded.</p><note>
419 /// <ul>
420 /// <li>
421 /// <p>Amazon S3 supports copy operations using Access points only when the source and destination buckets are in the same Amazon Web Services Region.</p></li>
422 /// <li>
423 /// <p>Access points are not supported by directory buckets.</p></li>
424 /// </ul>
425 /// </note>
426 /// <p>Alternatively, for objects accessed through Amazon S3 on Outposts, specify the ARN of the object as accessed in the format <code>arn:aws:s3-outposts:<region>
427 /// :
428 /// <account-id>
429 /// :outpost/
430 /// <outpost-id>
431 /// /object/
432 /// <key></key>
433 /// </outpost-id>
434 /// </account-id>
435 /// </region></code>. For example, to copy the object <code>reports/january.pdf</code> through outpost <code>my-outpost</code> owned by account <code>123456789012</code> in Region <code>us-west-2</code>, use the URL encoding of <code>arn:aws:s3-outposts:us-west-2:123456789012:outpost/my-outpost/object/reports/january.pdf</code>. The value must be URL-encoded.</p></li>
436 /// </ul>
437 /// <p>If your bucket has versioning enabled, you could have multiple versions of the same object. By default, <code>x-amz-copy-source</code> identifies the current version of the source object to copy. To copy a specific version of the source object to copy, append <code>?versionId=<version-id></version-id></code> to the <code>x-amz-copy-source</code> request header (for example, <code>x-amz-copy-source: /awsexamplebucket/reports/january.pdf?versionId=QUpfdndhfd8438MNFDN93jdnJFkdmqnh893</code>).</p>
438 /// <p>If the current version is a delete marker and you don't specify a versionId in the <code>x-amz-copy-source</code> request header, Amazon S3 returns a <code>404 Not Found</code> error, because the object does not exist. If you specify versionId in the <code>x-amz-copy-source</code> and the versionId is a delete marker, Amazon S3 returns an HTTP <code>400 Bad Request</code> error, because you are not allowed to specify a delete marker as a version for the <code>x-amz-copy-source</code>.</p><note>
439 /// <p><b>Directory buckets</b> - S3 Versioning isn't enabled and supported for directory buckets.</p>
440 /// </note>
441 pub fn set_copy_source(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
442 self.copy_source = input;
443 self
444 }
445 /// <p>Specifies the source object for the copy operation. You specify the value in one of two formats, depending on whether you want to access the source object through an <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/access-points.html">access point</a>:</p>
446 /// <ul>
447 /// <li>
448 /// <p>For objects not accessed through an access point, specify the name of the source bucket and key of the source object, separated by a slash (/). For example, to copy the object <code>reports/january.pdf</code> from the bucket <code>awsexamplebucket</code>, use <code>awsexamplebucket/reports/january.pdf</code>. The value must be URL-encoded.</p></li>
449 /// <li>
450 /// <p>For objects accessed through access points, specify the Amazon Resource Name (ARN) of the object as accessed through the access point, in the format <code>arn:aws:s3:<region>
451 /// :
452 /// <account-id>
453 /// :accesspoint/
454 /// <access-point-name>
455 /// /object/
456 /// <key></key>
457 /// </access-point-name>
458 /// </account-id>
459 /// </region></code>. For example, to copy the object <code>reports/january.pdf</code> through access point <code>my-access-point</code> owned by account <code>123456789012</code> in Region <code>us-west-2</code>, use the URL encoding of <code>arn:aws:s3:us-west-2:123456789012:accesspoint/my-access-point/object/reports/january.pdf</code>. The value must be URL encoded.</p><note>
460 /// <ul>
461 /// <li>
462 /// <p>Amazon S3 supports copy operations using Access points only when the source and destination buckets are in the same Amazon Web Services Region.</p></li>
463 /// <li>
464 /// <p>Access points are not supported by directory buckets.</p></li>
465 /// </ul>
466 /// </note>
467 /// <p>Alternatively, for objects accessed through Amazon S3 on Outposts, specify the ARN of the object as accessed in the format <code>arn:aws:s3-outposts:<region>
468 /// :
469 /// <account-id>
470 /// :outpost/
471 /// <outpost-id>
472 /// /object/
473 /// <key></key>
474 /// </outpost-id>
475 /// </account-id>
476 /// </region></code>. For example, to copy the object <code>reports/january.pdf</code> through outpost <code>my-outpost</code> owned by account <code>123456789012</code> in Region <code>us-west-2</code>, use the URL encoding of <code>arn:aws:s3-outposts:us-west-2:123456789012:outpost/my-outpost/object/reports/january.pdf</code>. The value must be URL-encoded.</p></li>
477 /// </ul>
478 /// <p>If your bucket has versioning enabled, you could have multiple versions of the same object. By default, <code>x-amz-copy-source</code> identifies the current version of the source object to copy. To copy a specific version of the source object to copy, append <code>?versionId=<version-id></version-id></code> to the <code>x-amz-copy-source</code> request header (for example, <code>x-amz-copy-source: /awsexamplebucket/reports/january.pdf?versionId=QUpfdndhfd8438MNFDN93jdnJFkdmqnh893</code>).</p>
479 /// <p>If the current version is a delete marker and you don't specify a versionId in the <code>x-amz-copy-source</code> request header, Amazon S3 returns a <code>404 Not Found</code> error, because the object does not exist. If you specify versionId in the <code>x-amz-copy-source</code> and the versionId is a delete marker, Amazon S3 returns an HTTP <code>400 Bad Request</code> error, because you are not allowed to specify a delete marker as a version for the <code>x-amz-copy-source</code>.</p><note>
480 /// <p><b>Directory buckets</b> - S3 Versioning isn't enabled and supported for directory buckets.</p>
481 /// </note>
482 pub fn get_copy_source(&self) -> &::std::option::Option<::std::string::String> {
483 &self.copy_source
484 }
485 /// <p>Copies the object if its entity tag (ETag) matches the specified tag.</p>
486 /// <p>If both of the <code>x-amz-copy-source-if-match</code> and <code>x-amz-copy-source-if-unmodified-since</code> headers are present in the request as follows:</p>
487 /// <p><code>x-amz-copy-source-if-match</code> condition evaluates to <code>true</code>, and;</p>
488 /// <p><code>x-amz-copy-source-if-unmodified-since</code> condition evaluates to <code>false</code>;</p>
489 /// <p>Amazon S3 returns <code>200 OK</code> and copies the data.</p>
490 pub fn copy_source_if_match(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
491 self.copy_source_if_match = ::std::option::Option::Some(input.into());
492 self
493 }
494 /// <p>Copies the object if its entity tag (ETag) matches the specified tag.</p>
495 /// <p>If both of the <code>x-amz-copy-source-if-match</code> and <code>x-amz-copy-source-if-unmodified-since</code> headers are present in the request as follows:</p>
496 /// <p><code>x-amz-copy-source-if-match</code> condition evaluates to <code>true</code>, and;</p>
497 /// <p><code>x-amz-copy-source-if-unmodified-since</code> condition evaluates to <code>false</code>;</p>
498 /// <p>Amazon S3 returns <code>200 OK</code> and copies the data.</p>
499 pub fn set_copy_source_if_match(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
500 self.copy_source_if_match = input;
501 self
502 }
503 /// <p>Copies the object if its entity tag (ETag) matches the specified tag.</p>
504 /// <p>If both of the <code>x-amz-copy-source-if-match</code> and <code>x-amz-copy-source-if-unmodified-since</code> headers are present in the request as follows:</p>
505 /// <p><code>x-amz-copy-source-if-match</code> condition evaluates to <code>true</code>, and;</p>
506 /// <p><code>x-amz-copy-source-if-unmodified-since</code> condition evaluates to <code>false</code>;</p>
507 /// <p>Amazon S3 returns <code>200 OK</code> and copies the data.</p>
508 pub fn get_copy_source_if_match(&self) -> &::std::option::Option<::std::string::String> {
509 &self.copy_source_if_match
510 }
511 /// <p>Copies the object if it has been modified since the specified time.</p>
512 /// <p>If both of the <code>x-amz-copy-source-if-none-match</code> and <code>x-amz-copy-source-if-modified-since</code> headers are present in the request as follows:</p>
513 /// <p><code>x-amz-copy-source-if-none-match</code> condition evaluates to <code>false</code>, and;</p>
514 /// <p><code>x-amz-copy-source-if-modified-since</code> condition evaluates to <code>true</code>;</p>
515 /// <p>Amazon S3 returns <code>412 Precondition Failed</code> response code.</p>
516 pub fn copy_source_if_modified_since(mut self, input: ::aws_smithy_types::DateTime) -> Self {
517 self.copy_source_if_modified_since = ::std::option::Option::Some(input);
518 self
519 }
520 /// <p>Copies the object if it has been modified since the specified time.</p>
521 /// <p>If both of the <code>x-amz-copy-source-if-none-match</code> and <code>x-amz-copy-source-if-modified-since</code> headers are present in the request as follows:</p>
522 /// <p><code>x-amz-copy-source-if-none-match</code> condition evaluates to <code>false</code>, and;</p>
523 /// <p><code>x-amz-copy-source-if-modified-since</code> condition evaluates to <code>true</code>;</p>
524 /// <p>Amazon S3 returns <code>412 Precondition Failed</code> response code.</p>
525 pub fn set_copy_source_if_modified_since(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
526 self.copy_source_if_modified_since = input;
527 self
528 }
529 /// <p>Copies the object if it has been modified since the specified time.</p>
530 /// <p>If both of the <code>x-amz-copy-source-if-none-match</code> and <code>x-amz-copy-source-if-modified-since</code> headers are present in the request as follows:</p>
531 /// <p><code>x-amz-copy-source-if-none-match</code> condition evaluates to <code>false</code>, and;</p>
532 /// <p><code>x-amz-copy-source-if-modified-since</code> condition evaluates to <code>true</code>;</p>
533 /// <p>Amazon S3 returns <code>412 Precondition Failed</code> response code.</p>
534 pub fn get_copy_source_if_modified_since(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
535 &self.copy_source_if_modified_since
536 }
537 /// <p>Copies the object if its entity tag (ETag) is different than the specified ETag.</p>
538 /// <p>If both of the <code>x-amz-copy-source-if-none-match</code> and <code>x-amz-copy-source-if-modified-since</code> headers are present in the request as follows:</p>
539 /// <p><code>x-amz-copy-source-if-none-match</code> condition evaluates to <code>false</code>, and;</p>
540 /// <p><code>x-amz-copy-source-if-modified-since</code> condition evaluates to <code>true</code>;</p>
541 /// <p>Amazon S3 returns <code>412 Precondition Failed</code> response code.</p>
542 pub fn copy_source_if_none_match(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
543 self.copy_source_if_none_match = ::std::option::Option::Some(input.into());
544 self
545 }
546 /// <p>Copies the object if its entity tag (ETag) is different than the specified ETag.</p>
547 /// <p>If both of the <code>x-amz-copy-source-if-none-match</code> and <code>x-amz-copy-source-if-modified-since</code> headers are present in the request as follows:</p>
548 /// <p><code>x-amz-copy-source-if-none-match</code> condition evaluates to <code>false</code>, and;</p>
549 /// <p><code>x-amz-copy-source-if-modified-since</code> condition evaluates to <code>true</code>;</p>
550 /// <p>Amazon S3 returns <code>412 Precondition Failed</code> response code.</p>
551 pub fn set_copy_source_if_none_match(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
552 self.copy_source_if_none_match = input;
553 self
554 }
555 /// <p>Copies the object if its entity tag (ETag) is different than the specified ETag.</p>
556 /// <p>If both of the <code>x-amz-copy-source-if-none-match</code> and <code>x-amz-copy-source-if-modified-since</code> headers are present in the request as follows:</p>
557 /// <p><code>x-amz-copy-source-if-none-match</code> condition evaluates to <code>false</code>, and;</p>
558 /// <p><code>x-amz-copy-source-if-modified-since</code> condition evaluates to <code>true</code>;</p>
559 /// <p>Amazon S3 returns <code>412 Precondition Failed</code> response code.</p>
560 pub fn get_copy_source_if_none_match(&self) -> &::std::option::Option<::std::string::String> {
561 &self.copy_source_if_none_match
562 }
563 /// <p>Copies the object if it hasn't been modified since the specified time.</p>
564 /// <p>If both of the <code>x-amz-copy-source-if-match</code> and <code>x-amz-copy-source-if-unmodified-since</code> headers are present in the request as follows:</p>
565 /// <p><code>x-amz-copy-source-if-match</code> condition evaluates to <code>true</code>, and;</p>
566 /// <p><code>x-amz-copy-source-if-unmodified-since</code> condition evaluates to <code>false</code>;</p>
567 /// <p>Amazon S3 returns <code>200 OK</code> and copies the data.</p>
568 pub fn copy_source_if_unmodified_since(mut self, input: ::aws_smithy_types::DateTime) -> Self {
569 self.copy_source_if_unmodified_since = ::std::option::Option::Some(input);
570 self
571 }
572 /// <p>Copies the object if it hasn't been modified since the specified time.</p>
573 /// <p>If both of the <code>x-amz-copy-source-if-match</code> and <code>x-amz-copy-source-if-unmodified-since</code> headers are present in the request as follows:</p>
574 /// <p><code>x-amz-copy-source-if-match</code> condition evaluates to <code>true</code>, and;</p>
575 /// <p><code>x-amz-copy-source-if-unmodified-since</code> condition evaluates to <code>false</code>;</p>
576 /// <p>Amazon S3 returns <code>200 OK</code> and copies the data.</p>
577 pub fn set_copy_source_if_unmodified_since(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
578 self.copy_source_if_unmodified_since = input;
579 self
580 }
581 /// <p>Copies the object if it hasn't been modified since the specified time.</p>
582 /// <p>If both of the <code>x-amz-copy-source-if-match</code> and <code>x-amz-copy-source-if-unmodified-since</code> headers are present in the request as follows:</p>
583 /// <p><code>x-amz-copy-source-if-match</code> condition evaluates to <code>true</code>, and;</p>
584 /// <p><code>x-amz-copy-source-if-unmodified-since</code> condition evaluates to <code>false</code>;</p>
585 /// <p>Amazon S3 returns <code>200 OK</code> and copies the data.</p>
586 pub fn get_copy_source_if_unmodified_since(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
587 &self.copy_source_if_unmodified_since
588 }
589 /// <p>The range of bytes to copy from the source object. The range value must use the form bytes=first-last, where the first and last are the zero-based byte offsets to copy. For example, bytes=0-9 indicates that you want to copy the first 10 bytes of the source. You can copy a range only if the source object is greater than 5 MB.</p>
590 pub fn copy_source_range(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
591 self.copy_source_range = ::std::option::Option::Some(input.into());
592 self
593 }
594 /// <p>The range of bytes to copy from the source object. The range value must use the form bytes=first-last, where the first and last are the zero-based byte offsets to copy. For example, bytes=0-9 indicates that you want to copy the first 10 bytes of the source. You can copy a range only if the source object is greater than 5 MB.</p>
595 pub fn set_copy_source_range(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
596 self.copy_source_range = input;
597 self
598 }
599 /// <p>The range of bytes to copy from the source object. The range value must use the form bytes=first-last, where the first and last are the zero-based byte offsets to copy. For example, bytes=0-9 indicates that you want to copy the first 10 bytes of the source. You can copy a range only if the source object is greater than 5 MB.</p>
600 pub fn get_copy_source_range(&self) -> &::std::option::Option<::std::string::String> {
601 &self.copy_source_range
602 }
603 /// <p>Object key for which the multipart upload was initiated.</p>
604 /// This field is required.
605 pub fn key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
606 self.key = ::std::option::Option::Some(input.into());
607 self
608 }
609 /// <p>Object key for which the multipart upload was initiated.</p>
610 pub fn set_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
611 self.key = input;
612 self
613 }
614 /// <p>Object key for which the multipart upload was initiated.</p>
615 pub fn get_key(&self) -> &::std::option::Option<::std::string::String> {
616 &self.key
617 }
618 /// <p>Part number of part being copied. This is a positive integer between 1 and 10,000.</p>
619 /// This field is required.
620 pub fn part_number(mut self, input: i32) -> Self {
621 self.part_number = ::std::option::Option::Some(input);
622 self
623 }
624 /// <p>Part number of part being copied. This is a positive integer between 1 and 10,000.</p>
625 pub fn set_part_number(mut self, input: ::std::option::Option<i32>) -> Self {
626 self.part_number = input;
627 self
628 }
629 /// <p>Part number of part being copied. This is a positive integer between 1 and 10,000.</p>
630 pub fn get_part_number(&self) -> &::std::option::Option<i32> {
631 &self.part_number
632 }
633 /// <p>Upload ID identifying the multipart upload whose part is being copied.</p>
634 /// This field is required.
635 pub fn upload_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
636 self.upload_id = ::std::option::Option::Some(input.into());
637 self
638 }
639 /// <p>Upload ID identifying the multipart upload whose part is being copied.</p>
640 pub fn set_upload_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
641 self.upload_id = input;
642 self
643 }
644 /// <p>Upload ID identifying the multipart upload whose part is being copied.</p>
645 pub fn get_upload_id(&self) -> &::std::option::Option<::std::string::String> {
646 &self.upload_id
647 }
648 /// <p>Specifies the algorithm to use when encrypting the object (for example, AES256).</p><note>
649 /// <p>This functionality is not supported when the destination bucket is a directory bucket.</p>
650 /// </note>
651 pub fn sse_customer_algorithm(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
652 self.sse_customer_algorithm = ::std::option::Option::Some(input.into());
653 self
654 }
655 /// <p>Specifies the algorithm to use when encrypting the object (for example, AES256).</p><note>
656 /// <p>This functionality is not supported when the destination bucket is a directory bucket.</p>
657 /// </note>
658 pub fn set_sse_customer_algorithm(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
659 self.sse_customer_algorithm = input;
660 self
661 }
662 /// <p>Specifies the algorithm to use when encrypting the object (for example, AES256).</p><note>
663 /// <p>This functionality is not supported when the destination bucket is a directory bucket.</p>
664 /// </note>
665 pub fn get_sse_customer_algorithm(&self) -> &::std::option::Option<::std::string::String> {
666 &self.sse_customer_algorithm
667 }
668 /// <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. This must be the same encryption key specified in the initiate multipart upload request.</p><note>
669 /// <p>This functionality is not supported when the destination bucket is a directory bucket.</p>
670 /// </note>
671 pub fn sse_customer_key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
672 self.sse_customer_key = ::std::option::Option::Some(input.into());
673 self
674 }
675 /// <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. This must be the same encryption key specified in the initiate multipart upload request.</p><note>
676 /// <p>This functionality is not supported when the destination bucket is a directory bucket.</p>
677 /// </note>
678 pub fn set_sse_customer_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
679 self.sse_customer_key = input;
680 self
681 }
682 /// <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. This must be the same encryption key specified in the initiate multipart upload request.</p><note>
683 /// <p>This functionality is not supported when the destination bucket is a directory bucket.</p>
684 /// </note>
685 pub fn get_sse_customer_key(&self) -> &::std::option::Option<::std::string::String> {
686 &self.sse_customer_key
687 }
688 /// <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>
689 /// <p>This functionality is not supported when the destination bucket is a directory bucket.</p>
690 /// </note>
691 pub fn sse_customer_key_md5(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
692 self.sse_customer_key_md5 = ::std::option::Option::Some(input.into());
693 self
694 }
695 /// <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>
696 /// <p>This functionality is not supported when the destination bucket is a directory bucket.</p>
697 /// </note>
698 pub fn set_sse_customer_key_md5(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
699 self.sse_customer_key_md5 = input;
700 self
701 }
702 /// <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>
703 /// <p>This functionality is not supported when the destination bucket is a directory bucket.</p>
704 /// </note>
705 pub fn get_sse_customer_key_md5(&self) -> &::std::option::Option<::std::string::String> {
706 &self.sse_customer_key_md5
707 }
708 /// <p>Specifies the algorithm to use when decrypting the source object (for example, <code>AES256</code>).</p><note>
709 /// <p>This functionality is not supported when the source object is in a directory bucket.</p>
710 /// </note>
711 pub fn copy_source_sse_customer_algorithm(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
712 self.copy_source_sse_customer_algorithm = ::std::option::Option::Some(input.into());
713 self
714 }
715 /// <p>Specifies the algorithm to use when decrypting the source object (for example, <code>AES256</code>).</p><note>
716 /// <p>This functionality is not supported when the source object is in a directory bucket.</p>
717 /// </note>
718 pub fn set_copy_source_sse_customer_algorithm(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
719 self.copy_source_sse_customer_algorithm = input;
720 self
721 }
722 /// <p>Specifies the algorithm to use when decrypting the source object (for example, <code>AES256</code>).</p><note>
723 /// <p>This functionality is not supported when the source object is in a directory bucket.</p>
724 /// </note>
725 pub fn get_copy_source_sse_customer_algorithm(&self) -> &::std::option::Option<::std::string::String> {
726 &self.copy_source_sse_customer_algorithm
727 }
728 /// <p>Specifies the customer-provided encryption key for Amazon S3 to use to decrypt the source object. The encryption key provided in this header must be one that was used when the source object was created.</p><note>
729 /// <p>This functionality is not supported when the source object is in a directory bucket.</p>
730 /// </note>
731 pub fn copy_source_sse_customer_key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
732 self.copy_source_sse_customer_key = ::std::option::Option::Some(input.into());
733 self
734 }
735 /// <p>Specifies the customer-provided encryption key for Amazon S3 to use to decrypt the source object. The encryption key provided in this header must be one that was used when the source object was created.</p><note>
736 /// <p>This functionality is not supported when the source object is in a directory bucket.</p>
737 /// </note>
738 pub fn set_copy_source_sse_customer_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
739 self.copy_source_sse_customer_key = input;
740 self
741 }
742 /// <p>Specifies the customer-provided encryption key for Amazon S3 to use to decrypt the source object. The encryption key provided in this header must be one that was used when the source object was created.</p><note>
743 /// <p>This functionality is not supported when the source object is in a directory bucket.</p>
744 /// </note>
745 pub fn get_copy_source_sse_customer_key(&self) -> &::std::option::Option<::std::string::String> {
746 &self.copy_source_sse_customer_key
747 }
748 /// <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>
749 /// <p>This functionality is not supported when the source object is in a directory bucket.</p>
750 /// </note>
751 pub fn copy_source_sse_customer_key_md5(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
752 self.copy_source_sse_customer_key_md5 = ::std::option::Option::Some(input.into());
753 self
754 }
755 /// <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>
756 /// <p>This functionality is not supported when the source object is in a directory bucket.</p>
757 /// </note>
758 pub fn set_copy_source_sse_customer_key_md5(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
759 self.copy_source_sse_customer_key_md5 = input;
760 self
761 }
762 /// <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>
763 /// <p>This functionality is not supported when the source object is in a directory bucket.</p>
764 /// </note>
765 pub fn get_copy_source_sse_customer_key_md5(&self) -> &::std::option::Option<::std::string::String> {
766 &self.copy_source_sse_customer_key_md5
767 }
768 /// <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>
769 /// <p>This functionality is not supported for directory buckets.</p>
770 /// </note>
771 pub fn request_payer(mut self, input: crate::types::RequestPayer) -> Self {
772 self.request_payer = ::std::option::Option::Some(input);
773 self
774 }
775 /// <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>
776 /// <p>This functionality is not supported for directory buckets.</p>
777 /// </note>
778 pub fn set_request_payer(mut self, input: ::std::option::Option<crate::types::RequestPayer>) -> Self {
779 self.request_payer = input;
780 self
781 }
782 /// <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>
783 /// <p>This functionality is not supported for directory buckets.</p>
784 /// </note>
785 pub fn get_request_payer(&self) -> &::std::option::Option<crate::types::RequestPayer> {
786 &self.request_payer
787 }
788 /// <p>The account ID of the expected destination bucket owner. If the account ID that you provide does not match the actual owner of the destination bucket, the request fails with the HTTP status code <code>403 Forbidden</code> (access denied).</p>
789 pub fn expected_bucket_owner(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
790 self.expected_bucket_owner = ::std::option::Option::Some(input.into());
791 self
792 }
793 /// <p>The account ID of the expected destination bucket owner. If the account ID that you provide does not match the actual owner of the destination bucket, the request fails with the HTTP status code <code>403 Forbidden</code> (access denied).</p>
794 pub fn set_expected_bucket_owner(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
795 self.expected_bucket_owner = input;
796 self
797 }
798 /// <p>The account ID of the expected destination bucket owner. If the account ID that you provide does not match the actual owner of the destination bucket, the request fails with the HTTP status code <code>403 Forbidden</code> (access denied).</p>
799 pub fn get_expected_bucket_owner(&self) -> &::std::option::Option<::std::string::String> {
800 &self.expected_bucket_owner
801 }
802 /// <p>The account ID of the expected source bucket owner. If the account ID that you provide does not match the actual owner of the source bucket, the request fails with the HTTP status code <code>403 Forbidden</code> (access denied).</p>
803 pub fn expected_source_bucket_owner(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
804 self.expected_source_bucket_owner = ::std::option::Option::Some(input.into());
805 self
806 }
807 /// <p>The account ID of the expected source bucket owner. If the account ID that you provide does not match the actual owner of the source bucket, the request fails with the HTTP status code <code>403 Forbidden</code> (access denied).</p>
808 pub fn set_expected_source_bucket_owner(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
809 self.expected_source_bucket_owner = input;
810 self
811 }
812 /// <p>The account ID of the expected source bucket owner. If the account ID that you provide does not match the actual owner of the source bucket, the request fails with the HTTP status code <code>403 Forbidden</code> (access denied).</p>
813 pub fn get_expected_source_bucket_owner(&self) -> &::std::option::Option<::std::string::String> {
814 &self.expected_source_bucket_owner
815 }
816 /// Consumes the builder and constructs a [`UploadPartCopyInput`](crate::operation::upload_part_copy::UploadPartCopyInput).
817 pub fn build(
818 self,
819 ) -> ::std::result::Result<crate::operation::upload_part_copy::UploadPartCopyInput, ::aws_smithy_types::error::operation::BuildError> {
820 ::std::result::Result::Ok(crate::operation::upload_part_copy::UploadPartCopyInput {
821 bucket: self.bucket,
822 copy_source: self.copy_source,
823 copy_source_if_match: self.copy_source_if_match,
824 copy_source_if_modified_since: self.copy_source_if_modified_since,
825 copy_source_if_none_match: self.copy_source_if_none_match,
826 copy_source_if_unmodified_since: self.copy_source_if_unmodified_since,
827 copy_source_range: self.copy_source_range,
828 key: self.key,
829 part_number: self.part_number,
830 upload_id: self.upload_id,
831 sse_customer_algorithm: self.sse_customer_algorithm,
832 sse_customer_key: self.sse_customer_key,
833 sse_customer_key_md5: self.sse_customer_key_md5,
834 copy_source_sse_customer_algorithm: self.copy_source_sse_customer_algorithm,
835 copy_source_sse_customer_key: self.copy_source_sse_customer_key,
836 copy_source_sse_customer_key_md5: self.copy_source_sse_customer_key_md5,
837 request_payer: self.request_payer,
838 expected_bucket_owner: self.expected_bucket_owner,
839 expected_source_bucket_owner: self.expected_source_bucket_owner,
840 })
841 }
842}
843impl ::std::fmt::Debug for UploadPartCopyInputBuilder {
844 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
845 let mut formatter = f.debug_struct("UploadPartCopyInputBuilder");
846 formatter.field("bucket", &self.bucket);
847 formatter.field("copy_source", &self.copy_source);
848 formatter.field("copy_source_if_match", &self.copy_source_if_match);
849 formatter.field("copy_source_if_modified_since", &self.copy_source_if_modified_since);
850 formatter.field("copy_source_if_none_match", &self.copy_source_if_none_match);
851 formatter.field("copy_source_if_unmodified_since", &self.copy_source_if_unmodified_since);
852 formatter.field("copy_source_range", &self.copy_source_range);
853 formatter.field("key", &self.key);
854 formatter.field("part_number", &self.part_number);
855 formatter.field("upload_id", &self.upload_id);
856 formatter.field("sse_customer_algorithm", &self.sse_customer_algorithm);
857 formatter.field("sse_customer_key", &"*** Sensitive Data Redacted ***");
858 formatter.field("sse_customer_key_md5", &self.sse_customer_key_md5);
859 formatter.field("copy_source_sse_customer_algorithm", &self.copy_source_sse_customer_algorithm);
860 formatter.field("copy_source_sse_customer_key", &"*** Sensitive Data Redacted ***");
861 formatter.field("copy_source_sse_customer_key_md5", &self.copy_source_sse_customer_key_md5);
862 formatter.field("request_payer", &self.request_payer);
863 formatter.field("expected_bucket_owner", &self.expected_bucket_owner);
864 formatter.field("expected_source_bucket_owner", &self.expected_source_bucket_owner);
865 formatter.finish()
866 }
867}