{-# 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.DescribeOrganizationConformancePackStatuses
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Provides organization conformance pack deployment status for an
-- organization.
--
-- The status is not considered successful until organization conformance
-- pack is successfully deployed in all the member accounts with an
-- exception of excluded accounts.
--
-- 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 pack names. They are only applicable, when you
-- request all the organization conformance packs.
--
-- This operation returns paginated results.
module Amazonka.Config.DescribeOrganizationConformancePackStatuses
  ( -- * Creating a Request
    DescribeOrganizationConformancePackStatuses (..),
    newDescribeOrganizationConformancePackStatuses,

    -- * Request Lenses
    describeOrganizationConformancePackStatuses_limit,
    describeOrganizationConformancePackStatuses_nextToken,
    describeOrganizationConformancePackStatuses_organizationConformancePackNames,

    -- * Destructuring the Response
    DescribeOrganizationConformancePackStatusesResponse (..),
    newDescribeOrganizationConformancePackStatusesResponse,

    -- * Response Lenses
    describeOrganizationConformancePackStatusesResponse_nextToken,
    describeOrganizationConformancePackStatusesResponse_organizationConformancePackStatuses,
    describeOrganizationConformancePackStatusesResponse_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:/ 'newDescribeOrganizationConformancePackStatuses' smart constructor.
data DescribeOrganizationConformancePackStatuses = DescribeOrganizationConformancePackStatuses'
  { -- | The maximum number of OrganizationConformancePackStatuses returned on
    -- each page. If you do no specify a number, Config uses the default. The
    -- default is 100.
    DescribeOrganizationConformancePackStatuses -> 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.
    DescribeOrganizationConformancePackStatuses -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The names of organization conformance packs for which you want status
    -- details. If you do not specify any names, Config returns details for all
    -- your organization conformance packs.
    DescribeOrganizationConformancePackStatuses -> Maybe [Text]
organizationConformancePackNames :: Prelude.Maybe [Prelude.Text]
  }
  deriving (DescribeOrganizationConformancePackStatuses
-> DescribeOrganizationConformancePackStatuses -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeOrganizationConformancePackStatuses
-> DescribeOrganizationConformancePackStatuses -> Bool
$c/= :: DescribeOrganizationConformancePackStatuses
-> DescribeOrganizationConformancePackStatuses -> Bool
== :: DescribeOrganizationConformancePackStatuses
-> DescribeOrganizationConformancePackStatuses -> Bool
$c== :: DescribeOrganizationConformancePackStatuses
-> DescribeOrganizationConformancePackStatuses -> Bool
Prelude.Eq, ReadPrec [DescribeOrganizationConformancePackStatuses]
ReadPrec DescribeOrganizationConformancePackStatuses
Int -> ReadS DescribeOrganizationConformancePackStatuses
ReadS [DescribeOrganizationConformancePackStatuses]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeOrganizationConformancePackStatuses]
$creadListPrec :: ReadPrec [DescribeOrganizationConformancePackStatuses]
readPrec :: ReadPrec DescribeOrganizationConformancePackStatuses
$creadPrec :: ReadPrec DescribeOrganizationConformancePackStatuses
readList :: ReadS [DescribeOrganizationConformancePackStatuses]
$creadList :: ReadS [DescribeOrganizationConformancePackStatuses]
readsPrec :: Int -> ReadS DescribeOrganizationConformancePackStatuses
$creadsPrec :: Int -> ReadS DescribeOrganizationConformancePackStatuses
Prelude.Read, Int -> DescribeOrganizationConformancePackStatuses -> ShowS
[DescribeOrganizationConformancePackStatuses] -> ShowS
DescribeOrganizationConformancePackStatuses -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeOrganizationConformancePackStatuses] -> ShowS
$cshowList :: [DescribeOrganizationConformancePackStatuses] -> ShowS
show :: DescribeOrganizationConformancePackStatuses -> String
$cshow :: DescribeOrganizationConformancePackStatuses -> String
showsPrec :: Int -> DescribeOrganizationConformancePackStatuses -> ShowS
$cshowsPrec :: Int -> DescribeOrganizationConformancePackStatuses -> ShowS
Prelude.Show, forall x.
Rep DescribeOrganizationConformancePackStatuses x
-> DescribeOrganizationConformancePackStatuses
forall x.
DescribeOrganizationConformancePackStatuses
-> Rep DescribeOrganizationConformancePackStatuses x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeOrganizationConformancePackStatuses x
-> DescribeOrganizationConformancePackStatuses
$cfrom :: forall x.
DescribeOrganizationConformancePackStatuses
-> Rep DescribeOrganizationConformancePackStatuses x
Prelude.Generic)

-- |
-- Create a value of 'DescribeOrganizationConformancePackStatuses' 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', 'describeOrganizationConformancePackStatuses_limit' - The maximum number of OrganizationConformancePackStatuses returned on
-- each page. If you do no specify a number, Config uses the default. The
-- default is 100.
--
-- 'nextToken', 'describeOrganizationConformancePackStatuses_nextToken' - The nextToken string returned on a previous page that you use to get the
-- next page of results in a paginated response.
--
-- 'organizationConformancePackNames', 'describeOrganizationConformancePackStatuses_organizationConformancePackNames' - The names of organization conformance packs for which you want status
-- details. If you do not specify any names, Config returns details for all
-- your organization conformance packs.
newDescribeOrganizationConformancePackStatuses ::
  DescribeOrganizationConformancePackStatuses
newDescribeOrganizationConformancePackStatuses :: DescribeOrganizationConformancePackStatuses
newDescribeOrganizationConformancePackStatuses =
  DescribeOrganizationConformancePackStatuses'
    { $sel:limit:DescribeOrganizationConformancePackStatuses' :: Maybe Natural
limit =
        forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:DescribeOrganizationConformancePackStatuses' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:organizationConformancePackNames:DescribeOrganizationConformancePackStatuses' :: Maybe [Text]
organizationConformancePackNames =
        forall a. Maybe a
Prelude.Nothing
    }

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

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

-- | The names of organization conformance packs for which you want status
-- details. If you do not specify any names, Config returns details for all
-- your organization conformance packs.
describeOrganizationConformancePackStatuses_organizationConformancePackNames :: Lens.Lens' DescribeOrganizationConformancePackStatuses (Prelude.Maybe [Prelude.Text])
describeOrganizationConformancePackStatuses_organizationConformancePackNames :: Lens' DescribeOrganizationConformancePackStatuses (Maybe [Text])
describeOrganizationConformancePackStatuses_organizationConformancePackNames = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeOrganizationConformancePackStatuses' {Maybe [Text]
organizationConformancePackNames :: Maybe [Text]
$sel:organizationConformancePackNames:DescribeOrganizationConformancePackStatuses' :: DescribeOrganizationConformancePackStatuses -> Maybe [Text]
organizationConformancePackNames} -> Maybe [Text]
organizationConformancePackNames) (\s :: DescribeOrganizationConformancePackStatuses
s@DescribeOrganizationConformancePackStatuses' {} Maybe [Text]
a -> DescribeOrganizationConformancePackStatuses
s {$sel:organizationConformancePackNames:DescribeOrganizationConformancePackStatuses' :: Maybe [Text]
organizationConformancePackNames = Maybe [Text]
a} :: DescribeOrganizationConformancePackStatuses) 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
    DescribeOrganizationConformancePackStatuses
  where
  page :: DescribeOrganizationConformancePackStatuses
-> AWSResponse DescribeOrganizationConformancePackStatuses
-> Maybe DescribeOrganizationConformancePackStatuses
page DescribeOrganizationConformancePackStatuses
rq AWSResponse DescribeOrganizationConformancePackStatuses
rs
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse DescribeOrganizationConformancePackStatuses
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens'
  DescribeOrganizationConformancePackStatusesResponse (Maybe Text)
describeOrganizationConformancePackStatusesResponse_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 DescribeOrganizationConformancePackStatuses
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens'
  DescribeOrganizationConformancePackStatusesResponse
  (Maybe [OrganizationConformancePackStatus])
describeOrganizationConformancePackStatusesResponse_organizationConformancePackStatuses
            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.$ DescribeOrganizationConformancePackStatuses
rq
          forall a b. a -> (a -> b) -> b
Prelude.& Lens' DescribeOrganizationConformancePackStatuses (Maybe Text)
describeOrganizationConformancePackStatuses_nextToken
          forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse DescribeOrganizationConformancePackStatuses
rs
          forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens'
  DescribeOrganizationConformancePackStatusesResponse (Maybe Text)
describeOrganizationConformancePackStatusesResponse_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
    DescribeOrganizationConformancePackStatuses
  where
  type
    AWSResponse
      DescribeOrganizationConformancePackStatuses =
      DescribeOrganizationConformancePackStatusesResponse
  request :: (Service -> Service)
-> DescribeOrganizationConformancePackStatuses
-> Request DescribeOrganizationConformancePackStatuses
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 DescribeOrganizationConformancePackStatuses
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse
           (AWSResponse DescribeOrganizationConformancePackStatuses)))
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 [OrganizationConformancePackStatus]
-> Int
-> DescribeOrganizationConformancePackStatusesResponse
DescribeOrganizationConformancePackStatusesResponse'
            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
"OrganizationConformancePackStatuses"
                            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
    DescribeOrganizationConformancePackStatuses
  where
  hashWithSalt :: Int -> DescribeOrganizationConformancePackStatuses -> Int
hashWithSalt
    Int
_salt
    DescribeOrganizationConformancePackStatuses' {Maybe Natural
Maybe [Text]
Maybe Text
organizationConformancePackNames :: Maybe [Text]
nextToken :: Maybe Text
limit :: Maybe Natural
$sel:organizationConformancePackNames:DescribeOrganizationConformancePackStatuses' :: DescribeOrganizationConformancePackStatuses -> Maybe [Text]
$sel:nextToken:DescribeOrganizationConformancePackStatuses' :: DescribeOrganizationConformancePackStatuses -> Maybe Text
$sel:limit:DescribeOrganizationConformancePackStatuses' :: DescribeOrganizationConformancePackStatuses -> 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
    DescribeOrganizationConformancePackStatuses
  where
  rnf :: DescribeOrganizationConformancePackStatuses -> ()
rnf DescribeOrganizationConformancePackStatuses' {Maybe Natural
Maybe [Text]
Maybe Text
organizationConformancePackNames :: Maybe [Text]
nextToken :: Maybe Text
limit :: Maybe Natural
$sel:organizationConformancePackNames:DescribeOrganizationConformancePackStatuses' :: DescribeOrganizationConformancePackStatuses -> Maybe [Text]
$sel:nextToken:DescribeOrganizationConformancePackStatuses' :: DescribeOrganizationConformancePackStatuses -> Maybe Text
$sel:limit:DescribeOrganizationConformancePackStatuses' :: DescribeOrganizationConformancePackStatuses -> 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
    DescribeOrganizationConformancePackStatuses
  where
  toHeaders :: DescribeOrganizationConformancePackStatuses -> 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.DescribeOrganizationConformancePackStatuses" ::
                          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
    DescribeOrganizationConformancePackStatuses
  where
  toJSON :: DescribeOrganizationConformancePackStatuses -> Value
toJSON
    DescribeOrganizationConformancePackStatuses' {Maybe Natural
Maybe [Text]
Maybe Text
organizationConformancePackNames :: Maybe [Text]
nextToken :: Maybe Text
limit :: Maybe Natural
$sel:organizationConformancePackNames:DescribeOrganizationConformancePackStatuses' :: DescribeOrganizationConformancePackStatuses -> Maybe [Text]
$sel:nextToken:DescribeOrganizationConformancePackStatuses' :: DescribeOrganizationConformancePackStatuses -> Maybe Text
$sel:limit:DescribeOrganizationConformancePackStatuses' :: DescribeOrganizationConformancePackStatuses -> 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
    DescribeOrganizationConformancePackStatuses
  where
  toPath :: DescribeOrganizationConformancePackStatuses -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"

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

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

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

-- | A list of @OrganizationConformancePackStatus@ objects.
describeOrganizationConformancePackStatusesResponse_organizationConformancePackStatuses :: Lens.Lens' DescribeOrganizationConformancePackStatusesResponse (Prelude.Maybe [OrganizationConformancePackStatus])
describeOrganizationConformancePackStatusesResponse_organizationConformancePackStatuses :: Lens'
  DescribeOrganizationConformancePackStatusesResponse
  (Maybe [OrganizationConformancePackStatus])
describeOrganizationConformancePackStatusesResponse_organizationConformancePackStatuses = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeOrganizationConformancePackStatusesResponse' {Maybe [OrganizationConformancePackStatus]
organizationConformancePackStatuses :: Maybe [OrganizationConformancePackStatus]
$sel:organizationConformancePackStatuses:DescribeOrganizationConformancePackStatusesResponse' :: DescribeOrganizationConformancePackStatusesResponse
-> Maybe [OrganizationConformancePackStatus]
organizationConformancePackStatuses} -> Maybe [OrganizationConformancePackStatus]
organizationConformancePackStatuses) (\s :: DescribeOrganizationConformancePackStatusesResponse
s@DescribeOrganizationConformancePackStatusesResponse' {} Maybe [OrganizationConformancePackStatus]
a -> DescribeOrganizationConformancePackStatusesResponse
s {$sel:organizationConformancePackStatuses:DescribeOrganizationConformancePackStatusesResponse' :: Maybe [OrganizationConformancePackStatus]
organizationConformancePackStatuses = Maybe [OrganizationConformancePackStatus]
a} :: DescribeOrganizationConformancePackStatusesResponse) 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.
describeOrganizationConformancePackStatusesResponse_httpStatus :: Lens.Lens' DescribeOrganizationConformancePackStatusesResponse Prelude.Int
describeOrganizationConformancePackStatusesResponse_httpStatus :: Lens' DescribeOrganizationConformancePackStatusesResponse Int
describeOrganizationConformancePackStatusesResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeOrganizationConformancePackStatusesResponse' {Int
httpStatus :: Int
$sel:httpStatus:DescribeOrganizationConformancePackStatusesResponse' :: DescribeOrganizationConformancePackStatusesResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DescribeOrganizationConformancePackStatusesResponse
s@DescribeOrganizationConformancePackStatusesResponse' {} Int
a -> DescribeOrganizationConformancePackStatusesResponse
s {$sel:httpStatus:DescribeOrganizationConformancePackStatusesResponse' :: Int
httpStatus = Int
a} :: DescribeOrganizationConformancePackStatusesResponse)

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