{-# 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.Lens as Lens
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
(StopTimecode -> StopTimecode -> Bool)
-> (StopTimecode -> StopTimecode -> Bool) -> Eq StopTimecode
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]
(Int -> ReadS StopTimecode)
-> ReadS [StopTimecode]
-> ReadPrec StopTimecode
-> ReadPrec [StopTimecode]
-> Read 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
(Int -> StopTimecode -> ShowS)
-> (StopTimecode -> String)
-> ([StopTimecode] -> ShowS)
-> Show StopTimecode
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. StopTimecode -> Rep StopTimecode x)
-> (forall x. Rep StopTimecode x -> StopTimecode)
-> Generic StopTimecode
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' :: Maybe LastFrameClippingBehavior -> Maybe Text -> StopTimecode
StopTimecode'
{ $sel:lastFrameClippingBehavior:StopTimecode' :: Maybe LastFrameClippingBehavior
lastFrameClippingBehavior =
Maybe LastFrameClippingBehavior
forall a. Maybe a
Prelude.Nothing,
$sel:timecode:StopTimecode' :: Maybe Text
timecode = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
stopTimecode_lastFrameClippingBehavior :: Lens.Lens' StopTimecode (Prelude.Maybe LastFrameClippingBehavior)
stopTimecode_lastFrameClippingBehavior :: (Maybe LastFrameClippingBehavior
-> f (Maybe LastFrameClippingBehavior))
-> StopTimecode -> f StopTimecode
stopTimecode_lastFrameClippingBehavior = (StopTimecode -> Maybe LastFrameClippingBehavior)
-> (StopTimecode
-> Maybe LastFrameClippingBehavior -> StopTimecode)
-> Lens
StopTimecode
StopTimecode
(Maybe LastFrameClippingBehavior)
(Maybe 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 :: (Maybe Text -> f (Maybe Text)) -> StopTimecode -> f StopTimecode
stopTimecode_timecode = (StopTimecode -> Maybe Text)
-> (StopTimecode -> Maybe Text -> StopTimecode)
-> Lens StopTimecode StopTimecode (Maybe Text) (Maybe Text)
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 Core.FromJSON StopTimecode where
parseJSON :: Value -> Parser StopTimecode
parseJSON =
String
-> (Object -> Parser StopTimecode) -> Value -> Parser StopTimecode
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"StopTimecode"
( \Object
x ->
Maybe LastFrameClippingBehavior -> Maybe Text -> StopTimecode
StopTimecode'
(Maybe LastFrameClippingBehavior -> Maybe Text -> StopTimecode)
-> Parser (Maybe LastFrameClippingBehavior)
-> Parser (Maybe Text -> StopTimecode)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe LastFrameClippingBehavior)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"lastFrameClippingBehavior")
Parser (Maybe Text -> StopTimecode)
-> Parser (Maybe Text) -> Parser StopTimecode
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"timecode")
)
instance Prelude.Hashable StopTimecode
instance Prelude.NFData StopTimecode
instance Core.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
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"lastFrameClippingBehavior" Text -> LastFrameClippingBehavior -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(LastFrameClippingBehavior -> Pair)
-> Maybe LastFrameClippingBehavior -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe LastFrameClippingBehavior
lastFrameClippingBehavior,
(Text
"timecode" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
timecode
]
)