Skip to content

Commit a964891

Browse files
authored
normalize parameter naming
1 parent 335846a commit a964891

File tree

9 files changed

+248
-24
lines changed

9 files changed

+248
-24
lines changed

src/Models/AppendObjectRequest.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,7 @@ final class AppendObjectRequest extends RequestModel
178178
* @param \Psr\Http\Message\StreamInterface|null $body The request body.
179179
* @param callable|null $progressFn Progress callback function
180180
* @param array|null $options
181+
* @param string|null $objectAcl The access control list (ACL) of the object. The object acl parameter has the same functionality as the acl parameter. it is the standardized name for acl. If both exist simultaneously, the value of objectAcl will take precedence.
181182
*/
182183
public function __construct(
183184
?string $bucket = null,
@@ -202,13 +203,14 @@ public function __construct(
202203
?string $requestPayer = null,
203204
?\Psr\Http\Message\StreamInterface $body = null,
204205
?callable $progressFn = null,
205-
?array $options = null
206+
?array $options = null,
207+
?string $objectAcl = null
206208
)
207209
{
208210
$this->bucket = $bucket;
209211
$this->key = $key;
210212
$this->position = $position;
211-
$this->acl = $acl;
213+
$this->acl = $objectAcl ?? $acl;
212214
$this->storageClass = $storageClass;
213215
$this->metadata = $metadata;
214216
$this->cacheControl = $cacheControl;

src/Models/CompleteMultipartUploadRequest.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ final class CompleteMultipartUploadRequest extends RequestModel
9494
* @param string|null $encodingType The encoding type of the object name in the response.
9595
* @param string|null $requestPayer To indicate that the requester is aware that the request and data download will incur costs
9696
* @param array|null $options
97+
* @param string|null $objectAcl The access control list (ACL) of the object. The object acl parameter has the same functionality as the acl parameter. it is the standardized name for acl. If both exist simultaneously, the value of objectAcl will take precedence.
9798
*/
9899
public function __construct(
99100
?string $bucket = null,
@@ -107,13 +108,14 @@ public function __construct(
107108
?bool $forbidOverwrite = null,
108109
?string $encodingType = null,
109110
?string $requestPayer = null,
110-
?array $options = null
111+
?array $options = null,
112+
?string $objectAcl = null
111113
)
112114
{
113115
$this->bucket = $bucket;
114116
$this->key = $key;
115117
$this->uploadId = $uploadId;
116-
$this->acl = $acl;
118+
$this->acl = $objectAcl ?? $acl;
117119
$this->completeMultipartUpload = $completeMultipartUpload;
118120
$this->completeAll = $completeAll;
119121
$this->callback = $callback;

src/Models/CopyObjectRequest.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,7 @@ final class CopyObjectRequest extends RequestModel
221221
* @param string|null $requestPayer To indicate that the requester is aware that the request and data download will incur costs.
222222
* @param callable|null $progressFn Progress callback function, it works in Copier.Copy only.
223223
* @param array|null $options
224+
* @param string|null $objectAcl The access control list (ACL) of the object. The object acl parameter has the same functionality as the acl parameter. it is the standardized name for acl. If both exist simultaneously, the value of objectAcl will take precedence.
224225
*/
225226
public function __construct(
226227
?string $bucket = null,
@@ -252,7 +253,8 @@ public function __construct(
252253
?int $trafficLimit = null,
253254
?string $requestPayer = null,
254255
?callable $progressFn = null,
255-
?array $options = null
256+
?array $options = null,
257+
?string $objectAcl = null
256258
)
257259
{
258260
$this->bucket = $bucket;
@@ -264,7 +266,7 @@ public function __construct(
264266
$this->ifNoneMatch = $ifNoneMatch;
265267
$this->ifModifiedSince = $ifModifiedSince;
266268
$this->ifUnmodifiedSince = $ifUnmodifiedSince;
267-
$this->acl = $acl;
269+
$this->acl = $objectAcl ?? $acl;
268270
$this->storageClass = $storageClass;
269271
$this->metadata = $metadata;
270272
$this->cacheControl = $cacheControl;

src/Models/PutObjectAclRequest.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,19 +52,21 @@ final class PutObjectAclRequest extends RequestModel
5252
* @param string|null $versionId The version id of the object.
5353
* @param string|null $requestPayer To indicate that the requester is aware that the request and data download will incur costs.
5454
* @param array|null $options
55+
* @param string|null $objectAcl The access control list (ACL) of the object. The object acl parameter has the same functionality as the acl parameter. it is the standardized name for acl. If both exist simultaneously, the value of objectAcl will take precedence.
5556
*/
5657
public function __construct(
5758
?string $bucket = null,
5859
?string $key = null,
5960
?string $acl = null,
6061
?string $versionId = null,
6162
?string $requestPayer = null,
62-
?array $options = null
63+
?array $options = null,
64+
?string $objectAcl = null
6365
)
6466
{
6567
$this->bucket = $bucket;
6668
$this->key = $key;
67-
$this->acl = $acl;
69+
$this->acl = $objectAcl ?? $acl;
6870
$this->versionId = $versionId;
6971
$this->requestPayer = $requestPayer;
7072
parent::__construct($options);

src/Models/PutObjectRequest.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,7 @@ final class PutObjectRequest extends RequestModel
195195
* @param \Psr\Http\Message\StreamInterface|null $body Object data.
196196
* @param callable|null $progressFn Progress callback function.
197197
* @param array|null $options
198+
* @param string|null $objectAcl The access control list (ACL) of the object. The object acl parameter has the same functionality as the acl parameter. it is the standardized name for acl. If both exist simultaneously, the value of objectAcl will take precedence.
198199
*/
199200
public function __construct(
200201
?string $bucket = null,
@@ -220,12 +221,13 @@ public function __construct(
220221
?string $requestPayer = null,
221222
?\Psr\Http\Message\StreamInterface $body = null,
222223
?callable $progressFn = null,
223-
?array $options = null
224+
?array $options = null,
225+
?string $objectAcl = null
224226
)
225227
{
226228
$this->bucket = $bucket;
227229
$this->key = $key;
228-
$this->acl = $acl;
230+
$this->acl = $objectAcl ?? $acl;
229231
$this->storageClass = $storageClass;
230232
$this->metadata = $metadata;
231233
$this->cacheControl = $cacheControl;

src/Models/PutSymlinkRequest.php

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,8 @@ final class PutSymlinkRequest extends RequestModel
7777
* @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.
7878
* @param string|null $requestPayer To indicate that the requester is aware that the request and data download will incur costs.
7979
* @param array|null $options
80+
* @param string|null $objectAcl The access control list (ACL) of the object. The object acl parameter has the same functionality as the acl parameter. it is the standardized name for acl. If both exist simultaneously, the value of objectAcl will take precedence.
81+
* @param string|null $symlinkTarget The target object to which the symbolic link points. The symlinkTarget parameter has the same functionality as the target parameter. It is the normalized name of target. If both exist simultaneously, the value of symlinkTarget will take precedence.
8082
*/
8183
public function __construct(
8284
?string $bucket = null,
@@ -87,13 +89,15 @@ public function __construct(
8789
?array $metadata = null,
8890
?bool $forbidOverwrite = null,
8991
?string $requestPayer = null,
90-
?array $options = null
92+
?array $options = null,
93+
?string $objectAcl = null,
94+
?string $symlinkTarget = null
9195
)
9296
{
9397
$this->bucket = $bucket;
9498
$this->key = $key;
95-
$this->target = $target;
96-
$this->acl = $acl;
99+
$this->target = $symlinkTarget ?? $target;
100+
$this->acl = $objectAcl ?? $acl;
97101
$this->storageClass = $storageClass;
98102
$this->metadata = $metadata;
99103
$this->forbidOverwrite = $forbidOverwrite;

src/Models/UploadPart.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,18 +29,19 @@ final class UploadPart extends Model
2929
#[XmlElement(rename: 'ETag', type: 'string')]
3030
public ?string $etag;
3131

32-
3332
/**
3433
* UploadPart constructor.
3534
* @param int|null $partNumber The part number.
3635
* @param string|null $etag The ETag value that is returned by OSS after the part is uploaded.
36+
* @param string|null $eTag The ETag value that is returned by OSS after the part is uploaded. The eTag parameter has the same functionality as the etag parameter. It is the normalized name of etag. If both exist simultaneously, the value of eTag will take precedence. It is the normalized name of ETag.
3737
*/
3838
public function __construct(
3939
?int $partNumber = null,
40-
?string $etag = null
40+
?string $etag = null,
41+
?string $eTag = null
4142
)
4243
{
4344
$this->partNumber = $partNumber;
44-
$this->etag = $etag;
45+
$this->etag = $eTag ?? $etag;
4546
}
4647
}

0 commit comments

Comments
 (0)