{-# 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.CodeGuruProfiler.Types.TimestampStructure where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data TimestampStructure = TimestampStructure'
{
TimestampStructure -> POSIX
value :: Core.POSIX
}
deriving (TimestampStructure -> TimestampStructure -> Bool
(TimestampStructure -> TimestampStructure -> Bool)
-> (TimestampStructure -> TimestampStructure -> Bool)
-> Eq TimestampStructure
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TimestampStructure -> TimestampStructure -> Bool
$c/= :: TimestampStructure -> TimestampStructure -> Bool
== :: TimestampStructure -> TimestampStructure -> Bool
$c== :: TimestampStructure -> TimestampStructure -> Bool
Prelude.Eq, ReadPrec [TimestampStructure]
ReadPrec TimestampStructure
Int -> ReadS TimestampStructure
ReadS [TimestampStructure]
(Int -> ReadS TimestampStructure)
-> ReadS [TimestampStructure]
-> ReadPrec TimestampStructure
-> ReadPrec [TimestampStructure]
-> Read TimestampStructure
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [TimestampStructure]
$creadListPrec :: ReadPrec [TimestampStructure]
readPrec :: ReadPrec TimestampStructure
$creadPrec :: ReadPrec TimestampStructure
readList :: ReadS [TimestampStructure]
$creadList :: ReadS [TimestampStructure]
readsPrec :: Int -> ReadS TimestampStructure
$creadsPrec :: Int -> ReadS TimestampStructure
Prelude.Read, Int -> TimestampStructure -> ShowS
[TimestampStructure] -> ShowS
TimestampStructure -> String
(Int -> TimestampStructure -> ShowS)
-> (TimestampStructure -> String)
-> ([TimestampStructure] -> ShowS)
-> Show TimestampStructure
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [TimestampStructure] -> ShowS
$cshowList :: [TimestampStructure] -> ShowS
show :: TimestampStructure -> String
$cshow :: TimestampStructure -> String
showsPrec :: Int -> TimestampStructure -> ShowS
$cshowsPrec :: Int -> TimestampStructure -> ShowS
Prelude.Show, (forall x. TimestampStructure -> Rep TimestampStructure x)
-> (forall x. Rep TimestampStructure x -> TimestampStructure)
-> Generic TimestampStructure
forall x. Rep TimestampStructure x -> TimestampStructure
forall x. TimestampStructure -> Rep TimestampStructure x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep TimestampStructure x -> TimestampStructure
$cfrom :: forall x. TimestampStructure -> Rep TimestampStructure x
Prelude.Generic)
newTimestampStructure ::
Prelude.UTCTime ->
TimestampStructure
newTimestampStructure :: UTCTime -> TimestampStructure
newTimestampStructure UTCTime
pValue_ =
TimestampStructure' :: POSIX -> TimestampStructure
TimestampStructure'
{ $sel:value:TimestampStructure' :: POSIX
value =
Tagged UTCTime (Identity UTCTime) -> Tagged POSIX (Identity POSIX)
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time (Tagged UTCTime (Identity UTCTime)
-> Tagged POSIX (Identity POSIX))
-> UTCTime -> POSIX
forall t b. AReview t b -> b -> t
Lens.# UTCTime
pValue_
}
timestampStructure_value :: Lens.Lens' TimestampStructure Prelude.UTCTime
timestampStructure_value :: (UTCTime -> f UTCTime)
-> TimestampStructure -> f TimestampStructure
timestampStructure_value = (TimestampStructure -> POSIX)
-> (TimestampStructure -> POSIX -> TimestampStructure)
-> Lens TimestampStructure TimestampStructure POSIX POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TimestampStructure' {POSIX
value :: POSIX
$sel:value:TimestampStructure' :: TimestampStructure -> POSIX
value} -> POSIX
value) (\s :: TimestampStructure
s@TimestampStructure' {} POSIX
a -> TimestampStructure
s {$sel:value:TimestampStructure' :: POSIX
value = POSIX
a} :: TimestampStructure) ((POSIX -> f POSIX) -> TimestampStructure -> f TimestampStructure)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> TimestampStructure
-> f TimestampStructure
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (UTCTime -> f UTCTime) -> POSIX -> f POSIX
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
instance Core.FromJSON TimestampStructure where
parseJSON :: Value -> Parser TimestampStructure
parseJSON =
String
-> (Object -> Parser TimestampStructure)
-> Value
-> Parser TimestampStructure
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"TimestampStructure"
( \Object
x ->
POSIX -> TimestampStructure
TimestampStructure' (POSIX -> TimestampStructure)
-> Parser POSIX -> Parser TimestampStructure
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser POSIX
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"value")
)
instance Prelude.Hashable TimestampStructure
instance Prelude.NFData TimestampStructure