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