Skip to content

Commit ec53fa3

Browse files
Update generated code (#1587)
update generated code
1 parent 7feeeb7 commit ec53fa3

17 files changed

+230
-12
lines changed

manifest.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"variables": {
3-
"${LATEST}": "3.283.1"
3+
"${LATEST}": "3.283.3"
44
},
55
"endpoints": "https://raw.githubusercontent.com/aws/aws-sdk-php/${LATEST}/src/data/endpoints.json",
66
"services": {

src/Service/Lambda/CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
## NOT RELEASED
44

5+
### Added
6+
7+
- AWS api-change: Adds support for Lambda functions to access Dual-Stack subnets over IPv6, via an opt-in flag in CreateFunction and UpdateFunctionConfiguration APIs
8+
59
## 2.1.0
610

711
### Added

src/Service/Lambda/composer.json

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
],
1313
"require": {
1414
"php": "^7.2.5 || ^8.0",
15+
"ext-filter": "*",
1516
"ext-json": "*",
1617
"async-aws/core": "^1.9"
1718
},

src/Service/Lambda/src/Result/FunctionConfiguration.php

+1
Original file line numberDiff line numberDiff line change
@@ -827,6 +827,7 @@ private function populateResultVpcConfigResponse(array $json): VpcConfigResponse
827827
'SubnetIds' => !isset($json['SubnetIds']) ? null : $this->populateResultSubnetIds($json['SubnetIds']),
828828
'SecurityGroupIds' => !isset($json['SecurityGroupIds']) ? null : $this->populateResultSecurityGroupIds($json['SecurityGroupIds']),
829829
'VpcId' => isset($json['VpcId']) ? (string) $json['VpcId'] : null,
830+
'Ipv6AllowedForDualStack' => isset($json['Ipv6AllowedForDualStack']) ? filter_var($json['Ipv6AllowedForDualStack'], \FILTER_VALIDATE_BOOLEAN) : null,
830831
]);
831832
}
832833
}

src/Service/Lambda/src/Result/ListFunctionsResponse.php

+1
Original file line numberDiff line numberDiff line change
@@ -381,6 +381,7 @@ private function populateResultVpcConfigResponse(array $json): VpcConfigResponse
381381
'SubnetIds' => !isset($json['SubnetIds']) ? null : $this->populateResultSubnetIds($json['SubnetIds']),
382382
'SecurityGroupIds' => !isset($json['SecurityGroupIds']) ? null : $this->populateResultSecurityGroupIds($json['SecurityGroupIds']),
383383
'VpcId' => isset($json['VpcId']) ? (string) $json['VpcId'] : null,
384+
'Ipv6AllowedForDualStack' => isset($json['Ipv6AllowedForDualStack']) ? filter_var($json['Ipv6AllowedForDualStack'], \FILTER_VALIDATE_BOOLEAN) : null,
384385
]);
385386
}
386387
}

src/Service/Lambda/src/Result/ListVersionsByFunctionResponse.php

+1
Original file line numberDiff line numberDiff line change
@@ -379,6 +379,7 @@ private function populateResultVpcConfigResponse(array $json): VpcConfigResponse
379379
'SubnetIds' => !isset($json['SubnetIds']) ? null : $this->populateResultSubnetIds($json['SubnetIds']),
380380
'SecurityGroupIds' => !isset($json['SecurityGroupIds']) ? null : $this->populateResultSecurityGroupIds($json['SecurityGroupIds']),
381381
'VpcId' => isset($json['VpcId']) ? (string) $json['VpcId'] : null,
382+
'Ipv6AllowedForDualStack' => isset($json['Ipv6AllowedForDualStack']) ? filter_var($json['Ipv6AllowedForDualStack'], \FILTER_VALIDATE_BOOLEAN) : null,
382383
]);
383384
}
384385
}

src/Service/Lambda/src/ValueObject/VpcConfig.php

+18
Original file line numberDiff line numberDiff line change
@@ -24,29 +24,44 @@ final class VpcConfig
2424
*/
2525
private $securityGroupIds;
2626

27+
/**
28+
* Allows outbound IPv6 traffic on VPC functions that are connected to dual-stack subnets.
29+
*
30+
* @var bool|null
31+
*/
32+
private $ipv6AllowedForDualStack;
33+
2734
/**
2835
* @param array{
2936
* SubnetIds?: null|string[],
3037
* SecurityGroupIds?: null|string[],
38+
* Ipv6AllowedForDualStack?: null|bool,
3139
* } $input
3240
*/
3341
public function __construct(array $input)
3442
{
3543
$this->subnetIds = $input['SubnetIds'] ?? null;
3644
$this->securityGroupIds = $input['SecurityGroupIds'] ?? null;
45+
$this->ipv6AllowedForDualStack = $input['Ipv6AllowedForDualStack'] ?? null;
3746
}
3847

3948
/**
4049
* @param array{
4150
* SubnetIds?: null|string[],
4251
* SecurityGroupIds?: null|string[],
52+
* Ipv6AllowedForDualStack?: null|bool,
4353
* }|VpcConfig $input
4454
*/
4555
public static function create($input): self
4656
{
4757
return $input instanceof self ? $input : new self($input);
4858
}
4959

60+
public function getIpv6AllowedForDualStack(): ?bool
61+
{
62+
return $this->ipv6AllowedForDualStack;
63+
}
64+
5065
/**
5166
* @return string[]
5267
*/
@@ -85,6 +100,9 @@ public function requestBody(): array
85100
$payload['SecurityGroupIds'][$index] = $listValue;
86101
}
87102
}
103+
if (null !== $v = $this->ipv6AllowedForDualStack) {
104+
$payload['Ipv6AllowedForDualStack'] = (bool) $v;
105+
}
88106

89107
return $payload;
90108
}

src/Service/Lambda/src/ValueObject/VpcConfigResponse.php

+15
Original file line numberDiff line numberDiff line change
@@ -28,32 +28,47 @@ final class VpcConfigResponse
2828
*/
2929
private $vpcId;
3030

31+
/**
32+
* Allows outbound IPv6 traffic on VPC functions that are connected to dual-stack subnets.
33+
*
34+
* @var bool|null
35+
*/
36+
private $ipv6AllowedForDualStack;
37+
3138
/**
3239
* @param array{
3340
* SubnetIds?: null|string[],
3441
* SecurityGroupIds?: null|string[],
3542
* VpcId?: null|string,
43+
* Ipv6AllowedForDualStack?: null|bool,
3644
* } $input
3745
*/
3846
public function __construct(array $input)
3947
{
4048
$this->subnetIds = $input['SubnetIds'] ?? null;
4149
$this->securityGroupIds = $input['SecurityGroupIds'] ?? null;
4250
$this->vpcId = $input['VpcId'] ?? null;
51+
$this->ipv6AllowedForDualStack = $input['Ipv6AllowedForDualStack'] ?? null;
4352
}
4453

4554
/**
4655
* @param array{
4756
* SubnetIds?: null|string[],
4857
* SecurityGroupIds?: null|string[],
4958
* VpcId?: null|string,
59+
* Ipv6AllowedForDualStack?: null|bool,
5060
* }|VpcConfigResponse $input
5161
*/
5262
public static function create($input): self
5363
{
5464
return $input instanceof self ? $input : new self($input);
5565
}
5666

67+
public function getIpv6AllowedForDualStack(): ?bool
68+
{
69+
return $this->ipv6AllowedForDualStack;
70+
}
71+
5772
/**
5873
* @return string[]
5974
*/

src/Service/Rekognition/CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
## NOT RELEASED
44

5+
### Added
6+
7+
- AWS api-change: Amazon Rekognition introduces support for Custom Moderation. This allows the enhancement of accuracy for detect moderation labels operations by creating custom adapters tuned on customer data.
8+
59
### Changed
610

711
- Allow passing explicit null values for optional fields of input objects
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?php
2+
3+
namespace AsyncAws\Rekognition\Enum;
4+
5+
final class CustomizationFeature
6+
{
7+
public const CONTENT_MODERATION = 'CONTENT_MODERATION';
8+
public const CUSTOM_LABELS = 'CUSTOM_LABELS';
9+
10+
public static function exists(string $value): bool
11+
{
12+
return isset([
13+
self::CONTENT_MODERATION => true,
14+
self::CUSTOM_LABELS => true,
15+
][$value]);
16+
}
17+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?php
2+
3+
namespace AsyncAws\Rekognition\Enum;
4+
5+
final class ProjectAutoUpdate
6+
{
7+
public const DISABLED = 'DISABLED';
8+
public const ENABLED = 'ENABLED';
9+
10+
public static function exists(string $value): bool
11+
{
12+
return isset([
13+
self::DISABLED => true,
14+
self::ENABLED => true,
15+
][$value]);
16+
}
17+
}

src/Service/Rekognition/src/Exception/LimitExceededException.php

+3-4
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,9 @@
55
use AsyncAws\Core\Exception\Http\ClientException;
66

77
/**
8-
* An Amazon Rekognition service limit was exceeded. For example, if you start too many Amazon Rekognition Video jobs
9-
* concurrently, calls to start operations (`StartLabelDetection`, for example) will raise a `LimitExceededException`
10-
* exception (HTTP status code: 400) until the number of concurrently running jobs is below the Amazon Rekognition
11-
* service limit.
8+
* An Amazon Rekognition service limit was exceeded. For example, if you start too many jobs concurrently, subsequent
9+
* calls to start operations (ex: `StartLabelDetection`) will raise a `LimitExceededException` exception (HTTP status
10+
* code: 400) until the number of concurrently running jobs is below the Amazon Rekognition service limit.
1211
*/
1312
final class LimitExceededException extends ClientException
1413
{
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?php
2+
3+
namespace AsyncAws\Rekognition\Exception;
4+
5+
use AsyncAws\Core\Exception\Http\ClientException;
6+
7+
/**
8+
* The requested resource isn't ready. For example, this exception occurs when you call `DetectCustomLabels` with a
9+
* model version that isn't deployed.
10+
*/
11+
final class ResourceNotReadyException extends ClientException
12+
{
13+
}

src/Service/Rekognition/src/Input/CreateProjectRequest.php

+71
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
use AsyncAws\Core\Input;
77
use AsyncAws\Core\Request;
88
use AsyncAws\Core\Stream\StreamFactory;
9+
use AsyncAws\Rekognition\Enum\CustomizationFeature;
10+
use AsyncAws\Rekognition\Enum\ProjectAutoUpdate;
911

1012
final class CreateProjectRequest extends Input
1113
{
@@ -18,21 +20,42 @@ final class CreateProjectRequest extends Input
1820
*/
1921
private $projectName;
2022

23+
/**
24+
* Specifies feature that is being customized. If no value is provided CUSTOM_LABELS is used as a default.
25+
*
26+
* @var CustomizationFeature::*|null
27+
*/
28+
private $feature;
29+
30+
/**
31+
* Specifies whether automatic retraining should be attempted for the versions of the project. Automatic retraining is
32+
* done as a best effort. Required argument for Content Moderation. Applicable only to adapters.
33+
*
34+
* @var ProjectAutoUpdate::*|null
35+
*/
36+
private $autoUpdate;
37+
2138
/**
2239
* @param array{
2340
* ProjectName?: string,
41+
* Feature?: null|CustomizationFeature::*,
42+
* AutoUpdate?: null|ProjectAutoUpdate::*,
2443
* '@region'?: string|null,
2544
* } $input
2645
*/
2746
public function __construct(array $input = [])
2847
{
2948
$this->projectName = $input['ProjectName'] ?? null;
49+
$this->feature = $input['Feature'] ?? null;
50+
$this->autoUpdate = $input['AutoUpdate'] ?? null;
3051
parent::__construct($input);
3152
}
3253

3354
/**
3455
* @param array{
3556
* ProjectName?: string,
57+
* Feature?: null|CustomizationFeature::*,
58+
* AutoUpdate?: null|ProjectAutoUpdate::*,
3659
* '@region'?: string|null,
3760
* }|CreateProjectRequest $input
3861
*/
@@ -41,6 +64,22 @@ public static function create($input): self
4164
return $input instanceof self ? $input : new self($input);
4265
}
4366

67+
/**
68+
* @return ProjectAutoUpdate::*|null
69+
*/
70+
public function getAutoUpdate(): ?string
71+
{
72+
return $this->autoUpdate;
73+
}
74+
75+
/**
76+
* @return CustomizationFeature::*|null
77+
*/
78+
public function getFeature(): ?string
79+
{
80+
return $this->feature;
81+
}
82+
4483
public function getProjectName(): ?string
4584
{
4685
return $this->projectName;
@@ -71,6 +110,26 @@ public function request(): Request
71110
return new Request('POST', $uriString, $query, $headers, StreamFactory::create($body));
72111
}
73112

113+
/**
114+
* @param ProjectAutoUpdate::*|null $value
115+
*/
116+
public function setAutoUpdate(?string $value): self
117+
{
118+
$this->autoUpdate = $value;
119+
120+
return $this;
121+
}
122+
123+
/**
124+
* @param CustomizationFeature::*|null $value
125+
*/
126+
public function setFeature(?string $value): self
127+
{
128+
$this->feature = $value;
129+
130+
return $this;
131+
}
132+
74133
public function setProjectName(?string $value): self
75134
{
76135
$this->projectName = $value;
@@ -85,6 +144,18 @@ private function requestBody(): array
85144
throw new InvalidArgument(sprintf('Missing parameter "ProjectName" for "%s". The value cannot be null.', __CLASS__));
86145
}
87146
$payload['ProjectName'] = $v;
147+
if (null !== $v = $this->feature) {
148+
if (!CustomizationFeature::exists($v)) {
149+
throw new InvalidArgument(sprintf('Invalid parameter "Feature" for "%s". The value "%s" is not a valid "CustomizationFeature".', __CLASS__, $v));
150+
}
151+
$payload['Feature'] = $v;
152+
}
153+
if (null !== $v = $this->autoUpdate) {
154+
if (!ProjectAutoUpdate::exists($v)) {
155+
throw new InvalidArgument(sprintf('Invalid parameter "AutoUpdate" for "%s". The value "%s" is not a valid "ProjectAutoUpdate".', __CLASS__, $v));
156+
}
157+
$payload['AutoUpdate'] = $v;
158+
}
88159

89160
return $payload;
90161
}

0 commit comments

Comments
 (0)