{-# LANGUAGE OverloadedStrings #-}
module Network.AWS.ElasticTranscoder.Types
(
elasticTranscoder
, _IncompatibleVersionException
, _ValidationException
, _AccessDeniedException
, _InternalServiceException
, _ResourceNotFoundException
, _LimitExceededException
, _ResourceInUseException
, Artwork
, artwork
, aSizingPolicy
, aAlbumArtFormat
, aMaxHeight
, aInputKey
, aPaddingPolicy
, aEncryption
, aMaxWidth
, AudioCodecOptions
, audioCodecOptions
, acoSigned
, acoBitDepth
, acoProfile
, acoBitOrder
, AudioParameters
, audioParameters
, apChannels
, apCodec
, apAudioPackingMode
, apSampleRate
, apBitRate
, apCodecOptions
, CaptionFormat
, captionFormat
, cfPattern
, cfFormat
, cfEncryption
, CaptionSource
, captionSource
, csTimeOffset
, csEncryption
, csKey
, csLanguage
, csLabel
, Captions
, captions
, cMergePolicy
, cCaptionSources
, cCaptionFormats
, Clip
, clip
, cTimeSpan
, CreateJobOutput
, createJobOutput
, cjoThumbnailPattern
, cjoCaptions
, cjoPresetId
, cjoComposition
, cjoAlbumArt
, cjoWatermarks
, cjoEncryption
, cjoKey
, cjoSegmentDuration
, cjoThumbnailEncryption
, cjoRotate
, CreateJobPlaylist
, createJobPlaylist
, cjpPlayReadyDrm
, cjpFormat
, cjpOutputKeys
, cjpName
, cjpHlsContentProtection
, DetectedProperties
, detectedProperties
, dpHeight
, dpFrameRate
, dpFileSize
, dpWidth
, dpDurationMillis
, Encryption
, encryption
, eMode
, eKeyMD5
, eKey
, eInitializationVector
, HlsContentProtection
, hlsContentProtection
, hcpKeyMD5
, hcpKeyStoragePolicy
, hcpKey
, hcpMethod
, hcpInitializationVector
, hcpLicenseAcquisitionURL
, InputCaptions
, inputCaptions
, icMergePolicy
, icCaptionSources
, Job'
, job'
, jStatus
, jPipelineId
, jARN
, jInputs
, jInput
, jUserMetadata
, jOutputs
, jOutput
, jId
, jPlaylists
, jOutputKeyPrefix
, jTiming
, JobAlbumArt
, jobAlbumArt
, jaaMergePolicy
, jaaArtwork
, JobInput
, jobInput
, jiFrameRate
, jiResolution
, jiAspectRatio
, jiTimeSpan
, jiEncryption
, jiKey
, jiDetectedProperties
, jiContainer
, jiInterlaced
, jiInputCaptions
, JobOutput
, jobOutput
, joAppliedColorSpaceConversion
, joThumbnailPattern
, joStatus
, joHeight
, joFrameRate
, joCaptions
, joPresetId
, joComposition
, joAlbumArt
, joFileSize
, joWatermarks
, joWidth
, joEncryption
, joKey
, joStatusDetail
, joId
, joSegmentDuration
, joDurationMillis
, joThumbnailEncryption
, joDuration
, joRotate
, JobWatermark
, jobWatermark
, jwPresetWatermarkId
, jwInputKey
, jwEncryption
, Notifications
, notifications
, nError
, nWarning
, nProgressing
, nCompleted
, Permission
, permission
, pAccess
, pGranteeType
, pGrantee
, Pipeline
, pipeline
, pipStatus
, pipARN
, pipInputBucket
, pipContentConfig
, pipOutputBucket
, pipRole
, pipName
, pipAWSKMSKeyARN
, pipId
, pipNotifications
, pipThumbnailConfig
, PipelineOutputConfig
, pipelineOutputConfig
, pocBucket
, pocStorageClass
, pocPermissions
, PlayReadyDrm
, playReadyDrm
, prdKeyId
, prdFormat
, prdKeyMD5
, prdKey
, prdInitializationVector
, prdLicenseAcquisitionURL
, Playlist
, playlist
, pStatus
, pPlayReadyDrm
, pFormat
, pOutputKeys
, pName
, pStatusDetail
, pHlsContentProtection
, Preset
, preset
, preARN
, preVideo
, preThumbnails
, preName
, preContainer
, preId
, preType
, preDescription
, preAudio
, PresetWatermark
, presetWatermark
, pwVerticalAlign
, pwSizingPolicy
, pwHorizontalOffset
, pwMaxHeight
, pwOpacity
, pwVerticalOffset
, pwMaxWidth
, pwId
, pwHorizontalAlign
, pwTarget
, Thumbnails
, thumbnails
, tSizingPolicy
, tFormat
, tMaxHeight
, tResolution
, tAspectRatio
, tPaddingPolicy
, tInterval
, tMaxWidth
, TimeSpan
, timeSpan
, tsStartTime
, tsDuration
, Timing
, timing
, tSubmitTimeMillis
, tFinishTimeMillis
, tStartTimeMillis
, VideoParameters
, videoParameters
, vpKeyframesMaxDist
, vpFrameRate
, vpSizingPolicy
, vpMaxFrameRate
, vpMaxHeight
, vpWatermarks
, vpDisplayAspectRatio
, vpResolution
, vpCodec
, vpAspectRatio
, vpPaddingPolicy
, vpMaxWidth
, vpBitRate
, vpFixedGOP
, vpCodecOptions
, Warning
, warning
, wCode
, wMessage
) where
import Network.AWS.ElasticTranscoder.Types.Product
import Network.AWS.ElasticTranscoder.Types.Sum
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Sign.V4
elasticTranscoder :: Service
elasticTranscoder =
Service
{ _svcAbbrev = "ElasticTranscoder"
, _svcSigner = v4
, _svcPrefix = "elastictranscoder"
, _svcVersion = "2012-09-25"
, _svcEndpoint = defaultEndpoint elasticTranscoder
, _svcTimeout = Just 70
, _svcCheck = statusSuccess
, _svcError = parseJSONError "ElasticTranscoder"
, _svcRetry = retry
}
where
retry =
Exponential
{ _retryBase = 5.0e-2
, _retryGrowth = 2
, _retryAttempts = 5
, _retryCheck = check
}
check e
| has (hasStatus 429) e = Just "too_many_requests"
| has (hasCode "ThrottlingException" . hasStatus 400) e =
Just "throttling_exception"
| has (hasCode "Throttling" . hasStatus 400) e = Just "throttling"
| has (hasStatus 504) e = Just "gateway_timeout"
| has (hasStatus 502) e = Just "bad_gateway"
| has (hasStatus 503) e = Just "service_unavailable"
| has (hasStatus 500) e = Just "general_server_error"
| has (hasStatus 509) e = Just "limit_exceeded"
| otherwise = Nothing
_IncompatibleVersionException :: AsError a => Getting (First ServiceError) a ServiceError
_IncompatibleVersionException =
_ServiceError . hasStatus 400 . hasCode "IncompatibleVersionException"
_ValidationException :: AsError a => Getting (First ServiceError) a ServiceError
_ValidationException =
_ServiceError . hasStatus 400 . hasCode "ValidationException"
_AccessDeniedException :: AsError a => Getting (First ServiceError) a ServiceError
_AccessDeniedException =
_ServiceError . hasStatus 403 . hasCode "AccessDeniedException"
_InternalServiceException :: AsError a => Getting (First ServiceError) a ServiceError
_InternalServiceException = _ServiceError . hasCode "InternalServiceException"
_ResourceNotFoundException :: AsError a => Getting (First ServiceError) a ServiceError
_ResourceNotFoundException =
_ServiceError . hasStatus 404 . hasCode "ResourceNotFoundException"
_LimitExceededException :: AsError a => Getting (First ServiceError) a ServiceError
_LimitExceededException =
_ServiceError . hasStatus 429 . hasCode "LimitExceededException"
_ResourceInUseException :: AsError a => Getting (First ServiceError) a ServiceError
_ResourceInUseException =
_ServiceError . hasStatus 409 . hasCode "ResourceInUseException"