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