Skip to content

Commit a5d3971

Browse files
authored
Uncapitalize objects's property (#925)
* Uncapitalize objects's property * Add changelog * Improve lowercase naming * Rename sseKms to sseKms * Normalize Methods and Classes
1 parent ba1e106 commit a5d3971

10 files changed

+170
-149
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
### Added
66

7+
- Changed case of object's properties to camelCase.
78
- Added documentation in class's headers.
89

910
## 1.8.0

src/Sts/Input/AssumeRoleRequest.php

Lines changed: 50 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ final class AssumeRoleRequest extends Input
1818
*
1919
* @var string|null
2020
*/
21-
private $RoleArn;
21+
private $roleArn;
2222

2323
/**
2424
* An identifier for the assumed role session.
@@ -27,22 +27,22 @@ final class AssumeRoleRequest extends Input
2727
*
2828
* @var string|null
2929
*/
30-
private $RoleSessionName;
30+
private $roleSessionName;
3131

3232
/**
3333
* The Amazon Resource Names (ARNs) of the IAM managed policies that you want to use as managed session policies. The
3434
* policies must exist in the same account as the role.
3535
*
3636
* @var PolicyDescriptorType[]|null
3737
*/
38-
private $PolicyArns;
38+
private $policyArns;
3939

4040
/**
4141
* An IAM policy in JSON format that you want to use as an inline session policy.
4242
*
4343
* @var string|null
4444
*/
45-
private $Policy;
45+
private $policy;
4646

4747
/**
4848
* The duration, in seconds, of the role session. The value can range from 900 seconds (15 minutes) up to the maximum
@@ -55,7 +55,7 @@ final class AssumeRoleRequest extends Input
5555
*
5656
* @var int|null
5757
*/
58-
private $DurationSeconds;
58+
private $durationSeconds;
5959

6060
/**
6161
* A list of session tags that you want to pass. Each session tag consists of a key name and an associated value. For
@@ -65,7 +65,7 @@ final class AssumeRoleRequest extends Input
6565
*
6666
* @var Tag[]|null
6767
*/
68-
private $Tags;
68+
private $tags;
6969

7070
/**
7171
* A list of keys for session tags that you want to set as transitive. If you set a tag key as transitive, the
@@ -76,7 +76,7 @@ final class AssumeRoleRequest extends Input
7676
*
7777
* @var string[]|null
7878
*/
79-
private $TransitiveTagKeys;
79+
private $transitiveTagKeys;
8080

8181
/**
8282
* A unique identifier that might be required when you assume a role in another account. If the administrator of the
@@ -91,7 +91,7 @@ final class AssumeRoleRequest extends Input
9191
*
9292
* @var string|null
9393
*/
94-
private $ExternalId;
94+
private $externalId;
9595

9696
/**
9797
* The identification number of the MFA device that is associated with the user who is making the `AssumeRole` call.
@@ -101,7 +101,7 @@ final class AssumeRoleRequest extends Input
101101
*
102102
* @var string|null
103103
*/
104-
private $SerialNumber;
104+
private $serialNumber;
105105

106106
/**
107107
* The value provided by the MFA device, if the trust policy of the role being assumed requires MFA (that is, if the
@@ -110,7 +110,7 @@ final class AssumeRoleRequest extends Input
110110
*
111111
* @var string|null
112112
*/
113-
private $TokenCode;
113+
private $tokenCode;
114114

115115
/**
116116
* @param array{
@@ -129,16 +129,16 @@ final class AssumeRoleRequest extends Input
129129
*/
130130
public function __construct(array $input = [])
131131
{
132-
$this->RoleArn = $input['RoleArn'] ?? null;
133-
$this->RoleSessionName = $input['RoleSessionName'] ?? null;
134-
$this->PolicyArns = isset($input['PolicyArns']) ? array_map([PolicyDescriptorType::class, 'create'], $input['PolicyArns']) : null;
135-
$this->Policy = $input['Policy'] ?? null;
136-
$this->DurationSeconds = $input['DurationSeconds'] ?? null;
137-
$this->Tags = isset($input['Tags']) ? array_map([Tag::class, 'create'], $input['Tags']) : null;
138-
$this->TransitiveTagKeys = $input['TransitiveTagKeys'] ?? null;
139-
$this->ExternalId = $input['ExternalId'] ?? null;
140-
$this->SerialNumber = $input['SerialNumber'] ?? null;
141-
$this->TokenCode = $input['TokenCode'] ?? null;
132+
$this->roleArn = $input['RoleArn'] ?? null;
133+
$this->roleSessionName = $input['RoleSessionName'] ?? null;
134+
$this->policyArns = isset($input['PolicyArns']) ? array_map([PolicyDescriptorType::class, 'create'], $input['PolicyArns']) : null;
135+
$this->policy = $input['Policy'] ?? null;
136+
$this->durationSeconds = $input['DurationSeconds'] ?? null;
137+
$this->tags = isset($input['Tags']) ? array_map([Tag::class, 'create'], $input['Tags']) : null;
138+
$this->transitiveTagKeys = $input['TransitiveTagKeys'] ?? null;
139+
$this->externalId = $input['ExternalId'] ?? null;
140+
$this->serialNumber = $input['SerialNumber'] ?? null;
141+
$this->tokenCode = $input['TokenCode'] ?? null;
142142
parent::__construct($input);
143143
}
144144

@@ -149,61 +149,61 @@ public static function create($input): self
149149

150150
public function getDurationSeconds(): ?int
151151
{
152-
return $this->DurationSeconds;
152+
return $this->durationSeconds;
153153
}
154154

155155
public function getExternalId(): ?string
156156
{
157-
return $this->ExternalId;
157+
return $this->externalId;
158158
}
159159

160160
public function getPolicy(): ?string
161161
{
162-
return $this->Policy;
162+
return $this->policy;
163163
}
164164

165165
/**
166166
* @return PolicyDescriptorType[]
167167
*/
168168
public function getPolicyArns(): array
169169
{
170-
return $this->PolicyArns ?? [];
170+
return $this->policyArns ?? [];
171171
}
172172

173173
public function getRoleArn(): ?string
174174
{
175-
return $this->RoleArn;
175+
return $this->roleArn;
176176
}
177177

178178
public function getRoleSessionName(): ?string
179179
{
180-
return $this->RoleSessionName;
180+
return $this->roleSessionName;
181181
}
182182

183183
public function getSerialNumber(): ?string
184184
{
185-
return $this->SerialNumber;
185+
return $this->serialNumber;
186186
}
187187

188188
/**
189189
* @return Tag[]
190190
*/
191191
public function getTags(): array
192192
{
193-
return $this->Tags ?? [];
193+
return $this->tags ?? [];
194194
}
195195

196196
public function getTokenCode(): ?string
197197
{
198-
return $this->TokenCode;
198+
return $this->tokenCode;
199199
}
200200

201201
/**
202202
* @return string[]
203203
*/
204204
public function getTransitiveTagKeys(): array
205205
{
206-
return $this->TransitiveTagKeys ?? [];
206+
return $this->transitiveTagKeys ?? [];
207207
}
208208

209209
/**
@@ -229,21 +229,21 @@ public function request(): Request
229229

230230
public function setDurationSeconds(?int $value): self
231231
{
232-
$this->DurationSeconds = $value;
232+
$this->durationSeconds = $value;
233233

234234
return $this;
235235
}
236236

237237
public function setExternalId(?string $value): self
238238
{
239-
$this->ExternalId = $value;
239+
$this->externalId = $value;
240240

241241
return $this;
242242
}
243243

244244
public function setPolicy(?string $value): self
245245
{
246-
$this->Policy = $value;
246+
$this->policy = $value;
247247

248248
return $this;
249249
}
@@ -253,28 +253,28 @@ public function setPolicy(?string $value): self
253253
*/
254254
public function setPolicyArns(array $value): self
255255
{
256-
$this->PolicyArns = $value;
256+
$this->policyArns = $value;
257257

258258
return $this;
259259
}
260260

261261
public function setRoleArn(?string $value): self
262262
{
263-
$this->RoleArn = $value;
263+
$this->roleArn = $value;
264264

265265
return $this;
266266
}
267267

268268
public function setRoleSessionName(?string $value): self
269269
{
270-
$this->RoleSessionName = $value;
270+
$this->roleSessionName = $value;
271271

272272
return $this;
273273
}
274274

275275
public function setSerialNumber(?string $value): self
276276
{
277-
$this->SerialNumber = $value;
277+
$this->serialNumber = $value;
278278

279279
return $this;
280280
}
@@ -284,14 +284,14 @@ public function setSerialNumber(?string $value): self
284284
*/
285285
public function setTags(array $value): self
286286
{
287-
$this->Tags = $value;
287+
$this->tags = $value;
288288

289289
return $this;
290290
}
291291

292292
public function setTokenCode(?string $value): self
293293
{
294-
$this->TokenCode = $value;
294+
$this->tokenCode = $value;
295295

296296
return $this;
297297
}
@@ -301,23 +301,23 @@ public function setTokenCode(?string $value): self
301301
*/
302302
public function setTransitiveTagKeys(array $value): self
303303
{
304-
$this->TransitiveTagKeys = $value;
304+
$this->transitiveTagKeys = $value;
305305

306306
return $this;
307307
}
308308

309309
private function requestBody(): array
310310
{
311311
$payload = [];
312-
if (null === $v = $this->RoleArn) {
312+
if (null === $v = $this->roleArn) {
313313
throw new InvalidArgument(sprintf('Missing parameter "RoleArn" for "%s". The value cannot be null.', __CLASS__));
314314
}
315315
$payload['RoleArn'] = $v;
316-
if (null === $v = $this->RoleSessionName) {
316+
if (null === $v = $this->roleSessionName) {
317317
throw new InvalidArgument(sprintf('Missing parameter "RoleSessionName" for "%s". The value cannot be null.', __CLASS__));
318318
}
319319
$payload['RoleSessionName'] = $v;
320-
if (null !== $v = $this->PolicyArns) {
320+
if (null !== $v = $this->policyArns) {
321321
$index = 0;
322322
foreach ($v as $mapValue) {
323323
++$index;
@@ -326,13 +326,13 @@ private function requestBody(): array
326326
}
327327
}
328328
}
329-
if (null !== $v = $this->Policy) {
329+
if (null !== $v = $this->policy) {
330330
$payload['Policy'] = $v;
331331
}
332-
if (null !== $v = $this->DurationSeconds) {
332+
if (null !== $v = $this->durationSeconds) {
333333
$payload['DurationSeconds'] = $v;
334334
}
335-
if (null !== $v = $this->Tags) {
335+
if (null !== $v = $this->tags) {
336336
$index = 0;
337337
foreach ($v as $mapValue) {
338338
++$index;
@@ -341,20 +341,20 @@ private function requestBody(): array
341341
}
342342
}
343343
}
344-
if (null !== $v = $this->TransitiveTagKeys) {
344+
if (null !== $v = $this->transitiveTagKeys) {
345345
$index = 0;
346346
foreach ($v as $mapValue) {
347347
++$index;
348348
$payload["TransitiveTagKeys.member.$index"] = $mapValue;
349349
}
350350
}
351-
if (null !== $v = $this->ExternalId) {
351+
if (null !== $v = $this->externalId) {
352352
$payload['ExternalId'] = $v;
353353
}
354-
if (null !== $v = $this->SerialNumber) {
354+
if (null !== $v = $this->serialNumber) {
355355
$payload['SerialNumber'] = $v;
356356
}
357-
if (null !== $v = $this->TokenCode) {
357+
if (null !== $v = $this->tokenCode) {
358358
$payload['TokenCode'] = $v;
359359
}
360360

0 commit comments

Comments
 (0)