Skip to content

Commit ae9e04c

Browse files
committed
Document all object properties as nullable
The generated objects are performing delayed validation for the required properties, so they still accept null.
1 parent b05e5c3 commit ae9e04c

File tree

264 files changed

+537
-536
lines changed

Some content is hidden

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

264 files changed

+537
-536
lines changed

src/CodeGenerator/src/Generator/ObjectGenerator.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,8 @@ private function addProperties(StructureShape $shape, ClassBuilder $classBuilder
311311
}
312312
$method->setReturnNullable($nullable);
313313
if ($parameterType) {
314-
$property->addComment('@var ' . $parameterType . ($nullable ? '|null' : ''));
314+
// Properties are always documented as nullable due to the delayed validation.
315+
$property->addComment('@var ' . $parameterType . '|null');
315316
}
316317
}
317318

src/Core/src/Sts/ValueObject/AssumedRoleUser.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ final class AssumedRoleUser
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.
1313
*
14-
* @var string
14+
* @var string|null
1515
*/
1616
private $assumedRoleId;
1717

@@ -21,7 +21,7 @@ final class AssumedRoleUser
2121
*
2222
* [^1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html
2323
*
24-
* @var string
24+
* @var string|null
2525
*/
2626
private $arn;
2727

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,28 +10,28 @@ final class Credentials
1010
/**
1111
* The access key ID that identifies the temporary security credentials.
1212
*
13-
* @var string
13+
* @var string|null
1414
*/
1515
private $accessKeyId;
1616

1717
/**
1818
* The secret access key that can be used to sign requests.
1919
*
20-
* @var string
20+
* @var string|null
2121
*/
2222
private $secretAccessKey;
2323

2424
/**
2525
* The token that users must pass to the service API to use the temporary credentials.
2626
*
27-
* @var string
27+
* @var string|null
2828
*/
2929
private $sessionToken;
3030

3131
/**
3232
* The date on which the current credentials expire.
3333
*
34-
* @var \DateTimeImmutable
34+
* @var \DateTimeImmutable|null
3535
*/
3636
private $expiration;
3737

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ final class Tag
2121
*
2222
* [^1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-limits.html#reference_iam-limits-entity-length
2323
*
24-
* @var string
24+
* @var string|null
2525
*/
2626
private $key;
2727

@@ -33,7 +33,7 @@ final class Tag
3333
*
3434
* [^1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-limits.html#reference_iam-limits-entity-length
3535
*
36-
* @var string
36+
* @var string|null
3737
*/
3838
private $value;
3939

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@ final class AppSyncRuntime
1515
/**
1616
* The `name` of the runtime to use. Currently, the only allowed value is `APPSYNC_JS`.
1717
*
18-
* @var RuntimeName::*
18+
* @var RuntimeName::*|null
1919
*/
2020
private $name;
2121

2222
/**
2323
* The `version` of the runtime to use. Currently, the only allowed version is `1.0.0`.
2424
*
25-
* @var string
25+
* @var string|null
2626
*/
2727
private $runtimeVersion;
2828

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ final class AuthorizationConfig
1515
*
1616
* - **AWS_IAM**: The authorization type is Signature Version 4 (SigV4).
1717
*
18-
* @var AuthorizationType::*
18+
* @var AuthorizationType::*|null
1919
*/
2020
private $authorizationType;
2121

src/Service/AppSync/src/ValueObject/BadRequestDetail.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ final class BadRequestDetail
1111
/**
1212
* Contains the list of errors in the request.
1313
*
14-
* @var CodeError[]
14+
* @var CodeError[]|null
1515
*/
1616
private $codeErrors;
1717

src/Service/AppSync/src/ValueObject/CachingConfig.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ final class CachingConfig
1414
*
1515
* Valid values are 1–3,600 seconds.
1616
*
17-
* @var string
17+
* @var string|null
1818
*/
1919
private $ttl;
2020

@@ -23,7 +23,7 @@ final class CachingConfig
2323
*
2424
* Valid values are entries from the `$context.arguments`, `$context.source`, and `$context.identity` maps.
2525
*
26-
* @var string[]
26+
* @var string[]|null
2727
*/
2828
private $cachingKeys;
2929

src/Service/AppSync/src/ValueObject/DynamodbDataSourceConfig.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@ final class DynamodbDataSourceConfig
1212
/**
1313
* The table name.
1414
*
15-
* @var string
15+
* @var string|null
1616
*/
1717
private $tableName;
1818

1919
/**
2020
* The Amazon Web Services Region.
2121
*
22-
* @var string
22+
* @var string|null
2323
*/
2424
private $awsRegion;
2525

src/Service/AppSync/src/ValueObject/ElasticsearchDataSourceConfig.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@ final class ElasticsearchDataSourceConfig
1515
/**
1616
* The endpoint.
1717
*
18-
* @var string
18+
* @var string|null
1919
*/
2020
private $endpoint;
2121

2222
/**
2323
* The Amazon Web Services Region.
2424
*
25-
* @var string
25+
* @var string|null
2626
*/
2727
private $awsRegion;
2828

0 commit comments

Comments
 (0)