{-# 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.DirectoryService.ListSchemaExtensions
-- 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)
--
-- Lists all schema extensions applied to a Microsoft AD Directory.
--
-- This operation returns paginated results.
module Amazonka.DirectoryService.ListSchemaExtensions
  ( -- * Creating a Request
    ListSchemaExtensions (..),
    newListSchemaExtensions,

    -- * Request Lenses
    listSchemaExtensions_nextToken,
    listSchemaExtensions_limit,
    listSchemaExtensions_directoryId,

    -- * Destructuring the Response
    ListSchemaExtensionsResponse (..),
    newListSchemaExtensionsResponse,

    -- * Response Lenses
    listSchemaExtensionsResponse_schemaExtensionsInfo,
    listSchemaExtensionsResponse_nextToken,
    listSchemaExtensionsResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import Amazonka.DirectoryService.Types
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:/ 'newListSchemaExtensions' smart constructor.
data ListSchemaExtensions = ListSchemaExtensions'
  { -- | The @ListSchemaExtensions.NextToken@ value from a previous call to
    -- @ListSchemaExtensions@. Pass null if this is the first call.
    ListSchemaExtensions -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The maximum number of items to return.
    ListSchemaExtensions -> Maybe Natural
limit :: Prelude.Maybe Prelude.Natural,
    -- | The identifier of the directory from which to retrieve the schema
    -- extension information.
    ListSchemaExtensions -> Text
directoryId :: Prelude.Text
  }
  deriving (ListSchemaExtensions -> ListSchemaExtensions -> Bool
(ListSchemaExtensions -> ListSchemaExtensions -> Bool)
-> (ListSchemaExtensions -> ListSchemaExtensions -> Bool)
-> Eq ListSchemaExtensions
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListSchemaExtensions -> ListSchemaExtensions -> Bool
$c/= :: ListSchemaExtensions -> ListSchemaExtensions -> Bool
== :: ListSchemaExtensions -> ListSchemaExtensions -> Bool
$c== :: ListSchemaExtensions -> ListSchemaExtensions -> Bool
Prelude.Eq, ReadPrec [ListSchemaExtensions]
ReadPrec ListSchemaExtensions
Int -> ReadS ListSchemaExtensions
ReadS [ListSchemaExtensions]
(Int -> ReadS ListSchemaExtensions)
-> ReadS [ListSchemaExtensions]
-> ReadPrec ListSchemaExtensions
-> ReadPrec [ListSchemaExtensions]
-> Read ListSchemaExtensions
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListSchemaExtensions]
$creadListPrec :: ReadPrec [ListSchemaExtensions]
readPrec :: ReadPrec ListSchemaExtensions
$creadPrec :: ReadPrec ListSchemaExtensions
readList :: ReadS [ListSchemaExtensions]
$creadList :: ReadS [ListSchemaExtensions]
readsPrec :: Int -> ReadS ListSchemaExtensions
$creadsPrec :: Int -> ReadS ListSchemaExtensions
Prelude.Read, Int -> ListSchemaExtensions -> ShowS
[ListSchemaExtensions] -> ShowS
ListSchemaExtensions -> String
(Int -> ListSchemaExtensions -> ShowS)
-> (ListSchemaExtensions -> String)
-> ([ListSchemaExtensions] -> ShowS)
-> Show ListSchemaExtensions
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListSchemaExtensions] -> ShowS
$cshowList :: [ListSchemaExtensions] -> ShowS
show :: ListSchemaExtensions -> String
$cshow :: ListSchemaExtensions -> String
showsPrec :: Int -> ListSchemaExtensions -> ShowS
$cshowsPrec :: Int -> ListSchemaExtensions -> ShowS
Prelude.Show, (forall x. ListSchemaExtensions -> Rep ListSchemaExtensions x)
-> (forall x. Rep ListSchemaExtensions x -> ListSchemaExtensions)
-> Generic ListSchemaExtensions
forall x. Rep ListSchemaExtensions x -> ListSchemaExtensions
forall x. ListSchemaExtensions -> Rep ListSchemaExtensions x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListSchemaExtensions x -> ListSchemaExtensions
$cfrom :: forall x. ListSchemaExtensions -> Rep ListSchemaExtensions x
Prelude.Generic)

-- |
-- Create a value of 'ListSchemaExtensions' 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', 'listSchemaExtensions_nextToken' - The @ListSchemaExtensions.NextToken@ value from a previous call to
-- @ListSchemaExtensions@. Pass null if this is the first call.
--
-- 'limit', 'listSchemaExtensions_limit' - The maximum number of items to return.
--
-- 'directoryId', 'listSchemaExtensions_directoryId' - The identifier of the directory from which to retrieve the schema
-- extension information.
newListSchemaExtensions ::
  -- | 'directoryId'
  Prelude.Text ->
  ListSchemaExtensions
newListSchemaExtensions :: Text -> ListSchemaExtensions
newListSchemaExtensions Text
pDirectoryId_ =
  ListSchemaExtensions' :: Maybe Text -> Maybe Natural -> Text -> ListSchemaExtensions
ListSchemaExtensions'
    { $sel:nextToken:ListSchemaExtensions' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:limit:ListSchemaExtensions' :: Maybe Natural
limit = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:directoryId:ListSchemaExtensions' :: Text
directoryId = Text
pDirectoryId_
    }

-- | The @ListSchemaExtensions.NextToken@ value from a previous call to
-- @ListSchemaExtensions@. Pass null if this is the first call.
listSchemaExtensions_nextToken :: Lens.Lens' ListSchemaExtensions (Prelude.Maybe Prelude.Text)
listSchemaExtensions_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListSchemaExtensions -> f ListSchemaExtensions
listSchemaExtensions_nextToken = (ListSchemaExtensions -> Maybe Text)
-> (ListSchemaExtensions -> Maybe Text -> ListSchemaExtensions)
-> Lens
     ListSchemaExtensions ListSchemaExtensions (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListSchemaExtensions' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListSchemaExtensions' :: ListSchemaExtensions -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListSchemaExtensions
s@ListSchemaExtensions' {} Maybe Text
a -> ListSchemaExtensions
s {$sel:nextToken:ListSchemaExtensions' :: Maybe Text
nextToken = Maybe Text
a} :: ListSchemaExtensions)

-- | The maximum number of items to return.
listSchemaExtensions_limit :: Lens.Lens' ListSchemaExtensions (Prelude.Maybe Prelude.Natural)
listSchemaExtensions_limit :: (Maybe Natural -> f (Maybe Natural))
-> ListSchemaExtensions -> f ListSchemaExtensions
listSchemaExtensions_limit = (ListSchemaExtensions -> Maybe Natural)
-> (ListSchemaExtensions -> Maybe Natural -> ListSchemaExtensions)
-> Lens
     ListSchemaExtensions
     ListSchemaExtensions
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListSchemaExtensions' {Maybe Natural
limit :: Maybe Natural
$sel:limit:ListSchemaExtensions' :: ListSchemaExtensions -> Maybe Natural
limit} -> Maybe Natural
limit) (\s :: ListSchemaExtensions
s@ListSchemaExtensions' {} Maybe Natural
a -> ListSchemaExtensions
s {$sel:limit:ListSchemaExtensions' :: Maybe Natural
limit = Maybe Natural
a} :: ListSchemaExtensions)

-- | The identifier of the directory from which to retrieve the schema
-- extension information.
listSchemaExtensions_directoryId :: Lens.Lens' ListSchemaExtensions Prelude.Text
listSchemaExtensions_directoryId :: (Text -> f Text) -> ListSchemaExtensions -> f ListSchemaExtensions
listSchemaExtensions_directoryId = (ListSchemaExtensions -> Text)
-> (ListSchemaExtensions -> Text -> ListSchemaExtensions)
-> Lens ListSchemaExtensions ListSchemaExtensions Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListSchemaExtensions' {Text
directoryId :: Text
$sel:directoryId:ListSchemaExtensions' :: ListSchemaExtensions -> Text
directoryId} -> Text
directoryId) (\s :: ListSchemaExtensions
s@ListSchemaExtensions' {} Text
a -> ListSchemaExtensions
s {$sel:directoryId:ListSchemaExtensions' :: Text
directoryId = Text
a} :: ListSchemaExtensions)

instance Core.AWSPager ListSchemaExtensions where
  page :: ListSchemaExtensions
-> AWSResponse ListSchemaExtensions -> Maybe ListSchemaExtensions
page ListSchemaExtensions
rq AWSResponse ListSchemaExtensions
rs
    | Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListSchemaExtensions
ListSchemaExtensionsResponse
rs
            ListSchemaExtensionsResponse
-> Getting (First Text) ListSchemaExtensionsResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListSchemaExtensionsResponse
-> Const (First Text) ListSchemaExtensionsResponse
Lens' ListSchemaExtensionsResponse (Maybe Text)
listSchemaExtensionsResponse_nextToken
              ((Maybe Text -> Const (First Text) (Maybe Text))
 -> ListSchemaExtensionsResponse
 -> Const (First Text) ListSchemaExtensionsResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListSchemaExtensionsResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
      Maybe ListSchemaExtensions
forall a. Maybe a
Prelude.Nothing
    | Maybe [SchemaExtensionInfo] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListSchemaExtensions
ListSchemaExtensionsResponse
rs
            ListSchemaExtensionsResponse
-> Getting
     (First [SchemaExtensionInfo])
     ListSchemaExtensionsResponse
     [SchemaExtensionInfo]
-> Maybe [SchemaExtensionInfo]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [SchemaExtensionInfo]
 -> Const
      (First [SchemaExtensionInfo]) (Maybe [SchemaExtensionInfo]))
-> ListSchemaExtensionsResponse
-> Const (First [SchemaExtensionInfo]) ListSchemaExtensionsResponse
Lens' ListSchemaExtensionsResponse (Maybe [SchemaExtensionInfo])
listSchemaExtensionsResponse_schemaExtensionsInfo
              ((Maybe [SchemaExtensionInfo]
  -> Const
       (First [SchemaExtensionInfo]) (Maybe [SchemaExtensionInfo]))
 -> ListSchemaExtensionsResponse
 -> Const
      (First [SchemaExtensionInfo]) ListSchemaExtensionsResponse)
-> (([SchemaExtensionInfo]
     -> Const (First [SchemaExtensionInfo]) [SchemaExtensionInfo])
    -> Maybe [SchemaExtensionInfo]
    -> Const
         (First [SchemaExtensionInfo]) (Maybe [SchemaExtensionInfo]))
-> Getting
     (First [SchemaExtensionInfo])
     ListSchemaExtensionsResponse
     [SchemaExtensionInfo]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([SchemaExtensionInfo]
 -> Const (First [SchemaExtensionInfo]) [SchemaExtensionInfo])
-> Maybe [SchemaExtensionInfo]
-> Const
     (First [SchemaExtensionInfo]) (Maybe [SchemaExtensionInfo])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
      Maybe ListSchemaExtensions
forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
      ListSchemaExtensions -> Maybe ListSchemaExtensions
forall a. a -> Maybe a
Prelude.Just (ListSchemaExtensions -> Maybe ListSchemaExtensions)
-> ListSchemaExtensions -> Maybe ListSchemaExtensions
forall a b. (a -> b) -> a -> b
Prelude.$
        ListSchemaExtensions
rq
          ListSchemaExtensions
-> (ListSchemaExtensions -> ListSchemaExtensions)
-> ListSchemaExtensions
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> ListSchemaExtensions -> Identity ListSchemaExtensions
Lens
  ListSchemaExtensions ListSchemaExtensions (Maybe Text) (Maybe Text)
listSchemaExtensions_nextToken
          ((Maybe Text -> Identity (Maybe Text))
 -> ListSchemaExtensions -> Identity ListSchemaExtensions)
-> Maybe Text -> ListSchemaExtensions -> ListSchemaExtensions
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListSchemaExtensions
ListSchemaExtensionsResponse
rs
          ListSchemaExtensionsResponse
-> Getting (First Text) ListSchemaExtensionsResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListSchemaExtensionsResponse
-> Const (First Text) ListSchemaExtensionsResponse
Lens' ListSchemaExtensionsResponse (Maybe Text)
listSchemaExtensionsResponse_nextToken
            ((Maybe Text -> Const (First Text) (Maybe Text))
 -> ListSchemaExtensionsResponse
 -> Const (First Text) ListSchemaExtensionsResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListSchemaExtensionsResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just

instance Core.AWSRequest ListSchemaExtensions where
  type
    AWSResponse ListSchemaExtensions =
      ListSchemaExtensionsResponse
  request :: ListSchemaExtensions -> Request ListSchemaExtensions
request = Service -> ListSchemaExtensions -> Request ListSchemaExtensions
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy ListSchemaExtensions
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListSchemaExtensions)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse ListSchemaExtensions))
-> Logger
-> Service
-> Proxy ListSchemaExtensions
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListSchemaExtensions)))
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 [SchemaExtensionInfo]
-> Maybe Text -> Int -> ListSchemaExtensionsResponse
ListSchemaExtensionsResponse'
            (Maybe [SchemaExtensionInfo]
 -> Maybe Text -> Int -> ListSchemaExtensionsResponse)
-> Either String (Maybe [SchemaExtensionInfo])
-> Either
     String (Maybe Text -> Int -> ListSchemaExtensionsResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( Object
x Object
-> Text -> Either String (Maybe (Maybe [SchemaExtensionInfo]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"SchemaExtensionsInfo"
                            Either String (Maybe (Maybe [SchemaExtensionInfo]))
-> Maybe [SchemaExtensionInfo]
-> Either String (Maybe [SchemaExtensionInfo])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [SchemaExtensionInfo]
forall a. Monoid a => a
Prelude.mempty
                        )
            Either String (Maybe Text -> Int -> ListSchemaExtensionsResponse)
-> Either String (Maybe Text)
-> Either String (Int -> ListSchemaExtensionsResponse)
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 -> ListSchemaExtensionsResponse)
-> Either String Int -> Either String ListSchemaExtensionsResponse
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 ListSchemaExtensions

instance Prelude.NFData ListSchemaExtensions

instance Core.ToHeaders ListSchemaExtensions where
  toHeaders :: ListSchemaExtensions -> ResponseHeaders
toHeaders =
    ResponseHeaders -> ListSchemaExtensions -> 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
"DirectoryService_20150416.ListSchemaExtensions" ::
                          Prelude.ByteString
                      ),
            HeaderName
"Content-Type"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Core.ToJSON ListSchemaExtensions where
  toJSON :: ListSchemaExtensions -> Value
toJSON ListSchemaExtensions' {Maybe Natural
Maybe Text
Text
directoryId :: Text
limit :: Maybe Natural
nextToken :: Maybe Text
$sel:directoryId:ListSchemaExtensions' :: ListSchemaExtensions -> Text
$sel:limit:ListSchemaExtensions' :: ListSchemaExtensions -> Maybe Natural
$sel:nextToken:ListSchemaExtensions' :: ListSchemaExtensions -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (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
"Limit" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
limit,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"DirectoryId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
directoryId)
          ]
      )

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

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

-- | /See:/ 'newListSchemaExtensionsResponse' smart constructor.
data ListSchemaExtensionsResponse = ListSchemaExtensionsResponse'
  { -- | Information about the schema extensions applied to the directory.
    ListSchemaExtensionsResponse -> Maybe [SchemaExtensionInfo]
schemaExtensionsInfo :: Prelude.Maybe [SchemaExtensionInfo],
    -- | If not null, more results are available. Pass this value for the
    -- @NextToken@ parameter in a subsequent call to @ListSchemaExtensions@ to
    -- retrieve the next set of items.
    ListSchemaExtensionsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListSchemaExtensionsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListSchemaExtensionsResponse
-> ListSchemaExtensionsResponse -> Bool
(ListSchemaExtensionsResponse
 -> ListSchemaExtensionsResponse -> Bool)
-> (ListSchemaExtensionsResponse
    -> ListSchemaExtensionsResponse -> Bool)
-> Eq ListSchemaExtensionsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListSchemaExtensionsResponse
-> ListSchemaExtensionsResponse -> Bool
$c/= :: ListSchemaExtensionsResponse
-> ListSchemaExtensionsResponse -> Bool
== :: ListSchemaExtensionsResponse
-> ListSchemaExtensionsResponse -> Bool
$c== :: ListSchemaExtensionsResponse
-> ListSchemaExtensionsResponse -> Bool
Prelude.Eq, ReadPrec [ListSchemaExtensionsResponse]
ReadPrec ListSchemaExtensionsResponse
Int -> ReadS ListSchemaExtensionsResponse
ReadS [ListSchemaExtensionsResponse]
(Int -> ReadS ListSchemaExtensionsResponse)
-> ReadS [ListSchemaExtensionsResponse]
-> ReadPrec ListSchemaExtensionsResponse
-> ReadPrec [ListSchemaExtensionsResponse]
-> Read ListSchemaExtensionsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListSchemaExtensionsResponse]
$creadListPrec :: ReadPrec [ListSchemaExtensionsResponse]
readPrec :: ReadPrec ListSchemaExtensionsResponse
$creadPrec :: ReadPrec ListSchemaExtensionsResponse
readList :: ReadS [ListSchemaExtensionsResponse]
$creadList :: ReadS [ListSchemaExtensionsResponse]
readsPrec :: Int -> ReadS ListSchemaExtensionsResponse
$creadsPrec :: Int -> ReadS ListSchemaExtensionsResponse
Prelude.Read, Int -> ListSchemaExtensionsResponse -> ShowS
[ListSchemaExtensionsResponse] -> ShowS
ListSchemaExtensionsResponse -> String
(Int -> ListSchemaExtensionsResponse -> ShowS)
-> (ListSchemaExtensionsResponse -> String)
-> ([ListSchemaExtensionsResponse] -> ShowS)
-> Show ListSchemaExtensionsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListSchemaExtensionsResponse] -> ShowS
$cshowList :: [ListSchemaExtensionsResponse] -> ShowS
show :: ListSchemaExtensionsResponse -> String
$cshow :: ListSchemaExtensionsResponse -> String
showsPrec :: Int -> ListSchemaExtensionsResponse -> ShowS
$cshowsPrec :: Int -> ListSchemaExtensionsResponse -> ShowS
Prelude.Show, (forall x.
 ListSchemaExtensionsResponse -> Rep ListSchemaExtensionsResponse x)
-> (forall x.
    Rep ListSchemaExtensionsResponse x -> ListSchemaExtensionsResponse)
-> Generic ListSchemaExtensionsResponse
forall x.
Rep ListSchemaExtensionsResponse x -> ListSchemaExtensionsResponse
forall x.
ListSchemaExtensionsResponse -> Rep ListSchemaExtensionsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListSchemaExtensionsResponse x -> ListSchemaExtensionsResponse
$cfrom :: forall x.
ListSchemaExtensionsResponse -> Rep ListSchemaExtensionsResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListSchemaExtensionsResponse' 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:
--
-- 'schemaExtensionsInfo', 'listSchemaExtensionsResponse_schemaExtensionsInfo' - Information about the schema extensions applied to the directory.
--
-- 'nextToken', 'listSchemaExtensionsResponse_nextToken' - If not null, more results are available. Pass this value for the
-- @NextToken@ parameter in a subsequent call to @ListSchemaExtensions@ to
-- retrieve the next set of items.
--
-- 'httpStatus', 'listSchemaExtensionsResponse_httpStatus' - The response's http status code.
newListSchemaExtensionsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListSchemaExtensionsResponse
newListSchemaExtensionsResponse :: Int -> ListSchemaExtensionsResponse
newListSchemaExtensionsResponse Int
pHttpStatus_ =
  ListSchemaExtensionsResponse' :: Maybe [SchemaExtensionInfo]
-> Maybe Text -> Int -> ListSchemaExtensionsResponse
ListSchemaExtensionsResponse'
    { $sel:schemaExtensionsInfo:ListSchemaExtensionsResponse' :: Maybe [SchemaExtensionInfo]
schemaExtensionsInfo =
        Maybe [SchemaExtensionInfo]
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListSchemaExtensionsResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListSchemaExtensionsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Information about the schema extensions applied to the directory.
listSchemaExtensionsResponse_schemaExtensionsInfo :: Lens.Lens' ListSchemaExtensionsResponse (Prelude.Maybe [SchemaExtensionInfo])
listSchemaExtensionsResponse_schemaExtensionsInfo :: (Maybe [SchemaExtensionInfo] -> f (Maybe [SchemaExtensionInfo]))
-> ListSchemaExtensionsResponse -> f ListSchemaExtensionsResponse
listSchemaExtensionsResponse_schemaExtensionsInfo = (ListSchemaExtensionsResponse -> Maybe [SchemaExtensionInfo])
-> (ListSchemaExtensionsResponse
    -> Maybe [SchemaExtensionInfo] -> ListSchemaExtensionsResponse)
-> Lens' ListSchemaExtensionsResponse (Maybe [SchemaExtensionInfo])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListSchemaExtensionsResponse' {Maybe [SchemaExtensionInfo]
schemaExtensionsInfo :: Maybe [SchemaExtensionInfo]
$sel:schemaExtensionsInfo:ListSchemaExtensionsResponse' :: ListSchemaExtensionsResponse -> Maybe [SchemaExtensionInfo]
schemaExtensionsInfo} -> Maybe [SchemaExtensionInfo]
schemaExtensionsInfo) (\s :: ListSchemaExtensionsResponse
s@ListSchemaExtensionsResponse' {} Maybe [SchemaExtensionInfo]
a -> ListSchemaExtensionsResponse
s {$sel:schemaExtensionsInfo:ListSchemaExtensionsResponse' :: Maybe [SchemaExtensionInfo]
schemaExtensionsInfo = Maybe [SchemaExtensionInfo]
a} :: ListSchemaExtensionsResponse) ((Maybe [SchemaExtensionInfo] -> f (Maybe [SchemaExtensionInfo]))
 -> ListSchemaExtensionsResponse -> f ListSchemaExtensionsResponse)
-> ((Maybe [SchemaExtensionInfo]
     -> f (Maybe [SchemaExtensionInfo]))
    -> Maybe [SchemaExtensionInfo] -> f (Maybe [SchemaExtensionInfo]))
-> (Maybe [SchemaExtensionInfo] -> f (Maybe [SchemaExtensionInfo]))
-> ListSchemaExtensionsResponse
-> f ListSchemaExtensionsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [SchemaExtensionInfo]
  [SchemaExtensionInfo]
  [SchemaExtensionInfo]
  [SchemaExtensionInfo]
-> Iso
     (Maybe [SchemaExtensionInfo])
     (Maybe [SchemaExtensionInfo])
     (Maybe [SchemaExtensionInfo])
     (Maybe [SchemaExtensionInfo])
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
  [SchemaExtensionInfo]
  [SchemaExtensionInfo]
  [SchemaExtensionInfo]
  [SchemaExtensionInfo]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | If not null, more results are available. Pass this value for the
-- @NextToken@ parameter in a subsequent call to @ListSchemaExtensions@ to
-- retrieve the next set of items.
listSchemaExtensionsResponse_nextToken :: Lens.Lens' ListSchemaExtensionsResponse (Prelude.Maybe Prelude.Text)
listSchemaExtensionsResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListSchemaExtensionsResponse -> f ListSchemaExtensionsResponse
listSchemaExtensionsResponse_nextToken = (ListSchemaExtensionsResponse -> Maybe Text)
-> (ListSchemaExtensionsResponse
    -> Maybe Text -> ListSchemaExtensionsResponse)
-> Lens' ListSchemaExtensionsResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListSchemaExtensionsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListSchemaExtensionsResponse' :: ListSchemaExtensionsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListSchemaExtensionsResponse
s@ListSchemaExtensionsResponse' {} Maybe Text
a -> ListSchemaExtensionsResponse
s {$sel:nextToken:ListSchemaExtensionsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListSchemaExtensionsResponse)

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

instance Prelude.NFData ListSchemaExtensionsResponse