From a5c3a2242478be40b8727681e68bb190e70299f8 Mon Sep 17 00:00:00 2001 From: AsyncAws Bot Date: Fri, 13 Sep 2024 06:31:28 +0000 Subject: [PATCH] update generated code --- manifest.json | 2 +- .../CognitoIdentityProvider/CHANGELOG.md | 1 + .../src/CognitoIdentityProviderClient.php | 98 ++++++----- .../src/Enum/ChallengeNameType.php | 2 + .../Input/RespondToAuthChallengeRequest.php | 9 +- .../src/Input/SetUserMFAPreferenceRequest.php | 36 +++- .../src/Result/AdminGetUserResponse.php | 2 +- .../src/Result/AdminInitiateAuthResponse.php | 7 +- .../src/Result/GetUserResponse.php | 2 +- .../src/Result/InitiateAuthResponse.php | 3 +- .../src/ValueObject/EmailMfaSettingsType.php | 78 +++++++++ .../src/ValueObject/SMSMfaSettingsType.php | 4 +- src/Service/MediaConvert/CHANGELOG.md | 4 + src/Service/MediaConvert/composer.json | 2 +- .../MediaConvert/src/Enum/AacCodecProfile.php | 5 +- .../src/Enum/AacRateControlMode.php | 4 +- .../MediaConvert/src/Enum/AacVbrQuality.php | 3 +- .../src/Enum/AudioDurationCorrection.php | 6 +- .../src/Enum/CaptionSourceByteRateLimit.php | 25 +++ .../MediaConvert/src/Enum/ContainerType.php | 2 + .../src/Enum/H264SaliencyAwareEncoding.php | 25 +++ .../src/Enum/VideoOverlayPlayBackMode.php | 23 +++ .../src/Enum/VideoOverlayUnit.php | 21 +++ .../src/Input/CreateJobRequest.php | 27 +++ .../MediaConvert/src/MediaConvertClient.php | 1 + .../src/Result/CreateJobResponse.php | 42 +++++ .../src/Result/GetJobResponse.php | 42 +++++ .../src/Result/ListJobsResponse.php | 42 +++++ .../src/ValueObject/AacSettings.php | 21 ++- .../src/ValueObject/AudioSelector.php | 4 +- .../src/ValueObject/FileSourceSettings.php | 30 ++++ .../src/ValueObject/H264Settings.php | 51 ++++-- .../src/ValueObject/H265Settings.php | 21 +-- .../MediaConvert/src/ValueObject/Job.php | 34 ++++ .../src/ValueObject/Mpeg2Settings.php | 17 +- .../src/ValueObject/VideoOverlay.php | 101 ++++++++++-- .../src/ValueObject/VideoOverlayInput.php | 4 +- .../src/ValueObject/VideoOverlayPosition.php | 156 ++++++++++++++++++ .../ValueObject/VideoOverlayTransition.php | 98 +++++++++++ 39 files changed, 941 insertions(+), 114 deletions(-) create mode 100644 src/Service/CognitoIdentityProvider/src/ValueObject/EmailMfaSettingsType.php create mode 100644 src/Service/MediaConvert/src/Enum/CaptionSourceByteRateLimit.php create mode 100644 src/Service/MediaConvert/src/Enum/H264SaliencyAwareEncoding.php create mode 100644 src/Service/MediaConvert/src/Enum/VideoOverlayPlayBackMode.php create mode 100644 src/Service/MediaConvert/src/Enum/VideoOverlayUnit.php create mode 100644 src/Service/MediaConvert/src/ValueObject/VideoOverlayPosition.php create mode 100644 src/Service/MediaConvert/src/ValueObject/VideoOverlayTransition.php diff --git a/manifest.json b/manifest.json index 3217ddadb..1586ee763 100644 --- a/manifest.json +++ b/manifest.json @@ -1,6 +1,6 @@ { "variables": { - "${LATEST}": "3.321.7" + "${LATEST}": "3.321.10" }, "endpoints": "https://raw.githubusercontent.com/aws/aws-sdk-php/${LATEST}/src/data/endpoints.json", "services": { diff --git a/src/Service/CognitoIdentityProvider/CHANGELOG.md b/src/Service/CognitoIdentityProvider/CHANGELOG.md index 5f9eb179b..d7224405a 100644 --- a/src/Service/CognitoIdentityProvider/CHANGELOG.md +++ b/src/Service/CognitoIdentityProvider/CHANGELOG.md @@ -5,6 +5,7 @@ ### Added - AWS api-change: Added `PasswordHistoryPolicyViolationException` exception. +- AWS api-change: Added email MFA option to user pools with advanced security features. ### Changed diff --git a/src/Service/CognitoIdentityProvider/src/CognitoIdentityProviderClient.php b/src/Service/CognitoIdentityProvider/src/CognitoIdentityProviderClient.php index ae4e31ad7..57ee3d10c 100644 --- a/src/Service/CognitoIdentityProvider/src/CognitoIdentityProviderClient.php +++ b/src/Service/CognitoIdentityProvider/src/CognitoIdentityProviderClient.php @@ -99,6 +99,7 @@ use AsyncAws\CognitoIdentityProvider\ValueObject\AnalyticsMetadataType; use AsyncAws\CognitoIdentityProvider\ValueObject\AttributeType; use AsyncAws\CognitoIdentityProvider\ValueObject\ContextDataType; +use AsyncAws\CognitoIdentityProvider\ValueObject\EmailMfaSettingsType; use AsyncAws\CognitoIdentityProvider\ValueObject\SMSMfaSettingsType; use AsyncAws\CognitoIdentityProvider\ValueObject\SoftwareTokenMfaSettingsType; use AsyncAws\CognitoIdentityProvider\ValueObject\UserContextDataType; @@ -236,11 +237,11 @@ public function adminConfirmSignUp($input): AdminConfirmSignUpResponse * > number automatically. Otherwise, Amazon Cognito users who must receive SMS messages might not be able to sign up, * > activate their accounts, or sign in. * > - * > If you have never used SMS text messages with Amazon Cognito or any other Amazon Web Services service, Amazon - * > Simple Notification Service might place your account in the SMS sandbox. In *sandbox mode [^2]*, you can send - * > messages only to verified phone numbers. After you test your app while in the sandbox environment, you can move out - * > of the sandbox and into production. For more information, see SMS message settings for Amazon Cognito user pools - * > [^3] in the *Amazon Cognito Developer Guide*. + * > If you have never used SMS text messages with Amazon Cognito or any other Amazon Web Servicesservice, Amazon Simple + * > Notification Service might place your account in the SMS sandbox. In *sandbox mode [^2]*, you can send messages + * > only to verified phone numbers. After you test your app while in the sandbox environment, you can move out of the + * > sandbox and into production. For more information, see SMS message settings for Amazon Cognito user pools [^3] in + * > the *Amazon Cognito Developer Guide*. * * This message is based on a template that you configured in your call to create or update a user pool. This template * includes your custom sign-up instructions and placeholders for user name and temporary password. @@ -522,11 +523,11 @@ public function adminGetUser($input): AdminGetUserResponse * > number automatically. Otherwise, Amazon Cognito users who must receive SMS messages might not be able to sign up, * > activate their accounts, or sign in. * > - * > If you have never used SMS text messages with Amazon Cognito or any other Amazon Web Services service, Amazon - * > Simple Notification Service might place your account in the SMS sandbox. In *sandbox mode [^2]*, you can send - * > messages only to verified phone numbers. After you test your app while in the sandbox environment, you can move out - * > of the sandbox and into production. For more information, see SMS message settings for Amazon Cognito user pools - * > [^3] in the *Amazon Cognito Developer Guide*. + * > If you have never used SMS text messages with Amazon Cognito or any other Amazon Web Servicesservice, Amazon Simple + * > Notification Service might place your account in the SMS sandbox. In *sandbox mode [^2]*, you can send messages + * > only to verified phone numbers. After you test your app while in the sandbox environment, you can move out of the + * > sandbox and into production. For more information, see SMS message settings for Amazon Cognito user pools [^3] in + * > the *Amazon Cognito Developer Guide*. * * > Amazon Cognito evaluates Identity and Access Management (IAM) policies in requests for this API operation. For this * > operation, you must use IAM credentials to authorize requests, and you must grant yourself the corresponding IAM @@ -569,6 +570,7 @@ public function adminGetUser($input): AdminGetUserResponse * @throws InvalidLambdaResponseException * @throws MFAMethodNotFoundException * @throws InvalidSmsRoleAccessPolicyException + * @throws InvalidEmailRoleAccessPolicyException * @throws InvalidSmsRoleTrustRelationshipException * @throws PasswordResetRequiredException * @throws UserNotFoundException @@ -589,6 +591,7 @@ public function adminInitiateAuth($input): AdminInitiateAuthResponse 'InvalidLambdaResponseException' => InvalidLambdaResponseException::class, 'MFAMethodNotFoundException' => MFAMethodNotFoundException::class, 'InvalidSmsRoleAccessPolicyException' => InvalidSmsRoleAccessPolicyException::class, + 'InvalidEmailRoleAccessPolicyException' => InvalidEmailRoleAccessPolicyException::class, 'InvalidSmsRoleTrustRelationshipException' => InvalidSmsRoleTrustRelationshipException::class, 'PasswordResetRequiredException' => PasswordResetRequiredException::class, 'UserNotFoundException' => UserNotFoundException::class, @@ -658,11 +661,11 @@ public function adminRemoveUserFromGroup($input): Result * > number automatically. Otherwise, Amazon Cognito users who must receive SMS messages might not be able to sign up, * > activate their accounts, or sign in. * > - * > If you have never used SMS text messages with Amazon Cognito or any other Amazon Web Services service, Amazon - * > Simple Notification Service might place your account in the SMS sandbox. In *sandbox mode [^3]*, you can send - * > messages only to verified phone numbers. After you test your app while in the sandbox environment, you can move out - * > of the sandbox and into production. For more information, see SMS message settings for Amazon Cognito user pools - * > [^4] in the *Amazon Cognito Developer Guide*. + * > If you have never used SMS text messages with Amazon Cognito or any other Amazon Web Servicesservice, Amazon Simple + * > Notification Service might place your account in the SMS sandbox. In *sandbox mode [^3]*, you can send messages + * > only to verified phone numbers. After you test your app while in the sandbox environment, you can move out of the + * > sandbox and into production. For more information, see SMS message settings for Amazon Cognito user pools [^4] in + * > the *Amazon Cognito Developer Guide*. * * Deactivates a user's password, requiring them to change it. If a user tries to sign in after the API is called, * Amazon Cognito responds with a `PasswordResetRequiredException` error. Your app must then perform the actions that @@ -810,11 +813,11 @@ public function adminSetUserPassword($input): AdminSetUserPasswordResponse * > number automatically. Otherwise, Amazon Cognito users who must receive SMS messages might not be able to sign up, * > activate their accounts, or sign in. * > - * > If you have never used SMS text messages with Amazon Cognito or any other Amazon Web Services service, Amazon - * > Simple Notification Service might place your account in the SMS sandbox. In *sandbox mode [^2]*, you can send - * > messages only to verified phone numbers. After you test your app while in the sandbox environment, you can move out - * > of the sandbox and into production. For more information, see SMS message settings for Amazon Cognito user pools - * > [^3] in the *Amazon Cognito Developer Guide*. + * > If you have never used SMS text messages with Amazon Cognito or any other Amazon Web Servicesservice, Amazon Simple + * > Notification Service might place your account in the SMS sandbox. In *sandbox mode [^2]*, you can send messages + * > only to verified phone numbers. After you test your app while in the sandbox environment, you can move out of the + * > sandbox and into production. For more information, see SMS message settings for Amazon Cognito user pools [^3] in + * > the *Amazon Cognito Developer Guide*. * * Updates the specified user's attributes, including developer attributes, as an administrator. Works on any user. To * delete an attribute from your user, submit the attribute in your API request with a blank value. @@ -1283,11 +1286,11 @@ public function createGroup($input): CreateGroupResponse * > number automatically. Otherwise, Amazon Cognito users who must receive SMS messages might not be able to sign up, * > activate their accounts, or sign in. * > - * > If you have never used SMS text messages with Amazon Cognito or any other Amazon Web Services service, Amazon - * > Simple Notification Service might place your account in the SMS sandbox. In *sandbox mode [^6]*, you can send - * > messages only to verified phone numbers. After you test your app while in the sandbox environment, you can move out - * > of the sandbox and into production. For more information, see SMS message settings for Amazon Cognito user pools - * > [^7] in the *Amazon Cognito Developer Guide*. + * > If you have never used SMS text messages with Amazon Cognito or any other Amazon Web Servicesservice, Amazon Simple + * > Notification Service might place your account in the SMS sandbox. In *sandbox mode [^6]*, you can send messages + * > only to verified phone numbers. After you test your app while in the sandbox environment, you can move out of the + * > sandbox and into production. For more information, see SMS message settings for Amazon Cognito user pools [^7] in + * > the *Amazon Cognito Developer Guide*. * * [^1]: https://docs.aws.amazon.com/cognito/latest/developerguide/how-to-recover-a-user-account.html * [^2]: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_ConfirmForgotPassword.html @@ -1414,11 +1417,11 @@ public function getUser($input): GetUserResponse * > number automatically. Otherwise, Amazon Cognito users who must receive SMS messages might not be able to sign up, * > activate their accounts, or sign in. * > - * > If you have never used SMS text messages with Amazon Cognito or any other Amazon Web Services service, Amazon - * > Simple Notification Service might place your account in the SMS sandbox. In *sandbox mode [^4]*, you can send - * > messages only to verified phone numbers. After you test your app while in the sandbox environment, you can move out - * > of the sandbox and into production. For more information, see SMS message settings for Amazon Cognito user pools - * > [^5] in the *Amazon Cognito Developer Guide*. + * > If you have never used SMS text messages with Amazon Cognito or any other Amazon Web Servicesservice, Amazon Simple + * > Notification Service might place your account in the SMS sandbox. In *sandbox mode [^4]*, you can send messages + * > only to verified phone numbers. After you test your app while in the sandbox environment, you can move out of the + * > sandbox and into production. For more information, see SMS message settings for Amazon Cognito user pools [^5] in + * > the *Amazon Cognito Developer Guide*. * * [^1]: https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-identity-federation.html * [^2]: https://docs.aws.amazon.com/cognito/latest/developerguide/user-pools-API-operations.html @@ -1452,6 +1455,7 @@ public function getUser($input): GetUserResponse * @throws UserNotConfirmedException * @throws InternalErrorException * @throws InvalidSmsRoleAccessPolicyException + * @throws InvalidEmailRoleAccessPolicyException * @throws InvalidSmsRoleTrustRelationshipException * @throws ForbiddenException */ @@ -1472,6 +1476,7 @@ public function initiateAuth($input): InitiateAuthResponse 'UserNotConfirmedException' => UserNotConfirmedException::class, 'InternalErrorException' => InternalErrorException::class, 'InvalidSmsRoleAccessPolicyException' => InvalidSmsRoleAccessPolicyException::class, + 'InvalidEmailRoleAccessPolicyException' => InvalidEmailRoleAccessPolicyException::class, 'InvalidSmsRoleTrustRelationshipException' => InvalidSmsRoleTrustRelationshipException::class, 'ForbiddenException' => ForbiddenException::class, ]])); @@ -1587,11 +1592,11 @@ public function listUsers($input): ListUsersResponse * > number automatically. Otherwise, Amazon Cognito users who must receive SMS messages might not be able to sign up, * > activate their accounts, or sign in. * > - * > If you have never used SMS text messages with Amazon Cognito or any other Amazon Web Services service, Amazon - * > Simple Notification Service might place your account in the SMS sandbox. In *sandbox mode [^3]*, you can send - * > messages only to verified phone numbers. After you test your app while in the sandbox environment, you can move out - * > of the sandbox and into production. For more information, see SMS message settings for Amazon Cognito user pools - * > [^4] in the *Amazon Cognito Developer Guide*. + * > If you have never used SMS text messages with Amazon Cognito or any other Amazon Web Servicesservice, Amazon Simple + * > Notification Service might place your account in the SMS sandbox. In *sandbox mode [^3]*, you can send messages + * > only to verified phone numbers. After you test your app while in the sandbox environment, you can move out of the + * > sandbox and into production. For more information, see SMS message settings for Amazon Cognito user pools [^4] in + * > the *Amazon Cognito Developer Guide*. * * [^1]: https://docs.aws.amazon.com/cognito/latest/developerguide/user-pools-API-operations.html * [^2]: https://console.aws.amazon.com/pinpoint/home/ @@ -1671,11 +1676,11 @@ public function resendConfirmationCode($input): ResendConfirmationCodeResponse * > number automatically. Otherwise, Amazon Cognito users who must receive SMS messages might not be able to sign up, * > activate their accounts, or sign in. * > - * > If you have never used SMS text messages with Amazon Cognito or any other Amazon Web Services service, Amazon - * > Simple Notification Service might place your account in the SMS sandbox. In *sandbox mode [^4]*, you can send - * > messages only to verified phone numbers. After you test your app while in the sandbox environment, you can move out - * > of the sandbox and into production. For more information, see SMS message settings for Amazon Cognito user pools - * > [^5] in the *Amazon Cognito Developer Guide*. + * > If you have never used SMS text messages with Amazon Cognito or any other Amazon Web Servicesservice, Amazon Simple + * > Notification Service might place your account in the SMS sandbox. In *sandbox mode [^4]*, you can send messages + * > only to verified phone numbers. After you test your app while in the sandbox environment, you can move out of the + * > sandbox and into production. For more information, see SMS message settings for Amazon Cognito user pools [^5] in + * > the *Amazon Cognito Developer Guide*. * * [^1]: https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-lambda-challenge.html * [^2]: https://docs.aws.amazon.com/cognito/latest/developerguide/user-pools-API-operations.html @@ -1715,6 +1720,7 @@ public function resendConfirmationCode($input): ResendConfirmationCodeResponse * @throws UserNotConfirmedException * @throws InvalidSmsRoleAccessPolicyException * @throws InvalidSmsRoleTrustRelationshipException + * @throws InvalidEmailRoleAccessPolicyException * @throws AliasExistsException * @throws InternalErrorException * @throws SoftwareTokenMFANotFoundException @@ -1742,6 +1748,7 @@ public function respondToAuthChallenge($input): RespondToAuthChallengeResponse 'UserNotConfirmedException' => UserNotConfirmedException::class, 'InvalidSmsRoleAccessPolicyException' => InvalidSmsRoleAccessPolicyException::class, 'InvalidSmsRoleTrustRelationshipException' => InvalidSmsRoleTrustRelationshipException::class, + 'InvalidEmailRoleAccessPolicyException' => InvalidEmailRoleAccessPolicyException::class, 'AliasExistsException' => AliasExistsException::class, 'InternalErrorException' => InternalErrorException::class, 'SoftwareTokenMFANotFoundException' => SoftwareTokenMFANotFoundException::class, @@ -1822,6 +1829,7 @@ public function revokeToken($input): RevokeTokenResponse * @param array{ * SMSMfaSettings?: null|SMSMfaSettingsType|array, * SoftwareTokenMfaSettings?: null|SoftwareTokenMfaSettingsType|array, + * EmailMfaSettings?: null|EmailMfaSettingsType|array, * AccessToken: string, * '@region'?: string|null, * }|SetUserMFAPreferenceRequest $input @@ -1866,11 +1874,11 @@ public function setUserMfaPreference($input): SetUserMFAPreferenceResponse * > number automatically. Otherwise, Amazon Cognito users who must receive SMS messages might not be able to sign up, * > activate their accounts, or sign in. * > - * > If you have never used SMS text messages with Amazon Cognito or any other Amazon Web Services service, Amazon - * > Simple Notification Service might place your account in the SMS sandbox. In *sandbox mode [^3]*, you can send - * > messages only to verified phone numbers. After you test your app while in the sandbox environment, you can move out - * > of the sandbox and into production. For more information, see SMS message settings for Amazon Cognito user pools - * > [^4] in the *Amazon Cognito Developer Guide*. + * > If you have never used SMS text messages with Amazon Cognito or any other Amazon Web Servicesservice, Amazon Simple + * > Notification Service might place your account in the SMS sandbox. In *sandbox mode [^3]*, you can send messages + * > only to verified phone numbers. After you test your app while in the sandbox environment, you can move out of the + * > sandbox and into production. For more information, see SMS message settings for Amazon Cognito user pools [^4] in + * > the *Amazon Cognito Developer Guide*. * * [^1]: https://docs.aws.amazon.com/cognito/latest/developerguide/user-pools-API-operations.html * [^2]: https://console.aws.amazon.com/pinpoint/home/ diff --git a/src/Service/CognitoIdentityProvider/src/Enum/ChallengeNameType.php b/src/Service/CognitoIdentityProvider/src/Enum/ChallengeNameType.php index a7a87fd75..cafb17633 100644 --- a/src/Service/CognitoIdentityProvider/src/Enum/ChallengeNameType.php +++ b/src/Service/CognitoIdentityProvider/src/Enum/ChallengeNameType.php @@ -8,6 +8,7 @@ final class ChallengeNameType public const CUSTOM_CHALLENGE = 'CUSTOM_CHALLENGE'; public const DEVICE_PASSWORD_VERIFIER = 'DEVICE_PASSWORD_VERIFIER'; public const DEVICE_SRP_AUTH = 'DEVICE_SRP_AUTH'; + public const EMAIL_OTP = 'EMAIL_OTP'; public const MFA_SETUP = 'MFA_SETUP'; public const NEW_PASSWORD_REQUIRED = 'NEW_PASSWORD_REQUIRED'; public const PASSWORD_VERIFIER = 'PASSWORD_VERIFIER'; @@ -22,6 +23,7 @@ public static function exists(string $value): bool self::CUSTOM_CHALLENGE => true, self::DEVICE_PASSWORD_VERIFIER => true, self::DEVICE_SRP_AUTH => true, + self::EMAIL_OTP => true, self::MFA_SETUP => true, self::NEW_PASSWORD_REQUIRED => true, self::PASSWORD_VERIFIER => true, diff --git a/src/Service/CognitoIdentityProvider/src/Input/RespondToAuthChallengeRequest.php b/src/Service/CognitoIdentityProvider/src/Input/RespondToAuthChallengeRequest.php index 4ad600440..6e02bcd34 100644 --- a/src/Service/CognitoIdentityProvider/src/Input/RespondToAuthChallengeRequest.php +++ b/src/Service/CognitoIdentityProvider/src/Input/RespondToAuthChallengeRequest.php @@ -55,9 +55,16 @@ final class RespondToAuthChallengeRequest extends Input * * - `SMS_MFA`: * - * `"ChallengeName": "SMS_MFA", "ChallengeResponses": {"SMS_MFA_CODE": "[SMS_code]", "USERNAME": "[username]"}` + * `"ChallengeName": "SMS_MFA", "ChallengeResponses": {"SMS_MFA_CODE": "[code]", "USERNAME": "[username]"}` + * - `EMAIL_OTP`: + * + * `"ChallengeName": "EMAIL_OTP", "ChallengeResponses": {"EMAIL_OTP_CODE": "[code]", "USERNAME": "[username]"}` * - `PASSWORD_VERIFIER`: * + * This challenge response is part of the SRP flow. Amazon Cognito requires that your application respond to this + * challenge within a few seconds. When the response time exceeds this period, your user pool returns a + * `NotAuthorizedException` error. + * * `"ChallengeName": "PASSWORD_VERIFIER", "ChallengeResponses": {"PASSWORD_CLAIM_SIGNATURE": "[claim_signature]", * "PASSWORD_CLAIM_SECRET_BLOCK": "[secret_block]", "TIMESTAMP": [timestamp], "USERNAME": "[username]"}` * diff --git a/src/Service/CognitoIdentityProvider/src/Input/SetUserMFAPreferenceRequest.php b/src/Service/CognitoIdentityProvider/src/Input/SetUserMFAPreferenceRequest.php index 098bd19c6..a0944faaa 100644 --- a/src/Service/CognitoIdentityProvider/src/Input/SetUserMFAPreferenceRequest.php +++ b/src/Service/CognitoIdentityProvider/src/Input/SetUserMFAPreferenceRequest.php @@ -2,6 +2,7 @@ namespace AsyncAws\CognitoIdentityProvider\Input; +use AsyncAws\CognitoIdentityProvider\ValueObject\EmailMfaSettingsType; use AsyncAws\CognitoIdentityProvider\ValueObject\SMSMfaSettingsType; use AsyncAws\CognitoIdentityProvider\ValueObject\SoftwareTokenMfaSettingsType; use AsyncAws\Core\Exception\InvalidArgument; @@ -12,19 +13,32 @@ final class SetUserMFAPreferenceRequest extends Input { /** - * The SMS text message multi-factor authentication (MFA) settings. + * User preferences for SMS message MFA. Activates or deactivates SMS MFA and sets it as the preferred MFA method when + * multiple methods are available. * * @var SMSMfaSettingsType|null */ private $smsMfaSettings; /** - * The time-based one-time password (TOTP) software token MFA settings. + * User preferences for time-based one-time password (TOTP) MFA. Activates or deactivates TOTP MFA and sets it as the + * preferred MFA method when multiple methods are available. * * @var SoftwareTokenMfaSettingsType|null */ private $softwareTokenMfaSettings; + /** + * User preferences for email message MFA. Activates or deactivates email MFA and sets it as the preferred MFA method + * when multiple methods are available. To activate this setting, advanced security features [^1] must be active in your + * user pool. + * + * [^1]: https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pool-settings-advanced-security.html + * + * @var EmailMfaSettingsType|null + */ + private $emailMfaSettings; + /** * A valid access token that Amazon Cognito issued to the user whose MFA preference you want to set. * @@ -38,6 +52,7 @@ final class SetUserMFAPreferenceRequest extends Input * @param array{ * SMSMfaSettings?: null|SMSMfaSettingsType|array, * SoftwareTokenMfaSettings?: null|SoftwareTokenMfaSettingsType|array, + * EmailMfaSettings?: null|EmailMfaSettingsType|array, * AccessToken?: string, * '@region'?: string|null, * } $input @@ -46,6 +61,7 @@ public function __construct(array $input = []) { $this->smsMfaSettings = isset($input['SMSMfaSettings']) ? SMSMfaSettingsType::create($input['SMSMfaSettings']) : null; $this->softwareTokenMfaSettings = isset($input['SoftwareTokenMfaSettings']) ? SoftwareTokenMfaSettingsType::create($input['SoftwareTokenMfaSettings']) : null; + $this->emailMfaSettings = isset($input['EmailMfaSettings']) ? EmailMfaSettingsType::create($input['EmailMfaSettings']) : null; $this->accessToken = $input['AccessToken'] ?? null; parent::__construct($input); } @@ -54,6 +70,7 @@ public function __construct(array $input = []) * @param array{ * SMSMfaSettings?: null|SMSMfaSettingsType|array, * SoftwareTokenMfaSettings?: null|SoftwareTokenMfaSettingsType|array, + * EmailMfaSettings?: null|EmailMfaSettingsType|array, * AccessToken?: string, * '@region'?: string|null, * }|SetUserMFAPreferenceRequest $input @@ -68,6 +85,11 @@ public function getAccessToken(): ?string return $this->accessToken; } + public function getEmailMfaSettings(): ?EmailMfaSettingsType + { + return $this->emailMfaSettings; + } + public function getSmsMfaSettings(): ?SMSMfaSettingsType { return $this->smsMfaSettings; @@ -111,6 +133,13 @@ public function setAccessToken(?string $value): self return $this; } + public function setEmailMfaSettings(?EmailMfaSettingsType $value): self + { + $this->emailMfaSettings = $value; + + return $this; + } + public function setSmsMfaSettings(?SMSMfaSettingsType $value): self { $this->smsMfaSettings = $value; @@ -134,6 +163,9 @@ private function requestBody(): array if (null !== $v = $this->softwareTokenMfaSettings) { $payload['SoftwareTokenMfaSettings'] = $v->requestBody(); } + if (null !== $v = $this->emailMfaSettings) { + $payload['EmailMfaSettings'] = $v->requestBody(); + } if (null === $v = $this->accessToken) { throw new InvalidArgument(\sprintf('Missing parameter "AccessToken" for "%s". The value cannot be null.', __CLASS__)); } diff --git a/src/Service/CognitoIdentityProvider/src/Result/AdminGetUserResponse.php b/src/Service/CognitoIdentityProvider/src/Result/AdminGetUserResponse.php index 28712ff5c..1e2da15ba 100644 --- a/src/Service/CognitoIdentityProvider/src/Result/AdminGetUserResponse.php +++ b/src/Service/CognitoIdentityProvider/src/Result/AdminGetUserResponse.php @@ -81,7 +81,7 @@ class AdminGetUserResponse extends Result private $preferredMfaSetting; /** - * The MFA options that are activated for the user. The possible values in this list are `SMS_MFA` and + * The MFA options that are activated for the user. The possible values in this list are `SMS_MFA`, `EMAIL_OTP`, and * `SOFTWARE_TOKEN_MFA`. * * @var string[] diff --git a/src/Service/CognitoIdentityProvider/src/Result/AdminInitiateAuthResponse.php b/src/Service/CognitoIdentityProvider/src/Result/AdminInitiateAuthResponse.php index ad5751ee0..f5c173407 100644 --- a/src/Service/CognitoIdentityProvider/src/Result/AdminInitiateAuthResponse.php +++ b/src/Service/CognitoIdentityProvider/src/Result/AdminInitiateAuthResponse.php @@ -19,9 +19,10 @@ class AdminInitiateAuthResponse extends Result * * - `MFA_SETUP`: If MFA is required, users who don't have at least one of the MFA methods set up are presented with an * `MFA_SETUP` challenge. The user must set up at least one MFA type to continue to authenticate. - * - `SELECT_MFA_TYPE`: Selects the MFA type. Valid MFA options are `SMS_MFA` for text SMS MFA, and `SOFTWARE_TOKEN_MFA` - * for time-based one-time password (TOTP) software token MFA. - * - `SMS_MFA`: Next challenge is to supply an `SMS_MFA_CODE`, delivered via SMS. + * - `SELECT_MFA_TYPE`: Selects the MFA type. Valid MFA options are `SMS_MFA` for SMS message MFA, `EMAIL_OTP` for email + * message MFA, and `SOFTWARE_TOKEN_MFA` for time-based one-time password (TOTP) software token MFA. + * - `SMS_MFA`: Next challenge is to supply an `SMS_MFA_CODE`that your user pool delivered in an SMS message. + * - `EMAIL_OTP`: Next challenge is to supply an `EMAIL_OTP_CODE` that your user pool delivered in an email message. * - `PASSWORD_VERIFIER`: Next challenge is to supply `PASSWORD_CLAIM_SIGNATURE`, `PASSWORD_CLAIM_SECRET_BLOCK`, and * `TIMESTAMP` after the client-side SRP calculations. * - `CUSTOM_CHALLENGE`: This is returned if your custom authentication flow determines that the user should pass diff --git a/src/Service/CognitoIdentityProvider/src/Result/GetUserResponse.php b/src/Service/CognitoIdentityProvider/src/Result/GetUserResponse.php index d7a8940d0..1334cb1c3 100644 --- a/src/Service/CognitoIdentityProvider/src/Result/GetUserResponse.php +++ b/src/Service/CognitoIdentityProvider/src/Result/GetUserResponse.php @@ -45,7 +45,7 @@ class GetUserResponse extends Result private $preferredMfaSetting; /** - * The MFA options that are activated for the user. The possible values in this list are `SMS_MFA` and + * The MFA options that are activated for the user. The possible values in this list are `SMS_MFA`, `EMAIL_OTP`, and * `SOFTWARE_TOKEN_MFA`. * * @var string[] diff --git a/src/Service/CognitoIdentityProvider/src/Result/InitiateAuthResponse.php b/src/Service/CognitoIdentityProvider/src/Result/InitiateAuthResponse.php index e599693cd..d6b2b6ea2 100644 --- a/src/Service/CognitoIdentityProvider/src/Result/InitiateAuthResponse.php +++ b/src/Service/CognitoIdentityProvider/src/Result/InitiateAuthResponse.php @@ -21,7 +21,8 @@ class InitiateAuthResponse extends Result * * > All of the following challenges require `USERNAME` and `SECRET_HASH` (if applicable) in the parameters. * - * - `SMS_MFA`: Next challenge is to supply an `SMS_MFA_CODE`, delivered via SMS. + * - `SMS_MFA`: Next challenge is to supply an `SMS_MFA_CODE`that your user pool delivered in an SMS message. + * - `EMAIL_OTP`: Next challenge is to supply an `EMAIL_OTP_CODE` that your user pool delivered in an email message. * - `PASSWORD_VERIFIER`: Next challenge is to supply `PASSWORD_CLAIM_SIGNATURE`, `PASSWORD_CLAIM_SECRET_BLOCK`, and * `TIMESTAMP` after the client-side SRP calculations. * - `CUSTOM_CHALLENGE`: This is returned if your custom authentication flow determines that the user should pass diff --git a/src/Service/CognitoIdentityProvider/src/ValueObject/EmailMfaSettingsType.php b/src/Service/CognitoIdentityProvider/src/ValueObject/EmailMfaSettingsType.php new file mode 100644 index 000000000..09bdc51bc --- /dev/null +++ b/src/Service/CognitoIdentityProvider/src/ValueObject/EmailMfaSettingsType.php @@ -0,0 +1,78 @@ +enabled = $input['Enabled'] ?? null; + $this->preferredMfa = $input['PreferredMfa'] ?? null; + } + + /** + * @param array{ + * Enabled?: null|bool, + * PreferredMfa?: null|bool, + * }|EmailMfaSettingsType $input + */ + public static function create($input): self + { + return $input instanceof self ? $input : new self($input); + } + + public function getEnabled(): ?bool + { + return $this->enabled; + } + + public function getPreferredMfa(): ?bool + { + return $this->preferredMfa; + } + + /** + * @internal + */ + public function requestBody(): array + { + $payload = []; + if (null !== $v = $this->enabled) { + $payload['Enabled'] = (bool) $v; + } + if (null !== $v = $this->preferredMfa) { + $payload['PreferredMfa'] = (bool) $v; + } + + return $payload; + } +} diff --git a/src/Service/CognitoIdentityProvider/src/ValueObject/SMSMfaSettingsType.php b/src/Service/CognitoIdentityProvider/src/ValueObject/SMSMfaSettingsType.php index 13204a25f..e12600a1c 100644 --- a/src/Service/CognitoIdentityProvider/src/ValueObject/SMSMfaSettingsType.php +++ b/src/Service/CognitoIdentityProvider/src/ValueObject/SMSMfaSettingsType.php @@ -12,8 +12,8 @@ final class SMSMfaSettingsType { /** - * Specifies whether SMS text message MFA is activated. If an MFA type is activated for a user, the user will be - * prompted for MFA during all sign-in attempts, unless device tracking is turned on and the device has been trusted. + * Specifies whether SMS message MFA is activated. If an MFA type is activated for a user, the user will be prompted for + * MFA during all sign-in attempts, unless device tracking is turned on and the device has been trusted. * * @var bool|null */ diff --git a/src/Service/MediaConvert/CHANGELOG.md b/src/Service/MediaConvert/CHANGELOG.md index 4eab6f8eb..661be6f68 100644 --- a/src/Service/MediaConvert/CHANGELOG.md +++ b/src/Service/MediaConvert/CHANGELOG.md @@ -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. diff --git a/src/Service/MediaConvert/composer.json b/src/Service/MediaConvert/composer.json index 4c3391be2..7f6a42ad7 100644 --- a/src/Service/MediaConvert/composer.json +++ b/src/Service/MediaConvert/composer.json @@ -28,7 +28,7 @@ }, "extra": { "branch-alias": { - "dev-master": "1.3-dev" + "dev-master": "1.4-dev" } } } diff --git a/src/Service/MediaConvert/src/Enum/AacCodecProfile.php b/src/Service/MediaConvert/src/Enum/AacCodecProfile.php index 0604d3f8e..e69081c13 100644 --- a/src/Service/MediaConvert/src/Enum/AacCodecProfile.php +++ b/src/Service/MediaConvert/src/Enum/AacCodecProfile.php @@ -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 { diff --git a/src/Service/MediaConvert/src/Enum/AacRateControlMode.php b/src/Service/MediaConvert/src/Enum/AacRateControlMode.php index 25e22bd62..aeaeb2046 100644 --- a/src/Service/MediaConvert/src/Enum/AacRateControlMode.php +++ b/src/Service/MediaConvert/src/Enum/AacRateControlMode.php @@ -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 { diff --git a/src/Service/MediaConvert/src/Enum/AacVbrQuality.php b/src/Service/MediaConvert/src/Enum/AacVbrQuality.php index 72ca41015..f7c9e82da 100644 --- a/src/Service/MediaConvert/src/Enum/AacVbrQuality.php +++ b/src/Service/MediaConvert/src/Enum/AacVbrQuality.php @@ -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 { diff --git a/src/Service/MediaConvert/src/Enum/AudioDurationCorrection.php b/src/Service/MediaConvert/src/Enum/AudioDurationCorrection.php index dbf484e1e..f4e876990 100644 --- a/src/Service/MediaConvert/src/Enum/AudioDurationCorrection.php +++ b/src/Service/MediaConvert/src/Enum/AudioDurationCorrection.php @@ -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'; @@ -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]); diff --git a/src/Service/MediaConvert/src/Enum/CaptionSourceByteRateLimit.php b/src/Service/MediaConvert/src/Enum/CaptionSourceByteRateLimit.php new file mode 100644 index 000000000..65fa1f4ab --- /dev/null +++ b/src/Service/MediaConvert/src/Enum/CaptionSourceByteRateLimit.php @@ -0,0 +1,25 @@ + true, + self::ENABLED => true, + ][$value]); + } +} diff --git a/src/Service/MediaConvert/src/Enum/ContainerType.php b/src/Service/MediaConvert/src/Enum/ContainerType.php index 1d5c81328..e52d28894 100644 --- a/src/Service/MediaConvert/src/Enum/ContainerType.php +++ b/src/Service/MediaConvert/src/Enum/ContainerType.php @@ -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'; @@ -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, diff --git a/src/Service/MediaConvert/src/Enum/H264SaliencyAwareEncoding.php b/src/Service/MediaConvert/src/Enum/H264SaliencyAwareEncoding.php new file mode 100644 index 000000000..0d7263d5a --- /dev/null +++ b/src/Service/MediaConvert/src/Enum/H264SaliencyAwareEncoding.php @@ -0,0 +1,25 @@ + true, + self::PREFERRED => true, + ][$value]); + } +} diff --git a/src/Service/MediaConvert/src/Enum/VideoOverlayPlayBackMode.php b/src/Service/MediaConvert/src/Enum/VideoOverlayPlayBackMode.php new file mode 100644 index 000000000..c3daba1bd --- /dev/null +++ b/src/Service/MediaConvert/src/Enum/VideoOverlayPlayBackMode.php @@ -0,0 +1,23 @@ + true, + self::REPEAT => true, + ][$value]); + } +} diff --git a/src/Service/MediaConvert/src/Enum/VideoOverlayUnit.php b/src/Service/MediaConvert/src/Enum/VideoOverlayUnit.php new file mode 100644 index 000000000..e738f1a08 --- /dev/null +++ b/src/Service/MediaConvert/src/Enum/VideoOverlayUnit.php @@ -0,0 +1,21 @@ + true, + self::PIXELS => true, + ][$value]); + } +} diff --git a/src/Service/MediaConvert/src/Input/CreateJobRequest.php b/src/Service/MediaConvert/src/Input/CreateJobRequest.php index 76050be82..d69526e4d 100644 --- a/src/Service/MediaConvert/src/Input/CreateJobRequest.php +++ b/src/Service/MediaConvert/src/Input/CreateJobRequest.php @@ -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. @@ -144,6 +153,7 @@ final class CreateJobRequest extends Input1 * BillingTagsSource?: null|BillingTagsSource::*, * ClientRequestToken?: null|string, * HopDestinations?: null|array, + * JobEngineVersion?: null|string, * JobTemplate?: null|string, * Priority?: null|int, * Queue?: null|string, @@ -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; @@ -180,6 +191,7 @@ public function __construct(array $input = []) * BillingTagsSource?: null|BillingTagsSource::*, * ClientRequestToken?: null|string, * HopDestinations?: null|array, + * JobEngineVersion?: null|string, * JobTemplate?: null|string, * Priority?: null|int, * Queue?: null|string, @@ -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; @@ -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; @@ -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; } diff --git a/src/Service/MediaConvert/src/MediaConvertClient.php b/src/Service/MediaConvert/src/MediaConvertClient.php index 4333885e9..4b0bd4432 100644 --- a/src/Service/MediaConvert/src/MediaConvertClient.php +++ b/src/Service/MediaConvert/src/MediaConvertClient.php @@ -80,6 +80,7 @@ public function cancelJob($input): CancelJobResponse * BillingTagsSource?: null|BillingTagsSource::*, * ClientRequestToken?: null|string, * HopDestinations?: null|array, + * JobEngineVersion?: null|string, * JobTemplate?: null|string, * Priority?: null|int, * Queue?: null|string, diff --git a/src/Service/MediaConvert/src/Result/CreateJobResponse.php b/src/Service/MediaConvert/src/Result/CreateJobResponse.php index 6771ac6d2..d5bb6cfad 100644 --- a/src/Service/MediaConvert/src/Result/CreateJobResponse.php +++ b/src/Service/MediaConvert/src/Result/CreateJobResponse.php @@ -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; @@ -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']), @@ -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, @@ -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']), @@ -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']), ]); } @@ -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([ @@ -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[] */ diff --git a/src/Service/MediaConvert/src/Result/GetJobResponse.php b/src/Service/MediaConvert/src/Result/GetJobResponse.php index e46debfa2..14f093289 100644 --- a/src/Service/MediaConvert/src/Result/GetJobResponse.php +++ b/src/Service/MediaConvert/src/Result/GetJobResponse.php @@ -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; @@ -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']), @@ -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, @@ -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']), @@ -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']), ]); } @@ -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([ @@ -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[] */ diff --git a/src/Service/MediaConvert/src/Result/ListJobsResponse.php b/src/Service/MediaConvert/src/Result/ListJobsResponse.php index 61de9e94e..ed4fe23a8 100644 --- a/src/Service/MediaConvert/src/Result/ListJobsResponse.php +++ b/src/Service/MediaConvert/src/Result/ListJobsResponse.php @@ -164,6 +164,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; @@ -1031,6 +1033,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']), @@ -1112,6 +1115,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, @@ -1436,6 +1440,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']), @@ -2193,8 +2199,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']), ]); } @@ -2216,6 +2225,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([ @@ -2774,6 +2803,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[] */ diff --git a/src/Service/MediaConvert/src/ValueObject/AacSettings.php b/src/Service/MediaConvert/src/ValueObject/AacSettings.php index f0a870c61..8c51f5ae0 100644 --- a/src/Service/MediaConvert/src/ValueObject/AacSettings.php +++ b/src/Service/MediaConvert/src/ValueObject/AacSettings.php @@ -43,7 +43,10 @@ final class AacSettings private $bitrate; /** - * 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. * * @var AacCodecProfile::*|null */ @@ -62,7 +65,9 @@ final class AacSettings private $codingMode; /** - * 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. * * @var AacRateControlMode::*|null */ @@ -77,12 +82,9 @@ final class AacSettings private $rawFormat; /** - * 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. + * 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. * * @var int|null */ @@ -96,7 +98,8 @@ final class AacSettings private $specification; /** - * 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 * * @var AacVbrQuality::*|null */ diff --git a/src/Service/MediaConvert/src/ValueObject/AudioSelector.php b/src/Service/MediaConvert/src/ValueObject/AudioSelector.php index 8106fe3b3..1f61591bc 100644 --- a/src/Service/MediaConvert/src/ValueObject/AudioSelector.php +++ b/src/Service/MediaConvert/src/ValueObject/AudioSelector.php @@ -23,7 +23,9 @@ final class AudioSelector * 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. * * @var AudioDurationCorrection::*|null */ diff --git a/src/Service/MediaConvert/src/ValueObject/FileSourceSettings.php b/src/Service/MediaConvert/src/ValueObject/FileSourceSettings.php index f9d055f10..8480c5678 100644 --- a/src/Service/MediaConvert/src/ValueObject/FileSourceSettings.php +++ b/src/Service/MediaConvert/src/ValueObject/FileSourceSettings.php @@ -3,6 +3,7 @@ namespace AsyncAws\MediaConvert\ValueObject; use AsyncAws\Core\Exception\InvalidArgument; +use AsyncAws\MediaConvert\Enum\CaptionSourceByteRateLimit; use AsyncAws\MediaConvert\Enum\CaptionSourceConvertPaintOnToPopOn; use AsyncAws\MediaConvert\Enum\FileSourceConvert608To708; use AsyncAws\MediaConvert\Enum\FileSourceTimeDeltaUnits; @@ -14,6 +15,18 @@ */ final class FileSourceSettings { + /** + * 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. + * + * @var CaptionSourceByteRateLimit::*|null + */ + private $byteRateLimit; + /** * Specify whether this set of input captions appears in your outputs in both 608 and 708 format. If you choose * Upconvert, MediaConvert includes the captions data in two ways: it passes the 608 data through using the 608 @@ -76,6 +89,7 @@ final class FileSourceSettings /** * @param array{ + * ByteRateLimit?: null|CaptionSourceByteRateLimit::*, * Convert608To708?: null|FileSourceConvert608To708::*, * ConvertPaintToPop?: null|CaptionSourceConvertPaintOnToPopOn::*, * Framerate?: null|CaptionSourceFramerate|array, @@ -86,6 +100,7 @@ final class FileSourceSettings */ public function __construct(array $input) { + $this->byteRateLimit = $input['ByteRateLimit'] ?? null; $this->convert608To708 = $input['Convert608To708'] ?? null; $this->convertPaintToPop = $input['ConvertPaintToPop'] ?? null; $this->framerate = isset($input['Framerate']) ? CaptionSourceFramerate::create($input['Framerate']) : null; @@ -96,6 +111,7 @@ public function __construct(array $input) /** * @param array{ + * ByteRateLimit?: null|CaptionSourceByteRateLimit::*, * Convert608To708?: null|FileSourceConvert608To708::*, * ConvertPaintToPop?: null|CaptionSourceConvertPaintOnToPopOn::*, * Framerate?: null|CaptionSourceFramerate|array, @@ -109,6 +125,14 @@ public static function create($input): self return $input instanceof self ? $input : new self($input); } + /** + * @return CaptionSourceByteRateLimit::*|null + */ + public function getByteRateLimit(): ?string + { + return $this->byteRateLimit; + } + /** * @return FileSourceConvert608To708::*|null */ @@ -154,6 +178,12 @@ public function getTimeDeltaUnits(): ?string public function requestBody(): array { $payload = []; + if (null !== $v = $this->byteRateLimit) { + if (!CaptionSourceByteRateLimit::exists($v)) { + throw new InvalidArgument(\sprintf('Invalid parameter "byteRateLimit" for "%s". The value "%s" is not a valid "CaptionSourceByteRateLimit".', __CLASS__, $v)); + } + $payload['byteRateLimit'] = $v; + } if (null !== $v = $this->convert608To708) { if (!FileSourceConvert608To708::exists($v)) { throw new InvalidArgument(\sprintf('Invalid parameter "convert608To708" for "%s". The value "%s" is not a valid "FileSourceConvert608To708".', __CLASS__, $v)); diff --git a/src/Service/MediaConvert/src/ValueObject/H264Settings.php b/src/Service/MediaConvert/src/ValueObject/H264Settings.php index 40606b5fa..8aecf76a2 100644 --- a/src/Service/MediaConvert/src/ValueObject/H264Settings.php +++ b/src/Service/MediaConvert/src/ValueObject/H264Settings.php @@ -20,6 +20,7 @@ use AsyncAws\MediaConvert\Enum\H264QualityTuningLevel; use AsyncAws\MediaConvert\Enum\H264RateControlMode; use AsyncAws\MediaConvert\Enum\H264RepeatPps; +use AsyncAws\MediaConvert\Enum\H264SaliencyAwareEncoding; use AsyncAws\MediaConvert\Enum\H264ScanTypeConversionMode; use AsyncAws\MediaConvert\Enum\H264SceneChangeDetect; use AsyncAws\MediaConvert\Enum\H264SlowPal; @@ -264,16 +265,17 @@ final class H264Settings private $maxBitrate; /** - * Use this setting only when you also enable Scene change detection. This setting determines how the encoder manages - * the spacing between I-frames that it inserts as part of the I-frame cadence and the I-frames that it inserts for - * Scene change detection. We recommend that you have the transcoder automatically choose this value for you based on - * characteristics of your input video. To enable this automatic behavior, do this by keeping the default empty value. - * When you explicitly specify a value for this setting, the encoder determines whether to skip a cadence-driven I-frame - * by the value you set. For example, if you set Min I interval to 5 and a cadence-driven I-frame would fall within 5 - * frames of a scene-change I-frame, then the encoder skips the cadence-driven I-frame. In this way, one GOP is shrunk - * slightly and one GOP is stretched slightly. When the cadence-driven I-frames are farther from the scene-change - * I-frame than the value you set, then the encoder leaves all I-frames in place and the GOPs surrounding the scene - * change are smaller than the usual cadence GOPs. + * Specify the minimum number of frames allowed between two IDR-frames in your output. This includes frames created at + * the start of a GOP or a scene change. Use Min I-Interval to improve video compression by varying GOP size when two + * IDR-frames would be created near each other. For example, if a regular cadence-driven IDR-frame would fall within 5 + * frames of a scene-change IDR-frame, and you set Min I-interval to 5, then the encoder would only write an IDR-frame + * for the scene-change. In this way, one GOP is shortened or extended. If a cadence-driven IDR-frame would be further + * than 5 frames from a scene-change IDR-frame, then the encoder leaves all IDR-frames in place. To use an automatically + * determined interval: We recommend that you keep this value blank. This allows for MediaConvert to use an optimal + * setting according to the characteristics of your input video, and results in better video compression. To manually + * specify an interval: Enter a value from 1 to 30. Use when your downstream systems have specific GOP size + * requirements. To disable GOP size variance: Enter 0. MediaConvert will only create IDR-frames at the start of your + * output's cadence-driven GOP. Use when your downstream systems require a regular GOP size. * * @var int|null */ @@ -360,6 +362,18 @@ final class H264Settings */ private $repeatPps; + /** + * 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. + * + * @var H264SaliencyAwareEncoding::*|null + */ + private $saliencyAwareEncoding; + /** * Use this setting for interlaced outputs, when your output frame rate is half of your input frame rate. In this * situation, choose Optimized interlacing to create a better quality interlaced output. In this case, each progressive @@ -515,6 +529,7 @@ final class H264Settings * QvbrSettings?: null|H264QvbrSettings|array, * RateControlMode?: null|H264RateControlMode::*, * RepeatPps?: null|H264RepeatPps::*, + * SaliencyAwareEncoding?: null|H264SaliencyAwareEncoding::*, * ScanTypeConversionMode?: null|H264ScanTypeConversionMode::*, * SceneChangeDetect?: null|H264SceneChangeDetect::*, * Slices?: null|int, @@ -562,6 +577,7 @@ public function __construct(array $input) $this->qvbrSettings = isset($input['QvbrSettings']) ? H264QvbrSettings::create($input['QvbrSettings']) : null; $this->rateControlMode = $input['RateControlMode'] ?? null; $this->repeatPps = $input['RepeatPps'] ?? null; + $this->saliencyAwareEncoding = $input['SaliencyAwareEncoding'] ?? null; $this->scanTypeConversionMode = $input['ScanTypeConversionMode'] ?? null; $this->sceneChangeDetect = $input['SceneChangeDetect'] ?? null; $this->slices = $input['Slices'] ?? null; @@ -609,6 +625,7 @@ public function __construct(array $input) * QvbrSettings?: null|H264QvbrSettings|array, * RateControlMode?: null|H264RateControlMode::*, * RepeatPps?: null|H264RepeatPps::*, + * SaliencyAwareEncoding?: null|H264SaliencyAwareEncoding::*, * ScanTypeConversionMode?: null|H264ScanTypeConversionMode::*, * SceneChangeDetect?: null|H264SceneChangeDetect::*, * Slices?: null|int, @@ -842,6 +859,14 @@ public function getRepeatPps(): ?string return $this->repeatPps; } + /** + * @return H264SaliencyAwareEncoding::*|null + */ + public function getSaliencyAwareEncoding(): ?string + { + return $this->saliencyAwareEncoding; + } + /** * @return H264ScanTypeConversionMode::*|null */ @@ -1072,6 +1097,12 @@ public function requestBody(): array } $payload['repeatPps'] = $v; } + if (null !== $v = $this->saliencyAwareEncoding) { + if (!H264SaliencyAwareEncoding::exists($v)) { + throw new InvalidArgument(\sprintf('Invalid parameter "saliencyAwareEncoding" for "%s". The value "%s" is not a valid "H264SaliencyAwareEncoding".', __CLASS__, $v)); + } + $payload['saliencyAwareEncoding'] = $v; + } if (null !== $v = $this->scanTypeConversionMode) { if (!H264ScanTypeConversionMode::exists($v)) { throw new InvalidArgument(\sprintf('Invalid parameter "scanTypeConversionMode" for "%s". The value "%s" is not a valid "H264ScanTypeConversionMode".', __CLASS__, $v)); diff --git a/src/Service/MediaConvert/src/ValueObject/H265Settings.php b/src/Service/MediaConvert/src/ValueObject/H265Settings.php index e256f01bd..fe4ddadd8 100644 --- a/src/Service/MediaConvert/src/ValueObject/H265Settings.php +++ b/src/Service/MediaConvert/src/ValueObject/H265Settings.php @@ -252,16 +252,17 @@ final class H265Settings private $maxBitrate; /** - * Use this setting only when you also enable Scene change detection. This setting determines how the encoder manages - * the spacing between I-frames that it inserts as part of the I-frame cadence and the I-frames that it inserts for - * Scene change detection. We recommend that you have the transcoder automatically choose this value for you based on - * characteristics of your input video. To enable this automatic behavior, do this by keeping the default empty value. - * When you explicitly specify a value for this setting, the encoder determines whether to skip a cadence-driven I-frame - * by the value you set. For example, if you set Min I interval to 5 and a cadence-driven I-frame would fall within 5 - * frames of a scene-change I-frame, then the encoder skips the cadence-driven I-frame. In this way, one GOP is shrunk - * slightly and one GOP is stretched slightly. When the cadence-driven I-frames are farther from the scene-change - * I-frame than the value you set, then the encoder leaves all I-frames in place and the GOPs surrounding the scene - * change are smaller than the usual cadence GOPs. + * Specify the minimum number of frames allowed between two IDR-frames in your output. This includes frames created at + * the start of a GOP or a scene change. Use Min I-Interval to improve video compression by varying GOP size when two + * IDR-frames would be created near each other. For example, if a regular cadence-driven IDR-frame would fall within 5 + * frames of a scene-change IDR-frame, and you set Min I-interval to 5, then the encoder would only write an IDR-frame + * for the scene-change. In this way, one GOP is shortened or extended. If a cadence-driven IDR-frame would be further + * than 5 frames from a scene-change IDR-frame, then the encoder leaves all IDR-frames in place. To use an automatically + * determined interval: We recommend that you keep this value blank. This allows for MediaConvert to use an optimal + * setting according to the characteristics of your input video, and results in better video compression. To manually + * specify an interval: Enter a value from 1 to 30. Use when your downstream systems have specific GOP size + * requirements. To disable GOP size variance: Enter 0. MediaConvert will only create IDR-frames at the start of your + * output's cadence-driven GOP. Use when your downstream systems require a regular GOP size. * * @var int|null */ diff --git a/src/Service/MediaConvert/src/ValueObject/Job.php b/src/Service/MediaConvert/src/ValueObject/Job.php index 0519e5a4d..68029b47e 100644 --- a/src/Service/MediaConvert/src/ValueObject/Job.php +++ b/src/Service/MediaConvert/src/ValueObject/Job.php @@ -104,6 +104,24 @@ final class Job */ private $id; + /** + * The Job engine version that you requested for your job. Valid versions are in a YYYY-MM-DD format. + * + * @var string|null + */ + private $jobEngineVersionRequested; + + /** + * The Job engine version that your job used. Job engine versions are in a YYYY-MM-DD format. When you request an + * expired version, the response for this property will be empty. Requests to create jobs with an expired version result + * in a regular job, as if no specific Job engine version was requested. When you request an invalid version, the + * response for this property will be empty. Requests to create jobs with an invalid version result in a 400 error + * message, and no job is created. + * + * @var string|null + */ + private $jobEngineVersionUsed; + /** * An estimate of how far your job has progressed. This estimate is shown as a percentage of the total time from when * your job leaves its queue to when your output files appear in your output Amazon S3 bucket. AWS Elemental @@ -242,6 +260,8 @@ final class Job * ErrorMessage?: null|string, * HopDestinations?: null|array, * Id?: null|string, + * JobEngineVersionRequested?: null|string, + * JobEngineVersionUsed?: null|string, * JobPercentComplete?: null|int, * JobTemplate?: null|string, * Messages?: null|JobMessages|array, @@ -273,6 +293,8 @@ public function __construct(array $input) $this->errorMessage = $input['ErrorMessage'] ?? null; $this->hopDestinations = isset($input['HopDestinations']) ? array_map([HopDestination::class, 'create'], $input['HopDestinations']) : null; $this->id = $input['Id'] ?? null; + $this->jobEngineVersionRequested = $input['JobEngineVersionRequested'] ?? null; + $this->jobEngineVersionUsed = $input['JobEngineVersionUsed'] ?? null; $this->jobPercentComplete = $input['JobPercentComplete'] ?? null; $this->jobTemplate = $input['JobTemplate'] ?? null; $this->messages = isset($input['Messages']) ? JobMessages::create($input['Messages']) : null; @@ -304,6 +326,8 @@ public function __construct(array $input) * ErrorMessage?: null|string, * HopDestinations?: null|array, * Id?: null|string, + * JobEngineVersionRequested?: null|string, + * JobEngineVersionUsed?: null|string, * JobPercentComplete?: null|int, * JobTemplate?: null|string, * Messages?: null|JobMessages|array, @@ -394,6 +418,16 @@ public function getId(): ?string return $this->id; } + public function getJobEngineVersionRequested(): ?string + { + return $this->jobEngineVersionRequested; + } + + public function getJobEngineVersionUsed(): ?string + { + return $this->jobEngineVersionUsed; + } + public function getJobPercentComplete(): ?int { return $this->jobPercentComplete; diff --git a/src/Service/MediaConvert/src/ValueObject/Mpeg2Settings.php b/src/Service/MediaConvert/src/ValueObject/Mpeg2Settings.php index 6277b7a8c..f763a707c 100644 --- a/src/Service/MediaConvert/src/ValueObject/Mpeg2Settings.php +++ b/src/Service/MediaConvert/src/ValueObject/Mpeg2Settings.php @@ -191,14 +191,15 @@ final class Mpeg2Settings private $maxBitrate; /** - * Use this setting only when you also enable Scene change detection. This setting determines how the encoder manages - * the spacing between I-frames that it inserts as part of the I-frame cadence and the I-frames that it inserts for - * Scene change detection. When you specify a value for this setting, the encoder determines whether to skip a - * cadence-driven I-frame by the value you set. For example, if you set Min I interval to 5 and a cadence-driven I-frame - * would fall within 5 frames of a scene-change I-frame, then the encoder skips the cadence-driven I-frame. In this way, - * one GOP is shrunk slightly and one GOP is stretched slightly. When the cadence-driven I-frames are farther from the - * scene-change I-frame than the value you set, then the encoder leaves all I-frames in place and the GOPs surrounding - * the scene change are smaller than the usual cadence GOPs. + * Specify the minimum number of frames allowed between two IDR-frames in your output. This includes frames created at + * the start of a GOP or a scene change. Use Min I-Interval to improve video compression by varying GOP size when two + * IDR-frames would be created near each other. For example, if a regular cadence-driven IDR-frame would fall within 5 + * frames of a scene-change IDR-frame, and you set Min I-interval to 5, then the encoder would only write an IDR-frame + * for the scene-change. In this way, one GOP is shortened or extended. If a cadence-driven IDR-frame would be further + * than 5 frames from a scene-change IDR-frame, then the encoder leaves all IDR-frames in place. To manually specify an + * interval: Enter a value from 1 to 30. Use when your downstream systems have specific GOP size requirements. To + * disable GOP size variance: Enter 0. MediaConvert will only create IDR-frames at the start of your output's + * cadence-driven GOP. Use when your downstream systems require a regular GOP size. * * @var int|null */ diff --git a/src/Service/MediaConvert/src/ValueObject/VideoOverlay.php b/src/Service/MediaConvert/src/ValueObject/VideoOverlay.php index 34f790056..ddd31e039 100644 --- a/src/Service/MediaConvert/src/ValueObject/VideoOverlay.php +++ b/src/Service/MediaConvert/src/ValueObject/VideoOverlay.php @@ -2,6 +2,9 @@ namespace AsyncAws\MediaConvert\ValueObject; +use AsyncAws\Core\Exception\InvalidArgument; +use AsyncAws\MediaConvert\Enum\VideoOverlayPlayBackMode; + /** * Overlay one or more videos on top of your input video. For more information, see * https://docs.aws.amazon.com/mediaconvert/latest/ug/video-overlays.html. @@ -9,17 +12,25 @@ final class VideoOverlay { /** - * Enter the end timecode in the underlying input video for this overlay. Your overlay will be active through this - * frame. To display your video overlay for the duration of the underlying video: Leave blank. Use the format - * HH:MM:SS:FF or HH:MM:SS;FF, where HH is the hour, MM is the minute, SS is the second, and FF is the frame number. - * When entering this value, take into account your choice for the underlying Input timecode source. For example, if you - * have embedded timecodes that start at 01:00:00:00 and you want your overlay to end ten minutes into the video, enter - * 01:10:00:00. + * Enter the end timecode in the base input video for this overlay. Your overlay will be active through this frame. To + * display your video overlay for the duration of the base input video: Leave blank. Use the format HH:MM:SS:FF or + * HH:MM:SS;FF, where HH is the hour, MM is the minute, SS isthe second, and FF is the frame number. When entering this + * value, take into account your choice for the base input video's timecode source. For example, if you have embedded + * timecodes that start at 01:00:00:00 and you want your overlay to end ten minutes into the video, enter 01:10:00:00. * * @var string|null */ private $endTimecode; + /** + * Specify the Initial position of your video overlay. To specify the Initial position of your video overlay, including + * distance from the left or top edge of the base input video's frame, or size: Enter a value for X position, Y + * position, Width, or Height. To use the full frame of the base input video: Leave blank. + * + * @var VideoOverlayPosition|null + */ + private $initialPosition; + /** * Input settings for Video overlay. You can include one or more video overlays in sequence at different times that you * specify. @@ -29,36 +40,64 @@ final class VideoOverlay private $input; /** - * Enter the start timecode in the underlying input video for this overlay. Your overlay will be active starting with - * this frame. To display your video overlay starting at the beginning of the underlying video: Leave blank. Use the - * format HH:MM:SS:FF or HH:MM:SS;FF, where HH is the hour, MM is the minute, SS is the second, and FF is the frame - * number. When entering this value, take into account your choice for the underlying Input timecode source. For - * example, if you have embedded timecodes that start at 01:00:00:00 and you want your overlay to begin five minutes - * into the video, enter 01:05:00:00. + * 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. + * + * @var VideoOverlayPlayBackMode::*|null + */ + private $playback; + + /** + * Enter the start timecode in the base input video for this overlay. Your overlay will be active starting with this + * frame. To display your video overlay starting at the beginning of the base input video: Leave blank. Use the format + * HH:MM:SS:FF or HH:MM:SS;FF, where HH is the hour, MM is the minute, SS is the second, and FF is the frame number. + * When entering this value, take into account your choice for the base input video's timecode source. For example, if + * you have embedded timecodes that start at 01:00:00:00 and you want your overlay to begin five minutes into the video, + * enter 01:05:00:00. * * @var string|null */ private $startTimecode; + /** + * Specify one or more transitions for your video overlay. Use Transitions to reposition or resize your overlay over + * time. To use the same position and size for the duration of your video overlay: Leave blank. To specify a Transition: + * Enter a value for Start timecode, End Timecode, X Position, Y Position, Width, or Height. + * + * @var VideoOverlayTransition[]|null + */ + private $transitions; + /** * @param array{ * EndTimecode?: null|string, + * InitialPosition?: null|VideoOverlayPosition|array, * Input?: null|VideoOverlayInput|array, + * Playback?: null|VideoOverlayPlayBackMode::*, * StartTimecode?: null|string, + * Transitions?: null|array, * } $input */ public function __construct(array $input) { $this->endTimecode = $input['EndTimecode'] ?? null; + $this->initialPosition = isset($input['InitialPosition']) ? VideoOverlayPosition::create($input['InitialPosition']) : null; $this->input = isset($input['Input']) ? VideoOverlayInput::create($input['Input']) : null; + $this->playback = $input['Playback'] ?? null; $this->startTimecode = $input['StartTimecode'] ?? null; + $this->transitions = isset($input['Transitions']) ? array_map([VideoOverlayTransition::class, 'create'], $input['Transitions']) : null; } /** * @param array{ * EndTimecode?: null|string, + * InitialPosition?: null|VideoOverlayPosition|array, * Input?: null|VideoOverlayInput|array, + * Playback?: null|VideoOverlayPlayBackMode::*, * StartTimecode?: null|string, + * Transitions?: null|array, * }|VideoOverlay $input */ public static function create($input): self @@ -71,16 +110,37 @@ public function getEndTimecode(): ?string return $this->endTimecode; } + public function getInitialPosition(): ?VideoOverlayPosition + { + return $this->initialPosition; + } + public function getInput(): ?VideoOverlayInput { return $this->input; } + /** + * @return VideoOverlayPlayBackMode::*|null + */ + public function getPlayback(): ?string + { + return $this->playback; + } + public function getStartTimecode(): ?string { return $this->startTimecode; } + /** + * @return VideoOverlayTransition[] + */ + public function getTransitions(): array + { + return $this->transitions ?? []; + } + /** * @internal */ @@ -90,12 +150,29 @@ public function requestBody(): array if (null !== $v = $this->endTimecode) { $payload['endTimecode'] = $v; } + if (null !== $v = $this->initialPosition) { + $payload['initialPosition'] = $v->requestBody(); + } if (null !== $v = $this->input) { $payload['input'] = $v->requestBody(); } + if (null !== $v = $this->playback) { + if (!VideoOverlayPlayBackMode::exists($v)) { + throw new InvalidArgument(\sprintf('Invalid parameter "playback" for "%s". The value "%s" is not a valid "VideoOverlayPlayBackMode".', __CLASS__, $v)); + } + $payload['playback'] = $v; + } if (null !== $v = $this->startTimecode) { $payload['startTimecode'] = $v; } + if (null !== $v = $this->transitions) { + $index = -1; + $payload['transitions'] = []; + foreach ($v as $listValue) { + ++$index; + $payload['transitions'][$index] = $listValue->requestBody(); + } + } return $payload; } diff --git a/src/Service/MediaConvert/src/ValueObject/VideoOverlayInput.php b/src/Service/MediaConvert/src/ValueObject/VideoOverlayInput.php index dd4bef9dc..ddfb5e949 100644 --- a/src/Service/MediaConvert/src/ValueObject/VideoOverlayInput.php +++ b/src/Service/MediaConvert/src/ValueObject/VideoOverlayInput.php @@ -12,8 +12,8 @@ final class VideoOverlayInput { /** - * Specify the input file S3, HTTP, or HTTPS URI for your video overlay. For consistency in color and formatting in your - * output video image, we recommend that you specify a video with similar characteristics as the underlying input video. + * Specify the input file S3, HTTP, or HTTPS URL for your video overlay. + * To specify one or more Transitions for your base input video instead: Leave blank. * * @var string|null */ diff --git a/src/Service/MediaConvert/src/ValueObject/VideoOverlayPosition.php b/src/Service/MediaConvert/src/ValueObject/VideoOverlayPosition.php new file mode 100644 index 000000000..353e3e235 --- /dev/null +++ b/src/Service/MediaConvert/src/ValueObject/VideoOverlayPosition.php @@ -0,0 +1,156 @@ +height = $input['Height'] ?? null; + $this->unit = $input['Unit'] ?? null; + $this->width = $input['Width'] ?? null; + $this->xposition = $input['XPosition'] ?? null; + $this->yposition = $input['YPosition'] ?? null; + } + + /** + * @param array{ + * Height?: null|int, + * Unit?: null|VideoOverlayUnit::*, + * Width?: null|int, + * XPosition?: null|int, + * YPosition?: null|int, + * }|VideoOverlayPosition $input + */ + public static function create($input): self + { + return $input instanceof self ? $input : new self($input); + } + + public function getHeight(): ?int + { + return $this->height; + } + + /** + * @return VideoOverlayUnit::*|null + */ + public function getUnit(): ?string + { + return $this->unit; + } + + public function getWidth(): ?int + { + return $this->width; + } + + public function getXposition(): ?int + { + return $this->xposition; + } + + public function getYposition(): ?int + { + return $this->yposition; + } + + /** + * @internal + */ + public function requestBody(): array + { + $payload = []; + if (null !== $v = $this->height) { + $payload['height'] = $v; + } + if (null !== $v = $this->unit) { + if (!VideoOverlayUnit::exists($v)) { + throw new InvalidArgument(\sprintf('Invalid parameter "unit" for "%s". The value "%s" is not a valid "VideoOverlayUnit".', __CLASS__, $v)); + } + $payload['unit'] = $v; + } + if (null !== $v = $this->width) { + $payload['width'] = $v; + } + if (null !== $v = $this->xposition) { + $payload['xPosition'] = $v; + } + if (null !== $v = $this->yposition) { + $payload['yPosition'] = $v; + } + + return $payload; + } +} diff --git a/src/Service/MediaConvert/src/ValueObject/VideoOverlayTransition.php b/src/Service/MediaConvert/src/ValueObject/VideoOverlayTransition.php new file mode 100644 index 000000000..959775030 --- /dev/null +++ b/src/Service/MediaConvert/src/ValueObject/VideoOverlayTransition.php @@ -0,0 +1,98 @@ +endPosition = isset($input['EndPosition']) ? VideoOverlayPosition::create($input['EndPosition']) : null; + $this->endTimecode = $input['EndTimecode'] ?? null; + $this->startTimecode = $input['StartTimecode'] ?? null; + } + + /** + * @param array{ + * EndPosition?: null|VideoOverlayPosition|array, + * EndTimecode?: null|string, + * StartTimecode?: null|string, + * }|VideoOverlayTransition $input + */ + public static function create($input): self + { + return $input instanceof self ? $input : new self($input); + } + + public function getEndPosition(): ?VideoOverlayPosition + { + return $this->endPosition; + } + + public function getEndTimecode(): ?string + { + return $this->endTimecode; + } + + public function getStartTimecode(): ?string + { + return $this->startTimecode; + } + + /** + * @internal + */ + public function requestBody(): array + { + $payload = []; + if (null !== $v = $this->endPosition) { + $payload['endPosition'] = $v->requestBody(); + } + if (null !== $v = $this->endTimecode) { + $payload['endTimecode'] = $v; + } + if (null !== $v = $this->startTimecode) { + $payload['startTimecode'] = $v; + } + + return $payload; + } +}