{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
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 :: Data.POSIX,
ConformancePackEvaluationResult -> POSIX
resultRecordedTime :: Data.POSIX
}
deriving (ConformancePackEvaluationResult
-> ConformancePackEvaluationResult -> Bool
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]
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
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.
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'
{ $sel:annotation:ConformancePackEvaluationResult' :: Maybe Text
annotation =
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 =
forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
forall t b. AReview t b -> b -> t
Lens.# UTCTime
pConfigRuleInvokedTime_,
$sel:resultRecordedTime:ConformancePackEvaluationResult' :: POSIX
resultRecordedTime =
forall (a :: Format). Iso' (Time a) UTCTime
Data._Time forall t b. AReview t b -> b -> t
Lens.# UTCTime
pResultRecordedTime_
}
conformancePackEvaluationResult_annotation :: Lens.Lens' ConformancePackEvaluationResult (Prelude.Maybe Prelude.Text)
conformancePackEvaluationResult_annotation :: Lens' ConformancePackEvaluationResult (Maybe Text)
conformancePackEvaluationResult_annotation = 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 :: Lens' ConformancePackEvaluationResult ConformancePackComplianceType
conformancePackEvaluationResult_complianceType = 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 :: Lens' ConformancePackEvaluationResult EvaluationResultIdentifier
conformancePackEvaluationResult_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 :: Lens' ConformancePackEvaluationResult UTCTime
conformancePackEvaluationResult_configRuleInvokedTime = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
conformancePackEvaluationResult_resultRecordedTime :: Lens.Lens' ConformancePackEvaluationResult Prelude.UTCTime
conformancePackEvaluationResult_resultRecordedTime :: Lens' ConformancePackEvaluationResult UTCTime
conformancePackEvaluationResult_resultRecordedTime = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
instance
Data.FromJSON
ConformancePackEvaluationResult
where
parseJSON :: Value -> Parser ConformancePackEvaluationResult
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"ConformancePackEvaluationResult"
( \Object
x ->
Maybe Text
-> ConformancePackComplianceType
-> EvaluationResultIdentifier
-> POSIX
-> POSIX
-> ConformancePackEvaluationResult
ConformancePackEvaluationResult'
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
"Annotation")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"ComplianceType")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"EvaluationResultIdentifier")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"ConfigRuleInvokedTime")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"ResultRecordedTime")
)
instance
Prelude.Hashable
ConformancePackEvaluationResult
where
hashWithSalt :: Int -> ConformancePackEvaluationResult -> Int
hashWithSalt
Int
_salt
ConformancePackEvaluationResult' {Maybe Text
POSIX
ConformancePackComplianceType
EvaluationResultIdentifier
resultRecordedTime :: POSIX
configRuleInvokedTime :: POSIX
evaluationResultIdentifier :: EvaluationResultIdentifier
complianceType :: ConformancePackComplianceType
annotation :: Maybe Text
$sel:resultRecordedTime:ConformancePackEvaluationResult' :: ConformancePackEvaluationResult -> POSIX
$sel:configRuleInvokedTime:ConformancePackEvaluationResult' :: ConformancePackEvaluationResult -> POSIX
$sel:evaluationResultIdentifier:ConformancePackEvaluationResult' :: ConformancePackEvaluationResult -> EvaluationResultIdentifier
$sel:complianceType:ConformancePackEvaluationResult' :: ConformancePackEvaluationResult -> ConformancePackComplianceType
$sel:annotation:ConformancePackEvaluationResult' :: ConformancePackEvaluationResult -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
annotation
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` ConformancePackComplianceType
complianceType
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` EvaluationResultIdentifier
evaluationResultIdentifier
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` POSIX
configRuleInvokedTime
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` POSIX
resultRecordedTime
instance
Prelude.NFData
ConformancePackEvaluationResult
where
rnf :: ConformancePackEvaluationResult -> ()
rnf ConformancePackEvaluationResult' {Maybe Text
POSIX
ConformancePackComplianceType
EvaluationResultIdentifier
resultRecordedTime :: POSIX
configRuleInvokedTime :: POSIX
evaluationResultIdentifier :: EvaluationResultIdentifier
complianceType :: ConformancePackComplianceType
annotation :: Maybe Text
$sel:resultRecordedTime:ConformancePackEvaluationResult' :: ConformancePackEvaluationResult -> POSIX
$sel:configRuleInvokedTime:ConformancePackEvaluationResult' :: ConformancePackEvaluationResult -> POSIX
$sel:evaluationResultIdentifier:ConformancePackEvaluationResult' :: ConformancePackEvaluationResult -> EvaluationResultIdentifier
$sel:complianceType:ConformancePackEvaluationResult' :: ConformancePackEvaluationResult -> ConformancePackComplianceType
$sel:annotation:ConformancePackEvaluationResult' :: ConformancePackEvaluationResult -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
annotation
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf ConformancePackComplianceType
complianceType
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf EvaluationResultIdentifier
evaluationResultIdentifier
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf POSIX
configRuleInvokedTime
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf POSIX
resultRecordedTime