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