{-# 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.GetOrganizationConfigRuleDetailedStatus
-- 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 Config rule.
--
-- This operation returns paginated results.
module Amazonka.Config.GetOrganizationConfigRuleDetailedStatus
  ( -- * Creating a Request
    GetOrganizationConfigRuleDetailedStatus (..),
    newGetOrganizationConfigRuleDetailedStatus,

    -- * Request Lenses
    getOrganizationConfigRuleDetailedStatus_filters,
    getOrganizationConfigRuleDetailedStatus_limit,
    getOrganizationConfigRuleDetailedStatus_nextToken,
    getOrganizationConfigRuleDetailedStatus_organizationConfigRuleName,

    -- * Destructuring the Response
    GetOrganizationConfigRuleDetailedStatusResponse (..),
    newGetOrganizationConfigRuleDetailedStatusResponse,

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

-- |
-- Create a value of 'GetOrganizationConfigRuleDetailedStatus' 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', 'getOrganizationConfigRuleDetailedStatus_filters' - A @StatusDetailFilters@ object.
--
-- 'limit', 'getOrganizationConfigRuleDetailedStatus_limit' - The maximum number of @OrganizationConfigRuleDetailedStatus@ returned on
-- each page. If you do not specify a number, Config uses the default. The
-- default is 100.
--
-- 'nextToken', 'getOrganizationConfigRuleDetailedStatus_nextToken' - The @nextToken@ string returned on a previous page that you use to get
-- the next page of results in a paginated response.
--
-- 'organizationConfigRuleName', 'getOrganizationConfigRuleDetailedStatus_organizationConfigRuleName' - The name of your organization Config rule for which you want status
-- details for member accounts.
newGetOrganizationConfigRuleDetailedStatus ::
  -- | 'organizationConfigRuleName'
  Prelude.Text ->
  GetOrganizationConfigRuleDetailedStatus
newGetOrganizationConfigRuleDetailedStatus :: Text -> GetOrganizationConfigRuleDetailedStatus
newGetOrganizationConfigRuleDetailedStatus
  Text
pOrganizationConfigRuleName_ =
    GetOrganizationConfigRuleDetailedStatus'
      { $sel:filters:GetOrganizationConfigRuleDetailedStatus' :: Maybe StatusDetailFilters
filters =
          forall a. Maybe a
Prelude.Nothing,
        $sel:limit:GetOrganizationConfigRuleDetailedStatus' :: Maybe Natural
limit = forall a. Maybe a
Prelude.Nothing,
        $sel:nextToken:GetOrganizationConfigRuleDetailedStatus' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
        $sel:organizationConfigRuleName:GetOrganizationConfigRuleDetailedStatus' :: Text
organizationConfigRuleName =
          Text
pOrganizationConfigRuleName_
      }

-- | A @StatusDetailFilters@ object.
getOrganizationConfigRuleDetailedStatus_filters :: Lens.Lens' GetOrganizationConfigRuleDetailedStatus (Prelude.Maybe StatusDetailFilters)
getOrganizationConfigRuleDetailedStatus_filters :: Lens'
  GetOrganizationConfigRuleDetailedStatus (Maybe StatusDetailFilters)
getOrganizationConfigRuleDetailedStatus_filters = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetOrganizationConfigRuleDetailedStatus' {Maybe StatusDetailFilters
filters :: Maybe StatusDetailFilters
$sel:filters:GetOrganizationConfigRuleDetailedStatus' :: GetOrganizationConfigRuleDetailedStatus
-> Maybe StatusDetailFilters
filters} -> Maybe StatusDetailFilters
filters) (\s :: GetOrganizationConfigRuleDetailedStatus
s@GetOrganizationConfigRuleDetailedStatus' {} Maybe StatusDetailFilters
a -> GetOrganizationConfigRuleDetailedStatus
s {$sel:filters:GetOrganizationConfigRuleDetailedStatus' :: Maybe StatusDetailFilters
filters = Maybe StatusDetailFilters
a} :: GetOrganizationConfigRuleDetailedStatus)

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

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

-- | The name of your organization Config rule for which you want status
-- details for member accounts.
getOrganizationConfigRuleDetailedStatus_organizationConfigRuleName :: Lens.Lens' GetOrganizationConfigRuleDetailedStatus Prelude.Text
getOrganizationConfigRuleDetailedStatus_organizationConfigRuleName :: Lens' GetOrganizationConfigRuleDetailedStatus Text
getOrganizationConfigRuleDetailedStatus_organizationConfigRuleName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetOrganizationConfigRuleDetailedStatus' {Text
organizationConfigRuleName :: Text
$sel:organizationConfigRuleName:GetOrganizationConfigRuleDetailedStatus' :: GetOrganizationConfigRuleDetailedStatus -> Text
organizationConfigRuleName} -> Text
organizationConfigRuleName) (\s :: GetOrganizationConfigRuleDetailedStatus
s@GetOrganizationConfigRuleDetailedStatus' {} Text
a -> GetOrganizationConfigRuleDetailedStatus
s {$sel:organizationConfigRuleName:GetOrganizationConfigRuleDetailedStatus' :: Text
organizationConfigRuleName = Text
a} :: GetOrganizationConfigRuleDetailedStatus)

instance
  Core.AWSPager
    GetOrganizationConfigRuleDetailedStatus
  where
  page :: GetOrganizationConfigRuleDetailedStatus
-> AWSResponse GetOrganizationConfigRuleDetailedStatus
-> Maybe GetOrganizationConfigRuleDetailedStatus
page GetOrganizationConfigRuleDetailedStatus
rq AWSResponse GetOrganizationConfigRuleDetailedStatus
rs
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse GetOrganizationConfigRuleDetailedStatus
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' GetOrganizationConfigRuleDetailedStatusResponse (Maybe Text)
getOrganizationConfigRuleDetailedStatusResponse_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 GetOrganizationConfigRuleDetailedStatus
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens'
  GetOrganizationConfigRuleDetailedStatusResponse
  (Maybe [MemberAccountStatus])
getOrganizationConfigRuleDetailedStatusResponse_organizationConfigRuleDetailedStatus
            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.$ GetOrganizationConfigRuleDetailedStatus
rq
          forall a b. a -> (a -> b) -> b
Prelude.& Lens' GetOrganizationConfigRuleDetailedStatus (Maybe Text)
getOrganizationConfigRuleDetailedStatus_nextToken
          forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse GetOrganizationConfigRuleDetailedStatus
rs
          forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' GetOrganizationConfigRuleDetailedStatusResponse (Maybe Text)
getOrganizationConfigRuleDetailedStatusResponse_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
    GetOrganizationConfigRuleDetailedStatus
  where
  type
    AWSResponse
      GetOrganizationConfigRuleDetailedStatus =
      GetOrganizationConfigRuleDetailedStatusResponse
  request :: (Service -> Service)
-> GetOrganizationConfigRuleDetailedStatus
-> Request GetOrganizationConfigRuleDetailedStatus
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 GetOrganizationConfigRuleDetailedStatus
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse
           (AWSResponse GetOrganizationConfigRuleDetailedStatus)))
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 [MemberAccountStatus]
-> Int
-> GetOrganizationConfigRuleDetailedStatusResponse
GetOrganizationConfigRuleDetailedStatusResponse'
            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
"OrganizationConfigRuleDetailedStatus"
                            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
    GetOrganizationConfigRuleDetailedStatus
  where
  hashWithSalt :: Int -> GetOrganizationConfigRuleDetailedStatus -> Int
hashWithSalt
    Int
_salt
    GetOrganizationConfigRuleDetailedStatus' {Maybe Natural
Maybe Text
Maybe StatusDetailFilters
Text
organizationConfigRuleName :: Text
nextToken :: Maybe Text
limit :: Maybe Natural
filters :: Maybe StatusDetailFilters
$sel:organizationConfigRuleName:GetOrganizationConfigRuleDetailedStatus' :: GetOrganizationConfigRuleDetailedStatus -> Text
$sel:nextToken:GetOrganizationConfigRuleDetailedStatus' :: GetOrganizationConfigRuleDetailedStatus -> Maybe Text
$sel:limit:GetOrganizationConfigRuleDetailedStatus' :: GetOrganizationConfigRuleDetailedStatus -> Maybe Natural
$sel:filters:GetOrganizationConfigRuleDetailedStatus' :: GetOrganizationConfigRuleDetailedStatus
-> Maybe StatusDetailFilters
..} =
      Int
_salt
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe StatusDetailFilters
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
organizationConfigRuleName

instance
  Prelude.NFData
    GetOrganizationConfigRuleDetailedStatus
  where
  rnf :: GetOrganizationConfigRuleDetailedStatus -> ()
rnf GetOrganizationConfigRuleDetailedStatus' {Maybe Natural
Maybe Text
Maybe StatusDetailFilters
Text
organizationConfigRuleName :: Text
nextToken :: Maybe Text
limit :: Maybe Natural
filters :: Maybe StatusDetailFilters
$sel:organizationConfigRuleName:GetOrganizationConfigRuleDetailedStatus' :: GetOrganizationConfigRuleDetailedStatus -> Text
$sel:nextToken:GetOrganizationConfigRuleDetailedStatus' :: GetOrganizationConfigRuleDetailedStatus -> Maybe Text
$sel:limit:GetOrganizationConfigRuleDetailedStatus' :: GetOrganizationConfigRuleDetailedStatus -> Maybe Natural
$sel:filters:GetOrganizationConfigRuleDetailedStatus' :: GetOrganizationConfigRuleDetailedStatus
-> Maybe StatusDetailFilters
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe StatusDetailFilters
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
organizationConfigRuleName

instance
  Data.ToHeaders
    GetOrganizationConfigRuleDetailedStatus
  where
  toHeaders :: GetOrganizationConfigRuleDetailedStatus -> 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.GetOrganizationConfigRuleDetailedStatus" ::
                          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
    GetOrganizationConfigRuleDetailedStatus
  where
  toJSON :: GetOrganizationConfigRuleDetailedStatus -> Value
toJSON GetOrganizationConfigRuleDetailedStatus' {Maybe Natural
Maybe Text
Maybe StatusDetailFilters
Text
organizationConfigRuleName :: Text
nextToken :: Maybe Text
limit :: Maybe Natural
filters :: Maybe StatusDetailFilters
$sel:organizationConfigRuleName:GetOrganizationConfigRuleDetailedStatus' :: GetOrganizationConfigRuleDetailedStatus -> Text
$sel:nextToken:GetOrganizationConfigRuleDetailedStatus' :: GetOrganizationConfigRuleDetailedStatus -> Maybe Text
$sel:limit:GetOrganizationConfigRuleDetailedStatus' :: GetOrganizationConfigRuleDetailedStatus -> Maybe Natural
$sel:filters:GetOrganizationConfigRuleDetailedStatus' :: GetOrganizationConfigRuleDetailedStatus
-> Maybe StatusDetailFilters
..} =
    [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 StatusDetailFilters
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
"OrganizationConfigRuleName"
                  forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
organizationConfigRuleName
              )
          ]
      )

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

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

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

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

-- | A list of @MemberAccountStatus@ objects.
getOrganizationConfigRuleDetailedStatusResponse_organizationConfigRuleDetailedStatus :: Lens.Lens' GetOrganizationConfigRuleDetailedStatusResponse (Prelude.Maybe [MemberAccountStatus])
getOrganizationConfigRuleDetailedStatusResponse_organizationConfigRuleDetailedStatus :: Lens'
  GetOrganizationConfigRuleDetailedStatusResponse
  (Maybe [MemberAccountStatus])
getOrganizationConfigRuleDetailedStatusResponse_organizationConfigRuleDetailedStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetOrganizationConfigRuleDetailedStatusResponse' {Maybe [MemberAccountStatus]
organizationConfigRuleDetailedStatus :: Maybe [MemberAccountStatus]
$sel:organizationConfigRuleDetailedStatus:GetOrganizationConfigRuleDetailedStatusResponse' :: GetOrganizationConfigRuleDetailedStatusResponse
-> Maybe [MemberAccountStatus]
organizationConfigRuleDetailedStatus} -> Maybe [MemberAccountStatus]
organizationConfigRuleDetailedStatus) (\s :: GetOrganizationConfigRuleDetailedStatusResponse
s@GetOrganizationConfigRuleDetailedStatusResponse' {} Maybe [MemberAccountStatus]
a -> GetOrganizationConfigRuleDetailedStatusResponse
s {$sel:organizationConfigRuleDetailedStatus:GetOrganizationConfigRuleDetailedStatusResponse' :: Maybe [MemberAccountStatus]
organizationConfigRuleDetailedStatus = Maybe [MemberAccountStatus]
a} :: GetOrganizationConfigRuleDetailedStatusResponse) 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.
getOrganizationConfigRuleDetailedStatusResponse_httpStatus :: Lens.Lens' GetOrganizationConfigRuleDetailedStatusResponse Prelude.Int
getOrganizationConfigRuleDetailedStatusResponse_httpStatus :: Lens' GetOrganizationConfigRuleDetailedStatusResponse Int
getOrganizationConfigRuleDetailedStatusResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetOrganizationConfigRuleDetailedStatusResponse' {Int
httpStatus :: Int
$sel:httpStatus:GetOrganizationConfigRuleDetailedStatusResponse' :: GetOrganizationConfigRuleDetailedStatusResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: GetOrganizationConfigRuleDetailedStatusResponse
s@GetOrganizationConfigRuleDetailedStatusResponse' {} Int
a -> GetOrganizationConfigRuleDetailedStatusResponse
s {$sel:httpStatus:GetOrganizationConfigRuleDetailedStatusResponse' :: Int
httpStatus = Int
a} :: GetOrganizationConfigRuleDetailedStatusResponse)

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