{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.Config.Types.AggregateEvaluationResult
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
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

-- | The details of an Config evaluation for an account ID and region in an
-- aggregator. Provides the Amazon Web Services resource that was
-- evaluated, the compliance of the resource, related time stamps, and
-- supplementary information.
--
-- /See:/ 'newAggregateEvaluationResult' smart constructor.
data AggregateEvaluationResult = AggregateEvaluationResult'
  { -- | Uniquely identifies the evaluation result.
    AggregateEvaluationResult -> Maybe EvaluationResultIdentifier
evaluationResultIdentifier :: Prelude.Maybe EvaluationResultIdentifier,
    -- | Supplementary information about how the agrregate evaluation determined
    -- the compliance.
    AggregateEvaluationResult -> Maybe Text
annotation :: Prelude.Maybe Prelude.Text,
    -- | The time when the Config rule evaluated the Amazon Web Services
    -- resource.
    AggregateEvaluationResult -> Maybe POSIX
configRuleInvokedTime :: Prelude.Maybe Core.POSIX,
    -- | The time when Config recorded the aggregate evaluation result.
    AggregateEvaluationResult -> Maybe POSIX
resultRecordedTime :: Prelude.Maybe Core.POSIX,
    -- | The 12-digit account ID of the source account.
    AggregateEvaluationResult -> Maybe Text
accountId :: Prelude.Maybe Prelude.Text,
    -- | The resource compliance status.
    --
    -- For the @AggregationEvaluationResult@ data type, Config supports only
    -- the @COMPLIANT@ and @NON_COMPLIANT@. Config does not support the
    -- @NOT_APPLICABLE@ and @INSUFFICIENT_DATA@ value.
    AggregateEvaluationResult -> Maybe ComplianceType
complianceType :: Prelude.Maybe ComplianceType,
    -- | The source region from where the data is aggregated.
    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)

-- |
-- Create a value of 'AggregateEvaluationResult' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'evaluationResultIdentifier', 'aggregateEvaluationResult_evaluationResultIdentifier' - Uniquely identifies the evaluation result.
--
-- 'annotation', 'aggregateEvaluationResult_annotation' - Supplementary information about how the agrregate evaluation determined
-- the compliance.
--
-- 'configRuleInvokedTime', 'aggregateEvaluationResult_configRuleInvokedTime' - The time when the Config rule evaluated the Amazon Web Services
-- resource.
--
-- 'resultRecordedTime', 'aggregateEvaluationResult_resultRecordedTime' - The time when Config recorded the aggregate evaluation result.
--
-- 'accountId', 'aggregateEvaluationResult_accountId' - The 12-digit account ID of the source account.
--
-- 'complianceType', 'aggregateEvaluationResult_complianceType' - The resource compliance status.
--
-- For the @AggregationEvaluationResult@ data type, Config supports only
-- the @COMPLIANT@ and @NON_COMPLIANT@. Config does not support the
-- @NOT_APPLICABLE@ and @INSUFFICIENT_DATA@ value.
--
-- 'awsRegion', 'aggregateEvaluationResult_awsRegion' - The source region from where the data is aggregated.
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
    }

-- | Uniquely identifies the evaluation result.
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)

-- | Supplementary information about how the agrregate evaluation determined
-- the compliance.
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)

-- | The time when the Config rule evaluated the Amazon Web Services
-- resource.
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

-- | The time when Config recorded the aggregate evaluation result.
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

-- | The 12-digit account ID of the source account.
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)

-- | The resource compliance status.
--
-- For the @AggregationEvaluationResult@ data type, Config supports only
-- the @COMPLIANT@ and @NON_COMPLIANT@. Config does not support the
-- @NOT_APPLICABLE@ and @INSUFFICIENT_DATA@ value.
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)

-- | The source region from where the data is aggregated.
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