Skip to content

Commit 70e092e

Browse files
committed
refine object params
1 parent 8bada8f commit 70e092e

13 files changed

+520
-23
lines changed

src/Models/AppendObjectRequest.php

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,14 @@ final class AppendObjectRequest extends RequestModel
3939
*/
4040
public ?string $acl;
4141

42+
/**
43+
* The access control list (ACL) of the object. Default value: default. Valid values:- default: The ACL of the object is the same as that of the bucket in which the object is stored. - private: The ACL of the object is private. Only the owner of the object and authorized users can read and write this object. - public-read: The ACL of the object is public-read. Only the owner of the object and authorized users can read and write this object. Other users can only read the object. Exercise caution when you set the object ACL to this value. - public-read-write: The ACL of the object is public-read-write. All users can read and write this object. Exercise caution when you set the object ACL to this value. For more information about the ACL, see [ACL](~~100676~~).
44+
* Sees ObjectACLType for supported values.
45+
* It is the normalized name of x-oss-object-acl.
46+
* @var string|null
47+
*/
48+
public ?string $objectAcl;
49+
4250
/**
4351
* The storage class of the object that you want to upload. Valid values:- Standard- IA- ArchiveIf you specify the object storage class when you upload an object, the storage class of the uploaded object is the specified value regardless of the storage class of the bucket to which the object is uploaded. If you set x-oss-storage-class to Standard when you upload an object to an IA bucket, the object is stored as a Standard object. For more information about storage classes, see the "Overview" topic in Developer Guide. notice The value that you specify takes effect only when you call the AppendObject operation on an object for the first time.
4452
* Sees StorageClassType for supported values.
@@ -178,6 +186,7 @@ final class AppendObjectRequest extends RequestModel
178186
* @param \Psr\Http\Message\StreamInterface|null $body The request body.
179187
* @param callable|null $progressFn Progress callback function
180188
* @param array|null $options
189+
* @param string|null $objectAcl The access control list (ACL) of the object.
181190
*/
182191
public function __construct(
183192
?string $bucket = null,
@@ -202,7 +211,8 @@ public function __construct(
202211
?string $requestPayer = null,
203212
?\Psr\Http\Message\StreamInterface $body = null,
204213
?callable $progressFn = null,
205-
?array $options = null
214+
?array $options = null,
215+
?string $objectAcl = null
206216
)
207217
{
208218
$this->bucket = $bucket;
@@ -228,5 +238,8 @@ public function __construct(
228238
$this->body = $body;
229239
$this->progressFn = $progressFn;
230240
parent::__construct($options);
241+
if (isset($objectAcl)) {
242+
$this->acl = $objectAcl;
243+
}
231244
}
232245
}

src/Models/CompleteMultipartUploadRequest.php

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,13 @@ final class CompleteMultipartUploadRequest extends RequestModel
3737
*/
3838
public ?string $acl;
3939

40+
/**
41+
* The access control list (ACL) of the object.
42+
* It is the normalized name of x-oss-object-acl.
43+
* @var string|null
44+
*/
45+
public ?string $objectAcl;
46+
4047
/**
4148
* The request body schema.
4249
* @var CompleteMultipartUpload|null
@@ -94,6 +101,7 @@ final class CompleteMultipartUploadRequest extends RequestModel
94101
* @param string|null $encodingType The encoding type of the object name in the response.
95102
* @param string|null $requestPayer To indicate that the requester is aware that the request and data download will incur costs
96103
* @param array|null $options
104+
* @param string|null $objectAcl The access control list (ACL) of the object.
97105
*/
98106
public function __construct(
99107
?string $bucket = null,
@@ -107,7 +115,8 @@ public function __construct(
107115
?bool $forbidOverwrite = null,
108116
?string $encodingType = null,
109117
?string $requestPayer = null,
110-
?array $options = null
118+
?array $options = null,
119+
?string $objectAcl = null,
111120
)
112121
{
113122
$this->bucket = $bucket;
@@ -122,5 +131,8 @@ public function __construct(
122131
$this->encodingType = $encodingType;
123132
$this->requestPayer = $requestPayer;
124133
parent::__construct($options);
134+
if (isset($objectAcl)) {
135+
$this->acl = $objectAcl;
136+
}
125137
}
126138
}

src/Models/CopyObjectRequest.php

Lines changed: 62 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,31 +49,67 @@ final class CopyObjectRequest extends RequestModel
4949
*/
5050
public ?string $ifMatch;
5151

52+
/**
53+
* The object copy condition. If the ETag value of the source object is the same as the ETag value that you specify in the request, OSS copies the object and returns 200 OK. By default, this header is left empty.
54+
* It is the normalized name of x-oss-copy-source-if-match.
55+
* @var string|null
56+
*/
57+
public ?string $copySourceIfMatch;
58+
5259
/**
5360
* The object transfer condition. If the input ETag value does not match the ETag value of the object, the system transfers the object normally and returns 200 OK. Otherwise, OSS returns 304 Not Modified.brDefault value: null
5461
* @var string|null
5562
*/
5663
public ?string $ifNoneMatch;
5764

65+
/**
66+
* The object copy condition. If the ETag value of the source object is different from the ETag value that you specify in the request, OSS copies the object and returns 200 OK. By default, this header is left empty.
67+
* It is the normalized name of x-oss-copy-source-if-none-match.
68+
* @var string|null
69+
*/
70+
public ?string $copySourceIfNoneMatch;
71+
5872
/**
5973
* The object transfer condition. If the specified time is earlier than the actual modified time of the object, the system transfers the object normally and returns 200 OK. Otherwise, OSS returns 304 Not Modified.brDefault value: nullbrTime format: ddd, dd MMM yyyy HH:mm:ss GMT. Example: Fri, 13 Nov 2015 14:47:53 GMT.
6074
* @var string|null
6175
*/
6276
public ?string $ifModifiedSince;
6377

78+
/**
79+
* If the source object is modified after the time that you specify in the request, OSS copies the object. By default, this header is left empty.
80+
* It is the normalized name of x-oss-copy-source-if-modified-since.
81+
* @var string|null
82+
*/
83+
public ?string $copySourceIfModifiedSince;
84+
6485
/**
6586
* The object transfer condition. If the specified time is the same as or later than the actual modified time of the object, OSS transfers the object normally and returns 200 OK. Otherwise, OSS returns 412 Precondition Failed.brDefault value: null
6687
* @var string|null
6788
*/
6889
public ?string $ifUnmodifiedSince;
6990

91+
/**
92+
* The object copy condition. If the time that you specify in the request is the same as or later than the modification time of the object, OSS copies the object and returns 200 OK. By default, this header is left empty.
93+
* It is the normalized name of x-oss-copy-source-if-unmodified-since.
94+
* @var string|null
95+
*/
96+
public ?string $copySourceIfUnmodifiedSince;
97+
7098
/**
7199
* The access control list (ACL) of the destination object when the object is created. Default value: default.Valid values:* default: The ACL of the object is the same as the ACL of the bucket in which the object is stored.* private: The ACL of the object is private. Only the owner of the object and authorized users have read and write permissions on the object. Other users do not have permissions on the object.* public-read: The ACL of the object is public-read. Only the owner of the object and authorized users have read and write permissions on the object. Other users have only read permissions on the object. Exercise caution when you set the ACL of the bucket to this value.* public-read-write: The ACL of the object is public-read-write. All users have read and write permissions on the object. Exercise caution when you set the ACL of the bucket to this value.For more information about ACLs, see [Object ACL](~~100676~~).
72100
* Sees ObjectACLType for supported values.
73101
* @var string|null
74102
*/
75103
public ?string $acl;
76104

105+
/**
106+
* The access control list (ACL) of the object. Default value: default. Valid values:- default: The ACL of the object is the same as that of the bucket in which the object is stored. - private: The ACL of the object is private. Only the owner of the object and authorized users can read and write this object. - public-read: The ACL of the object is public-read. Only the owner of the object and authorized users can read and write this object. Other users can only read the object. Exercise caution when you set the object ACL to this value. - public-read-write: The ACL of the object is public-read-write. All users can read and write this object. Exercise caution when you set the object ACL to this value. For more information about the ACL, see [ACL](~~100676~~).
107+
* Sees ObjectACLType for supported values.
108+
* It is the normalized name of x-oss-object-acl.
109+
* @var string|null
110+
*/
111+
public ?string $objectAcl;
112+
77113
/**
78114
* The storage class of the object that you want to upload. Default value: Standard. If you specify a storage class when you upload the object, the storage class applies regardless of the storage class of the bucket to which you upload the object. For example, if you set **x-oss-storage-class** to Standard when you upload an object to an IA bucket, the storage class of the uploaded object is Standard.Valid values:* Standard* IA* Archive* ColdArchiveFor more information about storage classes, see [Overview](~~51374~~).
79115
* Sees StorageClassType for supported values.
@@ -221,6 +257,11 @@ final class CopyObjectRequest extends RequestModel
221257
* @param string|null $requestPayer To indicate that the requester is aware that the request and data download will incur costs.
222258
* @param callable|null $progressFn Progress callback function, it works in Copier.Copy only.
223259
* @param array|null $options
260+
* @param string|null $objectAcl The access control list (ACL) of the object.
261+
* @param string|null $copySourceIfMatch The object copy condition.
262+
* @param string|null $copySourceIfNoneMatch The object copy condition.
263+
* @param string|null $copySourceIfModifiedSince The object copy condition.
264+
* @param string|null $copySourceIfUnmodifiedSince If the source object is modified after the time that you specify in the request, OSS copies the object.
224265
*/
225266
public function __construct(
226267
?string $bucket = null,
@@ -252,7 +293,12 @@ public function __construct(
252293
?int $trafficLimit = null,
253294
?string $requestPayer = null,
254295
?callable $progressFn = null,
255-
?array $options = null
296+
?array $options = null,
297+
?string $objectAcl = null,
298+
?string $copySourceIfMatch = null,
299+
?string $copySourceIfNoneMatch = null,
300+
?string $copySourceIfModifiedSince = null,
301+
?string $copySourceIfUnmodifiedSince = null
256302
)
257303
{
258304
$this->bucket = $bucket;
@@ -285,5 +331,20 @@ public function __construct(
285331
$this->requestPayer = $requestPayer;
286332
$this->progressFn = $progressFn;
287333
parent::__construct($options);
334+
if (isset($objectAcl)) {
335+
$this->acl = $objectAcl;
336+
}
337+
if (isset($copySourceIfMatch)) {
338+
$this->ifMatch = $copySourceIfMatch;
339+
}
340+
if (isset($copySourceIfNoneMatch)) {
341+
$this->ifNoneMatch = $copySourceIfNoneMatch;
342+
}
343+
if (isset($copySourceIfModifiedSince)) {
344+
$this->ifModifiedSince = $copySourceIfModifiedSince;
345+
}
346+
if (isset($copySourceIfUnmodifiedSince)) {
347+
$this->ifUnmodifiedSince = $copySourceIfUnmodifiedSince;
348+
}
288349
}
289350
}

src/Models/GetObjectMetaResult.php

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
final class GetObjectMetaResult extends ResultModel
1515
{
1616
/**
17-
* Size of the body in bytes.
17+
* Size of the body in bytes.
1818
* @var int|null
1919
*/
2020
public ?int $contentLength;
@@ -25,6 +25,13 @@ final class GetObjectMetaResult extends ResultModel
2525
*/
2626
public ?string $etag;
2727

28+
/**
29+
* The entity tag (ETag). An ETag is created when an object is created to identify the content of the object.
30+
* It is the normalized name of ETag.
31+
* @var string|null
32+
*/
33+
public ?string $eTag;
34+
2835
/**
2936
* The time when the returned objects were last modified.
3037
* @var \DateTime|null
@@ -55,14 +62,26 @@ final class GetObjectMetaResult extends ResultModel
5562
*/
5663
public ?\DateTime $transitionTime;
5764

65+
/**
66+
* GetObjectMetaResult constructor.
67+
* @param int|null $contentLength Size of the body in bytes.
68+
* @param string|null $etag The entity tag (ETag).
69+
* @param \DateTime|null $lastModified The time when the returned objects were last modified.
70+
* @param string|null $hashCrc64 The 64-bit CRC value of the object. This value is calculated based on the ECMA-182 standard.
71+
* @param string|null $versionId Version of the object.
72+
* @param \DateTime|null $lastAccessTime The time when the object was last accessed.
73+
* @param \DateTime|null $transitionTime The time when the storage class of the object is converted to Cold Archive or Deep Cold Archive based on lifecycle rules.
74+
* @param string|null $eTag The entity tag (ETag).
75+
*/
5876
public function __construct(
5977
?int $contentLength = null,
6078
?string $etag = null,
6179
?\DateTime $lastModified = null,
6280
?string $hashCrc64 = null,
6381
?string $versionId = null,
6482
?\DateTime $lastAccessTime = null,
65-
?\DateTime $transitionTime = null
83+
?\DateTime $transitionTime = null,
84+
?string $eTag = null
6685
)
6786
{
6887
$this->contentLength = $contentLength;
@@ -72,5 +91,6 @@ public function __construct(
7291
$this->versionId = $versionId;
7392
$this->lastAccessTime = $lastAccessTime;
7493
$this->transitionTime = $transitionTime;
94+
$this->eTag = $eTag;
7595
}
7696
}

src/Models/GetObjectResult.php

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,13 @@ final class GetObjectResult extends ResultModel
3737
*/
3838
public ?string $etag;
3939

40+
/**
41+
* The entity tag (ETag). An ETag is created when an object is created to identify the content of the object.
42+
* It is the normalized name of ETag.
43+
* @var string|null
44+
*/
45+
public ?string $eTag;
46+
4047
/**
4148
* The time when the returned objects were last modified.
4249
* @var \DateTime|null
@@ -199,6 +206,7 @@ final class GetObjectResult extends ResultModel
199206
* @param string|null $processStatus The result of an event notification that is triggered for the object.
200207
* @param bool|null $deleteMarker Specifies whether the object retrieved was (true) or was not (false) a Delete Marker.
201208
* @param \Psr\Http\Message\StreamInterface|null $body Object data.
209+
* @param string|null $eTag The entity tag (ETag).
202210
*/
203211
public function __construct(
204212
?int $contentLength = null,
@@ -225,7 +233,8 @@ public function __construct(
225233
?string $restore = null,
226234
?string $processStatus = null,
227235
?bool $deleteMarker = null,
228-
?\Psr\Http\Message\StreamInterface $body = null
236+
?\Psr\Http\Message\StreamInterface $body = null,
237+
?string $eTag = null,
229238
)
230239
{
231240
$this->contentLength = $contentLength;
@@ -253,5 +262,6 @@ public function __construct(
253262
$this->processStatus = $processStatus;
254263
$this->deleteMarker = $deleteMarker;
255264
$this->body = $body;
265+
$this->eTag = $eTag;
256266
}
257267
}

src/Models/PutObjectAclRequest.php

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,14 @@ final class PutObjectAclRequest extends RequestModel
3232
*/
3333
public ?string $acl;
3434

35+
/**
36+
* The access control list (ACL) of the object. Default value: default. Valid values:- default: The ACL of the object is the same as that of the bucket in which the object is stored. - private: The ACL of the object is private. Only the owner of the object and authorized users can read and write this object. - public-read: The ACL of the object is public-read. Only the owner of the object and authorized users can read and write this object. Other users can only read the object. Exercise caution when you set the object ACL to this value. - public-read-write: The ACL of the object is public-read-write. All users can read and write this object. Exercise caution when you set the object ACL to this value. For more information about the ACL, see [ACL](~~100676~~).
37+
* Sees ObjectACLType for supported values.
38+
* It is the normalized name of x-oss-object-acl.
39+
* @var string|null
40+
*/
41+
public ?string $objectAcl;
42+
3543
/**
3644
* The version id of the object.
3745
* @var string|null
@@ -52,14 +60,16 @@ final class PutObjectAclRequest extends RequestModel
5260
* @param string|null $versionId The version id of the object.
5361
* @param string|null $requestPayer To indicate that the requester is aware that the request and data download will incur costs.
5462
* @param array|null $options
63+
* @param string|null $objectAcl The access control list (ACL) of the object.
5564
*/
5665
public function __construct(
5766
?string $bucket = null,
5867
?string $key = null,
5968
?string $acl = null,
6069
?string $versionId = null,
6170
?string $requestPayer = null,
62-
?array $options = null
71+
?array $options = null,
72+
?string $objectAcl = null
6373
)
6474
{
6575
$this->bucket = $bucket;
@@ -68,5 +78,8 @@ public function __construct(
6878
$this->versionId = $versionId;
6979
$this->requestPayer = $requestPayer;
7080
parent::__construct($options);
81+
if (isset($objectAcl)) {
82+
$this->acl = $objectAcl;
83+
}
7184
}
7285
}

src/Models/PutObjectRequest.php

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,14 @@ final class PutObjectRequest extends RequestModel
3232
*/
3333
public ?string $acl;
3434

35+
/**
36+
* The access control list (ACL) of the object. Default value: default. Valid values:- default: The ACL of the object is the same as that of the bucket in which the object is stored. - private: The ACL of the object is private. Only the owner of the object and authorized users can read and write this object. - public-read: The ACL of the object is public-read. Only the owner of the object and authorized users can read and write this object. Other users can only read the object. Exercise caution when you set the object ACL to this value. - public-read-write: The ACL of the object is public-read-write. All users can read and write this object. Exercise caution when you set the object ACL to this value. For more information about the ACL, see [ACL](~~100676~~).
37+
* Sees ObjectACLType for supported values.
38+
* It is the normalized name of x-oss-object-acl.
39+
* @var string|null
40+
*/
41+
public ?string $objectAcl;
42+
3543
/**
3644
* The storage class of the object. Default value: Standard. Valid values:- Standard- IA- Archive- ColdArchive
3745
* Sees StorageClassType for supported values.
@@ -195,6 +203,7 @@ final class PutObjectRequest extends RequestModel
195203
* @param \Psr\Http\Message\StreamInterface|null $body Object data.
196204
* @param callable|null $progressFn Progress callback function.
197205
* @param array|null $options
206+
* @param string|null $objectAcl The access control list (ACL) of the object.
198207
*/
199208
public function __construct(
200209
?string $bucket = null,
@@ -220,12 +229,13 @@ public function __construct(
220229
?string $requestPayer = null,
221230
?\Psr\Http\Message\StreamInterface $body = null,
222231
?callable $progressFn = null,
223-
?array $options = null
232+
?array $options = null,
233+
?string $objectAcl = null
224234
)
225235
{
226236
$this->bucket = $bucket;
227237
$this->key = $key;
228-
$this->acl = $acl;
238+
$this->objectAcl = $objectAcl;
229239
$this->storageClass = $storageClass;
230240
$this->metadata = $metadata;
231241
$this->cacheControl = $cacheControl;
@@ -247,5 +257,8 @@ public function __construct(
247257
$this->body = $body;
248258
$this->progressFn = $progressFn;
249259
parent::__construct($options);
260+
if (isset($objectAcl)) {
261+
$this->acl = $objectAcl;
262+
}
250263
}
251264
}

0 commit comments

Comments
 (0)