Skip to content

Commit

Permalink
Update generated code (#1762)
Browse files Browse the repository at this point in the history
update generated code
  • Loading branch information
async-aws-bot authored Sep 13, 2024
1 parent 682d8b9 commit c46f76e
Show file tree
Hide file tree
Showing 27 changed files with 754 additions and 57 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 dynamic video overlay workflows, including picture-in-picture and squeezeback

### Changed

- Enable compiler optimization for the `sprintf` function.
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.3-dev"
"dev-master": "1.4-dev"
}
}
}
5 changes: 4 additions & 1 deletion src/Enum/AacCodecProfile.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
namespace AsyncAws\MediaConvert\Enum;

/**
* AAC Profile.
* 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.
*/
final class AacCodecProfile
{
Expand Down
4 changes: 3 additions & 1 deletion src/Enum/AacRateControlMode.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
namespace AsyncAws\MediaConvert\Enum;

/**
* Rate Control Mode.
* 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.
*/
final class AacRateControlMode
{
Expand Down
3 changes: 2 additions & 1 deletion src/Enum/AacVbrQuality.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
namespace AsyncAws\MediaConvert\Enum;

/**
* VBR Quality Level - Only used if rate_control_mode is VBR.
* 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
*/
final class AacVbrQuality
{
Expand Down
6 changes: 5 additions & 1 deletion src/Enum/AudioDurationCorrection.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,15 @@
* align the audio track length with STTS duration. Track-level correction does not affect pitch, and is recommended for
* tonal audio content such as music. * Frame: Adjust the duration of each audio frame by a variable amount to align
* audio frames with STTS timestamps. No corrections are made to already-aligned frames. Frame-level correction may
* affect the pitch of corrected frames, and is recommended for atonal audio content such as speech or percussion.
* affect the pitch of corrected frames, and is recommended for atonal audio content such as speech or percussion. *
* Force: Apply audio duration correction, either Track or Frame depending on your input, regardless of the accuracy of
* your input's STTS table. Your output audio and video may not be aligned or it may contain audio artifacts.
*/
final class AudioDurationCorrection
{
public const AUTO = 'AUTO';
public const DISABLED = 'DISABLED';
public const FORCE = 'FORCE';
public const FRAME = 'FRAME';
public const TRACK = 'TRACK';

Expand All @@ -25,6 +28,7 @@ public static function exists(string $value): bool
return isset([
self::AUTO => true,
self::DISABLED => true,
self::FORCE => true,
self::FRAME => true,
self::TRACK => true,
][$value]);
Expand Down
25 changes: 25 additions & 0 deletions src/Enum/CaptionSourceByteRateLimit.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?php

namespace AsyncAws\MediaConvert\Enum;

/**
* Choose whether to limit the byte rate at which your SCC input captions are inserted into your output. To not limit
* the caption rate: We recommend that you keep the default value, Disabled. MediaConvert inserts captions in your
* output according to the byte rates listed in the EIA-608 specification, typically 2 or 3 caption bytes per frame
* depending on your output frame rate. To limit your output caption rate: Choose Enabled. Choose this option if your
* downstream systems require a maximum of 2 caption bytes per frame. Note that this setting has no effect when your
* output frame rate is 30 or 60.
*/
final class CaptionSourceByteRateLimit
{
public const DISABLED = 'DISABLED';
public const ENABLED = 'ENABLED';

public static function exists(string $value): bool
{
return isset([
self::DISABLED => true,
self::ENABLED => true,
][$value]);
}
}
2 changes: 2 additions & 0 deletions src/Enum/ContainerType.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ final class ContainerType
public const MP4 = 'MP4';
public const MPD = 'MPD';
public const MXF = 'MXF';
public const OGG = 'OGG';
public const RAW = 'RAW';
public const WEBM = 'WEBM';
public const Y4M = 'Y4M';
Expand All @@ -33,6 +34,7 @@ public static function exists(string $value): bool
self::MP4 => true,
self::MPD => true,
self::MXF => true,
self::OGG => true,
self::RAW => true,
self::WEBM => true,
self::Y4M => true,
Expand Down
25 changes: 25 additions & 0 deletions src/Enum/H264SaliencyAwareEncoding.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?php

namespace AsyncAws\MediaConvert\Enum;

/**
* Specify whether to apply Saliency aware encoding to your output. Use to improve the perceptual video quality of your
* output by allocating more encoding bits to the prominent or noticeable parts of your content. To apply saliency aware
* encoding, when possible: We recommend that you choose Preferred. The effects of Saliency aware encoding are best seen
* in lower bitrate outputs. When you choose Preferred, note that Saliency aware encoding will only apply to outputs
* that are 720p or higher in resolution. To not apply saliency aware encoding, prioritizing encoding speed over
* perceptual video quality: Choose Disabled.
*/
final class H264SaliencyAwareEncoding
{
public const DISABLED = 'DISABLED';
public const PREFERRED = 'PREFERRED';

public static function exists(string $value): bool
{
return isset([
self::DISABLED => true,
self::PREFERRED => true,
][$value]);
}
}
23 changes: 23 additions & 0 deletions src/Enum/VideoOverlayPlayBackMode.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?php

namespace AsyncAws\MediaConvert\Enum;

/**
* Specify whether your video overlay repeats or plays only once. To repeat your video overlay on a loop: Keep the
* default value, Repeat. Your overlay will repeat for the duration of the base input video. To playback your video
* overlay only once: Choose Once. With either option, you can end playback at a time that you specify by entering a
* value for End timecode.
*/
final class VideoOverlayPlayBackMode
{
public const ONCE = 'ONCE';
public const REPEAT = 'REPEAT';

public static function exists(string $value): bool
{
return isset([
self::ONCE => true,
self::REPEAT => true,
][$value]);
}
}
21 changes: 21 additions & 0 deletions src/Enum/VideoOverlayUnit.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?php

namespace AsyncAws\MediaConvert\Enum;

/**
* Specify the Unit type to use when you enter a value for X position, Y position, Width, or Height. You can choose
* Pixels or Percentage. Leave blank to use the default value, Pixels.
*/
final class VideoOverlayUnit
{
public const PERCENTAGE = 'PERCENTAGE';
public const PIXELS = 'PIXELS';

public static function exists(string $value): bool
{
return isset([
self::PERCENTAGE => true,
self::PIXELS => true,
][$value]);
}
}
27 changes: 27 additions & 0 deletions src/Input/CreateJobRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,15 @@ final class CreateJobRequest extends Input1
*/
private $hopDestinations;

/**
* Use Job engine versions to run jobs for your production workflow on one version, while you test and validate the
* latest version. To specify a Job engine version: Enter a date in a YYYY-MM-DD format. For a list of valid Job engine
* versions, submit a ListVersions request. To not specify a Job engine version: Leave blank.
*
* @var string|null
*/
private $jobEngineVersion;

/**
* Optional. When you create a job, you can either specify a job template or specify the transcoding settings
* individually.
Expand Down Expand Up @@ -144,6 +153,7 @@ final class CreateJobRequest extends Input1
* BillingTagsSource?: null|BillingTagsSource::*,
* ClientRequestToken?: null|string,
* HopDestinations?: null|array<HopDestination|array>,
* JobEngineVersion?: null|string,
* JobTemplate?: null|string,
* Priority?: null|int,
* Queue?: null|string,
Expand All @@ -162,6 +172,7 @@ public function __construct(array $input = [])
$this->billingTagsSource = $input['BillingTagsSource'] ?? null;
$this->clientRequestToken = $input['ClientRequestToken'] ?? null;
$this->hopDestinations = isset($input['HopDestinations']) ? array_map([HopDestination::class, 'create'], $input['HopDestinations']) : null;
$this->jobEngineVersion = $input['JobEngineVersion'] ?? null;
$this->jobTemplate = $input['JobTemplate'] ?? null;
$this->priority = $input['Priority'] ?? null;
$this->queue = $input['Queue'] ?? null;
Expand All @@ -180,6 +191,7 @@ public function __construct(array $input = [])
* BillingTagsSource?: null|BillingTagsSource::*,
* ClientRequestToken?: null|string,
* HopDestinations?: null|array<HopDestination|array>,
* JobEngineVersion?: null|string,
* JobTemplate?: null|string,
* Priority?: null|int,
* Queue?: null|string,
Expand Down Expand Up @@ -223,6 +235,11 @@ public function getHopDestinations(): array
return $this->hopDestinations ?? [];
}

public function getJobEngineVersion(): ?string
{
return $this->jobEngineVersion;
}

public function getJobTemplate(): ?string
{
return $this->jobTemplate;
Expand Down Expand Up @@ -339,6 +356,13 @@ public function setHopDestinations(array $value): self
return $this;
}

public function setJobEngineVersion(?string $value): self
{
$this->jobEngineVersion = $value;

return $this;
}

public function setJobTemplate(?string $value): self
{
$this->jobTemplate = $value;
Expand Down Expand Up @@ -438,6 +462,9 @@ private function requestBody(): array
$payload['hopDestinations'][$index] = $listValue->requestBody();
}
}
if (null !== $v = $this->jobEngineVersion) {
$payload['jobEngineVersion'] = $v;
}
if (null !== $v = $this->jobTemplate) {
$payload['jobTemplate'] = $v;
}
Expand Down
1 change: 1 addition & 0 deletions src/MediaConvertClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ public function cancelJob($input): CancelJobResponse
* BillingTagsSource?: null|BillingTagsSource::*,
* ClientRequestToken?: null|string,
* HopDestinations?: null|array<HopDestination|array>,
* JobEngineVersion?: null|string,
* JobTemplate?: null|string,
* Priority?: null|int,
* Queue?: null|string,
Expand Down
42 changes: 42 additions & 0 deletions src/Result/CreateJobResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,8 @@
use AsyncAws\MediaConvert\ValueObject\VideoOverlay;
use AsyncAws\MediaConvert\ValueObject\VideoOverlayInput;
use AsyncAws\MediaConvert\ValueObject\VideoOverlayInputClipping;
use AsyncAws\MediaConvert\ValueObject\VideoOverlayPosition;
use AsyncAws\MediaConvert\ValueObject\VideoOverlayTransition;
use AsyncAws\MediaConvert\ValueObject\VideoPreprocessor;
use AsyncAws\MediaConvert\ValueObject\VideoSelector;
use AsyncAws\MediaConvert\ValueObject\VorbisSettings;
Expand Down Expand Up @@ -964,6 +966,7 @@ private function populateResultFileGroupSettings(array $json): FileGroupSettings
private function populateResultFileSourceSettings(array $json): FileSourceSettings
{
return new FileSourceSettings([
'ByteRateLimit' => isset($json['byteRateLimit']) ? (string) $json['byteRateLimit'] : null,
'Convert608To708' => isset($json['convert608To708']) ? (string) $json['convert608To708'] : null,
'ConvertPaintToPop' => isset($json['convertPaintToPop']) ? (string) $json['convertPaintToPop'] : null,
'Framerate' => empty($json['framerate']) ? null : $this->populateResultCaptionSourceFramerate($json['framerate']),
Expand Down Expand Up @@ -1045,6 +1048,7 @@ private function populateResultH264Settings(array $json): H264Settings
'QvbrSettings' => empty($json['qvbrSettings']) ? null : $this->populateResultH264QvbrSettings($json['qvbrSettings']),
'RateControlMode' => isset($json['rateControlMode']) ? (string) $json['rateControlMode'] : null,
'RepeatPps' => isset($json['repeatPps']) ? (string) $json['repeatPps'] : null,
'SaliencyAwareEncoding' => isset($json['saliencyAwareEncoding']) ? (string) $json['saliencyAwareEncoding'] : null,
'ScanTypeConversionMode' => isset($json['scanTypeConversionMode']) ? (string) $json['scanTypeConversionMode'] : null,
'SceneChangeDetect' => isset($json['sceneChangeDetect']) ? (string) $json['sceneChangeDetect'] : null,
'Slices' => isset($json['slices']) ? (int) $json['slices'] : null,
Expand Down Expand Up @@ -1369,6 +1373,8 @@ private function populateResultJob(array $json): Job
'ErrorMessage' => isset($json['errorMessage']) ? (string) $json['errorMessage'] : null,
'HopDestinations' => !isset($json['hopDestinations']) ? null : $this->populateResult__listOfHopDestination($json['hopDestinations']),
'Id' => isset($json['id']) ? (string) $json['id'] : null,
'JobEngineVersionRequested' => isset($json['jobEngineVersionRequested']) ? (string) $json['jobEngineVersionRequested'] : null,
'JobEngineVersionUsed' => isset($json['jobEngineVersionUsed']) ? (string) $json['jobEngineVersionUsed'] : null,
'JobPercentComplete' => isset($json['jobPercentComplete']) ? (int) $json['jobPercentComplete'] : null,
'JobTemplate' => isset($json['jobTemplate']) ? (string) $json['jobTemplate'] : null,
'Messages' => empty($json['messages']) ? null : $this->populateResultJobMessages($json['messages']),
Expand Down Expand Up @@ -2126,8 +2132,11 @@ private function populateResultVideoOverlay(array $json): VideoOverlay
{
return new VideoOverlay([
'EndTimecode' => isset($json['endTimecode']) ? (string) $json['endTimecode'] : null,
'InitialPosition' => empty($json['initialPosition']) ? null : $this->populateResultVideoOverlayPosition($json['initialPosition']),
'Input' => empty($json['input']) ? null : $this->populateResultVideoOverlayInput($json['input']),
'Playback' => isset($json['playback']) ? (string) $json['playback'] : null,
'StartTimecode' => isset($json['startTimecode']) ? (string) $json['startTimecode'] : null,
'Transitions' => !isset($json['transitions']) ? null : $this->populateResult__listOfVideoOverlayTransition($json['transitions']),
]);
}

Expand All @@ -2149,6 +2158,26 @@ private function populateResultVideoOverlayInputClipping(array $json): VideoOver
]);
}

private function populateResultVideoOverlayPosition(array $json): VideoOverlayPosition
{
return new VideoOverlayPosition([
'Height' => isset($json['height']) ? (int) $json['height'] : null,
'Unit' => isset($json['unit']) ? (string) $json['unit'] : null,
'Width' => isset($json['width']) ? (int) $json['width'] : null,
'XPosition' => isset($json['xPosition']) ? (int) $json['xPosition'] : null,
'YPosition' => isset($json['yPosition']) ? (int) $json['yPosition'] : null,
]);
}

private function populateResultVideoOverlayTransition(array $json): VideoOverlayTransition
{
return new VideoOverlayTransition([
'EndPosition' => empty($json['endPosition']) ? null : $this->populateResultVideoOverlayPosition($json['endPosition']),
'EndTimecode' => isset($json['endTimecode']) ? (string) $json['endTimecode'] : null,
'StartTimecode' => isset($json['startTimecode']) ? (string) $json['startTimecode'] : null,
]);
}

private function populateResultVideoPreprocessor(array $json): VideoPreprocessor
{
return new VideoPreprocessor([
Expand Down Expand Up @@ -2694,6 +2723,19 @@ private function populateResult__listOfVideoOverlayInputClipping(array $json): a
return $items;
}

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

return $items;
}

/**
* @return WarningGroup[]
*/
Expand Down
Loading

0 comments on commit c46f76e

Please sign in to comment.