{-# 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.ComputeOptimizer.GetEnrollmentStatusesForOrganization
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Returns the Compute Optimizer enrollment (opt-in) status of organization
-- member accounts, if your account is an organization management account.
--
-- To get the enrollment status of standalone accounts, use the
-- GetEnrollmentStatus action.
module Amazonka.ComputeOptimizer.GetEnrollmentStatusesForOrganization
  ( -- * Creating a Request
    GetEnrollmentStatusesForOrganization (..),
    newGetEnrollmentStatusesForOrganization,

    -- * Request Lenses
    getEnrollmentStatusesForOrganization_filters,
    getEnrollmentStatusesForOrganization_nextToken,
    getEnrollmentStatusesForOrganization_maxResults,

    -- * Destructuring the Response
    GetEnrollmentStatusesForOrganizationResponse (..),
    newGetEnrollmentStatusesForOrganizationResponse,

    -- * Response Lenses
    getEnrollmentStatusesForOrganizationResponse_accountEnrollmentStatuses,
    getEnrollmentStatusesForOrganizationResponse_nextToken,
    getEnrollmentStatusesForOrganizationResponse_httpStatus,
  )
where

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

-- | /See:/ 'newGetEnrollmentStatusesForOrganization' smart constructor.
data GetEnrollmentStatusesForOrganization = GetEnrollmentStatusesForOrganization'
  { -- | An array of objects to specify a filter that returns a more specific
    -- list of account enrollment statuses.
    GetEnrollmentStatusesForOrganization -> Maybe [EnrollmentFilter]
filters :: Prelude.Maybe [EnrollmentFilter],
    -- | The token to advance to the next page of account enrollment statuses.
    GetEnrollmentStatusesForOrganization -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The maximum number of account enrollment statuses to return with a
    -- single request. You can specify up to 100 statuses to return with each
    -- request.
    --
    -- To retrieve the remaining results, make another request with the
    -- returned @nextToken@ value.
    GetEnrollmentStatusesForOrganization -> Maybe Int
maxResults :: Prelude.Maybe Prelude.Int
  }
  deriving (GetEnrollmentStatusesForOrganization
-> GetEnrollmentStatusesForOrganization -> Bool
(GetEnrollmentStatusesForOrganization
 -> GetEnrollmentStatusesForOrganization -> Bool)
-> (GetEnrollmentStatusesForOrganization
    -> GetEnrollmentStatusesForOrganization -> Bool)
-> Eq GetEnrollmentStatusesForOrganization
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetEnrollmentStatusesForOrganization
-> GetEnrollmentStatusesForOrganization -> Bool
$c/= :: GetEnrollmentStatusesForOrganization
-> GetEnrollmentStatusesForOrganization -> Bool
== :: GetEnrollmentStatusesForOrganization
-> GetEnrollmentStatusesForOrganization -> Bool
$c== :: GetEnrollmentStatusesForOrganization
-> GetEnrollmentStatusesForOrganization -> Bool
Prelude.Eq, ReadPrec [GetEnrollmentStatusesForOrganization]
ReadPrec GetEnrollmentStatusesForOrganization
Int -> ReadS GetEnrollmentStatusesForOrganization
ReadS [GetEnrollmentStatusesForOrganization]
(Int -> ReadS GetEnrollmentStatusesForOrganization)
-> ReadS [GetEnrollmentStatusesForOrganization]
-> ReadPrec GetEnrollmentStatusesForOrganization
-> ReadPrec [GetEnrollmentStatusesForOrganization]
-> Read GetEnrollmentStatusesForOrganization
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetEnrollmentStatusesForOrganization]
$creadListPrec :: ReadPrec [GetEnrollmentStatusesForOrganization]
readPrec :: ReadPrec GetEnrollmentStatusesForOrganization
$creadPrec :: ReadPrec GetEnrollmentStatusesForOrganization
readList :: ReadS [GetEnrollmentStatusesForOrganization]
$creadList :: ReadS [GetEnrollmentStatusesForOrganization]
readsPrec :: Int -> ReadS GetEnrollmentStatusesForOrganization
$creadsPrec :: Int -> ReadS GetEnrollmentStatusesForOrganization
Prelude.Read, Int -> GetEnrollmentStatusesForOrganization -> ShowS
[GetEnrollmentStatusesForOrganization] -> ShowS
GetEnrollmentStatusesForOrganization -> String
(Int -> GetEnrollmentStatusesForOrganization -> ShowS)
-> (GetEnrollmentStatusesForOrganization -> String)
-> ([GetEnrollmentStatusesForOrganization] -> ShowS)
-> Show GetEnrollmentStatusesForOrganization
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetEnrollmentStatusesForOrganization] -> ShowS
$cshowList :: [GetEnrollmentStatusesForOrganization] -> ShowS
show :: GetEnrollmentStatusesForOrganization -> String
$cshow :: GetEnrollmentStatusesForOrganization -> String
showsPrec :: Int -> GetEnrollmentStatusesForOrganization -> ShowS
$cshowsPrec :: Int -> GetEnrollmentStatusesForOrganization -> ShowS
Prelude.Show, (forall x.
 GetEnrollmentStatusesForOrganization
 -> Rep GetEnrollmentStatusesForOrganization x)
-> (forall x.
    Rep GetEnrollmentStatusesForOrganization x
    -> GetEnrollmentStatusesForOrganization)
-> Generic GetEnrollmentStatusesForOrganization
forall x.
Rep GetEnrollmentStatusesForOrganization x
-> GetEnrollmentStatusesForOrganization
forall x.
GetEnrollmentStatusesForOrganization
-> Rep GetEnrollmentStatusesForOrganization x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetEnrollmentStatusesForOrganization x
-> GetEnrollmentStatusesForOrganization
$cfrom :: forall x.
GetEnrollmentStatusesForOrganization
-> Rep GetEnrollmentStatusesForOrganization x
Prelude.Generic)

-- |
-- Create a value of 'GetEnrollmentStatusesForOrganization' 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', 'getEnrollmentStatusesForOrganization_filters' - An array of objects to specify a filter that returns a more specific
-- list of account enrollment statuses.
--
-- 'nextToken', 'getEnrollmentStatusesForOrganization_nextToken' - The token to advance to the next page of account enrollment statuses.
--
-- 'maxResults', 'getEnrollmentStatusesForOrganization_maxResults' - The maximum number of account enrollment statuses to return with a
-- single request. You can specify up to 100 statuses to return with each
-- request.
--
-- To retrieve the remaining results, make another request with the
-- returned @nextToken@ value.
newGetEnrollmentStatusesForOrganization ::
  GetEnrollmentStatusesForOrganization
newGetEnrollmentStatusesForOrganization :: GetEnrollmentStatusesForOrganization
newGetEnrollmentStatusesForOrganization =
  GetEnrollmentStatusesForOrganization' :: Maybe [EnrollmentFilter]
-> Maybe Text -> Maybe Int -> GetEnrollmentStatusesForOrganization
GetEnrollmentStatusesForOrganization'
    { $sel:filters:GetEnrollmentStatusesForOrganization' :: Maybe [EnrollmentFilter]
filters =
        Maybe [EnrollmentFilter]
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:GetEnrollmentStatusesForOrganization' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:GetEnrollmentStatusesForOrganization' :: Maybe Int
maxResults = Maybe Int
forall a. Maybe a
Prelude.Nothing
    }

-- | An array of objects to specify a filter that returns a more specific
-- list of account enrollment statuses.
getEnrollmentStatusesForOrganization_filters :: Lens.Lens' GetEnrollmentStatusesForOrganization (Prelude.Maybe [EnrollmentFilter])
getEnrollmentStatusesForOrganization_filters :: (Maybe [EnrollmentFilter] -> f (Maybe [EnrollmentFilter]))
-> GetEnrollmentStatusesForOrganization
-> f GetEnrollmentStatusesForOrganization
getEnrollmentStatusesForOrganization_filters = (GetEnrollmentStatusesForOrganization -> Maybe [EnrollmentFilter])
-> (GetEnrollmentStatusesForOrganization
    -> Maybe [EnrollmentFilter]
    -> GetEnrollmentStatusesForOrganization)
-> Lens
     GetEnrollmentStatusesForOrganization
     GetEnrollmentStatusesForOrganization
     (Maybe [EnrollmentFilter])
     (Maybe [EnrollmentFilter])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetEnrollmentStatusesForOrganization' {Maybe [EnrollmentFilter]
filters :: Maybe [EnrollmentFilter]
$sel:filters:GetEnrollmentStatusesForOrganization' :: GetEnrollmentStatusesForOrganization -> Maybe [EnrollmentFilter]
filters} -> Maybe [EnrollmentFilter]
filters) (\s :: GetEnrollmentStatusesForOrganization
s@GetEnrollmentStatusesForOrganization' {} Maybe [EnrollmentFilter]
a -> GetEnrollmentStatusesForOrganization
s {$sel:filters:GetEnrollmentStatusesForOrganization' :: Maybe [EnrollmentFilter]
filters = Maybe [EnrollmentFilter]
a} :: GetEnrollmentStatusesForOrganization) ((Maybe [EnrollmentFilter] -> f (Maybe [EnrollmentFilter]))
 -> GetEnrollmentStatusesForOrganization
 -> f GetEnrollmentStatusesForOrganization)
-> ((Maybe [EnrollmentFilter] -> f (Maybe [EnrollmentFilter]))
    -> Maybe [EnrollmentFilter] -> f (Maybe [EnrollmentFilter]))
-> (Maybe [EnrollmentFilter] -> f (Maybe [EnrollmentFilter]))
-> GetEnrollmentStatusesForOrganization
-> f GetEnrollmentStatusesForOrganization
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [EnrollmentFilter]
  [EnrollmentFilter]
  [EnrollmentFilter]
  [EnrollmentFilter]
-> Iso
     (Maybe [EnrollmentFilter])
     (Maybe [EnrollmentFilter])
     (Maybe [EnrollmentFilter])
     (Maybe [EnrollmentFilter])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
  [EnrollmentFilter]
  [EnrollmentFilter]
  [EnrollmentFilter]
  [EnrollmentFilter]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The token to advance to the next page of account enrollment statuses.
getEnrollmentStatusesForOrganization_nextToken :: Lens.Lens' GetEnrollmentStatusesForOrganization (Prelude.Maybe Prelude.Text)
getEnrollmentStatusesForOrganization_nextToken :: (Maybe Text -> f (Maybe Text))
-> GetEnrollmentStatusesForOrganization
-> f GetEnrollmentStatusesForOrganization
getEnrollmentStatusesForOrganization_nextToken = (GetEnrollmentStatusesForOrganization -> Maybe Text)
-> (GetEnrollmentStatusesForOrganization
    -> Maybe Text -> GetEnrollmentStatusesForOrganization)
-> Lens
     GetEnrollmentStatusesForOrganization
     GetEnrollmentStatusesForOrganization
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetEnrollmentStatusesForOrganization' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:GetEnrollmentStatusesForOrganization' :: GetEnrollmentStatusesForOrganization -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: GetEnrollmentStatusesForOrganization
s@GetEnrollmentStatusesForOrganization' {} Maybe Text
a -> GetEnrollmentStatusesForOrganization
s {$sel:nextToken:GetEnrollmentStatusesForOrganization' :: Maybe Text
nextToken = Maybe Text
a} :: GetEnrollmentStatusesForOrganization)

-- | The maximum number of account enrollment statuses to return with a
-- single request. You can specify up to 100 statuses to return with each
-- request.
--
-- To retrieve the remaining results, make another request with the
-- returned @nextToken@ value.
getEnrollmentStatusesForOrganization_maxResults :: Lens.Lens' GetEnrollmentStatusesForOrganization (Prelude.Maybe Prelude.Int)
getEnrollmentStatusesForOrganization_maxResults :: (Maybe Int -> f (Maybe Int))
-> GetEnrollmentStatusesForOrganization
-> f GetEnrollmentStatusesForOrganization
getEnrollmentStatusesForOrganization_maxResults = (GetEnrollmentStatusesForOrganization -> Maybe Int)
-> (GetEnrollmentStatusesForOrganization
    -> Maybe Int -> GetEnrollmentStatusesForOrganization)
-> Lens
     GetEnrollmentStatusesForOrganization
     GetEnrollmentStatusesForOrganization
     (Maybe Int)
     (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetEnrollmentStatusesForOrganization' {Maybe Int
maxResults :: Maybe Int
$sel:maxResults:GetEnrollmentStatusesForOrganization' :: GetEnrollmentStatusesForOrganization -> Maybe Int
maxResults} -> Maybe Int
maxResults) (\s :: GetEnrollmentStatusesForOrganization
s@GetEnrollmentStatusesForOrganization' {} Maybe Int
a -> GetEnrollmentStatusesForOrganization
s {$sel:maxResults:GetEnrollmentStatusesForOrganization' :: Maybe Int
maxResults = Maybe Int
a} :: GetEnrollmentStatusesForOrganization)

instance
  Core.AWSRequest
    GetEnrollmentStatusesForOrganization
  where
  type
    AWSResponse GetEnrollmentStatusesForOrganization =
      GetEnrollmentStatusesForOrganizationResponse
  request :: GetEnrollmentStatusesForOrganization
-> Request GetEnrollmentStatusesForOrganization
request = Service
-> GetEnrollmentStatusesForOrganization
-> Request GetEnrollmentStatusesForOrganization
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy GetEnrollmentStatusesForOrganization
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse
           (AWSResponse GetEnrollmentStatusesForOrganization)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either
      String (AWSResponse GetEnrollmentStatusesForOrganization))
-> Logger
-> Service
-> Proxy GetEnrollmentStatusesForOrganization
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse
           (AWSResponse GetEnrollmentStatusesForOrganization)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe [AccountEnrollmentStatus]
-> Maybe Text
-> Int
-> GetEnrollmentStatusesForOrganizationResponse
GetEnrollmentStatusesForOrganizationResponse'
            (Maybe [AccountEnrollmentStatus]
 -> Maybe Text
 -> Int
 -> GetEnrollmentStatusesForOrganizationResponse)
-> Either String (Maybe [AccountEnrollmentStatus])
-> Either
     String
     (Maybe Text -> Int -> GetEnrollmentStatusesForOrganizationResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( Object
x Object
-> Text -> Either String (Maybe (Maybe [AccountEnrollmentStatus]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"accountEnrollmentStatuses"
                            Either String (Maybe (Maybe [AccountEnrollmentStatus]))
-> Maybe [AccountEnrollmentStatus]
-> Either String (Maybe [AccountEnrollmentStatus])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [AccountEnrollmentStatus]
forall a. Monoid a => a
Prelude.mempty
                        )
              Either
  String
  (Maybe Text -> Int -> GetEnrollmentStatusesForOrganizationResponse)
-> Either String (Maybe Text)
-> Either
     String (Int -> GetEnrollmentStatusesForOrganizationResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"nextToken")
              Either String (Int -> GetEnrollmentStatusesForOrganizationResponse)
-> Either String Int
-> Either String GetEnrollmentStatusesForOrganizationResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance
  Prelude.Hashable
    GetEnrollmentStatusesForOrganization

instance
  Prelude.NFData
    GetEnrollmentStatusesForOrganization

instance
  Core.ToHeaders
    GetEnrollmentStatusesForOrganization
  where
  toHeaders :: GetEnrollmentStatusesForOrganization -> ResponseHeaders
toHeaders =
    ResponseHeaders
-> GetEnrollmentStatusesForOrganization -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"X-Amz-Target"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"ComputeOptimizerService.GetEnrollmentStatusesForOrganization" ::
                          Prelude.ByteString
                      ),
            HeaderName
"Content-Type"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.0" ::
                          Prelude.ByteString
                      )
          ]
      )

instance
  Core.ToJSON
    GetEnrollmentStatusesForOrganization
  where
  toJSON :: GetEnrollmentStatusesForOrganization -> Value
toJSON GetEnrollmentStatusesForOrganization' {Maybe Int
Maybe [EnrollmentFilter]
Maybe Text
maxResults :: Maybe Int
nextToken :: Maybe Text
filters :: Maybe [EnrollmentFilter]
$sel:maxResults:GetEnrollmentStatusesForOrganization' :: GetEnrollmentStatusesForOrganization -> Maybe Int
$sel:nextToken:GetEnrollmentStatusesForOrganization' :: GetEnrollmentStatusesForOrganization -> Maybe Text
$sel:filters:GetEnrollmentStatusesForOrganization' :: GetEnrollmentStatusesForOrganization -> Maybe [EnrollmentFilter]
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"filters" Text -> [EnrollmentFilter] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([EnrollmentFilter] -> Pair)
-> Maybe [EnrollmentFilter] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [EnrollmentFilter]
filters,
            (Text
"nextToken" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
nextToken,
            (Text
"maxResults" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Int -> Pair) -> Maybe Int -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
maxResults
          ]
      )

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

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

-- | /See:/ 'newGetEnrollmentStatusesForOrganizationResponse' smart constructor.
data GetEnrollmentStatusesForOrganizationResponse = GetEnrollmentStatusesForOrganizationResponse'
  { -- | An array of objects that describe the enrollment statuses of
    -- organization member accounts.
    GetEnrollmentStatusesForOrganizationResponse
-> Maybe [AccountEnrollmentStatus]
accountEnrollmentStatuses :: Prelude.Maybe [AccountEnrollmentStatus],
    -- | The token to use to advance to the next page of account enrollment
    -- statuses.
    --
    -- This value is null when there are no more pages of account enrollment
    -- statuses to return.
    GetEnrollmentStatusesForOrganizationResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    GetEnrollmentStatusesForOrganizationResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (GetEnrollmentStatusesForOrganizationResponse
-> GetEnrollmentStatusesForOrganizationResponse -> Bool
(GetEnrollmentStatusesForOrganizationResponse
 -> GetEnrollmentStatusesForOrganizationResponse -> Bool)
-> (GetEnrollmentStatusesForOrganizationResponse
    -> GetEnrollmentStatusesForOrganizationResponse -> Bool)
-> Eq GetEnrollmentStatusesForOrganizationResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetEnrollmentStatusesForOrganizationResponse
-> GetEnrollmentStatusesForOrganizationResponse -> Bool
$c/= :: GetEnrollmentStatusesForOrganizationResponse
-> GetEnrollmentStatusesForOrganizationResponse -> Bool
== :: GetEnrollmentStatusesForOrganizationResponse
-> GetEnrollmentStatusesForOrganizationResponse -> Bool
$c== :: GetEnrollmentStatusesForOrganizationResponse
-> GetEnrollmentStatusesForOrganizationResponse -> Bool
Prelude.Eq, ReadPrec [GetEnrollmentStatusesForOrganizationResponse]
ReadPrec GetEnrollmentStatusesForOrganizationResponse
Int -> ReadS GetEnrollmentStatusesForOrganizationResponse
ReadS [GetEnrollmentStatusesForOrganizationResponse]
(Int -> ReadS GetEnrollmentStatusesForOrganizationResponse)
-> ReadS [GetEnrollmentStatusesForOrganizationResponse]
-> ReadPrec GetEnrollmentStatusesForOrganizationResponse
-> ReadPrec [GetEnrollmentStatusesForOrganizationResponse]
-> Read GetEnrollmentStatusesForOrganizationResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetEnrollmentStatusesForOrganizationResponse]
$creadListPrec :: ReadPrec [GetEnrollmentStatusesForOrganizationResponse]
readPrec :: ReadPrec GetEnrollmentStatusesForOrganizationResponse
$creadPrec :: ReadPrec GetEnrollmentStatusesForOrganizationResponse
readList :: ReadS [GetEnrollmentStatusesForOrganizationResponse]
$creadList :: ReadS [GetEnrollmentStatusesForOrganizationResponse]
readsPrec :: Int -> ReadS GetEnrollmentStatusesForOrganizationResponse
$creadsPrec :: Int -> ReadS GetEnrollmentStatusesForOrganizationResponse
Prelude.Read, Int -> GetEnrollmentStatusesForOrganizationResponse -> ShowS
[GetEnrollmentStatusesForOrganizationResponse] -> ShowS
GetEnrollmentStatusesForOrganizationResponse -> String
(Int -> GetEnrollmentStatusesForOrganizationResponse -> ShowS)
-> (GetEnrollmentStatusesForOrganizationResponse -> String)
-> ([GetEnrollmentStatusesForOrganizationResponse] -> ShowS)
-> Show GetEnrollmentStatusesForOrganizationResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetEnrollmentStatusesForOrganizationResponse] -> ShowS
$cshowList :: [GetEnrollmentStatusesForOrganizationResponse] -> ShowS
show :: GetEnrollmentStatusesForOrganizationResponse -> String
$cshow :: GetEnrollmentStatusesForOrganizationResponse -> String
showsPrec :: Int -> GetEnrollmentStatusesForOrganizationResponse -> ShowS
$cshowsPrec :: Int -> GetEnrollmentStatusesForOrganizationResponse -> ShowS
Prelude.Show, (forall x.
 GetEnrollmentStatusesForOrganizationResponse
 -> Rep GetEnrollmentStatusesForOrganizationResponse x)
-> (forall x.
    Rep GetEnrollmentStatusesForOrganizationResponse x
    -> GetEnrollmentStatusesForOrganizationResponse)
-> Generic GetEnrollmentStatusesForOrganizationResponse
forall x.
Rep GetEnrollmentStatusesForOrganizationResponse x
-> GetEnrollmentStatusesForOrganizationResponse
forall x.
GetEnrollmentStatusesForOrganizationResponse
-> Rep GetEnrollmentStatusesForOrganizationResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetEnrollmentStatusesForOrganizationResponse x
-> GetEnrollmentStatusesForOrganizationResponse
$cfrom :: forall x.
GetEnrollmentStatusesForOrganizationResponse
-> Rep GetEnrollmentStatusesForOrganizationResponse x
Prelude.Generic)

-- |
-- Create a value of 'GetEnrollmentStatusesForOrganizationResponse' 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:
--
-- 'accountEnrollmentStatuses', 'getEnrollmentStatusesForOrganizationResponse_accountEnrollmentStatuses' - An array of objects that describe the enrollment statuses of
-- organization member accounts.
--
-- 'nextToken', 'getEnrollmentStatusesForOrganizationResponse_nextToken' - The token to use to advance to the next page of account enrollment
-- statuses.
--
-- This value is null when there are no more pages of account enrollment
-- statuses to return.
--
-- 'httpStatus', 'getEnrollmentStatusesForOrganizationResponse_httpStatus' - The response's http status code.
newGetEnrollmentStatusesForOrganizationResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  GetEnrollmentStatusesForOrganizationResponse
newGetEnrollmentStatusesForOrganizationResponse :: Int -> GetEnrollmentStatusesForOrganizationResponse
newGetEnrollmentStatusesForOrganizationResponse
  Int
pHttpStatus_ =
    GetEnrollmentStatusesForOrganizationResponse' :: Maybe [AccountEnrollmentStatus]
-> Maybe Text
-> Int
-> GetEnrollmentStatusesForOrganizationResponse
GetEnrollmentStatusesForOrganizationResponse'
      { $sel:accountEnrollmentStatuses:GetEnrollmentStatusesForOrganizationResponse' :: Maybe [AccountEnrollmentStatus]
accountEnrollmentStatuses =
          Maybe [AccountEnrollmentStatus]
forall a. Maybe a
Prelude.Nothing,
        $sel:nextToken:GetEnrollmentStatusesForOrganizationResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:GetEnrollmentStatusesForOrganizationResponse' :: Int
httpStatus = Int
pHttpStatus_
      }

-- | An array of objects that describe the enrollment statuses of
-- organization member accounts.
getEnrollmentStatusesForOrganizationResponse_accountEnrollmentStatuses :: Lens.Lens' GetEnrollmentStatusesForOrganizationResponse (Prelude.Maybe [AccountEnrollmentStatus])
getEnrollmentStatusesForOrganizationResponse_accountEnrollmentStatuses :: (Maybe [AccountEnrollmentStatus]
 -> f (Maybe [AccountEnrollmentStatus]))
-> GetEnrollmentStatusesForOrganizationResponse
-> f GetEnrollmentStatusesForOrganizationResponse
getEnrollmentStatusesForOrganizationResponse_accountEnrollmentStatuses = (GetEnrollmentStatusesForOrganizationResponse
 -> Maybe [AccountEnrollmentStatus])
-> (GetEnrollmentStatusesForOrganizationResponse
    -> Maybe [AccountEnrollmentStatus]
    -> GetEnrollmentStatusesForOrganizationResponse)
-> Lens
     GetEnrollmentStatusesForOrganizationResponse
     GetEnrollmentStatusesForOrganizationResponse
     (Maybe [AccountEnrollmentStatus])
     (Maybe [AccountEnrollmentStatus])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetEnrollmentStatusesForOrganizationResponse' {Maybe [AccountEnrollmentStatus]
accountEnrollmentStatuses :: Maybe [AccountEnrollmentStatus]
$sel:accountEnrollmentStatuses:GetEnrollmentStatusesForOrganizationResponse' :: GetEnrollmentStatusesForOrganizationResponse
-> Maybe [AccountEnrollmentStatus]
accountEnrollmentStatuses} -> Maybe [AccountEnrollmentStatus]
accountEnrollmentStatuses) (\s :: GetEnrollmentStatusesForOrganizationResponse
s@GetEnrollmentStatusesForOrganizationResponse' {} Maybe [AccountEnrollmentStatus]
a -> GetEnrollmentStatusesForOrganizationResponse
s {$sel:accountEnrollmentStatuses:GetEnrollmentStatusesForOrganizationResponse' :: Maybe [AccountEnrollmentStatus]
accountEnrollmentStatuses = Maybe [AccountEnrollmentStatus]
a} :: GetEnrollmentStatusesForOrganizationResponse) ((Maybe [AccountEnrollmentStatus]
  -> f (Maybe [AccountEnrollmentStatus]))
 -> GetEnrollmentStatusesForOrganizationResponse
 -> f GetEnrollmentStatusesForOrganizationResponse)
-> ((Maybe [AccountEnrollmentStatus]
     -> f (Maybe [AccountEnrollmentStatus]))
    -> Maybe [AccountEnrollmentStatus]
    -> f (Maybe [AccountEnrollmentStatus]))
-> (Maybe [AccountEnrollmentStatus]
    -> f (Maybe [AccountEnrollmentStatus]))
-> GetEnrollmentStatusesForOrganizationResponse
-> f GetEnrollmentStatusesForOrganizationResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [AccountEnrollmentStatus]
  [AccountEnrollmentStatus]
  [AccountEnrollmentStatus]
  [AccountEnrollmentStatus]
-> Iso
     (Maybe [AccountEnrollmentStatus])
     (Maybe [AccountEnrollmentStatus])
     (Maybe [AccountEnrollmentStatus])
     (Maybe [AccountEnrollmentStatus])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
  [AccountEnrollmentStatus]
  [AccountEnrollmentStatus]
  [AccountEnrollmentStatus]
  [AccountEnrollmentStatus]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The token to use to advance to the next page of account enrollment
-- statuses.
--
-- This value is null when there are no more pages of account enrollment
-- statuses to return.
getEnrollmentStatusesForOrganizationResponse_nextToken :: Lens.Lens' GetEnrollmentStatusesForOrganizationResponse (Prelude.Maybe Prelude.Text)
getEnrollmentStatusesForOrganizationResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> GetEnrollmentStatusesForOrganizationResponse
-> f GetEnrollmentStatusesForOrganizationResponse
getEnrollmentStatusesForOrganizationResponse_nextToken = (GetEnrollmentStatusesForOrganizationResponse -> Maybe Text)
-> (GetEnrollmentStatusesForOrganizationResponse
    -> Maybe Text -> GetEnrollmentStatusesForOrganizationResponse)
-> Lens
     GetEnrollmentStatusesForOrganizationResponse
     GetEnrollmentStatusesForOrganizationResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetEnrollmentStatusesForOrganizationResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:GetEnrollmentStatusesForOrganizationResponse' :: GetEnrollmentStatusesForOrganizationResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: GetEnrollmentStatusesForOrganizationResponse
s@GetEnrollmentStatusesForOrganizationResponse' {} Maybe Text
a -> GetEnrollmentStatusesForOrganizationResponse
s {$sel:nextToken:GetEnrollmentStatusesForOrganizationResponse' :: Maybe Text
nextToken = Maybe Text
a} :: GetEnrollmentStatusesForOrganizationResponse)

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

instance
  Prelude.NFData
    GetEnrollmentStatusesForOrganizationResponse