{-# 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.Lens as Lens
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
(InputClipping -> InputClipping -> Bool)
-> (InputClipping -> InputClipping -> Bool) -> Eq InputClipping
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]
(Int -> ReadS InputClipping)
-> ReadS [InputClipping]
-> ReadPrec InputClipping
-> ReadPrec [InputClipping]
-> Read 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
(Int -> InputClipping -> ShowS)
-> (InputClipping -> String)
-> ([InputClipping] -> ShowS)
-> Show InputClipping
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. InputClipping -> Rep InputClipping x)
-> (forall x. Rep InputClipping x -> InputClipping)
-> Generic InputClipping
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' :: Maybe Text -> Maybe Text -> InputClipping
InputClipping'
{ $sel:endTimecode:InputClipping' :: Maybe Text
endTimecode = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:startTimecode:InputClipping' :: Maybe Text
startTimecode = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
inputClipping_endTimecode :: Lens.Lens' InputClipping (Prelude.Maybe Prelude.Text)
inputClipping_endTimecode :: (Maybe Text -> f (Maybe Text)) -> InputClipping -> f InputClipping
inputClipping_endTimecode = (InputClipping -> Maybe Text)
-> (InputClipping -> Maybe Text -> InputClipping)
-> Lens InputClipping InputClipping (Maybe Text) (Maybe Text)
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 :: (Maybe Text -> f (Maybe Text)) -> InputClipping -> f InputClipping
inputClipping_startTimecode = (InputClipping -> Maybe Text)
-> (InputClipping -> Maybe Text -> InputClipping)
-> Lens InputClipping InputClipping (Maybe Text) (Maybe Text)
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 Core.FromJSON InputClipping where
parseJSON :: Value -> Parser InputClipping
parseJSON =
String
-> (Object -> Parser InputClipping)
-> Value
-> Parser InputClipping
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"InputClipping"
( \Object
x ->
Maybe Text -> Maybe Text -> InputClipping
InputClipping'
(Maybe Text -> Maybe Text -> InputClipping)
-> Parser (Maybe Text) -> Parser (Maybe Text -> InputClipping)
forall (f :: * -> *) a b. Functor 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
"endTimecode")
Parser (Maybe Text -> InputClipping)
-> Parser (Maybe Text) -> Parser InputClipping
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
"startTimecode")
)
instance Prelude.Hashable InputClipping
instance Prelude.NFData InputClipping
instance Core.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
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"endTimecode" 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
endTimecode,
(Text
"startTimecode" 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
startTimecode
]
)