diff --git a/manifest.json b/manifest.json index feb6e22d5..274b82c01 100644 --- a/manifest.json +++ b/manifest.json @@ -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": { diff --git a/src/Service/CodeBuild/CHANGELOG.md b/src/Service/CodeBuild/CHANGELOG.md index 499f40e31..83c7c082f 100644 --- a/src/Service/CodeBuild/CHANGELOG.md +++ b/src/Service/CodeBuild/CHANGELOG.md @@ -2,6 +2,10 @@ ## NOT RELEASED +### Added + +- AWS api-change: This release adds support for cacheNamespace in ProjectCache + ### Changed - AWS enhancement: Documentation updates. diff --git a/src/Service/CodeBuild/composer.json b/src/Service/CodeBuild/composer.json index 3b796166b..418bb1515 100644 --- a/src/Service/CodeBuild/composer.json +++ b/src/Service/CodeBuild/composer.json @@ -28,7 +28,7 @@ }, "extra": { "branch-alias": { - "dev-master": "2.8-dev" + "dev-master": "2.9-dev" } } } diff --git a/src/Service/CodeBuild/src/Result/BatchGetBuildsOutput.php b/src/Service/CodeBuild/src/Result/BatchGetBuildsOutput.php index 482db3f35..e0f51b321 100644 --- a/src/Service/CodeBuild/src/Result/BatchGetBuildsOutput.php +++ b/src/Service/CodeBuild/src/Result/BatchGetBuildsOutput.php @@ -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, ]); } diff --git a/src/Service/CodeBuild/src/Result/StartBuildOutput.php b/src/Service/CodeBuild/src/Result/StartBuildOutput.php index e9c5b05d8..233d94c50 100644 --- a/src/Service/CodeBuild/src/Result/StartBuildOutput.php +++ b/src/Service/CodeBuild/src/Result/StartBuildOutput.php @@ -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, ]); } diff --git a/src/Service/CodeBuild/src/Result/StopBuildOutput.php b/src/Service/CodeBuild/src/Result/StopBuildOutput.php index 39f8d9e42..945e924bd 100644 --- a/src/Service/CodeBuild/src/Result/StopBuildOutput.php +++ b/src/Service/CodeBuild/src/Result/StopBuildOutput.php @@ -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, ]); } diff --git a/src/Service/CodeBuild/src/ValueObject/ProjectCache.php b/src/Service/CodeBuild/src/ValueObject/ProjectCache.php index bfd29f4ee..ca6432589 100644 --- a/src/Service/CodeBuild/src/ValueObject/ProjectCache.php +++ b/src/Service/CodeBuild/src/ValueObject/ProjectCache.php @@ -68,11 +68,22 @@ 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, + * cacheNamespace?: null|string, * } $input */ public function __construct(array $input) @@ -80,6 +91,7 @@ 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; } /** @@ -87,6 +99,7 @@ public function __construct(array $input) * type: CacheType::*, * location?: null|string, * modes?: null|array, + * cacheNamespace?: null|string, * }|ProjectCache $input */ public static function create($input): self @@ -94,6 +107,11 @@ 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; @@ -140,6 +158,9 @@ public function requestBody(): array $payload['modes'][$index] = $listValue; } } + if (null !== $v = $this->cacheNamespace) { + $payload['cacheNamespace'] = $v; + } return $payload; }