{-# 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.Timing 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 Timing = Timing'
{
Timing -> Maybe POSIX
finishTime :: Prelude.Maybe Data.POSIX,
Timing -> Maybe POSIX
startTime :: Prelude.Maybe Data.POSIX,
Timing -> Maybe POSIX
submitTime :: Prelude.Maybe Data.POSIX
}
deriving (Timing -> Timing -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Timing -> Timing -> Bool
$c/= :: Timing -> Timing -> Bool
== :: Timing -> Timing -> Bool
$c== :: Timing -> Timing -> Bool
Prelude.Eq, ReadPrec [Timing]
ReadPrec Timing
Int -> ReadS Timing
ReadS [Timing]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Timing]
$creadListPrec :: ReadPrec [Timing]
readPrec :: ReadPrec Timing
$creadPrec :: ReadPrec Timing
readList :: ReadS [Timing]
$creadList :: ReadS [Timing]
readsPrec :: Int -> ReadS Timing
$creadsPrec :: Int -> ReadS Timing
Prelude.Read, Int -> Timing -> ShowS
[Timing] -> ShowS
Timing -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Timing] -> ShowS
$cshowList :: [Timing] -> ShowS
show :: Timing -> String
$cshow :: Timing -> String
showsPrec :: Int -> Timing -> ShowS
$cshowsPrec :: Int -> Timing -> ShowS
Prelude.Show, forall x. Rep Timing x -> Timing
forall x. Timing -> Rep Timing x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Timing x -> Timing
$cfrom :: forall x. Timing -> Rep Timing x
Prelude.Generic)
newTiming ::
Timing
newTiming :: Timing
newTiming =
Timing'
{ $sel:finishTime:Timing' :: Maybe POSIX
finishTime = forall a. Maybe a
Prelude.Nothing,
$sel:startTime:Timing' :: Maybe POSIX
startTime = forall a. Maybe a
Prelude.Nothing,
$sel:submitTime:Timing' :: Maybe POSIX
submitTime = forall a. Maybe a
Prelude.Nothing
}
timing_finishTime :: Lens.Lens' Timing (Prelude.Maybe Prelude.UTCTime)
timing_finishTime :: Lens' Timing (Maybe UTCTime)
timing_finishTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Timing' {Maybe POSIX
finishTime :: Maybe POSIX
$sel:finishTime:Timing' :: Timing -> Maybe POSIX
finishTime} -> Maybe POSIX
finishTime) (\s :: Timing
s@Timing' {} Maybe POSIX
a -> Timing
s {$sel:finishTime:Timing' :: Maybe POSIX
finishTime = Maybe POSIX
a} :: Timing) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
timing_startTime :: Lens.Lens' Timing (Prelude.Maybe Prelude.UTCTime)
timing_startTime :: Lens' Timing (Maybe UTCTime)
timing_startTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Timing' {Maybe POSIX
startTime :: Maybe POSIX
$sel:startTime:Timing' :: Timing -> Maybe POSIX
startTime} -> Maybe POSIX
startTime) (\s :: Timing
s@Timing' {} Maybe POSIX
a -> Timing
s {$sel:startTime:Timing' :: Maybe POSIX
startTime = Maybe POSIX
a} :: Timing) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
timing_submitTime :: Lens.Lens' Timing (Prelude.Maybe Prelude.UTCTime)
timing_submitTime :: Lens' Timing (Maybe UTCTime)
timing_submitTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Timing' {Maybe POSIX
submitTime :: Maybe POSIX
$sel:submitTime:Timing' :: Timing -> Maybe POSIX
submitTime} -> Maybe POSIX
submitTime) (\s :: Timing
s@Timing' {} Maybe POSIX
a -> Timing
s {$sel:submitTime:Timing' :: Maybe POSIX
submitTime = Maybe POSIX
a} :: Timing) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
instance Data.FromJSON Timing where
parseJSON :: Value -> Parser Timing
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"Timing"
( \Object
x ->
Maybe POSIX -> Maybe POSIX -> Maybe POSIX -> Timing
Timing'
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
"finishTime")
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
"startTime")
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
"submitTime")
)
instance Prelude.Hashable Timing where
hashWithSalt :: Int -> Timing -> Int
hashWithSalt Int
_salt Timing' {Maybe POSIX
submitTime :: Maybe POSIX
startTime :: Maybe POSIX
finishTime :: Maybe POSIX
$sel:submitTime:Timing' :: Timing -> Maybe POSIX
$sel:startTime:Timing' :: Timing -> Maybe POSIX
$sel:finishTime:Timing' :: Timing -> Maybe POSIX
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
finishTime
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
startTime
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
submitTime
instance Prelude.NFData Timing where
rnf :: Timing -> ()
rnf Timing' {Maybe POSIX
submitTime :: Maybe POSIX
startTime :: Maybe POSIX
finishTime :: Maybe POSIX
$sel:submitTime:Timing' :: Timing -> Maybe POSIX
$sel:startTime:Timing' :: Timing -> Maybe POSIX
$sel:finishTime:Timing' :: Timing -> Maybe POSIX
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
finishTime
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
startTime
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
submitTime