{-# 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.GetConformancePackComplianceDetails
-- 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 compliance details of a conformance pack for all Amazon Web
-- Services resources that are monitered by conformance pack.
module Amazonka.Config.GetConformancePackComplianceDetails
  ( -- * Creating a Request
    GetConformancePackComplianceDetails (..),
    newGetConformancePackComplianceDetails,

    -- * Request Lenses
    getConformancePackComplianceDetails_filters,
    getConformancePackComplianceDetails_nextToken,
    getConformancePackComplianceDetails_limit,
    getConformancePackComplianceDetails_conformancePackName,

    -- * Destructuring the Response
    GetConformancePackComplianceDetailsResponse (..),
    newGetConformancePackComplianceDetailsResponse,

    -- * Response Lenses
    getConformancePackComplianceDetailsResponse_nextToken,
    getConformancePackComplianceDetailsResponse_conformancePackRuleEvaluationResults,
    getConformancePackComplianceDetailsResponse_httpStatus,
    getConformancePackComplianceDetailsResponse_conformancePackName,
  )
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:/ 'newGetConformancePackComplianceDetails' smart constructor.
data GetConformancePackComplianceDetails = GetConformancePackComplianceDetails'
  { -- | A @ConformancePackEvaluationFilters@ object.
    GetConformancePackComplianceDetails
-> Maybe ConformancePackEvaluationFilters
filters :: Prelude.Maybe ConformancePackEvaluationFilters,
    -- | The @nextToken@ string returned in a previous request that you use to
    -- request the next page of results in a paginated response.
    GetConformancePackComplianceDetails -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The maximum number of evaluation results returned on each page. If you
    -- do no specify a number, Config uses the default. The default is 100.
    GetConformancePackComplianceDetails -> Maybe Natural
limit :: Prelude.Maybe Prelude.Natural,
    -- | Name of the conformance pack.
    GetConformancePackComplianceDetails -> Text
conformancePackName :: Prelude.Text
  }
  deriving (GetConformancePackComplianceDetails
-> GetConformancePackComplianceDetails -> Bool
(GetConformancePackComplianceDetails
 -> GetConformancePackComplianceDetails -> Bool)
-> (GetConformancePackComplianceDetails
    -> GetConformancePackComplianceDetails -> Bool)
-> Eq GetConformancePackComplianceDetails
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetConformancePackComplianceDetails
-> GetConformancePackComplianceDetails -> Bool
$c/= :: GetConformancePackComplianceDetails
-> GetConformancePackComplianceDetails -> Bool
== :: GetConformancePackComplianceDetails
-> GetConformancePackComplianceDetails -> Bool
$c== :: GetConformancePackComplianceDetails
-> GetConformancePackComplianceDetails -> Bool
Prelude.Eq, ReadPrec [GetConformancePackComplianceDetails]
ReadPrec GetConformancePackComplianceDetails
Int -> ReadS GetConformancePackComplianceDetails
ReadS [GetConformancePackComplianceDetails]
(Int -> ReadS GetConformancePackComplianceDetails)
-> ReadS [GetConformancePackComplianceDetails]
-> ReadPrec GetConformancePackComplianceDetails
-> ReadPrec [GetConformancePackComplianceDetails]
-> Read GetConformancePackComplianceDetails
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetConformancePackComplianceDetails]
$creadListPrec :: ReadPrec [GetConformancePackComplianceDetails]
readPrec :: ReadPrec GetConformancePackComplianceDetails
$creadPrec :: ReadPrec GetConformancePackComplianceDetails
readList :: ReadS [GetConformancePackComplianceDetails]
$creadList :: ReadS [GetConformancePackComplianceDetails]
readsPrec :: Int -> ReadS GetConformancePackComplianceDetails
$creadsPrec :: Int -> ReadS GetConformancePackComplianceDetails
Prelude.Read, Int -> GetConformancePackComplianceDetails -> ShowS
[GetConformancePackComplianceDetails] -> ShowS
GetConformancePackComplianceDetails -> String
(Int -> GetConformancePackComplianceDetails -> ShowS)
-> (GetConformancePackComplianceDetails -> String)
-> ([GetConformancePackComplianceDetails] -> ShowS)
-> Show GetConformancePackComplianceDetails
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetConformancePackComplianceDetails] -> ShowS
$cshowList :: [GetConformancePackComplianceDetails] -> ShowS
show :: GetConformancePackComplianceDetails -> String
$cshow :: GetConformancePackComplianceDetails -> String
showsPrec :: Int -> GetConformancePackComplianceDetails -> ShowS
$cshowsPrec :: Int -> GetConformancePackComplianceDetails -> ShowS
Prelude.Show, (forall x.
 GetConformancePackComplianceDetails
 -> Rep GetConformancePackComplianceDetails x)
-> (forall x.
    Rep GetConformancePackComplianceDetails x
    -> GetConformancePackComplianceDetails)
-> Generic GetConformancePackComplianceDetails
forall x.
Rep GetConformancePackComplianceDetails x
-> GetConformancePackComplianceDetails
forall x.
GetConformancePackComplianceDetails
-> Rep GetConformancePackComplianceDetails x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetConformancePackComplianceDetails x
-> GetConformancePackComplianceDetails
$cfrom :: forall x.
GetConformancePackComplianceDetails
-> Rep GetConformancePackComplianceDetails x
Prelude.Generic)

-- |
-- Create a value of 'GetConformancePackComplianceDetails' 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:
--
-- 'filters', 'getConformancePackComplianceDetails_filters' - A @ConformancePackEvaluationFilters@ object.
--
-- 'nextToken', 'getConformancePackComplianceDetails_nextToken' - The @nextToken@ string returned in a previous request that you use to
-- request the next page of results in a paginated response.
--
-- 'limit', 'getConformancePackComplianceDetails_limit' - The maximum number of evaluation results returned on each page. If you
-- do no specify a number, Config uses the default. The default is 100.
--
-- 'conformancePackName', 'getConformancePackComplianceDetails_conformancePackName' - Name of the conformance pack.
newGetConformancePackComplianceDetails ::
  -- | 'conformancePackName'
  Prelude.Text ->
  GetConformancePackComplianceDetails
newGetConformancePackComplianceDetails :: Text -> GetConformancePackComplianceDetails
newGetConformancePackComplianceDetails
  Text
pConformancePackName_ =
    GetConformancePackComplianceDetails' :: Maybe ConformancePackEvaluationFilters
-> Maybe Text
-> Maybe Natural
-> Text
-> GetConformancePackComplianceDetails
GetConformancePackComplianceDetails'
      { $sel:filters:GetConformancePackComplianceDetails' :: Maybe ConformancePackEvaluationFilters
filters =
          Maybe ConformancePackEvaluationFilters
forall a. Maybe a
Prelude.Nothing,
        $sel:nextToken:GetConformancePackComplianceDetails' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:limit:GetConformancePackComplianceDetails' :: Maybe Natural
limit = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
        $sel:conformancePackName:GetConformancePackComplianceDetails' :: Text
conformancePackName =
          Text
pConformancePackName_
      }

-- | A @ConformancePackEvaluationFilters@ object.
getConformancePackComplianceDetails_filters :: Lens.Lens' GetConformancePackComplianceDetails (Prelude.Maybe ConformancePackEvaluationFilters)
getConformancePackComplianceDetails_filters :: (Maybe ConformancePackEvaluationFilters
 -> f (Maybe ConformancePackEvaluationFilters))
-> GetConformancePackComplianceDetails
-> f GetConformancePackComplianceDetails
getConformancePackComplianceDetails_filters = (GetConformancePackComplianceDetails
 -> Maybe ConformancePackEvaluationFilters)
-> (GetConformancePackComplianceDetails
    -> Maybe ConformancePackEvaluationFilters
    -> GetConformancePackComplianceDetails)
-> Lens
     GetConformancePackComplianceDetails
     GetConformancePackComplianceDetails
     (Maybe ConformancePackEvaluationFilters)
     (Maybe ConformancePackEvaluationFilters)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetConformancePackComplianceDetails' {Maybe ConformancePackEvaluationFilters
filters :: Maybe ConformancePackEvaluationFilters
$sel:filters:GetConformancePackComplianceDetails' :: GetConformancePackComplianceDetails
-> Maybe ConformancePackEvaluationFilters
filters} -> Maybe ConformancePackEvaluationFilters
filters) (\s :: GetConformancePackComplianceDetails
s@GetConformancePackComplianceDetails' {} Maybe ConformancePackEvaluationFilters
a -> GetConformancePackComplianceDetails
s {$sel:filters:GetConformancePackComplianceDetails' :: Maybe ConformancePackEvaluationFilters
filters = Maybe ConformancePackEvaluationFilters
a} :: GetConformancePackComplianceDetails)

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

-- | The maximum number of evaluation results returned on each page. If you
-- do no specify a number, Config uses the default. The default is 100.
getConformancePackComplianceDetails_limit :: Lens.Lens' GetConformancePackComplianceDetails (Prelude.Maybe Prelude.Natural)
getConformancePackComplianceDetails_limit :: (Maybe Natural -> f (Maybe Natural))
-> GetConformancePackComplianceDetails
-> f GetConformancePackComplianceDetails
getConformancePackComplianceDetails_limit = (GetConformancePackComplianceDetails -> Maybe Natural)
-> (GetConformancePackComplianceDetails
    -> Maybe Natural -> GetConformancePackComplianceDetails)
-> Lens
     GetConformancePackComplianceDetails
     GetConformancePackComplianceDetails
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetConformancePackComplianceDetails' {Maybe Natural
limit :: Maybe Natural
$sel:limit:GetConformancePackComplianceDetails' :: GetConformancePackComplianceDetails -> Maybe Natural
limit} -> Maybe Natural
limit) (\s :: GetConformancePackComplianceDetails
s@GetConformancePackComplianceDetails' {} Maybe Natural
a -> GetConformancePackComplianceDetails
s {$sel:limit:GetConformancePackComplianceDetails' :: Maybe Natural
limit = Maybe Natural
a} :: GetConformancePackComplianceDetails)

-- | Name of the conformance pack.
getConformancePackComplianceDetails_conformancePackName :: Lens.Lens' GetConformancePackComplianceDetails Prelude.Text
getConformancePackComplianceDetails_conformancePackName :: (Text -> f Text)
-> GetConformancePackComplianceDetails
-> f GetConformancePackComplianceDetails
getConformancePackComplianceDetails_conformancePackName = (GetConformancePackComplianceDetails -> Text)
-> (GetConformancePackComplianceDetails
    -> Text -> GetConformancePackComplianceDetails)
-> Lens
     GetConformancePackComplianceDetails
     GetConformancePackComplianceDetails
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetConformancePackComplianceDetails' {Text
conformancePackName :: Text
$sel:conformancePackName:GetConformancePackComplianceDetails' :: GetConformancePackComplianceDetails -> Text
conformancePackName} -> Text
conformancePackName) (\s :: GetConformancePackComplianceDetails
s@GetConformancePackComplianceDetails' {} Text
a -> GetConformancePackComplianceDetails
s {$sel:conformancePackName:GetConformancePackComplianceDetails' :: Text
conformancePackName = Text
a} :: GetConformancePackComplianceDetails)

instance
  Core.AWSRequest
    GetConformancePackComplianceDetails
  where
  type
    AWSResponse GetConformancePackComplianceDetails =
      GetConformancePackComplianceDetailsResponse
  request :: GetConformancePackComplianceDetails
-> Request GetConformancePackComplianceDetails
request = Service
-> GetConformancePackComplianceDetails
-> Request GetConformancePackComplianceDetails
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy GetConformancePackComplianceDetails
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse GetConformancePackComplianceDetails)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse GetConformancePackComplianceDetails))
-> Logger
-> Service
-> Proxy GetConformancePackComplianceDetails
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse GetConformancePackComplianceDetails)))
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 [ConformancePackEvaluationResult]
-> Int
-> Text
-> GetConformancePackComplianceDetailsResponse
GetConformancePackComplianceDetailsResponse'
            (Maybe Text
 -> Maybe [ConformancePackEvaluationResult]
 -> Int
 -> Text
 -> GetConformancePackComplianceDetailsResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe [ConformancePackEvaluationResult]
      -> Int -> Text -> GetConformancePackComplianceDetailsResponse)
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 [ConformancePackEvaluationResult]
   -> Int -> Text -> GetConformancePackComplianceDetailsResponse)
-> Either String (Maybe [ConformancePackEvaluationResult])
-> Either
     String (Int -> Text -> GetConformancePackComplianceDetailsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object
-> Text
-> Either String (Maybe (Maybe [ConformancePackEvaluationResult]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"ConformancePackRuleEvaluationResults"
                              Either String (Maybe (Maybe [ConformancePackEvaluationResult]))
-> Maybe [ConformancePackEvaluationResult]
-> Either String (Maybe [ConformancePackEvaluationResult])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [ConformancePackEvaluationResult]
forall a. Monoid a => a
Prelude.mempty
                          )
              Either
  String (Int -> Text -> GetConformancePackComplianceDetailsResponse)
-> Either String Int
-> Either
     String (Text -> GetConformancePackComplianceDetailsResponse)
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))
              Either String (Text -> GetConformancePackComplianceDetailsResponse)
-> Either String Text
-> Either String GetConformancePackComplianceDetailsResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String Text
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"ConformancePackName")
      )

instance
  Prelude.Hashable
    GetConformancePackComplianceDetails

instance
  Prelude.NFData
    GetConformancePackComplianceDetails

instance
  Core.ToHeaders
    GetConformancePackComplianceDetails
  where
  toHeaders :: GetConformancePackComplianceDetails -> ResponseHeaders
toHeaders =
    ResponseHeaders
-> GetConformancePackComplianceDetails -> 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.GetConformancePackComplianceDetails" ::
                          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
    GetConformancePackComplianceDetails
  where
  toJSON :: GetConformancePackComplianceDetails -> Value
toJSON GetConformancePackComplianceDetails' {Maybe Natural
Maybe Text
Maybe ConformancePackEvaluationFilters
Text
conformancePackName :: Text
limit :: Maybe Natural
nextToken :: Maybe Text
filters :: Maybe ConformancePackEvaluationFilters
$sel:conformancePackName:GetConformancePackComplianceDetails' :: GetConformancePackComplianceDetails -> Text
$sel:limit:GetConformancePackComplianceDetails' :: GetConformancePackComplianceDetails -> Maybe Natural
$sel:nextToken:GetConformancePackComplianceDetails' :: GetConformancePackComplianceDetails -> Maybe Text
$sel:filters:GetConformancePackComplianceDetails' :: GetConformancePackComplianceDetails
-> Maybe ConformancePackEvaluationFilters
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"Filters" Text -> ConformancePackEvaluationFilters -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (ConformancePackEvaluationFilters -> Pair)
-> Maybe ConformancePackEvaluationFilters -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ConformancePackEvaluationFilters
filters,
            (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,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              (Text
"ConformancePackName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
conformancePackName)
          ]
      )

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

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

-- | /See:/ 'newGetConformancePackComplianceDetailsResponse' smart constructor.
data GetConformancePackComplianceDetailsResponse = GetConformancePackComplianceDetailsResponse'
  { -- | The @nextToken@ string returned in a previous request that you use to
    -- request the next page of results in a paginated response.
    GetConformancePackComplianceDetailsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | Returns a list of @ConformancePackEvaluationResult@ objects.
    GetConformancePackComplianceDetailsResponse
-> Maybe [ConformancePackEvaluationResult]
conformancePackRuleEvaluationResults :: Prelude.Maybe [ConformancePackEvaluationResult],
    -- | The response's http status code.
    GetConformancePackComplianceDetailsResponse -> Int
httpStatus :: Prelude.Int,
    -- | Name of the conformance pack.
    GetConformancePackComplianceDetailsResponse -> Text
conformancePackName :: Prelude.Text
  }
  deriving (GetConformancePackComplianceDetailsResponse
-> GetConformancePackComplianceDetailsResponse -> Bool
(GetConformancePackComplianceDetailsResponse
 -> GetConformancePackComplianceDetailsResponse -> Bool)
-> (GetConformancePackComplianceDetailsResponse
    -> GetConformancePackComplianceDetailsResponse -> Bool)
-> Eq GetConformancePackComplianceDetailsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetConformancePackComplianceDetailsResponse
-> GetConformancePackComplianceDetailsResponse -> Bool
$c/= :: GetConformancePackComplianceDetailsResponse
-> GetConformancePackComplianceDetailsResponse -> Bool
== :: GetConformancePackComplianceDetailsResponse
-> GetConformancePackComplianceDetailsResponse -> Bool
$c== :: GetConformancePackComplianceDetailsResponse
-> GetConformancePackComplianceDetailsResponse -> Bool
Prelude.Eq, ReadPrec [GetConformancePackComplianceDetailsResponse]
ReadPrec GetConformancePackComplianceDetailsResponse
Int -> ReadS GetConformancePackComplianceDetailsResponse
ReadS [GetConformancePackComplianceDetailsResponse]
(Int -> ReadS GetConformancePackComplianceDetailsResponse)
-> ReadS [GetConformancePackComplianceDetailsResponse]
-> ReadPrec GetConformancePackComplianceDetailsResponse
-> ReadPrec [GetConformancePackComplianceDetailsResponse]
-> Read GetConformancePackComplianceDetailsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetConformancePackComplianceDetailsResponse]
$creadListPrec :: ReadPrec [GetConformancePackComplianceDetailsResponse]
readPrec :: ReadPrec GetConformancePackComplianceDetailsResponse
$creadPrec :: ReadPrec GetConformancePackComplianceDetailsResponse
readList :: ReadS [GetConformancePackComplianceDetailsResponse]
$creadList :: ReadS [GetConformancePackComplianceDetailsResponse]
readsPrec :: Int -> ReadS GetConformancePackComplianceDetailsResponse
$creadsPrec :: Int -> ReadS GetConformancePackComplianceDetailsResponse
Prelude.Read, Int -> GetConformancePackComplianceDetailsResponse -> ShowS
[GetConformancePackComplianceDetailsResponse] -> ShowS
GetConformancePackComplianceDetailsResponse -> String
(Int -> GetConformancePackComplianceDetailsResponse -> ShowS)
-> (GetConformancePackComplianceDetailsResponse -> String)
-> ([GetConformancePackComplianceDetailsResponse] -> ShowS)
-> Show GetConformancePackComplianceDetailsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetConformancePackComplianceDetailsResponse] -> ShowS
$cshowList :: [GetConformancePackComplianceDetailsResponse] -> ShowS
show :: GetConformancePackComplianceDetailsResponse -> String
$cshow :: GetConformancePackComplianceDetailsResponse -> String
showsPrec :: Int -> GetConformancePackComplianceDetailsResponse -> ShowS
$cshowsPrec :: Int -> GetConformancePackComplianceDetailsResponse -> ShowS
Prelude.Show, (forall x.
 GetConformancePackComplianceDetailsResponse
 -> Rep GetConformancePackComplianceDetailsResponse x)
-> (forall x.
    Rep GetConformancePackComplianceDetailsResponse x
    -> GetConformancePackComplianceDetailsResponse)
-> Generic GetConformancePackComplianceDetailsResponse
forall x.
Rep GetConformancePackComplianceDetailsResponse x
-> GetConformancePackComplianceDetailsResponse
forall x.
GetConformancePackComplianceDetailsResponse
-> Rep GetConformancePackComplianceDetailsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetConformancePackComplianceDetailsResponse x
-> GetConformancePackComplianceDetailsResponse
$cfrom :: forall x.
GetConformancePackComplianceDetailsResponse
-> Rep GetConformancePackComplianceDetailsResponse x
Prelude.Generic)

-- |
-- Create a value of 'GetConformancePackComplianceDetailsResponse' 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', 'getConformancePackComplianceDetailsResponse_nextToken' - The @nextToken@ string returned in a previous request that you use to
-- request the next page of results in a paginated response.
--
-- 'conformancePackRuleEvaluationResults', 'getConformancePackComplianceDetailsResponse_conformancePackRuleEvaluationResults' - Returns a list of @ConformancePackEvaluationResult@ objects.
--
-- 'httpStatus', 'getConformancePackComplianceDetailsResponse_httpStatus' - The response's http status code.
--
-- 'conformancePackName', 'getConformancePackComplianceDetailsResponse_conformancePackName' - Name of the conformance pack.
newGetConformancePackComplianceDetailsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  -- | 'conformancePackName'
  Prelude.Text ->
  GetConformancePackComplianceDetailsResponse
newGetConformancePackComplianceDetailsResponse :: Int -> Text -> GetConformancePackComplianceDetailsResponse
newGetConformancePackComplianceDetailsResponse
  Int
pHttpStatus_
  Text
pConformancePackName_ =
    GetConformancePackComplianceDetailsResponse' :: Maybe Text
-> Maybe [ConformancePackEvaluationResult]
-> Int
-> Text
-> GetConformancePackComplianceDetailsResponse
GetConformancePackComplianceDetailsResponse'
      { $sel:nextToken:GetConformancePackComplianceDetailsResponse' :: Maybe Text
nextToken =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:conformancePackRuleEvaluationResults:GetConformancePackComplianceDetailsResponse' :: Maybe [ConformancePackEvaluationResult]
conformancePackRuleEvaluationResults =
          Maybe [ConformancePackEvaluationResult]
forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:GetConformancePackComplianceDetailsResponse' :: Int
httpStatus = Int
pHttpStatus_,
        $sel:conformancePackName:GetConformancePackComplianceDetailsResponse' :: Text
conformancePackName =
          Text
pConformancePackName_
      }

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

-- | Returns a list of @ConformancePackEvaluationResult@ objects.
getConformancePackComplianceDetailsResponse_conformancePackRuleEvaluationResults :: Lens.Lens' GetConformancePackComplianceDetailsResponse (Prelude.Maybe [ConformancePackEvaluationResult])
getConformancePackComplianceDetailsResponse_conformancePackRuleEvaluationResults :: (Maybe [ConformancePackEvaluationResult]
 -> f (Maybe [ConformancePackEvaluationResult]))
-> GetConformancePackComplianceDetailsResponse
-> f GetConformancePackComplianceDetailsResponse
getConformancePackComplianceDetailsResponse_conformancePackRuleEvaluationResults = (GetConformancePackComplianceDetailsResponse
 -> Maybe [ConformancePackEvaluationResult])
-> (GetConformancePackComplianceDetailsResponse
    -> Maybe [ConformancePackEvaluationResult]
    -> GetConformancePackComplianceDetailsResponse)
-> Lens
     GetConformancePackComplianceDetailsResponse
     GetConformancePackComplianceDetailsResponse
     (Maybe [ConformancePackEvaluationResult])
     (Maybe [ConformancePackEvaluationResult])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetConformancePackComplianceDetailsResponse' {Maybe [ConformancePackEvaluationResult]
conformancePackRuleEvaluationResults :: Maybe [ConformancePackEvaluationResult]
$sel:conformancePackRuleEvaluationResults:GetConformancePackComplianceDetailsResponse' :: GetConformancePackComplianceDetailsResponse
-> Maybe [ConformancePackEvaluationResult]
conformancePackRuleEvaluationResults} -> Maybe [ConformancePackEvaluationResult]
conformancePackRuleEvaluationResults) (\s :: GetConformancePackComplianceDetailsResponse
s@GetConformancePackComplianceDetailsResponse' {} Maybe [ConformancePackEvaluationResult]
a -> GetConformancePackComplianceDetailsResponse
s {$sel:conformancePackRuleEvaluationResults:GetConformancePackComplianceDetailsResponse' :: Maybe [ConformancePackEvaluationResult]
conformancePackRuleEvaluationResults = Maybe [ConformancePackEvaluationResult]
a} :: GetConformancePackComplianceDetailsResponse) ((Maybe [ConformancePackEvaluationResult]
  -> f (Maybe [ConformancePackEvaluationResult]))
 -> GetConformancePackComplianceDetailsResponse
 -> f GetConformancePackComplianceDetailsResponse)
-> ((Maybe [ConformancePackEvaluationResult]
     -> f (Maybe [ConformancePackEvaluationResult]))
    -> Maybe [ConformancePackEvaluationResult]
    -> f (Maybe [ConformancePackEvaluationResult]))
-> (Maybe [ConformancePackEvaluationResult]
    -> f (Maybe [ConformancePackEvaluationResult]))
-> GetConformancePackComplianceDetailsResponse
-> f GetConformancePackComplianceDetailsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [ConformancePackEvaluationResult]
  [ConformancePackEvaluationResult]
  [ConformancePackEvaluationResult]
  [ConformancePackEvaluationResult]
-> Iso
     (Maybe [ConformancePackEvaluationResult])
     (Maybe [ConformancePackEvaluationResult])
     (Maybe [ConformancePackEvaluationResult])
     (Maybe [ConformancePackEvaluationResult])
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
  [ConformancePackEvaluationResult]
  [ConformancePackEvaluationResult]
  [ConformancePackEvaluationResult]
  [ConformancePackEvaluationResult]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

-- | Name of the conformance pack.
getConformancePackComplianceDetailsResponse_conformancePackName :: Lens.Lens' GetConformancePackComplianceDetailsResponse Prelude.Text
getConformancePackComplianceDetailsResponse_conformancePackName :: (Text -> f Text)
-> GetConformancePackComplianceDetailsResponse
-> f GetConformancePackComplianceDetailsResponse
getConformancePackComplianceDetailsResponse_conformancePackName = (GetConformancePackComplianceDetailsResponse -> Text)
-> (GetConformancePackComplianceDetailsResponse
    -> Text -> GetConformancePackComplianceDetailsResponse)
-> Lens
     GetConformancePackComplianceDetailsResponse
     GetConformancePackComplianceDetailsResponse
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetConformancePackComplianceDetailsResponse' {Text
conformancePackName :: Text
$sel:conformancePackName:GetConformancePackComplianceDetailsResponse' :: GetConformancePackComplianceDetailsResponse -> Text
conformancePackName} -> Text
conformancePackName) (\s :: GetConformancePackComplianceDetailsResponse
s@GetConformancePackComplianceDetailsResponse' {} Text
a -> GetConformancePackComplianceDetailsResponse
s {$sel:conformancePackName:GetConformancePackComplianceDetailsResponse' :: Text
conformancePackName = Text
a} :: GetConformancePackComplianceDetailsResponse)

instance
  Prelude.NFData
    GetConformancePackComplianceDetailsResponse