Skip to content

Commit

Permalink
Update generated code (#1819)
Browse files Browse the repository at this point in the history
update generated code
  • Loading branch information
async-aws-bot authored Dec 20, 2024
1 parent 5f39ce5 commit c0f215c
Show file tree
Hide file tree
Showing 10 changed files with 115 additions and 3 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 adds support for inserting timecode tracks into MP4 container outputs.

## 1.4.1

### Changed
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.4-dev"
"dev-master": "1.5-dev"
}
}
}
2 changes: 1 addition & 1 deletion src/Enum/DropFrameTimecode.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
/**
* Applies only to 29.97 fps outputs. When this feature is enabled, the service will use drop-frame timecode on outputs.
* If it is not possible to use drop-frame timecode, the system will fall back to non-drop-frame. This setting is
* enabled by default when Timecode insertion is enabled.
* enabled by default when Timecode insertion or Timecode track is enabled.
*/
final class DropFrameTimecode
{
Expand Down
23 changes: 23 additions & 0 deletions src/Enum/RemoveRubyReserveAttributes.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?php

namespace AsyncAws\MediaConvert\Enum;

/**
* Optionally remove any tts:rubyReserve attributes present in your input, that do not have a tts:ruby attribute in the
* same element, from your output. Use if your vertical Japanese output captions have alignment issues. To remove ruby
* reserve attributes when present: Choose Enabled. To not remove any ruby reserve attributes: Keep the default value,
* Disabled.
*/
final class RemoveRubyReserveAttributes
{
public const DISABLED = 'DISABLED';
public const ENABLED = 'ENABLED';

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

namespace AsyncAws\MediaConvert\Enum;

/**
* To include a timecode track in your MP4 output: Choose Enabled. MediaConvert writes the timecode track in the Null
* Media Header box (NMHD), without any timecode text formatting information. You can also specify dropframe or
* non-dropframe timecode under the Drop Frame Timecode setting. To not include a timecode track: Keep the default
* value, Disabled.
*/
final class TimecodeTrack
{
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/Result/CreateJobResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -475,6 +475,7 @@ private function populateResultBurninDestinationSettings(array $json): BurninDes
'HexFontColor' => isset($json['hexFontColor']) ? (string) $json['hexFontColor'] : null,
'OutlineColor' => isset($json['outlineColor']) ? (string) $json['outlineColor'] : null,
'OutlineSize' => isset($json['outlineSize']) ? (int) $json['outlineSize'] : null,
'RemoveRubyReserveAttributes' => isset($json['removeRubyReserveAttributes']) ? (string) $json['removeRubyReserveAttributes'] : null,
'ShadowColor' => isset($json['shadowColor']) ? (string) $json['shadowColor'] : null,
'ShadowOpacity' => isset($json['shadowOpacity']) ? (int) $json['shadowOpacity'] : null,
'ShadowXOffset' => isset($json['shadowXOffset']) ? (int) $json['shadowXOffset'] : null,
Expand Down Expand Up @@ -2126,6 +2127,7 @@ private function populateResultVideoDescription(array $json): VideoDescription
'ScalingBehavior' => isset($json['scalingBehavior']) ? (string) $json['scalingBehavior'] : null,
'Sharpness' => isset($json['sharpness']) ? (int) $json['sharpness'] : null,
'TimecodeInsertion' => isset($json['timecodeInsertion']) ? (string) $json['timecodeInsertion'] : null,
'TimecodeTrack' => isset($json['timecodeTrack']) ? (string) $json['timecodeTrack'] : null,
'VideoPreprocessors' => empty($json['videoPreprocessors']) ? null : $this->populateResultVideoPreprocessor($json['videoPreprocessors']),
'Width' => isset($json['width']) ? (int) $json['width'] : null,
]);
Expand Down
2 changes: 2 additions & 0 deletions src/Result/GetJobResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -475,6 +475,7 @@ private function populateResultBurninDestinationSettings(array $json): BurninDes
'HexFontColor' => isset($json['hexFontColor']) ? (string) $json['hexFontColor'] : null,
'OutlineColor' => isset($json['outlineColor']) ? (string) $json['outlineColor'] : null,
'OutlineSize' => isset($json['outlineSize']) ? (int) $json['outlineSize'] : null,
'RemoveRubyReserveAttributes' => isset($json['removeRubyReserveAttributes']) ? (string) $json['removeRubyReserveAttributes'] : null,
'ShadowColor' => isset($json['shadowColor']) ? (string) $json['shadowColor'] : null,
'ShadowOpacity' => isset($json['shadowOpacity']) ? (int) $json['shadowOpacity'] : null,
'ShadowXOffset' => isset($json['shadowXOffset']) ? (int) $json['shadowXOffset'] : null,
Expand Down Expand Up @@ -2126,6 +2127,7 @@ private function populateResultVideoDescription(array $json): VideoDescription
'ScalingBehavior' => isset($json['scalingBehavior']) ? (string) $json['scalingBehavior'] : null,
'Sharpness' => isset($json['sharpness']) ? (int) $json['sharpness'] : null,
'TimecodeInsertion' => isset($json['timecodeInsertion']) ? (string) $json['timecodeInsertion'] : null,
'TimecodeTrack' => isset($json['timecodeTrack']) ? (string) $json['timecodeTrack'] : null,
'VideoPreprocessors' => empty($json['videoPreprocessors']) ? null : $this->populateResultVideoPreprocessor($json['videoPreprocessors']),
'Width' => isset($json['width']) ? (int) $json['width'] : null,
]);
Expand Down
2 changes: 2 additions & 0 deletions src/Result/ListJobsResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -542,6 +542,7 @@ private function populateResultBurninDestinationSettings(array $json): BurninDes
'HexFontColor' => isset($json['hexFontColor']) ? (string) $json['hexFontColor'] : null,
'OutlineColor' => isset($json['outlineColor']) ? (string) $json['outlineColor'] : null,
'OutlineSize' => isset($json['outlineSize']) ? (int) $json['outlineSize'] : null,
'RemoveRubyReserveAttributes' => isset($json['removeRubyReserveAttributes']) ? (string) $json['removeRubyReserveAttributes'] : null,
'ShadowColor' => isset($json['shadowColor']) ? (string) $json['shadowColor'] : null,
'ShadowOpacity' => isset($json['shadowOpacity']) ? (int) $json['shadowOpacity'] : null,
'ShadowXOffset' => isset($json['shadowXOffset']) ? (int) $json['shadowXOffset'] : null,
Expand Down Expand Up @@ -2193,6 +2194,7 @@ private function populateResultVideoDescription(array $json): VideoDescription
'ScalingBehavior' => isset($json['scalingBehavior']) ? (string) $json['scalingBehavior'] : null,
'Sharpness' => isset($json['sharpness']) ? (int) $json['sharpness'] : null,
'TimecodeInsertion' => isset($json['timecodeInsertion']) ? (string) $json['timecodeInsertion'] : null,
'TimecodeTrack' => isset($json['timecodeTrack']) ? (string) $json['timecodeTrack'] : null,
'VideoPreprocessors' => empty($json['videoPreprocessors']) ? null : $this->populateResultVideoPreprocessor($json['videoPreprocessors']),
'Width' => isset($json['width']) ? (int) $json['width'] : null,
]);
Expand Down
28 changes: 28 additions & 0 deletions src/ValueObject/BurninDestinationSettings.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
use AsyncAws\MediaConvert\Enum\BurnInSubtitleStylePassthrough;
use AsyncAws\MediaConvert\Enum\BurninSubtitleTeletextSpacing;
use AsyncAws\MediaConvert\Enum\FontScript;
use AsyncAws\MediaConvert\Enum\RemoveRubyReserveAttributes;

/**
* Burn-in is a captions delivery method, rather than a captions format. Burn-in writes the captions directly on your
Expand Down Expand Up @@ -168,6 +169,16 @@ final class BurninDestinationSettings
*/
private $outlineSize;

/**
* Optionally remove any tts:rubyReserve attributes present in your input, that do not have a tts:ruby attribute in the
* same element, from your output. Use if your vertical Japanese output captions have alignment issues. To remove ruby
* reserve attributes when present: Choose Enabled. To not remove any ruby reserve attributes: Keep the default value,
* Disabled.
*
* @var RemoveRubyReserveAttributes::*|null
*/
private $removeRubyReserveAttributes;

/**
* Specify the color of the shadow cast by the captions. Leave Shadow color blank and set Style passthrough to enabled
* to use the shadow color data from your input captions, if present.
Expand Down Expand Up @@ -262,6 +273,7 @@ final class BurninDestinationSettings
* HexFontColor?: null|string,
* OutlineColor?: null|BurninSubtitleOutlineColor::*,
* OutlineSize?: null|int,
* RemoveRubyReserveAttributes?: null|RemoveRubyReserveAttributes::*,
* ShadowColor?: null|BurninSubtitleShadowColor::*,
* ShadowOpacity?: null|int,
* ShadowXOffset?: null|int,
Expand Down Expand Up @@ -291,6 +303,7 @@ public function __construct(array $input)
$this->hexFontColor = $input['HexFontColor'] ?? null;
$this->outlineColor = $input['OutlineColor'] ?? null;
$this->outlineSize = $input['OutlineSize'] ?? null;
$this->removeRubyReserveAttributes = $input['RemoveRubyReserveAttributes'] ?? null;
$this->shadowColor = $input['ShadowColor'] ?? null;
$this->shadowOpacity = $input['ShadowOpacity'] ?? null;
$this->shadowXoffset = $input['ShadowXOffset'] ?? null;
Expand Down Expand Up @@ -320,6 +333,7 @@ public function __construct(array $input)
* HexFontColor?: null|string,
* OutlineColor?: null|BurninSubtitleOutlineColor::*,
* OutlineSize?: null|int,
* RemoveRubyReserveAttributes?: null|RemoveRubyReserveAttributes::*,
* ShadowColor?: null|BurninSubtitleShadowColor::*,
* ShadowOpacity?: null|int,
* ShadowXOffset?: null|int,
Expand Down Expand Up @@ -441,6 +455,14 @@ public function getOutlineSize(): ?int
return $this->outlineSize;
}

/**
* @return RemoveRubyReserveAttributes::*|null
*/
public function getRemoveRubyReserveAttributes(): ?string
{
return $this->removeRubyReserveAttributes;
}

/**
* @return BurninSubtitleShadowColor::*|null
*/
Expand Down Expand Up @@ -568,6 +590,12 @@ public function requestBody(): array
if (null !== $v = $this->outlineSize) {
$payload['outlineSize'] = $v;
}
if (null !== $v = $this->removeRubyReserveAttributes) {
if (!RemoveRubyReserveAttributes::exists($v)) {
throw new InvalidArgument(\sprintf('Invalid parameter "removeRubyReserveAttributes" for "%s". The value "%s" is not a valid "RemoveRubyReserveAttributes".', __CLASS__, $v));
}
$payload['removeRubyReserveAttributes'] = $v;
}
if (null !== $v = $this->shadowColor) {
if (!BurninSubtitleShadowColor::exists($v)) {
throw new InvalidArgument(\sprintf('Invalid parameter "shadowColor" for "%s". The value "%s" is not a valid "BurninSubtitleShadowColor".', __CLASS__, $v));
Expand Down
30 changes: 29 additions & 1 deletion src/ValueObject/VideoDescription.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
use AsyncAws\MediaConvert\Enum\DropFrameTimecode;
use AsyncAws\MediaConvert\Enum\RespondToAfd;
use AsyncAws\MediaConvert\Enum\ScalingBehavior;
use AsyncAws\MediaConvert\Enum\TimecodeTrack;
use AsyncAws\MediaConvert\Enum\VideoTimecodeInsertion;

/**
Expand Down Expand Up @@ -65,7 +66,7 @@ final class VideoDescription
/**
* Applies only to 29.97 fps outputs. When this feature is enabled, the service will use drop-frame timecode on outputs.
* If it is not possible to use drop-frame timecode, the system will fall back to non-drop-frame. This setting is
* enabled by default when Timecode insertion is enabled.
* enabled by default when Timecode insertion or Timecode track is enabled.
*
* @var DropFrameTimecode::*|null
*/
Expand Down Expand Up @@ -138,6 +139,16 @@ final class VideoDescription
*/
private $timecodeInsertion;

/**
* To include a timecode track in your MP4 output: Choose Enabled. MediaConvert writes the timecode track in the Null
* Media Header box (NMHD), without any timecode text formatting information. You can also specify dropframe or
* non-dropframe timecode under the Drop Frame Timecode setting. To not include a timecode track: Keep the default
* value, Disabled.
*
* @var TimecodeTrack::*|null
*/
private $timecodeTrack;

/**
* Find additional transcoding features under Preprocessors. Enable the features at each output individually. These
* features are disabled by default.
Expand Down Expand Up @@ -170,6 +181,7 @@ final class VideoDescription
* ScalingBehavior?: null|ScalingBehavior::*,
* Sharpness?: null|int,
* TimecodeInsertion?: null|VideoTimecodeInsertion::*,
* TimecodeTrack?: null|TimecodeTrack::*,
* VideoPreprocessors?: null|VideoPreprocessor|array,
* Width?: null|int,
* } $input
Expand All @@ -189,6 +201,7 @@ public function __construct(array $input)
$this->scalingBehavior = $input['ScalingBehavior'] ?? null;
$this->sharpness = $input['Sharpness'] ?? null;
$this->timecodeInsertion = $input['TimecodeInsertion'] ?? null;
$this->timecodeTrack = $input['TimecodeTrack'] ?? null;
$this->videoPreprocessors = isset($input['VideoPreprocessors']) ? VideoPreprocessor::create($input['VideoPreprocessors']) : null;
$this->width = $input['Width'] ?? null;
}
Expand All @@ -208,6 +221,7 @@ public function __construct(array $input)
* ScalingBehavior?: null|ScalingBehavior::*,
* Sharpness?: null|int,
* TimecodeInsertion?: null|VideoTimecodeInsertion::*,
* TimecodeTrack?: null|TimecodeTrack::*,
* VideoPreprocessors?: null|VideoPreprocessor|array,
* Width?: null|int,
* }|VideoDescription $input
Expand Down Expand Up @@ -303,6 +317,14 @@ public function getTimecodeInsertion(): ?string
return $this->timecodeInsertion;
}

/**
* @return TimecodeTrack::*|null
*/
public function getTimecodeTrack(): ?string
{
return $this->timecodeTrack;
}

public function getVideoPreprocessors(): ?VideoPreprocessor
{
return $this->videoPreprocessors;
Expand Down Expand Up @@ -379,6 +401,12 @@ public function requestBody(): array
}
$payload['timecodeInsertion'] = $v;
}
if (null !== $v = $this->timecodeTrack) {
if (!TimecodeTrack::exists($v)) {
throw new InvalidArgument(\sprintf('Invalid parameter "timecodeTrack" for "%s". The value "%s" is not a valid "TimecodeTrack".', __CLASS__, $v));
}
$payload['timecodeTrack'] = $v;
}
if (null !== $v = $this->videoPreprocessors) {
$payload['videoPreprocessors'] = $v->requestBody();
}
Expand Down

0 comments on commit c0f215c

Please sign in to comment.