{-# 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.DashIsoEncryptionSettings where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.MediaConvert.Types.DashIsoPlaybackDeviceCompatibility
import Amazonka.MediaConvert.Types.SpekeKeyProvider
import qualified Amazonka.Prelude as Prelude
data DashIsoEncryptionSettings = DashIsoEncryptionSettings'
{
DashIsoEncryptionSettings
-> Maybe DashIsoPlaybackDeviceCompatibility
playbackDeviceCompatibility :: Prelude.Maybe DashIsoPlaybackDeviceCompatibility,
DashIsoEncryptionSettings -> Maybe SpekeKeyProvider
spekeKeyProvider :: Prelude.Maybe SpekeKeyProvider
}
deriving (DashIsoEncryptionSettings -> DashIsoEncryptionSettings -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DashIsoEncryptionSettings -> DashIsoEncryptionSettings -> Bool
$c/= :: DashIsoEncryptionSettings -> DashIsoEncryptionSettings -> Bool
== :: DashIsoEncryptionSettings -> DashIsoEncryptionSettings -> Bool
$c== :: DashIsoEncryptionSettings -> DashIsoEncryptionSettings -> Bool
Prelude.Eq, ReadPrec [DashIsoEncryptionSettings]
ReadPrec DashIsoEncryptionSettings
Int -> ReadS DashIsoEncryptionSettings
ReadS [DashIsoEncryptionSettings]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DashIsoEncryptionSettings]
$creadListPrec :: ReadPrec [DashIsoEncryptionSettings]
readPrec :: ReadPrec DashIsoEncryptionSettings
$creadPrec :: ReadPrec DashIsoEncryptionSettings
readList :: ReadS [DashIsoEncryptionSettings]
$creadList :: ReadS [DashIsoEncryptionSettings]
readsPrec :: Int -> ReadS DashIsoEncryptionSettings
$creadsPrec :: Int -> ReadS DashIsoEncryptionSettings
Prelude.Read, Int -> DashIsoEncryptionSettings -> ShowS
[DashIsoEncryptionSettings] -> ShowS
DashIsoEncryptionSettings -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DashIsoEncryptionSettings] -> ShowS
$cshowList :: [DashIsoEncryptionSettings] -> ShowS
show :: DashIsoEncryptionSettings -> String
$cshow :: DashIsoEncryptionSettings -> String
showsPrec :: Int -> DashIsoEncryptionSettings -> ShowS
$cshowsPrec :: Int -> DashIsoEncryptionSettings -> ShowS
Prelude.Show, forall x.
Rep DashIsoEncryptionSettings x -> DashIsoEncryptionSettings
forall x.
DashIsoEncryptionSettings -> Rep DashIsoEncryptionSettings x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DashIsoEncryptionSettings x -> DashIsoEncryptionSettings
$cfrom :: forall x.
DashIsoEncryptionSettings -> Rep DashIsoEncryptionSettings x
Prelude.Generic)
newDashIsoEncryptionSettings ::
DashIsoEncryptionSettings
newDashIsoEncryptionSettings :: DashIsoEncryptionSettings
newDashIsoEncryptionSettings =
DashIsoEncryptionSettings'
{ $sel:playbackDeviceCompatibility:DashIsoEncryptionSettings' :: Maybe DashIsoPlaybackDeviceCompatibility
playbackDeviceCompatibility =
forall a. Maybe a
Prelude.Nothing,
$sel:spekeKeyProvider:DashIsoEncryptionSettings' :: Maybe SpekeKeyProvider
spekeKeyProvider = forall a. Maybe a
Prelude.Nothing
}
dashIsoEncryptionSettings_playbackDeviceCompatibility :: Lens.Lens' DashIsoEncryptionSettings (Prelude.Maybe DashIsoPlaybackDeviceCompatibility)
dashIsoEncryptionSettings_playbackDeviceCompatibility :: Lens'
DashIsoEncryptionSettings
(Maybe DashIsoPlaybackDeviceCompatibility)
dashIsoEncryptionSettings_playbackDeviceCompatibility = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DashIsoEncryptionSettings' {Maybe DashIsoPlaybackDeviceCompatibility
playbackDeviceCompatibility :: Maybe DashIsoPlaybackDeviceCompatibility
$sel:playbackDeviceCompatibility:DashIsoEncryptionSettings' :: DashIsoEncryptionSettings
-> Maybe DashIsoPlaybackDeviceCompatibility
playbackDeviceCompatibility} -> Maybe DashIsoPlaybackDeviceCompatibility
playbackDeviceCompatibility) (\s :: DashIsoEncryptionSettings
s@DashIsoEncryptionSettings' {} Maybe DashIsoPlaybackDeviceCompatibility
a -> DashIsoEncryptionSettings
s {$sel:playbackDeviceCompatibility:DashIsoEncryptionSettings' :: Maybe DashIsoPlaybackDeviceCompatibility
playbackDeviceCompatibility = Maybe DashIsoPlaybackDeviceCompatibility
a} :: DashIsoEncryptionSettings)
dashIsoEncryptionSettings_spekeKeyProvider :: Lens.Lens' DashIsoEncryptionSettings (Prelude.Maybe SpekeKeyProvider)
dashIsoEncryptionSettings_spekeKeyProvider :: Lens' DashIsoEncryptionSettings (Maybe SpekeKeyProvider)
dashIsoEncryptionSettings_spekeKeyProvider = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DashIsoEncryptionSettings' {Maybe SpekeKeyProvider
spekeKeyProvider :: Maybe SpekeKeyProvider
$sel:spekeKeyProvider:DashIsoEncryptionSettings' :: DashIsoEncryptionSettings -> Maybe SpekeKeyProvider
spekeKeyProvider} -> Maybe SpekeKeyProvider
spekeKeyProvider) (\s :: DashIsoEncryptionSettings
s@DashIsoEncryptionSettings' {} Maybe SpekeKeyProvider
a -> DashIsoEncryptionSettings
s {$sel:spekeKeyProvider:DashIsoEncryptionSettings' :: Maybe SpekeKeyProvider
spekeKeyProvider = Maybe SpekeKeyProvider
a} :: DashIsoEncryptionSettings)
instance Data.FromJSON DashIsoEncryptionSettings where
parseJSON :: Value -> Parser DashIsoEncryptionSettings
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"DashIsoEncryptionSettings"
( \Object
x ->
Maybe DashIsoPlaybackDeviceCompatibility
-> Maybe SpekeKeyProvider -> DashIsoEncryptionSettings
DashIsoEncryptionSettings'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"playbackDeviceCompatibility")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"spekeKeyProvider")
)
instance Prelude.Hashable DashIsoEncryptionSettings where
hashWithSalt :: Int -> DashIsoEncryptionSettings -> Int
hashWithSalt Int
_salt DashIsoEncryptionSettings' {Maybe DashIsoPlaybackDeviceCompatibility
Maybe SpekeKeyProvider
spekeKeyProvider :: Maybe SpekeKeyProvider
playbackDeviceCompatibility :: Maybe DashIsoPlaybackDeviceCompatibility
$sel:spekeKeyProvider:DashIsoEncryptionSettings' :: DashIsoEncryptionSettings -> Maybe SpekeKeyProvider
$sel:playbackDeviceCompatibility:DashIsoEncryptionSettings' :: DashIsoEncryptionSettings
-> Maybe DashIsoPlaybackDeviceCompatibility
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe DashIsoPlaybackDeviceCompatibility
playbackDeviceCompatibility
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe SpekeKeyProvider
spekeKeyProvider
instance Prelude.NFData DashIsoEncryptionSettings where
rnf :: DashIsoEncryptionSettings -> ()
rnf DashIsoEncryptionSettings' {Maybe DashIsoPlaybackDeviceCompatibility
Maybe SpekeKeyProvider
spekeKeyProvider :: Maybe SpekeKeyProvider
playbackDeviceCompatibility :: Maybe DashIsoPlaybackDeviceCompatibility
$sel:spekeKeyProvider:DashIsoEncryptionSettings' :: DashIsoEncryptionSettings -> Maybe SpekeKeyProvider
$sel:playbackDeviceCompatibility:DashIsoEncryptionSettings' :: DashIsoEncryptionSettings
-> Maybe DashIsoPlaybackDeviceCompatibility
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe DashIsoPlaybackDeviceCompatibility
playbackDeviceCompatibility
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe SpekeKeyProvider
spekeKeyProvider
instance Data.ToJSON DashIsoEncryptionSettings where
toJSON :: DashIsoEncryptionSettings -> Value
toJSON DashIsoEncryptionSettings' {Maybe DashIsoPlaybackDeviceCompatibility
Maybe SpekeKeyProvider
spekeKeyProvider :: Maybe SpekeKeyProvider
playbackDeviceCompatibility :: Maybe DashIsoPlaybackDeviceCompatibility
$sel:spekeKeyProvider:DashIsoEncryptionSettings' :: DashIsoEncryptionSettings -> Maybe SpekeKeyProvider
$sel:playbackDeviceCompatibility:DashIsoEncryptionSettings' :: DashIsoEncryptionSettings
-> Maybe DashIsoPlaybackDeviceCompatibility
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"playbackDeviceCompatibility" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe DashIsoPlaybackDeviceCompatibility
playbackDeviceCompatibility,
(Key
"spekeKeyProvider" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe SpekeKeyProvider
spekeKeyProvider
]
)