{-# LANGUAGE DisambiguateRecordFields #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.MediaTailor.Types
(
defaultService,
_BadRequestException,
AccessType (..),
ChannelState (..),
MessageType (..),
Mode (..),
Operator (..),
OriginManifestType (..),
PlaybackMode (..),
RelativePosition (..),
ScheduleEntryType (..),
Tier (..),
Type (..),
AccessConfiguration (..),
newAccessConfiguration,
accessConfiguration_accessType,
accessConfiguration_secretsManagerAccessTokenConfiguration,
AdBreak (..),
newAdBreak,
adBreak_messageType,
adBreak_offsetMillis,
adBreak_slate,
adBreak_spliceInsertMessage,
adBreak_timeSignalMessage,
AdMarkerPassthrough (..),
newAdMarkerPassthrough,
adMarkerPassthrough_enabled,
Alert (..),
newAlert,
alert_alertCode,
alert_alertMessage,
alert_lastModifiedTime,
alert_relatedResourceArns,
alert_resourceArn,
AvailMatchingCriteria (..),
newAvailMatchingCriteria,
availMatchingCriteria_dynamicVariable,
availMatchingCriteria_operator,
AvailSuppression (..),
newAvailSuppression,
availSuppression_mode,
availSuppression_value,
Bumper (..),
newBumper,
bumper_endUrl,
bumper_startUrl,
CdnConfiguration (..),
newCdnConfiguration,
cdnConfiguration_adSegmentUrlPrefix,
cdnConfiguration_contentSegmentUrlPrefix,
Channel (..),
newChannel,
channel_creationTime,
channel_fillerSlate,
channel_lastModifiedTime,
channel_tags,
channel_arn,
channel_channelName,
channel_channelState,
channel_outputs,
channel_playbackMode,
channel_tier,
DashConfiguration (..),
newDashConfiguration,
dashConfiguration_manifestEndpointPrefix,
dashConfiguration_mpdLocation,
dashConfiguration_originManifestType,
DashConfigurationForPut (..),
newDashConfigurationForPut,
dashConfigurationForPut_mpdLocation,
dashConfigurationForPut_originManifestType,
DashPlaylistSettings (..),
newDashPlaylistSettings,
dashPlaylistSettings_manifestWindowSeconds,
dashPlaylistSettings_minBufferTimeSeconds,
dashPlaylistSettings_minUpdatePeriodSeconds,
dashPlaylistSettings_suggestedPresentationDelaySeconds,
DefaultSegmentDeliveryConfiguration (..),
newDefaultSegmentDeliveryConfiguration,
defaultSegmentDeliveryConfiguration_baseUrl,
HlsConfiguration (..),
newHlsConfiguration,
hlsConfiguration_manifestEndpointPrefix,
HlsPlaylistSettings (..),
newHlsPlaylistSettings,
hlsPlaylistSettings_manifestWindowSeconds,
HttpConfiguration (..),
newHttpConfiguration,
httpConfiguration_baseUrl,
HttpPackageConfiguration (..),
newHttpPackageConfiguration,
httpPackageConfiguration_path,
httpPackageConfiguration_sourceGroup,
httpPackageConfiguration_type,
LivePreRollConfiguration (..),
newLivePreRollConfiguration,
livePreRollConfiguration_adDecisionServerUrl,
livePreRollConfiguration_maxDurationSeconds,
LiveSource (..),
newLiveSource,
liveSource_creationTime,
liveSource_lastModifiedTime,
liveSource_tags,
liveSource_arn,
liveSource_httpPackageConfigurations,
liveSource_liveSourceName,
liveSource_sourceLocationName,
LogConfiguration (..),
newLogConfiguration,
logConfiguration_percentEnabled,
ManifestProcessingRules (..),
newManifestProcessingRules,
manifestProcessingRules_adMarkerPassthrough,
PlaybackConfiguration (..),
newPlaybackConfiguration,
playbackConfiguration_adDecisionServerUrl,
playbackConfiguration_availSuppression,
playbackConfiguration_bumper,
playbackConfiguration_cdnConfiguration,
playbackConfiguration_configurationAliases,
playbackConfiguration_dashConfiguration,
playbackConfiguration_hlsConfiguration,
playbackConfiguration_livePreRollConfiguration,
playbackConfiguration_logConfiguration,
playbackConfiguration_manifestProcessingRules,
playbackConfiguration_name,
playbackConfiguration_personalizationThresholdSeconds,
playbackConfiguration_playbackConfigurationArn,
playbackConfiguration_playbackEndpointPrefix,
playbackConfiguration_sessionInitializationEndpointPrefix,
playbackConfiguration_slateAdUrl,
playbackConfiguration_tags,
playbackConfiguration_transcodeProfileName,
playbackConfiguration_videoContentSourceUrl,
PrefetchConsumption (..),
newPrefetchConsumption,
prefetchConsumption_availMatchingCriteria,
prefetchConsumption_startTime,
prefetchConsumption_endTime,
PrefetchRetrieval (..),
newPrefetchRetrieval,
prefetchRetrieval_dynamicVariables,
prefetchRetrieval_startTime,
prefetchRetrieval_endTime,
PrefetchSchedule (..),
newPrefetchSchedule,
prefetchSchedule_streamId,
prefetchSchedule_arn,
prefetchSchedule_consumption,
prefetchSchedule_name,
prefetchSchedule_playbackConfigurationName,
prefetchSchedule_retrieval,
RequestOutputItem (..),
newRequestOutputItem,
requestOutputItem_dashPlaylistSettings,
requestOutputItem_hlsPlaylistSettings,
requestOutputItem_manifestName,
requestOutputItem_sourceGroup,
ResponseOutputItem (..),
newResponseOutputItem,
responseOutputItem_dashPlaylistSettings,
responseOutputItem_hlsPlaylistSettings,
responseOutputItem_manifestName,
responseOutputItem_playbackUrl,
responseOutputItem_sourceGroup,
ScheduleAdBreak (..),
newScheduleAdBreak,
scheduleAdBreak_approximateDurationSeconds,
scheduleAdBreak_approximateStartTime,
scheduleAdBreak_sourceLocationName,
scheduleAdBreak_vodSourceName,
ScheduleConfiguration (..),
newScheduleConfiguration,
scheduleConfiguration_transition,
ScheduleEntry (..),
newScheduleEntry,
scheduleEntry_approximateDurationSeconds,
scheduleEntry_approximateStartTime,
scheduleEntry_liveSourceName,
scheduleEntry_scheduleAdBreaks,
scheduleEntry_scheduleEntryType,
scheduleEntry_vodSourceName,
scheduleEntry_arn,
scheduleEntry_channelName,
scheduleEntry_programName,
scheduleEntry_sourceLocationName,
SecretsManagerAccessTokenConfiguration (..),
newSecretsManagerAccessTokenConfiguration,
secretsManagerAccessTokenConfiguration_headerName,
secretsManagerAccessTokenConfiguration_secretArn,
secretsManagerAccessTokenConfiguration_secretStringKey,
SegmentDeliveryConfiguration (..),
newSegmentDeliveryConfiguration,
segmentDeliveryConfiguration_baseUrl,
segmentDeliveryConfiguration_name,
SegmentationDescriptor (..),
newSegmentationDescriptor,
segmentationDescriptor_segmentNum,
segmentationDescriptor_segmentationEventId,
segmentationDescriptor_segmentationTypeId,
segmentationDescriptor_segmentationUpid,
segmentationDescriptor_segmentationUpidType,
segmentationDescriptor_segmentsExpected,
segmentationDescriptor_subSegmentNum,
segmentationDescriptor_subSegmentsExpected,
SlateSource (..),
newSlateSource,
slateSource_sourceLocationName,
slateSource_vodSourceName,
SourceLocation (..),
newSourceLocation,
sourceLocation_accessConfiguration,
sourceLocation_creationTime,
sourceLocation_defaultSegmentDeliveryConfiguration,
sourceLocation_lastModifiedTime,
sourceLocation_segmentDeliveryConfigurations,
sourceLocation_tags,
sourceLocation_arn,
sourceLocation_httpConfiguration,
sourceLocation_sourceLocationName,
SpliceInsertMessage (..),
newSpliceInsertMessage,
spliceInsertMessage_availNum,
spliceInsertMessage_availsExpected,
spliceInsertMessage_spliceEventId,
spliceInsertMessage_uniqueProgramId,
TimeSignalMessage (..),
newTimeSignalMessage,
timeSignalMessage_segmentationDescriptors,
Transition (..),
newTransition,
transition_durationMillis,
transition_relativeProgram,
transition_scheduledStartTimeMillis,
transition_relativePosition,
transition_type,
VodSource (..),
newVodSource,
vodSource_creationTime,
vodSource_lastModifiedTime,
vodSource_tags,
vodSource_arn,
vodSource_httpPackageConfigurations,
vodSource_sourceLocationName,
vodSource_vodSourceName,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import Amazonka.MediaTailor.Types.AccessConfiguration
import Amazonka.MediaTailor.Types.AccessType
import Amazonka.MediaTailor.Types.AdBreak
import Amazonka.MediaTailor.Types.AdMarkerPassthrough
import Amazonka.MediaTailor.Types.Alert
import Amazonka.MediaTailor.Types.AvailMatchingCriteria
import Amazonka.MediaTailor.Types.AvailSuppression
import Amazonka.MediaTailor.Types.Bumper
import Amazonka.MediaTailor.Types.CdnConfiguration
import Amazonka.MediaTailor.Types.Channel
import Amazonka.MediaTailor.Types.ChannelState
import Amazonka.MediaTailor.Types.DashConfiguration
import Amazonka.MediaTailor.Types.DashConfigurationForPut
import Amazonka.MediaTailor.Types.DashPlaylistSettings
import Amazonka.MediaTailor.Types.DefaultSegmentDeliveryConfiguration
import Amazonka.MediaTailor.Types.HlsConfiguration
import Amazonka.MediaTailor.Types.HlsPlaylistSettings
import Amazonka.MediaTailor.Types.HttpConfiguration
import Amazonka.MediaTailor.Types.HttpPackageConfiguration
import Amazonka.MediaTailor.Types.LivePreRollConfiguration
import Amazonka.MediaTailor.Types.LiveSource
import Amazonka.MediaTailor.Types.LogConfiguration
import Amazonka.MediaTailor.Types.ManifestProcessingRules
import Amazonka.MediaTailor.Types.MessageType
import Amazonka.MediaTailor.Types.Mode
import Amazonka.MediaTailor.Types.Operator
import Amazonka.MediaTailor.Types.OriginManifestType
import Amazonka.MediaTailor.Types.PlaybackConfiguration
import Amazonka.MediaTailor.Types.PlaybackMode
import Amazonka.MediaTailor.Types.PrefetchConsumption
import Amazonka.MediaTailor.Types.PrefetchRetrieval
import Amazonka.MediaTailor.Types.PrefetchSchedule
import Amazonka.MediaTailor.Types.RelativePosition
import Amazonka.MediaTailor.Types.RequestOutputItem
import Amazonka.MediaTailor.Types.ResponseOutputItem
import Amazonka.MediaTailor.Types.ScheduleAdBreak
import Amazonka.MediaTailor.Types.ScheduleConfiguration
import Amazonka.MediaTailor.Types.ScheduleEntry
import Amazonka.MediaTailor.Types.ScheduleEntryType
import Amazonka.MediaTailor.Types.SecretsManagerAccessTokenConfiguration
import Amazonka.MediaTailor.Types.SegmentDeliveryConfiguration
import Amazonka.MediaTailor.Types.SegmentationDescriptor
import Amazonka.MediaTailor.Types.SlateSource
import Amazonka.MediaTailor.Types.SourceLocation
import Amazonka.MediaTailor.Types.SpliceInsertMessage
import Amazonka.MediaTailor.Types.Tier
import Amazonka.MediaTailor.Types.TimeSignalMessage
import Amazonka.MediaTailor.Types.Transition
import Amazonka.MediaTailor.Types.Type
import Amazonka.MediaTailor.Types.VodSource
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
"MediaTailor",
$sel:signer:Service :: Signer
Core.signer = Signer
Sign.v4,
$sel:endpointPrefix:Service :: ByteString
Core.endpointPrefix = ByteString
"api.mediatailor",
$sel:signingName:Service :: ByteString
Core.signingName = ByteString
"mediatailor",
$sel:version:Service :: ByteString
Core.version = ByteString
"2018-04-23",
$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
"MediaTailor",
$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
_BadRequestException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_BadRequestException :: forall a. AsError a => Fold a ServiceError
_BadRequestException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"BadRequestException"
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