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