{-# 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.DescribeConformancePackCompliance
-- 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 for each rule in that conformance pack.
--
-- You must provide exact rule names.
module Amazonka.Config.DescribeConformancePackCompliance
  ( -- * Creating a Request
    DescribeConformancePackCompliance (..),
    newDescribeConformancePackCompliance,

    -- * Request Lenses
    describeConformancePackCompliance_filters,
    describeConformancePackCompliance_nextToken,
    describeConformancePackCompliance_limit,
    describeConformancePackCompliance_conformancePackName,

    -- * Destructuring the Response
    DescribeConformancePackComplianceResponse (..),
    newDescribeConformancePackComplianceResponse,

    -- * Response Lenses
    describeConformancePackComplianceResponse_nextToken,
    describeConformancePackComplianceResponse_httpStatus,
    describeConformancePackComplianceResponse_conformancePackName,
    describeConformancePackComplianceResponse_conformancePackRuleComplianceList,
  )
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:/ 'newDescribeConformancePackCompliance' smart constructor.
data DescribeConformancePackCompliance = DescribeConformancePackCompliance'
  { -- | A @ConformancePackComplianceFilters@ object.
    DescribeConformancePackCompliance
-> Maybe ConformancePackComplianceFilters
filters :: Prelude.Maybe ConformancePackComplianceFilters,
    -- | The @nextToken@ string returned in a previous request that you use to
    -- request the next page of results in a paginated response.
    DescribeConformancePackCompliance -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The maximum number of Config rules within a conformance pack are
    -- returned on each page.
    DescribeConformancePackCompliance -> Maybe Natural
limit :: Prelude.Maybe Prelude.Natural,
    -- | Name of the conformance pack.
    DescribeConformancePackCompliance -> Text
conformancePackName :: Prelude.Text
  }
  deriving (DescribeConformancePackCompliance
-> DescribeConformancePackCompliance -> Bool
(DescribeConformancePackCompliance
 -> DescribeConformancePackCompliance -> Bool)
-> (DescribeConformancePackCompliance
    -> DescribeConformancePackCompliance -> Bool)
-> Eq DescribeConformancePackCompliance
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeConformancePackCompliance
-> DescribeConformancePackCompliance -> Bool
$c/= :: DescribeConformancePackCompliance
-> DescribeConformancePackCompliance -> Bool
== :: DescribeConformancePackCompliance
-> DescribeConformancePackCompliance -> Bool
$c== :: DescribeConformancePackCompliance
-> DescribeConformancePackCompliance -> Bool
Prelude.Eq, ReadPrec [DescribeConformancePackCompliance]
ReadPrec DescribeConformancePackCompliance
Int -> ReadS DescribeConformancePackCompliance
ReadS [DescribeConformancePackCompliance]
(Int -> ReadS DescribeConformancePackCompliance)
-> ReadS [DescribeConformancePackCompliance]
-> ReadPrec DescribeConformancePackCompliance
-> ReadPrec [DescribeConformancePackCompliance]
-> Read DescribeConformancePackCompliance
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeConformancePackCompliance]
$creadListPrec :: ReadPrec [DescribeConformancePackCompliance]
readPrec :: ReadPrec DescribeConformancePackCompliance
$creadPrec :: ReadPrec DescribeConformancePackCompliance
readList :: ReadS [DescribeConformancePackCompliance]
$creadList :: ReadS [DescribeConformancePackCompliance]
readsPrec :: Int -> ReadS DescribeConformancePackCompliance
$creadsPrec :: Int -> ReadS DescribeConformancePackCompliance
Prelude.Read, Int -> DescribeConformancePackCompliance -> ShowS
[DescribeConformancePackCompliance] -> ShowS
DescribeConformancePackCompliance -> String
(Int -> DescribeConformancePackCompliance -> ShowS)
-> (DescribeConformancePackCompliance -> String)
-> ([DescribeConformancePackCompliance] -> ShowS)
-> Show DescribeConformancePackCompliance
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeConformancePackCompliance] -> ShowS
$cshowList :: [DescribeConformancePackCompliance] -> ShowS
show :: DescribeConformancePackCompliance -> String
$cshow :: DescribeConformancePackCompliance -> String
showsPrec :: Int -> DescribeConformancePackCompliance -> ShowS
$cshowsPrec :: Int -> DescribeConformancePackCompliance -> ShowS
Prelude.Show, (forall x.
 DescribeConformancePackCompliance
 -> Rep DescribeConformancePackCompliance x)
-> (forall x.
    Rep DescribeConformancePackCompliance x
    -> DescribeConformancePackCompliance)
-> Generic DescribeConformancePackCompliance
forall x.
Rep DescribeConformancePackCompliance x
-> DescribeConformancePackCompliance
forall x.
DescribeConformancePackCompliance
-> Rep DescribeConformancePackCompliance x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeConformancePackCompliance x
-> DescribeConformancePackCompliance
$cfrom :: forall x.
DescribeConformancePackCompliance
-> Rep DescribeConformancePackCompliance x
Prelude.Generic)

-- |
-- Create a value of 'DescribeConformancePackCompliance' 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', 'describeConformancePackCompliance_filters' - A @ConformancePackComplianceFilters@ object.
--
-- 'nextToken', 'describeConformancePackCompliance_nextToken' - The @nextToken@ string returned in a previous request that you use to
-- request the next page of results in a paginated response.
--
-- 'limit', 'describeConformancePackCompliance_limit' - The maximum number of Config rules within a conformance pack are
-- returned on each page.
--
-- 'conformancePackName', 'describeConformancePackCompliance_conformancePackName' - Name of the conformance pack.
newDescribeConformancePackCompliance ::
  -- | 'conformancePackName'
  Prelude.Text ->
  DescribeConformancePackCompliance
newDescribeConformancePackCompliance :: Text -> DescribeConformancePackCompliance
newDescribeConformancePackCompliance
  Text
pConformancePackName_ =
    DescribeConformancePackCompliance' :: Maybe ConformancePackComplianceFilters
-> Maybe Text
-> Maybe Natural
-> Text
-> DescribeConformancePackCompliance
DescribeConformancePackCompliance'
      { $sel:filters:DescribeConformancePackCompliance' :: Maybe ConformancePackComplianceFilters
filters =
          Maybe ConformancePackComplianceFilters
forall a. Maybe a
Prelude.Nothing,
        $sel:nextToken:DescribeConformancePackCompliance' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:limit:DescribeConformancePackCompliance' :: Maybe Natural
limit = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
        $sel:conformancePackName:DescribeConformancePackCompliance' :: Text
conformancePackName =
          Text
pConformancePackName_
      }

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

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

-- | The maximum number of Config rules within a conformance pack are
-- returned on each page.
describeConformancePackCompliance_limit :: Lens.Lens' DescribeConformancePackCompliance (Prelude.Maybe Prelude.Natural)
describeConformancePackCompliance_limit :: (Maybe Natural -> f (Maybe Natural))
-> DescribeConformancePackCompliance
-> f DescribeConformancePackCompliance
describeConformancePackCompliance_limit = (DescribeConformancePackCompliance -> Maybe Natural)
-> (DescribeConformancePackCompliance
    -> Maybe Natural -> DescribeConformancePackCompliance)
-> Lens
     DescribeConformancePackCompliance
     DescribeConformancePackCompliance
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeConformancePackCompliance' {Maybe Natural
limit :: Maybe Natural
$sel:limit:DescribeConformancePackCompliance' :: DescribeConformancePackCompliance -> Maybe Natural
limit} -> Maybe Natural
limit) (\s :: DescribeConformancePackCompliance
s@DescribeConformancePackCompliance' {} Maybe Natural
a -> DescribeConformancePackCompliance
s {$sel:limit:DescribeConformancePackCompliance' :: Maybe Natural
limit = Maybe Natural
a} :: DescribeConformancePackCompliance)

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

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

instance
  Prelude.Hashable
    DescribeConformancePackCompliance

instance
  Prelude.NFData
    DescribeConformancePackCompliance

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

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

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

-- |
-- Create a value of 'DescribeConformancePackComplianceResponse' 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', 'describeConformancePackComplianceResponse_nextToken' - The @nextToken@ string returned in a previous request that you use to
-- request the next page of results in a paginated response.
--
-- 'httpStatus', 'describeConformancePackComplianceResponse_httpStatus' - The response's http status code.
--
-- 'conformancePackName', 'describeConformancePackComplianceResponse_conformancePackName' - Name of the conformance pack.
--
-- 'conformancePackRuleComplianceList', 'describeConformancePackComplianceResponse_conformancePackRuleComplianceList' - Returns a list of @ConformancePackRuleCompliance@ objects.
newDescribeConformancePackComplianceResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  -- | 'conformancePackName'
  Prelude.Text ->
  DescribeConformancePackComplianceResponse
newDescribeConformancePackComplianceResponse :: Int -> Text -> DescribeConformancePackComplianceResponse
newDescribeConformancePackComplianceResponse
  Int
pHttpStatus_
  Text
pConformancePackName_ =
    DescribeConformancePackComplianceResponse' :: Maybe Text
-> Int
-> Text
-> [ConformancePackRuleCompliance]
-> DescribeConformancePackComplianceResponse
DescribeConformancePackComplianceResponse'
      { $sel:nextToken:DescribeConformancePackComplianceResponse' :: Maybe Text
nextToken =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:DescribeConformancePackComplianceResponse' :: Int
httpStatus = Int
pHttpStatus_,
        $sel:conformancePackName:DescribeConformancePackComplianceResponse' :: Text
conformancePackName =
          Text
pConformancePackName_,
        $sel:conformancePackRuleComplianceList:DescribeConformancePackComplianceResponse' :: [ConformancePackRuleCompliance]
conformancePackRuleComplianceList =
          [ConformancePackRuleCompliance]
forall a. Monoid a => a
Prelude.mempty
      }

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

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

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

-- | Returns a list of @ConformancePackRuleCompliance@ objects.
describeConformancePackComplianceResponse_conformancePackRuleComplianceList :: Lens.Lens' DescribeConformancePackComplianceResponse [ConformancePackRuleCompliance]
describeConformancePackComplianceResponse_conformancePackRuleComplianceList :: ([ConformancePackRuleCompliance]
 -> f [ConformancePackRuleCompliance])
-> DescribeConformancePackComplianceResponse
-> f DescribeConformancePackComplianceResponse
describeConformancePackComplianceResponse_conformancePackRuleComplianceList = (DescribeConformancePackComplianceResponse
 -> [ConformancePackRuleCompliance])
-> (DescribeConformancePackComplianceResponse
    -> [ConformancePackRuleCompliance]
    -> DescribeConformancePackComplianceResponse)
-> Lens
     DescribeConformancePackComplianceResponse
     DescribeConformancePackComplianceResponse
     [ConformancePackRuleCompliance]
     [ConformancePackRuleCompliance]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeConformancePackComplianceResponse' {[ConformancePackRuleCompliance]
conformancePackRuleComplianceList :: [ConformancePackRuleCompliance]
$sel:conformancePackRuleComplianceList:DescribeConformancePackComplianceResponse' :: DescribeConformancePackComplianceResponse
-> [ConformancePackRuleCompliance]
conformancePackRuleComplianceList} -> [ConformancePackRuleCompliance]
conformancePackRuleComplianceList) (\s :: DescribeConformancePackComplianceResponse
s@DescribeConformancePackComplianceResponse' {} [ConformancePackRuleCompliance]
a -> DescribeConformancePackComplianceResponse
s {$sel:conformancePackRuleComplianceList:DescribeConformancePackComplianceResponse' :: [ConformancePackRuleCompliance]
conformancePackRuleComplianceList = [ConformancePackRuleCompliance]
a} :: DescribeConformancePackComplianceResponse) (([ConformancePackRuleCompliance]
  -> f [ConformancePackRuleCompliance])
 -> DescribeConformancePackComplianceResponse
 -> f DescribeConformancePackComplianceResponse)
-> (([ConformancePackRuleCompliance]
     -> f [ConformancePackRuleCompliance])
    -> [ConformancePackRuleCompliance]
    -> f [ConformancePackRuleCompliance])
-> ([ConformancePackRuleCompliance]
    -> f [ConformancePackRuleCompliance])
-> DescribeConformancePackComplianceResponse
-> f DescribeConformancePackComplianceResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([ConformancePackRuleCompliance]
 -> f [ConformancePackRuleCompliance])
-> [ConformancePackRuleCompliance]
-> f [ConformancePackRuleCompliance]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance
  Prelude.NFData
    DescribeConformancePackComplianceResponse