Skip to content

Commit cc32653

Browse files
authored
Generate the property type for generated objects (#1467)
1 parent b339f5b commit cc32653

26 files changed

+253
-0
lines changed

src/Result/BatchGetBuildsOutput.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,15 @@ class BatchGetBuildsOutput extends Result
3131
{
3232
/**
3333
* Information about the requested builds.
34+
*
35+
* @var Build[]
3436
*/
3537
private $builds;
3638

3739
/**
3840
* The IDs of builds for which information could not be found.
41+
*
42+
* @var string[]
3943
*/
4044
private $buildsNotFound;
4145

src/Result/StartBuildOutput.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ class StartBuildOutput extends Result
3131
{
3232
/**
3333
* Information about the build to be run.
34+
*
35+
* @var Build|null
3436
*/
3537
private $build;
3638

src/Result/StopBuildOutput.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ class StopBuildOutput extends Result
3131
{
3232
/**
3333
* Information about the build.
34+
*
35+
* @var Build|null
3436
*/
3537
private $build;
3638

src/ValueObject/Build.php

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,32 +11,44 @@ final class Build
1111
{
1212
/**
1313
* The unique ID for the build.
14+
*
15+
* @var string|null
1416
*/
1517
private $id;
1618

1719
/**
1820
* The Amazon Resource Name (ARN) of the build.
21+
*
22+
* @var string|null
1923
*/
2024
private $arn;
2125

2226
/**
2327
* The number of the build. For each project, the `buildNumber` of its first build is `1`. The `buildNumber` of each
2428
* subsequent build is incremented by `1`. If a build is deleted, the `buildNumber` of other builds does not change.
29+
*
30+
* @var int|null
2531
*/
2632
private $buildNumber;
2733

2834
/**
2935
* When the build process started, expressed in Unix time format.
36+
*
37+
* @var \DateTimeImmutable|null
3038
*/
3139
private $startTime;
3240

3341
/**
3442
* When the build process ended, expressed in Unix time format.
43+
*
44+
* @var \DateTimeImmutable|null
3545
*/
3646
private $endTime;
3747

3848
/**
3949
* The current build phase.
50+
*
51+
* @var string|null
4052
*/
4153
private $currentPhase;
4254

@@ -49,6 +61,8 @@ final class Build
4961
* - `STOPPED`: The build stopped.
5062
* - `SUCCEEDED`: The build succeeded.
5163
* - `TIMED_OUT`: The build timed out.
64+
*
65+
* @var StatusType::*|null
5266
*/
5367
private $buildStatus;
5468

@@ -59,6 +73,8 @@ final class Build
5973
* For more information, see Source Version Sample with CodeBuild [^1] in the *CodeBuild User Guide*.
6074
*
6175
* [^1]: https://docs.aws.amazon.com/codebuild/latest/userguide/sample-source-version.html
76+
*
77+
* @var string|null
6278
*/
6379
private $sourceVersion;
6480

@@ -68,27 +84,37 @@ final class Build
6884
* - For CodeCommit, GitHub, GitHub Enterprise, and BitBucket, the commit ID.
6985
* - For CodePipeline, the source revision provided by CodePipeline.
7086
* - For Amazon S3, this does not apply.
87+
*
88+
* @var string|null
7189
*/
7290
private $resolvedSourceVersion;
7391

7492
/**
7593
* The name of the CodeBuild project.
94+
*
95+
* @var string|null
7696
*/
7797
private $projectName;
7898

7999
/**
80100
* Information about all previous build phases that are complete and information about any current build phase that is
81101
* not yet complete.
102+
*
103+
* @var BuildPhase[]|null
82104
*/
83105
private $phases;
84106

85107
/**
86108
* Information about the source code to be built.
109+
*
110+
* @var ProjectSource|null
87111
*/
88112
private $source;
89113

90114
/**
91115
* An array of `ProjectSource` objects.
116+
*
117+
* @var ProjectSource[]|null
92118
*/
93119
private $secondarySources;
94120

@@ -104,51 +130,71 @@ final class Build
104130
* to build. If a branch name is specified, the branch's HEAD commit ID is used. If not specified, the default
105131
* branch's HEAD commit ID is used.
106132
* - For Amazon S3: the version ID of the object that represents the build input ZIP file to use.
133+
*
134+
* @var ProjectSourceVersion[]|null
107135
*/
108136
private $secondarySourceVersions;
109137

110138
/**
111139
* Information about the output artifacts for the build.
140+
*
141+
* @var BuildArtifacts|null
112142
*/
113143
private $artifacts;
114144

115145
/**
116146
* An array of `ProjectArtifacts` objects.
147+
*
148+
* @var BuildArtifacts[]|null
117149
*/
118150
private $secondaryArtifacts;
119151

120152
/**
121153
* Information about the cache for the build.
154+
*
155+
* @var ProjectCache|null
122156
*/
123157
private $cache;
124158

125159
/**
126160
* Information about the build environment for this build.
161+
*
162+
* @var ProjectEnvironment|null
127163
*/
128164
private $environment;
129165

130166
/**
131167
* The name of a service role used for this build.
168+
*
169+
* @var string|null
132170
*/
133171
private $serviceRole;
134172

135173
/**
136174
* Information about the build's logs in CloudWatch Logs.
175+
*
176+
* @var LogsLocation|null
137177
*/
138178
private $logs;
139179

140180
/**
141181
* How long, in minutes, for CodeBuild to wait before timing out this build if it does not get marked as completed.
182+
*
183+
* @var int|null
142184
*/
143185
private $timeoutInMinutes;
144186

145187
/**
146188
* The number of minutes a build is allowed to be queued before it times out.
189+
*
190+
* @var int|null
147191
*/
148192
private $queuedTimeoutInMinutes;
149193

150194
/**
151195
* Whether the build is complete. True if complete; otherwise, false.
196+
*
197+
* @var bool|null
152198
*/
153199
private $buildComplete;
154200

@@ -158,18 +204,24 @@ final class Build
158204
* - If CodePipeline started the build, the pipeline's name (for example, `codepipeline/my-demo-pipeline`).
159205
* - If an IAM user started the build, the user's name (for example, `MyUserName`).
160206
* - If the Jenkins plugin for CodeBuild started the build, the string `CodeBuild-Jenkins-Plugin`.
207+
*
208+
* @var string|null
161209
*/
162210
private $initiator;
163211

164212
/**
165213
* If your CodeBuild project accesses resources in an Amazon VPC, you provide this parameter that identifies the VPC ID
166214
* and the list of security group IDs and subnet IDs. The security groups and subnets must belong to the same VPC. You
167215
* must provide at least one security group and one subnet ID.
216+
*
217+
* @var VpcConfig|null
168218
*/
169219
private $vpcConfig;
170220

171221
/**
172222
* Describes a network interface.
223+
*
224+
* @var NetworkInterface|null
173225
*/
174226
private $networkInterface;
175227

@@ -181,6 +233,8 @@ final class Build
181233
*
182234
* You can specify either the Amazon Resource Name (ARN) of the CMK or, if available, the CMK's alias (using the format
183235
* `alias/<alias-name>`).
236+
*
237+
* @var string|null
184238
*/
185239
private $encryptionKey;
186240

@@ -192,28 +246,38 @@ final class Build
192246
* the *CodePipeline User Guide*.
193247
*
194248
* [^1]: https://docs.aws.amazon.com/codepipeline/latest/userguide/actions-variables.html
249+
*
250+
* @var ExportedEnvironmentVariable[]|null
195251
*/
196252
private $exportedEnvironmentVariables;
197253

198254
/**
199255
* An array of the ARNs associated with this build's reports.
256+
*
257+
* @var string[]|null
200258
*/
201259
private $reportArns;
202260

203261
/**
204262
* An array of `ProjectFileSystemLocation` objects for a CodeBuild build project. A `ProjectFileSystemLocation` object
205263
* specifies the `identifier`, `location`, `mountOptions`, `mountPoint`, and `type` of a file system created using
206264
* Amazon Elastic File System.
265+
*
266+
* @var ProjectFileSystemLocation[]|null
207267
*/
208268
private $fileSystemLocations;
209269

210270
/**
211271
* Contains information about the debug session for this build.
272+
*
273+
* @var DebugSession|null
212274
*/
213275
private $debugSession;
214276

215277
/**
216278
* The ARN of the batch build that this build is a member of, if applicable.
279+
*
280+
* @var string|null
217281
*/
218282
private $buildBatchArn;
219283

src/ValueObject/BuildArtifacts.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ final class BuildArtifacts
1111
{
1212
/**
1313
* Information about the location of the build artifacts.
14+
*
15+
* @var string|null
1416
*/
1517
private $location;
1618

@@ -20,6 +22,8 @@ final class BuildArtifacts
2022
* You can use this hash along with a checksum tool to confirm file integrity and authenticity.
2123
*
2224
* > This value is available only if the build project's `packaging` value is set to `ZIP`.
25+
*
26+
* @var string|null
2327
*/
2428
private $sha256sum;
2529

@@ -29,26 +33,37 @@ final class BuildArtifacts
2933
* You can use this hash along with a checksum tool to confirm file integrity and authenticity.
3034
*
3135
* > This value is available only if the build project's `packaging` value is set to `ZIP`.
36+
*
37+
* @var string|null
3238
*/
3339
private $md5sum;
3440

3541
/**
3642
* If this flag is set, a name specified in the buildspec file overrides the artifact name. The name specified in a
3743
* buildspec file is calculated at build time and uses the Shell Command Language. For example, you can append a date
3844
* and time to your artifact name so that it is always unique.
45+
*
46+
* @var bool|null
3947
*/
4048
private $overrideArtifactName;
4149

4250
/**
4351
* Information that tells you if encryption for build artifacts is disabled.
52+
*
53+
* @var bool|null
4454
*/
4555
private $encryptionDisabled;
4656

4757
/**
4858
* An identifier for this artifact definition.
59+
*
60+
* @var string|null
4961
*/
5062
private $artifactIdentifier;
5163

64+
/**
65+
* @var BucketOwnerAccess::*|null
66+
*/
5267
private $bucketOwnerAccess;
5368

5469
/**

src/ValueObject/BuildPhase.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ final class BuildPhase
4646
* - `UPLOAD_ARTIFACTS`:
4747
*
4848
* Build output artifacts are being uploaded to the output location.
49+
*
50+
* @var BuildPhaseType::*|null
4951
*/
5052
private $phaseType;
5153

@@ -70,26 +72,36 @@ final class BuildPhase
7072
* - `TIMED_OUT`:
7173
*
7274
* The build phase timed out.
75+
*
76+
* @var StatusType::*|null
7377
*/
7478
private $phaseStatus;
7579

7680
/**
7781
* When the build phase started, expressed in Unix time format.
82+
*
83+
* @var \DateTimeImmutable|null
7884
*/
7985
private $startTime;
8086

8187
/**
8288
* When the build phase ended, expressed in Unix time format.
89+
*
90+
* @var \DateTimeImmutable|null
8391
*/
8492
private $endTime;
8593

8694
/**
8795
* How long, in seconds, between the starting and ending times of the build's phase.
96+
*
97+
* @var int|null
8898
*/
8999
private $durationInSeconds;
90100

91101
/**
92102
* Additional information about a build phase, especially to help troubleshoot a failed build.
103+
*
104+
* @var PhaseContext[]|null
93105
*/
94106
private $contexts;
95107

src/ValueObject/BuildStatusConfig.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ final class BuildStatusConfig
2222
*
2323
* [^1]: https://developer.atlassian.com/bitbucket/api/2/reference/resource/repositories/%7Bworkspace%7D/%7Brepo_slug%7D/commit/%7Bnode%7D/statuses/build
2424
* [^2]: https://developer.github.com/v3/repos/statuses/#create-a-commit-status
25+
*
26+
* @var string|null
2527
*/
2628
private $context;
2729

@@ -40,6 +42,8 @@ final class BuildStatusConfig
4042
*
4143
* [^1]: https://developer.atlassian.com/bitbucket/api/2/reference/resource/repositories/%7Bworkspace%7D/%7Brepo_slug%7D/commit/%7Bnode%7D/statuses/build
4244
* [^2]: https://developer.github.com/v3/repos/statuses/#create-a-commit-status
45+
*
46+
* @var string|null
4347
*/
4448
private $targetUrl;
4549

0 commit comments

Comments
 (0)