{-# 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.Config.Types.EvaluationResultIdentifier where
import Amazonka.Config.Types.EvaluationResultQualifier
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data EvaluationResultIdentifier = EvaluationResultIdentifier'
{
EvaluationResultIdentifier -> Maybe EvaluationResultQualifier
evaluationResultQualifier :: Prelude.Maybe EvaluationResultQualifier,
EvaluationResultIdentifier -> Maybe POSIX
orderingTimestamp :: Prelude.Maybe Core.POSIX
}
deriving (EvaluationResultIdentifier -> EvaluationResultIdentifier -> Bool
(EvaluationResultIdentifier -> EvaluationResultIdentifier -> Bool)
-> (EvaluationResultIdentifier
-> EvaluationResultIdentifier -> Bool)
-> Eq EvaluationResultIdentifier
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: EvaluationResultIdentifier -> EvaluationResultIdentifier -> Bool
$c/= :: EvaluationResultIdentifier -> EvaluationResultIdentifier -> Bool
== :: EvaluationResultIdentifier -> EvaluationResultIdentifier -> Bool
$c== :: EvaluationResultIdentifier -> EvaluationResultIdentifier -> Bool
Prelude.Eq, ReadPrec [EvaluationResultIdentifier]
ReadPrec EvaluationResultIdentifier
Int -> ReadS EvaluationResultIdentifier
ReadS [EvaluationResultIdentifier]
(Int -> ReadS EvaluationResultIdentifier)
-> ReadS [EvaluationResultIdentifier]
-> ReadPrec EvaluationResultIdentifier
-> ReadPrec [EvaluationResultIdentifier]
-> Read EvaluationResultIdentifier
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [EvaluationResultIdentifier]
$creadListPrec :: ReadPrec [EvaluationResultIdentifier]
readPrec :: ReadPrec EvaluationResultIdentifier
$creadPrec :: ReadPrec EvaluationResultIdentifier
readList :: ReadS [EvaluationResultIdentifier]
$creadList :: ReadS [EvaluationResultIdentifier]
readsPrec :: Int -> ReadS EvaluationResultIdentifier
$creadsPrec :: Int -> ReadS EvaluationResultIdentifier
Prelude.Read, Int -> EvaluationResultIdentifier -> ShowS
[EvaluationResultIdentifier] -> ShowS
EvaluationResultIdentifier -> String
(Int -> EvaluationResultIdentifier -> ShowS)
-> (EvaluationResultIdentifier -> String)
-> ([EvaluationResultIdentifier] -> ShowS)
-> Show EvaluationResultIdentifier
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [EvaluationResultIdentifier] -> ShowS
$cshowList :: [EvaluationResultIdentifier] -> ShowS
show :: EvaluationResultIdentifier -> String
$cshow :: EvaluationResultIdentifier -> String
showsPrec :: Int -> EvaluationResultIdentifier -> ShowS
$cshowsPrec :: Int -> EvaluationResultIdentifier -> ShowS
Prelude.Show, (forall x.
EvaluationResultIdentifier -> Rep EvaluationResultIdentifier x)
-> (forall x.
Rep EvaluationResultIdentifier x -> EvaluationResultIdentifier)
-> Generic EvaluationResultIdentifier
forall x.
Rep EvaluationResultIdentifier x -> EvaluationResultIdentifier
forall x.
EvaluationResultIdentifier -> Rep EvaluationResultIdentifier x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep EvaluationResultIdentifier x -> EvaluationResultIdentifier
$cfrom :: forall x.
EvaluationResultIdentifier -> Rep EvaluationResultIdentifier x
Prelude.Generic)
newEvaluationResultIdentifier ::
EvaluationResultIdentifier
newEvaluationResultIdentifier :: EvaluationResultIdentifier
newEvaluationResultIdentifier =
EvaluationResultIdentifier' :: Maybe EvaluationResultQualifier
-> Maybe POSIX -> EvaluationResultIdentifier
EvaluationResultIdentifier'
{ $sel:evaluationResultQualifier:EvaluationResultIdentifier' :: Maybe EvaluationResultQualifier
evaluationResultQualifier =
Maybe EvaluationResultQualifier
forall a. Maybe a
Prelude.Nothing,
$sel:orderingTimestamp:EvaluationResultIdentifier' :: Maybe POSIX
orderingTimestamp = Maybe POSIX
forall a. Maybe a
Prelude.Nothing
}
evaluationResultIdentifier_evaluationResultQualifier :: Lens.Lens' EvaluationResultIdentifier (Prelude.Maybe EvaluationResultQualifier)
evaluationResultIdentifier_evaluationResultQualifier :: (Maybe EvaluationResultQualifier
-> f (Maybe EvaluationResultQualifier))
-> EvaluationResultIdentifier -> f EvaluationResultIdentifier
evaluationResultIdentifier_evaluationResultQualifier = (EvaluationResultIdentifier -> Maybe EvaluationResultQualifier)
-> (EvaluationResultIdentifier
-> Maybe EvaluationResultQualifier -> EvaluationResultIdentifier)
-> Lens
EvaluationResultIdentifier
EvaluationResultIdentifier
(Maybe EvaluationResultQualifier)
(Maybe EvaluationResultQualifier)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EvaluationResultIdentifier' {Maybe EvaluationResultQualifier
evaluationResultQualifier :: Maybe EvaluationResultQualifier
$sel:evaluationResultQualifier:EvaluationResultIdentifier' :: EvaluationResultIdentifier -> Maybe EvaluationResultQualifier
evaluationResultQualifier} -> Maybe EvaluationResultQualifier
evaluationResultQualifier) (\s :: EvaluationResultIdentifier
s@EvaluationResultIdentifier' {} Maybe EvaluationResultQualifier
a -> EvaluationResultIdentifier
s {$sel:evaluationResultQualifier:EvaluationResultIdentifier' :: Maybe EvaluationResultQualifier
evaluationResultQualifier = Maybe EvaluationResultQualifier
a} :: EvaluationResultIdentifier)
evaluationResultIdentifier_orderingTimestamp :: Lens.Lens' EvaluationResultIdentifier (Prelude.Maybe Prelude.UTCTime)
evaluationResultIdentifier_orderingTimestamp :: (Maybe UTCTime -> f (Maybe UTCTime))
-> EvaluationResultIdentifier -> f EvaluationResultIdentifier
evaluationResultIdentifier_orderingTimestamp = (EvaluationResultIdentifier -> Maybe POSIX)
-> (EvaluationResultIdentifier
-> Maybe POSIX -> EvaluationResultIdentifier)
-> Lens
EvaluationResultIdentifier
EvaluationResultIdentifier
(Maybe POSIX)
(Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EvaluationResultIdentifier' {Maybe POSIX
orderingTimestamp :: Maybe POSIX
$sel:orderingTimestamp:EvaluationResultIdentifier' :: EvaluationResultIdentifier -> Maybe POSIX
orderingTimestamp} -> Maybe POSIX
orderingTimestamp) (\s :: EvaluationResultIdentifier
s@EvaluationResultIdentifier' {} Maybe POSIX
a -> EvaluationResultIdentifier
s {$sel:orderingTimestamp:EvaluationResultIdentifier' :: Maybe POSIX
orderingTimestamp = Maybe POSIX
a} :: EvaluationResultIdentifier) ((Maybe POSIX -> f (Maybe POSIX))
-> EvaluationResultIdentifier -> f EvaluationResultIdentifier)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> EvaluationResultIdentifier
-> f EvaluationResultIdentifier
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
instance Core.FromJSON EvaluationResultIdentifier where
parseJSON :: Value -> Parser EvaluationResultIdentifier
parseJSON =
String
-> (Object -> Parser EvaluationResultIdentifier)
-> Value
-> Parser EvaluationResultIdentifier
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"EvaluationResultIdentifier"
( \Object
x ->
Maybe EvaluationResultQualifier
-> Maybe POSIX -> EvaluationResultIdentifier
EvaluationResultIdentifier'
(Maybe EvaluationResultQualifier
-> Maybe POSIX -> EvaluationResultIdentifier)
-> Parser (Maybe EvaluationResultQualifier)
-> Parser (Maybe POSIX -> EvaluationResultIdentifier)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe EvaluationResultQualifier)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"EvaluationResultQualifier")
Parser (Maybe POSIX -> EvaluationResultIdentifier)
-> Parser (Maybe POSIX) -> Parser EvaluationResultIdentifier
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"OrderingTimestamp")
)
instance Prelude.Hashable EvaluationResultIdentifier
instance Prelude.NFData EvaluationResultIdentifier