{-# 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.Lens as Lens
import Amazonka.MediaLive.Types.Scte35SpliceInsert
import Amazonka.MediaLive.Types.Scte35TimeSignalApos
import qualified Amazonka.Prelude as Prelude
data AvailSettings = AvailSettings'
{ AvailSettings -> Maybe Scte35SpliceInsert
scte35SpliceInsert :: Prelude.Maybe Scte35SpliceInsert,
AvailSettings -> Maybe Scte35TimeSignalApos
scte35TimeSignalApos :: Prelude.Maybe Scte35TimeSignalApos
}
deriving (AvailSettings -> AvailSettings -> Bool
(AvailSettings -> AvailSettings -> Bool)
-> (AvailSettings -> AvailSettings -> Bool) -> Eq AvailSettings
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]
(Int -> ReadS AvailSettings)
-> ReadS [AvailSettings]
-> ReadPrec AvailSettings
-> ReadPrec [AvailSettings]
-> Read 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
(Int -> AvailSettings -> ShowS)
-> (AvailSettings -> String)
-> ([AvailSettings] -> ShowS)
-> Show AvailSettings
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. AvailSettings -> Rep AvailSettings x)
-> (forall x. Rep AvailSettings x -> AvailSettings)
-> Generic AvailSettings
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' :: Maybe Scte35SpliceInsert
-> Maybe Scte35TimeSignalApos -> AvailSettings
AvailSettings'
{ $sel:scte35SpliceInsert:AvailSettings' :: Maybe Scte35SpliceInsert
scte35SpliceInsert =
Maybe Scte35SpliceInsert
forall a. Maybe a
Prelude.Nothing,
$sel:scte35TimeSignalApos:AvailSettings' :: Maybe Scte35TimeSignalApos
scte35TimeSignalApos = Maybe Scte35TimeSignalApos
forall a. Maybe a
Prelude.Nothing
}
availSettings_scte35SpliceInsert :: Lens.Lens' AvailSettings (Prelude.Maybe Scte35SpliceInsert)
availSettings_scte35SpliceInsert :: (Maybe Scte35SpliceInsert -> f (Maybe Scte35SpliceInsert))
-> AvailSettings -> f AvailSettings
availSettings_scte35SpliceInsert = (AvailSettings -> Maybe Scte35SpliceInsert)
-> (AvailSettings -> Maybe Scte35SpliceInsert -> AvailSettings)
-> Lens
AvailSettings
AvailSettings
(Maybe Scte35SpliceInsert)
(Maybe 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 :: (Maybe Scte35TimeSignalApos -> f (Maybe Scte35TimeSignalApos))
-> AvailSettings -> f AvailSettings
availSettings_scte35TimeSignalApos = (AvailSettings -> Maybe Scte35TimeSignalApos)
-> (AvailSettings -> Maybe Scte35TimeSignalApos -> AvailSettings)
-> Lens
AvailSettings
AvailSettings
(Maybe Scte35TimeSignalApos)
(Maybe 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 Core.FromJSON AvailSettings where
parseJSON :: Value -> Parser AvailSettings
parseJSON =
String
-> (Object -> Parser AvailSettings)
-> Value
-> Parser AvailSettings
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"AvailSettings"
( \Object
x ->
Maybe Scte35SpliceInsert
-> Maybe Scte35TimeSignalApos -> AvailSettings
AvailSettings'
(Maybe Scte35SpliceInsert
-> Maybe Scte35TimeSignalApos -> AvailSettings)
-> Parser (Maybe Scte35SpliceInsert)
-> Parser (Maybe Scte35TimeSignalApos -> AvailSettings)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Scte35SpliceInsert)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"scte35SpliceInsert")
Parser (Maybe Scte35TimeSignalApos -> AvailSettings)
-> Parser (Maybe Scte35TimeSignalApos) -> Parser AvailSettings
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Scte35TimeSignalApos)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"scte35TimeSignalApos")
)
instance Prelude.Hashable AvailSettings
instance Prelude.NFData AvailSettings
instance Core.ToJSON AvailSettings where
toJSON :: AvailSettings -> Value
toJSON AvailSettings' {Maybe Scte35SpliceInsert
Maybe Scte35TimeSignalApos
scte35TimeSignalApos :: Maybe Scte35TimeSignalApos
scte35SpliceInsert :: Maybe Scte35SpliceInsert
$sel:scte35TimeSignalApos:AvailSettings' :: AvailSettings -> Maybe Scte35TimeSignalApos
$sel:scte35SpliceInsert:AvailSettings' :: AvailSettings -> Maybe Scte35SpliceInsert
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"scte35SpliceInsert" Text -> Scte35SpliceInsert -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Scte35SpliceInsert -> Pair)
-> Maybe Scte35SpliceInsert -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Scte35SpliceInsert
scte35SpliceInsert,
(Text
"scte35TimeSignalApos" Text -> Scte35TimeSignalApos -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Scte35TimeSignalApos -> Pair)
-> Maybe Scte35TimeSignalApos -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Scte35TimeSignalApos
scte35TimeSignalApos
]
)