@@ -138,6 +138,48 @@ final class HeadObjectRequest extends Input
138
138
*/
139
139
private $ range ;
140
140
141
+ /**
142
+ * Sets the `Cache-Control` header of the response.
143
+ *
144
+ * @var string|null
145
+ */
146
+ private $ responseCacheControl ;
147
+
148
+ /**
149
+ * Sets the `Content-Disposition` header of the response.
150
+ *
151
+ * @var string|null
152
+ */
153
+ private $ responseContentDisposition ;
154
+
155
+ /**
156
+ * Sets the `Content-Encoding` header of the response.
157
+ *
158
+ * @var string|null
159
+ */
160
+ private $ responseContentEncoding ;
161
+
162
+ /**
163
+ * Sets the `Content-Language` header of the response.
164
+ *
165
+ * @var string|null
166
+ */
167
+ private $ responseContentLanguage ;
168
+
169
+ /**
170
+ * Sets the `Content-Type` header of the response.
171
+ *
172
+ * @var string|null
173
+ */
174
+ private $ responseContentType ;
175
+
176
+ /**
177
+ * Sets the `Expires` header of the response.
178
+ *
179
+ * @var \DateTimeImmutable|null
180
+ */
181
+ private $ responseExpires ;
182
+
141
183
/**
142
184
* Version ID used to reference a specific version of the object.
143
185
*
@@ -218,6 +260,12 @@ final class HeadObjectRequest extends Input
218
260
* IfUnmodifiedSince?: null|\DateTimeImmutable|string,
219
261
* Key?: string,
220
262
* Range?: null|string,
263
+ * ResponseCacheControl?: null|string,
264
+ * ResponseContentDisposition?: null|string,
265
+ * ResponseContentEncoding?: null|string,
266
+ * ResponseContentLanguage?: null|string,
267
+ * ResponseContentType?: null|string,
268
+ * ResponseExpires?: null|\DateTimeImmutable|string,
221
269
* VersionId?: null|string,
222
270
* SSECustomerAlgorithm?: null|string,
223
271
* SSECustomerKey?: null|string,
@@ -238,6 +286,12 @@ public function __construct(array $input = [])
238
286
$ this ->ifUnmodifiedSince = !isset ($ input ['IfUnmodifiedSince ' ]) ? null : ($ input ['IfUnmodifiedSince ' ] instanceof \DateTimeImmutable ? $ input ['IfUnmodifiedSince ' ] : new \DateTimeImmutable ($ input ['IfUnmodifiedSince ' ]));
239
287
$ this ->key = $ input ['Key ' ] ?? null ;
240
288
$ this ->range = $ input ['Range ' ] ?? null ;
289
+ $ this ->responseCacheControl = $ input ['ResponseCacheControl ' ] ?? null ;
290
+ $ this ->responseContentDisposition = $ input ['ResponseContentDisposition ' ] ?? null ;
291
+ $ this ->responseContentEncoding = $ input ['ResponseContentEncoding ' ] ?? null ;
292
+ $ this ->responseContentLanguage = $ input ['ResponseContentLanguage ' ] ?? null ;
293
+ $ this ->responseContentType = $ input ['ResponseContentType ' ] ?? null ;
294
+ $ this ->responseExpires = !isset ($ input ['ResponseExpires ' ]) ? null : ($ input ['ResponseExpires ' ] instanceof \DateTimeImmutable ? $ input ['ResponseExpires ' ] : new \DateTimeImmutable ($ input ['ResponseExpires ' ]));
241
295
$ this ->versionId = $ input ['VersionId ' ] ?? null ;
242
296
$ this ->sseCustomerAlgorithm = $ input ['SSECustomerAlgorithm ' ] ?? null ;
243
297
$ this ->sseCustomerKey = $ input ['SSECustomerKey ' ] ?? null ;
@@ -258,6 +312,12 @@ public function __construct(array $input = [])
258
312
* IfUnmodifiedSince?: null|\DateTimeImmutable|string,
259
313
* Key?: string,
260
314
* Range?: null|string,
315
+ * ResponseCacheControl?: null|string,
316
+ * ResponseContentDisposition?: null|string,
317
+ * ResponseContentEncoding?: null|string,
318
+ * ResponseContentLanguage?: null|string,
319
+ * ResponseContentType?: null|string,
320
+ * ResponseExpires?: null|\DateTimeImmutable|string,
261
321
* VersionId?: null|string,
262
322
* SSECustomerAlgorithm?: null|string,
263
323
* SSECustomerKey?: null|string,
@@ -335,6 +395,36 @@ public function getRequestPayer(): ?string
335
395
return $ this ->requestPayer ;
336
396
}
337
397
398
+ public function getResponseCacheControl (): ?string
399
+ {
400
+ return $ this ->responseCacheControl ;
401
+ }
402
+
403
+ public function getResponseContentDisposition (): ?string
404
+ {
405
+ return $ this ->responseContentDisposition ;
406
+ }
407
+
408
+ public function getResponseContentEncoding (): ?string
409
+ {
410
+ return $ this ->responseContentEncoding ;
411
+ }
412
+
413
+ public function getResponseContentLanguage (): ?string
414
+ {
415
+ return $ this ->responseContentLanguage ;
416
+ }
417
+
418
+ public function getResponseContentType (): ?string
419
+ {
420
+ return $ this ->responseContentType ;
421
+ }
422
+
423
+ public function getResponseExpires (): ?\DateTimeImmutable
424
+ {
425
+ return $ this ->responseExpires ;
426
+ }
427
+
338
428
public function getSseCustomerAlgorithm (): ?string
339
429
{
340
430
return $ this ->sseCustomerAlgorithm ;
@@ -404,6 +494,24 @@ public function request(): Request
404
494
405
495
// Prepare query
406
496
$ query = [];
497
+ if (null !== $ this ->responseCacheControl ) {
498
+ $ query ['response-cache-control ' ] = $ this ->responseCacheControl ;
499
+ }
500
+ if (null !== $ this ->responseContentDisposition ) {
501
+ $ query ['response-content-disposition ' ] = $ this ->responseContentDisposition ;
502
+ }
503
+ if (null !== $ this ->responseContentEncoding ) {
504
+ $ query ['response-content-encoding ' ] = $ this ->responseContentEncoding ;
505
+ }
506
+ if (null !== $ this ->responseContentLanguage ) {
507
+ $ query ['response-content-language ' ] = $ this ->responseContentLanguage ;
508
+ }
509
+ if (null !== $ this ->responseContentType ) {
510
+ $ query ['response-content-type ' ] = $ this ->responseContentType ;
511
+ }
512
+ if (null !== $ this ->responseExpires ) {
513
+ $ query ['response-expires ' ] = $ this ->responseExpires ->setTimezone (new \DateTimeZone ('GMT ' ))->format (\DateTimeInterface::RFC7231 );
514
+ }
407
515
if (null !== $ this ->versionId ) {
408
516
$ query ['versionId ' ] = $ this ->versionId ;
409
517
}
@@ -513,6 +621,48 @@ public function setRequestPayer(?string $value): self
513
621
return $ this ;
514
622
}
515
623
624
+ public function setResponseCacheControl (?string $ value ): self
625
+ {
626
+ $ this ->responseCacheControl = $ value ;
627
+
628
+ return $ this ;
629
+ }
630
+
631
+ public function setResponseContentDisposition (?string $ value ): self
632
+ {
633
+ $ this ->responseContentDisposition = $ value ;
634
+
635
+ return $ this ;
636
+ }
637
+
638
+ public function setResponseContentEncoding (?string $ value ): self
639
+ {
640
+ $ this ->responseContentEncoding = $ value ;
641
+
642
+ return $ this ;
643
+ }
644
+
645
+ public function setResponseContentLanguage (?string $ value ): self
646
+ {
647
+ $ this ->responseContentLanguage = $ value ;
648
+
649
+ return $ this ;
650
+ }
651
+
652
+ public function setResponseContentType (?string $ value ): self
653
+ {
654
+ $ this ->responseContentType = $ value ;
655
+
656
+ return $ this ;
657
+ }
658
+
659
+ public function setResponseExpires (?\DateTimeImmutable $ value ): self
660
+ {
661
+ $ this ->responseExpires = $ value ;
662
+
663
+ return $ this ;
664
+ }
665
+
516
666
public function setSseCustomerAlgorithm (?string $ value ): self
517
667
{
518
668
$ this ->sseCustomerAlgorithm = $ value ;
0 commit comments