Skip to content

Commit 419e456

Browse files
Update generated code (#1799)
update generated code
1 parent fb0b909 commit 419e456

19 files changed

+501
-1
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
## NOT RELEASED
44

5+
### Added
6+
7+
- AWS api-change: This release includes supports the new WarmThroughput feature for DynamoDB. You can now provide an optional WarmThroughput attribute for CreateTable or UpdateTable APIs to pre-warm your table or global secondary index. You can also use DescribeTable to see the latest WarmThroughput value.
8+
59
### Changed
610

711
- use strict comparison `null !==` instead of `!`

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
},
3333
"extra": {
3434
"branch-alias": {
35-
"dev-master": "3.2-dev"
35+
"dev-master": "3.3-dev"
3636
}
3737
}
3838
}

src/DynamoDbClient.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@
8282
use AsyncAws\DynamoDb\ValueObject\Tag;
8383
use AsyncAws\DynamoDb\ValueObject\TimeToLiveSpecification;
8484
use AsyncAws\DynamoDb\ValueObject\TransactWriteItem;
85+
use AsyncAws\DynamoDb\ValueObject\WarmThroughput;
8586

8687
class DynamoDbClient extends AbstractApi
8788
{
@@ -284,6 +285,7 @@ public function batchWriteItem($input): BatchWriteItemOutput
284285
* Tags?: null|array<Tag|array>,
285286
* TableClass?: null|TableClass::*,
286287
* DeletionProtectionEnabled?: null|bool,
288+
* WarmThroughput?: null|WarmThroughput|array,
287289
* ResourcePolicy?: null|string,
288290
* OnDemandThroughput?: null|OnDemandThroughput|array,
289291
* '@region'?: string|null,
@@ -1000,6 +1002,7 @@ public function updateItem($input): UpdateItemOutput
10001002
* TableClass?: null|TableClass::*,
10011003
* DeletionProtectionEnabled?: null|bool,
10021004
* OnDemandThroughput?: null|OnDemandThroughput|array,
1005+
* WarmThroughput?: null|WarmThroughput|array,
10031006
* '@region'?: string|null,
10041007
* }|UpdateTableInput $input
10051008
*

src/Input/CreateTableInput.php

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
use AsyncAws\DynamoDb\ValueObject\SSESpecification;
2222
use AsyncAws\DynamoDb\ValueObject\StreamSpecification;
2323
use AsyncAws\DynamoDb\ValueObject\Tag;
24+
use AsyncAws\DynamoDb\ValueObject\WarmThroughput;
2425

2526
/**
2627
* Represents the input of a `CreateTable` operation.
@@ -219,6 +220,13 @@ final class CreateTableInput extends Input
219220
*/
220221
private $deletionProtectionEnabled;
221222

223+
/**
224+
* Represents the warm throughput (in read units per second and write units per second) for creating a table.
225+
*
226+
* @var WarmThroughput|null
227+
*/
228+
private $warmThroughput;
229+
222230
/**
223231
* An Amazon Web Services resource-based policy document in JSON format that will be attached to the table.
224232
*
@@ -259,6 +267,7 @@ final class CreateTableInput extends Input
259267
* Tags?: null|array<Tag|array>,
260268
* TableClass?: null|TableClass::*,
261269
* DeletionProtectionEnabled?: null|bool,
270+
* WarmThroughput?: null|WarmThroughput|array,
262271
* ResourcePolicy?: null|string,
263272
* OnDemandThroughput?: null|OnDemandThroughput|array,
264273
* '@region'?: string|null,
@@ -278,6 +287,7 @@ public function __construct(array $input = [])
278287
$this->tags = isset($input['Tags']) ? array_map([Tag::class, 'create'], $input['Tags']) : null;
279288
$this->tableClass = $input['TableClass'] ?? null;
280289
$this->deletionProtectionEnabled = $input['DeletionProtectionEnabled'] ?? null;
290+
$this->warmThroughput = isset($input['WarmThroughput']) ? WarmThroughput::create($input['WarmThroughput']) : null;
281291
$this->resourcePolicy = $input['ResourcePolicy'] ?? null;
282292
$this->onDemandThroughput = isset($input['OnDemandThroughput']) ? OnDemandThroughput::create($input['OnDemandThroughput']) : null;
283293
parent::__construct($input);
@@ -297,6 +307,7 @@ public function __construct(array $input = [])
297307
* Tags?: null|array<Tag|array>,
298308
* TableClass?: null|TableClass::*,
299309
* DeletionProtectionEnabled?: null|bool,
310+
* WarmThroughput?: null|WarmThroughput|array,
300311
* ResourcePolicy?: null|string,
301312
* OnDemandThroughput?: null|OnDemandThroughput|array,
302313
* '@region'?: string|null,
@@ -398,6 +409,11 @@ public function getTags(): array
398409
return $this->tags ?? [];
399410
}
400411

412+
public function getWarmThroughput(): ?WarmThroughput
413+
{
414+
return $this->warmThroughput;
415+
}
416+
401417
/**
402418
* @internal
403419
*/
@@ -543,6 +559,13 @@ public function setTags(array $value): self
543559
return $this;
544560
}
545561

562+
public function setWarmThroughput(?WarmThroughput $value): self
563+
{
564+
$this->warmThroughput = $value;
565+
566+
return $this;
567+
}
568+
546569
private function requestBody(): array
547570
{
548571
$payload = [];
@@ -620,6 +643,9 @@ private function requestBody(): array
620643
if (null !== $v = $this->deletionProtectionEnabled) {
621644
$payload['DeletionProtectionEnabled'] = (bool) $v;
622645
}
646+
if (null !== $v = $this->warmThroughput) {
647+
$payload['WarmThroughput'] = $v->requestBody();
648+
}
623649
if (null !== $v = $this->resourcePolicy) {
624650
$payload['ResourcePolicy'] = $v;
625651
}

src/Input/UpdateTableInput.php

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
use AsyncAws\DynamoDb\ValueObject\ReplicationGroupUpdate;
1616
use AsyncAws\DynamoDb\ValueObject\SSESpecification;
1717
use AsyncAws\DynamoDb\ValueObject\StreamSpecification;
18+
use AsyncAws\DynamoDb\ValueObject\WarmThroughput;
1819

1920
/**
2021
* Represents the input of an `UpdateTable` operation.
@@ -130,6 +131,13 @@ final class UpdateTableInput extends Input
130131
*/
131132
private $onDemandThroughput;
132133

134+
/**
135+
* Represents the warm throughput (in read units per second and write units per second) for updating a table.
136+
*
137+
* @var WarmThroughput|null
138+
*/
139+
private $warmThroughput;
140+
133141
/**
134142
* @param array{
135143
* AttributeDefinitions?: null|array<AttributeDefinition|array>,
@@ -143,6 +151,7 @@ final class UpdateTableInput extends Input
143151
* TableClass?: null|TableClass::*,
144152
* DeletionProtectionEnabled?: null|bool,
145153
* OnDemandThroughput?: null|OnDemandThroughput|array,
154+
* WarmThroughput?: null|WarmThroughput|array,
146155
* '@region'?: string|null,
147156
* } $input
148157
*/
@@ -159,6 +168,7 @@ public function __construct(array $input = [])
159168
$this->tableClass = $input['TableClass'] ?? null;
160169
$this->deletionProtectionEnabled = $input['DeletionProtectionEnabled'] ?? null;
161170
$this->onDemandThroughput = isset($input['OnDemandThroughput']) ? OnDemandThroughput::create($input['OnDemandThroughput']) : null;
171+
$this->warmThroughput = isset($input['WarmThroughput']) ? WarmThroughput::create($input['WarmThroughput']) : null;
162172
parent::__construct($input);
163173
}
164174

@@ -175,6 +185,7 @@ public function __construct(array $input = [])
175185
* TableClass?: null|TableClass::*,
176186
* DeletionProtectionEnabled?: null|bool,
177187
* OnDemandThroughput?: null|OnDemandThroughput|array,
188+
* WarmThroughput?: null|WarmThroughput|array,
178189
* '@region'?: string|null,
179190
* }|UpdateTableInput $input
180191
*/
@@ -253,6 +264,11 @@ public function getTableName(): ?string
253264
return $this->tableName;
254265
}
255266

267+
public function getWarmThroughput(): ?WarmThroughput
268+
{
269+
return $this->warmThroughput;
270+
}
271+
256272
/**
257273
* @internal
258274
*/
@@ -371,6 +387,13 @@ public function setTableName(?string $value): self
371387
return $this;
372388
}
373389

390+
public function setWarmThroughput(?WarmThroughput $value): self
391+
{
392+
$this->warmThroughput = $value;
393+
394+
return $this;
395+
}
396+
374397
private function requestBody(): array
375398
{
376399
$payload = [];
@@ -429,6 +452,9 @@ private function requestBody(): array
429452
if (null !== $v = $this->onDemandThroughput) {
430453
$payload['OnDemandThroughput'] = $v->requestBody();
431454
}
455+
if (null !== $v = $this->warmThroughput) {
456+
$payload['WarmThroughput'] = $v->requestBody();
457+
}
432458

433459
return $payload;
434460
}

src/Result/CreateTableOutput.php

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
use AsyncAws\DynamoDb\ValueObject\AttributeDefinition;
99
use AsyncAws\DynamoDb\ValueObject\BillingModeSummary;
1010
use AsyncAws\DynamoDb\ValueObject\GlobalSecondaryIndexDescription;
11+
use AsyncAws\DynamoDb\ValueObject\GlobalSecondaryIndexWarmThroughputDescription;
1112
use AsyncAws\DynamoDb\ValueObject\KeySchemaElement;
1213
use AsyncAws\DynamoDb\ValueObject\LocalSecondaryIndexDescription;
1314
use AsyncAws\DynamoDb\ValueObject\OnDemandThroughput;
@@ -22,6 +23,7 @@
2223
use AsyncAws\DynamoDb\ValueObject\StreamSpecification;
2324
use AsyncAws\DynamoDb\ValueObject\TableClassSummary;
2425
use AsyncAws\DynamoDb\ValueObject\TableDescription;
26+
use AsyncAws\DynamoDb\ValueObject\TableWarmThroughputDescription;
2527

2628
/**
2729
* Represents the output of a `CreateTable` operation.
@@ -100,6 +102,7 @@ private function populateResultGlobalSecondaryIndexDescription(array $json): Glo
100102
'ItemCount' => isset($json['ItemCount']) ? (int) $json['ItemCount'] : null,
101103
'IndexArn' => isset($json['IndexArn']) ? (string) $json['IndexArn'] : null,
102104
'OnDemandThroughput' => empty($json['OnDemandThroughput']) ? null : $this->populateResultOnDemandThroughput($json['OnDemandThroughput']),
105+
'WarmThroughput' => empty($json['WarmThroughput']) ? null : $this->populateResultGlobalSecondaryIndexWarmThroughputDescription($json['WarmThroughput']),
103106
]);
104107
}
105108

@@ -116,6 +119,15 @@ private function populateResultGlobalSecondaryIndexDescriptionList(array $json):
116119
return $items;
117120
}
118121

122+
private function populateResultGlobalSecondaryIndexWarmThroughputDescription(array $json): GlobalSecondaryIndexWarmThroughputDescription
123+
{
124+
return new GlobalSecondaryIndexWarmThroughputDescription([
125+
'ReadUnitsPerSecond' => isset($json['ReadUnitsPerSecond']) ? (int) $json['ReadUnitsPerSecond'] : null,
126+
'WriteUnitsPerSecond' => isset($json['WriteUnitsPerSecond']) ? (int) $json['WriteUnitsPerSecond'] : null,
127+
'Status' => isset($json['Status']) ? (string) $json['Status'] : null,
128+
]);
129+
}
130+
119131
/**
120132
* @return KeySchemaElement[]
121133
*/
@@ -229,6 +241,7 @@ private function populateResultReplicaDescription(array $json): ReplicaDescripti
229241
'KMSMasterKeyId' => isset($json['KMSMasterKeyId']) ? (string) $json['KMSMasterKeyId'] : null,
230242
'ProvisionedThroughputOverride' => empty($json['ProvisionedThroughputOverride']) ? null : $this->populateResultProvisionedThroughputOverride($json['ProvisionedThroughputOverride']),
231243
'OnDemandThroughputOverride' => empty($json['OnDemandThroughputOverride']) ? null : $this->populateResultOnDemandThroughputOverride($json['OnDemandThroughputOverride']),
244+
'WarmThroughput' => empty($json['WarmThroughput']) ? null : $this->populateResultTableWarmThroughputDescription($json['WarmThroughput']),
232245
'GlobalSecondaryIndexes' => !isset($json['GlobalSecondaryIndexes']) ? null : $this->populateResultReplicaGlobalSecondaryIndexDescriptionList($json['GlobalSecondaryIndexes']),
233246
'ReplicaInaccessibleDateTime' => (isset($json['ReplicaInaccessibleDateTime']) && ($d = \DateTimeImmutable::createFromFormat('U.u', \sprintf('%.6F', $json['ReplicaInaccessibleDateTime'])))) ? $d : null,
234247
'ReplicaTableClassSummary' => empty($json['ReplicaTableClassSummary']) ? null : $this->populateResultTableClassSummary($json['ReplicaTableClassSummary']),
@@ -254,6 +267,7 @@ private function populateResultReplicaGlobalSecondaryIndexDescription(array $jso
254267
'IndexName' => isset($json['IndexName']) ? (string) $json['IndexName'] : null,
255268
'ProvisionedThroughputOverride' => empty($json['ProvisionedThroughputOverride']) ? null : $this->populateResultProvisionedThroughputOverride($json['ProvisionedThroughputOverride']),
256269
'OnDemandThroughputOverride' => empty($json['OnDemandThroughputOverride']) ? null : $this->populateResultOnDemandThroughputOverride($json['OnDemandThroughputOverride']),
270+
'WarmThroughput' => empty($json['WarmThroughput']) ? null : $this->populateResultGlobalSecondaryIndexWarmThroughputDescription($json['WarmThroughput']),
257271
]);
258272
}
259273

@@ -333,6 +347,16 @@ private function populateResultTableDescription(array $json): TableDescription
333347
'TableClassSummary' => empty($json['TableClassSummary']) ? null : $this->populateResultTableClassSummary($json['TableClassSummary']),
334348
'DeletionProtectionEnabled' => isset($json['DeletionProtectionEnabled']) ? filter_var($json['DeletionProtectionEnabled'], \FILTER_VALIDATE_BOOLEAN) : null,
335349
'OnDemandThroughput' => empty($json['OnDemandThroughput']) ? null : $this->populateResultOnDemandThroughput($json['OnDemandThroughput']),
350+
'WarmThroughput' => empty($json['WarmThroughput']) ? null : $this->populateResultTableWarmThroughputDescription($json['WarmThroughput']),
351+
]);
352+
}
353+
354+
private function populateResultTableWarmThroughputDescription(array $json): TableWarmThroughputDescription
355+
{
356+
return new TableWarmThroughputDescription([
357+
'ReadUnitsPerSecond' => isset($json['ReadUnitsPerSecond']) ? (int) $json['ReadUnitsPerSecond'] : null,
358+
'WriteUnitsPerSecond' => isset($json['WriteUnitsPerSecond']) ? (int) $json['WriteUnitsPerSecond'] : null,
359+
'Status' => isset($json['Status']) ? (string) $json['Status'] : null,
336360
]);
337361
}
338362
}

src/Result/DeleteTableOutput.php

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
use AsyncAws\DynamoDb\ValueObject\AttributeDefinition;
99
use AsyncAws\DynamoDb\ValueObject\BillingModeSummary;
1010
use AsyncAws\DynamoDb\ValueObject\GlobalSecondaryIndexDescription;
11+
use AsyncAws\DynamoDb\ValueObject\GlobalSecondaryIndexWarmThroughputDescription;
1112
use AsyncAws\DynamoDb\ValueObject\KeySchemaElement;
1213
use AsyncAws\DynamoDb\ValueObject\LocalSecondaryIndexDescription;
1314
use AsyncAws\DynamoDb\ValueObject\OnDemandThroughput;
@@ -22,6 +23,7 @@
2223
use AsyncAws\DynamoDb\ValueObject\StreamSpecification;
2324
use AsyncAws\DynamoDb\ValueObject\TableClassSummary;
2425
use AsyncAws\DynamoDb\ValueObject\TableDescription;
26+
use AsyncAws\DynamoDb\ValueObject\TableWarmThroughputDescription;
2527

2628
/**
2729
* Represents the output of a `DeleteTable` operation.
@@ -100,6 +102,7 @@ private function populateResultGlobalSecondaryIndexDescription(array $json): Glo
100102
'ItemCount' => isset($json['ItemCount']) ? (int) $json['ItemCount'] : null,
101103
'IndexArn' => isset($json['IndexArn']) ? (string) $json['IndexArn'] : null,
102104
'OnDemandThroughput' => empty($json['OnDemandThroughput']) ? null : $this->populateResultOnDemandThroughput($json['OnDemandThroughput']),
105+
'WarmThroughput' => empty($json['WarmThroughput']) ? null : $this->populateResultGlobalSecondaryIndexWarmThroughputDescription($json['WarmThroughput']),
103106
]);
104107
}
105108

@@ -116,6 +119,15 @@ private function populateResultGlobalSecondaryIndexDescriptionList(array $json):
116119
return $items;
117120
}
118121

122+
private function populateResultGlobalSecondaryIndexWarmThroughputDescription(array $json): GlobalSecondaryIndexWarmThroughputDescription
123+
{
124+
return new GlobalSecondaryIndexWarmThroughputDescription([
125+
'ReadUnitsPerSecond' => isset($json['ReadUnitsPerSecond']) ? (int) $json['ReadUnitsPerSecond'] : null,
126+
'WriteUnitsPerSecond' => isset($json['WriteUnitsPerSecond']) ? (int) $json['WriteUnitsPerSecond'] : null,
127+
'Status' => isset($json['Status']) ? (string) $json['Status'] : null,
128+
]);
129+
}
130+
119131
/**
120132
* @return KeySchemaElement[]
121133
*/
@@ -229,6 +241,7 @@ private function populateResultReplicaDescription(array $json): ReplicaDescripti
229241
'KMSMasterKeyId' => isset($json['KMSMasterKeyId']) ? (string) $json['KMSMasterKeyId'] : null,
230242
'ProvisionedThroughputOverride' => empty($json['ProvisionedThroughputOverride']) ? null : $this->populateResultProvisionedThroughputOverride($json['ProvisionedThroughputOverride']),
231243
'OnDemandThroughputOverride' => empty($json['OnDemandThroughputOverride']) ? null : $this->populateResultOnDemandThroughputOverride($json['OnDemandThroughputOverride']),
244+
'WarmThroughput' => empty($json['WarmThroughput']) ? null : $this->populateResultTableWarmThroughputDescription($json['WarmThroughput']),
232245
'GlobalSecondaryIndexes' => !isset($json['GlobalSecondaryIndexes']) ? null : $this->populateResultReplicaGlobalSecondaryIndexDescriptionList($json['GlobalSecondaryIndexes']),
233246
'ReplicaInaccessibleDateTime' => (isset($json['ReplicaInaccessibleDateTime']) && ($d = \DateTimeImmutable::createFromFormat('U.u', \sprintf('%.6F', $json['ReplicaInaccessibleDateTime'])))) ? $d : null,
234247
'ReplicaTableClassSummary' => empty($json['ReplicaTableClassSummary']) ? null : $this->populateResultTableClassSummary($json['ReplicaTableClassSummary']),
@@ -254,6 +267,7 @@ private function populateResultReplicaGlobalSecondaryIndexDescription(array $jso
254267
'IndexName' => isset($json['IndexName']) ? (string) $json['IndexName'] : null,
255268
'ProvisionedThroughputOverride' => empty($json['ProvisionedThroughputOverride']) ? null : $this->populateResultProvisionedThroughputOverride($json['ProvisionedThroughputOverride']),
256269
'OnDemandThroughputOverride' => empty($json['OnDemandThroughputOverride']) ? null : $this->populateResultOnDemandThroughputOverride($json['OnDemandThroughputOverride']),
270+
'WarmThroughput' => empty($json['WarmThroughput']) ? null : $this->populateResultGlobalSecondaryIndexWarmThroughputDescription($json['WarmThroughput']),
257271
]);
258272
}
259273

@@ -333,6 +347,16 @@ private function populateResultTableDescription(array $json): TableDescription
333347
'TableClassSummary' => empty($json['TableClassSummary']) ? null : $this->populateResultTableClassSummary($json['TableClassSummary']),
334348
'DeletionProtectionEnabled' => isset($json['DeletionProtectionEnabled']) ? filter_var($json['DeletionProtectionEnabled'], \FILTER_VALIDATE_BOOLEAN) : null,
335349
'OnDemandThroughput' => empty($json['OnDemandThroughput']) ? null : $this->populateResultOnDemandThroughput($json['OnDemandThroughput']),
350+
'WarmThroughput' => empty($json['WarmThroughput']) ? null : $this->populateResultTableWarmThroughputDescription($json['WarmThroughput']),
351+
]);
352+
}
353+
354+
private function populateResultTableWarmThroughputDescription(array $json): TableWarmThroughputDescription
355+
{
356+
return new TableWarmThroughputDescription([
357+
'ReadUnitsPerSecond' => isset($json['ReadUnitsPerSecond']) ? (int) $json['ReadUnitsPerSecond'] : null,
358+
'WriteUnitsPerSecond' => isset($json['WriteUnitsPerSecond']) ? (int) $json['WriteUnitsPerSecond'] : null,
359+
'Status' => isset($json['Status']) ? (string) $json['Status'] : null,
336360
]);
337361
}
338362
}

0 commit comments

Comments
 (0)