Skip to content

Commit

Permalink
Update generated code (#1657)
Browse files Browse the repository at this point in the history
* update generated code

* Test deprecation

---------

Co-authored-by: Jérémy Derussé <[email protected]>
  • Loading branch information
async-aws-bot and jderusse authored Feb 2, 2024
1 parent 20c3762 commit dc1eae0
Show file tree
Hide file tree
Showing 12 changed files with 113 additions and 64 deletions.
4 changes: 4 additions & 0 deletions 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 includes support for broadcast-mixed audio description tracks.

### Changed

- Use the regional endpoint instead of the account-specific endpoint
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
},
"extra": {
"branch-alias": {
"dev-master": "1.0-dev"
"dev-master": "1.1-dev"
}
}
}
5 changes: 1 addition & 4 deletions src/Enum/AacCodecProfile.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@
namespace AsyncAws\MediaConvert\Enum;

/**
* Specify the AAC profile. For the widest player compatibility and where higher bitrates are acceptable: Keep the
* default profile, LC (AAC-LC) For improved audio performance at lower bitrates: Choose HEV1 or HEV2. HEV1 (AAC-HE v1)
* adds spectral band replication to improve speech audio at low bitrates. HEV2 (AAC-HE v2) adds parametric stereo,
* which optimizes for encoding stereo audio at very low bitrates.
* AAC Profile.
*/
final class AacCodecProfile
{
Expand Down
4 changes: 1 addition & 3 deletions src/Enum/AacRateControlMode.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
namespace AsyncAws\MediaConvert\Enum;

/**
* Specify the AAC rate control mode. For a constant bitrate: Choose CBR. Your AAC output bitrate will be equal to the
* value that you choose for Bitrate. For a variable bitrate: Choose VBR. Your AAC output bitrate will vary according to
* your audio content and the value that you choose for Bitrate quality.
* Rate Control Mode.
*/
final class AacRateControlMode
{
Expand Down
3 changes: 1 addition & 2 deletions src/Enum/AacVbrQuality.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
namespace AsyncAws\MediaConvert\Enum;

/**
* Specify the quality of your variable bitrate (VBR) AAC audio. For a list of approximate VBR bitrates, see:
* https://docs.aws.amazon.com/mediaconvert/latest/ug/aac-support.html#aac_vbr.
* VBR Quality Level - Only used if rate_control_mode is VBR.
*/
final class AacVbrQuality
{
Expand Down
3 changes: 3 additions & 0 deletions src/MediaConvertClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,12 @@ public function createJob($input): CreateJobResponse
* @throws NotFoundException
* @throws TooManyRequestsException
* @throws ConflictException
*
* @deprecated
*/
public function describeEndpoints($input = []): DescribeEndpointsResponse
{
@trigger_error(sprintf('The operation "%s" is deprecated by AWS.', __FUNCTION__), \E_USER_DEPRECATED);
$input = DescribeEndpointsRequest::create($input);
$response = $this->getResponse($input->request(), new RequestContext(['operation' => 'DescribeEndpoints', 'region' => $input->getRegion(), 'exceptionMapping' => [
'BadRequestException' => BadRequestException::class,
Expand Down
30 changes: 16 additions & 14 deletions src/Result/CreateJobResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -650,19 +650,6 @@ private function populateResultColorConversion3DLUTSetting(array $json): ColorCo
]);
}

/**
* @return ColorConversion3DLUTSetting[]
*/
private function populateResultColorConversion3DLUTSettings(array $json): array
{
$items = [];
foreach ($json as $item) {
$items[] = $this->populateResultColorConversion3DLUTSetting($item);
}

return $items;
}

private function populateResultColorCorrector(array $json): ColorCorrector
{
return new ColorCorrector([
Expand Down Expand Up @@ -1400,7 +1387,7 @@ private function populateResultJobSettings(array $json): JobSettings
return new JobSettings([
'AdAvailOffset' => isset($json['adAvailOffset']) ? (int) $json['adAvailOffset'] : null,
'AvailBlanking' => empty($json['availBlanking']) ? null : $this->populateResultAvailBlanking($json['availBlanking']),
'ColorConversion3DLUTSettings' => !isset($json['colorConversion3DLUTSettings']) ? null : $this->populateResultColorConversion3DLUTSettings($json['colorConversion3DLUTSettings']),
'ColorConversion3DLUTSettings' => !isset($json['colorConversion3DLUTSettings']) ? null : $this->populateResult__listOfColorConversion3DLUTSetting($json['colorConversion3DLUTSettings']),
'Esam' => empty($json['esam']) ? null : $this->populateResultEsamSettings($json['esam']),
'ExtendedDataServices' => empty($json['extendedDataServices']) ? null : $this->populateResultExtendedDataServices($json['extendedDataServices']),
'FollowSource' => isset($json['followSource']) ? (int) $json['followSource'] : null,
Expand Down Expand Up @@ -1900,6 +1887,8 @@ private function populateResultRectangle(array $json): Rectangle
private function populateResultRemixSettings(array $json): RemixSettings
{
return new RemixSettings([
'AudioDescriptionAudioChannel' => isset($json['audioDescriptionAudioChannel']) ? (int) $json['audioDescriptionAudioChannel'] : null,
'AudioDescriptionDataChannel' => isset($json['audioDescriptionDataChannel']) ? (int) $json['audioDescriptionDataChannel'] : null,
'ChannelMapping' => empty($json['channelMapping']) ? null : $this->populateResultChannelMapping($json['channelMapping']),
'ChannelsIn' => isset($json['channelsIn']) ? (int) $json['channelsIn'] : null,
'ChannelsOut' => isset($json['channelsOut']) ? (int) $json['channelsOut'] : null,
Expand Down Expand Up @@ -2411,6 +2400,19 @@ private function populateResult__listOfCmafAdditionalManifest(array $json): arra
return $items;
}

/**
* @return ColorConversion3DLUTSetting[]
*/
private function populateResult__listOfColorConversion3DLUTSetting(array $json): array
{
$items = [];
foreach ($json as $item) {
$items[] = $this->populateResultColorConversion3DLUTSetting($item);
}

return $items;
}

/**
* @return DashAdditionalManifest[]
*/
Expand Down
30 changes: 16 additions & 14 deletions src/Result/GetJobResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -650,19 +650,6 @@ private function populateResultColorConversion3DLUTSetting(array $json): ColorCo
]);
}

/**
* @return ColorConversion3DLUTSetting[]
*/
private function populateResultColorConversion3DLUTSettings(array $json): array
{
$items = [];
foreach ($json as $item) {
$items[] = $this->populateResultColorConversion3DLUTSetting($item);
}

return $items;
}

private function populateResultColorCorrector(array $json): ColorCorrector
{
return new ColorCorrector([
Expand Down Expand Up @@ -1400,7 +1387,7 @@ private function populateResultJobSettings(array $json): JobSettings
return new JobSettings([
'AdAvailOffset' => isset($json['adAvailOffset']) ? (int) $json['adAvailOffset'] : null,
'AvailBlanking' => empty($json['availBlanking']) ? null : $this->populateResultAvailBlanking($json['availBlanking']),
'ColorConversion3DLUTSettings' => !isset($json['colorConversion3DLUTSettings']) ? null : $this->populateResultColorConversion3DLUTSettings($json['colorConversion3DLUTSettings']),
'ColorConversion3DLUTSettings' => !isset($json['colorConversion3DLUTSettings']) ? null : $this->populateResult__listOfColorConversion3DLUTSetting($json['colorConversion3DLUTSettings']),
'Esam' => empty($json['esam']) ? null : $this->populateResultEsamSettings($json['esam']),
'ExtendedDataServices' => empty($json['extendedDataServices']) ? null : $this->populateResultExtendedDataServices($json['extendedDataServices']),
'FollowSource' => isset($json['followSource']) ? (int) $json['followSource'] : null,
Expand Down Expand Up @@ -1900,6 +1887,8 @@ private function populateResultRectangle(array $json): Rectangle
private function populateResultRemixSettings(array $json): RemixSettings
{
return new RemixSettings([
'AudioDescriptionAudioChannel' => isset($json['audioDescriptionAudioChannel']) ? (int) $json['audioDescriptionAudioChannel'] : null,
'AudioDescriptionDataChannel' => isset($json['audioDescriptionDataChannel']) ? (int) $json['audioDescriptionDataChannel'] : null,
'ChannelMapping' => empty($json['channelMapping']) ? null : $this->populateResultChannelMapping($json['channelMapping']),
'ChannelsIn' => isset($json['channelsIn']) ? (int) $json['channelsIn'] : null,
'ChannelsOut' => isset($json['channelsOut']) ? (int) $json['channelsOut'] : null,
Expand Down Expand Up @@ -2411,6 +2400,19 @@ private function populateResult__listOfCmafAdditionalManifest(array $json): arra
return $items;
}

/**
* @return ColorConversion3DLUTSetting[]
*/
private function populateResult__listOfColorConversion3DLUTSetting(array $json): array
{
$items = [];
foreach ($json as $item) {
$items[] = $this->populateResultColorConversion3DLUTSetting($item);
}

return $items;
}

/**
* @return DashAdditionalManifest[]
*/
Expand Down
30 changes: 16 additions & 14 deletions src/Result/ListJobsResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -717,19 +717,6 @@ private function populateResultColorConversion3DLUTSetting(array $json): ColorCo
]);
}

/**
* @return ColorConversion3DLUTSetting[]
*/
private function populateResultColorConversion3DLUTSettings(array $json): array
{
$items = [];
foreach ($json as $item) {
$items[] = $this->populateResultColorConversion3DLUTSetting($item);
}

return $items;
}

private function populateResultColorCorrector(array $json): ColorCorrector
{
return new ColorCorrector([
Expand Down Expand Up @@ -1467,7 +1454,7 @@ private function populateResultJobSettings(array $json): JobSettings
return new JobSettings([
'AdAvailOffset' => isset($json['adAvailOffset']) ? (int) $json['adAvailOffset'] : null,
'AvailBlanking' => empty($json['availBlanking']) ? null : $this->populateResultAvailBlanking($json['availBlanking']),
'ColorConversion3DLUTSettings' => !isset($json['colorConversion3DLUTSettings']) ? null : $this->populateResultColorConversion3DLUTSettings($json['colorConversion3DLUTSettings']),
'ColorConversion3DLUTSettings' => !isset($json['colorConversion3DLUTSettings']) ? null : $this->populateResult__listOfColorConversion3DLUTSetting($json['colorConversion3DLUTSettings']),
'Esam' => empty($json['esam']) ? null : $this->populateResultEsamSettings($json['esam']),
'ExtendedDataServices' => empty($json['extendedDataServices']) ? null : $this->populateResultExtendedDataServices($json['extendedDataServices']),
'FollowSource' => isset($json['followSource']) ? (int) $json['followSource'] : null,
Expand Down Expand Up @@ -1967,6 +1954,8 @@ private function populateResultRectangle(array $json): Rectangle
private function populateResultRemixSettings(array $json): RemixSettings
{
return new RemixSettings([
'AudioDescriptionAudioChannel' => isset($json['audioDescriptionAudioChannel']) ? (int) $json['audioDescriptionAudioChannel'] : null,
'AudioDescriptionDataChannel' => isset($json['audioDescriptionDataChannel']) ? (int) $json['audioDescriptionDataChannel'] : null,
'ChannelMapping' => empty($json['channelMapping']) ? null : $this->populateResultChannelMapping($json['channelMapping']),
'ChannelsIn' => isset($json['channelsIn']) ? (int) $json['channelsIn'] : null,
'ChannelsOut' => isset($json['channelsOut']) ? (int) $json['channelsOut'] : null,
Expand Down Expand Up @@ -2478,6 +2467,19 @@ private function populateResult__listOfCmafAdditionalManifest(array $json): arra
return $items;
}

/**
* @return ColorConversion3DLUTSetting[]
*/
private function populateResult__listOfColorConversion3DLUTSetting(array $json): array
{
$items = [];
foreach ($json as $item) {
$items[] = $this->populateResultColorConversion3DLUTSetting($item);
}

return $items;
}

/**
* @return DashAdditionalManifest[]
*/
Expand Down
21 changes: 9 additions & 12 deletions src/ValueObject/AacSettings.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,7 @@ final class AacSettings
private $bitrate;

/**
* Specify the AAC profile. For the widest player compatibility and where higher bitrates are acceptable: Keep the
* default profile, LC (AAC-LC) For improved audio performance at lower bitrates: Choose HEV1 or HEV2. HEV1 (AAC-HE v1)
* adds spectral band replication to improve speech audio at low bitrates. HEV2 (AAC-HE v2) adds parametric stereo,
* which optimizes for encoding stereo audio at very low bitrates.
* AAC Profile.
*
* @var AacCodecProfile::*|null
*/
Expand All @@ -65,9 +62,7 @@ final class AacSettings
private $codingMode;

/**
* Specify the AAC rate control mode. For a constant bitrate: Choose CBR. Your AAC output bitrate will be equal to the
* value that you choose for Bitrate. For a variable bitrate: Choose VBR. Your AAC output bitrate will vary according to
* your audio content and the value that you choose for Bitrate quality.
* Rate Control Mode.
*
* @var AacRateControlMode::*|null
*/
Expand All @@ -82,9 +77,12 @@ final class AacSettings
private $rawFormat;

/**
* Specify the AAC sample rate in samples per second (Hz). Valid sample rates depend on the AAC profile and Coding mode
* that you select. For a list of supported sample rates, see:
* https://docs.aws.amazon.com/mediaconvert/latest/ug/aac-support.html.
* Specify the Sample rate in Hz. Valid sample rates depend on the Profile and Coding mode that you select. The
* following list shows valid sample rates for each Profile and Coding mode. * LC Profile, Coding mode 1.0, 2.0, and
* Receiver Mix: 8000, 12000, 16000, 22050, 24000, 32000, 44100, 48000, 88200, 96000. * LC Profile, Coding mode 5.1:
* 32000, 44100, 48000, 96000. * HEV1 Profile, Coding mode 1.0 and Receiver Mix: 22050, 24000, 32000, 44100, 48000. *
* HEV1 Profile, Coding mode 2.0 and 5.1: 32000, 44100, 48000, 96000. * HEV2 Profile, Coding mode 2.0: 22050, 24000,
* 32000, 44100, 48000.
*
* @var int|null
*/
Expand All @@ -98,8 +96,7 @@ final class AacSettings
private $specification;

/**
* Specify the quality of your variable bitrate (VBR) AAC audio. For a list of approximate VBR bitrates, see:
* https://docs.aws.amazon.com/mediaconvert/latest/ug/aac-support.html#aac_vbr.
* VBR Quality Level - Only used if rate_control_mode is VBR.
*
* @var AacVbrQuality::*|null
*/
Expand Down
42 changes: 42 additions & 0 deletions src/ValueObject/RemixSettings.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,26 @@
*/
final class RemixSettings
{
/**
* Optionally specify the channel in your input that contains your audio description audio signal. MediaConvert mixes
* your audio signal across all output channels, while reducing their volume according to your data stream. When you
* specify an audio description audio channel, you must also specify an audio description data channel. For more
* information about audio description signals, see the BBC WHP 198 and 051 white papers.
*
* @var int|null
*/
private $audioDescriptionAudioChannel;

/**
* Optionally specify the channel in your input that contains your audio description data stream. MediaConvert mixes
* your audio signal across all output channels, while reducing their volume according to your data stream. When you
* specify an audio description data channel, you must also specify an audio description audio channel. For more
* information about audio description signals, see the BBC WHP 198 and 051 white papers.
*
* @var int|null
*/
private $audioDescriptionDataChannel;

/**
* Channel mapping contains the group of fields that hold the remixing value for each channel, in dB. Specify remix
* values to indicate how much of the content from your input audio channel you want in your output audio channels. Each
Expand Down Expand Up @@ -43,20 +63,26 @@ final class RemixSettings

/**
* @param array{
* AudioDescriptionAudioChannel?: null|int,
* AudioDescriptionDataChannel?: null|int,
* ChannelMapping?: null|ChannelMapping|array,
* ChannelsIn?: null|int,
* ChannelsOut?: null|int,
* } $input
*/
public function __construct(array $input)
{
$this->audioDescriptionAudioChannel = $input['AudioDescriptionAudioChannel'] ?? null;
$this->audioDescriptionDataChannel = $input['AudioDescriptionDataChannel'] ?? null;
$this->channelMapping = isset($input['ChannelMapping']) ? ChannelMapping::create($input['ChannelMapping']) : null;
$this->channelsIn = $input['ChannelsIn'] ?? null;
$this->channelsOut = $input['ChannelsOut'] ?? null;
}

/**
* @param array{
* AudioDescriptionAudioChannel?: null|int,
* AudioDescriptionDataChannel?: null|int,
* ChannelMapping?: null|ChannelMapping|array,
* ChannelsIn?: null|int,
* ChannelsOut?: null|int,
Expand All @@ -67,6 +93,16 @@ public static function create($input): self
return $input instanceof self ? $input : new self($input);
}

public function getAudioDescriptionAudioChannel(): ?int
{
return $this->audioDescriptionAudioChannel;
}

public function getAudioDescriptionDataChannel(): ?int
{
return $this->audioDescriptionDataChannel;
}

public function getChannelMapping(): ?ChannelMapping
{
return $this->channelMapping;
Expand All @@ -88,6 +124,12 @@ public function getChannelsOut(): ?int
public function requestBody(): array
{
$payload = [];
if (null !== $v = $this->audioDescriptionAudioChannel) {
$payload['audioDescriptionAudioChannel'] = $v;
}
if (null !== $v = $this->audioDescriptionDataChannel) {
$payload['audioDescriptionDataChannel'] = $v;
}
if (null !== $v = $this->channelMapping) {
$payload['channelMapping'] = $v->requestBody();
}
Expand Down
3 changes: 3 additions & 0 deletions tests/Unit/MediaConvertClientTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ public function testCreateJob(): void
self::assertFalse($result->info()['resolved']);
}

/**
* @group legacy
*/
public function testDescribeEndpoints(): void
{
$client = new MediaConvertClient([], new NullProvider(), new MockHttpClient());
Expand Down

0 comments on commit dc1eae0

Please sign in to comment.