{-# 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.DescribeConformancePackStatus
-- 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)
--
-- Provides one or more conformance packs deployment status.
--
-- If there are no conformance packs then you will see an empty result.
--
-- This operation returns paginated results.
module Amazonka.Config.DescribeConformancePackStatus
  ( -- * Creating a Request
    DescribeConformancePackStatus (..),
    newDescribeConformancePackStatus,

    -- * Request Lenses
    describeConformancePackStatus_conformancePackNames,
    describeConformancePackStatus_nextToken,
    describeConformancePackStatus_limit,

    -- * Destructuring the Response
    DescribeConformancePackStatusResponse (..),
    newDescribeConformancePackStatusResponse,

    -- * Response Lenses
    describeConformancePackStatusResponse_conformancePackStatusDetails,
    describeConformancePackStatusResponse_nextToken,
    describeConformancePackStatusResponse_httpStatus,
  )
where

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

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

-- |
-- Create a value of 'DescribeConformancePackStatus' 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', 'describeConformancePackStatus_conformancePackNames' - Comma-separated list of conformance pack names.
--
-- 'nextToken', 'describeConformancePackStatus_nextToken' - The @nextToken@ string returned in a previous request that you use to
-- request the next page of results in a paginated response.
--
-- 'limit', 'describeConformancePackStatus_limit' - The maximum number of conformance packs status returned on each page.
newDescribeConformancePackStatus ::
  DescribeConformancePackStatus
newDescribeConformancePackStatus :: DescribeConformancePackStatus
newDescribeConformancePackStatus =
  DescribeConformancePackStatus' :: Maybe [Text]
-> Maybe Text -> Maybe Natural -> DescribeConformancePackStatus
DescribeConformancePackStatus'
    { $sel:conformancePackNames:DescribeConformancePackStatus' :: Maybe [Text]
conformancePackNames =
        Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:DescribeConformancePackStatus' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:limit:DescribeConformancePackStatus' :: Maybe Natural
limit = Maybe Natural
forall a. Maybe a
Prelude.Nothing
    }

-- | Comma-separated list of conformance pack names.
describeConformancePackStatus_conformancePackNames :: Lens.Lens' DescribeConformancePackStatus (Prelude.Maybe [Prelude.Text])
describeConformancePackStatus_conformancePackNames :: (Maybe [Text] -> f (Maybe [Text]))
-> DescribeConformancePackStatus -> f DescribeConformancePackStatus
describeConformancePackStatus_conformancePackNames = (DescribeConformancePackStatus -> Maybe [Text])
-> (DescribeConformancePackStatus
    -> Maybe [Text] -> DescribeConformancePackStatus)
-> Lens
     DescribeConformancePackStatus
     DescribeConformancePackStatus
     (Maybe [Text])
     (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeConformancePackStatus' {Maybe [Text]
conformancePackNames :: Maybe [Text]
$sel:conformancePackNames:DescribeConformancePackStatus' :: DescribeConformancePackStatus -> Maybe [Text]
conformancePackNames} -> Maybe [Text]
conformancePackNames) (\s :: DescribeConformancePackStatus
s@DescribeConformancePackStatus' {} Maybe [Text]
a -> DescribeConformancePackStatus
s {$sel:conformancePackNames:DescribeConformancePackStatus' :: Maybe [Text]
conformancePackNames = Maybe [Text]
a} :: DescribeConformancePackStatus) ((Maybe [Text] -> f (Maybe [Text]))
 -> DescribeConformancePackStatus
 -> f DescribeConformancePackStatus)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> DescribeConformancePackStatus
-> f DescribeConformancePackStatus
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
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 [Text] [Text] [Text] [Text]
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.
describeConformancePackStatus_nextToken :: Lens.Lens' DescribeConformancePackStatus (Prelude.Maybe Prelude.Text)
describeConformancePackStatus_nextToken :: (Maybe Text -> f (Maybe Text))
-> DescribeConformancePackStatus -> f DescribeConformancePackStatus
describeConformancePackStatus_nextToken = (DescribeConformancePackStatus -> Maybe Text)
-> (DescribeConformancePackStatus
    -> Maybe Text -> DescribeConformancePackStatus)
-> Lens
     DescribeConformancePackStatus
     DescribeConformancePackStatus
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeConformancePackStatus' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeConformancePackStatus' :: DescribeConformancePackStatus -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeConformancePackStatus
s@DescribeConformancePackStatus' {} Maybe Text
a -> DescribeConformancePackStatus
s {$sel:nextToken:DescribeConformancePackStatus' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeConformancePackStatus)

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

instance Core.AWSPager DescribeConformancePackStatus where
  page :: DescribeConformancePackStatus
-> AWSResponse DescribeConformancePackStatus
-> Maybe DescribeConformancePackStatus
page DescribeConformancePackStatus
rq AWSResponse DescribeConformancePackStatus
rs
    | Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse DescribeConformancePackStatus
DescribeConformancePackStatusResponse
rs
            DescribeConformancePackStatusResponse
-> Getting (First Text) DescribeConformancePackStatusResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeConformancePackStatusResponse
-> Const (First Text) DescribeConformancePackStatusResponse
Lens' DescribeConformancePackStatusResponse (Maybe Text)
describeConformancePackStatusResponse_nextToken
              ((Maybe Text -> Const (First Text) (Maybe Text))
 -> DescribeConformancePackStatusResponse
 -> Const (First Text) DescribeConformancePackStatusResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) DescribeConformancePackStatusResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
      Maybe DescribeConformancePackStatus
forall a. Maybe a
Prelude.Nothing
    | Maybe [ConformancePackStatusDetail] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse DescribeConformancePackStatus
DescribeConformancePackStatusResponse
rs
            DescribeConformancePackStatusResponse
-> Getting
     (First [ConformancePackStatusDetail])
     DescribeConformancePackStatusResponse
     [ConformancePackStatusDetail]
-> Maybe [ConformancePackStatusDetail]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [ConformancePackStatusDetail]
 -> Const
      (First [ConformancePackStatusDetail])
      (Maybe [ConformancePackStatusDetail]))
-> DescribeConformancePackStatusResponse
-> Const
     (First [ConformancePackStatusDetail])
     DescribeConformancePackStatusResponse
Lens'
  DescribeConformancePackStatusResponse
  (Maybe [ConformancePackStatusDetail])
describeConformancePackStatusResponse_conformancePackStatusDetails
              ((Maybe [ConformancePackStatusDetail]
  -> Const
       (First [ConformancePackStatusDetail])
       (Maybe [ConformancePackStatusDetail]))
 -> DescribeConformancePackStatusResponse
 -> Const
      (First [ConformancePackStatusDetail])
      DescribeConformancePackStatusResponse)
-> (([ConformancePackStatusDetail]
     -> Const
          (First [ConformancePackStatusDetail])
          [ConformancePackStatusDetail])
    -> Maybe [ConformancePackStatusDetail]
    -> Const
         (First [ConformancePackStatusDetail])
         (Maybe [ConformancePackStatusDetail]))
-> Getting
     (First [ConformancePackStatusDetail])
     DescribeConformancePackStatusResponse
     [ConformancePackStatusDetail]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([ConformancePackStatusDetail]
 -> Const
      (First [ConformancePackStatusDetail])
      [ConformancePackStatusDetail])
-> Maybe [ConformancePackStatusDetail]
-> Const
     (First [ConformancePackStatusDetail])
     (Maybe [ConformancePackStatusDetail])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
      Maybe DescribeConformancePackStatus
forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
      DescribeConformancePackStatus
-> Maybe DescribeConformancePackStatus
forall a. a -> Maybe a
Prelude.Just (DescribeConformancePackStatus
 -> Maybe DescribeConformancePackStatus)
-> DescribeConformancePackStatus
-> Maybe DescribeConformancePackStatus
forall a b. (a -> b) -> a -> b
Prelude.$
        DescribeConformancePackStatus
rq
          DescribeConformancePackStatus
-> (DescribeConformancePackStatus -> DescribeConformancePackStatus)
-> DescribeConformancePackStatus
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> DescribeConformancePackStatus
-> Identity DescribeConformancePackStatus
Lens
  DescribeConformancePackStatus
  DescribeConformancePackStatus
  (Maybe Text)
  (Maybe Text)
describeConformancePackStatus_nextToken
          ((Maybe Text -> Identity (Maybe Text))
 -> DescribeConformancePackStatus
 -> Identity DescribeConformancePackStatus)
-> Maybe Text
-> DescribeConformancePackStatus
-> DescribeConformancePackStatus
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse DescribeConformancePackStatus
DescribeConformancePackStatusResponse
rs
          DescribeConformancePackStatusResponse
-> Getting (First Text) DescribeConformancePackStatusResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeConformancePackStatusResponse
-> Const (First Text) DescribeConformancePackStatusResponse
Lens' DescribeConformancePackStatusResponse (Maybe Text)
describeConformancePackStatusResponse_nextToken
            ((Maybe Text -> Const (First Text) (Maybe Text))
 -> DescribeConformancePackStatusResponse
 -> Const (First Text) DescribeConformancePackStatusResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) DescribeConformancePackStatusResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just

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

instance
  Prelude.Hashable
    DescribeConformancePackStatus

instance Prelude.NFData DescribeConformancePackStatus

instance Core.ToHeaders DescribeConformancePackStatus where
  toHeaders :: DescribeConformancePackStatus -> ResponseHeaders
toHeaders =
    ResponseHeaders -> DescribeConformancePackStatus -> 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.DescribeConformancePackStatus" ::
                          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 DescribeConformancePackStatus where
  toJSON :: DescribeConformancePackStatus -> Value
toJSON DescribeConformancePackStatus' {Maybe Natural
Maybe [Text]
Maybe Text
limit :: Maybe Natural
nextToken :: Maybe Text
conformancePackNames :: Maybe [Text]
$sel:limit:DescribeConformancePackStatus' :: DescribeConformancePackStatus -> Maybe Natural
$sel:nextToken:DescribeConformancePackStatus' :: DescribeConformancePackStatus -> Maybe Text
$sel:conformancePackNames:DescribeConformancePackStatus' :: DescribeConformancePackStatus -> Maybe [Text]
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"ConformancePackNames" 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]
conformancePackNames,
            (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
          ]
      )

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

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

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

-- |
-- Create a value of 'DescribeConformancePackStatusResponse' 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:
--
-- 'conformancePackStatusDetails', 'describeConformancePackStatusResponse_conformancePackStatusDetails' - A list of @ConformancePackStatusDetail@ objects.
--
-- 'nextToken', 'describeConformancePackStatusResponse_nextToken' - The @nextToken@ string returned in a previous request that you use to
-- request the next page of results in a paginated response.
--
-- 'httpStatus', 'describeConformancePackStatusResponse_httpStatus' - The response's http status code.
newDescribeConformancePackStatusResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeConformancePackStatusResponse
newDescribeConformancePackStatusResponse :: Int -> DescribeConformancePackStatusResponse
newDescribeConformancePackStatusResponse Int
pHttpStatus_ =
  DescribeConformancePackStatusResponse' :: Maybe [ConformancePackStatusDetail]
-> Maybe Text -> Int -> DescribeConformancePackStatusResponse
DescribeConformancePackStatusResponse'
    { $sel:conformancePackStatusDetails:DescribeConformancePackStatusResponse' :: Maybe [ConformancePackStatusDetail]
conformancePackStatusDetails =
        Maybe [ConformancePackStatusDetail]
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:DescribeConformancePackStatusResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeConformancePackStatusResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | A list of @ConformancePackStatusDetail@ objects.
describeConformancePackStatusResponse_conformancePackStatusDetails :: Lens.Lens' DescribeConformancePackStatusResponse (Prelude.Maybe [ConformancePackStatusDetail])
describeConformancePackStatusResponse_conformancePackStatusDetails :: (Maybe [ConformancePackStatusDetail]
 -> f (Maybe [ConformancePackStatusDetail]))
-> DescribeConformancePackStatusResponse
-> f DescribeConformancePackStatusResponse
describeConformancePackStatusResponse_conformancePackStatusDetails = (DescribeConformancePackStatusResponse
 -> Maybe [ConformancePackStatusDetail])
-> (DescribeConformancePackStatusResponse
    -> Maybe [ConformancePackStatusDetail]
    -> DescribeConformancePackStatusResponse)
-> Lens'
     DescribeConformancePackStatusResponse
     (Maybe [ConformancePackStatusDetail])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeConformancePackStatusResponse' {Maybe [ConformancePackStatusDetail]
conformancePackStatusDetails :: Maybe [ConformancePackStatusDetail]
$sel:conformancePackStatusDetails:DescribeConformancePackStatusResponse' :: DescribeConformancePackStatusResponse
-> Maybe [ConformancePackStatusDetail]
conformancePackStatusDetails} -> Maybe [ConformancePackStatusDetail]
conformancePackStatusDetails) (\s :: DescribeConformancePackStatusResponse
s@DescribeConformancePackStatusResponse' {} Maybe [ConformancePackStatusDetail]
a -> DescribeConformancePackStatusResponse
s {$sel:conformancePackStatusDetails:DescribeConformancePackStatusResponse' :: Maybe [ConformancePackStatusDetail]
conformancePackStatusDetails = Maybe [ConformancePackStatusDetail]
a} :: DescribeConformancePackStatusResponse) ((Maybe [ConformancePackStatusDetail]
  -> f (Maybe [ConformancePackStatusDetail]))
 -> DescribeConformancePackStatusResponse
 -> f DescribeConformancePackStatusResponse)
-> ((Maybe [ConformancePackStatusDetail]
     -> f (Maybe [ConformancePackStatusDetail]))
    -> Maybe [ConformancePackStatusDetail]
    -> f (Maybe [ConformancePackStatusDetail]))
-> (Maybe [ConformancePackStatusDetail]
    -> f (Maybe [ConformancePackStatusDetail]))
-> DescribeConformancePackStatusResponse
-> f DescribeConformancePackStatusResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [ConformancePackStatusDetail]
  [ConformancePackStatusDetail]
  [ConformancePackStatusDetail]
  [ConformancePackStatusDetail]
-> Iso
     (Maybe [ConformancePackStatusDetail])
     (Maybe [ConformancePackStatusDetail])
     (Maybe [ConformancePackStatusDetail])
     (Maybe [ConformancePackStatusDetail])
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
  [ConformancePackStatusDetail]
  [ConformancePackStatusDetail]
  [ConformancePackStatusDetail]
  [ConformancePackStatusDetail]
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.
describeConformancePackStatusResponse_nextToken :: Lens.Lens' DescribeConformancePackStatusResponse (Prelude.Maybe Prelude.Text)
describeConformancePackStatusResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> DescribeConformancePackStatusResponse
-> f DescribeConformancePackStatusResponse
describeConformancePackStatusResponse_nextToken = (DescribeConformancePackStatusResponse -> Maybe Text)
-> (DescribeConformancePackStatusResponse
    -> Maybe Text -> DescribeConformancePackStatusResponse)
-> Lens' DescribeConformancePackStatusResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeConformancePackStatusResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeConformancePackStatusResponse' :: DescribeConformancePackStatusResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeConformancePackStatusResponse
s@DescribeConformancePackStatusResponse' {} Maybe Text
a -> DescribeConformancePackStatusResponse
s {$sel:nextToken:DescribeConformancePackStatusResponse' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeConformancePackStatusResponse)

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

instance
  Prelude.NFData
    DescribeConformancePackStatusResponse