{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# 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.GetAggregateComplianceDetailsByConfigRule
-- 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)
--
-- Returns the evaluation results for the specified Config rule for a
-- specific resource in a rule. The results indicate which Amazon Web
-- Services resources were evaluated by the rule, when each resource was
-- last evaluated, and whether each resource complies with the rule.
--
-- The results can return an empty result page. But if you have a
-- @nextToken@, the results are displayed on the next page.
--
-- This operation returns paginated results.
module Amazonka.Config.GetAggregateComplianceDetailsByConfigRule
  ( -- * Creating a Request
    GetAggregateComplianceDetailsByConfigRule (..),
    newGetAggregateComplianceDetailsByConfigRule,

    -- * Request Lenses
    getAggregateComplianceDetailsByConfigRule_nextToken,
    getAggregateComplianceDetailsByConfigRule_limit,
    getAggregateComplianceDetailsByConfigRule_complianceType,
    getAggregateComplianceDetailsByConfigRule_configurationAggregatorName,
    getAggregateComplianceDetailsByConfigRule_configRuleName,
    getAggregateComplianceDetailsByConfigRule_accountId,
    getAggregateComplianceDetailsByConfigRule_awsRegion,

    -- * Destructuring the Response
    GetAggregateComplianceDetailsByConfigRuleResponse (..),
    newGetAggregateComplianceDetailsByConfigRuleResponse,

    -- * Response Lenses
    getAggregateComplianceDetailsByConfigRuleResponse_nextToken,
    getAggregateComplianceDetailsByConfigRuleResponse_aggregateEvaluationResults,
    getAggregateComplianceDetailsByConfigRuleResponse_httpStatus,
  )
where

import Amazonka.Config.Types
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newGetAggregateComplianceDetailsByConfigRule' smart constructor.
data GetAggregateComplianceDetailsByConfigRule = GetAggregateComplianceDetailsByConfigRule'
  { -- | The @nextToken@ string returned on a previous page that you use to get
    -- the next page of results in a paginated response.
    GetAggregateComplianceDetailsByConfigRule -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The maximum number of evaluation results returned on each page. The
    -- default is 50. You cannot specify a number greater than 100. If you
    -- specify 0, Config uses the default.
    GetAggregateComplianceDetailsByConfigRule -> Maybe Natural
limit :: Prelude.Maybe Prelude.Natural,
    -- | The resource compliance status.
    --
    -- For the @GetAggregateComplianceDetailsByConfigRuleRequest@ data type,
    -- Config supports only the @COMPLIANT@ and @NON_COMPLIANT@. Config does
    -- not support the @NOT_APPLICABLE@ and @INSUFFICIENT_DATA@ values.
    GetAggregateComplianceDetailsByConfigRule -> Maybe ComplianceType
complianceType :: Prelude.Maybe ComplianceType,
    -- | The name of the configuration aggregator.
    GetAggregateComplianceDetailsByConfigRule -> Text
configurationAggregatorName :: Prelude.Text,
    -- | The name of the Config rule for which you want compliance information.
    GetAggregateComplianceDetailsByConfigRule -> Text
configRuleName :: Prelude.Text,
    -- | The 12-digit account ID of the source account.
    GetAggregateComplianceDetailsByConfigRule -> Text
accountId :: Prelude.Text,
    -- | The source region from where the data is aggregated.
    GetAggregateComplianceDetailsByConfigRule -> Text
awsRegion :: Prelude.Text
  }
  deriving (GetAggregateComplianceDetailsByConfigRule
-> GetAggregateComplianceDetailsByConfigRule -> Bool
(GetAggregateComplianceDetailsByConfigRule
 -> GetAggregateComplianceDetailsByConfigRule -> Bool)
-> (GetAggregateComplianceDetailsByConfigRule
    -> GetAggregateComplianceDetailsByConfigRule -> Bool)
-> Eq GetAggregateComplianceDetailsByConfigRule
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetAggregateComplianceDetailsByConfigRule
-> GetAggregateComplianceDetailsByConfigRule -> Bool
$c/= :: GetAggregateComplianceDetailsByConfigRule
-> GetAggregateComplianceDetailsByConfigRule -> Bool
== :: GetAggregateComplianceDetailsByConfigRule
-> GetAggregateComplianceDetailsByConfigRule -> Bool
$c== :: GetAggregateComplianceDetailsByConfigRule
-> GetAggregateComplianceDetailsByConfigRule -> Bool
Prelude.Eq, ReadPrec [GetAggregateComplianceDetailsByConfigRule]
ReadPrec GetAggregateComplianceDetailsByConfigRule
Int -> ReadS GetAggregateComplianceDetailsByConfigRule
ReadS [GetAggregateComplianceDetailsByConfigRule]
(Int -> ReadS GetAggregateComplianceDetailsByConfigRule)
-> ReadS [GetAggregateComplianceDetailsByConfigRule]
-> ReadPrec GetAggregateComplianceDetailsByConfigRule
-> ReadPrec [GetAggregateComplianceDetailsByConfigRule]
-> Read GetAggregateComplianceDetailsByConfigRule
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetAggregateComplianceDetailsByConfigRule]
$creadListPrec :: ReadPrec [GetAggregateComplianceDetailsByConfigRule]
readPrec :: ReadPrec GetAggregateComplianceDetailsByConfigRule
$creadPrec :: ReadPrec GetAggregateComplianceDetailsByConfigRule
readList :: ReadS [GetAggregateComplianceDetailsByConfigRule]
$creadList :: ReadS [GetAggregateComplianceDetailsByConfigRule]
readsPrec :: Int -> ReadS GetAggregateComplianceDetailsByConfigRule
$creadsPrec :: Int -> ReadS GetAggregateComplianceDetailsByConfigRule
Prelude.Read, Int -> GetAggregateComplianceDetailsByConfigRule -> ShowS
[GetAggregateComplianceDetailsByConfigRule] -> ShowS
GetAggregateComplianceDetailsByConfigRule -> String
(Int -> GetAggregateComplianceDetailsByConfigRule -> ShowS)
-> (GetAggregateComplianceDetailsByConfigRule -> String)
-> ([GetAggregateComplianceDetailsByConfigRule] -> ShowS)
-> Show GetAggregateComplianceDetailsByConfigRule
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetAggregateComplianceDetailsByConfigRule] -> ShowS
$cshowList :: [GetAggregateComplianceDetailsByConfigRule] -> ShowS
show :: GetAggregateComplianceDetailsByConfigRule -> String
$cshow :: GetAggregateComplianceDetailsByConfigRule -> String
showsPrec :: Int -> GetAggregateComplianceDetailsByConfigRule -> ShowS
$cshowsPrec :: Int -> GetAggregateComplianceDetailsByConfigRule -> ShowS
Prelude.Show, (forall x.
 GetAggregateComplianceDetailsByConfigRule
 -> Rep GetAggregateComplianceDetailsByConfigRule x)
-> (forall x.
    Rep GetAggregateComplianceDetailsByConfigRule x
    -> GetAggregateComplianceDetailsByConfigRule)
-> Generic GetAggregateComplianceDetailsByConfigRule
forall x.
Rep GetAggregateComplianceDetailsByConfigRule x
-> GetAggregateComplianceDetailsByConfigRule
forall x.
GetAggregateComplianceDetailsByConfigRule
-> Rep GetAggregateComplianceDetailsByConfigRule x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetAggregateComplianceDetailsByConfigRule x
-> GetAggregateComplianceDetailsByConfigRule
$cfrom :: forall x.
GetAggregateComplianceDetailsByConfigRule
-> Rep GetAggregateComplianceDetailsByConfigRule x
Prelude.Generic)

-- |
-- Create a value of 'GetAggregateComplianceDetailsByConfigRule' 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:
--
-- 'nextToken', 'getAggregateComplianceDetailsByConfigRule_nextToken' - The @nextToken@ string returned on a previous page that you use to get
-- the next page of results in a paginated response.
--
-- 'limit', 'getAggregateComplianceDetailsByConfigRule_limit' - The maximum number of evaluation results returned on each page. The
-- default is 50. You cannot specify a number greater than 100. If you
-- specify 0, Config uses the default.
--
-- 'complianceType', 'getAggregateComplianceDetailsByConfigRule_complianceType' - The resource compliance status.
--
-- For the @GetAggregateComplianceDetailsByConfigRuleRequest@ data type,
-- Config supports only the @COMPLIANT@ and @NON_COMPLIANT@. Config does
-- not support the @NOT_APPLICABLE@ and @INSUFFICIENT_DATA@ values.
--
-- 'configurationAggregatorName', 'getAggregateComplianceDetailsByConfigRule_configurationAggregatorName' - The name of the configuration aggregator.
--
-- 'configRuleName', 'getAggregateComplianceDetailsByConfigRule_configRuleName' - The name of the Config rule for which you want compliance information.
--
-- 'accountId', 'getAggregateComplianceDetailsByConfigRule_accountId' - The 12-digit account ID of the source account.
--
-- 'awsRegion', 'getAggregateComplianceDetailsByConfigRule_awsRegion' - The source region from where the data is aggregated.
newGetAggregateComplianceDetailsByConfigRule ::
  -- | 'configurationAggregatorName'
  Prelude.Text ->
  -- | 'configRuleName'
  Prelude.Text ->
  -- | 'accountId'
  Prelude.Text ->
  -- | 'awsRegion'
  Prelude.Text ->
  GetAggregateComplianceDetailsByConfigRule
newGetAggregateComplianceDetailsByConfigRule :: Text
-> Text
-> Text
-> Text
-> GetAggregateComplianceDetailsByConfigRule
newGetAggregateComplianceDetailsByConfigRule
  Text
pConfigurationAggregatorName_
  Text
pConfigRuleName_
  Text
pAccountId_
  Text
pAwsRegion_ =
    GetAggregateComplianceDetailsByConfigRule' :: Maybe Text
-> Maybe Natural
-> Maybe ComplianceType
-> Text
-> Text
-> Text
-> Text
-> GetAggregateComplianceDetailsByConfigRule
GetAggregateComplianceDetailsByConfigRule'
      { $sel:nextToken:GetAggregateComplianceDetailsByConfigRule' :: Maybe Text
nextToken =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:limit:GetAggregateComplianceDetailsByConfigRule' :: Maybe Natural
limit = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
        $sel:complianceType:GetAggregateComplianceDetailsByConfigRule' :: Maybe ComplianceType
complianceType = Maybe ComplianceType
forall a. Maybe a
Prelude.Nothing,
        $sel:configurationAggregatorName:GetAggregateComplianceDetailsByConfigRule' :: Text
configurationAggregatorName =
          Text
pConfigurationAggregatorName_,
        $sel:configRuleName:GetAggregateComplianceDetailsByConfigRule' :: Text
configRuleName =
          Text
pConfigRuleName_,
        $sel:accountId:GetAggregateComplianceDetailsByConfigRule' :: Text
accountId = Text
pAccountId_,
        $sel:awsRegion:GetAggregateComplianceDetailsByConfigRule' :: Text
awsRegion = Text
pAwsRegion_
      }

-- | The @nextToken@ string returned on a previous page that you use to get
-- the next page of results in a paginated response.
getAggregateComplianceDetailsByConfigRule_nextToken :: Lens.Lens' GetAggregateComplianceDetailsByConfigRule (Prelude.Maybe Prelude.Text)
getAggregateComplianceDetailsByConfigRule_nextToken :: (Maybe Text -> f (Maybe Text))
-> GetAggregateComplianceDetailsByConfigRule
-> f GetAggregateComplianceDetailsByConfigRule
getAggregateComplianceDetailsByConfigRule_nextToken = (GetAggregateComplianceDetailsByConfigRule -> Maybe Text)
-> (GetAggregateComplianceDetailsByConfigRule
    -> Maybe Text -> GetAggregateComplianceDetailsByConfigRule)
-> Lens
     GetAggregateComplianceDetailsByConfigRule
     GetAggregateComplianceDetailsByConfigRule
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetAggregateComplianceDetailsByConfigRule' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:GetAggregateComplianceDetailsByConfigRule' :: GetAggregateComplianceDetailsByConfigRule -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: GetAggregateComplianceDetailsByConfigRule
s@GetAggregateComplianceDetailsByConfigRule' {} Maybe Text
a -> GetAggregateComplianceDetailsByConfigRule
s {$sel:nextToken:GetAggregateComplianceDetailsByConfigRule' :: Maybe Text
nextToken = Maybe Text
a} :: GetAggregateComplianceDetailsByConfigRule)

-- | The maximum number of evaluation results returned on each page. The
-- default is 50. You cannot specify a number greater than 100. If you
-- specify 0, Config uses the default.
getAggregateComplianceDetailsByConfigRule_limit :: Lens.Lens' GetAggregateComplianceDetailsByConfigRule (Prelude.Maybe Prelude.Natural)
getAggregateComplianceDetailsByConfigRule_limit :: (Maybe Natural -> f (Maybe Natural))
-> GetAggregateComplianceDetailsByConfigRule
-> f GetAggregateComplianceDetailsByConfigRule
getAggregateComplianceDetailsByConfigRule_limit = (GetAggregateComplianceDetailsByConfigRule -> Maybe Natural)
-> (GetAggregateComplianceDetailsByConfigRule
    -> Maybe Natural -> GetAggregateComplianceDetailsByConfigRule)
-> Lens
     GetAggregateComplianceDetailsByConfigRule
     GetAggregateComplianceDetailsByConfigRule
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetAggregateComplianceDetailsByConfigRule' {Maybe Natural
limit :: Maybe Natural
$sel:limit:GetAggregateComplianceDetailsByConfigRule' :: GetAggregateComplianceDetailsByConfigRule -> Maybe Natural
limit} -> Maybe Natural
limit) (\s :: GetAggregateComplianceDetailsByConfigRule
s@GetAggregateComplianceDetailsByConfigRule' {} Maybe Natural
a -> GetAggregateComplianceDetailsByConfigRule
s {$sel:limit:GetAggregateComplianceDetailsByConfigRule' :: Maybe Natural
limit = Maybe Natural
a} :: GetAggregateComplianceDetailsByConfigRule)

-- | The resource compliance status.
--
-- For the @GetAggregateComplianceDetailsByConfigRuleRequest@ data type,
-- Config supports only the @COMPLIANT@ and @NON_COMPLIANT@. Config does
-- not support the @NOT_APPLICABLE@ and @INSUFFICIENT_DATA@ values.
getAggregateComplianceDetailsByConfigRule_complianceType :: Lens.Lens' GetAggregateComplianceDetailsByConfigRule (Prelude.Maybe ComplianceType)
getAggregateComplianceDetailsByConfigRule_complianceType :: (Maybe ComplianceType -> f (Maybe ComplianceType))
-> GetAggregateComplianceDetailsByConfigRule
-> f GetAggregateComplianceDetailsByConfigRule
getAggregateComplianceDetailsByConfigRule_complianceType = (GetAggregateComplianceDetailsByConfigRule -> Maybe ComplianceType)
-> (GetAggregateComplianceDetailsByConfigRule
    -> Maybe ComplianceType
    -> GetAggregateComplianceDetailsByConfigRule)
-> Lens
     GetAggregateComplianceDetailsByConfigRule
     GetAggregateComplianceDetailsByConfigRule
     (Maybe ComplianceType)
     (Maybe ComplianceType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetAggregateComplianceDetailsByConfigRule' {Maybe ComplianceType
complianceType :: Maybe ComplianceType
$sel:complianceType:GetAggregateComplianceDetailsByConfigRule' :: GetAggregateComplianceDetailsByConfigRule -> Maybe ComplianceType
complianceType} -> Maybe ComplianceType
complianceType) (\s :: GetAggregateComplianceDetailsByConfigRule
s@GetAggregateComplianceDetailsByConfigRule' {} Maybe ComplianceType
a -> GetAggregateComplianceDetailsByConfigRule
s {$sel:complianceType:GetAggregateComplianceDetailsByConfigRule' :: Maybe ComplianceType
complianceType = Maybe ComplianceType
a} :: GetAggregateComplianceDetailsByConfigRule)

-- | The name of the configuration aggregator.
getAggregateComplianceDetailsByConfigRule_configurationAggregatorName :: Lens.Lens' GetAggregateComplianceDetailsByConfigRule Prelude.Text
getAggregateComplianceDetailsByConfigRule_configurationAggregatorName :: (Text -> f Text)
-> GetAggregateComplianceDetailsByConfigRule
-> f GetAggregateComplianceDetailsByConfigRule
getAggregateComplianceDetailsByConfigRule_configurationAggregatorName = (GetAggregateComplianceDetailsByConfigRule -> Text)
-> (GetAggregateComplianceDetailsByConfigRule
    -> Text -> GetAggregateComplianceDetailsByConfigRule)
-> Lens
     GetAggregateComplianceDetailsByConfigRule
     GetAggregateComplianceDetailsByConfigRule
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetAggregateComplianceDetailsByConfigRule' {Text
configurationAggregatorName :: Text
$sel:configurationAggregatorName:GetAggregateComplianceDetailsByConfigRule' :: GetAggregateComplianceDetailsByConfigRule -> Text
configurationAggregatorName} -> Text
configurationAggregatorName) (\s :: GetAggregateComplianceDetailsByConfigRule
s@GetAggregateComplianceDetailsByConfigRule' {} Text
a -> GetAggregateComplianceDetailsByConfigRule
s {$sel:configurationAggregatorName:GetAggregateComplianceDetailsByConfigRule' :: Text
configurationAggregatorName = Text
a} :: GetAggregateComplianceDetailsByConfigRule)

-- | The name of the Config rule for which you want compliance information.
getAggregateComplianceDetailsByConfigRule_configRuleName :: Lens.Lens' GetAggregateComplianceDetailsByConfigRule Prelude.Text
getAggregateComplianceDetailsByConfigRule_configRuleName :: (Text -> f Text)
-> GetAggregateComplianceDetailsByConfigRule
-> f GetAggregateComplianceDetailsByConfigRule
getAggregateComplianceDetailsByConfigRule_configRuleName = (GetAggregateComplianceDetailsByConfigRule -> Text)
-> (GetAggregateComplianceDetailsByConfigRule
    -> Text -> GetAggregateComplianceDetailsByConfigRule)
-> Lens
     GetAggregateComplianceDetailsByConfigRule
     GetAggregateComplianceDetailsByConfigRule
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetAggregateComplianceDetailsByConfigRule' {Text
configRuleName :: Text
$sel:configRuleName:GetAggregateComplianceDetailsByConfigRule' :: GetAggregateComplianceDetailsByConfigRule -> Text
configRuleName} -> Text
configRuleName) (\s :: GetAggregateComplianceDetailsByConfigRule
s@GetAggregateComplianceDetailsByConfigRule' {} Text
a -> GetAggregateComplianceDetailsByConfigRule
s {$sel:configRuleName:GetAggregateComplianceDetailsByConfigRule' :: Text
configRuleName = Text
a} :: GetAggregateComplianceDetailsByConfigRule)

-- | The 12-digit account ID of the source account.
getAggregateComplianceDetailsByConfigRule_accountId :: Lens.Lens' GetAggregateComplianceDetailsByConfigRule Prelude.Text
getAggregateComplianceDetailsByConfigRule_accountId :: (Text -> f Text)
-> GetAggregateComplianceDetailsByConfigRule
-> f GetAggregateComplianceDetailsByConfigRule
getAggregateComplianceDetailsByConfigRule_accountId = (GetAggregateComplianceDetailsByConfigRule -> Text)
-> (GetAggregateComplianceDetailsByConfigRule
    -> Text -> GetAggregateComplianceDetailsByConfigRule)
-> Lens
     GetAggregateComplianceDetailsByConfigRule
     GetAggregateComplianceDetailsByConfigRule
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetAggregateComplianceDetailsByConfigRule' {Text
accountId :: Text
$sel:accountId:GetAggregateComplianceDetailsByConfigRule' :: GetAggregateComplianceDetailsByConfigRule -> Text
accountId} -> Text
accountId) (\s :: GetAggregateComplianceDetailsByConfigRule
s@GetAggregateComplianceDetailsByConfigRule' {} Text
a -> GetAggregateComplianceDetailsByConfigRule
s {$sel:accountId:GetAggregateComplianceDetailsByConfigRule' :: Text
accountId = Text
a} :: GetAggregateComplianceDetailsByConfigRule)

-- | The source region from where the data is aggregated.
getAggregateComplianceDetailsByConfigRule_awsRegion :: Lens.Lens' GetAggregateComplianceDetailsByConfigRule Prelude.Text
getAggregateComplianceDetailsByConfigRule_awsRegion :: (Text -> f Text)
-> GetAggregateComplianceDetailsByConfigRule
-> f GetAggregateComplianceDetailsByConfigRule
getAggregateComplianceDetailsByConfigRule_awsRegion = (GetAggregateComplianceDetailsByConfigRule -> Text)
-> (GetAggregateComplianceDetailsByConfigRule
    -> Text -> GetAggregateComplianceDetailsByConfigRule)
-> Lens
     GetAggregateComplianceDetailsByConfigRule
     GetAggregateComplianceDetailsByConfigRule
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetAggregateComplianceDetailsByConfigRule' {Text
awsRegion :: Text
$sel:awsRegion:GetAggregateComplianceDetailsByConfigRule' :: GetAggregateComplianceDetailsByConfigRule -> Text
awsRegion} -> Text
awsRegion) (\s :: GetAggregateComplianceDetailsByConfigRule
s@GetAggregateComplianceDetailsByConfigRule' {} Text
a -> GetAggregateComplianceDetailsByConfigRule
s {$sel:awsRegion:GetAggregateComplianceDetailsByConfigRule' :: Text
awsRegion = Text
a} :: GetAggregateComplianceDetailsByConfigRule)

instance
  Core.AWSPager
    GetAggregateComplianceDetailsByConfigRule
  where
  page :: GetAggregateComplianceDetailsByConfigRule
-> AWSResponse GetAggregateComplianceDetailsByConfigRule
-> Maybe GetAggregateComplianceDetailsByConfigRule
page GetAggregateComplianceDetailsByConfigRule
rq AWSResponse GetAggregateComplianceDetailsByConfigRule
rs
    | Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse GetAggregateComplianceDetailsByConfigRule
GetAggregateComplianceDetailsByConfigRuleResponse
rs
            GetAggregateComplianceDetailsByConfigRuleResponse
-> Getting
     (First Text) GetAggregateComplianceDetailsByConfigRuleResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> GetAggregateComplianceDetailsByConfigRuleResponse
-> Const
     (First Text) GetAggregateComplianceDetailsByConfigRuleResponse
Lens'
  GetAggregateComplianceDetailsByConfigRuleResponse (Maybe Text)
getAggregateComplianceDetailsByConfigRuleResponse_nextToken
              ((Maybe Text -> Const (First Text) (Maybe Text))
 -> GetAggregateComplianceDetailsByConfigRuleResponse
 -> Const
      (First Text) GetAggregateComplianceDetailsByConfigRuleResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting
     (First Text) GetAggregateComplianceDetailsByConfigRuleResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
      Maybe GetAggregateComplianceDetailsByConfigRule
forall a. Maybe a
Prelude.Nothing
    | Maybe [AggregateEvaluationResult] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse GetAggregateComplianceDetailsByConfigRule
GetAggregateComplianceDetailsByConfigRuleResponse
rs
            GetAggregateComplianceDetailsByConfigRuleResponse
-> Getting
     (First [AggregateEvaluationResult])
     GetAggregateComplianceDetailsByConfigRuleResponse
     [AggregateEvaluationResult]
-> Maybe [AggregateEvaluationResult]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [AggregateEvaluationResult]
 -> Const
      (First [AggregateEvaluationResult])
      (Maybe [AggregateEvaluationResult]))
-> GetAggregateComplianceDetailsByConfigRuleResponse
-> Const
     (First [AggregateEvaluationResult])
     GetAggregateComplianceDetailsByConfigRuleResponse
Lens'
  GetAggregateComplianceDetailsByConfigRuleResponse
  (Maybe [AggregateEvaluationResult])
getAggregateComplianceDetailsByConfigRuleResponse_aggregateEvaluationResults
              ((Maybe [AggregateEvaluationResult]
  -> Const
       (First [AggregateEvaluationResult])
       (Maybe [AggregateEvaluationResult]))
 -> GetAggregateComplianceDetailsByConfigRuleResponse
 -> Const
      (First [AggregateEvaluationResult])
      GetAggregateComplianceDetailsByConfigRuleResponse)
-> (([AggregateEvaluationResult]
     -> Const
          (First [AggregateEvaluationResult]) [AggregateEvaluationResult])
    -> Maybe [AggregateEvaluationResult]
    -> Const
         (First [AggregateEvaluationResult])
         (Maybe [AggregateEvaluationResult]))
-> Getting
     (First [AggregateEvaluationResult])
     GetAggregateComplianceDetailsByConfigRuleResponse
     [AggregateEvaluationResult]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([AggregateEvaluationResult]
 -> Const
      (First [AggregateEvaluationResult]) [AggregateEvaluationResult])
-> Maybe [AggregateEvaluationResult]
-> Const
     (First [AggregateEvaluationResult])
     (Maybe [AggregateEvaluationResult])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
      Maybe GetAggregateComplianceDetailsByConfigRule
forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
      GetAggregateComplianceDetailsByConfigRule
-> Maybe GetAggregateComplianceDetailsByConfigRule
forall a. a -> Maybe a
Prelude.Just (GetAggregateComplianceDetailsByConfigRule
 -> Maybe GetAggregateComplianceDetailsByConfigRule)
-> GetAggregateComplianceDetailsByConfigRule
-> Maybe GetAggregateComplianceDetailsByConfigRule
forall a b. (a -> b) -> a -> b
Prelude.$
        GetAggregateComplianceDetailsByConfigRule
rq
          GetAggregateComplianceDetailsByConfigRule
-> (GetAggregateComplianceDetailsByConfigRule
    -> GetAggregateComplianceDetailsByConfigRule)
-> GetAggregateComplianceDetailsByConfigRule
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> GetAggregateComplianceDetailsByConfigRule
-> Identity GetAggregateComplianceDetailsByConfigRule
Lens
  GetAggregateComplianceDetailsByConfigRule
  GetAggregateComplianceDetailsByConfigRule
  (Maybe Text)
  (Maybe Text)
getAggregateComplianceDetailsByConfigRule_nextToken
          ((Maybe Text -> Identity (Maybe Text))
 -> GetAggregateComplianceDetailsByConfigRule
 -> Identity GetAggregateComplianceDetailsByConfigRule)
-> Maybe Text
-> GetAggregateComplianceDetailsByConfigRule
-> GetAggregateComplianceDetailsByConfigRule
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse GetAggregateComplianceDetailsByConfigRule
GetAggregateComplianceDetailsByConfigRuleResponse
rs
            GetAggregateComplianceDetailsByConfigRuleResponse
-> Getting
     (First Text) GetAggregateComplianceDetailsByConfigRuleResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> GetAggregateComplianceDetailsByConfigRuleResponse
-> Const
     (First Text) GetAggregateComplianceDetailsByConfigRuleResponse
Lens'
  GetAggregateComplianceDetailsByConfigRuleResponse (Maybe Text)
getAggregateComplianceDetailsByConfigRuleResponse_nextToken
              ((Maybe Text -> Const (First Text) (Maybe Text))
 -> GetAggregateComplianceDetailsByConfigRuleResponse
 -> Const
      (First Text) GetAggregateComplianceDetailsByConfigRuleResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting
     (First Text) GetAggregateComplianceDetailsByConfigRuleResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just

instance
  Core.AWSRequest
    GetAggregateComplianceDetailsByConfigRule
  where
  type
    AWSResponse
      GetAggregateComplianceDetailsByConfigRule =
      GetAggregateComplianceDetailsByConfigRuleResponse
  request :: GetAggregateComplianceDetailsByConfigRule
-> Request GetAggregateComplianceDetailsByConfigRule
request = Service
-> GetAggregateComplianceDetailsByConfigRule
-> Request GetAggregateComplianceDetailsByConfigRule
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy GetAggregateComplianceDetailsByConfigRule
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse
           (AWSResponse GetAggregateComplianceDetailsByConfigRule)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either
      String (AWSResponse GetAggregateComplianceDetailsByConfigRule))
-> Logger
-> Service
-> Proxy GetAggregateComplianceDetailsByConfigRule
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse
           (AWSResponse GetAggregateComplianceDetailsByConfigRule)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe Text
-> Maybe [AggregateEvaluationResult]
-> Int
-> GetAggregateComplianceDetailsByConfigRuleResponse
GetAggregateComplianceDetailsByConfigRuleResponse'
            (Maybe Text
 -> Maybe [AggregateEvaluationResult]
 -> Int
 -> GetAggregateComplianceDetailsByConfigRuleResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe [AggregateEvaluationResult]
      -> Int -> GetAggregateComplianceDetailsByConfigRuleResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"NextToken")
              Either
  String
  (Maybe [AggregateEvaluationResult]
   -> Int -> GetAggregateComplianceDetailsByConfigRuleResponse)
-> Either String (Maybe [AggregateEvaluationResult])
-> Either
     String (Int -> GetAggregateComplianceDetailsByConfigRuleResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object
-> Text
-> Either String (Maybe (Maybe [AggregateEvaluationResult]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"AggregateEvaluationResults"
                              Either String (Maybe (Maybe [AggregateEvaluationResult]))
-> Maybe [AggregateEvaluationResult]
-> Either String (Maybe [AggregateEvaluationResult])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [AggregateEvaluationResult]
forall a. Monoid a => a
Prelude.mempty
                          )
              Either
  String (Int -> GetAggregateComplianceDetailsByConfigRuleResponse)
-> Either String Int
-> Either String GetAggregateComplianceDetailsByConfigRuleResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance
  Prelude.Hashable
    GetAggregateComplianceDetailsByConfigRule

instance
  Prelude.NFData
    GetAggregateComplianceDetailsByConfigRule

instance
  Core.ToHeaders
    GetAggregateComplianceDetailsByConfigRule
  where
  toHeaders :: GetAggregateComplianceDetailsByConfigRule -> ResponseHeaders
toHeaders =
    ResponseHeaders
-> GetAggregateComplianceDetailsByConfigRule -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"X-Amz-Target"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"StarlingDoveService.GetAggregateComplianceDetailsByConfigRule" ::
                          Prelude.ByteString
                      ),
            HeaderName
"Content-Type"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance
  Core.ToJSON
    GetAggregateComplianceDetailsByConfigRule
  where
  toJSON :: GetAggregateComplianceDetailsByConfigRule -> Value
toJSON GetAggregateComplianceDetailsByConfigRule' {Maybe Natural
Maybe Text
Maybe ComplianceType
Text
awsRegion :: Text
accountId :: Text
configRuleName :: Text
configurationAggregatorName :: Text
complianceType :: Maybe ComplianceType
limit :: Maybe Natural
nextToken :: Maybe Text
$sel:awsRegion:GetAggregateComplianceDetailsByConfigRule' :: GetAggregateComplianceDetailsByConfigRule -> Text
$sel:accountId:GetAggregateComplianceDetailsByConfigRule' :: GetAggregateComplianceDetailsByConfigRule -> Text
$sel:configRuleName:GetAggregateComplianceDetailsByConfigRule' :: GetAggregateComplianceDetailsByConfigRule -> Text
$sel:configurationAggregatorName:GetAggregateComplianceDetailsByConfigRule' :: GetAggregateComplianceDetailsByConfigRule -> Text
$sel:complianceType:GetAggregateComplianceDetailsByConfigRule' :: GetAggregateComplianceDetailsByConfigRule -> Maybe ComplianceType
$sel:limit:GetAggregateComplianceDetailsByConfigRule' :: GetAggregateComplianceDetailsByConfigRule -> Maybe Natural
$sel:nextToken:GetAggregateComplianceDetailsByConfigRule' :: GetAggregateComplianceDetailsByConfigRule -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"NextToken" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
nextToken,
            (Text
"Limit" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
limit,
            (Text
"ComplianceType" Text -> ComplianceType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (ComplianceType -> Pair) -> Maybe ComplianceType -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ComplianceType
complianceType,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              ( Text
"ConfigurationAggregatorName"
                  Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
configurationAggregatorName
              ),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              (Text
"ConfigRuleName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
configRuleName),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"AccountId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
accountId),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"AwsRegion" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
awsRegion)
          ]
      )

instance
  Core.ToPath
    GetAggregateComplianceDetailsByConfigRule
  where
  toPath :: GetAggregateComplianceDetailsByConfigRule -> ByteString
toPath = ByteString
-> GetAggregateComplianceDetailsByConfigRule -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"

instance
  Core.ToQuery
    GetAggregateComplianceDetailsByConfigRule
  where
  toQuery :: GetAggregateComplianceDetailsByConfigRule -> QueryString
toQuery = QueryString
-> GetAggregateComplianceDetailsByConfigRule -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty

-- | /See:/ 'newGetAggregateComplianceDetailsByConfigRuleResponse' smart constructor.
data GetAggregateComplianceDetailsByConfigRuleResponse = GetAggregateComplianceDetailsByConfigRuleResponse'
  { -- | The @nextToken@ string returned on a previous page that you use to get
    -- the next page of results in a paginated response.
    GetAggregateComplianceDetailsByConfigRuleResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | Returns an AggregateEvaluationResults object.
    GetAggregateComplianceDetailsByConfigRuleResponse
-> Maybe [AggregateEvaluationResult]
aggregateEvaluationResults :: Prelude.Maybe [AggregateEvaluationResult],
    -- | The response's http status code.
    GetAggregateComplianceDetailsByConfigRuleResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (GetAggregateComplianceDetailsByConfigRuleResponse
-> GetAggregateComplianceDetailsByConfigRuleResponse -> Bool
(GetAggregateComplianceDetailsByConfigRuleResponse
 -> GetAggregateComplianceDetailsByConfigRuleResponse -> Bool)
-> (GetAggregateComplianceDetailsByConfigRuleResponse
    -> GetAggregateComplianceDetailsByConfigRuleResponse -> Bool)
-> Eq GetAggregateComplianceDetailsByConfigRuleResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetAggregateComplianceDetailsByConfigRuleResponse
-> GetAggregateComplianceDetailsByConfigRuleResponse -> Bool
$c/= :: GetAggregateComplianceDetailsByConfigRuleResponse
-> GetAggregateComplianceDetailsByConfigRuleResponse -> Bool
== :: GetAggregateComplianceDetailsByConfigRuleResponse
-> GetAggregateComplianceDetailsByConfigRuleResponse -> Bool
$c== :: GetAggregateComplianceDetailsByConfigRuleResponse
-> GetAggregateComplianceDetailsByConfigRuleResponse -> Bool
Prelude.Eq, ReadPrec [GetAggregateComplianceDetailsByConfigRuleResponse]
ReadPrec GetAggregateComplianceDetailsByConfigRuleResponse
Int -> ReadS GetAggregateComplianceDetailsByConfigRuleResponse
ReadS [GetAggregateComplianceDetailsByConfigRuleResponse]
(Int -> ReadS GetAggregateComplianceDetailsByConfigRuleResponse)
-> ReadS [GetAggregateComplianceDetailsByConfigRuleResponse]
-> ReadPrec GetAggregateComplianceDetailsByConfigRuleResponse
-> ReadPrec [GetAggregateComplianceDetailsByConfigRuleResponse]
-> Read GetAggregateComplianceDetailsByConfigRuleResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetAggregateComplianceDetailsByConfigRuleResponse]
$creadListPrec :: ReadPrec [GetAggregateComplianceDetailsByConfigRuleResponse]
readPrec :: ReadPrec GetAggregateComplianceDetailsByConfigRuleResponse
$creadPrec :: ReadPrec GetAggregateComplianceDetailsByConfigRuleResponse
readList :: ReadS [GetAggregateComplianceDetailsByConfigRuleResponse]
$creadList :: ReadS [GetAggregateComplianceDetailsByConfigRuleResponse]
readsPrec :: Int -> ReadS GetAggregateComplianceDetailsByConfigRuleResponse
$creadsPrec :: Int -> ReadS GetAggregateComplianceDetailsByConfigRuleResponse
Prelude.Read, Int -> GetAggregateComplianceDetailsByConfigRuleResponse -> ShowS
[GetAggregateComplianceDetailsByConfigRuleResponse] -> ShowS
GetAggregateComplianceDetailsByConfigRuleResponse -> String
(Int -> GetAggregateComplianceDetailsByConfigRuleResponse -> ShowS)
-> (GetAggregateComplianceDetailsByConfigRuleResponse -> String)
-> ([GetAggregateComplianceDetailsByConfigRuleResponse] -> ShowS)
-> Show GetAggregateComplianceDetailsByConfigRuleResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetAggregateComplianceDetailsByConfigRuleResponse] -> ShowS
$cshowList :: [GetAggregateComplianceDetailsByConfigRuleResponse] -> ShowS
show :: GetAggregateComplianceDetailsByConfigRuleResponse -> String
$cshow :: GetAggregateComplianceDetailsByConfigRuleResponse -> String
showsPrec :: Int -> GetAggregateComplianceDetailsByConfigRuleResponse -> ShowS
$cshowsPrec :: Int -> GetAggregateComplianceDetailsByConfigRuleResponse -> ShowS
Prelude.Show, (forall x.
 GetAggregateComplianceDetailsByConfigRuleResponse
 -> Rep GetAggregateComplianceDetailsByConfigRuleResponse x)
-> (forall x.
    Rep GetAggregateComplianceDetailsByConfigRuleResponse x
    -> GetAggregateComplianceDetailsByConfigRuleResponse)
-> Generic GetAggregateComplianceDetailsByConfigRuleResponse
forall x.
Rep GetAggregateComplianceDetailsByConfigRuleResponse x
-> GetAggregateComplianceDetailsByConfigRuleResponse
forall x.
GetAggregateComplianceDetailsByConfigRuleResponse
-> Rep GetAggregateComplianceDetailsByConfigRuleResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetAggregateComplianceDetailsByConfigRuleResponse x
-> GetAggregateComplianceDetailsByConfigRuleResponse
$cfrom :: forall x.
GetAggregateComplianceDetailsByConfigRuleResponse
-> Rep GetAggregateComplianceDetailsByConfigRuleResponse x
Prelude.Generic)

-- |
-- Create a value of 'GetAggregateComplianceDetailsByConfigRuleResponse' 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:
--
-- 'nextToken', 'getAggregateComplianceDetailsByConfigRuleResponse_nextToken' - The @nextToken@ string returned on a previous page that you use to get
-- the next page of results in a paginated response.
--
-- 'aggregateEvaluationResults', 'getAggregateComplianceDetailsByConfigRuleResponse_aggregateEvaluationResults' - Returns an AggregateEvaluationResults object.
--
-- 'httpStatus', 'getAggregateComplianceDetailsByConfigRuleResponse_httpStatus' - The response's http status code.
newGetAggregateComplianceDetailsByConfigRuleResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  GetAggregateComplianceDetailsByConfigRuleResponse
newGetAggregateComplianceDetailsByConfigRuleResponse :: Int -> GetAggregateComplianceDetailsByConfigRuleResponse
newGetAggregateComplianceDetailsByConfigRuleResponse
  Int
pHttpStatus_ =
    GetAggregateComplianceDetailsByConfigRuleResponse' :: Maybe Text
-> Maybe [AggregateEvaluationResult]
-> Int
-> GetAggregateComplianceDetailsByConfigRuleResponse
GetAggregateComplianceDetailsByConfigRuleResponse'
      { $sel:nextToken:GetAggregateComplianceDetailsByConfigRuleResponse' :: Maybe Text
nextToken =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:aggregateEvaluationResults:GetAggregateComplianceDetailsByConfigRuleResponse' :: Maybe [AggregateEvaluationResult]
aggregateEvaluationResults =
          Maybe [AggregateEvaluationResult]
forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:GetAggregateComplianceDetailsByConfigRuleResponse' :: Int
httpStatus =
          Int
pHttpStatus_
      }

-- | The @nextToken@ string returned on a previous page that you use to get
-- the next page of results in a paginated response.
getAggregateComplianceDetailsByConfigRuleResponse_nextToken :: Lens.Lens' GetAggregateComplianceDetailsByConfigRuleResponse (Prelude.Maybe Prelude.Text)
getAggregateComplianceDetailsByConfigRuleResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> GetAggregateComplianceDetailsByConfigRuleResponse
-> f GetAggregateComplianceDetailsByConfigRuleResponse
getAggregateComplianceDetailsByConfigRuleResponse_nextToken = (GetAggregateComplianceDetailsByConfigRuleResponse -> Maybe Text)
-> (GetAggregateComplianceDetailsByConfigRuleResponse
    -> Maybe Text -> GetAggregateComplianceDetailsByConfigRuleResponse)
-> Lens'
     GetAggregateComplianceDetailsByConfigRuleResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetAggregateComplianceDetailsByConfigRuleResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:GetAggregateComplianceDetailsByConfigRuleResponse' :: GetAggregateComplianceDetailsByConfigRuleResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: GetAggregateComplianceDetailsByConfigRuleResponse
s@GetAggregateComplianceDetailsByConfigRuleResponse' {} Maybe Text
a -> GetAggregateComplianceDetailsByConfigRuleResponse
s {$sel:nextToken:GetAggregateComplianceDetailsByConfigRuleResponse' :: Maybe Text
nextToken = Maybe Text
a} :: GetAggregateComplianceDetailsByConfigRuleResponse)

-- | Returns an AggregateEvaluationResults object.
getAggregateComplianceDetailsByConfigRuleResponse_aggregateEvaluationResults :: Lens.Lens' GetAggregateComplianceDetailsByConfigRuleResponse (Prelude.Maybe [AggregateEvaluationResult])
getAggregateComplianceDetailsByConfigRuleResponse_aggregateEvaluationResults :: (Maybe [AggregateEvaluationResult]
 -> f (Maybe [AggregateEvaluationResult]))
-> GetAggregateComplianceDetailsByConfigRuleResponse
-> f GetAggregateComplianceDetailsByConfigRuleResponse
getAggregateComplianceDetailsByConfigRuleResponse_aggregateEvaluationResults = (GetAggregateComplianceDetailsByConfigRuleResponse
 -> Maybe [AggregateEvaluationResult])
-> (GetAggregateComplianceDetailsByConfigRuleResponse
    -> Maybe [AggregateEvaluationResult]
    -> GetAggregateComplianceDetailsByConfigRuleResponse)
-> Lens'
     GetAggregateComplianceDetailsByConfigRuleResponse
     (Maybe [AggregateEvaluationResult])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetAggregateComplianceDetailsByConfigRuleResponse' {Maybe [AggregateEvaluationResult]
aggregateEvaluationResults :: Maybe [AggregateEvaluationResult]
$sel:aggregateEvaluationResults:GetAggregateComplianceDetailsByConfigRuleResponse' :: GetAggregateComplianceDetailsByConfigRuleResponse
-> Maybe [AggregateEvaluationResult]
aggregateEvaluationResults} -> Maybe [AggregateEvaluationResult]
aggregateEvaluationResults) (\s :: GetAggregateComplianceDetailsByConfigRuleResponse
s@GetAggregateComplianceDetailsByConfigRuleResponse' {} Maybe [AggregateEvaluationResult]
a -> GetAggregateComplianceDetailsByConfigRuleResponse
s {$sel:aggregateEvaluationResults:GetAggregateComplianceDetailsByConfigRuleResponse' :: Maybe [AggregateEvaluationResult]
aggregateEvaluationResults = Maybe [AggregateEvaluationResult]
a} :: GetAggregateComplianceDetailsByConfigRuleResponse) ((Maybe [AggregateEvaluationResult]
  -> f (Maybe [AggregateEvaluationResult]))
 -> GetAggregateComplianceDetailsByConfigRuleResponse
 -> f GetAggregateComplianceDetailsByConfigRuleResponse)
-> ((Maybe [AggregateEvaluationResult]
     -> f (Maybe [AggregateEvaluationResult]))
    -> Maybe [AggregateEvaluationResult]
    -> f (Maybe [AggregateEvaluationResult]))
-> (Maybe [AggregateEvaluationResult]
    -> f (Maybe [AggregateEvaluationResult]))
-> GetAggregateComplianceDetailsByConfigRuleResponse
-> f GetAggregateComplianceDetailsByConfigRuleResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [AggregateEvaluationResult]
  [AggregateEvaluationResult]
  [AggregateEvaluationResult]
  [AggregateEvaluationResult]
-> Iso
     (Maybe [AggregateEvaluationResult])
     (Maybe [AggregateEvaluationResult])
     (Maybe [AggregateEvaluationResult])
     (Maybe [AggregateEvaluationResult])
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
  [AggregateEvaluationResult]
  [AggregateEvaluationResult]
  [AggregateEvaluationResult]
  [AggregateEvaluationResult]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The response's http status code.
getAggregateComplianceDetailsByConfigRuleResponse_httpStatus :: Lens.Lens' GetAggregateComplianceDetailsByConfigRuleResponse Prelude.Int
getAggregateComplianceDetailsByConfigRuleResponse_httpStatus :: (Int -> f Int)
-> GetAggregateComplianceDetailsByConfigRuleResponse
-> f GetAggregateComplianceDetailsByConfigRuleResponse
getAggregateComplianceDetailsByConfigRuleResponse_httpStatus = (GetAggregateComplianceDetailsByConfigRuleResponse -> Int)
-> (GetAggregateComplianceDetailsByConfigRuleResponse
    -> Int -> GetAggregateComplianceDetailsByConfigRuleResponse)
-> Lens
     GetAggregateComplianceDetailsByConfigRuleResponse
     GetAggregateComplianceDetailsByConfigRuleResponse
     Int
     Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetAggregateComplianceDetailsByConfigRuleResponse' {Int
httpStatus :: Int
$sel:httpStatus:GetAggregateComplianceDetailsByConfigRuleResponse' :: GetAggregateComplianceDetailsByConfigRuleResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: GetAggregateComplianceDetailsByConfigRuleResponse
s@GetAggregateComplianceDetailsByConfigRuleResponse' {} Int
a -> GetAggregateComplianceDetailsByConfigRuleResponse
s {$sel:httpStatus:GetAggregateComplianceDetailsByConfigRuleResponse' :: Int
httpStatus = Int
a} :: GetAggregateComplianceDetailsByConfigRuleResponse)

instance
  Prelude.NFData
    GetAggregateComplianceDetailsByConfigRuleResponse