{-# LANGUAGE DisambiguateRecordFields #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.ElasticTranscoder.Types
(
defaultService,
_AccessDeniedException,
_IncompatibleVersionException,
_InternalServiceException,
_LimitExceededException,
_ResourceInUseException,
_ResourceNotFoundException,
_ValidationException,
Artwork (..),
newArtwork,
artwork_albumArtFormat,
artwork_encryption,
artwork_inputKey,
artwork_maxHeight,
artwork_maxWidth,
artwork_paddingPolicy,
artwork_sizingPolicy,
AudioCodecOptions (..),
newAudioCodecOptions,
audioCodecOptions_bitDepth,
audioCodecOptions_bitOrder,
audioCodecOptions_profile,
audioCodecOptions_signed,
AudioParameters (..),
newAudioParameters,
audioParameters_audioPackingMode,
audioParameters_bitRate,
audioParameters_channels,
audioParameters_codec,
audioParameters_codecOptions,
audioParameters_sampleRate,
CaptionFormat (..),
newCaptionFormat,
captionFormat_encryption,
captionFormat_format,
captionFormat_pattern,
CaptionSource (..),
newCaptionSource,
captionSource_encryption,
captionSource_key,
captionSource_label,
captionSource_language,
captionSource_timeOffset,
Captions (..),
newCaptions,
captions_captionFormats,
captions_captionSources,
captions_mergePolicy,
Clip (..),
newClip,
clip_timeSpan,
CreateJobOutput (..),
newCreateJobOutput,
createJobOutput_albumArt,
createJobOutput_captions,
createJobOutput_composition,
createJobOutput_encryption,
createJobOutput_key,
createJobOutput_presetId,
createJobOutput_rotate,
createJobOutput_segmentDuration,
createJobOutput_thumbnailEncryption,
createJobOutput_thumbnailPattern,
createJobOutput_watermarks,
CreateJobPlaylist (..),
newCreateJobPlaylist,
createJobPlaylist_format,
createJobPlaylist_hlsContentProtection,
createJobPlaylist_name,
createJobPlaylist_outputKeys,
createJobPlaylist_playReadyDrm,
DetectedProperties (..),
newDetectedProperties,
detectedProperties_durationMillis,
detectedProperties_fileSize,
detectedProperties_frameRate,
detectedProperties_height,
detectedProperties_width,
Encryption (..),
newEncryption,
encryption_initializationVector,
encryption_key,
encryption_keyMd5,
encryption_mode,
HlsContentProtection (..),
newHlsContentProtection,
hlsContentProtection_initializationVector,
hlsContentProtection_key,
hlsContentProtection_keyMd5,
hlsContentProtection_keyStoragePolicy,
hlsContentProtection_licenseAcquisitionUrl,
hlsContentProtection_method,
InputCaptions (..),
newInputCaptions,
inputCaptions_captionSources,
inputCaptions_mergePolicy,
Job (..),
newJob,
job_arn,
job_id,
job_input,
job_inputs,
job_output,
job_outputKeyPrefix,
job_outputs,
job_pipelineId,
job_playlists,
job_status,
job_timing,
job_userMetadata,
JobAlbumArt (..),
newJobAlbumArt,
jobAlbumArt_artwork,
jobAlbumArt_mergePolicy,
JobInput (..),
newJobInput,
jobInput_aspectRatio,
jobInput_container,
jobInput_detectedProperties,
jobInput_encryption,
jobInput_frameRate,
jobInput_inputCaptions,
jobInput_interlaced,
jobInput_key,
jobInput_resolution,
jobInput_timeSpan,
JobOutput (..),
newJobOutput,
jobOutput_albumArt,
jobOutput_appliedColorSpaceConversion,
jobOutput_captions,
jobOutput_composition,
jobOutput_duration,
jobOutput_durationMillis,
jobOutput_encryption,
jobOutput_fileSize,
jobOutput_frameRate,
jobOutput_height,
jobOutput_id,
jobOutput_key,
jobOutput_presetId,
jobOutput_rotate,
jobOutput_segmentDuration,
jobOutput_status,
jobOutput_statusDetail,
jobOutput_thumbnailEncryption,
jobOutput_thumbnailPattern,
jobOutput_watermarks,
jobOutput_width,
JobWatermark (..),
newJobWatermark,
jobWatermark_encryption,
jobWatermark_inputKey,
jobWatermark_presetWatermarkId,
Notifications (..),
newNotifications,
notifications_completed,
notifications_error,
notifications_progressing,
notifications_warning,
Permission (..),
newPermission,
permission_access,
permission_grantee,
permission_granteeType,
Pipeline (..),
newPipeline,
pipeline_arn,
pipeline_awsKmsKeyArn,
pipeline_contentConfig,
pipeline_id,
pipeline_inputBucket,
pipeline_name,
pipeline_notifications,
pipeline_outputBucket,
pipeline_role,
pipeline_status,
pipeline_thumbnailConfig,
PipelineOutputConfig (..),
newPipelineOutputConfig,
pipelineOutputConfig_bucket,
pipelineOutputConfig_permissions,
pipelineOutputConfig_storageClass,
PlayReadyDrm (..),
newPlayReadyDrm,
playReadyDrm_format,
playReadyDrm_initializationVector,
playReadyDrm_key,
playReadyDrm_keyId,
playReadyDrm_keyMd5,
playReadyDrm_licenseAcquisitionUrl,
Playlist (..),
newPlaylist,
playlist_format,
playlist_hlsContentProtection,
playlist_name,
playlist_outputKeys,
playlist_playReadyDrm,
playlist_status,
playlist_statusDetail,
Preset (..),
newPreset,
preset_arn,
preset_audio,
preset_container,
preset_description,
preset_id,
preset_name,
preset_thumbnails,
preset_type,
preset_video,
PresetWatermark (..),
newPresetWatermark,
presetWatermark_horizontalAlign,
presetWatermark_horizontalOffset,
presetWatermark_id,
presetWatermark_maxHeight,
presetWatermark_maxWidth,
presetWatermark_opacity,
presetWatermark_sizingPolicy,
presetWatermark_target,
presetWatermark_verticalAlign,
presetWatermark_verticalOffset,
Thumbnails (..),
newThumbnails,
thumbnails_aspectRatio,
thumbnails_format,
thumbnails_interval,
thumbnails_maxHeight,
thumbnails_maxWidth,
thumbnails_paddingPolicy,
thumbnails_resolution,
thumbnails_sizingPolicy,
TimeSpan (..),
newTimeSpan,
timeSpan_duration,
timeSpan_startTime,
Timing (..),
newTiming,
timing_finishTimeMillis,
timing_startTimeMillis,
timing_submitTimeMillis,
VideoParameters (..),
newVideoParameters,
videoParameters_aspectRatio,
videoParameters_bitRate,
videoParameters_codec,
videoParameters_codecOptions,
videoParameters_displayAspectRatio,
videoParameters_fixedGOP,
videoParameters_frameRate,
videoParameters_keyframesMaxDist,
videoParameters_maxFrameRate,
videoParameters_maxHeight,
videoParameters_maxWidth,
videoParameters_paddingPolicy,
videoParameters_resolution,
videoParameters_sizingPolicy,
videoParameters_watermarks,
Warning (..),
newWarning,
warning_code,
warning_message,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import Amazonka.ElasticTranscoder.Types.Artwork
import Amazonka.ElasticTranscoder.Types.AudioCodecOptions
import Amazonka.ElasticTranscoder.Types.AudioParameters
import Amazonka.ElasticTranscoder.Types.CaptionFormat
import Amazonka.ElasticTranscoder.Types.CaptionSource
import Amazonka.ElasticTranscoder.Types.Captions
import Amazonka.ElasticTranscoder.Types.Clip
import Amazonka.ElasticTranscoder.Types.CreateJobOutput
import Amazonka.ElasticTranscoder.Types.CreateJobPlaylist
import Amazonka.ElasticTranscoder.Types.DetectedProperties
import Amazonka.ElasticTranscoder.Types.Encryption
import Amazonka.ElasticTranscoder.Types.HlsContentProtection
import Amazonka.ElasticTranscoder.Types.InputCaptions
import Amazonka.ElasticTranscoder.Types.Job
import Amazonka.ElasticTranscoder.Types.JobAlbumArt
import Amazonka.ElasticTranscoder.Types.JobInput
import Amazonka.ElasticTranscoder.Types.JobOutput
import Amazonka.ElasticTranscoder.Types.JobWatermark
import Amazonka.ElasticTranscoder.Types.Notifications
import Amazonka.ElasticTranscoder.Types.Permission
import Amazonka.ElasticTranscoder.Types.Pipeline
import Amazonka.ElasticTranscoder.Types.PipelineOutputConfig
import Amazonka.ElasticTranscoder.Types.PlayReadyDrm
import Amazonka.ElasticTranscoder.Types.Playlist
import Amazonka.ElasticTranscoder.Types.Preset
import Amazonka.ElasticTranscoder.Types.PresetWatermark
import Amazonka.ElasticTranscoder.Types.Thumbnails
import Amazonka.ElasticTranscoder.Types.TimeSpan
import Amazonka.ElasticTranscoder.Types.Timing
import Amazonka.ElasticTranscoder.Types.VideoParameters
import Amazonka.ElasticTranscoder.Types.Warning
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Sign.V4 as Sign
defaultService :: Core.Service
defaultService :: Service
defaultService =
Core.Service
{ $sel:abbrev:Service :: Abbrev
Core.abbrev = Abbrev
"ElasticTranscoder",
$sel:signer:Service :: Signer
Core.signer = Signer
Sign.v4,
$sel:endpointPrefix:Service :: ByteString
Core.endpointPrefix = ByteString
"elastictranscoder",
$sel:signingName:Service :: ByteString
Core.signingName = ByteString
"elastictranscoder",
$sel:version:Service :: ByteString
Core.version = ByteString
"2012-09-25",
$sel:s3AddressingStyle:Service :: S3AddressingStyle
Core.s3AddressingStyle = S3AddressingStyle
Core.S3AddressingStyleAuto,
$sel:endpoint:Service :: Region -> Endpoint
Core.endpoint = Service -> Region -> Endpoint
Core.defaultEndpoint Service
defaultService,
$sel:timeout:Service :: Maybe Seconds
Core.timeout = forall a. a -> Maybe a
Prelude.Just Seconds
70,
$sel:check:Service :: Status -> Bool
Core.check = Status -> Bool
Core.statusSuccess,
$sel:error:Service :: Status -> [Header] -> ByteStringLazy -> Error
Core.error = Abbrev -> Status -> [Header] -> ByteStringLazy -> Error
Core.parseJSONError Abbrev
"ElasticTranscoder",
$sel:retry:Service :: Retry
Core.retry = Retry
retry
}
where
retry :: Retry
retry =
Core.Exponential
{ $sel:base:Exponential :: Double
Core.base = Double
5.0e-2,
$sel:growth:Exponential :: Int
Core.growth = Int
2,
$sel:attempts:Exponential :: Int
Core.attempts = Int
5,
$sel:check:Exponential :: ServiceError -> Maybe Text
Core.check = forall {a}. IsString a => ServiceError -> Maybe a
check
}
check :: ServiceError -> Maybe a
check ServiceError
e
| forall s a. Getting Any s a -> s -> Bool
Lens.has (forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
502) ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"bad_gateway"
| forall s a. Getting Any s a -> s -> Bool
Lens.has (forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
504) ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"gateway_timeout"
| forall s a. Getting Any s a -> s -> Bool
Lens.has (forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
500) ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"general_server_error"
| forall s a. Getting Any s a -> s -> Bool
Lens.has (forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
509) ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"limit_exceeded"
| forall s a. Getting Any s a -> s -> Bool
Lens.has
( forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
ErrorCode -> Optic' p f ServiceError ServiceError
Core.hasCode ErrorCode
"RequestThrottledException"
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
400
)
ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"request_throttled_exception"
| forall s a. Getting Any s a -> s -> Bool
Lens.has (forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
503) ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"service_unavailable"
| forall s a. Getting Any s a -> s -> Bool
Lens.has
( forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
ErrorCode -> Optic' p f ServiceError ServiceError
Core.hasCode ErrorCode
"ThrottledException"
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
400
)
ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"throttled_exception"
| forall s a. Getting Any s a -> s -> Bool
Lens.has
( forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
ErrorCode -> Optic' p f ServiceError ServiceError
Core.hasCode ErrorCode
"Throttling"
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
400
)
ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"throttling"
| forall s a. Getting Any s a -> s -> Bool
Lens.has
( forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
ErrorCode -> Optic' p f ServiceError ServiceError
Core.hasCode ErrorCode
"ThrottlingException"
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
400
)
ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"throttling_exception"
| forall s a. Getting Any s a -> s -> Bool
Lens.has
( forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
ErrorCode -> Optic' p f ServiceError ServiceError
Core.hasCode
ErrorCode
"ProvisionedThroughputExceededException"
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
400
)
ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"throughput_exceeded"
| forall s a. Getting Any s a -> s -> Bool
Lens.has (forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
429) ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"too_many_requests"
| Bool
Prelude.otherwise = forall a. Maybe a
Prelude.Nothing
_AccessDeniedException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_AccessDeniedException :: forall a. AsError a => Fold a ServiceError
_AccessDeniedException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"AccessDeniedException"
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
403
_IncompatibleVersionException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_IncompatibleVersionException :: forall a. AsError a => Fold a ServiceError
_IncompatibleVersionException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"IncompatibleVersionException"
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
400
_InternalServiceException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_InternalServiceException :: forall a. AsError a => Fold a ServiceError
_InternalServiceException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"InternalServiceException"
_LimitExceededException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_LimitExceededException :: forall a. AsError a => Fold a ServiceError
_LimitExceededException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"LimitExceededException"
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
429
_ResourceInUseException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_ResourceInUseException :: forall a. AsError a => Fold a ServiceError
_ResourceInUseException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"ResourceInUseException"
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
409
_ResourceNotFoundException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_ResourceNotFoundException :: forall a. AsError a => Fold a ServiceError
_ResourceNotFoundException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"ResourceNotFoundException"
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
404
_ValidationException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_ValidationException :: forall a. AsError a => Fold a ServiceError
_ValidationException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"ValidationException"
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
400