66use AsyncAws \Core \Input ;
77use AsyncAws \Core \Request ;
88use AsyncAws \Core \Stream \StreamFactory ;
9+ use AsyncAws \S3 \Enum \ChecksumType ;
910use AsyncAws \S3 \Enum \RequestPayer ;
1011use AsyncAws \S3 \ValueObject \CompletedMultipartUpload ;
1112
@@ -73,7 +74,7 @@ final class CompleteMultipartUploadRequest extends Input
7374
7475 /**
7576 * This header can be used as a data integrity check to verify that the data received is the same data that was
76- * originally sent. This header specifies the base64- encoded, 32-bit CRC-32 checksum of the object. For more
77+ * originally sent. This header specifies the Base64 encoded, 32-bit ` CRC-32` checksum of the object. For more
7778 * information, see Checking object integrity [^1] in the *Amazon S3 User Guide*.
7879 *
7980 * [^1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
@@ -84,7 +85,7 @@ final class CompleteMultipartUploadRequest extends Input
8485
8586 /**
8687 * This header can be used as a data integrity check to verify that the data received is the same data that was
87- * originally sent. This header specifies the base64- encoded, 32-bit CRC-32C checksum of the object. For more
88+ * originally sent. This header specifies the Base64 encoded, 32-bit ` CRC-32C` checksum of the object. For more
8889 * information, see Checking object integrity [^1] in the *Amazon S3 User Guide*.
8990 *
9091 * [^1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
@@ -95,8 +96,20 @@ final class CompleteMultipartUploadRequest extends Input
9596
9697 /**
9798 * This header can be used as a data integrity check to verify that the data received is the same data that was
98- * originally sent. This header specifies the base64-encoded, 160-bit SHA-1 digest of the object. For more information,
99- * see Checking object integrity [^1] in the *Amazon S3 User Guide*.
99+ * originally sent. This header specifies the Base64 encoded, 64-bit `CRC-64NVME` checksum of the object. The
100+ * `CRC-64NVME` checksum is always a full object checksum. For more information, see Checking object integrity in the
101+ * Amazon S3 User Guide [^1].
102+ *
103+ * [^1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
104+ *
105+ * @var string|null
106+ */
107+ private $ checksumCrc64Nvme ;
108+
109+ /**
110+ * This header can be used as a data integrity check to verify that the data received is the same data that was
111+ * originally sent. This header specifies the Base64 encoded, 160-bit `SHA-1` digest of the object. For more
112+ * information, see Checking object integrity [^1] in the *Amazon S3 User Guide*.
100113 *
101114 * [^1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
102115 *
@@ -106,7 +119,7 @@ final class CompleteMultipartUploadRequest extends Input
106119
107120 /**
108121 * This header can be used as a data integrity check to verify that the data received is the same data that was
109- * originally sent. This header specifies the base64- encoded, 256-bit SHA-256 digest of the object. For more
122+ * originally sent. This header specifies the Base64 encoded, 256-bit ` SHA-256` digest of the object. For more
110123 * information, see Checking object integrity [^1] in the *Amazon S3 User Guide*.
111124 *
112125 * [^1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
@@ -115,6 +128,25 @@ final class CompleteMultipartUploadRequest extends Input
115128 */
116129 private $ checksumSha256 ;
117130
131+ /**
132+ * This header specifies the checksum type of the object, which determines how part-level checksums are combined to
133+ * create an object-level checksum for multipart objects. You can use this header as a data integrity check to verify
134+ * that the checksum type that is received is the same checksum that was specified. If the checksum type doesn’t match
135+ * the checksum type that was specified for the object during the `CreateMultipartUpload` request, it’ll result in a
136+ * `BadDigest` error. For more information, see Checking object integrity in the Amazon S3 User Guide.
137+ *
138+ * @var ChecksumType::*|null
139+ */
140+ private $ checksumType ;
141+
142+ /**
143+ * The expected total object size of the multipart upload request. If there’s a mismatch between the specified object
144+ * size value and the actual object size value, it results in an `HTTP 400 InvalidRequest` error.
145+ *
146+ * @var int|null
147+ */
148+ private $ mpuObjectSize ;
149+
118150 /**
119151 * @var RequestPayer::*|null
120152 */
@@ -214,8 +246,11 @@ final class CompleteMultipartUploadRequest extends Input
214246 * UploadId?: string,
215247 * ChecksumCRC32?: null|string,
216248 * ChecksumCRC32C?: null|string,
249+ * ChecksumCRC64NVME?: null|string,
217250 * ChecksumSHA1?: null|string,
218251 * ChecksumSHA256?: null|string,
252+ * ChecksumType?: null|ChecksumType::*,
253+ * MpuObjectSize?: null|int,
219254 * RequestPayer?: null|RequestPayer::*,
220255 * ExpectedBucketOwner?: null|string,
221256 * IfMatch?: null|string,
@@ -234,8 +269,11 @@ public function __construct(array $input = [])
234269 $ this ->uploadId = $ input ['UploadId ' ] ?? null ;
235270 $ this ->checksumCrc32 = $ input ['ChecksumCRC32 ' ] ?? null ;
236271 $ this ->checksumCrc32C = $ input ['ChecksumCRC32C ' ] ?? null ;
272+ $ this ->checksumCrc64Nvme = $ input ['ChecksumCRC64NVME ' ] ?? null ;
237273 $ this ->checksumSha1 = $ input ['ChecksumSHA1 ' ] ?? null ;
238274 $ this ->checksumSha256 = $ input ['ChecksumSHA256 ' ] ?? null ;
275+ $ this ->checksumType = $ input ['ChecksumType ' ] ?? null ;
276+ $ this ->mpuObjectSize = $ input ['MpuObjectSize ' ] ?? null ;
239277 $ this ->requestPayer = $ input ['RequestPayer ' ] ?? null ;
240278 $ this ->expectedBucketOwner = $ input ['ExpectedBucketOwner ' ] ?? null ;
241279 $ this ->ifMatch = $ input ['IfMatch ' ] ?? null ;
@@ -254,8 +292,11 @@ public function __construct(array $input = [])
254292 * UploadId?: string,
255293 * ChecksumCRC32?: null|string,
256294 * ChecksumCRC32C?: null|string,
295+ * ChecksumCRC64NVME?: null|string,
257296 * ChecksumSHA1?: null|string,
258297 * ChecksumSHA256?: null|string,
298+ * ChecksumType?: null|ChecksumType::*,
299+ * MpuObjectSize?: null|int,
259300 * RequestPayer?: null|RequestPayer::*,
260301 * ExpectedBucketOwner?: null|string,
261302 * IfMatch?: null|string,
@@ -286,6 +327,11 @@ public function getChecksumCrc32C(): ?string
286327 return $ this ->checksumCrc32C ;
287328 }
288329
330+ public function getChecksumCrc64Nvme (): ?string
331+ {
332+ return $ this ->checksumCrc64Nvme ;
333+ }
334+
289335 public function getChecksumSha1 (): ?string
290336 {
291337 return $ this ->checksumSha1 ;
@@ -296,6 +342,14 @@ public function getChecksumSha256(): ?string
296342 return $ this ->checksumSha256 ;
297343 }
298344
345+ /**
346+ * @return ChecksumType::*|null
347+ */
348+ public function getChecksumType (): ?string
349+ {
350+ return $ this ->checksumType ;
351+ }
352+
299353 public function getExpectedBucketOwner (): ?string
300354 {
301355 return $ this ->expectedBucketOwner ;
@@ -316,6 +370,11 @@ public function getKey(): ?string
316370 return $ this ->key ;
317371 }
318372
373+ public function getMpuObjectSize (): ?int
374+ {
375+ return $ this ->mpuObjectSize ;
376+ }
377+
319378 public function getMultipartUpload (): ?CompletedMultipartUpload
320379 {
321380 return $ this ->multipartUpload ;
@@ -362,12 +421,24 @@ public function request(): Request
362421 if (null !== $ this ->checksumCrc32C ) {
363422 $ headers ['x-amz-checksum-crc32c ' ] = $ this ->checksumCrc32C ;
364423 }
424+ if (null !== $ this ->checksumCrc64Nvme ) {
425+ $ headers ['x-amz-checksum-crc64nvme ' ] = $ this ->checksumCrc64Nvme ;
426+ }
365427 if (null !== $ this ->checksumSha1 ) {
366428 $ headers ['x-amz-checksum-sha1 ' ] = $ this ->checksumSha1 ;
367429 }
368430 if (null !== $ this ->checksumSha256 ) {
369431 $ headers ['x-amz-checksum-sha256 ' ] = $ this ->checksumSha256 ;
370432 }
433+ if (null !== $ this ->checksumType ) {
434+ if (!ChecksumType::exists ($ this ->checksumType )) {
435+ throw new InvalidArgument (\sprintf ('Invalid parameter "ChecksumType" for "%s". The value "%s" is not a valid "ChecksumType". ' , __CLASS__ , $ this ->checksumType ));
436+ }
437+ $ headers ['x-amz-checksum-type ' ] = $ this ->checksumType ;
438+ }
439+ if (null !== $ this ->mpuObjectSize ) {
440+ $ headers ['x-amz-mp-object-size ' ] = (string ) $ this ->mpuObjectSize ;
441+ }
371442 if (null !== $ this ->requestPayer ) {
372443 if (!RequestPayer::exists ($ this ->requestPayer )) {
373444 throw new InvalidArgument (\sprintf ('Invalid parameter "RequestPayer" for "%s". The value "%s" is not a valid "RequestPayer". ' , __CLASS__ , $ this ->requestPayer ));
@@ -444,6 +515,13 @@ public function setChecksumCrc32C(?string $value): self
444515 return $ this ;
445516 }
446517
518+ public function setChecksumCrc64Nvme (?string $ value ): self
519+ {
520+ $ this ->checksumCrc64Nvme = $ value ;
521+
522+ return $ this ;
523+ }
524+
447525 public function setChecksumSha1 (?string $ value ): self
448526 {
449527 $ this ->checksumSha1 = $ value ;
@@ -458,6 +536,16 @@ public function setChecksumSha256(?string $value): self
458536 return $ this ;
459537 }
460538
539+ /**
540+ * @param ChecksumType::*|null $value
541+ */
542+ public function setChecksumType (?string $ value ): self
543+ {
544+ $ this ->checksumType = $ value ;
545+
546+ return $ this ;
547+ }
548+
461549 public function setExpectedBucketOwner (?string $ value ): self
462550 {
463551 $ this ->expectedBucketOwner = $ value ;
@@ -486,6 +574,13 @@ public function setKey(?string $value): self
486574 return $ this ;
487575 }
488576
577+ public function setMpuObjectSize (?int $ value ): self
578+ {
579+ $ this ->mpuObjectSize = $ value ;
580+
581+ return $ this ;
582+ }
583+
489584 public function setMultipartUpload (?CompletedMultipartUpload $ value ): self
490585 {
491586 $ this ->multipartUpload = $ value ;
0 commit comments