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