Skip to content

Commit e3b6c96

Browse files
committed
Generate the property type for generated objects
1 parent 77ebc34 commit e3b6c96

File tree

876 files changed

+7038
-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.

876 files changed

+7038
-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/CodeGenerator/src/Generator/ObjectGenerator.php

+3
Original file line numberDiff line numberDiff line change
@@ -310,6 +310,9 @@ private function addProperties(StructureShape $shape, ClassBuilder $classBuilder
310310
$method->addComment('@return ' . $parameterType . ($nullable ? '|null' : ''));
311311
}
312312
$method->setReturnNullable($nullable);
313+
if ($parameterType) {
314+
$property->addComment('@var ' . $parameterType . ($nullable ? '|null' : ''));
315+
}
313316
}
314317

315318
foreach ($forEndpointProps as $key => $ok) {

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/Core/src/Sts/ValueObject/AssumedRoleUser.php

+4
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ final class AssumedRoleUser
1010
/**
1111
* A unique identifier that contains the role ID and the role session name of the role that is being assumed. The role
1212
* ID is generated by Amazon Web Services when the role is created.
13+
*
14+
* @var string
1315
*/
1416
private $assumedRoleId;
1517

@@ -18,6 +20,8 @@ final class AssumedRoleUser
1820
* about ARNs and how to use them in policies, see IAM Identifiers [^1] in the *IAM User Guide*.
1921
*
2022
* [^1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html
23+
*
24+
* @var string
2125
*/
2226
private $arn;
2327

src/Core/src/Sts/ValueObject/Credentials.php

+8
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,29 @@ final class Credentials
99
{
1010
/**
1111
* The access key ID that identifies the temporary security credentials.
12+
*
13+
* @var string
1214
*/
1315
private $accessKeyId;
1416

1517
/**
1618
* The secret access key that can be used to sign requests.
19+
*
20+
* @var string
1721
*/
1822
private $secretAccessKey;
1923

2024
/**
2125
* The token that users must pass to the service API to use the temporary credentials.
26+
*
27+
* @var string
2228
*/
2329
private $sessionToken;
2430

2531
/**
2632
* The date on which the current credentials expire.
33+
*
34+
* @var \DateTimeImmutable
2735
*/
2836
private $expiration;
2937

src/Core/src/Sts/ValueObject/PolicyDescriptorType.php

+2
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ final class PolicyDescriptorType
1414
* *Amazon Web Services General Reference*.
1515
*
1616
* [^1]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html
17+
*
18+
* @var string|null
1719
*/
1820
private $arn;
1921

src/Core/src/Sts/ValueObject/Tag.php

+4
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ final class Tag
2020
* additional limits, see IAM and STS Character Limits [^1] in the *IAM User Guide*.
2121
*
2222
* [^1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-limits.html#reference_iam-limits-entity-length
23+
*
24+
* @var string
2325
*/
2426
private $key;
2527

@@ -30,6 +32,8 @@ final class Tag
3032
* additional limits, see IAM and STS Character Limits [^1] in the *IAM User Guide*.
3133
*
3234
* [^1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-limits.html#reference_iam-limits-entity-length
35+
*
36+
* @var string
3337
*/
3438
private $value;
3539

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/AppSync/src/ValueObject/ApiKey.php

+8
Original file line numberDiff line numberDiff line change
@@ -36,23 +36,31 @@ final class ApiKey
3636
{
3737
/**
3838
* The API key ID.
39+
*
40+
* @var string|null
3941
*/
4042
private $id;
4143

4244
/**
4345
* A description of the purpose of the API key.
46+
*
47+
* @var string|null
4448
*/
4549
private $description;
4650

4751
/**
4852
* The time after which the API key expires. The date is represented as seconds since the epoch, rounded down to the
4953
* nearest hour.
54+
*
55+
* @var string|null
5056
*/
5157
private $expires;
5258

5359
/**
5460
* The time after which the API key is deleted. The date is represented as seconds since the epoch, rounded down to the
5561
* nearest hour.
62+
*
63+
* @var string|null
5664
*/
5765
private $deletes;
5866

src/Service/AppSync/src/ValueObject/AppSyncRuntime.php

+4
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,15 @@ final class AppSyncRuntime
1414
{
1515
/**
1616
* The `name` of the runtime to use. Currently, the only allowed value is `APPSYNC_JS`.
17+
*
18+
* @var RuntimeName::*
1719
*/
1820
private $name;
1921

2022
/**
2123
* The `version` of the runtime to use. Currently, the only allowed version is `1.0.0`.
24+
*
25+
* @var string
2226
*/
2327
private $runtimeVersion;
2428

src/Service/AppSync/src/ValueObject/AuthorizationConfig.php

+4
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,15 @@ final class AuthorizationConfig
1414
* The authorization type that the HTTP endpoint requires.
1515
*
1616
* - **AWS_IAM**: The authorization type is Signature Version 4 (SigV4).
17+
*
18+
* @var AuthorizationType::*
1719
*/
1820
private $authorizationType;
1921

2022
/**
2123
* The Identity and Access Management (IAM) settings.
24+
*
25+
* @var AwsIamConfig|null
2226
*/
2327
private $awsIamConfig;
2428

0 commit comments

Comments
 (0)