6
6
use AsyncAws \Core \Input ;
7
7
use AsyncAws \Core \Request ;
8
8
use AsyncAws \Core \Stream \StreamFactory ;
9
+ use AsyncAws \S3 \Enum \ChecksumType ;
9
10
use AsyncAws \S3 \Enum \RequestPayer ;
10
11
use AsyncAws \S3 \ValueObject \CompletedMultipartUpload ;
11
12
@@ -73,7 +74,7 @@ final class CompleteMultipartUploadRequest extends Input
73
74
74
75
/**
75
76
* 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
77
78
* information, see Checking object integrity [^1] in the *Amazon S3 User Guide*.
78
79
*
79
80
* [^1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
@@ -84,7 +85,7 @@ final class CompleteMultipartUploadRequest extends Input
84
85
85
86
/**
86
87
* 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
88
89
* information, see Checking object integrity [^1] in the *Amazon S3 User Guide*.
89
90
*
90
91
* [^1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
@@ -95,8 +96,20 @@ final class CompleteMultipartUploadRequest extends Input
95
96
96
97
/**
97
98
* 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*.
100
113
*
101
114
* [^1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
102
115
*
@@ -106,7 +119,7 @@ final class CompleteMultipartUploadRequest extends Input
106
119
107
120
/**
108
121
* 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
110
123
* information, see Checking object integrity [^1] in the *Amazon S3 User Guide*.
111
124
*
112
125
* [^1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
@@ -115,6 +128,25 @@ final class CompleteMultipartUploadRequest extends Input
115
128
*/
116
129
private $ checksumSha256 ;
117
130
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
+
118
150
/**
119
151
* @var RequestPayer::*|null
120
152
*/
@@ -214,8 +246,11 @@ final class CompleteMultipartUploadRequest extends Input
214
246
* UploadId?: string,
215
247
* ChecksumCRC32?: null|string,
216
248
* ChecksumCRC32C?: null|string,
249
+ * ChecksumCRC64NVME?: null|string,
217
250
* ChecksumSHA1?: null|string,
218
251
* ChecksumSHA256?: null|string,
252
+ * ChecksumType?: null|ChecksumType::*,
253
+ * MpuObjectSize?: null|int,
219
254
* RequestPayer?: null|RequestPayer::*,
220
255
* ExpectedBucketOwner?: null|string,
221
256
* IfMatch?: null|string,
@@ -234,8 +269,11 @@ public function __construct(array $input = [])
234
269
$ this ->uploadId = $ input ['UploadId ' ] ?? null ;
235
270
$ this ->checksumCrc32 = $ input ['ChecksumCRC32 ' ] ?? null ;
236
271
$ this ->checksumCrc32C = $ input ['ChecksumCRC32C ' ] ?? null ;
272
+ $ this ->checksumCrc64Nvme = $ input ['ChecksumCRC64NVME ' ] ?? null ;
237
273
$ this ->checksumSha1 = $ input ['ChecksumSHA1 ' ] ?? null ;
238
274
$ this ->checksumSha256 = $ input ['ChecksumSHA256 ' ] ?? null ;
275
+ $ this ->checksumType = $ input ['ChecksumType ' ] ?? null ;
276
+ $ this ->mpuObjectSize = $ input ['MpuObjectSize ' ] ?? null ;
239
277
$ this ->requestPayer = $ input ['RequestPayer ' ] ?? null ;
240
278
$ this ->expectedBucketOwner = $ input ['ExpectedBucketOwner ' ] ?? null ;
241
279
$ this ->ifMatch = $ input ['IfMatch ' ] ?? null ;
@@ -254,8 +292,11 @@ public function __construct(array $input = [])
254
292
* UploadId?: string,
255
293
* ChecksumCRC32?: null|string,
256
294
* ChecksumCRC32C?: null|string,
295
+ * ChecksumCRC64NVME?: null|string,
257
296
* ChecksumSHA1?: null|string,
258
297
* ChecksumSHA256?: null|string,
298
+ * ChecksumType?: null|ChecksumType::*,
299
+ * MpuObjectSize?: null|int,
259
300
* RequestPayer?: null|RequestPayer::*,
260
301
* ExpectedBucketOwner?: null|string,
261
302
* IfMatch?: null|string,
@@ -286,6 +327,11 @@ public function getChecksumCrc32C(): ?string
286
327
return $ this ->checksumCrc32C ;
287
328
}
288
329
330
+ public function getChecksumCrc64Nvme (): ?string
331
+ {
332
+ return $ this ->checksumCrc64Nvme ;
333
+ }
334
+
289
335
public function getChecksumSha1 (): ?string
290
336
{
291
337
return $ this ->checksumSha1 ;
@@ -296,6 +342,14 @@ public function getChecksumSha256(): ?string
296
342
return $ this ->checksumSha256 ;
297
343
}
298
344
345
+ /**
346
+ * @return ChecksumType::*|null
347
+ */
348
+ public function getChecksumType (): ?string
349
+ {
350
+ return $ this ->checksumType ;
351
+ }
352
+
299
353
public function getExpectedBucketOwner (): ?string
300
354
{
301
355
return $ this ->expectedBucketOwner ;
@@ -316,6 +370,11 @@ public function getKey(): ?string
316
370
return $ this ->key ;
317
371
}
318
372
373
+ public function getMpuObjectSize (): ?int
374
+ {
375
+ return $ this ->mpuObjectSize ;
376
+ }
377
+
319
378
public function getMultipartUpload (): ?CompletedMultipartUpload
320
379
{
321
380
return $ this ->multipartUpload ;
@@ -362,12 +421,24 @@ public function request(): Request
362
421
if (null !== $ this ->checksumCrc32C ) {
363
422
$ headers ['x-amz-checksum-crc32c ' ] = $ this ->checksumCrc32C ;
364
423
}
424
+ if (null !== $ this ->checksumCrc64Nvme ) {
425
+ $ headers ['x-amz-checksum-crc64nvme ' ] = $ this ->checksumCrc64Nvme ;
426
+ }
365
427
if (null !== $ this ->checksumSha1 ) {
366
428
$ headers ['x-amz-checksum-sha1 ' ] = $ this ->checksumSha1 ;
367
429
}
368
430
if (null !== $ this ->checksumSha256 ) {
369
431
$ headers ['x-amz-checksum-sha256 ' ] = $ this ->checksumSha256 ;
370
432
}
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
+ }
371
442
if (null !== $ this ->requestPayer ) {
372
443
if (!RequestPayer::exists ($ this ->requestPayer )) {
373
444
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
444
515
return $ this ;
445
516
}
446
517
518
+ public function setChecksumCrc64Nvme (?string $ value ): self
519
+ {
520
+ $ this ->checksumCrc64Nvme = $ value ;
521
+
522
+ return $ this ;
523
+ }
524
+
447
525
public function setChecksumSha1 (?string $ value ): self
448
526
{
449
527
$ this ->checksumSha1 = $ value ;
@@ -458,6 +536,16 @@ public function setChecksumSha256(?string $value): self
458
536
return $ this ;
459
537
}
460
538
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
+
461
549
public function setExpectedBucketOwner (?string $ value ): self
462
550
{
463
551
$ this ->expectedBucketOwner = $ value ;
@@ -486,6 +574,13 @@ public function setKey(?string $value): self
486
574
return $ this ;
487
575
}
488
576
577
+ public function setMpuObjectSize (?int $ value ): self
578
+ {
579
+ $ this ->mpuObjectSize = $ value ;
580
+
581
+ return $ this ;
582
+ }
583
+
489
584
public function setMultipartUpload (?CompletedMultipartUpload $ value ): self
490
585
{
491
586
$ this ->multipartUpload = $ value ;
0 commit comments