{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data TimestampStructure = TimestampStructure'
{
TimestampStructure -> ISO8601
value :: Data.ISO8601
}
deriving (TimestampStructure -> TimestampStructure -> Bool
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]
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
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. 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'
{ $sel:value:TimestampStructure' :: ISO8601
value =
forall (a :: Format). Iso' (Time a) UTCTime
Data._Time forall t b. AReview t b -> b -> t
Lens.# UTCTime
pValue_
}
timestampStructure_value :: Lens.Lens' TimestampStructure Prelude.UTCTime
timestampStructure_value :: Lens' TimestampStructure UTCTime
timestampStructure_value = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TimestampStructure' {ISO8601
value :: ISO8601
$sel:value:TimestampStructure' :: TimestampStructure -> ISO8601
value} -> ISO8601
value) (\s :: TimestampStructure
s@TimestampStructure' {} ISO8601
a -> TimestampStructure
s {$sel:value:TimestampStructure' :: ISO8601
value = ISO8601
a} :: TimestampStructure) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
instance Data.FromJSON TimestampStructure where
parseJSON :: Value -> Parser TimestampStructure
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"TimestampStructure"
( \Object
x ->
ISO8601 -> TimestampStructure
TimestampStructure' forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"value")
)
instance Prelude.Hashable TimestampStructure where
hashWithSalt :: Int -> TimestampStructure -> Int
hashWithSalt Int
_salt TimestampStructure' {ISO8601
value :: ISO8601
$sel:value:TimestampStructure' :: TimestampStructure -> ISO8601
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` ISO8601
value
instance Prelude.NFData TimestampStructure where
rnf :: TimestampStructure -> ()
rnf TimestampStructure' {ISO8601
value :: ISO8601
$sel:value:TimestampStructure' :: TimestampStructure -> ISO8601
..} = forall a. NFData a => a -> ()
Prelude.rnf ISO8601
value