{-# 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.DescribeOrganizationConformancePacks
-- 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 organization conformance packs.
--
-- When you specify the limit and the next token, you receive a paginated
-- response.
--
-- Limit and next token are not applicable if you specify organization
-- conformance packs names. They are only applicable, when you request all
-- the organization conformance packs.
--
-- /For accounts within an organzation/
--
-- If you deploy an organizational rule or conformance pack in an
-- organization administrator account, and then establish a delegated
-- administrator and deploy an organizational rule or conformance pack in
-- the delegated administrator account, you won\'t be able to see the
-- organizational rule or conformance pack in the organization
-- administrator account from the delegated administrator account or see
-- the organizational rule or conformance pack in the delegated
-- administrator account from organization administrator account. The
-- @DescribeOrganizationConfigRules@ and
-- @DescribeOrganizationConformancePacks@ APIs can only see and interact
-- with the organization-related resource that were deployed from within
-- the account calling those APIs.
--
-- This operation returns paginated results.
module Amazonka.Config.DescribeOrganizationConformancePacks
  ( -- * Creating a Request
    DescribeOrganizationConformancePacks (..),
    newDescribeOrganizationConformancePacks,

    -- * Request Lenses
    describeOrganizationConformancePacks_limit,
    describeOrganizationConformancePacks_nextToken,
    describeOrganizationConformancePacks_organizationConformancePackNames,

    -- * Destructuring the Response
    DescribeOrganizationConformancePacksResponse (..),
    newDescribeOrganizationConformancePacksResponse,

    -- * Response Lenses
    describeOrganizationConformancePacksResponse_nextToken,
    describeOrganizationConformancePacksResponse_organizationConformancePacks,
    describeOrganizationConformancePacksResponse_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:/ 'newDescribeOrganizationConformancePacks' smart constructor.
data DescribeOrganizationConformancePacks = DescribeOrganizationConformancePacks'
  { -- | The maximum number of organization config packs returned on each page.
    -- If you do no specify a number, Config uses the default. The default is
    -- 100.
    DescribeOrganizationConformancePacks -> Maybe Natural
limit :: Prelude.Maybe Prelude.Natural,
    -- | The nextToken string returned on a previous page that you use to get the
    -- next page of results in a paginated response.
    DescribeOrganizationConformancePacks -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The name that you assign to an organization conformance pack.
    DescribeOrganizationConformancePacks -> Maybe [Text]
organizationConformancePackNames :: Prelude.Maybe [Prelude.Text]
  }
  deriving (DescribeOrganizationConformancePacks
-> DescribeOrganizationConformancePacks -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeOrganizationConformancePacks
-> DescribeOrganizationConformancePacks -> Bool
$c/= :: DescribeOrganizationConformancePacks
-> DescribeOrganizationConformancePacks -> Bool
== :: DescribeOrganizationConformancePacks
-> DescribeOrganizationConformancePacks -> Bool
$c== :: DescribeOrganizationConformancePacks
-> DescribeOrganizationConformancePacks -> Bool
Prelude.Eq, ReadPrec [DescribeOrganizationConformancePacks]
ReadPrec DescribeOrganizationConformancePacks
Int -> ReadS DescribeOrganizationConformancePacks
ReadS [DescribeOrganizationConformancePacks]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeOrganizationConformancePacks]
$creadListPrec :: ReadPrec [DescribeOrganizationConformancePacks]
readPrec :: ReadPrec DescribeOrganizationConformancePacks
$creadPrec :: ReadPrec DescribeOrganizationConformancePacks
readList :: ReadS [DescribeOrganizationConformancePacks]
$creadList :: ReadS [DescribeOrganizationConformancePacks]
readsPrec :: Int -> ReadS DescribeOrganizationConformancePacks
$creadsPrec :: Int -> ReadS DescribeOrganizationConformancePacks
Prelude.Read, Int -> DescribeOrganizationConformancePacks -> ShowS
[DescribeOrganizationConformancePacks] -> ShowS
DescribeOrganizationConformancePacks -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeOrganizationConformancePacks] -> ShowS
$cshowList :: [DescribeOrganizationConformancePacks] -> ShowS
show :: DescribeOrganizationConformancePacks -> String
$cshow :: DescribeOrganizationConformancePacks -> String
showsPrec :: Int -> DescribeOrganizationConformancePacks -> ShowS
$cshowsPrec :: Int -> DescribeOrganizationConformancePacks -> ShowS
Prelude.Show, forall x.
Rep DescribeOrganizationConformancePacks x
-> DescribeOrganizationConformancePacks
forall x.
DescribeOrganizationConformancePacks
-> Rep DescribeOrganizationConformancePacks x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeOrganizationConformancePacks x
-> DescribeOrganizationConformancePacks
$cfrom :: forall x.
DescribeOrganizationConformancePacks
-> Rep DescribeOrganizationConformancePacks x
Prelude.Generic)

-- |
-- Create a value of 'DescribeOrganizationConformancePacks' 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:
--
-- 'limit', 'describeOrganizationConformancePacks_limit' - The maximum number of organization config packs returned on each page.
-- If you do no specify a number, Config uses the default. The default is
-- 100.
--
-- 'nextToken', 'describeOrganizationConformancePacks_nextToken' - The nextToken string returned on a previous page that you use to get the
-- next page of results in a paginated response.
--
-- 'organizationConformancePackNames', 'describeOrganizationConformancePacks_organizationConformancePackNames' - The name that you assign to an organization conformance pack.
newDescribeOrganizationConformancePacks ::
  DescribeOrganizationConformancePacks
newDescribeOrganizationConformancePacks :: DescribeOrganizationConformancePacks
newDescribeOrganizationConformancePacks =
  DescribeOrganizationConformancePacks'
    { $sel:limit:DescribeOrganizationConformancePacks' :: Maybe Natural
limit =
        forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:DescribeOrganizationConformancePacks' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:organizationConformancePackNames:DescribeOrganizationConformancePacks' :: Maybe [Text]
organizationConformancePackNames =
        forall a. Maybe a
Prelude.Nothing
    }

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

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

-- | The name that you assign to an organization conformance pack.
describeOrganizationConformancePacks_organizationConformancePackNames :: Lens.Lens' DescribeOrganizationConformancePacks (Prelude.Maybe [Prelude.Text])
describeOrganizationConformancePacks_organizationConformancePackNames :: Lens' DescribeOrganizationConformancePacks (Maybe [Text])
describeOrganizationConformancePacks_organizationConformancePackNames = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeOrganizationConformancePacks' {Maybe [Text]
organizationConformancePackNames :: Maybe [Text]
$sel:organizationConformancePackNames:DescribeOrganizationConformancePacks' :: DescribeOrganizationConformancePacks -> Maybe [Text]
organizationConformancePackNames} -> Maybe [Text]
organizationConformancePackNames) (\s :: DescribeOrganizationConformancePacks
s@DescribeOrganizationConformancePacks' {} Maybe [Text]
a -> DescribeOrganizationConformancePacks
s {$sel:organizationConformancePackNames:DescribeOrganizationConformancePacks' :: Maybe [Text]
organizationConformancePackNames = Maybe [Text]
a} :: DescribeOrganizationConformancePacks) 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

instance
  Core.AWSPager
    DescribeOrganizationConformancePacks
  where
  page :: DescribeOrganizationConformancePacks
-> AWSResponse DescribeOrganizationConformancePacks
-> Maybe DescribeOrganizationConformancePacks
page DescribeOrganizationConformancePacks
rq AWSResponse DescribeOrganizationConformancePacks
rs
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse DescribeOrganizationConformancePacks
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' DescribeOrganizationConformancePacksResponse (Maybe Text)
describeOrganizationConformancePacksResponse_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 DescribeOrganizationConformancePacks
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens'
  DescribeOrganizationConformancePacksResponse
  (Maybe [OrganizationConformancePack])
describeOrganizationConformancePacksResponse_organizationConformancePacks
            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.$ DescribeOrganizationConformancePacks
rq
          forall a b. a -> (a -> b) -> b
Prelude.& Lens' DescribeOrganizationConformancePacks (Maybe Text)
describeOrganizationConformancePacks_nextToken
          forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse DescribeOrganizationConformancePacks
rs
          forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' DescribeOrganizationConformancePacksResponse (Maybe Text)
describeOrganizationConformancePacksResponse_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
    DescribeOrganizationConformancePacks
  where
  type
    AWSResponse DescribeOrganizationConformancePacks =
      DescribeOrganizationConformancePacksResponse
  request :: (Service -> Service)
-> DescribeOrganizationConformancePacks
-> Request DescribeOrganizationConformancePacks
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 DescribeOrganizationConformancePacks
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse
           (AWSResponse DescribeOrganizationConformancePacks)))
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 Text
-> Maybe [OrganizationConformancePack]
-> Int
-> DescribeOrganizationConformancePacksResponse
DescribeOrganizationConformancePacksResponse'
            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
"NextToken")
            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
"OrganizationConformancePacks"
                            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.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

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

instance
  Prelude.NFData
    DescribeOrganizationConformancePacks
  where
  rnf :: DescribeOrganizationConformancePacks -> ()
rnf DescribeOrganizationConformancePacks' {Maybe Natural
Maybe [Text]
Maybe Text
organizationConformancePackNames :: Maybe [Text]
nextToken :: Maybe Text
limit :: Maybe Natural
$sel:organizationConformancePackNames:DescribeOrganizationConformancePacks' :: DescribeOrganizationConformancePacks -> Maybe [Text]
$sel:nextToken:DescribeOrganizationConformancePacks' :: DescribeOrganizationConformancePacks -> Maybe Text
$sel:limit:DescribeOrganizationConformancePacks' :: DescribeOrganizationConformancePacks -> Maybe Natural
..} =
    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
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
organizationConformancePackNames

instance
  Data.ToHeaders
    DescribeOrganizationConformancePacks
  where
  toHeaders :: DescribeOrganizationConformancePacks -> 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.DescribeOrganizationConformancePacks" ::
                          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
    DescribeOrganizationConformancePacks
  where
  toJSON :: DescribeOrganizationConformancePacks -> Value
toJSON DescribeOrganizationConformancePacks' {Maybe Natural
Maybe [Text]
Maybe Text
organizationConformancePackNames :: Maybe [Text]
nextToken :: Maybe Text
limit :: Maybe Natural
$sel:organizationConformancePackNames:DescribeOrganizationConformancePacks' :: DescribeOrganizationConformancePacks -> Maybe [Text]
$sel:nextToken:DescribeOrganizationConformancePacks' :: DescribeOrganizationConformancePacks -> Maybe Text
$sel:limit:DescribeOrganizationConformancePacks' :: DescribeOrganizationConformancePacks -> Maybe Natural
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (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,
            (Key
"OrganizationConformancePackNames" 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]
organizationConformancePackNames
          ]
      )

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

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

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

-- |
-- Create a value of 'DescribeOrganizationConformancePacksResponse' 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', 'describeOrganizationConformancePacksResponse_nextToken' - The nextToken string returned on a previous page that you use to get the
-- next page of results in a paginated response.
--
-- 'organizationConformancePacks', 'describeOrganizationConformancePacksResponse_organizationConformancePacks' - Returns a list of OrganizationConformancePacks objects.
--
-- 'httpStatus', 'describeOrganizationConformancePacksResponse_httpStatus' - The response's http status code.
newDescribeOrganizationConformancePacksResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeOrganizationConformancePacksResponse
newDescribeOrganizationConformancePacksResponse :: Int -> DescribeOrganizationConformancePacksResponse
newDescribeOrganizationConformancePacksResponse
  Int
pHttpStatus_ =
    DescribeOrganizationConformancePacksResponse'
      { $sel:nextToken:DescribeOrganizationConformancePacksResponse' :: Maybe Text
nextToken =
          forall a. Maybe a
Prelude.Nothing,
        $sel:organizationConformancePacks:DescribeOrganizationConformancePacksResponse' :: Maybe [OrganizationConformancePack]
organizationConformancePacks =
          forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:DescribeOrganizationConformancePacksResponse' :: Int
httpStatus = Int
pHttpStatus_
      }

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

-- | Returns a list of OrganizationConformancePacks objects.
describeOrganizationConformancePacksResponse_organizationConformancePacks :: Lens.Lens' DescribeOrganizationConformancePacksResponse (Prelude.Maybe [OrganizationConformancePack])
describeOrganizationConformancePacksResponse_organizationConformancePacks :: Lens'
  DescribeOrganizationConformancePacksResponse
  (Maybe [OrganizationConformancePack])
describeOrganizationConformancePacksResponse_organizationConformancePacks = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeOrganizationConformancePacksResponse' {Maybe [OrganizationConformancePack]
organizationConformancePacks :: Maybe [OrganizationConformancePack]
$sel:organizationConformancePacks:DescribeOrganizationConformancePacksResponse' :: DescribeOrganizationConformancePacksResponse
-> Maybe [OrganizationConformancePack]
organizationConformancePacks} -> Maybe [OrganizationConformancePack]
organizationConformancePacks) (\s :: DescribeOrganizationConformancePacksResponse
s@DescribeOrganizationConformancePacksResponse' {} Maybe [OrganizationConformancePack]
a -> DescribeOrganizationConformancePacksResponse
s {$sel:organizationConformancePacks:DescribeOrganizationConformancePacksResponse' :: Maybe [OrganizationConformancePack]
organizationConformancePacks = Maybe [OrganizationConformancePack]
a} :: DescribeOrganizationConformancePacksResponse) 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 response's http status code.
describeOrganizationConformancePacksResponse_httpStatus :: Lens.Lens' DescribeOrganizationConformancePacksResponse Prelude.Int
describeOrganizationConformancePacksResponse_httpStatus :: Lens' DescribeOrganizationConformancePacksResponse Int
describeOrganizationConformancePacksResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeOrganizationConformancePacksResponse' {Int
httpStatus :: Int
$sel:httpStatus:DescribeOrganizationConformancePacksResponse' :: DescribeOrganizationConformancePacksResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DescribeOrganizationConformancePacksResponse
s@DescribeOrganizationConformancePacksResponse' {} Int
a -> DescribeOrganizationConformancePacksResponse
s {$sel:httpStatus:DescribeOrganizationConformancePacksResponse' :: Int
httpStatus = Int
a} :: DescribeOrganizationConformancePacksResponse)

instance
  Prelude.NFData
    DescribeOrganizationConformancePacksResponse
  where
  rnf :: DescribeOrganizationConformancePacksResponse -> ()
rnf DescribeOrganizationConformancePacksResponse' {Int
Maybe [OrganizationConformancePack]
Maybe Text
httpStatus :: Int
organizationConformancePacks :: Maybe [OrganizationConformancePack]
nextToken :: Maybe Text
$sel:httpStatus:DescribeOrganizationConformancePacksResponse' :: DescribeOrganizationConformancePacksResponse -> Int
$sel:organizationConformancePacks:DescribeOrganizationConformancePacksResponse' :: DescribeOrganizationConformancePacksResponse
-> Maybe [OrganizationConformancePack]
$sel:nextToken:DescribeOrganizationConformancePacksResponse' :: DescribeOrganizationConformancePacksResponse -> Maybe Text
..} =
    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 Maybe [OrganizationConformancePack]
organizationConformancePacks
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus