{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.MediaConvert.Types.HlsEncryptionSettings where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.MediaConvert.Types.HlsEncryptionType
import Amazonka.MediaConvert.Types.HlsInitializationVectorInManifest
import Amazonka.MediaConvert.Types.HlsKeyProviderType
import Amazonka.MediaConvert.Types.HlsOfflineEncrypted
import Amazonka.MediaConvert.Types.SpekeKeyProvider
import Amazonka.MediaConvert.Types.StaticKeyProvider
import qualified Amazonka.Prelude as Prelude
data HlsEncryptionSettings = HlsEncryptionSettings'
{
HlsEncryptionSettings -> Maybe HlsOfflineEncrypted
offlineEncrypted :: Prelude.Maybe HlsOfflineEncrypted,
HlsEncryptionSettings -> Maybe HlsEncryptionType
encryptionMethod :: Prelude.Maybe HlsEncryptionType,
HlsEncryptionSettings -> Maybe Text
constantInitializationVector :: Prelude.Maybe Prelude.Text,
HlsEncryptionSettings -> Maybe HlsKeyProviderType
type' :: Prelude.Maybe HlsKeyProviderType,
HlsEncryptionSettings -> Maybe StaticKeyProvider
staticKeyProvider :: Prelude.Maybe StaticKeyProvider,
HlsEncryptionSettings -> Maybe SpekeKeyProvider
spekeKeyProvider :: Prelude.Maybe SpekeKeyProvider,
HlsEncryptionSettings -> Maybe HlsInitializationVectorInManifest
initializationVectorInManifest :: Prelude.Maybe HlsInitializationVectorInManifest
}
deriving (HlsEncryptionSettings -> HlsEncryptionSettings -> Bool
(HlsEncryptionSettings -> HlsEncryptionSettings -> Bool)
-> (HlsEncryptionSettings -> HlsEncryptionSettings -> Bool)
-> Eq HlsEncryptionSettings
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: HlsEncryptionSettings -> HlsEncryptionSettings -> Bool
$c/= :: HlsEncryptionSettings -> HlsEncryptionSettings -> Bool
== :: HlsEncryptionSettings -> HlsEncryptionSettings -> Bool
$c== :: HlsEncryptionSettings -> HlsEncryptionSettings -> Bool
Prelude.Eq, ReadPrec [HlsEncryptionSettings]
ReadPrec HlsEncryptionSettings
Int -> ReadS HlsEncryptionSettings
ReadS [HlsEncryptionSettings]
(Int -> ReadS HlsEncryptionSettings)
-> ReadS [HlsEncryptionSettings]
-> ReadPrec HlsEncryptionSettings
-> ReadPrec [HlsEncryptionSettings]
-> Read HlsEncryptionSettings
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [HlsEncryptionSettings]
$creadListPrec :: ReadPrec [HlsEncryptionSettings]
readPrec :: ReadPrec HlsEncryptionSettings
$creadPrec :: ReadPrec HlsEncryptionSettings
readList :: ReadS [HlsEncryptionSettings]
$creadList :: ReadS [HlsEncryptionSettings]
readsPrec :: Int -> ReadS HlsEncryptionSettings
$creadsPrec :: Int -> ReadS HlsEncryptionSettings
Prelude.Read, Int -> HlsEncryptionSettings -> ShowS
[HlsEncryptionSettings] -> ShowS
HlsEncryptionSettings -> String
(Int -> HlsEncryptionSettings -> ShowS)
-> (HlsEncryptionSettings -> String)
-> ([HlsEncryptionSettings] -> ShowS)
-> Show HlsEncryptionSettings
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [HlsEncryptionSettings] -> ShowS
$cshowList :: [HlsEncryptionSettings] -> ShowS
show :: HlsEncryptionSettings -> String
$cshow :: HlsEncryptionSettings -> String
showsPrec :: Int -> HlsEncryptionSettings -> ShowS
$cshowsPrec :: Int -> HlsEncryptionSettings -> ShowS
Prelude.Show, (forall x. HlsEncryptionSettings -> Rep HlsEncryptionSettings x)
-> (forall x. Rep HlsEncryptionSettings x -> HlsEncryptionSettings)
-> Generic HlsEncryptionSettings
forall x. Rep HlsEncryptionSettings x -> HlsEncryptionSettings
forall x. HlsEncryptionSettings -> Rep HlsEncryptionSettings x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep HlsEncryptionSettings x -> HlsEncryptionSettings
$cfrom :: forall x. HlsEncryptionSettings -> Rep HlsEncryptionSettings x
Prelude.Generic)
newHlsEncryptionSettings ::
HlsEncryptionSettings
newHlsEncryptionSettings :: HlsEncryptionSettings
newHlsEncryptionSettings =
HlsEncryptionSettings' :: Maybe HlsOfflineEncrypted
-> Maybe HlsEncryptionType
-> Maybe Text
-> Maybe HlsKeyProviderType
-> Maybe StaticKeyProvider
-> Maybe SpekeKeyProvider
-> Maybe HlsInitializationVectorInManifest
-> HlsEncryptionSettings
HlsEncryptionSettings'
{ $sel:offlineEncrypted:HlsEncryptionSettings' :: Maybe HlsOfflineEncrypted
offlineEncrypted =
Maybe HlsOfflineEncrypted
forall a. Maybe a
Prelude.Nothing,
$sel:encryptionMethod:HlsEncryptionSettings' :: Maybe HlsEncryptionType
encryptionMethod = Maybe HlsEncryptionType
forall a. Maybe a
Prelude.Nothing,
$sel:constantInitializationVector:HlsEncryptionSettings' :: Maybe Text
constantInitializationVector = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:type':HlsEncryptionSettings' :: Maybe HlsKeyProviderType
type' = Maybe HlsKeyProviderType
forall a. Maybe a
Prelude.Nothing,
$sel:staticKeyProvider:HlsEncryptionSettings' :: Maybe StaticKeyProvider
staticKeyProvider = Maybe StaticKeyProvider
forall a. Maybe a
Prelude.Nothing,
$sel:spekeKeyProvider:HlsEncryptionSettings' :: Maybe SpekeKeyProvider
spekeKeyProvider = Maybe SpekeKeyProvider
forall a. Maybe a
Prelude.Nothing,
$sel:initializationVectorInManifest:HlsEncryptionSettings' :: Maybe HlsInitializationVectorInManifest
initializationVectorInManifest = Maybe HlsInitializationVectorInManifest
forall a. Maybe a
Prelude.Nothing
}
hlsEncryptionSettings_offlineEncrypted :: Lens.Lens' HlsEncryptionSettings (Prelude.Maybe HlsOfflineEncrypted)
hlsEncryptionSettings_offlineEncrypted :: (Maybe HlsOfflineEncrypted -> f (Maybe HlsOfflineEncrypted))
-> HlsEncryptionSettings -> f HlsEncryptionSettings
hlsEncryptionSettings_offlineEncrypted = (HlsEncryptionSettings -> Maybe HlsOfflineEncrypted)
-> (HlsEncryptionSettings
-> Maybe HlsOfflineEncrypted -> HlsEncryptionSettings)
-> Lens
HlsEncryptionSettings
HlsEncryptionSettings
(Maybe HlsOfflineEncrypted)
(Maybe HlsOfflineEncrypted)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HlsEncryptionSettings' {Maybe HlsOfflineEncrypted
offlineEncrypted :: Maybe HlsOfflineEncrypted
$sel:offlineEncrypted:HlsEncryptionSettings' :: HlsEncryptionSettings -> Maybe HlsOfflineEncrypted
offlineEncrypted} -> Maybe HlsOfflineEncrypted
offlineEncrypted) (\s :: HlsEncryptionSettings
s@HlsEncryptionSettings' {} Maybe HlsOfflineEncrypted
a -> HlsEncryptionSettings
s {$sel:offlineEncrypted:HlsEncryptionSettings' :: Maybe HlsOfflineEncrypted
offlineEncrypted = Maybe HlsOfflineEncrypted
a} :: HlsEncryptionSettings)
hlsEncryptionSettings_encryptionMethod :: Lens.Lens' HlsEncryptionSettings (Prelude.Maybe HlsEncryptionType)
hlsEncryptionSettings_encryptionMethod :: (Maybe HlsEncryptionType -> f (Maybe HlsEncryptionType))
-> HlsEncryptionSettings -> f HlsEncryptionSettings
hlsEncryptionSettings_encryptionMethod = (HlsEncryptionSettings -> Maybe HlsEncryptionType)
-> (HlsEncryptionSettings
-> Maybe HlsEncryptionType -> HlsEncryptionSettings)
-> Lens
HlsEncryptionSettings
HlsEncryptionSettings
(Maybe HlsEncryptionType)
(Maybe HlsEncryptionType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HlsEncryptionSettings' {Maybe HlsEncryptionType
encryptionMethod :: Maybe HlsEncryptionType
$sel:encryptionMethod:HlsEncryptionSettings' :: HlsEncryptionSettings -> Maybe HlsEncryptionType
encryptionMethod} -> Maybe HlsEncryptionType
encryptionMethod) (\s :: HlsEncryptionSettings
s@HlsEncryptionSettings' {} Maybe HlsEncryptionType
a -> HlsEncryptionSettings
s {$sel:encryptionMethod:HlsEncryptionSettings' :: Maybe HlsEncryptionType
encryptionMethod = Maybe HlsEncryptionType
a} :: HlsEncryptionSettings)
hlsEncryptionSettings_constantInitializationVector :: Lens.Lens' HlsEncryptionSettings (Prelude.Maybe Prelude.Text)
hlsEncryptionSettings_constantInitializationVector :: (Maybe Text -> f (Maybe Text))
-> HlsEncryptionSettings -> f HlsEncryptionSettings
hlsEncryptionSettings_constantInitializationVector = (HlsEncryptionSettings -> Maybe Text)
-> (HlsEncryptionSettings -> Maybe Text -> HlsEncryptionSettings)
-> Lens
HlsEncryptionSettings
HlsEncryptionSettings
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HlsEncryptionSettings' {Maybe Text
constantInitializationVector :: Maybe Text
$sel:constantInitializationVector:HlsEncryptionSettings' :: HlsEncryptionSettings -> Maybe Text
constantInitializationVector} -> Maybe Text
constantInitializationVector) (\s :: HlsEncryptionSettings
s@HlsEncryptionSettings' {} Maybe Text
a -> HlsEncryptionSettings
s {$sel:constantInitializationVector:HlsEncryptionSettings' :: Maybe Text
constantInitializationVector = Maybe Text
a} :: HlsEncryptionSettings)
hlsEncryptionSettings_type :: Lens.Lens' HlsEncryptionSettings (Prelude.Maybe HlsKeyProviderType)
hlsEncryptionSettings_type :: (Maybe HlsKeyProviderType -> f (Maybe HlsKeyProviderType))
-> HlsEncryptionSettings -> f HlsEncryptionSettings
hlsEncryptionSettings_type = (HlsEncryptionSettings -> Maybe HlsKeyProviderType)
-> (HlsEncryptionSettings
-> Maybe HlsKeyProviderType -> HlsEncryptionSettings)
-> Lens
HlsEncryptionSettings
HlsEncryptionSettings
(Maybe HlsKeyProviderType)
(Maybe HlsKeyProviderType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HlsEncryptionSettings' {Maybe HlsKeyProviderType
type' :: Maybe HlsKeyProviderType
$sel:type':HlsEncryptionSettings' :: HlsEncryptionSettings -> Maybe HlsKeyProviderType
type'} -> Maybe HlsKeyProviderType
type') (\s :: HlsEncryptionSettings
s@HlsEncryptionSettings' {} Maybe HlsKeyProviderType
a -> HlsEncryptionSettings
s {$sel:type':HlsEncryptionSettings' :: Maybe HlsKeyProviderType
type' = Maybe HlsKeyProviderType
a} :: HlsEncryptionSettings)
hlsEncryptionSettings_staticKeyProvider :: Lens.Lens' HlsEncryptionSettings (Prelude.Maybe StaticKeyProvider)
hlsEncryptionSettings_staticKeyProvider :: (Maybe StaticKeyProvider -> f (Maybe StaticKeyProvider))
-> HlsEncryptionSettings -> f HlsEncryptionSettings
hlsEncryptionSettings_staticKeyProvider = (HlsEncryptionSettings -> Maybe StaticKeyProvider)
-> (HlsEncryptionSettings
-> Maybe StaticKeyProvider -> HlsEncryptionSettings)
-> Lens
HlsEncryptionSettings
HlsEncryptionSettings
(Maybe StaticKeyProvider)
(Maybe StaticKeyProvider)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HlsEncryptionSettings' {Maybe StaticKeyProvider
staticKeyProvider :: Maybe StaticKeyProvider
$sel:staticKeyProvider:HlsEncryptionSettings' :: HlsEncryptionSettings -> Maybe StaticKeyProvider
staticKeyProvider} -> Maybe StaticKeyProvider
staticKeyProvider) (\s :: HlsEncryptionSettings
s@HlsEncryptionSettings' {} Maybe StaticKeyProvider
a -> HlsEncryptionSettings
s {$sel:staticKeyProvider:HlsEncryptionSettings' :: Maybe StaticKeyProvider
staticKeyProvider = Maybe StaticKeyProvider
a} :: HlsEncryptionSettings)
hlsEncryptionSettings_spekeKeyProvider :: Lens.Lens' HlsEncryptionSettings (Prelude.Maybe SpekeKeyProvider)
hlsEncryptionSettings_spekeKeyProvider :: (Maybe SpekeKeyProvider -> f (Maybe SpekeKeyProvider))
-> HlsEncryptionSettings -> f HlsEncryptionSettings
hlsEncryptionSettings_spekeKeyProvider = (HlsEncryptionSettings -> Maybe SpekeKeyProvider)
-> (HlsEncryptionSettings
-> Maybe SpekeKeyProvider -> HlsEncryptionSettings)
-> Lens
HlsEncryptionSettings
HlsEncryptionSettings
(Maybe SpekeKeyProvider)
(Maybe SpekeKeyProvider)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HlsEncryptionSettings' {Maybe SpekeKeyProvider
spekeKeyProvider :: Maybe SpekeKeyProvider
$sel:spekeKeyProvider:HlsEncryptionSettings' :: HlsEncryptionSettings -> Maybe SpekeKeyProvider
spekeKeyProvider} -> Maybe SpekeKeyProvider
spekeKeyProvider) (\s :: HlsEncryptionSettings
s@HlsEncryptionSettings' {} Maybe SpekeKeyProvider
a -> HlsEncryptionSettings
s {$sel:spekeKeyProvider:HlsEncryptionSettings' :: Maybe SpekeKeyProvider
spekeKeyProvider = Maybe SpekeKeyProvider
a} :: HlsEncryptionSettings)
hlsEncryptionSettings_initializationVectorInManifest :: Lens.Lens' HlsEncryptionSettings (Prelude.Maybe HlsInitializationVectorInManifest)
hlsEncryptionSettings_initializationVectorInManifest :: (Maybe HlsInitializationVectorInManifest
-> f (Maybe HlsInitializationVectorInManifest))
-> HlsEncryptionSettings -> f HlsEncryptionSettings
hlsEncryptionSettings_initializationVectorInManifest = (HlsEncryptionSettings -> Maybe HlsInitializationVectorInManifest)
-> (HlsEncryptionSettings
-> Maybe HlsInitializationVectorInManifest
-> HlsEncryptionSettings)
-> Lens
HlsEncryptionSettings
HlsEncryptionSettings
(Maybe HlsInitializationVectorInManifest)
(Maybe HlsInitializationVectorInManifest)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HlsEncryptionSettings' {Maybe HlsInitializationVectorInManifest
initializationVectorInManifest :: Maybe HlsInitializationVectorInManifest
$sel:initializationVectorInManifest:HlsEncryptionSettings' :: HlsEncryptionSettings -> Maybe HlsInitializationVectorInManifest
initializationVectorInManifest} -> Maybe HlsInitializationVectorInManifest
initializationVectorInManifest) (\s :: HlsEncryptionSettings
s@HlsEncryptionSettings' {} Maybe HlsInitializationVectorInManifest
a -> HlsEncryptionSettings
s {$sel:initializationVectorInManifest:HlsEncryptionSettings' :: Maybe HlsInitializationVectorInManifest
initializationVectorInManifest = Maybe HlsInitializationVectorInManifest
a} :: HlsEncryptionSettings)
instance Core.FromJSON HlsEncryptionSettings where
parseJSON :: Value -> Parser HlsEncryptionSettings
parseJSON =
String
-> (Object -> Parser HlsEncryptionSettings)
-> Value
-> Parser HlsEncryptionSettings
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"HlsEncryptionSettings"
( \Object
x ->
Maybe HlsOfflineEncrypted
-> Maybe HlsEncryptionType
-> Maybe Text
-> Maybe HlsKeyProviderType
-> Maybe StaticKeyProvider
-> Maybe SpekeKeyProvider
-> Maybe HlsInitializationVectorInManifest
-> HlsEncryptionSettings
HlsEncryptionSettings'
(Maybe HlsOfflineEncrypted
-> Maybe HlsEncryptionType
-> Maybe Text
-> Maybe HlsKeyProviderType
-> Maybe StaticKeyProvider
-> Maybe SpekeKeyProvider
-> Maybe HlsInitializationVectorInManifest
-> HlsEncryptionSettings)
-> Parser (Maybe HlsOfflineEncrypted)
-> Parser
(Maybe HlsEncryptionType
-> Maybe Text
-> Maybe HlsKeyProviderType
-> Maybe StaticKeyProvider
-> Maybe SpekeKeyProvider
-> Maybe HlsInitializationVectorInManifest
-> HlsEncryptionSettings)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe HlsOfflineEncrypted)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"offlineEncrypted")
Parser
(Maybe HlsEncryptionType
-> Maybe Text
-> Maybe HlsKeyProviderType
-> Maybe StaticKeyProvider
-> Maybe SpekeKeyProvider
-> Maybe HlsInitializationVectorInManifest
-> HlsEncryptionSettings)
-> Parser (Maybe HlsEncryptionType)
-> Parser
(Maybe Text
-> Maybe HlsKeyProviderType
-> Maybe StaticKeyProvider
-> Maybe SpekeKeyProvider
-> Maybe HlsInitializationVectorInManifest
-> HlsEncryptionSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe HlsEncryptionType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"encryptionMethod")
Parser
(Maybe Text
-> Maybe HlsKeyProviderType
-> Maybe StaticKeyProvider
-> Maybe SpekeKeyProvider
-> Maybe HlsInitializationVectorInManifest
-> HlsEncryptionSettings)
-> Parser (Maybe Text)
-> Parser
(Maybe HlsKeyProviderType
-> Maybe StaticKeyProvider
-> Maybe SpekeKeyProvider
-> Maybe HlsInitializationVectorInManifest
-> HlsEncryptionSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"constantInitializationVector")
Parser
(Maybe HlsKeyProviderType
-> Maybe StaticKeyProvider
-> Maybe SpekeKeyProvider
-> Maybe HlsInitializationVectorInManifest
-> HlsEncryptionSettings)
-> Parser (Maybe HlsKeyProviderType)
-> Parser
(Maybe StaticKeyProvider
-> Maybe SpekeKeyProvider
-> Maybe HlsInitializationVectorInManifest
-> HlsEncryptionSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe HlsKeyProviderType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"type")
Parser
(Maybe StaticKeyProvider
-> Maybe SpekeKeyProvider
-> Maybe HlsInitializationVectorInManifest
-> HlsEncryptionSettings)
-> Parser (Maybe StaticKeyProvider)
-> Parser
(Maybe SpekeKeyProvider
-> Maybe HlsInitializationVectorInManifest
-> HlsEncryptionSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe StaticKeyProvider)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"staticKeyProvider")
Parser
(Maybe SpekeKeyProvider
-> Maybe HlsInitializationVectorInManifest
-> HlsEncryptionSettings)
-> Parser (Maybe SpekeKeyProvider)
-> Parser
(Maybe HlsInitializationVectorInManifest -> HlsEncryptionSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe SpekeKeyProvider)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"spekeKeyProvider")
Parser
(Maybe HlsInitializationVectorInManifest -> HlsEncryptionSettings)
-> Parser (Maybe HlsInitializationVectorInManifest)
-> Parser HlsEncryptionSettings
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe HlsInitializationVectorInManifest)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"initializationVectorInManifest")
)
instance Prelude.Hashable HlsEncryptionSettings
instance Prelude.NFData HlsEncryptionSettings
instance Core.ToJSON HlsEncryptionSettings where
toJSON :: HlsEncryptionSettings -> Value
toJSON HlsEncryptionSettings' {Maybe Text
Maybe HlsEncryptionType
Maybe HlsInitializationVectorInManifest
Maybe HlsKeyProviderType
Maybe HlsOfflineEncrypted
Maybe SpekeKeyProvider
Maybe StaticKeyProvider
initializationVectorInManifest :: Maybe HlsInitializationVectorInManifest
spekeKeyProvider :: Maybe SpekeKeyProvider
staticKeyProvider :: Maybe StaticKeyProvider
type' :: Maybe HlsKeyProviderType
constantInitializationVector :: Maybe Text
encryptionMethod :: Maybe HlsEncryptionType
offlineEncrypted :: Maybe HlsOfflineEncrypted
$sel:initializationVectorInManifest:HlsEncryptionSettings' :: HlsEncryptionSettings -> Maybe HlsInitializationVectorInManifest
$sel:spekeKeyProvider:HlsEncryptionSettings' :: HlsEncryptionSettings -> Maybe SpekeKeyProvider
$sel:staticKeyProvider:HlsEncryptionSettings' :: HlsEncryptionSettings -> Maybe StaticKeyProvider
$sel:type':HlsEncryptionSettings' :: HlsEncryptionSettings -> Maybe HlsKeyProviderType
$sel:constantInitializationVector:HlsEncryptionSettings' :: HlsEncryptionSettings -> Maybe Text
$sel:encryptionMethod:HlsEncryptionSettings' :: HlsEncryptionSettings -> Maybe HlsEncryptionType
$sel:offlineEncrypted:HlsEncryptionSettings' :: HlsEncryptionSettings -> Maybe HlsOfflineEncrypted
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"offlineEncrypted" Text -> HlsOfflineEncrypted -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(HlsOfflineEncrypted -> Pair)
-> Maybe HlsOfflineEncrypted -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe HlsOfflineEncrypted
offlineEncrypted,
(Text
"encryptionMethod" Text -> HlsEncryptionType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(HlsEncryptionType -> Pair)
-> Maybe HlsEncryptionType -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe HlsEncryptionType
encryptionMethod,
(Text
"constantInitializationVector" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
constantInitializationVector,
(Text
"type" Text -> HlsKeyProviderType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (HlsKeyProviderType -> Pair)
-> Maybe HlsKeyProviderType -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe HlsKeyProviderType
type',
(Text
"staticKeyProvider" Text -> StaticKeyProvider -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(StaticKeyProvider -> Pair)
-> Maybe StaticKeyProvider -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe StaticKeyProvider
staticKeyProvider,
(Text
"spekeKeyProvider" Text -> SpekeKeyProvider -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(SpekeKeyProvider -> Pair) -> Maybe SpekeKeyProvider -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe SpekeKeyProvider
spekeKeyProvider,
(Text
"initializationVectorInManifest" Text -> HlsInitializationVectorInManifest -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(HlsInitializationVectorInManifest -> Pair)
-> Maybe HlsInitializationVectorInManifest -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe HlsInitializationVectorInManifest
initializationVectorInManifest
]
)