{-# 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.DescribeLDAPSSettings
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Describes the status of LDAP security for the specified directory.
--
-- This operation returns paginated results.
module Amazonka.DirectoryService.DescribeLDAPSSettings
  ( -- * Creating a Request
    DescribeLDAPSSettings (..),
    newDescribeLDAPSSettings,

    -- * Request Lenses
    describeLDAPSSettings_limit,
    describeLDAPSSettings_nextToken,
    describeLDAPSSettings_type,
    describeLDAPSSettings_directoryId,

    -- * Destructuring the Response
    DescribeLDAPSSettingsResponse (..),
    newDescribeLDAPSSettingsResponse,

    -- * Response Lenses
    describeLDAPSSettingsResponse_lDAPSSettingsInfo,
    describeLDAPSSettingsResponse_nextToken,
    describeLDAPSSettingsResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.DirectoryService.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newDescribeLDAPSSettings' smart constructor.
data DescribeLDAPSSettings = DescribeLDAPSSettings'
  { -- | Specifies the number of items that should be displayed on one page.
    DescribeLDAPSSettings -> Maybe Natural
limit :: Prelude.Maybe Prelude.Natural,
    -- | The type of next token used for pagination.
    DescribeLDAPSSettings -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The type of LDAP security to enable. Currently only the value @Client@
    -- is supported.
    DescribeLDAPSSettings -> Maybe LDAPSType
type' :: Prelude.Maybe LDAPSType,
    -- | The identifier of the directory.
    DescribeLDAPSSettings -> Text
directoryId :: Prelude.Text
  }
  deriving (DescribeLDAPSSettings -> DescribeLDAPSSettings -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeLDAPSSettings -> DescribeLDAPSSettings -> Bool
$c/= :: DescribeLDAPSSettings -> DescribeLDAPSSettings -> Bool
== :: DescribeLDAPSSettings -> DescribeLDAPSSettings -> Bool
$c== :: DescribeLDAPSSettings -> DescribeLDAPSSettings -> Bool
Prelude.Eq, ReadPrec [DescribeLDAPSSettings]
ReadPrec DescribeLDAPSSettings
Int -> ReadS DescribeLDAPSSettings
ReadS [DescribeLDAPSSettings]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeLDAPSSettings]
$creadListPrec :: ReadPrec [DescribeLDAPSSettings]
readPrec :: ReadPrec DescribeLDAPSSettings
$creadPrec :: ReadPrec DescribeLDAPSSettings
readList :: ReadS [DescribeLDAPSSettings]
$creadList :: ReadS [DescribeLDAPSSettings]
readsPrec :: Int -> ReadS DescribeLDAPSSettings
$creadsPrec :: Int -> ReadS DescribeLDAPSSettings
Prelude.Read, Int -> DescribeLDAPSSettings -> ShowS
[DescribeLDAPSSettings] -> ShowS
DescribeLDAPSSettings -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeLDAPSSettings] -> ShowS
$cshowList :: [DescribeLDAPSSettings] -> ShowS
show :: DescribeLDAPSSettings -> String
$cshow :: DescribeLDAPSSettings -> String
showsPrec :: Int -> DescribeLDAPSSettings -> ShowS
$cshowsPrec :: Int -> DescribeLDAPSSettings -> ShowS
Prelude.Show, forall x. Rep DescribeLDAPSSettings x -> DescribeLDAPSSettings
forall x. DescribeLDAPSSettings -> Rep DescribeLDAPSSettings x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeLDAPSSettings x -> DescribeLDAPSSettings
$cfrom :: forall x. DescribeLDAPSSettings -> Rep DescribeLDAPSSettings x
Prelude.Generic)

-- |
-- Create a value of 'DescribeLDAPSSettings' 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', 'describeLDAPSSettings_limit' - Specifies the number of items that should be displayed on one page.
--
-- 'nextToken', 'describeLDAPSSettings_nextToken' - The type of next token used for pagination.
--
-- 'type'', 'describeLDAPSSettings_type' - The type of LDAP security to enable. Currently only the value @Client@
-- is supported.
--
-- 'directoryId', 'describeLDAPSSettings_directoryId' - The identifier of the directory.
newDescribeLDAPSSettings ::
  -- | 'directoryId'
  Prelude.Text ->
  DescribeLDAPSSettings
newDescribeLDAPSSettings :: Text -> DescribeLDAPSSettings
newDescribeLDAPSSettings Text
pDirectoryId_ =
  DescribeLDAPSSettings'
    { $sel:limit:DescribeLDAPSSettings' :: Maybe Natural
limit = forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:DescribeLDAPSSettings' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:type':DescribeLDAPSSettings' :: Maybe LDAPSType
type' = forall a. Maybe a
Prelude.Nothing,
      $sel:directoryId:DescribeLDAPSSettings' :: Text
directoryId = Text
pDirectoryId_
    }

-- | Specifies the number of items that should be displayed on one page.
describeLDAPSSettings_limit :: Lens.Lens' DescribeLDAPSSettings (Prelude.Maybe Prelude.Natural)
describeLDAPSSettings_limit :: Lens' DescribeLDAPSSettings (Maybe Natural)
describeLDAPSSettings_limit = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeLDAPSSettings' {Maybe Natural
limit :: Maybe Natural
$sel:limit:DescribeLDAPSSettings' :: DescribeLDAPSSettings -> Maybe Natural
limit} -> Maybe Natural
limit) (\s :: DescribeLDAPSSettings
s@DescribeLDAPSSettings' {} Maybe Natural
a -> DescribeLDAPSSettings
s {$sel:limit:DescribeLDAPSSettings' :: Maybe Natural
limit = Maybe Natural
a} :: DescribeLDAPSSettings)

-- | The type of next token used for pagination.
describeLDAPSSettings_nextToken :: Lens.Lens' DescribeLDAPSSettings (Prelude.Maybe Prelude.Text)
describeLDAPSSettings_nextToken :: Lens' DescribeLDAPSSettings (Maybe Text)
describeLDAPSSettings_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeLDAPSSettings' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeLDAPSSettings' :: DescribeLDAPSSettings -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeLDAPSSettings
s@DescribeLDAPSSettings' {} Maybe Text
a -> DescribeLDAPSSettings
s {$sel:nextToken:DescribeLDAPSSettings' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeLDAPSSettings)

-- | The type of LDAP security to enable. Currently only the value @Client@
-- is supported.
describeLDAPSSettings_type :: Lens.Lens' DescribeLDAPSSettings (Prelude.Maybe LDAPSType)
describeLDAPSSettings_type :: Lens' DescribeLDAPSSettings (Maybe LDAPSType)
describeLDAPSSettings_type = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeLDAPSSettings' {Maybe LDAPSType
type' :: Maybe LDAPSType
$sel:type':DescribeLDAPSSettings' :: DescribeLDAPSSettings -> Maybe LDAPSType
type'} -> Maybe LDAPSType
type') (\s :: DescribeLDAPSSettings
s@DescribeLDAPSSettings' {} Maybe LDAPSType
a -> DescribeLDAPSSettings
s {$sel:type':DescribeLDAPSSettings' :: Maybe LDAPSType
type' = Maybe LDAPSType
a} :: DescribeLDAPSSettings)

-- | The identifier of the directory.
describeLDAPSSettings_directoryId :: Lens.Lens' DescribeLDAPSSettings Prelude.Text
describeLDAPSSettings_directoryId :: Lens' DescribeLDAPSSettings Text
describeLDAPSSettings_directoryId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeLDAPSSettings' {Text
directoryId :: Text
$sel:directoryId:DescribeLDAPSSettings' :: DescribeLDAPSSettings -> Text
directoryId} -> Text
directoryId) (\s :: DescribeLDAPSSettings
s@DescribeLDAPSSettings' {} Text
a -> DescribeLDAPSSettings
s {$sel:directoryId:DescribeLDAPSSettings' :: Text
directoryId = Text
a} :: DescribeLDAPSSettings)

instance Core.AWSPager DescribeLDAPSSettings where
  page :: DescribeLDAPSSettings
-> AWSResponse DescribeLDAPSSettings -> Maybe DescribeLDAPSSettings
page DescribeLDAPSSettings
rq AWSResponse DescribeLDAPSSettings
rs
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse DescribeLDAPSSettings
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' DescribeLDAPSSettingsResponse (Maybe Text)
describeLDAPSSettingsResponse_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 DescribeLDAPSSettings
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' DescribeLDAPSSettingsResponse (Maybe [LDAPSSettingInfo])
describeLDAPSSettingsResponse_lDAPSSettingsInfo
            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.$ DescribeLDAPSSettings
rq
          forall a b. a -> (a -> b) -> b
Prelude.& Lens' DescribeLDAPSSettings (Maybe Text)
describeLDAPSSettings_nextToken
          forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse DescribeLDAPSSettings
rs
          forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' DescribeLDAPSSettingsResponse (Maybe Text)
describeLDAPSSettingsResponse_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 DescribeLDAPSSettings where
  type
    AWSResponse DescribeLDAPSSettings =
      DescribeLDAPSSettingsResponse
  request :: (Service -> Service)
-> DescribeLDAPSSettings -> Request DescribeLDAPSSettings
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 DescribeLDAPSSettings
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeLDAPSSettings)))
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 [LDAPSSettingInfo]
-> Maybe Text -> Int -> DescribeLDAPSSettingsResponse
DescribeLDAPSSettingsResponse'
            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
"LDAPSSettingsInfo"
                            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.<*> (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.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable DescribeLDAPSSettings where
  hashWithSalt :: Int -> DescribeLDAPSSettings -> Int
hashWithSalt Int
_salt DescribeLDAPSSettings' {Maybe Natural
Maybe Text
Maybe LDAPSType
Text
directoryId :: Text
type' :: Maybe LDAPSType
nextToken :: Maybe Text
limit :: Maybe Natural
$sel:directoryId:DescribeLDAPSSettings' :: DescribeLDAPSSettings -> Text
$sel:type':DescribeLDAPSSettings' :: DescribeLDAPSSettings -> Maybe LDAPSType
$sel:nextToken:DescribeLDAPSSettings' :: DescribeLDAPSSettings -> Maybe Text
$sel:limit:DescribeLDAPSSettings' :: DescribeLDAPSSettings -> 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 LDAPSType
type'
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
directoryId

instance Prelude.NFData DescribeLDAPSSettings where
  rnf :: DescribeLDAPSSettings -> ()
rnf DescribeLDAPSSettings' {Maybe Natural
Maybe Text
Maybe LDAPSType
Text
directoryId :: Text
type' :: Maybe LDAPSType
nextToken :: Maybe Text
limit :: Maybe Natural
$sel:directoryId:DescribeLDAPSSettings' :: DescribeLDAPSSettings -> Text
$sel:type':DescribeLDAPSSettings' :: DescribeLDAPSSettings -> Maybe LDAPSType
$sel:nextToken:DescribeLDAPSSettings' :: DescribeLDAPSSettings -> Maybe Text
$sel:limit:DescribeLDAPSSettings' :: DescribeLDAPSSettings -> 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 LDAPSType
type'
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
directoryId

instance Data.ToHeaders DescribeLDAPSSettings where
  toHeaders :: DescribeLDAPSSettings -> 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
"DirectoryService_20150416.DescribeLDAPSSettings" ::
                          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 DescribeLDAPSSettings where
  toJSON :: DescribeLDAPSSettings -> Value
toJSON DescribeLDAPSSettings' {Maybe Natural
Maybe Text
Maybe LDAPSType
Text
directoryId :: Text
type' :: Maybe LDAPSType
nextToken :: Maybe Text
limit :: Maybe Natural
$sel:directoryId:DescribeLDAPSSettings' :: DescribeLDAPSSettings -> Text
$sel:type':DescribeLDAPSSettings' :: DescribeLDAPSSettings -> Maybe LDAPSType
$sel:nextToken:DescribeLDAPSSettings' :: DescribeLDAPSSettings -> Maybe Text
$sel:limit:DescribeLDAPSSettings' :: DescribeLDAPSSettings -> 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
"Type" 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 LDAPSType
type',
            forall a. a -> Maybe a
Prelude.Just (Key
"DirectoryId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
directoryId)
          ]
      )

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

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

-- | /See:/ 'newDescribeLDAPSSettingsResponse' smart constructor.
data DescribeLDAPSSettingsResponse = DescribeLDAPSSettingsResponse'
  { -- | Information about LDAP security for the specified directory, including
    -- status of enablement, state last updated date time, and the reason for
    -- the state.
    DescribeLDAPSSettingsResponse -> Maybe [LDAPSSettingInfo]
lDAPSSettingsInfo :: Prelude.Maybe [LDAPSSettingInfo],
    -- | The next token used to retrieve the LDAPS settings if the number of
    -- setting types exceeds page limit and there is another page.
    DescribeLDAPSSettingsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    DescribeLDAPSSettingsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeLDAPSSettingsResponse
-> DescribeLDAPSSettingsResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeLDAPSSettingsResponse
-> DescribeLDAPSSettingsResponse -> Bool
$c/= :: DescribeLDAPSSettingsResponse
-> DescribeLDAPSSettingsResponse -> Bool
== :: DescribeLDAPSSettingsResponse
-> DescribeLDAPSSettingsResponse -> Bool
$c== :: DescribeLDAPSSettingsResponse
-> DescribeLDAPSSettingsResponse -> Bool
Prelude.Eq, ReadPrec [DescribeLDAPSSettingsResponse]
ReadPrec DescribeLDAPSSettingsResponse
Int -> ReadS DescribeLDAPSSettingsResponse
ReadS [DescribeLDAPSSettingsResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeLDAPSSettingsResponse]
$creadListPrec :: ReadPrec [DescribeLDAPSSettingsResponse]
readPrec :: ReadPrec DescribeLDAPSSettingsResponse
$creadPrec :: ReadPrec DescribeLDAPSSettingsResponse
readList :: ReadS [DescribeLDAPSSettingsResponse]
$creadList :: ReadS [DescribeLDAPSSettingsResponse]
readsPrec :: Int -> ReadS DescribeLDAPSSettingsResponse
$creadsPrec :: Int -> ReadS DescribeLDAPSSettingsResponse
Prelude.Read, Int -> DescribeLDAPSSettingsResponse -> ShowS
[DescribeLDAPSSettingsResponse] -> ShowS
DescribeLDAPSSettingsResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeLDAPSSettingsResponse] -> ShowS
$cshowList :: [DescribeLDAPSSettingsResponse] -> ShowS
show :: DescribeLDAPSSettingsResponse -> String
$cshow :: DescribeLDAPSSettingsResponse -> String
showsPrec :: Int -> DescribeLDAPSSettingsResponse -> ShowS
$cshowsPrec :: Int -> DescribeLDAPSSettingsResponse -> ShowS
Prelude.Show, forall x.
Rep DescribeLDAPSSettingsResponse x
-> DescribeLDAPSSettingsResponse
forall x.
DescribeLDAPSSettingsResponse
-> Rep DescribeLDAPSSettingsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeLDAPSSettingsResponse x
-> DescribeLDAPSSettingsResponse
$cfrom :: forall x.
DescribeLDAPSSettingsResponse
-> Rep DescribeLDAPSSettingsResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeLDAPSSettingsResponse' 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:
--
-- 'lDAPSSettingsInfo', 'describeLDAPSSettingsResponse_lDAPSSettingsInfo' - Information about LDAP security for the specified directory, including
-- status of enablement, state last updated date time, and the reason for
-- the state.
--
-- 'nextToken', 'describeLDAPSSettingsResponse_nextToken' - The next token used to retrieve the LDAPS settings if the number of
-- setting types exceeds page limit and there is another page.
--
-- 'httpStatus', 'describeLDAPSSettingsResponse_httpStatus' - The response's http status code.
newDescribeLDAPSSettingsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeLDAPSSettingsResponse
newDescribeLDAPSSettingsResponse :: Int -> DescribeLDAPSSettingsResponse
newDescribeLDAPSSettingsResponse Int
pHttpStatus_ =
  DescribeLDAPSSettingsResponse'
    { $sel:lDAPSSettingsInfo:DescribeLDAPSSettingsResponse' :: Maybe [LDAPSSettingInfo]
lDAPSSettingsInfo =
        forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:DescribeLDAPSSettingsResponse' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeLDAPSSettingsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Information about LDAP security for the specified directory, including
-- status of enablement, state last updated date time, and the reason for
-- the state.
describeLDAPSSettingsResponse_lDAPSSettingsInfo :: Lens.Lens' DescribeLDAPSSettingsResponse (Prelude.Maybe [LDAPSSettingInfo])
describeLDAPSSettingsResponse_lDAPSSettingsInfo :: Lens' DescribeLDAPSSettingsResponse (Maybe [LDAPSSettingInfo])
describeLDAPSSettingsResponse_lDAPSSettingsInfo = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeLDAPSSettingsResponse' {Maybe [LDAPSSettingInfo]
lDAPSSettingsInfo :: Maybe [LDAPSSettingInfo]
$sel:lDAPSSettingsInfo:DescribeLDAPSSettingsResponse' :: DescribeLDAPSSettingsResponse -> Maybe [LDAPSSettingInfo]
lDAPSSettingsInfo} -> Maybe [LDAPSSettingInfo]
lDAPSSettingsInfo) (\s :: DescribeLDAPSSettingsResponse
s@DescribeLDAPSSettingsResponse' {} Maybe [LDAPSSettingInfo]
a -> DescribeLDAPSSettingsResponse
s {$sel:lDAPSSettingsInfo:DescribeLDAPSSettingsResponse' :: Maybe [LDAPSSettingInfo]
lDAPSSettingsInfo = Maybe [LDAPSSettingInfo]
a} :: DescribeLDAPSSettingsResponse) 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 next token used to retrieve the LDAPS settings if the number of
-- setting types exceeds page limit and there is another page.
describeLDAPSSettingsResponse_nextToken :: Lens.Lens' DescribeLDAPSSettingsResponse (Prelude.Maybe Prelude.Text)
describeLDAPSSettingsResponse_nextToken :: Lens' DescribeLDAPSSettingsResponse (Maybe Text)
describeLDAPSSettingsResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeLDAPSSettingsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeLDAPSSettingsResponse' :: DescribeLDAPSSettingsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeLDAPSSettingsResponse
s@DescribeLDAPSSettingsResponse' {} Maybe Text
a -> DescribeLDAPSSettingsResponse
s {$sel:nextToken:DescribeLDAPSSettingsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeLDAPSSettingsResponse)

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

instance Prelude.NFData DescribeLDAPSSettingsResponse where
  rnf :: DescribeLDAPSSettingsResponse -> ()
rnf DescribeLDAPSSettingsResponse' {Int
Maybe [LDAPSSettingInfo]
Maybe Text
httpStatus :: Int
nextToken :: Maybe Text
lDAPSSettingsInfo :: Maybe [LDAPSSettingInfo]
$sel:httpStatus:DescribeLDAPSSettingsResponse' :: DescribeLDAPSSettingsResponse -> Int
$sel:nextToken:DescribeLDAPSSettingsResponse' :: DescribeLDAPSSettingsResponse -> Maybe Text
$sel:lDAPSSettingsInfo:DescribeLDAPSSettingsResponse' :: DescribeLDAPSSettingsResponse -> Maybe [LDAPSSettingInfo]
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe [LDAPSSettingInfo]
lDAPSSettingsInfo
      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 Int
httpStatus