Skip to content

Commit 7fe4a95

Browse files
authored
Generate the phpdoc for the static create method of objects (#1464)
1 parent 8ecc323 commit 7fe4a95

29 files changed

+225
-0
lines changed

src/Input/CreateDeploymentInput.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,22 @@ public function __construct(array $input = [])
166166
parent::__construct($input);
167167
}
168168

169+
/**
170+
* @param array{
171+
* applicationName?: string,
172+
* deploymentGroupName?: string,
173+
* revision?: RevisionLocation|array,
174+
* deploymentConfigName?: string,
175+
* description?: string,
176+
* ignoreApplicationStopFailures?: bool,
177+
* targetInstances?: TargetInstances|array,
178+
* autoRollbackConfiguration?: AutoRollbackConfiguration|array,
179+
* updateOutdatedInstancesOnly?: bool,
180+
* fileExistsBehavior?: FileExistsBehavior::*,
181+
* overrideAlarmConfiguration?: AlarmConfiguration|array,
182+
* '@region'?: string|null,
183+
* }|CreateDeploymentInput $input
184+
*/
169185
public static function create($input): self
170186
{
171187
return $input instanceof self ? $input : new self($input);

src/Input/GetDeploymentInput.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,12 @@ public function __construct(array $input = [])
3333
parent::__construct($input);
3434
}
3535

36+
/**
37+
* @param array{
38+
* deploymentId?: string,
39+
* '@region'?: string|null,
40+
* }|GetDeploymentInput $input
41+
*/
3642
public static function create($input): self
3743
{
3844
return $input instanceof self ? $input : new self($input);

src/Input/PutLifecycleEventHookExecutionStatusInput.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,14 @@ public function __construct(array $input = [])
5050
parent::__construct($input);
5151
}
5252

53+
/**
54+
* @param array{
55+
* deploymentId?: string,
56+
* lifecycleEventHookExecutionId?: string,
57+
* status?: LifecycleEventStatus::*,
58+
* '@region'?: string|null,
59+
* }|PutLifecycleEventHookExecutionStatusInput $input
60+
*/
5361
public static function create($input): self
5462
{
5563
return $input instanceof self ? $input : new self($input);

src/ValueObject/Alarm.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@ public function __construct(array $input)
2222
$this->name = $input['name'] ?? null;
2323
}
2424

25+
/**
26+
* @param array{
27+
* name?: null|string,
28+
* }|Alarm $input
29+
*/
2530
public static function create($input): self
2631
{
2732
return $input instanceof self ? $input : new self($input);

src/ValueObject/AlarmConfiguration.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,13 @@ public function __construct(array $input)
4040
$this->alarms = isset($input['alarms']) ? array_map([Alarm::class, 'create'], $input['alarms']) : null;
4141
}
4242

43+
/**
44+
* @param array{
45+
* enabled?: null|bool,
46+
* ignorePollAlarmFailure?: null|bool,
47+
* alarms?: null|Alarm[],
48+
* }|AlarmConfiguration $input
49+
*/
4350
public static function create($input): self
4451
{
4552
return $input instanceof self ? $input : new self($input);

src/ValueObject/AppSpecContent.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,12 @@ public function __construct(array $input)
4141
$this->sha256 = $input['sha256'] ?? null;
4242
}
4343

44+
/**
45+
* @param array{
46+
* content?: null|string,
47+
* sha256?: null|string,
48+
* }|AppSpecContent $input
49+
*/
4450
public static function create($input): self
4551
{
4652
return $input instanceof self ? $input : new self($input);

src/ValueObject/AutoRollbackConfiguration.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,12 @@ public function __construct(array $input)
3333
$this->events = $input['events'] ?? null;
3434
}
3535

36+
/**
37+
* @param array{
38+
* enabled?: null|bool,
39+
* events?: null|list<AutoRollbackEvent::*>,
40+
* }|AutoRollbackConfiguration $input
41+
*/
3642
public static function create($input): self
3743
{
3844
return $input instanceof self ? $input : new self($input);

src/ValueObject/BlueGreenDeploymentConfiguration.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,13 @@ public function __construct(array $input)
3737
$this->greenFleetProvisioningOption = isset($input['greenFleetProvisioningOption']) ? GreenFleetProvisioningOption::create($input['greenFleetProvisioningOption']) : null;
3838
}
3939

40+
/**
41+
* @param array{
42+
* terminateBlueInstancesOnDeploymentSuccess?: null|BlueInstanceTerminationOption|array,
43+
* deploymentReadyOption?: null|DeploymentReadyOption|array,
44+
* greenFleetProvisioningOption?: null|GreenFleetProvisioningOption|array,
45+
* }|BlueGreenDeploymentConfiguration $input
46+
*/
4047
public static function create($input): self
4148
{
4249
return $input instanceof self ? $input : new self($input);

src/ValueObject/BlueInstanceTerminationOption.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,12 @@ public function __construct(array $input)
4242
$this->terminationWaitTimeInMinutes = $input['terminationWaitTimeInMinutes'] ?? null;
4343
}
4444

45+
/**
46+
* @param array{
47+
* action?: null|InstanceAction::*,
48+
* terminationWaitTimeInMinutes?: null|int,
49+
* }|BlueInstanceTerminationOption $input
50+
*/
4551
public static function create($input): self
4652
{
4753
return $input instanceof self ? $input : new self($input);

src/ValueObject/DeploymentInfo.php

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,40 @@ public function __construct(array $input)
260260
$this->overrideAlarmConfiguration = isset($input['overrideAlarmConfiguration']) ? AlarmConfiguration::create($input['overrideAlarmConfiguration']) : null;
261261
}
262262

263+
/**
264+
* @param array{
265+
* applicationName?: null|string,
266+
* deploymentGroupName?: null|string,
267+
* deploymentConfigName?: null|string,
268+
* deploymentId?: null|string,
269+
* previousRevision?: null|RevisionLocation|array,
270+
* revision?: null|RevisionLocation|array,
271+
* status?: null|DeploymentStatus::*,
272+
* errorInformation?: null|ErrorInformation|array,
273+
* createTime?: null|\DateTimeImmutable,
274+
* startTime?: null|\DateTimeImmutable,
275+
* completeTime?: null|\DateTimeImmutable,
276+
* deploymentOverview?: null|DeploymentOverview|array,
277+
* description?: null|string,
278+
* creator?: null|DeploymentCreator::*,
279+
* ignoreApplicationStopFailures?: null|bool,
280+
* autoRollbackConfiguration?: null|AutoRollbackConfiguration|array,
281+
* updateOutdatedInstancesOnly?: null|bool,
282+
* rollbackInfo?: null|RollbackInfo|array,
283+
* deploymentStyle?: null|DeploymentStyle|array,
284+
* targetInstances?: null|TargetInstances|array,
285+
* instanceTerminationWaitTimeStarted?: null|bool,
286+
* blueGreenDeploymentConfiguration?: null|BlueGreenDeploymentConfiguration|array,
287+
* loadBalancerInfo?: null|LoadBalancerInfo|array,
288+
* additionalDeploymentStatusInfo?: null|string,
289+
* fileExistsBehavior?: null|FileExistsBehavior::*,
290+
* deploymentStatusMessages?: null|string[],
291+
* computePlatform?: null|ComputePlatform::*,
292+
* externalId?: null|string,
293+
* relatedDeployments?: null|RelatedDeployments|array,
294+
* overrideAlarmConfiguration?: null|AlarmConfiguration|array,
295+
* }|DeploymentInfo $input
296+
*/
263297
public static function create($input): self
264298
{
265299
return $input instanceof self ? $input : new self($input);

src/ValueObject/DeploymentOverview.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,16 @@ public function __construct(array $input)
5757
$this->ready = $input['Ready'] ?? null;
5858
}
5959

60+
/**
61+
* @param array{
62+
* Pending?: null|string,
63+
* InProgress?: null|string,
64+
* Succeeded?: null|string,
65+
* Failed?: null|string,
66+
* Skipped?: null|string,
67+
* Ready?: null|string,
68+
* }|DeploymentOverview $input
69+
*/
6070
public static function create($input): self
6171
{
6272
return $input instanceof self ? $input : new self($input);

src/ValueObject/DeploymentReadyOption.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,12 @@ public function __construct(array $input)
3939
$this->waitTimeInMinutes = $input['waitTimeInMinutes'] ?? null;
4040
}
4141

42+
/**
43+
* @param array{
44+
* actionOnTimeout?: null|DeploymentReadyAction::*,
45+
* waitTimeInMinutes?: null|int,
46+
* }|DeploymentReadyOption $input
47+
*/
4248
public static function create($input): self
4349
{
4450
return $input instanceof self ? $input : new self($input);

src/ValueObject/DeploymentStyle.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,12 @@ public function __construct(array $input)
3333
$this->deploymentOption = $input['deploymentOption'] ?? null;
3434
}
3535

36+
/**
37+
* @param array{
38+
* deploymentType?: null|DeploymentType::*,
39+
* deploymentOption?: null|DeploymentOption::*,
40+
* }|DeploymentStyle $input
41+
*/
3642
public static function create($input): self
3743
{
3844
return $input instanceof self ? $input : new self($input);

src/ValueObject/EC2TagFilter.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,13 @@ public function __construct(array $input)
4343
$this->type = $input['Type'] ?? null;
4444
}
4545

46+
/**
47+
* @param array{
48+
* Key?: null|string,
49+
* Value?: null|string,
50+
* Type?: null|EC2TagFilterType::*,
51+
* }|EC2TagFilter $input
52+
*/
4653
public static function create($input): self
4754
{
4855
return $input instanceof self ? $input : new self($input);

src/ValueObject/EC2TagSet.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@ public function __construct(array $input)
2323
$this->ec2TagSetList = $input['ec2TagSetList'] ?? null;
2424
}
2525

26+
/**
27+
* @param array{
28+
* ec2TagSetList?: null|array[],
29+
* }|EC2TagSet $input
30+
*/
2631
public static function create($input): self
2732
{
2833
return $input instanceof self ? $input : new self($input);

src/ValueObject/ELBInfo.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@ public function __construct(array $input)
2626
$this->name = $input['name'] ?? null;
2727
}
2828

29+
/**
30+
* @param array{
31+
* name?: null|string,
32+
* }|ELBInfo $input
33+
*/
2934
public static function create($input): self
3035
{
3136
return $input instanceof self ? $input : new self($input);

src/ValueObject/ErrorInformation.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,12 @@ public function __construct(array $input)
5656
$this->message = $input['message'] ?? null;
5757
}
5858

59+
/**
60+
* @param array{
61+
* code?: null|ErrorCode::*,
62+
* message?: null|string,
63+
* }|ErrorInformation $input
64+
*/
5965
public static function create($input): self
6066
{
6167
return $input instanceof self ? $input : new self($input);

src/ValueObject/GitHubLocation.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,12 @@ public function __construct(array $input)
3232
$this->commitId = $input['commitId'] ?? null;
3333
}
3434

35+
/**
36+
* @param array{
37+
* repository?: null|string,
38+
* commitId?: null|string,
39+
* }|GitHubLocation $input
40+
*/
3541
public static function create($input): self
3642
{
3743
return $input instanceof self ? $input : new self($input);

src/ValueObject/GreenFleetProvisioningOption.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@ public function __construct(array $input)
2828
$this->action = $input['action'] ?? null;
2929
}
3030

31+
/**
32+
* @param array{
33+
* action?: null|GreenFleetProvisioningAction::*,
34+
* }|GreenFleetProvisioningOption $input
35+
*/
3136
public static function create($input): self
3237
{
3338
return $input instanceof self ? $input : new self($input);

src/ValueObject/LoadBalancerInfo.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,13 @@ public function __construct(array $input)
4242
$this->targetGroupPairInfoList = isset($input['targetGroupPairInfoList']) ? array_map([TargetGroupPairInfo::class, 'create'], $input['targetGroupPairInfoList']) : null;
4343
}
4444

45+
/**
46+
* @param array{
47+
* elbInfoList?: null|ELBInfo[],
48+
* targetGroupInfoList?: null|TargetGroupInfo[],
49+
* targetGroupPairInfoList?: null|TargetGroupPairInfo[],
50+
* }|LoadBalancerInfo $input
51+
*/
4552
public static function create($input): self
4653
{
4754
return $input instanceof self ? $input : new self($input);

src/ValueObject/RawString.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,12 @@ public function __construct(array $input)
3131
$this->sha256 = $input['sha256'] ?? null;
3232
}
3333

34+
/**
35+
* @param array{
36+
* content?: null|string,
37+
* sha256?: null|string,
38+
* }|RawString $input
39+
*/
3440
public static function create($input): self
3541
{
3642
return $input instanceof self ? $input : new self($input);

src/ValueObject/RelatedDeployments.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,12 @@ public function __construct(array $input)
2929
$this->autoUpdateOutdatedInstancesDeploymentIds = $input['autoUpdateOutdatedInstancesDeploymentIds'] ?? null;
3030
}
3131

32+
/**
33+
* @param array{
34+
* autoUpdateOutdatedInstancesRootDeploymentId?: null|string,
35+
* autoUpdateOutdatedInstancesDeploymentIds?: null|string[],
36+
* }|RelatedDeployments $input
37+
*/
3238
public static function create($input): self
3339
{
3440
return $input instanceof self ? $input : new self($input);

src/ValueObject/RevisionLocation.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,15 @@ public function __construct(array $input)
6060
$this->appSpecContent = isset($input['appSpecContent']) ? AppSpecContent::create($input['appSpecContent']) : null;
6161
}
6262

63+
/**
64+
* @param array{
65+
* revisionType?: null|RevisionLocationType::*,
66+
* s3Location?: null|S3Location|array,
67+
* gitHubLocation?: null|GitHubLocation|array,
68+
* string?: null|RawString|array,
69+
* appSpecContent?: null|AppSpecContent|array,
70+
* }|RevisionLocation $input
71+
*/
6372
public static function create($input): self
6473
{
6574
return $input instanceof self ? $input : new self($input);

src/ValueObject/RollbackInfo.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,13 @@ public function __construct(array $input)
3838
$this->rollbackMessage = $input['rollbackMessage'] ?? null;
3939
}
4040

41+
/**
42+
* @param array{
43+
* rollbackDeploymentId?: null|string,
44+
* rollbackTriggeringDeploymentId?: null|string,
45+
* rollbackMessage?: null|string,
46+
* }|RollbackInfo $input
47+
*/
4148
public static function create($input): self
4249
{
4350
return $input instanceof self ? $input : new self($input);

src/ValueObject/S3Location.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,15 @@ public function __construct(array $input)
6161
$this->eTag = $input['eTag'] ?? null;
6262
}
6363

64+
/**
65+
* @param array{
66+
* bucket?: null|string,
67+
* key?: null|string,
68+
* bundleType?: null|BundleType::*,
69+
* version?: null|string,
70+
* eTag?: null|string,
71+
* }|S3Location $input
72+
*/
6473
public static function create($input): self
6574
{
6675
return $input instanceof self ? $input : new self($input);

src/ValueObject/TargetGroupInfo.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@ public function __construct(array $input)
2626
$this->name = $input['name'] ?? null;
2727
}
2828

29+
/**
30+
* @param array{
31+
* name?: null|string,
32+
* }|TargetGroupInfo $input
33+
*/
2934
public static function create($input): self
3035
{
3136
return $input instanceof self ? $input : new self($input);

0 commit comments

Comments
 (0)