{-# 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.ConformancePackEvaluationResult where
import Amazonka.Config.Types.ConformancePackComplianceType
import Amazonka.Config.Types.EvaluationResultIdentifier
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data ConformancePackEvaluationResult = ConformancePackEvaluationResult'
{
ConformancePackEvaluationResult -> Maybe Text
annotation :: Prelude.Maybe Prelude.Text,
ConformancePackEvaluationResult -> ConformancePackComplianceType
complianceType :: ConformancePackComplianceType,
ConformancePackEvaluationResult -> EvaluationResultIdentifier
evaluationResultIdentifier :: EvaluationResultIdentifier,
ConformancePackEvaluationResult -> POSIX
configRuleInvokedTime :: Core.POSIX,
ConformancePackEvaluationResult -> POSIX
resultRecordedTime :: Core.POSIX
}
deriving (ConformancePackEvaluationResult
-> ConformancePackEvaluationResult -> Bool
(ConformancePackEvaluationResult
-> ConformancePackEvaluationResult -> Bool)
-> (ConformancePackEvaluationResult
-> ConformancePackEvaluationResult -> Bool)
-> Eq ConformancePackEvaluationResult
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ConformancePackEvaluationResult
-> ConformancePackEvaluationResult -> Bool
$c/= :: ConformancePackEvaluationResult
-> ConformancePackEvaluationResult -> Bool
== :: ConformancePackEvaluationResult
-> ConformancePackEvaluationResult -> Bool
$c== :: ConformancePackEvaluationResult
-> ConformancePackEvaluationResult -> Bool
Prelude.Eq, ReadPrec [ConformancePackEvaluationResult]
ReadPrec ConformancePackEvaluationResult
Int -> ReadS ConformancePackEvaluationResult
ReadS [ConformancePackEvaluationResult]
(Int -> ReadS ConformancePackEvaluationResult)
-> ReadS [ConformancePackEvaluationResult]
-> ReadPrec ConformancePackEvaluationResult
-> ReadPrec [ConformancePackEvaluationResult]
-> Read ConformancePackEvaluationResult
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ConformancePackEvaluationResult]
$creadListPrec :: ReadPrec [ConformancePackEvaluationResult]
readPrec :: ReadPrec ConformancePackEvaluationResult
$creadPrec :: ReadPrec ConformancePackEvaluationResult
readList :: ReadS [ConformancePackEvaluationResult]
$creadList :: ReadS [ConformancePackEvaluationResult]
readsPrec :: Int -> ReadS ConformancePackEvaluationResult
$creadsPrec :: Int -> ReadS ConformancePackEvaluationResult
Prelude.Read, Int -> ConformancePackEvaluationResult -> ShowS
[ConformancePackEvaluationResult] -> ShowS
ConformancePackEvaluationResult -> String
(Int -> ConformancePackEvaluationResult -> ShowS)
-> (ConformancePackEvaluationResult -> String)
-> ([ConformancePackEvaluationResult] -> ShowS)
-> Show ConformancePackEvaluationResult
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ConformancePackEvaluationResult] -> ShowS
$cshowList :: [ConformancePackEvaluationResult] -> ShowS
show :: ConformancePackEvaluationResult -> String
$cshow :: ConformancePackEvaluationResult -> String
showsPrec :: Int -> ConformancePackEvaluationResult -> ShowS
$cshowsPrec :: Int -> ConformancePackEvaluationResult -> ShowS
Prelude.Show, (forall x.
ConformancePackEvaluationResult
-> Rep ConformancePackEvaluationResult x)
-> (forall x.
Rep ConformancePackEvaluationResult x
-> ConformancePackEvaluationResult)
-> Generic ConformancePackEvaluationResult
forall x.
Rep ConformancePackEvaluationResult x
-> ConformancePackEvaluationResult
forall x.
ConformancePackEvaluationResult
-> Rep ConformancePackEvaluationResult x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ConformancePackEvaluationResult x
-> ConformancePackEvaluationResult
$cfrom :: forall x.
ConformancePackEvaluationResult
-> Rep ConformancePackEvaluationResult x
Prelude.Generic)
newConformancePackEvaluationResult ::
ConformancePackComplianceType ->
EvaluationResultIdentifier ->
Prelude.UTCTime ->
Prelude.UTCTime ->
ConformancePackEvaluationResult
newConformancePackEvaluationResult :: ConformancePackComplianceType
-> EvaluationResultIdentifier
-> UTCTime
-> UTCTime
-> ConformancePackEvaluationResult
newConformancePackEvaluationResult
ConformancePackComplianceType
pComplianceType_
EvaluationResultIdentifier
pEvaluationResultIdentifier_
UTCTime
pConfigRuleInvokedTime_
UTCTime
pResultRecordedTime_ =
ConformancePackEvaluationResult' :: Maybe Text
-> ConformancePackComplianceType
-> EvaluationResultIdentifier
-> POSIX
-> POSIX
-> ConformancePackEvaluationResult
ConformancePackEvaluationResult'
{ $sel:annotation:ConformancePackEvaluationResult' :: Maybe Text
annotation =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:complianceType:ConformancePackEvaluationResult' :: ConformancePackComplianceType
complianceType = ConformancePackComplianceType
pComplianceType_,
$sel:evaluationResultIdentifier:ConformancePackEvaluationResult' :: EvaluationResultIdentifier
evaluationResultIdentifier =
EvaluationResultIdentifier
pEvaluationResultIdentifier_,
$sel:configRuleInvokedTime:ConformancePackEvaluationResult' :: POSIX
configRuleInvokedTime =
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
pConfigRuleInvokedTime_,
$sel:resultRecordedTime:ConformancePackEvaluationResult' :: POSIX
resultRecordedTime =
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
pResultRecordedTime_
}
conformancePackEvaluationResult_annotation :: Lens.Lens' ConformancePackEvaluationResult (Prelude.Maybe Prelude.Text)
conformancePackEvaluationResult_annotation :: (Maybe Text -> f (Maybe Text))
-> ConformancePackEvaluationResult
-> f ConformancePackEvaluationResult
conformancePackEvaluationResult_annotation = (ConformancePackEvaluationResult -> Maybe Text)
-> (ConformancePackEvaluationResult
-> Maybe Text -> ConformancePackEvaluationResult)
-> Lens
ConformancePackEvaluationResult
ConformancePackEvaluationResult
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConformancePackEvaluationResult' {Maybe Text
annotation :: Maybe Text
$sel:annotation:ConformancePackEvaluationResult' :: ConformancePackEvaluationResult -> Maybe Text
annotation} -> Maybe Text
annotation) (\s :: ConformancePackEvaluationResult
s@ConformancePackEvaluationResult' {} Maybe Text
a -> ConformancePackEvaluationResult
s {$sel:annotation:ConformancePackEvaluationResult' :: Maybe Text
annotation = Maybe Text
a} :: ConformancePackEvaluationResult)
conformancePackEvaluationResult_complianceType :: Lens.Lens' ConformancePackEvaluationResult ConformancePackComplianceType
conformancePackEvaluationResult_complianceType :: (ConformancePackComplianceType -> f ConformancePackComplianceType)
-> ConformancePackEvaluationResult
-> f ConformancePackEvaluationResult
conformancePackEvaluationResult_complianceType = (ConformancePackEvaluationResult -> ConformancePackComplianceType)
-> (ConformancePackEvaluationResult
-> ConformancePackComplianceType
-> ConformancePackEvaluationResult)
-> Lens
ConformancePackEvaluationResult
ConformancePackEvaluationResult
ConformancePackComplianceType
ConformancePackComplianceType
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConformancePackEvaluationResult' {ConformancePackComplianceType
complianceType :: ConformancePackComplianceType
$sel:complianceType:ConformancePackEvaluationResult' :: ConformancePackEvaluationResult -> ConformancePackComplianceType
complianceType} -> ConformancePackComplianceType
complianceType) (\s :: ConformancePackEvaluationResult
s@ConformancePackEvaluationResult' {} ConformancePackComplianceType
a -> ConformancePackEvaluationResult
s {$sel:complianceType:ConformancePackEvaluationResult' :: ConformancePackComplianceType
complianceType = ConformancePackComplianceType
a} :: ConformancePackEvaluationResult)
conformancePackEvaluationResult_evaluationResultIdentifier :: Lens.Lens' ConformancePackEvaluationResult EvaluationResultIdentifier
conformancePackEvaluationResult_evaluationResultIdentifier :: (EvaluationResultIdentifier -> f EvaluationResultIdentifier)
-> ConformancePackEvaluationResult
-> f ConformancePackEvaluationResult
conformancePackEvaluationResult_evaluationResultIdentifier = (ConformancePackEvaluationResult -> EvaluationResultIdentifier)
-> (ConformancePackEvaluationResult
-> EvaluationResultIdentifier -> ConformancePackEvaluationResult)
-> Lens
ConformancePackEvaluationResult
ConformancePackEvaluationResult
EvaluationResultIdentifier
EvaluationResultIdentifier
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConformancePackEvaluationResult' {EvaluationResultIdentifier
evaluationResultIdentifier :: EvaluationResultIdentifier
$sel:evaluationResultIdentifier:ConformancePackEvaluationResult' :: ConformancePackEvaluationResult -> EvaluationResultIdentifier
evaluationResultIdentifier} -> EvaluationResultIdentifier
evaluationResultIdentifier) (\s :: ConformancePackEvaluationResult
s@ConformancePackEvaluationResult' {} EvaluationResultIdentifier
a -> ConformancePackEvaluationResult
s {$sel:evaluationResultIdentifier:ConformancePackEvaluationResult' :: EvaluationResultIdentifier
evaluationResultIdentifier = EvaluationResultIdentifier
a} :: ConformancePackEvaluationResult)
conformancePackEvaluationResult_configRuleInvokedTime :: Lens.Lens' ConformancePackEvaluationResult Prelude.UTCTime
conformancePackEvaluationResult_configRuleInvokedTime :: (UTCTime -> f UTCTime)
-> ConformancePackEvaluationResult
-> f ConformancePackEvaluationResult
conformancePackEvaluationResult_configRuleInvokedTime = (ConformancePackEvaluationResult -> POSIX)
-> (ConformancePackEvaluationResult
-> POSIX -> ConformancePackEvaluationResult)
-> Lens
ConformancePackEvaluationResult
ConformancePackEvaluationResult
POSIX
POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConformancePackEvaluationResult' {POSIX
configRuleInvokedTime :: POSIX
$sel:configRuleInvokedTime:ConformancePackEvaluationResult' :: ConformancePackEvaluationResult -> POSIX
configRuleInvokedTime} -> POSIX
configRuleInvokedTime) (\s :: ConformancePackEvaluationResult
s@ConformancePackEvaluationResult' {} POSIX
a -> ConformancePackEvaluationResult
s {$sel:configRuleInvokedTime:ConformancePackEvaluationResult' :: POSIX
configRuleInvokedTime = POSIX
a} :: ConformancePackEvaluationResult) ((POSIX -> f POSIX)
-> ConformancePackEvaluationResult
-> f ConformancePackEvaluationResult)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> ConformancePackEvaluationResult
-> f ConformancePackEvaluationResult
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
conformancePackEvaluationResult_resultRecordedTime :: Lens.Lens' ConformancePackEvaluationResult Prelude.UTCTime
conformancePackEvaluationResult_resultRecordedTime :: (UTCTime -> f UTCTime)
-> ConformancePackEvaluationResult
-> f ConformancePackEvaluationResult
conformancePackEvaluationResult_resultRecordedTime = (ConformancePackEvaluationResult -> POSIX)
-> (ConformancePackEvaluationResult
-> POSIX -> ConformancePackEvaluationResult)
-> Lens
ConformancePackEvaluationResult
ConformancePackEvaluationResult
POSIX
POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConformancePackEvaluationResult' {POSIX
resultRecordedTime :: POSIX
$sel:resultRecordedTime:ConformancePackEvaluationResult' :: ConformancePackEvaluationResult -> POSIX
resultRecordedTime} -> POSIX
resultRecordedTime) (\s :: ConformancePackEvaluationResult
s@ConformancePackEvaluationResult' {} POSIX
a -> ConformancePackEvaluationResult
s {$sel:resultRecordedTime:ConformancePackEvaluationResult' :: POSIX
resultRecordedTime = POSIX
a} :: ConformancePackEvaluationResult) ((POSIX -> f POSIX)
-> ConformancePackEvaluationResult
-> f ConformancePackEvaluationResult)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> ConformancePackEvaluationResult
-> f ConformancePackEvaluationResult
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
ConformancePackEvaluationResult
where
parseJSON :: Value -> Parser ConformancePackEvaluationResult
parseJSON =
String
-> (Object -> Parser ConformancePackEvaluationResult)
-> Value
-> Parser ConformancePackEvaluationResult
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ConformancePackEvaluationResult"
( \Object
x ->
Maybe Text
-> ConformancePackComplianceType
-> EvaluationResultIdentifier
-> POSIX
-> POSIX
-> ConformancePackEvaluationResult
ConformancePackEvaluationResult'
(Maybe Text
-> ConformancePackComplianceType
-> EvaluationResultIdentifier
-> POSIX
-> POSIX
-> ConformancePackEvaluationResult)
-> Parser (Maybe Text)
-> Parser
(ConformancePackComplianceType
-> EvaluationResultIdentifier
-> POSIX
-> POSIX
-> ConformancePackEvaluationResult)
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
"Annotation")
Parser
(ConformancePackComplianceType
-> EvaluationResultIdentifier
-> POSIX
-> POSIX
-> ConformancePackEvaluationResult)
-> Parser ConformancePackComplianceType
-> Parser
(EvaluationResultIdentifier
-> POSIX -> POSIX -> ConformancePackEvaluationResult)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser ConformancePackComplianceType
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"ComplianceType")
Parser
(EvaluationResultIdentifier
-> POSIX -> POSIX -> ConformancePackEvaluationResult)
-> Parser EvaluationResultIdentifier
-> Parser (POSIX -> POSIX -> ConformancePackEvaluationResult)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser EvaluationResultIdentifier
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"EvaluationResultIdentifier")
Parser (POSIX -> POSIX -> ConformancePackEvaluationResult)
-> Parser POSIX
-> Parser (POSIX -> ConformancePackEvaluationResult)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser POSIX
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"ConfigRuleInvokedTime")
Parser (POSIX -> ConformancePackEvaluationResult)
-> Parser POSIX -> Parser ConformancePackEvaluationResult
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser POSIX
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"ResultRecordedTime")
)
instance
Prelude.Hashable
ConformancePackEvaluationResult
instance
Prelude.NFData
ConformancePackEvaluationResult