@@ -256,7 +256,7 @@ final class CopyObjectRequest extends Input
256256 /**
257257 * The date and time at which the object is no longer cacheable.
258258 *
259- * @var \DateTimeImmutable |null
259+ * @var string |null
260260 */
261261 private $ expires ;
262262
@@ -713,7 +713,7 @@ final class CopyObjectRequest extends Input
713713 * CopySourceIfModifiedSince?: null|\DateTimeImmutable|string,
714714 * CopySourceIfNoneMatch?: null|string,
715715 * CopySourceIfUnmodifiedSince?: null|\DateTimeImmutable|string,
716- * Expires?: null|\DateTimeImmutable| string,
716+ * Expires?: null|string,
717717 * GrantFullControl?: null|string,
718718 * GrantRead?: null|string,
719719 * GrantReadACP?: null|string,
@@ -759,7 +759,7 @@ public function __construct(array $input = [])
759759 $ this ->copySourceIfModifiedSince = !isset ($ input ['CopySourceIfModifiedSince ' ]) ? null : ($ input ['CopySourceIfModifiedSince ' ] instanceof \DateTimeImmutable ? $ input ['CopySourceIfModifiedSince ' ] : new \DateTimeImmutable ($ input ['CopySourceIfModifiedSince ' ]));
760760 $ this ->copySourceIfNoneMatch = $ input ['CopySourceIfNoneMatch ' ] ?? null ;
761761 $ 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 ;
763763 $ this ->grantFullControl = $ input ['GrantFullControl ' ] ?? null ;
764764 $ this ->grantRead = $ input ['GrantRead ' ] ?? null ;
765765 $ this ->grantReadAcp = $ input ['GrantReadACP ' ] ?? null ;
@@ -805,7 +805,7 @@ public function __construct(array $input = [])
805805 * CopySourceIfModifiedSince?: null|\DateTimeImmutable|string,
806806 * CopySourceIfNoneMatch?: null|string,
807807 * CopySourceIfUnmodifiedSince?: null|\DateTimeImmutable|string,
808- * Expires?: null|\DateTimeImmutable| string,
808+ * Expires?: null|string,
809809 * GrantFullControl?: null|string,
810810 * GrantRead?: null|string,
811811 * GrantReadACP?: null|string,
@@ -942,7 +942,7 @@ public function getExpectedSourceBucketOwner(): ?string
942942 return $ this ->expectedSourceBucketOwner ;
943943 }
944944
945- public function getExpires (): ?\ DateTimeImmutable
945+ public function getExpires (): ?string
946946 {
947947 return $ this ->expires ;
948948 }
@@ -1127,7 +1127,7 @@ public function request(): Request
11271127 $ headers ['x-amz-copy-source-if-unmodified-since ' ] = $ this ->copySourceIfUnmodifiedSince ->setTimezone (new \DateTimeZone ('GMT ' ))->format (\DateTimeInterface::RFC7231 );
11281128 }
11291129 if (null !== $ this ->expires ) {
1130- $ headers ['Expires ' ] = $ this ->expires -> setTimezone ( new \ DateTimeZone ( ' GMT ' ))-> format (\DateTimeInterface:: RFC7231 ) ;
1130+ $ headers ['Expires ' ] = $ this ->expires ;
11311131 }
11321132 if (null !== $ this ->grantFullControl ) {
11331133 $ headers ['x-amz-grant-full-control ' ] = $ this ->grantFullControl ;
@@ -1392,7 +1392,7 @@ public function setExpectedSourceBucketOwner(?string $value): self
13921392 return $ this ;
13931393 }
13941394
1395- public function setExpires (?\ DateTimeImmutable $ value ): self
1395+ public function setExpires (?string $ value ): self
13961396 {
13971397 $ this ->expires = $ value ;
13981398
0 commit comments