{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module Network.AWS.MediaPackage.Types.Product where
import Network.AWS.Lens
import Network.AWS.MediaPackage.Types.Sum
import Network.AWS.Prelude
data Channel = Channel'
{ _cHlsIngest :: !(Maybe HlsIngest)
, _cARN :: !(Maybe Text)
, _cId :: !(Maybe Text)
, _cDescription :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
channel
:: Channel
channel =
Channel'
{ _cHlsIngest = Nothing
, _cARN = Nothing
, _cId = Nothing
, _cDescription = Nothing
}
cHlsIngest :: Lens' Channel (Maybe HlsIngest)
cHlsIngest = lens _cHlsIngest (\ s a -> s{_cHlsIngest = a})
cARN :: Lens' Channel (Maybe Text)
cARN = lens _cARN (\ s a -> s{_cARN = a})
cId :: Lens' Channel (Maybe Text)
cId = lens _cId (\ s a -> s{_cId = a})
cDescription :: Lens' Channel (Maybe Text)
cDescription = lens _cDescription (\ s a -> s{_cDescription = a})
instance FromJSON Channel where
parseJSON
= withObject "Channel"
(\ x ->
Channel' <$>
(x .:? "hlsIngest") <*> (x .:? "arn") <*>
(x .:? "id")
<*> (x .:? "description"))
instance Hashable Channel where
instance NFData Channel where
data CmafEncryption = CmafEncryption'
{ _ceKeyRotationIntervalSeconds :: !(Maybe Int)
, _ceSpekeKeyProvider :: !SpekeKeyProvider
} deriving (Eq, Read, Show, Data, Typeable, Generic)
cmafEncryption
:: SpekeKeyProvider
-> CmafEncryption
cmafEncryption pSpekeKeyProvider_ =
CmafEncryption'
{ _ceKeyRotationIntervalSeconds = Nothing
, _ceSpekeKeyProvider = pSpekeKeyProvider_
}
ceKeyRotationIntervalSeconds :: Lens' CmafEncryption (Maybe Int)
ceKeyRotationIntervalSeconds = lens _ceKeyRotationIntervalSeconds (\ s a -> s{_ceKeyRotationIntervalSeconds = a})
ceSpekeKeyProvider :: Lens' CmafEncryption SpekeKeyProvider
ceSpekeKeyProvider = lens _ceSpekeKeyProvider (\ s a -> s{_ceSpekeKeyProvider = a})
instance FromJSON CmafEncryption where
parseJSON
= withObject "CmafEncryption"
(\ x ->
CmafEncryption' <$>
(x .:? "keyRotationIntervalSeconds") <*>
(x .: "spekeKeyProvider"))
instance Hashable CmafEncryption where
instance NFData CmafEncryption where
instance ToJSON CmafEncryption where
toJSON CmafEncryption'{..}
= object
(catMaybes
[("keyRotationIntervalSeconds" .=) <$>
_ceKeyRotationIntervalSeconds,
Just ("spekeKeyProvider" .= _ceSpekeKeyProvider)])
data CmafPackage = CmafPackage'
{ _cpHlsManifests :: !(Maybe [HlsManifest])
, _cpSegmentDurationSeconds :: !(Maybe Int)
, _cpStreamSelection :: !(Maybe StreamSelection)
, _cpEncryption :: !(Maybe CmafEncryption)
, _cpSegmentPrefix :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
cmafPackage
:: CmafPackage
cmafPackage =
CmafPackage'
{ _cpHlsManifests = Nothing
, _cpSegmentDurationSeconds = Nothing
, _cpStreamSelection = Nothing
, _cpEncryption = Nothing
, _cpSegmentPrefix = Nothing
}
cpHlsManifests :: Lens' CmafPackage [HlsManifest]
cpHlsManifests = lens _cpHlsManifests (\ s a -> s{_cpHlsManifests = a}) . _Default . _Coerce
cpSegmentDurationSeconds :: Lens' CmafPackage (Maybe Int)
cpSegmentDurationSeconds = lens _cpSegmentDurationSeconds (\ s a -> s{_cpSegmentDurationSeconds = a})
cpStreamSelection :: Lens' CmafPackage (Maybe StreamSelection)
cpStreamSelection = lens _cpStreamSelection (\ s a -> s{_cpStreamSelection = a})
cpEncryption :: Lens' CmafPackage (Maybe CmafEncryption)
cpEncryption = lens _cpEncryption (\ s a -> s{_cpEncryption = a})
cpSegmentPrefix :: Lens' CmafPackage (Maybe Text)
cpSegmentPrefix = lens _cpSegmentPrefix (\ s a -> s{_cpSegmentPrefix = a})
instance FromJSON CmafPackage where
parseJSON
= withObject "CmafPackage"
(\ x ->
CmafPackage' <$>
(x .:? "hlsManifests" .!= mempty) <*>
(x .:? "segmentDurationSeconds")
<*> (x .:? "streamSelection")
<*> (x .:? "encryption")
<*> (x .:? "segmentPrefix"))
instance Hashable CmafPackage where
instance NFData CmafPackage where
data CmafPackageCreateOrUpdateParameters = CmafPackageCreateOrUpdateParameters'
{ _cpcoupHlsManifests :: !(Maybe [HlsManifestCreateOrUpdateParameters])
, _cpcoupSegmentDurationSeconds :: !(Maybe Int)
, _cpcoupStreamSelection :: !(Maybe StreamSelection)
, _cpcoupEncryption :: !(Maybe CmafEncryption)
, _cpcoupSegmentPrefix :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
cmafPackageCreateOrUpdateParameters
:: CmafPackageCreateOrUpdateParameters
cmafPackageCreateOrUpdateParameters =
CmafPackageCreateOrUpdateParameters'
{ _cpcoupHlsManifests = Nothing
, _cpcoupSegmentDurationSeconds = Nothing
, _cpcoupStreamSelection = Nothing
, _cpcoupEncryption = Nothing
, _cpcoupSegmentPrefix = Nothing
}
cpcoupHlsManifests :: Lens' CmafPackageCreateOrUpdateParameters [HlsManifestCreateOrUpdateParameters]
cpcoupHlsManifests = lens _cpcoupHlsManifests (\ s a -> s{_cpcoupHlsManifests = a}) . _Default . _Coerce
cpcoupSegmentDurationSeconds :: Lens' CmafPackageCreateOrUpdateParameters (Maybe Int)
cpcoupSegmentDurationSeconds = lens _cpcoupSegmentDurationSeconds (\ s a -> s{_cpcoupSegmentDurationSeconds = a})
cpcoupStreamSelection :: Lens' CmafPackageCreateOrUpdateParameters (Maybe StreamSelection)
cpcoupStreamSelection = lens _cpcoupStreamSelection (\ s a -> s{_cpcoupStreamSelection = a})
cpcoupEncryption :: Lens' CmafPackageCreateOrUpdateParameters (Maybe CmafEncryption)
cpcoupEncryption = lens _cpcoupEncryption (\ s a -> s{_cpcoupEncryption = a})
cpcoupSegmentPrefix :: Lens' CmafPackageCreateOrUpdateParameters (Maybe Text)
cpcoupSegmentPrefix = lens _cpcoupSegmentPrefix (\ s a -> s{_cpcoupSegmentPrefix = a})
instance Hashable CmafPackageCreateOrUpdateParameters
where
instance NFData CmafPackageCreateOrUpdateParameters
where
instance ToJSON CmafPackageCreateOrUpdateParameters
where
toJSON CmafPackageCreateOrUpdateParameters'{..}
= object
(catMaybes
[("hlsManifests" .=) <$> _cpcoupHlsManifests,
("segmentDurationSeconds" .=) <$>
_cpcoupSegmentDurationSeconds,
("streamSelection" .=) <$> _cpcoupStreamSelection,
("encryption" .=) <$> _cpcoupEncryption,
("segmentPrefix" .=) <$> _cpcoupSegmentPrefix])
data DashEncryption = DashEncryption'
{ _deKeyRotationIntervalSeconds :: !(Maybe Int)
, _deSpekeKeyProvider :: !SpekeKeyProvider
} deriving (Eq, Read, Show, Data, Typeable, Generic)
dashEncryption
:: SpekeKeyProvider
-> DashEncryption
dashEncryption pSpekeKeyProvider_ =
DashEncryption'
{ _deKeyRotationIntervalSeconds = Nothing
, _deSpekeKeyProvider = pSpekeKeyProvider_
}
deKeyRotationIntervalSeconds :: Lens' DashEncryption (Maybe Int)
deKeyRotationIntervalSeconds = lens _deKeyRotationIntervalSeconds (\ s a -> s{_deKeyRotationIntervalSeconds = a})
deSpekeKeyProvider :: Lens' DashEncryption SpekeKeyProvider
deSpekeKeyProvider = lens _deSpekeKeyProvider (\ s a -> s{_deSpekeKeyProvider = a})
instance FromJSON DashEncryption where
parseJSON
= withObject "DashEncryption"
(\ x ->
DashEncryption' <$>
(x .:? "keyRotationIntervalSeconds") <*>
(x .: "spekeKeyProvider"))
instance Hashable DashEncryption where
instance NFData DashEncryption where
instance ToJSON DashEncryption where
toJSON DashEncryption'{..}
= object
(catMaybes
[("keyRotationIntervalSeconds" .=) <$>
_deKeyRotationIntervalSeconds,
Just ("spekeKeyProvider" .= _deSpekeKeyProvider)])
data DashPackage = DashPackage'
{ _dpMinBufferTimeSeconds :: !(Maybe Int)
, _dpProfile :: !(Maybe Profile)
, _dpSegmentDurationSeconds :: !(Maybe Int)
, _dpStreamSelection :: !(Maybe StreamSelection)
, _dpEncryption :: !(Maybe DashEncryption)
, _dpMinUpdatePeriodSeconds :: !(Maybe Int)
, _dpSuggestedPresentationDelaySeconds :: !(Maybe Int)
, _dpManifestWindowSeconds :: !(Maybe Int)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
dashPackage
:: DashPackage
dashPackage =
DashPackage'
{ _dpMinBufferTimeSeconds = Nothing
, _dpProfile = Nothing
, _dpSegmentDurationSeconds = Nothing
, _dpStreamSelection = Nothing
, _dpEncryption = Nothing
, _dpMinUpdatePeriodSeconds = Nothing
, _dpSuggestedPresentationDelaySeconds = Nothing
, _dpManifestWindowSeconds = Nothing
}
dpMinBufferTimeSeconds :: Lens' DashPackage (Maybe Int)
dpMinBufferTimeSeconds = lens _dpMinBufferTimeSeconds (\ s a -> s{_dpMinBufferTimeSeconds = a})
dpProfile :: Lens' DashPackage (Maybe Profile)
dpProfile = lens _dpProfile (\ s a -> s{_dpProfile = a})
dpSegmentDurationSeconds :: Lens' DashPackage (Maybe Int)
dpSegmentDurationSeconds = lens _dpSegmentDurationSeconds (\ s a -> s{_dpSegmentDurationSeconds = a})
dpStreamSelection :: Lens' DashPackage (Maybe StreamSelection)
dpStreamSelection = lens _dpStreamSelection (\ s a -> s{_dpStreamSelection = a})
dpEncryption :: Lens' DashPackage (Maybe DashEncryption)
dpEncryption = lens _dpEncryption (\ s a -> s{_dpEncryption = a})
dpMinUpdatePeriodSeconds :: Lens' DashPackage (Maybe Int)
dpMinUpdatePeriodSeconds = lens _dpMinUpdatePeriodSeconds (\ s a -> s{_dpMinUpdatePeriodSeconds = a})
dpSuggestedPresentationDelaySeconds :: Lens' DashPackage (Maybe Int)
dpSuggestedPresentationDelaySeconds = lens _dpSuggestedPresentationDelaySeconds (\ s a -> s{_dpSuggestedPresentationDelaySeconds = a})
dpManifestWindowSeconds :: Lens' DashPackage (Maybe Int)
dpManifestWindowSeconds = lens _dpManifestWindowSeconds (\ s a -> s{_dpManifestWindowSeconds = a})
instance FromJSON DashPackage where
parseJSON
= withObject "DashPackage"
(\ x ->
DashPackage' <$>
(x .:? "minBufferTimeSeconds") <*> (x .:? "profile")
<*> (x .:? "segmentDurationSeconds")
<*> (x .:? "streamSelection")
<*> (x .:? "encryption")
<*> (x .:? "minUpdatePeriodSeconds")
<*> (x .:? "suggestedPresentationDelaySeconds")
<*> (x .:? "manifestWindowSeconds"))
instance Hashable DashPackage where
instance NFData DashPackage where
instance ToJSON DashPackage where
toJSON DashPackage'{..}
= object
(catMaybes
[("minBufferTimeSeconds" .=) <$>
_dpMinBufferTimeSeconds,
("profile" .=) <$> _dpProfile,
("segmentDurationSeconds" .=) <$>
_dpSegmentDurationSeconds,
("streamSelection" .=) <$> _dpStreamSelection,
("encryption" .=) <$> _dpEncryption,
("minUpdatePeriodSeconds" .=) <$>
_dpMinUpdatePeriodSeconds,
("suggestedPresentationDelaySeconds" .=) <$>
_dpSuggestedPresentationDelaySeconds,
("manifestWindowSeconds" .=) <$>
_dpManifestWindowSeconds])
data HlsEncryption = HlsEncryption'
{ _heEncryptionMethod :: !(Maybe EncryptionMethod)
, _heKeyRotationIntervalSeconds :: !(Maybe Int)
, _heConstantInitializationVector :: !(Maybe Text)
, _heRepeatExtXKey :: !(Maybe Bool)
, _heSpekeKeyProvider :: !SpekeKeyProvider
} deriving (Eq, Read, Show, Data, Typeable, Generic)
hlsEncryption
:: SpekeKeyProvider
-> HlsEncryption
hlsEncryption pSpekeKeyProvider_ =
HlsEncryption'
{ _heEncryptionMethod = Nothing
, _heKeyRotationIntervalSeconds = Nothing
, _heConstantInitializationVector = Nothing
, _heRepeatExtXKey = Nothing
, _heSpekeKeyProvider = pSpekeKeyProvider_
}
heEncryptionMethod :: Lens' HlsEncryption (Maybe EncryptionMethod)
heEncryptionMethod = lens _heEncryptionMethod (\ s a -> s{_heEncryptionMethod = a})
heKeyRotationIntervalSeconds :: Lens' HlsEncryption (Maybe Int)
heKeyRotationIntervalSeconds = lens _heKeyRotationIntervalSeconds (\ s a -> s{_heKeyRotationIntervalSeconds = a})
heConstantInitializationVector :: Lens' HlsEncryption (Maybe Text)
heConstantInitializationVector = lens _heConstantInitializationVector (\ s a -> s{_heConstantInitializationVector = a})
heRepeatExtXKey :: Lens' HlsEncryption (Maybe Bool)
heRepeatExtXKey = lens _heRepeatExtXKey (\ s a -> s{_heRepeatExtXKey = a})
heSpekeKeyProvider :: Lens' HlsEncryption SpekeKeyProvider
heSpekeKeyProvider = lens _heSpekeKeyProvider (\ s a -> s{_heSpekeKeyProvider = a})
instance FromJSON HlsEncryption where
parseJSON
= withObject "HlsEncryption"
(\ x ->
HlsEncryption' <$>
(x .:? "encryptionMethod") <*>
(x .:? "keyRotationIntervalSeconds")
<*> (x .:? "constantInitializationVector")
<*> (x .:? "repeatExtXKey")
<*> (x .: "spekeKeyProvider"))
instance Hashable HlsEncryption where
instance NFData HlsEncryption where
instance ToJSON HlsEncryption where
toJSON HlsEncryption'{..}
= object
(catMaybes
[("encryptionMethod" .=) <$> _heEncryptionMethod,
("keyRotationIntervalSeconds" .=) <$>
_heKeyRotationIntervalSeconds,
("constantInitializationVector" .=) <$>
_heConstantInitializationVector,
("repeatExtXKey" .=) <$> _heRepeatExtXKey,
Just ("spekeKeyProvider" .= _heSpekeKeyProvider)])
newtype HlsIngest = HlsIngest'
{ _hiIngestEndpoints :: Maybe [IngestEndpoint]
} deriving (Eq, Read, Show, Data, Typeable, Generic)
hlsIngest
:: HlsIngest
hlsIngest = HlsIngest' {_hiIngestEndpoints = Nothing}
hiIngestEndpoints :: Lens' HlsIngest [IngestEndpoint]
hiIngestEndpoints = lens _hiIngestEndpoints (\ s a -> s{_hiIngestEndpoints = a}) . _Default . _Coerce
instance FromJSON HlsIngest where
parseJSON
= withObject "HlsIngest"
(\ x ->
HlsIngest' <$> (x .:? "ingestEndpoints" .!= mempty))
instance Hashable HlsIngest where
instance NFData HlsIngest where
data HlsManifest = HlsManifest'
{ _hmManifestName :: !(Maybe Text)
, _hmURL :: !(Maybe Text)
, _hmPlaylistType :: !(Maybe PlaylistType)
, _hmProgramDateTimeIntervalSeconds :: !(Maybe Int)
, _hmAdMarkers :: !(Maybe AdMarkers)
, _hmIncludeIframeOnlyStream :: !(Maybe Bool)
, _hmPlaylistWindowSeconds :: !(Maybe Int)
, _hmId :: !Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
hlsManifest
:: Text
-> HlsManifest
hlsManifest pId_ =
HlsManifest'
{ _hmManifestName = Nothing
, _hmURL = Nothing
, _hmPlaylistType = Nothing
, _hmProgramDateTimeIntervalSeconds = Nothing
, _hmAdMarkers = Nothing
, _hmIncludeIframeOnlyStream = Nothing
, _hmPlaylistWindowSeconds = Nothing
, _hmId = pId_
}
hmManifestName :: Lens' HlsManifest (Maybe Text)
hmManifestName = lens _hmManifestName (\ s a -> s{_hmManifestName = a})
hmURL :: Lens' HlsManifest (Maybe Text)
hmURL = lens _hmURL (\ s a -> s{_hmURL = a})
hmPlaylistType :: Lens' HlsManifest (Maybe PlaylistType)
hmPlaylistType = lens _hmPlaylistType (\ s a -> s{_hmPlaylistType = a})
hmProgramDateTimeIntervalSeconds :: Lens' HlsManifest (Maybe Int)
hmProgramDateTimeIntervalSeconds = lens _hmProgramDateTimeIntervalSeconds (\ s a -> s{_hmProgramDateTimeIntervalSeconds = a})
hmAdMarkers :: Lens' HlsManifest (Maybe AdMarkers)
hmAdMarkers = lens _hmAdMarkers (\ s a -> s{_hmAdMarkers = a})
hmIncludeIframeOnlyStream :: Lens' HlsManifest (Maybe Bool)
hmIncludeIframeOnlyStream = lens _hmIncludeIframeOnlyStream (\ s a -> s{_hmIncludeIframeOnlyStream = a})
hmPlaylistWindowSeconds :: Lens' HlsManifest (Maybe Int)
hmPlaylistWindowSeconds = lens _hmPlaylistWindowSeconds (\ s a -> s{_hmPlaylistWindowSeconds = a})
hmId :: Lens' HlsManifest Text
hmId = lens _hmId (\ s a -> s{_hmId = a})
instance FromJSON HlsManifest where
parseJSON
= withObject "HlsManifest"
(\ x ->
HlsManifest' <$>
(x .:? "manifestName") <*> (x .:? "url") <*>
(x .:? "playlistType")
<*> (x .:? "programDateTimeIntervalSeconds")
<*> (x .:? "adMarkers")
<*> (x .:? "includeIframeOnlyStream")
<*> (x .:? "playlistWindowSeconds")
<*> (x .: "id"))
instance Hashable HlsManifest where
instance NFData HlsManifest where
data HlsManifestCreateOrUpdateParameters = HlsManifestCreateOrUpdateParameters'
{ _hmcoupManifestName :: !(Maybe Text)
, _hmcoupPlaylistType :: !(Maybe PlaylistType)
, _hmcoupProgramDateTimeIntervalSeconds :: !(Maybe Int)
, _hmcoupAdMarkers :: !(Maybe AdMarkers)
, _hmcoupIncludeIframeOnlyStream :: !(Maybe Bool)
, _hmcoupPlaylistWindowSeconds :: !(Maybe Int)
, _hmcoupId :: !Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
hlsManifestCreateOrUpdateParameters
:: Text
-> HlsManifestCreateOrUpdateParameters
hlsManifestCreateOrUpdateParameters pId_ =
HlsManifestCreateOrUpdateParameters'
{ _hmcoupManifestName = Nothing
, _hmcoupPlaylistType = Nothing
, _hmcoupProgramDateTimeIntervalSeconds = Nothing
, _hmcoupAdMarkers = Nothing
, _hmcoupIncludeIframeOnlyStream = Nothing
, _hmcoupPlaylistWindowSeconds = Nothing
, _hmcoupId = pId_
}
hmcoupManifestName :: Lens' HlsManifestCreateOrUpdateParameters (Maybe Text)
hmcoupManifestName = lens _hmcoupManifestName (\ s a -> s{_hmcoupManifestName = a})
hmcoupPlaylistType :: Lens' HlsManifestCreateOrUpdateParameters (Maybe PlaylistType)
hmcoupPlaylistType = lens _hmcoupPlaylistType (\ s a -> s{_hmcoupPlaylistType = a})
hmcoupProgramDateTimeIntervalSeconds :: Lens' HlsManifestCreateOrUpdateParameters (Maybe Int)
hmcoupProgramDateTimeIntervalSeconds = lens _hmcoupProgramDateTimeIntervalSeconds (\ s a -> s{_hmcoupProgramDateTimeIntervalSeconds = a})
hmcoupAdMarkers :: Lens' HlsManifestCreateOrUpdateParameters (Maybe AdMarkers)
hmcoupAdMarkers = lens _hmcoupAdMarkers (\ s a -> s{_hmcoupAdMarkers = a})
hmcoupIncludeIframeOnlyStream :: Lens' HlsManifestCreateOrUpdateParameters (Maybe Bool)
hmcoupIncludeIframeOnlyStream = lens _hmcoupIncludeIframeOnlyStream (\ s a -> s{_hmcoupIncludeIframeOnlyStream = a})
hmcoupPlaylistWindowSeconds :: Lens' HlsManifestCreateOrUpdateParameters (Maybe Int)
hmcoupPlaylistWindowSeconds = lens _hmcoupPlaylistWindowSeconds (\ s a -> s{_hmcoupPlaylistWindowSeconds = a})
hmcoupId :: Lens' HlsManifestCreateOrUpdateParameters Text
hmcoupId = lens _hmcoupId (\ s a -> s{_hmcoupId = a})
instance Hashable HlsManifestCreateOrUpdateParameters
where
instance NFData HlsManifestCreateOrUpdateParameters
where
instance ToJSON HlsManifestCreateOrUpdateParameters
where
toJSON HlsManifestCreateOrUpdateParameters'{..}
= object
(catMaybes
[("manifestName" .=) <$> _hmcoupManifestName,
("playlistType" .=) <$> _hmcoupPlaylistType,
("programDateTimeIntervalSeconds" .=) <$>
_hmcoupProgramDateTimeIntervalSeconds,
("adMarkers" .=) <$> _hmcoupAdMarkers,
("includeIframeOnlyStream" .=) <$>
_hmcoupIncludeIframeOnlyStream,
("playlistWindowSeconds" .=) <$>
_hmcoupPlaylistWindowSeconds,
Just ("id" .= _hmcoupId)])
data HlsPackage = HlsPackage'
{ _hpUseAudioRenditionGroup :: !(Maybe Bool)
, _hpPlaylistType :: !(Maybe PlaylistType)
, _hpSegmentDurationSeconds :: !(Maybe Int)
, _hpProgramDateTimeIntervalSeconds :: !(Maybe Int)
, _hpStreamSelection :: !(Maybe StreamSelection)
, _hpAdMarkers :: !(Maybe AdMarkers)
, _hpEncryption :: !(Maybe HlsEncryption)
, _hpIncludeIframeOnlyStream :: !(Maybe Bool)
, _hpPlaylistWindowSeconds :: !(Maybe Int)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
hlsPackage
:: HlsPackage
hlsPackage =
HlsPackage'
{ _hpUseAudioRenditionGroup = Nothing
, _hpPlaylistType = Nothing
, _hpSegmentDurationSeconds = Nothing
, _hpProgramDateTimeIntervalSeconds = Nothing
, _hpStreamSelection = Nothing
, _hpAdMarkers = Nothing
, _hpEncryption = Nothing
, _hpIncludeIframeOnlyStream = Nothing
, _hpPlaylistWindowSeconds = Nothing
}
hpUseAudioRenditionGroup :: Lens' HlsPackage (Maybe Bool)
hpUseAudioRenditionGroup = lens _hpUseAudioRenditionGroup (\ s a -> s{_hpUseAudioRenditionGroup = a})
hpPlaylistType :: Lens' HlsPackage (Maybe PlaylistType)
hpPlaylistType = lens _hpPlaylistType (\ s a -> s{_hpPlaylistType = a})
hpSegmentDurationSeconds :: Lens' HlsPackage (Maybe Int)
hpSegmentDurationSeconds = lens _hpSegmentDurationSeconds (\ s a -> s{_hpSegmentDurationSeconds = a})
hpProgramDateTimeIntervalSeconds :: Lens' HlsPackage (Maybe Int)
hpProgramDateTimeIntervalSeconds = lens _hpProgramDateTimeIntervalSeconds (\ s a -> s{_hpProgramDateTimeIntervalSeconds = a})
hpStreamSelection :: Lens' HlsPackage (Maybe StreamSelection)
hpStreamSelection = lens _hpStreamSelection (\ s a -> s{_hpStreamSelection = a})
hpAdMarkers :: Lens' HlsPackage (Maybe AdMarkers)
hpAdMarkers = lens _hpAdMarkers (\ s a -> s{_hpAdMarkers = a})
hpEncryption :: Lens' HlsPackage (Maybe HlsEncryption)
hpEncryption = lens _hpEncryption (\ s a -> s{_hpEncryption = a})
hpIncludeIframeOnlyStream :: Lens' HlsPackage (Maybe Bool)
hpIncludeIframeOnlyStream = lens _hpIncludeIframeOnlyStream (\ s a -> s{_hpIncludeIframeOnlyStream = a})
hpPlaylistWindowSeconds :: Lens' HlsPackage (Maybe Int)
hpPlaylistWindowSeconds = lens _hpPlaylistWindowSeconds (\ s a -> s{_hpPlaylistWindowSeconds = a})
instance FromJSON HlsPackage where
parseJSON
= withObject "HlsPackage"
(\ x ->
HlsPackage' <$>
(x .:? "useAudioRenditionGroup") <*>
(x .:? "playlistType")
<*> (x .:? "segmentDurationSeconds")
<*> (x .:? "programDateTimeIntervalSeconds")
<*> (x .:? "streamSelection")
<*> (x .:? "adMarkers")
<*> (x .:? "encryption")
<*> (x .:? "includeIframeOnlyStream")
<*> (x .:? "playlistWindowSeconds"))
instance Hashable HlsPackage where
instance NFData HlsPackage where
instance ToJSON HlsPackage where
toJSON HlsPackage'{..}
= object
(catMaybes
[("useAudioRenditionGroup" .=) <$>
_hpUseAudioRenditionGroup,
("playlistType" .=) <$> _hpPlaylistType,
("segmentDurationSeconds" .=) <$>
_hpSegmentDurationSeconds,
("programDateTimeIntervalSeconds" .=) <$>
_hpProgramDateTimeIntervalSeconds,
("streamSelection" .=) <$> _hpStreamSelection,
("adMarkers" .=) <$> _hpAdMarkers,
("encryption" .=) <$> _hpEncryption,
("includeIframeOnlyStream" .=) <$>
_hpIncludeIframeOnlyStream,
("playlistWindowSeconds" .=) <$>
_hpPlaylistWindowSeconds])
data IngestEndpoint = IngestEndpoint'
{ _ieURL :: !(Maybe Text)
, _ieUsername :: !(Maybe Text)
, _iePassword :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
ingestEndpoint
:: IngestEndpoint
ingestEndpoint =
IngestEndpoint'
{_ieURL = Nothing, _ieUsername = Nothing, _iePassword = Nothing}
ieURL :: Lens' IngestEndpoint (Maybe Text)
ieURL = lens _ieURL (\ s a -> s{_ieURL = a})
ieUsername :: Lens' IngestEndpoint (Maybe Text)
ieUsername = lens _ieUsername (\ s a -> s{_ieUsername = a})
iePassword :: Lens' IngestEndpoint (Maybe Text)
iePassword = lens _iePassword (\ s a -> s{_iePassword = a})
instance FromJSON IngestEndpoint where
parseJSON
= withObject "IngestEndpoint"
(\ x ->
IngestEndpoint' <$>
(x .:? "url") <*> (x .:? "username") <*>
(x .:? "password"))
instance Hashable IngestEndpoint where
instance NFData IngestEndpoint where
newtype MssEncryption = MssEncryption'
{ _meSpekeKeyProvider :: SpekeKeyProvider
} deriving (Eq, Read, Show, Data, Typeable, Generic)
mssEncryption
:: SpekeKeyProvider
-> MssEncryption
mssEncryption pSpekeKeyProvider_ =
MssEncryption' {_meSpekeKeyProvider = pSpekeKeyProvider_}
meSpekeKeyProvider :: Lens' MssEncryption SpekeKeyProvider
meSpekeKeyProvider = lens _meSpekeKeyProvider (\ s a -> s{_meSpekeKeyProvider = a})
instance FromJSON MssEncryption where
parseJSON
= withObject "MssEncryption"
(\ x -> MssEncryption' <$> (x .: "spekeKeyProvider"))
instance Hashable MssEncryption where
instance NFData MssEncryption where
instance ToJSON MssEncryption where
toJSON MssEncryption'{..}
= object
(catMaybes
[Just ("spekeKeyProvider" .= _meSpekeKeyProvider)])
data MssPackage = MssPackage'
{ _mpSegmentDurationSeconds :: !(Maybe Int)
, _mpStreamSelection :: !(Maybe StreamSelection)
, _mpEncryption :: !(Maybe MssEncryption)
, _mpManifestWindowSeconds :: !(Maybe Int)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
mssPackage
:: MssPackage
mssPackage =
MssPackage'
{ _mpSegmentDurationSeconds = Nothing
, _mpStreamSelection = Nothing
, _mpEncryption = Nothing
, _mpManifestWindowSeconds = Nothing
}
mpSegmentDurationSeconds :: Lens' MssPackage (Maybe Int)
mpSegmentDurationSeconds = lens _mpSegmentDurationSeconds (\ s a -> s{_mpSegmentDurationSeconds = a})
mpStreamSelection :: Lens' MssPackage (Maybe StreamSelection)
mpStreamSelection = lens _mpStreamSelection (\ s a -> s{_mpStreamSelection = a})
mpEncryption :: Lens' MssPackage (Maybe MssEncryption)
mpEncryption = lens _mpEncryption (\ s a -> s{_mpEncryption = a})
mpManifestWindowSeconds :: Lens' MssPackage (Maybe Int)
mpManifestWindowSeconds = lens _mpManifestWindowSeconds (\ s a -> s{_mpManifestWindowSeconds = a})
instance FromJSON MssPackage where
parseJSON
= withObject "MssPackage"
(\ x ->
MssPackage' <$>
(x .:? "segmentDurationSeconds") <*>
(x .:? "streamSelection")
<*> (x .:? "encryption")
<*> (x .:? "manifestWindowSeconds"))
instance Hashable MssPackage where
instance NFData MssPackage where
instance ToJSON MssPackage where
toJSON MssPackage'{..}
= object
(catMaybes
[("segmentDurationSeconds" .=) <$>
_mpSegmentDurationSeconds,
("streamSelection" .=) <$> _mpStreamSelection,
("encryption" .=) <$> _mpEncryption,
("manifestWindowSeconds" .=) <$>
_mpManifestWindowSeconds])
data OriginEndpoint = OriginEndpoint'
{ _oeWhitelist :: !(Maybe [Text])
, _oeHlsPackage :: !(Maybe HlsPackage)
, _oeARN :: !(Maybe Text)
, _oeManifestName :: !(Maybe Text)
, _oeURL :: !(Maybe Text)
, _oeChannelId :: !(Maybe Text)
, _oeStartoverWindowSeconds :: !(Maybe Int)
, _oeDashPackage :: !(Maybe DashPackage)
, _oeMssPackage :: !(Maybe MssPackage)
, _oeId :: !(Maybe Text)
, _oeTimeDelaySeconds :: !(Maybe Int)
, _oeCmafPackage :: !(Maybe CmafPackage)
, _oeDescription :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
originEndpoint
:: OriginEndpoint
originEndpoint =
OriginEndpoint'
{ _oeWhitelist = Nothing
, _oeHlsPackage = Nothing
, _oeARN = Nothing
, _oeManifestName = Nothing
, _oeURL = Nothing
, _oeChannelId = Nothing
, _oeStartoverWindowSeconds = Nothing
, _oeDashPackage = Nothing
, _oeMssPackage = Nothing
, _oeId = Nothing
, _oeTimeDelaySeconds = Nothing
, _oeCmafPackage = Nothing
, _oeDescription = Nothing
}
oeWhitelist :: Lens' OriginEndpoint [Text]
oeWhitelist = lens _oeWhitelist (\ s a -> s{_oeWhitelist = a}) . _Default . _Coerce
oeHlsPackage :: Lens' OriginEndpoint (Maybe HlsPackage)
oeHlsPackage = lens _oeHlsPackage (\ s a -> s{_oeHlsPackage = a})
oeARN :: Lens' OriginEndpoint (Maybe Text)
oeARN = lens _oeARN (\ s a -> s{_oeARN = a})
oeManifestName :: Lens' OriginEndpoint (Maybe Text)
oeManifestName = lens _oeManifestName (\ s a -> s{_oeManifestName = a})
oeURL :: Lens' OriginEndpoint (Maybe Text)
oeURL = lens _oeURL (\ s a -> s{_oeURL = a})
oeChannelId :: Lens' OriginEndpoint (Maybe Text)
oeChannelId = lens _oeChannelId (\ s a -> s{_oeChannelId = a})
oeStartoverWindowSeconds :: Lens' OriginEndpoint (Maybe Int)
oeStartoverWindowSeconds = lens _oeStartoverWindowSeconds (\ s a -> s{_oeStartoverWindowSeconds = a})
oeDashPackage :: Lens' OriginEndpoint (Maybe DashPackage)
oeDashPackage = lens _oeDashPackage (\ s a -> s{_oeDashPackage = a})
oeMssPackage :: Lens' OriginEndpoint (Maybe MssPackage)
oeMssPackage = lens _oeMssPackage (\ s a -> s{_oeMssPackage = a})
oeId :: Lens' OriginEndpoint (Maybe Text)
oeId = lens _oeId (\ s a -> s{_oeId = a})
oeTimeDelaySeconds :: Lens' OriginEndpoint (Maybe Int)
oeTimeDelaySeconds = lens _oeTimeDelaySeconds (\ s a -> s{_oeTimeDelaySeconds = a})
oeCmafPackage :: Lens' OriginEndpoint (Maybe CmafPackage)
oeCmafPackage = lens _oeCmafPackage (\ s a -> s{_oeCmafPackage = a})
oeDescription :: Lens' OriginEndpoint (Maybe Text)
oeDescription = lens _oeDescription (\ s a -> s{_oeDescription = a})
instance FromJSON OriginEndpoint where
parseJSON
= withObject "OriginEndpoint"
(\ x ->
OriginEndpoint' <$>
(x .:? "whitelist" .!= mempty) <*>
(x .:? "hlsPackage")
<*> (x .:? "arn")
<*> (x .:? "manifestName")
<*> (x .:? "url")
<*> (x .:? "channelId")
<*> (x .:? "startoverWindowSeconds")
<*> (x .:? "dashPackage")
<*> (x .:? "mssPackage")
<*> (x .:? "id")
<*> (x .:? "timeDelaySeconds")
<*> (x .:? "cmafPackage")
<*> (x .:? "description"))
instance Hashable OriginEndpoint where
instance NFData OriginEndpoint where
data SpekeKeyProvider = SpekeKeyProvider'
{ _skpURL :: !Text
, _skpResourceId :: !Text
, _skpRoleARN :: !Text
, _skpSystemIds :: ![Text]
} deriving (Eq, Read, Show, Data, Typeable, Generic)
spekeKeyProvider
:: Text
-> Text
-> Text
-> SpekeKeyProvider
spekeKeyProvider pURL_ pResourceId_ pRoleARN_ =
SpekeKeyProvider'
{ _skpURL = pURL_
, _skpResourceId = pResourceId_
, _skpRoleARN = pRoleARN_
, _skpSystemIds = mempty
}
skpURL :: Lens' SpekeKeyProvider Text
skpURL = lens _skpURL (\ s a -> s{_skpURL = a})
skpResourceId :: Lens' SpekeKeyProvider Text
skpResourceId = lens _skpResourceId (\ s a -> s{_skpResourceId = a})
skpRoleARN :: Lens' SpekeKeyProvider Text
skpRoleARN = lens _skpRoleARN (\ s a -> s{_skpRoleARN = a})
skpSystemIds :: Lens' SpekeKeyProvider [Text]
skpSystemIds = lens _skpSystemIds (\ s a -> s{_skpSystemIds = a}) . _Coerce
instance FromJSON SpekeKeyProvider where
parseJSON
= withObject "SpekeKeyProvider"
(\ x ->
SpekeKeyProvider' <$>
(x .: "url") <*> (x .: "resourceId") <*>
(x .: "roleArn")
<*> (x .:? "systemIds" .!= mempty))
instance Hashable SpekeKeyProvider where
instance NFData SpekeKeyProvider where
instance ToJSON SpekeKeyProvider where
toJSON SpekeKeyProvider'{..}
= object
(catMaybes
[Just ("url" .= _skpURL),
Just ("resourceId" .= _skpResourceId),
Just ("roleArn" .= _skpRoleARN),
Just ("systemIds" .= _skpSystemIds)])
data StreamSelection = StreamSelection'
{ _ssStreamOrder :: !(Maybe StreamOrder)
, _ssMinVideoBitsPerSecond :: !(Maybe Int)
, _ssMaxVideoBitsPerSecond :: !(Maybe Int)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
streamSelection
:: StreamSelection
streamSelection =
StreamSelection'
{ _ssStreamOrder = Nothing
, _ssMinVideoBitsPerSecond = Nothing
, _ssMaxVideoBitsPerSecond = Nothing
}
ssStreamOrder :: Lens' StreamSelection (Maybe StreamOrder)
ssStreamOrder = lens _ssStreamOrder (\ s a -> s{_ssStreamOrder = a})
ssMinVideoBitsPerSecond :: Lens' StreamSelection (Maybe Int)
ssMinVideoBitsPerSecond = lens _ssMinVideoBitsPerSecond (\ s a -> s{_ssMinVideoBitsPerSecond = a})
ssMaxVideoBitsPerSecond :: Lens' StreamSelection (Maybe Int)
ssMaxVideoBitsPerSecond = lens _ssMaxVideoBitsPerSecond (\ s a -> s{_ssMaxVideoBitsPerSecond = a})
instance FromJSON StreamSelection where
parseJSON
= withObject "StreamSelection"
(\ x ->
StreamSelection' <$>
(x .:? "streamOrder") <*>
(x .:? "minVideoBitsPerSecond")
<*> (x .:? "maxVideoBitsPerSecond"))
instance Hashable StreamSelection where
instance NFData StreamSelection where
instance ToJSON StreamSelection where
toJSON StreamSelection'{..}
= object
(catMaybes
[("streamOrder" .=) <$> _ssStreamOrder,
("minVideoBitsPerSecond" .=) <$>
_ssMinVideoBitsPerSecond,
("maxVideoBitsPerSecond" .=) <$>
_ssMaxVideoBitsPerSecond])