Skip to content

Commit 916ca74

Browse files
committed
refine object params
1 parent 8bada8f commit 916ca74

File tree

11 files changed

+485
-20
lines changed

11 files changed

+485
-20
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/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
}

src/Models/PutSymlinkRequest.php

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,31 @@ final class PutSymlinkRequest extends RequestModel
3434
*/
3535
public ?string $target;
3636

37+
/**
38+
* The target object to which the symbolic link points.
39+
* The naming conventions for target objects are the same as those for objects.
40+
* - Similar to ObjectName, TargetObjectName must be URL-encoded.
41+
* - The target object to which a symbolic link points cannot be a symbolic link.
42+
* It is the normalized name of x-oss-symlink-target.
43+
* @var string|null
44+
*/
45+
public ?string $symlinkTarget;
46+
3747
/**
3848
* 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~~).
3949
* Sees ObjectACLType for supported values.
4050
* @var string|null
4151
*/
4252
public ?string $acl;
4353

54+
/**
55+
* 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~~).
56+
* Sees ObjectACLType for supported values.
57+
* It is the normalized name of x-oss-object-acl.
58+
* @var string|null
59+
*/
60+
public ?string $objectAcl;
61+
4462
/**
4563
* The storage class of the bucket. Default value: Standard. Valid values:- Standard- IA- Archive- ColdArchive
4664
* Sees StorageClassType for supported values.
@@ -77,6 +95,8 @@ final class PutSymlinkRequest extends RequestModel
7795
* @param bool|null $forbidOverwrite Specifies whether the PutSymlink operation overwrites the object that has the same name as that of the symbolic link you want to create.
7896
* @param string|null $requestPayer To indicate that the requester is aware that the request and data download will incur costs.
7997
* @param array|null $options
98+
* @param string|null $objectAcl The ACL of the object.
99+
* @param string|null $symlinkTarget The target object to which the symbolic link points.
80100
*/
81101
public function __construct(
82102
?string $bucket = null,
@@ -87,7 +107,9 @@ public function __construct(
87107
?array $metadata = null,
88108
?bool $forbidOverwrite = null,
89109
?string $requestPayer = null,
90-
?array $options = null
110+
?array $options = null,
111+
?string $objectAcl = null,
112+
?string $symlinkTarget = null,
91113
)
92114
{
93115
$this->bucket = $bucket;
@@ -99,5 +121,11 @@ public function __construct(
99121
$this->forbidOverwrite = $forbidOverwrite;
100122
$this->requestPayer = $requestPayer;
101123
parent::__construct($options);
124+
if (isset($objectAcl)) {
125+
$this->acl = $objectAcl;
126+
}
127+
if (isset($symlinkTarget)) {
128+
$this->symlinkTarget = $symlinkTarget;
129+
}
102130
}
103131
}

0 commit comments

Comments
 (0)