@@ -256,7 +256,7 @@ final class CopyObjectRequest extends Input
256
256
/**
257
257
* The date and time at which the object is no longer cacheable.
258
258
*
259
- * @var \DateTimeImmutable |null
259
+ * @var string |null
260
260
*/
261
261
private $ expires ;
262
262
@@ -713,7 +713,7 @@ final class CopyObjectRequest extends Input
713
713
* CopySourceIfModifiedSince?: null|\DateTimeImmutable|string,
714
714
* CopySourceIfNoneMatch?: null|string,
715
715
* CopySourceIfUnmodifiedSince?: null|\DateTimeImmutable|string,
716
- * Expires?: null|\DateTimeImmutable| string,
716
+ * Expires?: null|string,
717
717
* GrantFullControl?: null|string,
718
718
* GrantRead?: null|string,
719
719
* GrantReadACP?: null|string,
@@ -759,7 +759,7 @@ public function __construct(array $input = [])
759
759
$ this ->copySourceIfModifiedSince = !isset ($ input ['CopySourceIfModifiedSince ' ]) ? null : ($ input ['CopySourceIfModifiedSince ' ] instanceof \DateTimeImmutable ? $ input ['CopySourceIfModifiedSince ' ] : new \DateTimeImmutable ($ input ['CopySourceIfModifiedSince ' ]));
760
760
$ this ->copySourceIfNoneMatch = $ input ['CopySourceIfNoneMatch ' ] ?? null ;
761
761
$ this ->copySourceIfUnmodifiedSince = !isset ($ input ['CopySourceIfUnmodifiedSince ' ]) ? null : ($ input ['CopySourceIfUnmodifiedSince ' ] instanceof \DateTimeImmutable ? $ input ['CopySourceIfUnmodifiedSince ' ] : new \DateTimeImmutable ($ input ['CopySourceIfUnmodifiedSince ' ]));
762
- $ this ->expires = ! isset ( $ input ['Expires ' ]) ? null : ( $ input [ ' Expires ' ] instanceof \DateTimeImmutable ? $ input [ ' Expires ' ] : new \ DateTimeImmutable ( $ input [ ' Expires ' ])) ;
762
+ $ this ->expires = $ input ['Expires ' ] ?? null ;
763
763
$ this ->grantFullControl = $ input ['GrantFullControl ' ] ?? null ;
764
764
$ this ->grantRead = $ input ['GrantRead ' ] ?? null ;
765
765
$ this ->grantReadAcp = $ input ['GrantReadACP ' ] ?? null ;
@@ -805,7 +805,7 @@ public function __construct(array $input = [])
805
805
* CopySourceIfModifiedSince?: null|\DateTimeImmutable|string,
806
806
* CopySourceIfNoneMatch?: null|string,
807
807
* CopySourceIfUnmodifiedSince?: null|\DateTimeImmutable|string,
808
- * Expires?: null|\DateTimeImmutable| string,
808
+ * Expires?: null|string,
809
809
* GrantFullControl?: null|string,
810
810
* GrantRead?: null|string,
811
811
* GrantReadACP?: null|string,
@@ -942,7 +942,7 @@ public function getExpectedSourceBucketOwner(): ?string
942
942
return $ this ->expectedSourceBucketOwner ;
943
943
}
944
944
945
- public function getExpires (): ?\ DateTimeImmutable
945
+ public function getExpires (): ?string
946
946
{
947
947
return $ this ->expires ;
948
948
}
@@ -1127,7 +1127,7 @@ public function request(): Request
1127
1127
$ headers ['x-amz-copy-source-if-unmodified-since ' ] = $ this ->copySourceIfUnmodifiedSince ->setTimezone (new \DateTimeZone ('GMT ' ))->format (\DateTimeInterface::RFC7231 );
1128
1128
}
1129
1129
if (null !== $ this ->expires ) {
1130
- $ headers ['Expires ' ] = $ this ->expires -> setTimezone ( new \ DateTimeZone ( ' GMT ' ))-> format (\DateTimeInterface:: RFC7231 ) ;
1130
+ $ headers ['Expires ' ] = $ this ->expires ;
1131
1131
}
1132
1132
if (null !== $ this ->grantFullControl ) {
1133
1133
$ headers ['x-amz-grant-full-control ' ] = $ this ->grantFullControl ;
@@ -1392,7 +1392,7 @@ public function setExpectedSourceBucketOwner(?string $value): self
1392
1392
return $ this ;
1393
1393
}
1394
1394
1395
- public function setExpires (?\ DateTimeImmutable $ value ): self
1395
+ public function setExpires (?string $ value ): self
1396
1396
{
1397
1397
$ this ->expires = $ value ;
1398
1398
0 commit comments