Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"variables": {
"${LATEST}": "3.342.15"
"${LATEST}": "3.342.16"
},
"endpoints": "https://raw.githubusercontent.com/aws/aws-sdk-php/${LATEST}/src/data/endpoints.json",
"services": {
Expand Down
4 changes: 4 additions & 0 deletions src/Service/CodeBuild/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## NOT RELEASED

### Added

- AWS api-change: This release adds support for cacheNamespace in ProjectCache

### Changed

- AWS enhancement: Documentation updates.
Expand Down
2 changes: 1 addition & 1 deletion src/Service/CodeBuild/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
},
"extra": {
"branch-alias": {
"dev-master": "2.8-dev"
"dev-master": "2.9-dev"
}
}
}
1 change: 1 addition & 0 deletions src/Service/CodeBuild/src/Result/BatchGetBuildsOutput.php
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,7 @@ private function populateResultProjectCache(array $json): ProjectCache
'type' => (string) $json['type'],
'location' => isset($json['location']) ? (string) $json['location'] : null,
'modes' => !isset($json['modes']) ? null : $this->populateResultProjectCacheModes($json['modes']),
'cacheNamespace' => isset($json['cacheNamespace']) ? (string) $json['cacheNamespace'] : null,
]);
}

Expand Down
1 change: 1 addition & 0 deletions src/Service/CodeBuild/src/Result/StartBuildOutput.php
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,7 @@ private function populateResultProjectCache(array $json): ProjectCache
'type' => (string) $json['type'],
'location' => isset($json['location']) ? (string) $json['location'] : null,
'modes' => !isset($json['modes']) ? null : $this->populateResultProjectCacheModes($json['modes']),
'cacheNamespace' => isset($json['cacheNamespace']) ? (string) $json['cacheNamespace'] : null,
]);
}

Expand Down
1 change: 1 addition & 0 deletions src/Service/CodeBuild/src/Result/StopBuildOutput.php
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,7 @@ private function populateResultProjectCache(array $json): ProjectCache
'type' => (string) $json['type'],
'location' => isset($json['location']) ? (string) $json['location'] : null,
'modes' => !isset($json['modes']) ? null : $this->populateResultProjectCacheModes($json['modes']),
'cacheNamespace' => isset($json['cacheNamespace']) ? (string) $json['cacheNamespace'] : null,
]);
}

Expand Down
21 changes: 21 additions & 0 deletions src/Service/CodeBuild/src/ValueObject/ProjectCache.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,32 +68,50 @@ final class ProjectCache
*/
private $modes;

/**
* Defines the scope of the cache. You can use this namespace to share a cache across multiple projects. For more
* information, see Cache sharing between projects [^1] in the *CodeBuild User Guide*.
*
* [^1]: https://docs.aws.amazon.com/codebuild/latest/userguide/caching-s3.html#caching-s3-sharing
*
* @var string|null
*/
private $cacheNamespace;

/**
* @param array{
* type: CacheType::*,
* location?: null|string,
* modes?: null|array<CacheMode::*>,
* cacheNamespace?: null|string,
* } $input
*/
public function __construct(array $input)
{
$this->type = $input['type'] ?? $this->throwException(new InvalidArgument('Missing required field "type".'));
$this->location = $input['location'] ?? null;
$this->modes = $input['modes'] ?? null;
$this->cacheNamespace = $input['cacheNamespace'] ?? null;
}

/**
* @param array{
* type: CacheType::*,
* location?: null|string,
* modes?: null|array<CacheMode::*>,
* cacheNamespace?: null|string,
* }|ProjectCache $input
*/
public static function create($input): self
{
return $input instanceof self ? $input : new self($input);
}

public function getCacheNamespace(): ?string
{
return $this->cacheNamespace;
}

public function getLocation(): ?string
{
return $this->location;
Expand Down Expand Up @@ -140,6 +158,9 @@ public function requestBody(): array
$payload['modes'][$index] = $listValue;
}
}
if (null !== $v = $this->cacheNamespace) {
$payload['cacheNamespace'] = $v;
}

return $payload;
}
Expand Down