{-# 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.EsamSettings where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.MediaConvert.Types.EsamManifestConfirmConditionNotification
import Amazonka.MediaConvert.Types.EsamSignalProcessingNotification
import qualified Amazonka.Prelude as Prelude
data EsamSettings = EsamSettings'
{
EsamSettings -> Maybe EsamManifestConfirmConditionNotification
manifestConfirmConditionNotification :: Prelude.Maybe EsamManifestConfirmConditionNotification,
EsamSettings -> Maybe Natural
responseSignalPreroll :: Prelude.Maybe Prelude.Natural,
EsamSettings -> Maybe EsamSignalProcessingNotification
signalProcessingNotification :: Prelude.Maybe EsamSignalProcessingNotification
}
deriving (EsamSettings -> EsamSettings -> Bool
(EsamSettings -> EsamSettings -> Bool)
-> (EsamSettings -> EsamSettings -> Bool) -> Eq EsamSettings
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: EsamSettings -> EsamSettings -> Bool
$c/= :: EsamSettings -> EsamSettings -> Bool
== :: EsamSettings -> EsamSettings -> Bool
$c== :: EsamSettings -> EsamSettings -> Bool
Prelude.Eq, ReadPrec [EsamSettings]
ReadPrec EsamSettings
Int -> ReadS EsamSettings
ReadS [EsamSettings]
(Int -> ReadS EsamSettings)
-> ReadS [EsamSettings]
-> ReadPrec EsamSettings
-> ReadPrec [EsamSettings]
-> Read EsamSettings
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [EsamSettings]
$creadListPrec :: ReadPrec [EsamSettings]
readPrec :: ReadPrec EsamSettings
$creadPrec :: ReadPrec EsamSettings
readList :: ReadS [EsamSettings]
$creadList :: ReadS [EsamSettings]
readsPrec :: Int -> ReadS EsamSettings
$creadsPrec :: Int -> ReadS EsamSettings
Prelude.Read, Int -> EsamSettings -> ShowS
[EsamSettings] -> ShowS
EsamSettings -> String
(Int -> EsamSettings -> ShowS)
-> (EsamSettings -> String)
-> ([EsamSettings] -> ShowS)
-> Show EsamSettings
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [EsamSettings] -> ShowS
$cshowList :: [EsamSettings] -> ShowS
show :: EsamSettings -> String
$cshow :: EsamSettings -> String
showsPrec :: Int -> EsamSettings -> ShowS
$cshowsPrec :: Int -> EsamSettings -> ShowS
Prelude.Show, (forall x. EsamSettings -> Rep EsamSettings x)
-> (forall x. Rep EsamSettings x -> EsamSettings)
-> Generic EsamSettings
forall x. Rep EsamSettings x -> EsamSettings
forall x. EsamSettings -> Rep EsamSettings x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep EsamSettings x -> EsamSettings
$cfrom :: forall x. EsamSettings -> Rep EsamSettings x
Prelude.Generic)
newEsamSettings ::
EsamSettings
newEsamSettings :: EsamSettings
newEsamSettings =
EsamSettings' :: Maybe EsamManifestConfirmConditionNotification
-> Maybe Natural
-> Maybe EsamSignalProcessingNotification
-> EsamSettings
EsamSettings'
{ $sel:manifestConfirmConditionNotification:EsamSettings' :: Maybe EsamManifestConfirmConditionNotification
manifestConfirmConditionNotification =
Maybe EsamManifestConfirmConditionNotification
forall a. Maybe a
Prelude.Nothing,
$sel:responseSignalPreroll:EsamSettings' :: Maybe Natural
responseSignalPreroll = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:signalProcessingNotification:EsamSettings' :: Maybe EsamSignalProcessingNotification
signalProcessingNotification = Maybe EsamSignalProcessingNotification
forall a. Maybe a
Prelude.Nothing
}
esamSettings_manifestConfirmConditionNotification :: Lens.Lens' EsamSettings (Prelude.Maybe EsamManifestConfirmConditionNotification)
esamSettings_manifestConfirmConditionNotification :: (Maybe EsamManifestConfirmConditionNotification
-> f (Maybe EsamManifestConfirmConditionNotification))
-> EsamSettings -> f EsamSettings
esamSettings_manifestConfirmConditionNotification = (EsamSettings -> Maybe EsamManifestConfirmConditionNotification)
-> (EsamSettings
-> Maybe EsamManifestConfirmConditionNotification -> EsamSettings)
-> Lens
EsamSettings
EsamSettings
(Maybe EsamManifestConfirmConditionNotification)
(Maybe EsamManifestConfirmConditionNotification)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EsamSettings' {Maybe EsamManifestConfirmConditionNotification
manifestConfirmConditionNotification :: Maybe EsamManifestConfirmConditionNotification
$sel:manifestConfirmConditionNotification:EsamSettings' :: EsamSettings -> Maybe EsamManifestConfirmConditionNotification
manifestConfirmConditionNotification} -> Maybe EsamManifestConfirmConditionNotification
manifestConfirmConditionNotification) (\s :: EsamSettings
s@EsamSettings' {} Maybe EsamManifestConfirmConditionNotification
a -> EsamSettings
s {$sel:manifestConfirmConditionNotification:EsamSettings' :: Maybe EsamManifestConfirmConditionNotification
manifestConfirmConditionNotification = Maybe EsamManifestConfirmConditionNotification
a} :: EsamSettings)
esamSettings_responseSignalPreroll :: Lens.Lens' EsamSettings (Prelude.Maybe Prelude.Natural)
esamSettings_responseSignalPreroll :: (Maybe Natural -> f (Maybe Natural))
-> EsamSettings -> f EsamSettings
esamSettings_responseSignalPreroll = (EsamSettings -> Maybe Natural)
-> (EsamSettings -> Maybe Natural -> EsamSettings)
-> Lens EsamSettings EsamSettings (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EsamSettings' {Maybe Natural
responseSignalPreroll :: Maybe Natural
$sel:responseSignalPreroll:EsamSettings' :: EsamSettings -> Maybe Natural
responseSignalPreroll} -> Maybe Natural
responseSignalPreroll) (\s :: EsamSettings
s@EsamSettings' {} Maybe Natural
a -> EsamSettings
s {$sel:responseSignalPreroll:EsamSettings' :: Maybe Natural
responseSignalPreroll = Maybe Natural
a} :: EsamSettings)
esamSettings_signalProcessingNotification :: Lens.Lens' EsamSettings (Prelude.Maybe EsamSignalProcessingNotification)
esamSettings_signalProcessingNotification :: (Maybe EsamSignalProcessingNotification
-> f (Maybe EsamSignalProcessingNotification))
-> EsamSettings -> f EsamSettings
esamSettings_signalProcessingNotification = (EsamSettings -> Maybe EsamSignalProcessingNotification)
-> (EsamSettings
-> Maybe EsamSignalProcessingNotification -> EsamSettings)
-> Lens
EsamSettings
EsamSettings
(Maybe EsamSignalProcessingNotification)
(Maybe EsamSignalProcessingNotification)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EsamSettings' {Maybe EsamSignalProcessingNotification
signalProcessingNotification :: Maybe EsamSignalProcessingNotification
$sel:signalProcessingNotification:EsamSettings' :: EsamSettings -> Maybe EsamSignalProcessingNotification
signalProcessingNotification} -> Maybe EsamSignalProcessingNotification
signalProcessingNotification) (\s :: EsamSettings
s@EsamSettings' {} Maybe EsamSignalProcessingNotification
a -> EsamSettings
s {$sel:signalProcessingNotification:EsamSettings' :: Maybe EsamSignalProcessingNotification
signalProcessingNotification = Maybe EsamSignalProcessingNotification
a} :: EsamSettings)
instance Core.FromJSON EsamSettings where
parseJSON :: Value -> Parser EsamSettings
parseJSON =
String
-> (Object -> Parser EsamSettings) -> Value -> Parser EsamSettings
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"EsamSettings"
( \Object
x ->
Maybe EsamManifestConfirmConditionNotification
-> Maybe Natural
-> Maybe EsamSignalProcessingNotification
-> EsamSettings
EsamSettings'
(Maybe EsamManifestConfirmConditionNotification
-> Maybe Natural
-> Maybe EsamSignalProcessingNotification
-> EsamSettings)
-> Parser (Maybe EsamManifestConfirmConditionNotification)
-> Parser
(Maybe Natural
-> Maybe EsamSignalProcessingNotification -> EsamSettings)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object
-> Text -> Parser (Maybe EsamManifestConfirmConditionNotification)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"manifestConfirmConditionNotification")
Parser
(Maybe Natural
-> Maybe EsamSignalProcessingNotification -> EsamSettings)
-> Parser (Maybe Natural)
-> Parser (Maybe EsamSignalProcessingNotification -> EsamSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"responseSignalPreroll")
Parser (Maybe EsamSignalProcessingNotification -> EsamSettings)
-> Parser (Maybe EsamSignalProcessingNotification)
-> Parser EsamSettings
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe EsamSignalProcessingNotification)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"signalProcessingNotification")
)
instance Prelude.Hashable EsamSettings
instance Prelude.NFData EsamSettings
instance Core.ToJSON EsamSettings where
toJSON :: EsamSettings -> Value
toJSON EsamSettings' {Maybe Natural
Maybe EsamManifestConfirmConditionNotification
Maybe EsamSignalProcessingNotification
signalProcessingNotification :: Maybe EsamSignalProcessingNotification
responseSignalPreroll :: Maybe Natural
manifestConfirmConditionNotification :: Maybe EsamManifestConfirmConditionNotification
$sel:signalProcessingNotification:EsamSettings' :: EsamSettings -> Maybe EsamSignalProcessingNotification
$sel:responseSignalPreroll:EsamSettings' :: EsamSettings -> Maybe Natural
$sel:manifestConfirmConditionNotification:EsamSettings' :: EsamSettings -> Maybe EsamManifestConfirmConditionNotification
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"manifestConfirmConditionNotification" Text -> EsamManifestConfirmConditionNotification -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(EsamManifestConfirmConditionNotification -> Pair)
-> Maybe EsamManifestConfirmConditionNotification -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe EsamManifestConfirmConditionNotification
manifestConfirmConditionNotification,
(Text
"responseSignalPreroll" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
responseSignalPreroll,
(Text
"signalProcessingNotification" Text -> EsamSignalProcessingNotification -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(EsamSignalProcessingNotification -> Pair)
-> Maybe EsamSignalProcessingNotification -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe EsamSignalProcessingNotification
signalProcessingNotification
]
)