Skip to content

Commit ba8e052

Browse files
Update generated code (#1654)
update generated code
1 parent 6db97f2 commit ba8e052

File tree

9 files changed

+139
-5
lines changed

9 files changed

+139
-5
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
## NOT RELEASED
44

5+
### Added
6+
7+
- AWS api-change: Release CodeBuild Reserved Capacity feature
8+
59
## 2.2.0
610

711
### Added

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
},
2929
"extra": {
3030
"branch-alias": {
31-
"dev-master": "2.2-dev"
31+
"dev-master": "2.3-dev"
3232
}
3333
}
3434
}

src/CodeBuildClient.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
use AsyncAws\CodeBuild\ValueObject\LogsConfig;
2222
use AsyncAws\CodeBuild\ValueObject\ProjectArtifacts;
2323
use AsyncAws\CodeBuild\ValueObject\ProjectCache;
24+
use AsyncAws\CodeBuild\ValueObject\ProjectFleet;
2425
use AsyncAws\CodeBuild\ValueObject\ProjectSource;
2526
use AsyncAws\CodeBuild\ValueObject\ProjectSourceVersion;
2627
use AsyncAws\CodeBuild\ValueObject\RegistryCredential;
@@ -94,6 +95,7 @@ public function batchGetBuilds($input): BatchGetBuildsOutput
9495
* registryCredentialOverride?: null|RegistryCredential|array,
9596
* imagePullCredentialsTypeOverride?: null|ImagePullCredentialsType::*,
9697
* debugSessionEnabled?: null|bool,
98+
* fleetOverride?: null|ProjectFleet|array,
9799
* '@region'?: string|null,
98100
* }|StartBuildInput $input
99101
*

src/Input/StartBuildInput.php

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
use AsyncAws\CodeBuild\ValueObject\LogsConfig;
1313
use AsyncAws\CodeBuild\ValueObject\ProjectArtifacts;
1414
use AsyncAws\CodeBuild\ValueObject\ProjectCache;
15+
use AsyncAws\CodeBuild\ValueObject\ProjectFleet;
1516
use AsyncAws\CodeBuild\ValueObject\ProjectSource;
1617
use AsyncAws\CodeBuild\ValueObject\ProjectSourceVersion;
1718
use AsyncAws\CodeBuild\ValueObject\RegistryCredential;
@@ -319,6 +320,13 @@ final class StartBuildInput extends Input
319320
*/
320321
private $debugSessionEnabled;
321322

323+
/**
324+
* A ProjectFleet object specified for this build that overrides the one defined in the build project.
325+
*
326+
* @var ProjectFleet|null
327+
*/
328+
private $fleetOverride;
329+
322330
/**
323331
* @param array{
324332
* projectName?: string,
@@ -352,6 +360,7 @@ final class StartBuildInput extends Input
352360
* registryCredentialOverride?: null|RegistryCredential|array,
353361
* imagePullCredentialsTypeOverride?: null|ImagePullCredentialsType::*,
354362
* debugSessionEnabled?: null|bool,
363+
* fleetOverride?: null|ProjectFleet|array,
355364
* '@region'?: string|null,
356365
* } $input
357366
*/
@@ -388,6 +397,7 @@ public function __construct(array $input = [])
388397
$this->registryCredentialOverride = isset($input['registryCredentialOverride']) ? RegistryCredential::create($input['registryCredentialOverride']) : null;
389398
$this->imagePullCredentialsTypeOverride = $input['imagePullCredentialsTypeOverride'] ?? null;
390399
$this->debugSessionEnabled = $input['debugSessionEnabled'] ?? null;
400+
$this->fleetOverride = isset($input['fleetOverride']) ? ProjectFleet::create($input['fleetOverride']) : null;
391401
parent::__construct($input);
392402
}
393403

@@ -424,6 +434,7 @@ public function __construct(array $input = [])
424434
* registryCredentialOverride?: null|RegistryCredential|array,
425435
* imagePullCredentialsTypeOverride?: null|ImagePullCredentialsType::*,
426436
* debugSessionEnabled?: null|bool,
437+
* fleetOverride?: null|ProjectFleet|array,
427438
* '@region'?: string|null,
428439
* }|StartBuildInput $input
429440
*/
@@ -491,6 +502,11 @@ public function getEnvironmentVariablesOverride(): array
491502
return $this->environmentVariablesOverride ?? [];
492503
}
493504

505+
public function getFleetOverride(): ?ProjectFleet
506+
{
507+
return $this->fleetOverride;
508+
}
509+
494510
public function getGitCloneDepthOverride(): ?int
495511
{
496512
return $this->gitCloneDepthOverride;
@@ -715,6 +731,13 @@ public function setEnvironmentVariablesOverride(array $value): self
715731
return $this;
716732
}
717733

734+
public function setFleetOverride(?ProjectFleet $value): self
735+
{
736+
$this->fleetOverride = $value;
737+
738+
return $this;
739+
}
740+
718741
public function setGitCloneDepthOverride(?int $value): self
719742
{
720743
$this->gitCloneDepthOverride = $value;
@@ -1006,6 +1029,9 @@ private function requestBody(): array
10061029
if (null !== $v = $this->debugSessionEnabled) {
10071030
$payload['debugSessionEnabled'] = (bool) $v;
10081031
}
1032+
if (null !== $v = $this->fleetOverride) {
1033+
$payload['fleetOverride'] = $v->requestBody();
1034+
}
10091035

10101036
return $payload;
10111037
}

src/Result/BatchGetBuildsOutput.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
use AsyncAws\CodeBuild\ValueObject\ProjectCache;
1919
use AsyncAws\CodeBuild\ValueObject\ProjectEnvironment;
2020
use AsyncAws\CodeBuild\ValueObject\ProjectFileSystemLocation;
21+
use AsyncAws\CodeBuild\ValueObject\ProjectFleet;
2122
use AsyncAws\CodeBuild\ValueObject\ProjectSource;
2223
use AsyncAws\CodeBuild\ValueObject\ProjectSourceVersion;
2324
use AsyncAws\CodeBuild\ValueObject\RegistryCredential;
@@ -354,6 +355,7 @@ private function populateResultProjectEnvironment(array $json): ProjectEnvironme
354355
'type' => (string) $json['type'],
355356
'image' => (string) $json['image'],
356357
'computeType' => (string) $json['computeType'],
358+
'fleet' => empty($json['fleet']) ? null : $this->populateResultProjectFleet($json['fleet']),
357359
'environmentVariables' => !isset($json['environmentVariables']) ? null : $this->populateResultEnvironmentVariables($json['environmentVariables']),
358360
'privilegedMode' => isset($json['privilegedMode']) ? filter_var($json['privilegedMode'], \FILTER_VALIDATE_BOOLEAN) : null,
359361
'certificate' => isset($json['certificate']) ? (string) $json['certificate'] : null,
@@ -386,6 +388,13 @@ private function populateResultProjectFileSystemLocations(array $json): array
386388
return $items;
387389
}
388390

391+
private function populateResultProjectFleet(array $json): ProjectFleet
392+
{
393+
return new ProjectFleet([
394+
'fleetArn' => isset($json['fleetArn']) ? (string) $json['fleetArn'] : null,
395+
]);
396+
}
397+
389398
/**
390399
* @return ProjectSourceVersion[]
391400
*/

src/Result/StartBuildOutput.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
use AsyncAws\CodeBuild\ValueObject\ProjectCache;
1919
use AsyncAws\CodeBuild\ValueObject\ProjectEnvironment;
2020
use AsyncAws\CodeBuild\ValueObject\ProjectFileSystemLocation;
21+
use AsyncAws\CodeBuild\ValueObject\ProjectFleet;
2122
use AsyncAws\CodeBuild\ValueObject\ProjectSource;
2223
use AsyncAws\CodeBuild\ValueObject\ProjectSourceVersion;
2324
use AsyncAws\CodeBuild\ValueObject\RegistryCredential;
@@ -304,6 +305,7 @@ private function populateResultProjectEnvironment(array $json): ProjectEnvironme
304305
'type' => (string) $json['type'],
305306
'image' => (string) $json['image'],
306307
'computeType' => (string) $json['computeType'],
308+
'fleet' => empty($json['fleet']) ? null : $this->populateResultProjectFleet($json['fleet']),
307309
'environmentVariables' => !isset($json['environmentVariables']) ? null : $this->populateResultEnvironmentVariables($json['environmentVariables']),
308310
'privilegedMode' => isset($json['privilegedMode']) ? filter_var($json['privilegedMode'], \FILTER_VALIDATE_BOOLEAN) : null,
309311
'certificate' => isset($json['certificate']) ? (string) $json['certificate'] : null,
@@ -336,6 +338,13 @@ private function populateResultProjectFileSystemLocations(array $json): array
336338
return $items;
337339
}
338340

341+
private function populateResultProjectFleet(array $json): ProjectFleet
342+
{
343+
return new ProjectFleet([
344+
'fleetArn' => isset($json['fleetArn']) ? (string) $json['fleetArn'] : null,
345+
]);
346+
}
347+
339348
/**
340349
* @return ProjectSourceVersion[]
341350
*/

src/Result/StopBuildOutput.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
use AsyncAws\CodeBuild\ValueObject\ProjectCache;
1919
use AsyncAws\CodeBuild\ValueObject\ProjectEnvironment;
2020
use AsyncAws\CodeBuild\ValueObject\ProjectFileSystemLocation;
21+
use AsyncAws\CodeBuild\ValueObject\ProjectFleet;
2122
use AsyncAws\CodeBuild\ValueObject\ProjectSource;
2223
use AsyncAws\CodeBuild\ValueObject\ProjectSourceVersion;
2324
use AsyncAws\CodeBuild\ValueObject\RegistryCredential;
@@ -304,6 +305,7 @@ private function populateResultProjectEnvironment(array $json): ProjectEnvironme
304305
'type' => (string) $json['type'],
305306
'image' => (string) $json['image'],
306307
'computeType' => (string) $json['computeType'],
308+
'fleet' => empty($json['fleet']) ? null : $this->populateResultProjectFleet($json['fleet']),
307309
'environmentVariables' => !isset($json['environmentVariables']) ? null : $this->populateResultEnvironmentVariables($json['environmentVariables']),
308310
'privilegedMode' => isset($json['privilegedMode']) ? filter_var($json['privilegedMode'], \FILTER_VALIDATE_BOOLEAN) : null,
309311
'certificate' => isset($json['certificate']) ? (string) $json['certificate'] : null,
@@ -336,6 +338,13 @@ private function populateResultProjectFileSystemLocations(array $json): array
336338
return $items;
337339
}
338340

341+
private function populateResultProjectFleet(array $json): ProjectFleet
342+
{
343+
return new ProjectFleet([
344+
'fleetArn' => isset($json['fleetArn']) ? (string) $json['fleetArn'] : null,
345+
]);
346+
}
347+
339348
/**
340349
* @return ProjectSourceVersion[]
341350
*/

src/ValueObject/ProjectEnvironment.php

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,9 @@ final class ProjectEnvironment
1717
*
1818
* - The environment type `ARM_CONTAINER` is available only in regions US East (N. Virginia), US East (Ohio), US West
1919
* (Oregon), EU (Ireland), Asia Pacific (Mumbai), Asia Pacific (Tokyo), Asia Pacific (Sydney), and EU (Frankfurt).
20-
* - The environment type `LINUX_CONTAINER` with compute type `build.general1.2xlarge` is available only in regions US
21-
* East (N. Virginia), US East (Ohio), US West (Oregon), Canada (Central), EU (Ireland), EU (London), EU (Frankfurt),
22-
* Asia Pacific (Tokyo), Asia Pacific (Seoul), Asia Pacific (Singapore), Asia Pacific (Sydney), China (Beijing), and
23-
* China (Ningxia).
20+
* - The environment type `LINUX_CONTAINER` is available only in regions US East (N. Virginia), US East (Ohio), US West
21+
* (Oregon), Canada (Central), EU (Ireland), EU (London), EU (Frankfurt), Asia Pacific (Tokyo), Asia Pacific (Seoul),
22+
* Asia Pacific (Singapore), Asia Pacific (Sydney), China (Beijing), and China (Ningxia).
2423
* - The environment type `LINUX_GPU_CONTAINER` is available only in regions US East (N. Virginia), US East (Ohio), US
2524
* West (Oregon), Canada (Central), EU (Ireland), EU (London), EU (Frankfurt), Asia Pacific (Tokyo), Asia Pacific
2625
* (Seoul), Asia Pacific (Singapore), Asia Pacific (Sydney) , China (Beijing), and China (Ningxia).
@@ -32,6 +31,8 @@ final class ProjectEnvironment
3231
* - The environment types `WINDOWS_CONTAINER` and `WINDOWS_SERVER_2019_CONTAINER` are available only in regions US East
3332
* (N. Virginia), US East (Ohio), US West (Oregon), and EU (Ireland).
3433
*
34+
* > If you're using compute fleets during project creation, `type` will be ignored.
35+
*
3536
* For more information, see Build environment compute types [^1] in the *CodeBuild user guide*.
3637
*
3738
* [^1]: https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-compute-types.html
@@ -93,6 +94,8 @@ final class ProjectEnvironment
9394
* - For environment type `ARM_CONTAINER`, you can use up to 16 GB memory and 8 vCPUs on ARM-based processors for
9495
* builds.
9596
*
97+
* > If you're using compute fleets during project creation, `computeType` will be ignored.
98+
*
9699
* For more information, see Build Environment Compute Types [^1] in the *CodeBuild User Guide.*
97100
*
98101
* [^1]: https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-compute-types.html
@@ -101,6 +104,13 @@ final class ProjectEnvironment
101104
*/
102105
private $computeType;
103106

107+
/**
108+
* A ProjectFleet object to use for this build project.
109+
*
110+
* @var ProjectFleet|null
111+
*/
112+
private $fleet;
113+
104114
/**
105115
* A set of environment variables to make available to builds for this build project.
106116
*
@@ -171,6 +181,7 @@ final class ProjectEnvironment
171181
* type: EnvironmentType::*,
172182
* image: string,
173183
* computeType: ComputeType::*,
184+
* fleet?: null|ProjectFleet|array,
174185
* environmentVariables?: null|array<EnvironmentVariable|array>,
175186
* privilegedMode?: null|bool,
176187
* certificate?: null|string,
@@ -183,6 +194,7 @@ public function __construct(array $input)
183194
$this->type = $input['type'] ?? $this->throwException(new InvalidArgument('Missing required field "type".'));
184195
$this->image = $input['image'] ?? $this->throwException(new InvalidArgument('Missing required field "image".'));
185196
$this->computeType = $input['computeType'] ?? $this->throwException(new InvalidArgument('Missing required field "computeType".'));
197+
$this->fleet = isset($input['fleet']) ? ProjectFleet::create($input['fleet']) : null;
186198
$this->environmentVariables = isset($input['environmentVariables']) ? array_map([EnvironmentVariable::class, 'create'], $input['environmentVariables']) : null;
187199
$this->privilegedMode = $input['privilegedMode'] ?? null;
188200
$this->certificate = $input['certificate'] ?? null;
@@ -195,6 +207,7 @@ public function __construct(array $input)
195207
* type: EnvironmentType::*,
196208
* image: string,
197209
* computeType: ComputeType::*,
210+
* fleet?: null|ProjectFleet|array,
198211
* environmentVariables?: null|array<EnvironmentVariable|array>,
199212
* privilegedMode?: null|bool,
200213
* certificate?: null|string,
@@ -228,6 +241,11 @@ public function getEnvironmentVariables(): array
228241
return $this->environmentVariables ?? [];
229242
}
230243

244+
public function getFleet(): ?ProjectFleet
245+
{
246+
return $this->fleet;
247+
}
248+
231249
public function getImage(): string
232250
{
233251
return $this->image;

src/ValueObject/ProjectFleet.php

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
<?php
2+
3+
namespace AsyncAws\CodeBuild\ValueObject;
4+
5+
/**
6+
* Information about the compute fleet of the build project. For more information, see Working with reserved capacity in
7+
* CodeBuild [^1].
8+
*
9+
* [^1]: https://docs.aws.amazon.com/codebuild/latest/userguide/fleets.html
10+
*/
11+
final class ProjectFleet
12+
{
13+
/**
14+
* Specifies the compute fleet ARN for the build project.
15+
*
16+
* @var string|null
17+
*/
18+
private $fleetArn;
19+
20+
/**
21+
* @param array{
22+
* fleetArn?: null|string,
23+
* } $input
24+
*/
25+
public function __construct(array $input)
26+
{
27+
$this->fleetArn = $input['fleetArn'] ?? null;
28+
}
29+
30+
/**
31+
* @param array{
32+
* fleetArn?: null|string,
33+
* }|ProjectFleet $input
34+
*/
35+
public static function create($input): self
36+
{
37+
return $input instanceof self ? $input : new self($input);
38+
}
39+
40+
public function getFleetArn(): ?string
41+
{
42+
return $this->fleetArn;
43+
}
44+
45+
/**
46+
* @internal
47+
*/
48+
public function requestBody(): array
49+
{
50+
$payload = [];
51+
if (null !== $v = $this->fleetArn) {
52+
$payload['fleetArn'] = $v;
53+
}
54+
55+
return $payload;
56+
}
57+
}

0 commit comments

Comments
 (0)