{-# 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.AggregateEvaluationResult where
import Amazonka.Config.Types.ComplianceType
import Amazonka.Config.Types.EvaluationResultIdentifier
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data AggregateEvaluationResult = AggregateEvaluationResult'
{
AggregateEvaluationResult -> Maybe EvaluationResultIdentifier
evaluationResultIdentifier :: Prelude.Maybe EvaluationResultIdentifier,
AggregateEvaluationResult -> Maybe Text
annotation :: Prelude.Maybe Prelude.Text,
AggregateEvaluationResult -> Maybe POSIX
configRuleInvokedTime :: Prelude.Maybe Core.POSIX,
AggregateEvaluationResult -> Maybe POSIX
resultRecordedTime :: Prelude.Maybe Core.POSIX,
AggregateEvaluationResult -> Maybe Text
accountId :: Prelude.Maybe Prelude.Text,
AggregateEvaluationResult -> Maybe ComplianceType
complianceType :: Prelude.Maybe ComplianceType,
AggregateEvaluationResult -> Maybe Text
awsRegion :: Prelude.Maybe Prelude.Text
}
deriving (AggregateEvaluationResult -> AggregateEvaluationResult -> Bool
(AggregateEvaluationResult -> AggregateEvaluationResult -> Bool)
-> (AggregateEvaluationResult -> AggregateEvaluationResult -> Bool)
-> Eq AggregateEvaluationResult
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AggregateEvaluationResult -> AggregateEvaluationResult -> Bool
$c/= :: AggregateEvaluationResult -> AggregateEvaluationResult -> Bool
== :: AggregateEvaluationResult -> AggregateEvaluationResult -> Bool
$c== :: AggregateEvaluationResult -> AggregateEvaluationResult -> Bool
Prelude.Eq, ReadPrec [AggregateEvaluationResult]
ReadPrec AggregateEvaluationResult
Int -> ReadS AggregateEvaluationResult
ReadS [AggregateEvaluationResult]
(Int -> ReadS AggregateEvaluationResult)
-> ReadS [AggregateEvaluationResult]
-> ReadPrec AggregateEvaluationResult
-> ReadPrec [AggregateEvaluationResult]
-> Read AggregateEvaluationResult
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AggregateEvaluationResult]
$creadListPrec :: ReadPrec [AggregateEvaluationResult]
readPrec :: ReadPrec AggregateEvaluationResult
$creadPrec :: ReadPrec AggregateEvaluationResult
readList :: ReadS [AggregateEvaluationResult]
$creadList :: ReadS [AggregateEvaluationResult]
readsPrec :: Int -> ReadS AggregateEvaluationResult
$creadsPrec :: Int -> ReadS AggregateEvaluationResult
Prelude.Read, Int -> AggregateEvaluationResult -> ShowS
[AggregateEvaluationResult] -> ShowS
AggregateEvaluationResult -> String
(Int -> AggregateEvaluationResult -> ShowS)
-> (AggregateEvaluationResult -> String)
-> ([AggregateEvaluationResult] -> ShowS)
-> Show AggregateEvaluationResult
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AggregateEvaluationResult] -> ShowS
$cshowList :: [AggregateEvaluationResult] -> ShowS
show :: AggregateEvaluationResult -> String
$cshow :: AggregateEvaluationResult -> String
showsPrec :: Int -> AggregateEvaluationResult -> ShowS
$cshowsPrec :: Int -> AggregateEvaluationResult -> ShowS
Prelude.Show, (forall x.
AggregateEvaluationResult -> Rep AggregateEvaluationResult x)
-> (forall x.
Rep AggregateEvaluationResult x -> AggregateEvaluationResult)
-> Generic AggregateEvaluationResult
forall x.
Rep AggregateEvaluationResult x -> AggregateEvaluationResult
forall x.
AggregateEvaluationResult -> Rep AggregateEvaluationResult x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AggregateEvaluationResult x -> AggregateEvaluationResult
$cfrom :: forall x.
AggregateEvaluationResult -> Rep AggregateEvaluationResult x
Prelude.Generic)
newAggregateEvaluationResult ::
AggregateEvaluationResult
newAggregateEvaluationResult :: AggregateEvaluationResult
newAggregateEvaluationResult =
AggregateEvaluationResult' :: Maybe EvaluationResultIdentifier
-> Maybe Text
-> Maybe POSIX
-> Maybe POSIX
-> Maybe Text
-> Maybe ComplianceType
-> Maybe Text
-> AggregateEvaluationResult
AggregateEvaluationResult'
{ $sel:evaluationResultIdentifier:AggregateEvaluationResult' :: Maybe EvaluationResultIdentifier
evaluationResultIdentifier =
Maybe EvaluationResultIdentifier
forall a. Maybe a
Prelude.Nothing,
$sel:annotation:AggregateEvaluationResult' :: Maybe Text
annotation = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:configRuleInvokedTime:AggregateEvaluationResult' :: Maybe POSIX
configRuleInvokedTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:resultRecordedTime:AggregateEvaluationResult' :: Maybe POSIX
resultRecordedTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:accountId:AggregateEvaluationResult' :: Maybe Text
accountId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:complianceType:AggregateEvaluationResult' :: Maybe ComplianceType
complianceType = Maybe ComplianceType
forall a. Maybe a
Prelude.Nothing,
$sel:awsRegion:AggregateEvaluationResult' :: Maybe Text
awsRegion = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
aggregateEvaluationResult_evaluationResultIdentifier :: Lens.Lens' AggregateEvaluationResult (Prelude.Maybe EvaluationResultIdentifier)
aggregateEvaluationResult_evaluationResultIdentifier :: (Maybe EvaluationResultIdentifier
-> f (Maybe EvaluationResultIdentifier))
-> AggregateEvaluationResult -> f AggregateEvaluationResult
aggregateEvaluationResult_evaluationResultIdentifier = (AggregateEvaluationResult -> Maybe EvaluationResultIdentifier)
-> (AggregateEvaluationResult
-> Maybe EvaluationResultIdentifier -> AggregateEvaluationResult)
-> Lens
AggregateEvaluationResult
AggregateEvaluationResult
(Maybe EvaluationResultIdentifier)
(Maybe EvaluationResultIdentifier)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AggregateEvaluationResult' {Maybe EvaluationResultIdentifier
evaluationResultIdentifier :: Maybe EvaluationResultIdentifier
$sel:evaluationResultIdentifier:AggregateEvaluationResult' :: AggregateEvaluationResult -> Maybe EvaluationResultIdentifier
evaluationResultIdentifier} -> Maybe EvaluationResultIdentifier
evaluationResultIdentifier) (\s :: AggregateEvaluationResult
s@AggregateEvaluationResult' {} Maybe EvaluationResultIdentifier
a -> AggregateEvaluationResult
s {$sel:evaluationResultIdentifier:AggregateEvaluationResult' :: Maybe EvaluationResultIdentifier
evaluationResultIdentifier = Maybe EvaluationResultIdentifier
a} :: AggregateEvaluationResult)
aggregateEvaluationResult_annotation :: Lens.Lens' AggregateEvaluationResult (Prelude.Maybe Prelude.Text)
aggregateEvaluationResult_annotation :: (Maybe Text -> f (Maybe Text))
-> AggregateEvaluationResult -> f AggregateEvaluationResult
aggregateEvaluationResult_annotation = (AggregateEvaluationResult -> Maybe Text)
-> (AggregateEvaluationResult
-> Maybe Text -> AggregateEvaluationResult)
-> Lens
AggregateEvaluationResult
AggregateEvaluationResult
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AggregateEvaluationResult' {Maybe Text
annotation :: Maybe Text
$sel:annotation:AggregateEvaluationResult' :: AggregateEvaluationResult -> Maybe Text
annotation} -> Maybe Text
annotation) (\s :: AggregateEvaluationResult
s@AggregateEvaluationResult' {} Maybe Text
a -> AggregateEvaluationResult
s {$sel:annotation:AggregateEvaluationResult' :: Maybe Text
annotation = Maybe Text
a} :: AggregateEvaluationResult)
aggregateEvaluationResult_configRuleInvokedTime :: Lens.Lens' AggregateEvaluationResult (Prelude.Maybe Prelude.UTCTime)
aggregateEvaluationResult_configRuleInvokedTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> AggregateEvaluationResult -> f AggregateEvaluationResult
aggregateEvaluationResult_configRuleInvokedTime = (AggregateEvaluationResult -> Maybe POSIX)
-> (AggregateEvaluationResult
-> Maybe POSIX -> AggregateEvaluationResult)
-> Lens
AggregateEvaluationResult
AggregateEvaluationResult
(Maybe POSIX)
(Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AggregateEvaluationResult' {Maybe POSIX
configRuleInvokedTime :: Maybe POSIX
$sel:configRuleInvokedTime:AggregateEvaluationResult' :: AggregateEvaluationResult -> Maybe POSIX
configRuleInvokedTime} -> Maybe POSIX
configRuleInvokedTime) (\s :: AggregateEvaluationResult
s@AggregateEvaluationResult' {} Maybe POSIX
a -> AggregateEvaluationResult
s {$sel:configRuleInvokedTime:AggregateEvaluationResult' :: Maybe POSIX
configRuleInvokedTime = Maybe POSIX
a} :: AggregateEvaluationResult) ((Maybe POSIX -> f (Maybe POSIX))
-> AggregateEvaluationResult -> f AggregateEvaluationResult)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> AggregateEvaluationResult
-> f AggregateEvaluationResult
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
aggregateEvaluationResult_resultRecordedTime :: Lens.Lens' AggregateEvaluationResult (Prelude.Maybe Prelude.UTCTime)
aggregateEvaluationResult_resultRecordedTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> AggregateEvaluationResult -> f AggregateEvaluationResult
aggregateEvaluationResult_resultRecordedTime = (AggregateEvaluationResult -> Maybe POSIX)
-> (AggregateEvaluationResult
-> Maybe POSIX -> AggregateEvaluationResult)
-> Lens
AggregateEvaluationResult
AggregateEvaluationResult
(Maybe POSIX)
(Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AggregateEvaluationResult' {Maybe POSIX
resultRecordedTime :: Maybe POSIX
$sel:resultRecordedTime:AggregateEvaluationResult' :: AggregateEvaluationResult -> Maybe POSIX
resultRecordedTime} -> Maybe POSIX
resultRecordedTime) (\s :: AggregateEvaluationResult
s@AggregateEvaluationResult' {} Maybe POSIX
a -> AggregateEvaluationResult
s {$sel:resultRecordedTime:AggregateEvaluationResult' :: Maybe POSIX
resultRecordedTime = Maybe POSIX
a} :: AggregateEvaluationResult) ((Maybe POSIX -> f (Maybe POSIX))
-> AggregateEvaluationResult -> f AggregateEvaluationResult)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> AggregateEvaluationResult
-> f AggregateEvaluationResult
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
aggregateEvaluationResult_accountId :: Lens.Lens' AggregateEvaluationResult (Prelude.Maybe Prelude.Text)
aggregateEvaluationResult_accountId :: (Maybe Text -> f (Maybe Text))
-> AggregateEvaluationResult -> f AggregateEvaluationResult
aggregateEvaluationResult_accountId = (AggregateEvaluationResult -> Maybe Text)
-> (AggregateEvaluationResult
-> Maybe Text -> AggregateEvaluationResult)
-> Lens
AggregateEvaluationResult
AggregateEvaluationResult
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AggregateEvaluationResult' {Maybe Text
accountId :: Maybe Text
$sel:accountId:AggregateEvaluationResult' :: AggregateEvaluationResult -> Maybe Text
accountId} -> Maybe Text
accountId) (\s :: AggregateEvaluationResult
s@AggregateEvaluationResult' {} Maybe Text
a -> AggregateEvaluationResult
s {$sel:accountId:AggregateEvaluationResult' :: Maybe Text
accountId = Maybe Text
a} :: AggregateEvaluationResult)
aggregateEvaluationResult_complianceType :: Lens.Lens' AggregateEvaluationResult (Prelude.Maybe ComplianceType)
aggregateEvaluationResult_complianceType :: (Maybe ComplianceType -> f (Maybe ComplianceType))
-> AggregateEvaluationResult -> f AggregateEvaluationResult
aggregateEvaluationResult_complianceType = (AggregateEvaluationResult -> Maybe ComplianceType)
-> (AggregateEvaluationResult
-> Maybe ComplianceType -> AggregateEvaluationResult)
-> Lens
AggregateEvaluationResult
AggregateEvaluationResult
(Maybe ComplianceType)
(Maybe ComplianceType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AggregateEvaluationResult' {Maybe ComplianceType
complianceType :: Maybe ComplianceType
$sel:complianceType:AggregateEvaluationResult' :: AggregateEvaluationResult -> Maybe ComplianceType
complianceType} -> Maybe ComplianceType
complianceType) (\s :: AggregateEvaluationResult
s@AggregateEvaluationResult' {} Maybe ComplianceType
a -> AggregateEvaluationResult
s {$sel:complianceType:AggregateEvaluationResult' :: Maybe ComplianceType
complianceType = Maybe ComplianceType
a} :: AggregateEvaluationResult)
aggregateEvaluationResult_awsRegion :: Lens.Lens' AggregateEvaluationResult (Prelude.Maybe Prelude.Text)
aggregateEvaluationResult_awsRegion :: (Maybe Text -> f (Maybe Text))
-> AggregateEvaluationResult -> f AggregateEvaluationResult
aggregateEvaluationResult_awsRegion = (AggregateEvaluationResult -> Maybe Text)
-> (AggregateEvaluationResult
-> Maybe Text -> AggregateEvaluationResult)
-> Lens
AggregateEvaluationResult
AggregateEvaluationResult
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AggregateEvaluationResult' {Maybe Text
awsRegion :: Maybe Text
$sel:awsRegion:AggregateEvaluationResult' :: AggregateEvaluationResult -> Maybe Text
awsRegion} -> Maybe Text
awsRegion) (\s :: AggregateEvaluationResult
s@AggregateEvaluationResult' {} Maybe Text
a -> AggregateEvaluationResult
s {$sel:awsRegion:AggregateEvaluationResult' :: Maybe Text
awsRegion = Maybe Text
a} :: AggregateEvaluationResult)
instance Core.FromJSON AggregateEvaluationResult where
parseJSON :: Value -> Parser AggregateEvaluationResult
parseJSON =
String
-> (Object -> Parser AggregateEvaluationResult)
-> Value
-> Parser AggregateEvaluationResult
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"AggregateEvaluationResult"
( \Object
x ->
Maybe EvaluationResultIdentifier
-> Maybe Text
-> Maybe POSIX
-> Maybe POSIX
-> Maybe Text
-> Maybe ComplianceType
-> Maybe Text
-> AggregateEvaluationResult
AggregateEvaluationResult'
(Maybe EvaluationResultIdentifier
-> Maybe Text
-> Maybe POSIX
-> Maybe POSIX
-> Maybe Text
-> Maybe ComplianceType
-> Maybe Text
-> AggregateEvaluationResult)
-> Parser (Maybe EvaluationResultIdentifier)
-> Parser
(Maybe Text
-> Maybe POSIX
-> Maybe POSIX
-> Maybe Text
-> Maybe ComplianceType
-> Maybe Text
-> AggregateEvaluationResult)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe EvaluationResultIdentifier)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"EvaluationResultIdentifier")
Parser
(Maybe Text
-> Maybe POSIX
-> Maybe POSIX
-> Maybe Text
-> Maybe ComplianceType
-> Maybe Text
-> AggregateEvaluationResult)
-> Parser (Maybe Text)
-> Parser
(Maybe POSIX
-> Maybe POSIX
-> Maybe Text
-> Maybe ComplianceType
-> Maybe Text
-> AggregateEvaluationResult)
forall (f :: * -> *) a b. Applicative f => 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
(Maybe POSIX
-> Maybe POSIX
-> Maybe Text
-> Maybe ComplianceType
-> Maybe Text
-> AggregateEvaluationResult)
-> Parser (Maybe POSIX)
-> Parser
(Maybe POSIX
-> Maybe Text
-> Maybe ComplianceType
-> Maybe Text
-> AggregateEvaluationResult)
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
"ConfigRuleInvokedTime")
Parser
(Maybe POSIX
-> Maybe Text
-> Maybe ComplianceType
-> Maybe Text
-> AggregateEvaluationResult)
-> Parser (Maybe POSIX)
-> Parser
(Maybe Text
-> Maybe ComplianceType -> Maybe Text -> AggregateEvaluationResult)
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
"ResultRecordedTime")
Parser
(Maybe Text
-> Maybe ComplianceType -> Maybe Text -> AggregateEvaluationResult)
-> Parser (Maybe Text)
-> Parser
(Maybe ComplianceType -> Maybe Text -> AggregateEvaluationResult)
forall (f :: * -> *) a b. Applicative f => 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
"AccountId")
Parser
(Maybe ComplianceType -> Maybe Text -> AggregateEvaluationResult)
-> Parser (Maybe ComplianceType)
-> Parser (Maybe Text -> AggregateEvaluationResult)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ComplianceType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ComplianceType")
Parser (Maybe Text -> AggregateEvaluationResult)
-> Parser (Maybe Text) -> Parser AggregateEvaluationResult
forall (f :: * -> *) a b. Applicative f => 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
"AwsRegion")
)
instance Prelude.Hashable AggregateEvaluationResult
instance Prelude.NFData AggregateEvaluationResult