Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update generated code #1767

Merged
merged 1 commit into from
Sep 21, 2024
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.322.0"
"${LATEST}": "3.322.2"
},
"endpoints": "https://raw.githubusercontent.com/aws/aws-sdk-php/${LATEST}/src/data/endpoints.json",
"services": {
Expand Down
1 change: 1 addition & 0 deletions src/Service/MediaConvert/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
### Added

- AWS api-change: This release includes support for dynamic video overlay workflows, including picture-in-picture and squeezeback
- AWS api-change: This release provides support for additional DRM configurations per SPEKE Version 2.0.

### Changed

Expand Down
32 changes: 32 additions & 0 deletions src/Service/MediaConvert/src/Enum/PresetSpeke20Audio.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?php

namespace AsyncAws\MediaConvert\Enum;

/**
* Specify which SPEKE version 2.0 audio preset MediaConvert uses to request content keys from your SPEKE server. For
* more information, see: https://docs.aws.amazon.com/mediaconvert/latest/ug/drm-content-speke-v2-presets.html To
* encrypt to your audio outputs, choose from the following: Audio preset 1, Audio preset 2, or Audio preset 3. To
* encrypt your audio outputs, using the same content key for both your audio and video outputs: Choose Shared. When you
* do, you must also set SPEKE v2.0 video preset to Shared. To not encrypt your audio outputs: Choose Unencrypted. When
* you do, to encrypt your video outputs, you must also specify a SPEKE v2.0 video preset (other than Shared or
* Unencrypted).
*/
final class PresetSpeke20Audio
{
public const PRESET_AUDIO_1 = 'PRESET_AUDIO_1';
public const PRESET_AUDIO_2 = 'PRESET_AUDIO_2';
public const PRESET_AUDIO_3 = 'PRESET_AUDIO_3';
public const SHARED = 'SHARED';
public const UNENCRYPTED = 'UNENCRYPTED';

public static function exists(string $value): bool
{
return isset([
self::PRESET_AUDIO_1 => true,
self::PRESET_AUDIO_2 => true,
self::PRESET_AUDIO_3 => true,
self::SHARED => true,
self::UNENCRYPTED => true,
][$value]);
}
}
42 changes: 42 additions & 0 deletions src/Service/MediaConvert/src/Enum/PresetSpeke20Video.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<?php

namespace AsyncAws\MediaConvert\Enum;

/**
* Specify which SPEKE version 2.0 video preset MediaConvert uses to request content keys from your SPEKE server. For
* more information, see: https://docs.aws.amazon.com/mediaconvert/latest/ug/drm-content-speke-v2-presets.html To
* encrypt to your video outputs, choose from the following: Video preset 1, Video preset 2, Video preset 3, Video
* preset 4, Video preset 5, Video preset 6, Video preset 7, or Video preset 8. To encrypt your video outputs, using the
* same content key for both your video and audio outputs: Choose Shared. When you do, you must also set SPEKE v2.0
* audio preset to Shared. To not encrypt your video outputs: Choose Unencrypted. When you do, to encrypt your audio
* outputs, you must also specify a SPEKE v2.0 audio preset (other than Shared or Unencrypted).
*/
final class PresetSpeke20Video
{
public const PRESET_VIDEO_1 = 'PRESET_VIDEO_1';
public const PRESET_VIDEO_2 = 'PRESET_VIDEO_2';
public const PRESET_VIDEO_3 = 'PRESET_VIDEO_3';
public const PRESET_VIDEO_4 = 'PRESET_VIDEO_4';
public const PRESET_VIDEO_5 = 'PRESET_VIDEO_5';
public const PRESET_VIDEO_6 = 'PRESET_VIDEO_6';
public const PRESET_VIDEO_7 = 'PRESET_VIDEO_7';
public const PRESET_VIDEO_8 = 'PRESET_VIDEO_8';
public const SHARED = 'SHARED';
public const UNENCRYPTED = 'UNENCRYPTED';

public static function exists(string $value): bool
{
return isset([
self::PRESET_VIDEO_1 => true,
self::PRESET_VIDEO_2 => true,
self::PRESET_VIDEO_3 => true,
self::PRESET_VIDEO_4 => true,
self::PRESET_VIDEO_5 => true,
self::PRESET_VIDEO_6 => true,
self::PRESET_VIDEO_7 => true,
self::PRESET_VIDEO_8 => true,
self::SHARED => true,
self::UNENCRYPTED => true,
][$value]);
}
}
11 changes: 11 additions & 0 deletions src/Service/MediaConvert/src/Result/CreateJobResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
use AsyncAws\MediaConvert\ValueObject\Eac3Settings;
use AsyncAws\MediaConvert\ValueObject\EmbeddedDestinationSettings;
use AsyncAws\MediaConvert\ValueObject\EmbeddedSourceSettings;
use AsyncAws\MediaConvert\ValueObject\EncryptionContractConfiguration;
use AsyncAws\MediaConvert\ValueObject\EsamManifestConfirmConditionNotification;
use AsyncAws\MediaConvert\ValueObject\EsamSettings;
use AsyncAws\MediaConvert\ValueObject\EsamSignalProcessingNotification;
Expand Down Expand Up @@ -917,6 +918,14 @@ private function populateResultEmbeddedSourceSettings(array $json): EmbeddedSour
]);
}

private function populateResultEncryptionContractConfiguration(array $json): EncryptionContractConfiguration
{
return new EncryptionContractConfiguration([
'SpekeAudioPreset' => isset($json['spekeAudioPreset']) ? (string) $json['spekeAudioPreset'] : null,
'SpekeVideoPreset' => isset($json['spekeVideoPreset']) ? (string) $json['spekeVideoPreset'] : null,
]);
}

private function populateResultEsamManifestConfirmConditionNotification(array $json): EsamManifestConfirmConditionNotification
{
return new EsamManifestConfirmConditionNotification([
Expand Down Expand Up @@ -1952,6 +1961,7 @@ private function populateResultSpekeKeyProvider(array $json): SpekeKeyProvider
{
return new SpekeKeyProvider([
'CertificateArn' => isset($json['certificateArn']) ? (string) $json['certificateArn'] : null,
'EncryptionContractConfiguration' => empty($json['encryptionContractConfiguration']) ? null : $this->populateResultEncryptionContractConfiguration($json['encryptionContractConfiguration']),
'ResourceId' => isset($json['resourceId']) ? (string) $json['resourceId'] : null,
'SystemIds' => !isset($json['systemIds']) ? null : $this->populateResult__listOf__stringPattern09aFAF809aFAF409aFAF409aFAF409aFAF12($json['systemIds']),
'Url' => isset($json['url']) ? (string) $json['url'] : null,
Expand All @@ -1963,6 +1973,7 @@ private function populateResultSpekeKeyProviderCmaf(array $json): SpekeKeyProvid
return new SpekeKeyProviderCmaf([
'CertificateArn' => isset($json['certificateArn']) ? (string) $json['certificateArn'] : null,
'DashSignaledSystemIds' => !isset($json['dashSignaledSystemIds']) ? null : $this->populateResult__listOf__stringMin36Max36Pattern09aFAF809aFAF409aFAF409aFAF409aFAF12($json['dashSignaledSystemIds']),
'EncryptionContractConfiguration' => empty($json['encryptionContractConfiguration']) ? null : $this->populateResultEncryptionContractConfiguration($json['encryptionContractConfiguration']),
'HlsSignaledSystemIds' => !isset($json['hlsSignaledSystemIds']) ? null : $this->populateResult__listOf__stringMin36Max36Pattern09aFAF809aFAF409aFAF409aFAF409aFAF12($json['hlsSignaledSystemIds']),
'ResourceId' => isset($json['resourceId']) ? (string) $json['resourceId'] : null,
'Url' => isset($json['url']) ? (string) $json['url'] : null,
Expand Down
11 changes: 11 additions & 0 deletions src/Service/MediaConvert/src/Result/GetJobResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
use AsyncAws\MediaConvert\ValueObject\Eac3Settings;
use AsyncAws\MediaConvert\ValueObject\EmbeddedDestinationSettings;
use AsyncAws\MediaConvert\ValueObject\EmbeddedSourceSettings;
use AsyncAws\MediaConvert\ValueObject\EncryptionContractConfiguration;
use AsyncAws\MediaConvert\ValueObject\EsamManifestConfirmConditionNotification;
use AsyncAws\MediaConvert\ValueObject\EsamSettings;
use AsyncAws\MediaConvert\ValueObject\EsamSignalProcessingNotification;
Expand Down Expand Up @@ -917,6 +918,14 @@ private function populateResultEmbeddedSourceSettings(array $json): EmbeddedSour
]);
}

private function populateResultEncryptionContractConfiguration(array $json): EncryptionContractConfiguration
{
return new EncryptionContractConfiguration([
'SpekeAudioPreset' => isset($json['spekeAudioPreset']) ? (string) $json['spekeAudioPreset'] : null,
'SpekeVideoPreset' => isset($json['spekeVideoPreset']) ? (string) $json['spekeVideoPreset'] : null,
]);
}

private function populateResultEsamManifestConfirmConditionNotification(array $json): EsamManifestConfirmConditionNotification
{
return new EsamManifestConfirmConditionNotification([
Expand Down Expand Up @@ -1952,6 +1961,7 @@ private function populateResultSpekeKeyProvider(array $json): SpekeKeyProvider
{
return new SpekeKeyProvider([
'CertificateArn' => isset($json['certificateArn']) ? (string) $json['certificateArn'] : null,
'EncryptionContractConfiguration' => empty($json['encryptionContractConfiguration']) ? null : $this->populateResultEncryptionContractConfiguration($json['encryptionContractConfiguration']),
'ResourceId' => isset($json['resourceId']) ? (string) $json['resourceId'] : null,
'SystemIds' => !isset($json['systemIds']) ? null : $this->populateResult__listOf__stringPattern09aFAF809aFAF409aFAF409aFAF409aFAF12($json['systemIds']),
'Url' => isset($json['url']) ? (string) $json['url'] : null,
Expand All @@ -1963,6 +1973,7 @@ private function populateResultSpekeKeyProviderCmaf(array $json): SpekeKeyProvid
return new SpekeKeyProviderCmaf([
'CertificateArn' => isset($json['certificateArn']) ? (string) $json['certificateArn'] : null,
'DashSignaledSystemIds' => !isset($json['dashSignaledSystemIds']) ? null : $this->populateResult__listOf__stringMin36Max36Pattern09aFAF809aFAF409aFAF409aFAF409aFAF12($json['dashSignaledSystemIds']),
'EncryptionContractConfiguration' => empty($json['encryptionContractConfiguration']) ? null : $this->populateResultEncryptionContractConfiguration($json['encryptionContractConfiguration']),
'HlsSignaledSystemIds' => !isset($json['hlsSignaledSystemIds']) ? null : $this->populateResult__listOf__stringMin36Max36Pattern09aFAF809aFAF409aFAF409aFAF409aFAF12($json['hlsSignaledSystemIds']),
'ResourceId' => isset($json['resourceId']) ? (string) $json['resourceId'] : null,
'Url' => isset($json['url']) ? (string) $json['url'] : null,
Expand Down
11 changes: 11 additions & 0 deletions src/Service/MediaConvert/src/Result/ListJobsResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
use AsyncAws\MediaConvert\ValueObject\Eac3Settings;
use AsyncAws\MediaConvert\ValueObject\EmbeddedDestinationSettings;
use AsyncAws\MediaConvert\ValueObject\EmbeddedSourceSettings;
use AsyncAws\MediaConvert\ValueObject\EncryptionContractConfiguration;
use AsyncAws\MediaConvert\ValueObject\EsamManifestConfirmConditionNotification;
use AsyncAws\MediaConvert\ValueObject\EsamSettings;
use AsyncAws\MediaConvert\ValueObject\EsamSignalProcessingNotification;
Expand Down Expand Up @@ -984,6 +985,14 @@ private function populateResultEmbeddedSourceSettings(array $json): EmbeddedSour
]);
}

private function populateResultEncryptionContractConfiguration(array $json): EncryptionContractConfiguration
{
return new EncryptionContractConfiguration([
'SpekeAudioPreset' => isset($json['spekeAudioPreset']) ? (string) $json['spekeAudioPreset'] : null,
'SpekeVideoPreset' => isset($json['spekeVideoPreset']) ? (string) $json['spekeVideoPreset'] : null,
]);
}

private function populateResultEsamManifestConfirmConditionNotification(array $json): EsamManifestConfirmConditionNotification
{
return new EsamManifestConfirmConditionNotification([
Expand Down Expand Up @@ -2019,6 +2028,7 @@ private function populateResultSpekeKeyProvider(array $json): SpekeKeyProvider
{
return new SpekeKeyProvider([
'CertificateArn' => isset($json['certificateArn']) ? (string) $json['certificateArn'] : null,
'EncryptionContractConfiguration' => empty($json['encryptionContractConfiguration']) ? null : $this->populateResultEncryptionContractConfiguration($json['encryptionContractConfiguration']),
'ResourceId' => isset($json['resourceId']) ? (string) $json['resourceId'] : null,
'SystemIds' => !isset($json['systemIds']) ? null : $this->populateResult__listOf__stringPattern09aFAF809aFAF409aFAF409aFAF409aFAF12($json['systemIds']),
'Url' => isset($json['url']) ? (string) $json['url'] : null,
Expand All @@ -2030,6 +2040,7 @@ private function populateResultSpekeKeyProviderCmaf(array $json): SpekeKeyProvid
return new SpekeKeyProviderCmaf([
'CertificateArn' => isset($json['certificateArn']) ? (string) $json['certificateArn'] : null,
'DashSignaledSystemIds' => !isset($json['dashSignaledSystemIds']) ? null : $this->populateResult__listOf__stringMin36Max36Pattern09aFAF809aFAF409aFAF409aFAF409aFAF12($json['dashSignaledSystemIds']),
'EncryptionContractConfiguration' => empty($json['encryptionContractConfiguration']) ? null : $this->populateResultEncryptionContractConfiguration($json['encryptionContractConfiguration']),
'HlsSignaledSystemIds' => !isset($json['hlsSignaledSystemIds']) ? null : $this->populateResult__listOf__stringMin36Max36Pattern09aFAF809aFAF409aFAF409aFAF409aFAF12($json['hlsSignaledSystemIds']),
'ResourceId' => isset($json['resourceId']) ? (string) $json['resourceId'] : null,
'Url' => isset($json['url']) ? (string) $json['url'] : null,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
<?php

namespace AsyncAws\MediaConvert\ValueObject;

use AsyncAws\Core\Exception\InvalidArgument;
use AsyncAws\MediaConvert\Enum\PresetSpeke20Audio;
use AsyncAws\MediaConvert\Enum\PresetSpeke20Video;

/**
* Specify the SPEKE version, either v1.0 or v2.0, that MediaConvert uses when encrypting your output. For more
* information, see: https://docs.aws.amazon.com/speke/latest/documentation/speke-api-specification.html To use SPEKE
* v1.0: Leave blank. To use SPEKE v2.0: Specify a SPEKE v2.0 video preset and a SPEKE v2.0 audio preset.
*/
final class EncryptionContractConfiguration
{
/**
* Specify which SPEKE version 2.0 audio preset MediaConvert uses to request content keys from your SPEKE server. For
* more information, see: https://docs.aws.amazon.com/mediaconvert/latest/ug/drm-content-speke-v2-presets.html To
* encrypt to your audio outputs, choose from the following: Audio preset 1, Audio preset 2, or Audio preset 3. To
* encrypt your audio outputs, using the same content key for both your audio and video outputs: Choose Shared. When you
* do, you must also set SPEKE v2.0 video preset to Shared. To not encrypt your audio outputs: Choose Unencrypted. When
* you do, to encrypt your video outputs, you must also specify a SPEKE v2.0 video preset (other than Shared or
* Unencrypted).
*
* @var PresetSpeke20Audio::*|null
*/
private $spekeAudioPreset;

/**
* Specify which SPEKE version 2.0 video preset MediaConvert uses to request content keys from your SPEKE server. For
* more information, see: https://docs.aws.amazon.com/mediaconvert/latest/ug/drm-content-speke-v2-presets.html To
* encrypt to your video outputs, choose from the following: Video preset 1, Video preset 2, Video preset 3, Video
* preset 4, Video preset 5, Video preset 6, Video preset 7, or Video preset 8. To encrypt your video outputs, using the
* same content key for both your video and audio outputs: Choose Shared. When you do, you must also set SPEKE v2.0
* audio preset to Shared. To not encrypt your video outputs: Choose Unencrypted. When you do, to encrypt your audio
* outputs, you must also specify a SPEKE v2.0 audio preset (other than Shared or Unencrypted).
*
* @var PresetSpeke20Video::*|null
*/
private $spekeVideoPreset;

/**
* @param array{
* SpekeAudioPreset?: null|PresetSpeke20Audio::*,
* SpekeVideoPreset?: null|PresetSpeke20Video::*,
* } $input
*/
public function __construct(array $input)
{
$this->spekeAudioPreset = $input['SpekeAudioPreset'] ?? null;
$this->spekeVideoPreset = $input['SpekeVideoPreset'] ?? null;
}

/**
* @param array{
* SpekeAudioPreset?: null|PresetSpeke20Audio::*,
* SpekeVideoPreset?: null|PresetSpeke20Video::*,
* }|EncryptionContractConfiguration $input
*/
public static function create($input): self
{
return $input instanceof self ? $input : new self($input);
}

/**
* @return PresetSpeke20Audio::*|null
*/
public function getSpekeAudioPreset(): ?string
{
return $this->spekeAudioPreset;
}

/**
* @return PresetSpeke20Video::*|null
*/
public function getSpekeVideoPreset(): ?string
{
return $this->spekeVideoPreset;
}

/**
* @internal
*/
public function requestBody(): array
{
$payload = [];
if (null !== $v = $this->spekeAudioPreset) {
if (!PresetSpeke20Audio::exists($v)) {
throw new InvalidArgument(\sprintf('Invalid parameter "spekeAudioPreset" for "%s". The value "%s" is not a valid "PresetSpeke20Audio".', __CLASS__, $v));
}
$payload['spekeAudioPreset'] = $v;
}
if (null !== $v = $this->spekeVideoPreset) {
if (!PresetSpeke20Video::exists($v)) {
throw new InvalidArgument(\sprintf('Invalid parameter "spekeVideoPreset" for "%s". The value "%s" is not a valid "PresetSpeke20Video".', __CLASS__, $v));
}
$payload['spekeVideoPreset'] = $v;
}

return $payload;
}
}
20 changes: 20 additions & 0 deletions src/Service/MediaConvert/src/ValueObject/SpekeKeyProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,15 @@ final class SpekeKeyProvider
*/
private $certificateArn;

/**
* Specify the SPEKE version, either v1.0 or v2.0, that MediaConvert uses when encrypting your output. For more
* information, see: https://docs.aws.amazon.com/speke/latest/documentation/speke-api-specification.html To use SPEKE
* v1.0: Leave blank. To use SPEKE v2.0: Specify a SPEKE v2.0 video preset and a SPEKE v2.0 audio preset.
*
* @var EncryptionContractConfiguration|null
*/
private $encryptionContractConfiguration;

/**
* Specify the resource ID that your SPEKE-compliant key provider uses to identify this content.
*
Expand Down Expand Up @@ -43,6 +52,7 @@ final class SpekeKeyProvider
/**
* @param array{
* CertificateArn?: null|string,
* EncryptionContractConfiguration?: null|EncryptionContractConfiguration|array,
* ResourceId?: null|string,
* SystemIds?: null|string[],
* Url?: null|string,
Expand All @@ -51,6 +61,7 @@ final class SpekeKeyProvider
public function __construct(array $input)
{
$this->certificateArn = $input['CertificateArn'] ?? null;
$this->encryptionContractConfiguration = isset($input['EncryptionContractConfiguration']) ? EncryptionContractConfiguration::create($input['EncryptionContractConfiguration']) : null;
$this->resourceId = $input['ResourceId'] ?? null;
$this->systemIds = $input['SystemIds'] ?? null;
$this->url = $input['Url'] ?? null;
Expand All @@ -59,6 +70,7 @@ public function __construct(array $input)
/**
* @param array{
* CertificateArn?: null|string,
* EncryptionContractConfiguration?: null|EncryptionContractConfiguration|array,
* ResourceId?: null|string,
* SystemIds?: null|string[],
* Url?: null|string,
Expand All @@ -74,6 +86,11 @@ public function getCertificateArn(): ?string
return $this->certificateArn;
}

public function getEncryptionContractConfiguration(): ?EncryptionContractConfiguration
{
return $this->encryptionContractConfiguration;
}

public function getResourceId(): ?string
{
return $this->resourceId;
Expand Down Expand Up @@ -101,6 +118,9 @@ public function requestBody(): array
if (null !== $v = $this->certificateArn) {
$payload['certificateArn'] = $v;
}
if (null !== $v = $this->encryptionContractConfiguration) {
$payload['encryptionContractConfiguration'] = $v->requestBody();
}
if (null !== $v = $this->resourceId) {
$payload['resourceId'] = $v;
}
Expand Down
Loading
Loading