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