Skip to content

Commit 5a111c2

Browse files
committed
Generate the property type for result objects
1 parent 77ebc34 commit 5a111c2

File tree

278 files changed

+1547
-1
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

278 files changed

+1547
-1
lines changed

src/CodeGenerator/src/Generator/CodeGenerator/PopulatorGenerator.php

+5-1
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,9 @@ private function generateProperties(StructureShape $shape, ClassBuilder $classBu
133133
$nullable = false;
134134
} elseif ($member->isStreaming()) {
135135
$returnType = ResultStream::class;
136-
$parameterType = ResultStream::class;
136+
$parameterType = 'ResultStream';
137137
$memberClassNames = [];
138+
$classBuilder->addUse(ResultStream::class);
138139
$nullable = false;
139140
}
140141

@@ -161,6 +162,9 @@ private function generateProperties(StructureShape $shape, ClassBuilder $classBu
161162
$method->addComment('@return ' . $parameterType . ($nullable ? '|null' : ''));
162163
}
163164
$method->setReturnNullable($nullable);
165+
if ($parameterType) {
166+
$property->addComment('@var ' . $parameterType . ($nullable ? '|null' : ''));
167+
}
164168
}
165169

166170
if ($forEndpoint) {

src/Core/src/Sts/Result/AssumeRoleResponse.php

+8
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ class AssumeRoleResponse extends Result
1919
*
2020
* > The size of the security token that STS API operations return is not fixed. We strongly recommend that you make no
2121
* > assumptions about the maximum size.
22+
*
23+
* @var Credentials|null
2224
*/
2325
private $credentials;
2426

@@ -27,13 +29,17 @@ class AssumeRoleResponse extends Result
2729
* resulting temporary security credentials. For example, you can reference these credentials as a principal in a
2830
* resource-based policy by using the ARN or assumed role ID. The ARN and ID include the `RoleSessionName` that you
2931
* specified when you called `AssumeRole`.
32+
*
33+
* @var AssumedRoleUser|null
3034
*/
3135
private $assumedRoleUser;
3236

3337
/**
3438
* A percentage value that indicates the packed size of the session policies and session tags combined passed in the
3539
* request. The request fails if the packed size is greater than 100 percent, which means the policies and tags exceeded
3640
* the allowed space.
41+
*
42+
* @var int|null
3743
*/
3844
private $packedPolicySize;
3945

@@ -50,6 +56,8 @@ class AssumeRoleResponse extends Result
5056
* characters with no spaces. You can also include underscores or any of the following characters: =,.@-
5157
*
5258
* [^1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_monitor.html
59+
*
60+
* @var string|null
5361
*/
5462
private $sourceIdentity;
5563

src/Core/src/Sts/Result/AssumeRoleWithWebIdentityResponse.php

+14
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ class AssumeRoleWithWebIdentityResponse extends Result
1818
*
1919
* > The size of the security token that STS API operations return is not fixed. We strongly recommend that you make no
2020
* > assumptions about the maximum size.
21+
*
22+
* @var Credentials|null
2123
*/
2224
private $credentials;
2325

@@ -26,6 +28,8 @@ class AssumeRoleWithWebIdentityResponse extends Result
2628
* `WebIdentityToken` that was submitted with the `AssumeRoleWithWebIdentity` call. The identifier is typically unique
2729
* to the user and the application that acquired the `WebIdentityToken` (pairwise identifier). For OpenID Connect ID
2830
* tokens, this field contains the value returned by the identity provider as the token's `sub` (Subject) claim.
31+
*
32+
* @var string|null
2933
*/
3034
private $subjectFromWebIdentityToken;
3135

@@ -34,26 +38,34 @@ class AssumeRoleWithWebIdentityResponse extends Result
3438
* resulting temporary security credentials. For example, you can reference these credentials as a principal in a
3539
* resource-based policy by using the ARN or assumed role ID. The ARN and ID include the `RoleSessionName` that you
3640
* specified when you called `AssumeRole`.
41+
*
42+
* @var AssumedRoleUser|null
3743
*/
3844
private $assumedRoleUser;
3945

4046
/**
4147
* A percentage value that indicates the packed size of the session policies and session tags combined passed in the
4248
* request. The request fails if the packed size is greater than 100 percent, which means the policies and tags exceeded
4349
* the allowed space.
50+
*
51+
* @var int|null
4452
*/
4553
private $packedPolicySize;
4654

4755
/**
4856
* The issuing authority of the web identity token presented. For OpenID Connect ID tokens, this contains the value of
4957
* the `iss` field. For OAuth 2.0 access tokens, this contains the value of the `ProviderId` parameter that was passed
5058
* in the `AssumeRoleWithWebIdentity` request.
59+
*
60+
* @var string|null
5161
*/
5262
private $provider;
5363

5464
/**
5565
* The intended audience (also known as client ID) of the web identity token. This is traditionally the client
5666
* identifier issued to the application that requested the web identity token.
67+
*
68+
* @var string|null
5769
*/
5870
private $audience;
5971

@@ -76,6 +88,8 @@ class AssumeRoleWithWebIdentityResponse extends Result
7688
* [^1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_terms-and-concepts#iam-term-role-chaining
7789
* [^2]: https://docs.aws.amazon.com/cognito/latest/developerguide/amazon-cognito-user-pools-using-tokens-with-identity-providers.html
7890
* [^3]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_monitor.html
91+
*
92+
* @var string|null
7993
*/
8094
private $sourceIdentity;
8195

src/Core/src/Sts/Result/GetCallerIdentityResponse.php

+6
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,22 @@ class GetCallerIdentityResponse extends Result
1717
* Variables** reference page in the *IAM User Guide*.
1818
*
1919
* [^1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_variables.html#principaltable
20+
*
21+
* @var string|null
2022
*/
2123
private $userId;
2224

2325
/**
2426
* The Amazon Web Services account ID number of the account that owns or contains the calling entity.
27+
*
28+
* @var string|null
2529
*/
2630
private $account;
2731

2832
/**
2933
* The Amazon Web Services ARN associated with the calling entity.
34+
*
35+
* @var string|null
3036
*/
3137
private $arn;
3238

src/Service/AppSync/src/Exception/BadRequestException.php

+6
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,14 @@
1515
*/
1616
final class BadRequestException extends ClientException
1717
{
18+
/**
19+
* @var BadRequestReason::*|null
20+
*/
1821
private $reason;
1922

23+
/**
24+
* @var BadRequestDetail|null
25+
*/
2026
private $detail;
2127

2228
public function getDetail(): ?BadRequestDetail

src/Service/AppSync/src/Result/CreateResolverResponse.php

+2
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ class CreateResolverResponse extends Result
1515
{
1616
/**
1717
* The `Resolver` object.
18+
*
19+
* @var Resolver|null
1820
*/
1921
private $resolver;
2022

src/Service/AppSync/src/Result/GetSchemaCreationStatusResponse.php

+4
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,15 @@ class GetSchemaCreationStatusResponse extends Result
1111
/**
1212
* The current state of the schema (PROCESSING, FAILED, SUCCESS, or NOT_APPLICABLE). When the schema is in the ACTIVE
1313
* state, you can add data.
14+
*
15+
* @var SchemaStatus::*|null
1416
*/
1517
private $status;
1618

1719
/**
1820
* Detailed information about the status of the schema creation operation.
21+
*
22+
* @var string|null
1923
*/
2024
private $details;
2125

src/Service/AppSync/src/Result/ListApiKeysResponse.php

+4
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,15 @@ class ListApiKeysResponse extends Result
1010
{
1111
/**
1212
* The `ApiKey` objects.
13+
*
14+
* @var ApiKey[]
1315
*/
1416
private $apiKeys;
1517

1618
/**
1719
* An identifier to pass in the next request to this operation to return the next set of items in the list.
20+
*
21+
* @var string|null
1822
*/
1923
private $nextToken;
2024

src/Service/AppSync/src/Result/ListResolversResponse.php

+4
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,15 @@ class ListResolversResponse extends Result
1515
{
1616
/**
1717
* The `Resolver` objects.
18+
*
19+
* @var Resolver[]
1820
*/
1921
private $resolvers;
2022

2123
/**
2224
* An identifier to pass in the next request to this operation to return the next set of items in the list.
25+
*
26+
* @var string|null
2327
*/
2428
private $nextToken;
2529

src/Service/AppSync/src/Result/StartSchemaCreationResponse.php

+2
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ class StartSchemaCreationResponse extends Result
1111
/**
1212
* The current state of the schema (PROCESSING, FAILED, SUCCESS, or NOT_APPLICABLE). When the schema is in the ACTIVE
1313
* state, you can add data.
14+
*
15+
* @var SchemaStatus::*|null
1416
*/
1517
private $status;
1618

src/Service/AppSync/src/Result/UpdateApiKeyResponse.php

+2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ class UpdateApiKeyResponse extends Result
1010
{
1111
/**
1212
* The API key.
13+
*
14+
* @var ApiKey|null
1315
*/
1416
private $apiKey;
1517

src/Service/AppSync/src/Result/UpdateDataSourceResponse.php

+2
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ class UpdateDataSourceResponse extends Result
2121
{
2222
/**
2323
* The updated `DataSource` object.
24+
*
25+
* @var DataSource|null
2426
*/
2527
private $dataSource;
2628

src/Service/AppSync/src/Result/UpdateResolverResponse.php

+2
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ class UpdateResolverResponse extends Result
1515
{
1616
/**
1717
* The updated `Resolver` object.
18+
*
19+
* @var Resolver|null
1820
*/
1921
private $resolver;
2022

src/Service/Athena/src/Exception/InvalidRequestException.php

+3
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@
1111
*/
1212
final class InvalidRequestException extends ClientException
1313
{
14+
/**
15+
* @var string|null
16+
*/
1417
private $athenaErrorCode;
1518

1619
public function getAthenaErrorCode(): ?string

src/Service/Athena/src/Exception/ResourceNotFoundException.php

+2
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ final class ResourceNotFoundException extends ClientException
1212
{
1313
/**
1414
* The name of the Amazon resource.
15+
*
16+
* @var string|null
1517
*/
1618
private $resourceName;
1719

src/Service/Athena/src/Exception/TooManyRequestsException.php

+3
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@
1111
*/
1212
final class TooManyRequestsException extends ClientException
1313
{
14+
/**
15+
* @var ThrottleReason::*|null
16+
*/
1417
private $reason;
1518

1619
/**

src/Service/Athena/src/Result/GetCalculationExecutionResponse.php

+14
Original file line numberDiff line numberDiff line change
@@ -12,37 +12,51 @@ class GetCalculationExecutionResponse extends Result
1212
{
1313
/**
1414
* The calculation execution UUID.
15+
*
16+
* @var string|null
1517
*/
1618
private $calculationExecutionId;
1719

1820
/**
1921
* The session ID that the calculation ran in.
22+
*
23+
* @var string|null
2024
*/
2125
private $sessionId;
2226

2327
/**
2428
* The description of the calculation execution.
29+
*
30+
* @var string|null
2531
*/
2632
private $description;
2733

2834
/**
2935
* The Amazon S3 location in which calculation results are stored.
36+
*
37+
* @var string|null
3038
*/
3139
private $workingDirectory;
3240

3341
/**
3442
* Contains information about the status of the calculation.
43+
*
44+
* @var CalculationStatus|null
3545
*/
3646
private $status;
3747

3848
/**
3949
* Contains information about the data processing unit (DPU) execution time and progress. This field is populated only
4050
* when statistics are available.
51+
*
52+
* @var CalculationStatistics|null
4153
*/
4254
private $statistics;
4355

4456
/**
4557
* Contains result information. This field is populated only if the calculation is completed.
58+
*
59+
* @var CalculationResult|null
4660
*/
4761
private $result;
4862

src/Service/Athena/src/Result/GetCalculationExecutionStatusResponse.php

+4
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,15 @@ class GetCalculationExecutionStatusResponse extends Result
1111
{
1212
/**
1313
* Contains information about the calculation execution status.
14+
*
15+
* @var CalculationStatus|null
1416
*/
1517
private $status;
1618

1719
/**
1820
* Contains information about the DPU execution time and progress.
21+
*
22+
* @var CalculationStatistics|null
1923
*/
2024
private $statistics;
2125

src/Service/Athena/src/Result/GetDataCatalogOutput.php

+2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ class GetDataCatalogOutput extends Result
1010
{
1111
/**
1212
* The data catalog returned.
13+
*
14+
* @var DataCatalog|null
1315
*/
1416
private $dataCatalog;
1517

src/Service/Athena/src/Result/GetDatabaseOutput.php

+2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ class GetDatabaseOutput extends Result
1010
{
1111
/**
1212
* The database returned.
13+
*
14+
* @var Database|null
1315
*/
1416
private $database;
1517

src/Service/Athena/src/Result/GetNamedQueryOutput.php

+2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ class GetNamedQueryOutput extends Result
1010
{
1111
/**
1212
* Information about the query.
13+
*
14+
* @var NamedQuery|null
1315
*/
1416
private $namedQuery;
1517

src/Service/Athena/src/Result/GetQueryExecutionOutput.php

+2
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ class GetQueryExecutionOutput extends Result
2121
{
2222
/**
2323
* Information about the query execution.
24+
*
25+
* @var QueryExecution|null
2426
*/
2527
private $queryExecution;
2628

0 commit comments

Comments
 (0)