{-# 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.GetOrganizationConformancePackDetailedStatus
-- 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 detailed status for each member account within an organization
-- for a given organization conformance pack.
--
-- This operation returns paginated results.
module Amazonka.Config.GetOrganizationConformancePackDetailedStatus
  ( -- * Creating a Request
    GetOrganizationConformancePackDetailedStatus (..),
    newGetOrganizationConformancePackDetailedStatus,

    -- * Request Lenses
    getOrganizationConformancePackDetailedStatus_filters,
    getOrganizationConformancePackDetailedStatus_limit,
    getOrganizationConformancePackDetailedStatus_nextToken,
    getOrganizationConformancePackDetailedStatus_organizationConformancePackName,

    -- * Destructuring the Response
    GetOrganizationConformancePackDetailedStatusResponse (..),
    newGetOrganizationConformancePackDetailedStatusResponse,

    -- * Response Lenses
    getOrganizationConformancePackDetailedStatusResponse_nextToken,
    getOrganizationConformancePackDetailedStatusResponse_organizationConformancePackDetailedStatuses,
    getOrganizationConformancePackDetailedStatusResponse_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:/ 'newGetOrganizationConformancePackDetailedStatus' smart constructor.
data GetOrganizationConformancePackDetailedStatus = GetOrganizationConformancePackDetailedStatus'
  { -- | An @OrganizationResourceDetailedStatusFilters@ object.
    GetOrganizationConformancePackDetailedStatus
-> Maybe OrganizationResourceDetailedStatusFilters
filters :: Prelude.Maybe OrganizationResourceDetailedStatusFilters,
    -- | The maximum number of @OrganizationConformancePackDetailedStatuses@
    -- returned on each page. If you do not specify a number, Config uses the
    -- default. The default is 100.
    GetOrganizationConformancePackDetailedStatus -> 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.
    GetOrganizationConformancePackDetailedStatus -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The name of organization conformance pack for which you want status
    -- details for member accounts.
    GetOrganizationConformancePackDetailedStatus -> Text
organizationConformancePackName :: Prelude.Text
  }
  deriving (GetOrganizationConformancePackDetailedStatus
-> GetOrganizationConformancePackDetailedStatus -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetOrganizationConformancePackDetailedStatus
-> GetOrganizationConformancePackDetailedStatus -> Bool
$c/= :: GetOrganizationConformancePackDetailedStatus
-> GetOrganizationConformancePackDetailedStatus -> Bool
== :: GetOrganizationConformancePackDetailedStatus
-> GetOrganizationConformancePackDetailedStatus -> Bool
$c== :: GetOrganizationConformancePackDetailedStatus
-> GetOrganizationConformancePackDetailedStatus -> Bool
Prelude.Eq, ReadPrec [GetOrganizationConformancePackDetailedStatus]
ReadPrec GetOrganizationConformancePackDetailedStatus
Int -> ReadS GetOrganizationConformancePackDetailedStatus
ReadS [GetOrganizationConformancePackDetailedStatus]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetOrganizationConformancePackDetailedStatus]
$creadListPrec :: ReadPrec [GetOrganizationConformancePackDetailedStatus]
readPrec :: ReadPrec GetOrganizationConformancePackDetailedStatus
$creadPrec :: ReadPrec GetOrganizationConformancePackDetailedStatus
readList :: ReadS [GetOrganizationConformancePackDetailedStatus]
$creadList :: ReadS [GetOrganizationConformancePackDetailedStatus]
readsPrec :: Int -> ReadS GetOrganizationConformancePackDetailedStatus
$creadsPrec :: Int -> ReadS GetOrganizationConformancePackDetailedStatus
Prelude.Read, Int -> GetOrganizationConformancePackDetailedStatus -> ShowS
[GetOrganizationConformancePackDetailedStatus] -> ShowS
GetOrganizationConformancePackDetailedStatus -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetOrganizationConformancePackDetailedStatus] -> ShowS
$cshowList :: [GetOrganizationConformancePackDetailedStatus] -> ShowS
show :: GetOrganizationConformancePackDetailedStatus -> String
$cshow :: GetOrganizationConformancePackDetailedStatus -> String
showsPrec :: Int -> GetOrganizationConformancePackDetailedStatus -> ShowS
$cshowsPrec :: Int -> GetOrganizationConformancePackDetailedStatus -> ShowS
Prelude.Show, forall x.
Rep GetOrganizationConformancePackDetailedStatus x
-> GetOrganizationConformancePackDetailedStatus
forall x.
GetOrganizationConformancePackDetailedStatus
-> Rep GetOrganizationConformancePackDetailedStatus x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetOrganizationConformancePackDetailedStatus x
-> GetOrganizationConformancePackDetailedStatus
$cfrom :: forall x.
GetOrganizationConformancePackDetailedStatus
-> Rep GetOrganizationConformancePackDetailedStatus x
Prelude.Generic)

-- |
-- Create a value of 'GetOrganizationConformancePackDetailedStatus' 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', 'getOrganizationConformancePackDetailedStatus_filters' - An @OrganizationResourceDetailedStatusFilters@ object.
--
-- 'limit', 'getOrganizationConformancePackDetailedStatus_limit' - The maximum number of @OrganizationConformancePackDetailedStatuses@
-- returned on each page. If you do not specify a number, Config uses the
-- default. The default is 100.
--
-- 'nextToken', 'getOrganizationConformancePackDetailedStatus_nextToken' - The nextToken string returned on a previous page that you use to get the
-- next page of results in a paginated response.
--
-- 'organizationConformancePackName', 'getOrganizationConformancePackDetailedStatus_organizationConformancePackName' - The name of organization conformance pack for which you want status
-- details for member accounts.
newGetOrganizationConformancePackDetailedStatus ::
  -- | 'organizationConformancePackName'
  Prelude.Text ->
  GetOrganizationConformancePackDetailedStatus
newGetOrganizationConformancePackDetailedStatus :: Text -> GetOrganizationConformancePackDetailedStatus
newGetOrganizationConformancePackDetailedStatus
  Text
pOrganizationConformancePackName_ =
    GetOrganizationConformancePackDetailedStatus'
      { $sel:filters:GetOrganizationConformancePackDetailedStatus' :: Maybe OrganizationResourceDetailedStatusFilters
filters =
          forall a. Maybe a
Prelude.Nothing,
        $sel:limit:GetOrganizationConformancePackDetailedStatus' :: Maybe Natural
limit = forall a. Maybe a
Prelude.Nothing,
        $sel:nextToken:GetOrganizationConformancePackDetailedStatus' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
        $sel:organizationConformancePackName:GetOrganizationConformancePackDetailedStatus' :: Text
organizationConformancePackName =
          Text
pOrganizationConformancePackName_
      }

-- | An @OrganizationResourceDetailedStatusFilters@ object.
getOrganizationConformancePackDetailedStatus_filters :: Lens.Lens' GetOrganizationConformancePackDetailedStatus (Prelude.Maybe OrganizationResourceDetailedStatusFilters)
getOrganizationConformancePackDetailedStatus_filters :: Lens'
  GetOrganizationConformancePackDetailedStatus
  (Maybe OrganizationResourceDetailedStatusFilters)
getOrganizationConformancePackDetailedStatus_filters = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetOrganizationConformancePackDetailedStatus' {Maybe OrganizationResourceDetailedStatusFilters
filters :: Maybe OrganizationResourceDetailedStatusFilters
$sel:filters:GetOrganizationConformancePackDetailedStatus' :: GetOrganizationConformancePackDetailedStatus
-> Maybe OrganizationResourceDetailedStatusFilters
filters} -> Maybe OrganizationResourceDetailedStatusFilters
filters) (\s :: GetOrganizationConformancePackDetailedStatus
s@GetOrganizationConformancePackDetailedStatus' {} Maybe OrganizationResourceDetailedStatusFilters
a -> GetOrganizationConformancePackDetailedStatus
s {$sel:filters:GetOrganizationConformancePackDetailedStatus' :: Maybe OrganizationResourceDetailedStatusFilters
filters = Maybe OrganizationResourceDetailedStatusFilters
a} :: GetOrganizationConformancePackDetailedStatus)

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

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

-- | The name of organization conformance pack for which you want status
-- details for member accounts.
getOrganizationConformancePackDetailedStatus_organizationConformancePackName :: Lens.Lens' GetOrganizationConformancePackDetailedStatus Prelude.Text
getOrganizationConformancePackDetailedStatus_organizationConformancePackName :: Lens' GetOrganizationConformancePackDetailedStatus Text
getOrganizationConformancePackDetailedStatus_organizationConformancePackName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetOrganizationConformancePackDetailedStatus' {Text
organizationConformancePackName :: Text
$sel:organizationConformancePackName:GetOrganizationConformancePackDetailedStatus' :: GetOrganizationConformancePackDetailedStatus -> Text
organizationConformancePackName} -> Text
organizationConformancePackName) (\s :: GetOrganizationConformancePackDetailedStatus
s@GetOrganizationConformancePackDetailedStatus' {} Text
a -> GetOrganizationConformancePackDetailedStatus
s {$sel:organizationConformancePackName:GetOrganizationConformancePackDetailedStatus' :: Text
organizationConformancePackName = Text
a} :: GetOrganizationConformancePackDetailedStatus)

instance
  Core.AWSPager
    GetOrganizationConformancePackDetailedStatus
  where
  page :: GetOrganizationConformancePackDetailedStatus
-> AWSResponse GetOrganizationConformancePackDetailedStatus
-> Maybe GetOrganizationConformancePackDetailedStatus
page GetOrganizationConformancePackDetailedStatus
rq AWSResponse GetOrganizationConformancePackDetailedStatus
rs
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse GetOrganizationConformancePackDetailedStatus
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens'
  GetOrganizationConformancePackDetailedStatusResponse (Maybe Text)
getOrganizationConformancePackDetailedStatusResponse_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 GetOrganizationConformancePackDetailedStatus
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens'
  GetOrganizationConformancePackDetailedStatusResponse
  (Maybe [OrganizationConformancePackDetailedStatus])
getOrganizationConformancePackDetailedStatusResponse_organizationConformancePackDetailedStatuses
            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.$ GetOrganizationConformancePackDetailedStatus
rq
          forall a b. a -> (a -> b) -> b
Prelude.& Lens' GetOrganizationConformancePackDetailedStatus (Maybe Text)
getOrganizationConformancePackDetailedStatus_nextToken
          forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse GetOrganizationConformancePackDetailedStatus
rs
          forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens'
  GetOrganizationConformancePackDetailedStatusResponse (Maybe Text)
getOrganizationConformancePackDetailedStatusResponse_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
    GetOrganizationConformancePackDetailedStatus
  where
  type
    AWSResponse
      GetOrganizationConformancePackDetailedStatus =
      GetOrganizationConformancePackDetailedStatusResponse
  request :: (Service -> Service)
-> GetOrganizationConformancePackDetailedStatus
-> Request GetOrganizationConformancePackDetailedStatus
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 GetOrganizationConformancePackDetailedStatus
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse
           (AWSResponse GetOrganizationConformancePackDetailedStatus)))
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 [OrganizationConformancePackDetailedStatus]
-> Int
-> GetOrganizationConformancePackDetailedStatusResponse
GetOrganizationConformancePackDetailedStatusResponse'
            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
"OrganizationConformancePackDetailedStatuses"
                            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
    GetOrganizationConformancePackDetailedStatus
  where
  hashWithSalt :: Int -> GetOrganizationConformancePackDetailedStatus -> Int
hashWithSalt
    Int
_salt
    GetOrganizationConformancePackDetailedStatus' {Maybe Natural
Maybe Text
Maybe OrganizationResourceDetailedStatusFilters
Text
organizationConformancePackName :: Text
nextToken :: Maybe Text
limit :: Maybe Natural
filters :: Maybe OrganizationResourceDetailedStatusFilters
$sel:organizationConformancePackName:GetOrganizationConformancePackDetailedStatus' :: GetOrganizationConformancePackDetailedStatus -> Text
$sel:nextToken:GetOrganizationConformancePackDetailedStatus' :: GetOrganizationConformancePackDetailedStatus -> Maybe Text
$sel:limit:GetOrganizationConformancePackDetailedStatus' :: GetOrganizationConformancePackDetailedStatus -> Maybe Natural
$sel:filters:GetOrganizationConformancePackDetailedStatus' :: GetOrganizationConformancePackDetailedStatus
-> Maybe OrganizationResourceDetailedStatusFilters
..} =
      Int
_salt
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe OrganizationResourceDetailedStatusFilters
filters
        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` Text
organizationConformancePackName

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

instance
  Data.ToHeaders
    GetOrganizationConformancePackDetailedStatus
  where
  toHeaders :: GetOrganizationConformancePackDetailedStatus -> 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.GetOrganizationConformancePackDetailedStatus" ::
                          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
    GetOrganizationConformancePackDetailedStatus
  where
  toJSON :: GetOrganizationConformancePackDetailedStatus -> Value
toJSON
    GetOrganizationConformancePackDetailedStatus' {Maybe Natural
Maybe Text
Maybe OrganizationResourceDetailedStatusFilters
Text
organizationConformancePackName :: Text
nextToken :: Maybe Text
limit :: Maybe Natural
filters :: Maybe OrganizationResourceDetailedStatusFilters
$sel:organizationConformancePackName:GetOrganizationConformancePackDetailedStatus' :: GetOrganizationConformancePackDetailedStatus -> Text
$sel:nextToken:GetOrganizationConformancePackDetailedStatus' :: GetOrganizationConformancePackDetailedStatus -> Maybe Text
$sel:limit:GetOrganizationConformancePackDetailedStatus' :: GetOrganizationConformancePackDetailedStatus -> Maybe Natural
$sel:filters:GetOrganizationConformancePackDetailedStatus' :: GetOrganizationConformancePackDetailedStatus
-> Maybe OrganizationResourceDetailedStatusFilters
..} =
      [Pair] -> Value
Data.object
        ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
            [ (Key
"Filters" 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 OrganizationResourceDetailedStatusFilters
filters,
              (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,
              forall a. a -> Maybe a
Prelude.Just
                ( Key
"OrganizationConformancePackName"
                    forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
organizationConformancePackName
                )
            ]
        )

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

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

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

-- |
-- Create a value of 'GetOrganizationConformancePackDetailedStatusResponse' 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', 'getOrganizationConformancePackDetailedStatusResponse_nextToken' - The nextToken string returned on a previous page that you use to get the
-- next page of results in a paginated response.
--
-- 'organizationConformancePackDetailedStatuses', 'getOrganizationConformancePackDetailedStatusResponse_organizationConformancePackDetailedStatuses' - A list of @OrganizationConformancePackDetailedStatus@ objects.
--
-- 'httpStatus', 'getOrganizationConformancePackDetailedStatusResponse_httpStatus' - The response's http status code.
newGetOrganizationConformancePackDetailedStatusResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  GetOrganizationConformancePackDetailedStatusResponse
newGetOrganizationConformancePackDetailedStatusResponse :: Int -> GetOrganizationConformancePackDetailedStatusResponse
newGetOrganizationConformancePackDetailedStatusResponse
  Int
pHttpStatus_ =
    GetOrganizationConformancePackDetailedStatusResponse'
      { $sel:nextToken:GetOrganizationConformancePackDetailedStatusResponse' :: Maybe Text
nextToken =
          forall a. Maybe a
Prelude.Nothing,
        $sel:organizationConformancePackDetailedStatuses:GetOrganizationConformancePackDetailedStatusResponse' :: Maybe [OrganizationConformancePackDetailedStatus]
organizationConformancePackDetailedStatuses =
          forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:GetOrganizationConformancePackDetailedStatusResponse' :: 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.
getOrganizationConformancePackDetailedStatusResponse_nextToken :: Lens.Lens' GetOrganizationConformancePackDetailedStatusResponse (Prelude.Maybe Prelude.Text)
getOrganizationConformancePackDetailedStatusResponse_nextToken :: Lens'
  GetOrganizationConformancePackDetailedStatusResponse (Maybe Text)
getOrganizationConformancePackDetailedStatusResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetOrganizationConformancePackDetailedStatusResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:GetOrganizationConformancePackDetailedStatusResponse' :: GetOrganizationConformancePackDetailedStatusResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: GetOrganizationConformancePackDetailedStatusResponse
s@GetOrganizationConformancePackDetailedStatusResponse' {} Maybe Text
a -> GetOrganizationConformancePackDetailedStatusResponse
s {$sel:nextToken:GetOrganizationConformancePackDetailedStatusResponse' :: Maybe Text
nextToken = Maybe Text
a} :: GetOrganizationConformancePackDetailedStatusResponse)

-- | A list of @OrganizationConformancePackDetailedStatus@ objects.
getOrganizationConformancePackDetailedStatusResponse_organizationConformancePackDetailedStatuses :: Lens.Lens' GetOrganizationConformancePackDetailedStatusResponse (Prelude.Maybe [OrganizationConformancePackDetailedStatus])
getOrganizationConformancePackDetailedStatusResponse_organizationConformancePackDetailedStatuses :: Lens'
  GetOrganizationConformancePackDetailedStatusResponse
  (Maybe [OrganizationConformancePackDetailedStatus])
getOrganizationConformancePackDetailedStatusResponse_organizationConformancePackDetailedStatuses = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetOrganizationConformancePackDetailedStatusResponse' {Maybe [OrganizationConformancePackDetailedStatus]
organizationConformancePackDetailedStatuses :: Maybe [OrganizationConformancePackDetailedStatus]
$sel:organizationConformancePackDetailedStatuses:GetOrganizationConformancePackDetailedStatusResponse' :: GetOrganizationConformancePackDetailedStatusResponse
-> Maybe [OrganizationConformancePackDetailedStatus]
organizationConformancePackDetailedStatuses} -> Maybe [OrganizationConformancePackDetailedStatus]
organizationConformancePackDetailedStatuses) (\s :: GetOrganizationConformancePackDetailedStatusResponse
s@GetOrganizationConformancePackDetailedStatusResponse' {} Maybe [OrganizationConformancePackDetailedStatus]
a -> GetOrganizationConformancePackDetailedStatusResponse
s {$sel:organizationConformancePackDetailedStatuses:GetOrganizationConformancePackDetailedStatusResponse' :: Maybe [OrganizationConformancePackDetailedStatus]
organizationConformancePackDetailedStatuses = Maybe [OrganizationConformancePackDetailedStatus]
a} :: GetOrganizationConformancePackDetailedStatusResponse) 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.
getOrganizationConformancePackDetailedStatusResponse_httpStatus :: Lens.Lens' GetOrganizationConformancePackDetailedStatusResponse Prelude.Int
getOrganizationConformancePackDetailedStatusResponse_httpStatus :: Lens' GetOrganizationConformancePackDetailedStatusResponse Int
getOrganizationConformancePackDetailedStatusResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetOrganizationConformancePackDetailedStatusResponse' {Int
httpStatus :: Int
$sel:httpStatus:GetOrganizationConformancePackDetailedStatusResponse' :: GetOrganizationConformancePackDetailedStatusResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: GetOrganizationConformancePackDetailedStatusResponse
s@GetOrganizationConformancePackDetailedStatusResponse' {} Int
a -> GetOrganizationConformancePackDetailedStatusResponse
s {$sel:httpStatus:GetOrganizationConformancePackDetailedStatusResponse' :: Int
httpStatus = Int
a} :: GetOrganizationConformancePackDetailedStatusResponse)

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