{-# 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.DescribeConformancePacks
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Returns a list of one or more conformance packs.
--
-- This operation returns paginated results.
module Amazonka.Config.DescribeConformancePacks
  ( -- * Creating a Request
    DescribeConformancePacks (..),
    newDescribeConformancePacks,

    -- * Request Lenses
    describeConformancePacks_conformancePackNames,
    describeConformancePacks_limit,
    describeConformancePacks_nextToken,

    -- * Destructuring the Response
    DescribeConformancePacksResponse (..),
    newDescribeConformancePacksResponse,

    -- * Response Lenses
    describeConformancePacksResponse_conformancePackDetails,
    describeConformancePacksResponse_nextToken,
    describeConformancePacksResponse_httpStatus,
  )
where

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

-- | /See:/ 'newDescribeConformancePacks' smart constructor.
data DescribeConformancePacks = DescribeConformancePacks'
  { -- | Comma-separated list of conformance pack names for which you want
    -- details. If you do not specify any names, Config returns details for all
    -- your conformance packs.
    DescribeConformancePacks -> Maybe [Text]
conformancePackNames :: Prelude.Maybe [Prelude.Text],
    -- | The maximum number of conformance packs returned on each page.
    DescribeConformancePacks -> Maybe Natural
limit :: Prelude.Maybe Prelude.Natural,
    -- | The @nextToken@ string returned in a previous request that you use to
    -- request the next page of results in a paginated response.
    DescribeConformancePacks -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text
  }
  deriving (DescribeConformancePacks -> DescribeConformancePacks -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeConformancePacks -> DescribeConformancePacks -> Bool
$c/= :: DescribeConformancePacks -> DescribeConformancePacks -> Bool
== :: DescribeConformancePacks -> DescribeConformancePacks -> Bool
$c== :: DescribeConformancePacks -> DescribeConformancePacks -> Bool
Prelude.Eq, ReadPrec [DescribeConformancePacks]
ReadPrec DescribeConformancePacks
Int -> ReadS DescribeConformancePacks
ReadS [DescribeConformancePacks]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeConformancePacks]
$creadListPrec :: ReadPrec [DescribeConformancePacks]
readPrec :: ReadPrec DescribeConformancePacks
$creadPrec :: ReadPrec DescribeConformancePacks
readList :: ReadS [DescribeConformancePacks]
$creadList :: ReadS [DescribeConformancePacks]
readsPrec :: Int -> ReadS DescribeConformancePacks
$creadsPrec :: Int -> ReadS DescribeConformancePacks
Prelude.Read, Int -> DescribeConformancePacks -> ShowS
[DescribeConformancePacks] -> ShowS
DescribeConformancePacks -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeConformancePacks] -> ShowS
$cshowList :: [DescribeConformancePacks] -> ShowS
show :: DescribeConformancePacks -> String
$cshow :: DescribeConformancePacks -> String
showsPrec :: Int -> DescribeConformancePacks -> ShowS
$cshowsPrec :: Int -> DescribeConformancePacks -> ShowS
Prelude.Show, forall x.
Rep DescribeConformancePacks x -> DescribeConformancePacks
forall x.
DescribeConformancePacks -> Rep DescribeConformancePacks x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeConformancePacks x -> DescribeConformancePacks
$cfrom :: forall x.
DescribeConformancePacks -> Rep DescribeConformancePacks x
Prelude.Generic)

-- |
-- Create a value of 'DescribeConformancePacks' 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:
--
-- 'conformancePackNames', 'describeConformancePacks_conformancePackNames' - Comma-separated list of conformance pack names for which you want
-- details. If you do not specify any names, Config returns details for all
-- your conformance packs.
--
-- 'limit', 'describeConformancePacks_limit' - The maximum number of conformance packs returned on each page.
--
-- 'nextToken', 'describeConformancePacks_nextToken' - The @nextToken@ string returned in a previous request that you use to
-- request the next page of results in a paginated response.
newDescribeConformancePacks ::
  DescribeConformancePacks
newDescribeConformancePacks :: DescribeConformancePacks
newDescribeConformancePacks =
  DescribeConformancePacks'
    { $sel:conformancePackNames:DescribeConformancePacks' :: Maybe [Text]
conformancePackNames =
        forall a. Maybe a
Prelude.Nothing,
      $sel:limit:DescribeConformancePacks' :: Maybe Natural
limit = forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:DescribeConformancePacks' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing
    }

-- | Comma-separated list of conformance pack names for which you want
-- details. If you do not specify any names, Config returns details for all
-- your conformance packs.
describeConformancePacks_conformancePackNames :: Lens.Lens' DescribeConformancePacks (Prelude.Maybe [Prelude.Text])
describeConformancePacks_conformancePackNames :: Lens' DescribeConformancePacks (Maybe [Text])
describeConformancePacks_conformancePackNames = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeConformancePacks' {Maybe [Text]
conformancePackNames :: Maybe [Text]
$sel:conformancePackNames:DescribeConformancePacks' :: DescribeConformancePacks -> Maybe [Text]
conformancePackNames} -> Maybe [Text]
conformancePackNames) (\s :: DescribeConformancePacks
s@DescribeConformancePacks' {} Maybe [Text]
a -> DescribeConformancePacks
s {$sel:conformancePackNames:DescribeConformancePacks' :: Maybe [Text]
conformancePackNames = Maybe [Text]
a} :: DescribeConformancePacks) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The maximum number of conformance packs returned on each page.
describeConformancePacks_limit :: Lens.Lens' DescribeConformancePacks (Prelude.Maybe Prelude.Natural)
describeConformancePacks_limit :: Lens' DescribeConformancePacks (Maybe Natural)
describeConformancePacks_limit = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeConformancePacks' {Maybe Natural
limit :: Maybe Natural
$sel:limit:DescribeConformancePacks' :: DescribeConformancePacks -> Maybe Natural
limit} -> Maybe Natural
limit) (\s :: DescribeConformancePacks
s@DescribeConformancePacks' {} Maybe Natural
a -> DescribeConformancePacks
s {$sel:limit:DescribeConformancePacks' :: Maybe Natural
limit = Maybe Natural
a} :: DescribeConformancePacks)

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

instance Core.AWSPager DescribeConformancePacks where
  page :: DescribeConformancePacks
-> AWSResponse DescribeConformancePacks
-> Maybe DescribeConformancePacks
page DescribeConformancePacks
rq AWSResponse DescribeConformancePacks
rs
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse DescribeConformancePacks
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' DescribeConformancePacksResponse (Maybe Text)
describeConformancePacksResponse_nextToken
            forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
        forall a. Maybe a
Prelude.Nothing
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse DescribeConformancePacks
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens'
  DescribeConformancePacksResponse (Maybe [ConformancePackDetail])
describeConformancePacksResponse_conformancePackDetails
            forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
        forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
        forall a. a -> Maybe a
Prelude.Just
          forall a b. (a -> b) -> a -> b
Prelude.$ DescribeConformancePacks
rq
          forall a b. a -> (a -> b) -> b
Prelude.& Lens' DescribeConformancePacks (Maybe Text)
describeConformancePacks_nextToken
          forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse DescribeConformancePacks
rs
          forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' DescribeConformancePacksResponse (Maybe Text)
describeConformancePacksResponse_nextToken
          forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just

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

instance Prelude.Hashable DescribeConformancePacks where
  hashWithSalt :: Int -> DescribeConformancePacks -> Int
hashWithSalt Int
_salt DescribeConformancePacks' {Maybe Natural
Maybe [Text]
Maybe Text
nextToken :: Maybe Text
limit :: Maybe Natural
conformancePackNames :: Maybe [Text]
$sel:nextToken:DescribeConformancePacks' :: DescribeConformancePacks -> Maybe Text
$sel:limit:DescribeConformancePacks' :: DescribeConformancePacks -> Maybe Natural
$sel:conformancePackNames:DescribeConformancePacks' :: DescribeConformancePacks -> Maybe [Text]
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
conformancePackNames
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
limit
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
nextToken

instance Prelude.NFData DescribeConformancePacks where
  rnf :: DescribeConformancePacks -> ()
rnf DescribeConformancePacks' {Maybe Natural
Maybe [Text]
Maybe Text
nextToken :: Maybe Text
limit :: Maybe Natural
conformancePackNames :: Maybe [Text]
$sel:nextToken:DescribeConformancePacks' :: DescribeConformancePacks -> Maybe Text
$sel:limit:DescribeConformancePacks' :: DescribeConformancePacks -> Maybe Natural
$sel:conformancePackNames:DescribeConformancePacks' :: DescribeConformancePacks -> Maybe [Text]
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
conformancePackNames
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
limit
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken

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

instance Data.ToJSON DescribeConformancePacks where
  toJSON :: DescribeConformancePacks -> Value
toJSON DescribeConformancePacks' {Maybe Natural
Maybe [Text]
Maybe Text
nextToken :: Maybe Text
limit :: Maybe Natural
conformancePackNames :: Maybe [Text]
$sel:nextToken:DescribeConformancePacks' :: DescribeConformancePacks -> Maybe Text
$sel:limit:DescribeConformancePacks' :: DescribeConformancePacks -> Maybe Natural
$sel:conformancePackNames:DescribeConformancePacks' :: DescribeConformancePacks -> Maybe [Text]
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"ConformancePackNames" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
conformancePackNames,
            (Key
"Limit" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
limit,
            (Key
"NextToken" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
nextToken
          ]
      )

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

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

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

-- |
-- Create a value of 'DescribeConformancePacksResponse' 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:
--
-- 'conformancePackDetails', 'describeConformancePacksResponse_conformancePackDetails' - Returns a list of @ConformancePackDetail@ objects.
--
-- 'nextToken', 'describeConformancePacksResponse_nextToken' - The @nextToken@ string returned in a previous request that you use to
-- request the next page of results in a paginated response.
--
-- 'httpStatus', 'describeConformancePacksResponse_httpStatus' - The response's http status code.
newDescribeConformancePacksResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeConformancePacksResponse
newDescribeConformancePacksResponse :: Int -> DescribeConformancePacksResponse
newDescribeConformancePacksResponse Int
pHttpStatus_ =
  DescribeConformancePacksResponse'
    { $sel:conformancePackDetails:DescribeConformancePacksResponse' :: Maybe [ConformancePackDetail]
conformancePackDetails =
        forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:DescribeConformancePacksResponse' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeConformancePacksResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

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

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

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

instance
  Prelude.NFData
    DescribeConformancePacksResponse
  where
  rnf :: DescribeConformancePacksResponse -> ()
rnf DescribeConformancePacksResponse' {Int
Maybe [ConformancePackDetail]
Maybe Text
httpStatus :: Int
nextToken :: Maybe Text
conformancePackDetails :: Maybe [ConformancePackDetail]
$sel:httpStatus:DescribeConformancePacksResponse' :: DescribeConformancePacksResponse -> Int
$sel:nextToken:DescribeConformancePacksResponse' :: DescribeConformancePacksResponse -> Maybe Text
$sel:conformancePackDetails:DescribeConformancePacksResponse' :: DescribeConformancePacksResponse -> Maybe [ConformancePackDetail]
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe [ConformancePackDetail]
conformancePackDetails
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus