{-# 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.DescribeClientAuthenticationSettings
-- 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)
--
-- Retrieves information about the type of client authentication for the
-- specified directory, if the type is specified. If no type is specified,
-- information about all client authentication types that are supported for
-- the specified directory is retrieved. Currently, only @SmartCard@ is
-- supported.
module Amazonka.DirectoryService.DescribeClientAuthenticationSettings
  ( -- * Creating a Request
    DescribeClientAuthenticationSettings (..),
    newDescribeClientAuthenticationSettings,

    -- * Request Lenses
    describeClientAuthenticationSettings_nextToken,
    describeClientAuthenticationSettings_limit,
    describeClientAuthenticationSettings_type,
    describeClientAuthenticationSettings_directoryId,

    -- * Destructuring the Response
    DescribeClientAuthenticationSettingsResponse (..),
    newDescribeClientAuthenticationSettingsResponse,

    -- * Response Lenses
    describeClientAuthenticationSettingsResponse_nextToken,
    describeClientAuthenticationSettingsResponse_clientAuthenticationSettingsInfo,
    describeClientAuthenticationSettingsResponse_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:/ 'newDescribeClientAuthenticationSettings' smart constructor.
data DescribeClientAuthenticationSettings = DescribeClientAuthenticationSettings'
  { -- | The /DescribeClientAuthenticationSettingsResult.NextToken/ value from a
    -- previous call to DescribeClientAuthenticationSettings. Pass null if this
    -- is the first call.
    DescribeClientAuthenticationSettings -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The maximum number of items to return. If this value is zero, the
    -- maximum number of items is specified by the limitations of the
    -- operation.
    DescribeClientAuthenticationSettings -> Maybe Natural
limit :: Prelude.Maybe Prelude.Natural,
    -- | The type of client authentication for which to retrieve information. If
    -- no type is specified, a list of all client authentication types that are
    -- supported for the specified directory is retrieved.
    DescribeClientAuthenticationSettings
-> Maybe ClientAuthenticationType
type' :: Prelude.Maybe ClientAuthenticationType,
    -- | The identifier of the directory for which to retrieve information.
    DescribeClientAuthenticationSettings -> Text
directoryId :: Prelude.Text
  }
  deriving (DescribeClientAuthenticationSettings
-> DescribeClientAuthenticationSettings -> Bool
(DescribeClientAuthenticationSettings
 -> DescribeClientAuthenticationSettings -> Bool)
-> (DescribeClientAuthenticationSettings
    -> DescribeClientAuthenticationSettings -> Bool)
-> Eq DescribeClientAuthenticationSettings
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeClientAuthenticationSettings
-> DescribeClientAuthenticationSettings -> Bool
$c/= :: DescribeClientAuthenticationSettings
-> DescribeClientAuthenticationSettings -> Bool
== :: DescribeClientAuthenticationSettings
-> DescribeClientAuthenticationSettings -> Bool
$c== :: DescribeClientAuthenticationSettings
-> DescribeClientAuthenticationSettings -> Bool
Prelude.Eq, ReadPrec [DescribeClientAuthenticationSettings]
ReadPrec DescribeClientAuthenticationSettings
Int -> ReadS DescribeClientAuthenticationSettings
ReadS [DescribeClientAuthenticationSettings]
(Int -> ReadS DescribeClientAuthenticationSettings)
-> ReadS [DescribeClientAuthenticationSettings]
-> ReadPrec DescribeClientAuthenticationSettings
-> ReadPrec [DescribeClientAuthenticationSettings]
-> Read DescribeClientAuthenticationSettings
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeClientAuthenticationSettings]
$creadListPrec :: ReadPrec [DescribeClientAuthenticationSettings]
readPrec :: ReadPrec DescribeClientAuthenticationSettings
$creadPrec :: ReadPrec DescribeClientAuthenticationSettings
readList :: ReadS [DescribeClientAuthenticationSettings]
$creadList :: ReadS [DescribeClientAuthenticationSettings]
readsPrec :: Int -> ReadS DescribeClientAuthenticationSettings
$creadsPrec :: Int -> ReadS DescribeClientAuthenticationSettings
Prelude.Read, Int -> DescribeClientAuthenticationSettings -> ShowS
[DescribeClientAuthenticationSettings] -> ShowS
DescribeClientAuthenticationSettings -> String
(Int -> DescribeClientAuthenticationSettings -> ShowS)
-> (DescribeClientAuthenticationSettings -> String)
-> ([DescribeClientAuthenticationSettings] -> ShowS)
-> Show DescribeClientAuthenticationSettings
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeClientAuthenticationSettings] -> ShowS
$cshowList :: [DescribeClientAuthenticationSettings] -> ShowS
show :: DescribeClientAuthenticationSettings -> String
$cshow :: DescribeClientAuthenticationSettings -> String
showsPrec :: Int -> DescribeClientAuthenticationSettings -> ShowS
$cshowsPrec :: Int -> DescribeClientAuthenticationSettings -> ShowS
Prelude.Show, (forall x.
 DescribeClientAuthenticationSettings
 -> Rep DescribeClientAuthenticationSettings x)
-> (forall x.
    Rep DescribeClientAuthenticationSettings x
    -> DescribeClientAuthenticationSettings)
-> Generic DescribeClientAuthenticationSettings
forall x.
Rep DescribeClientAuthenticationSettings x
-> DescribeClientAuthenticationSettings
forall x.
DescribeClientAuthenticationSettings
-> Rep DescribeClientAuthenticationSettings x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeClientAuthenticationSettings x
-> DescribeClientAuthenticationSettings
$cfrom :: forall x.
DescribeClientAuthenticationSettings
-> Rep DescribeClientAuthenticationSettings x
Prelude.Generic)

-- |
-- Create a value of 'DescribeClientAuthenticationSettings' 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', 'describeClientAuthenticationSettings_nextToken' - The /DescribeClientAuthenticationSettingsResult.NextToken/ value from a
-- previous call to DescribeClientAuthenticationSettings. Pass null if this
-- is the first call.
--
-- 'limit', 'describeClientAuthenticationSettings_limit' - The maximum number of items to return. If this value is zero, the
-- maximum number of items is specified by the limitations of the
-- operation.
--
-- 'type'', 'describeClientAuthenticationSettings_type' - The type of client authentication for which to retrieve information. If
-- no type is specified, a list of all client authentication types that are
-- supported for the specified directory is retrieved.
--
-- 'directoryId', 'describeClientAuthenticationSettings_directoryId' - The identifier of the directory for which to retrieve information.
newDescribeClientAuthenticationSettings ::
  -- | 'directoryId'
  Prelude.Text ->
  DescribeClientAuthenticationSettings
newDescribeClientAuthenticationSettings :: Text -> DescribeClientAuthenticationSettings
newDescribeClientAuthenticationSettings Text
pDirectoryId_ =
  DescribeClientAuthenticationSettings' :: Maybe Text
-> Maybe Natural
-> Maybe ClientAuthenticationType
-> Text
-> DescribeClientAuthenticationSettings
DescribeClientAuthenticationSettings'
    { $sel:nextToken:DescribeClientAuthenticationSettings' :: Maybe Text
nextToken =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:limit:DescribeClientAuthenticationSettings' :: Maybe Natural
limit = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:type':DescribeClientAuthenticationSettings' :: Maybe ClientAuthenticationType
type' = Maybe ClientAuthenticationType
forall a. Maybe a
Prelude.Nothing,
      $sel:directoryId:DescribeClientAuthenticationSettings' :: Text
directoryId = Text
pDirectoryId_
    }

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

-- | The maximum number of items to return. If this value is zero, the
-- maximum number of items is specified by the limitations of the
-- operation.
describeClientAuthenticationSettings_limit :: Lens.Lens' DescribeClientAuthenticationSettings (Prelude.Maybe Prelude.Natural)
describeClientAuthenticationSettings_limit :: (Maybe Natural -> f (Maybe Natural))
-> DescribeClientAuthenticationSettings
-> f DescribeClientAuthenticationSettings
describeClientAuthenticationSettings_limit = (DescribeClientAuthenticationSettings -> Maybe Natural)
-> (DescribeClientAuthenticationSettings
    -> Maybe Natural -> DescribeClientAuthenticationSettings)
-> Lens
     DescribeClientAuthenticationSettings
     DescribeClientAuthenticationSettings
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeClientAuthenticationSettings' {Maybe Natural
limit :: Maybe Natural
$sel:limit:DescribeClientAuthenticationSettings' :: DescribeClientAuthenticationSettings -> Maybe Natural
limit} -> Maybe Natural
limit) (\s :: DescribeClientAuthenticationSettings
s@DescribeClientAuthenticationSettings' {} Maybe Natural
a -> DescribeClientAuthenticationSettings
s {$sel:limit:DescribeClientAuthenticationSettings' :: Maybe Natural
limit = Maybe Natural
a} :: DescribeClientAuthenticationSettings)

-- | The type of client authentication for which to retrieve information. If
-- no type is specified, a list of all client authentication types that are
-- supported for the specified directory is retrieved.
describeClientAuthenticationSettings_type :: Lens.Lens' DescribeClientAuthenticationSettings (Prelude.Maybe ClientAuthenticationType)
describeClientAuthenticationSettings_type :: (Maybe ClientAuthenticationType
 -> f (Maybe ClientAuthenticationType))
-> DescribeClientAuthenticationSettings
-> f DescribeClientAuthenticationSettings
describeClientAuthenticationSettings_type = (DescribeClientAuthenticationSettings
 -> Maybe ClientAuthenticationType)
-> (DescribeClientAuthenticationSettings
    -> Maybe ClientAuthenticationType
    -> DescribeClientAuthenticationSettings)
-> Lens
     DescribeClientAuthenticationSettings
     DescribeClientAuthenticationSettings
     (Maybe ClientAuthenticationType)
     (Maybe ClientAuthenticationType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeClientAuthenticationSettings' {Maybe ClientAuthenticationType
type' :: Maybe ClientAuthenticationType
$sel:type':DescribeClientAuthenticationSettings' :: DescribeClientAuthenticationSettings
-> Maybe ClientAuthenticationType
type'} -> Maybe ClientAuthenticationType
type') (\s :: DescribeClientAuthenticationSettings
s@DescribeClientAuthenticationSettings' {} Maybe ClientAuthenticationType
a -> DescribeClientAuthenticationSettings
s {$sel:type':DescribeClientAuthenticationSettings' :: Maybe ClientAuthenticationType
type' = Maybe ClientAuthenticationType
a} :: DescribeClientAuthenticationSettings)

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

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

instance
  Prelude.NFData
    DescribeClientAuthenticationSettings

instance
  Core.ToHeaders
    DescribeClientAuthenticationSettings
  where
  toHeaders :: DescribeClientAuthenticationSettings -> ResponseHeaders
toHeaders =
    ResponseHeaders
-> DescribeClientAuthenticationSettings -> 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.DescribeClientAuthenticationSettings" ::
                          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
    DescribeClientAuthenticationSettings
  where
  toJSON :: DescribeClientAuthenticationSettings -> Value
toJSON DescribeClientAuthenticationSettings' {Maybe Natural
Maybe Text
Maybe ClientAuthenticationType
Text
directoryId :: Text
type' :: Maybe ClientAuthenticationType
limit :: Maybe Natural
nextToken :: Maybe Text
$sel:directoryId:DescribeClientAuthenticationSettings' :: DescribeClientAuthenticationSettings -> Text
$sel:type':DescribeClientAuthenticationSettings' :: DescribeClientAuthenticationSettings
-> Maybe ClientAuthenticationType
$sel:limit:DescribeClientAuthenticationSettings' :: DescribeClientAuthenticationSettings -> Maybe Natural
$sel:nextToken:DescribeClientAuthenticationSettings' :: DescribeClientAuthenticationSettings -> 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,
            (Text
"Type" Text -> ClientAuthenticationType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (ClientAuthenticationType -> Pair)
-> Maybe ClientAuthenticationType -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ClientAuthenticationType
type',
            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
    DescribeClientAuthenticationSettings
  where
  toPath :: DescribeClientAuthenticationSettings -> ByteString
toPath = ByteString -> DescribeClientAuthenticationSettings -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"

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

-- | /See:/ 'newDescribeClientAuthenticationSettingsResponse' smart constructor.
data DescribeClientAuthenticationSettingsResponse = DescribeClientAuthenticationSettingsResponse'
  { -- | The next token used to retrieve the client authentication settings if
    -- the number of setting types exceeds page limit and there is another
    -- page.
    DescribeClientAuthenticationSettingsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | Information about the type of client authentication for the specified
    -- directory. The following information is retrieved: The date and time
    -- when the status of the client authentication type was last updated,
    -- whether the client authentication type is enabled or disabled, and the
    -- type of client authentication.
    DescribeClientAuthenticationSettingsResponse
-> Maybe [ClientAuthenticationSettingInfo]
clientAuthenticationSettingsInfo :: Prelude.Maybe [ClientAuthenticationSettingInfo],
    -- | The response's http status code.
    DescribeClientAuthenticationSettingsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeClientAuthenticationSettingsResponse
-> DescribeClientAuthenticationSettingsResponse -> Bool
(DescribeClientAuthenticationSettingsResponse
 -> DescribeClientAuthenticationSettingsResponse -> Bool)
-> (DescribeClientAuthenticationSettingsResponse
    -> DescribeClientAuthenticationSettingsResponse -> Bool)
-> Eq DescribeClientAuthenticationSettingsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeClientAuthenticationSettingsResponse
-> DescribeClientAuthenticationSettingsResponse -> Bool
$c/= :: DescribeClientAuthenticationSettingsResponse
-> DescribeClientAuthenticationSettingsResponse -> Bool
== :: DescribeClientAuthenticationSettingsResponse
-> DescribeClientAuthenticationSettingsResponse -> Bool
$c== :: DescribeClientAuthenticationSettingsResponse
-> DescribeClientAuthenticationSettingsResponse -> Bool
Prelude.Eq, ReadPrec [DescribeClientAuthenticationSettingsResponse]
ReadPrec DescribeClientAuthenticationSettingsResponse
Int -> ReadS DescribeClientAuthenticationSettingsResponse
ReadS [DescribeClientAuthenticationSettingsResponse]
(Int -> ReadS DescribeClientAuthenticationSettingsResponse)
-> ReadS [DescribeClientAuthenticationSettingsResponse]
-> ReadPrec DescribeClientAuthenticationSettingsResponse
-> ReadPrec [DescribeClientAuthenticationSettingsResponse]
-> Read DescribeClientAuthenticationSettingsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeClientAuthenticationSettingsResponse]
$creadListPrec :: ReadPrec [DescribeClientAuthenticationSettingsResponse]
readPrec :: ReadPrec DescribeClientAuthenticationSettingsResponse
$creadPrec :: ReadPrec DescribeClientAuthenticationSettingsResponse
readList :: ReadS [DescribeClientAuthenticationSettingsResponse]
$creadList :: ReadS [DescribeClientAuthenticationSettingsResponse]
readsPrec :: Int -> ReadS DescribeClientAuthenticationSettingsResponse
$creadsPrec :: Int -> ReadS DescribeClientAuthenticationSettingsResponse
Prelude.Read, Int -> DescribeClientAuthenticationSettingsResponse -> ShowS
[DescribeClientAuthenticationSettingsResponse] -> ShowS
DescribeClientAuthenticationSettingsResponse -> String
(Int -> DescribeClientAuthenticationSettingsResponse -> ShowS)
-> (DescribeClientAuthenticationSettingsResponse -> String)
-> ([DescribeClientAuthenticationSettingsResponse] -> ShowS)
-> Show DescribeClientAuthenticationSettingsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeClientAuthenticationSettingsResponse] -> ShowS
$cshowList :: [DescribeClientAuthenticationSettingsResponse] -> ShowS
show :: DescribeClientAuthenticationSettingsResponse -> String
$cshow :: DescribeClientAuthenticationSettingsResponse -> String
showsPrec :: Int -> DescribeClientAuthenticationSettingsResponse -> ShowS
$cshowsPrec :: Int -> DescribeClientAuthenticationSettingsResponse -> ShowS
Prelude.Show, (forall x.
 DescribeClientAuthenticationSettingsResponse
 -> Rep DescribeClientAuthenticationSettingsResponse x)
-> (forall x.
    Rep DescribeClientAuthenticationSettingsResponse x
    -> DescribeClientAuthenticationSettingsResponse)
-> Generic DescribeClientAuthenticationSettingsResponse
forall x.
Rep DescribeClientAuthenticationSettingsResponse x
-> DescribeClientAuthenticationSettingsResponse
forall x.
DescribeClientAuthenticationSettingsResponse
-> Rep DescribeClientAuthenticationSettingsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeClientAuthenticationSettingsResponse x
-> DescribeClientAuthenticationSettingsResponse
$cfrom :: forall x.
DescribeClientAuthenticationSettingsResponse
-> Rep DescribeClientAuthenticationSettingsResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeClientAuthenticationSettingsResponse' 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', 'describeClientAuthenticationSettingsResponse_nextToken' - The next token used to retrieve the client authentication settings if
-- the number of setting types exceeds page limit and there is another
-- page.
--
-- 'clientAuthenticationSettingsInfo', 'describeClientAuthenticationSettingsResponse_clientAuthenticationSettingsInfo' - Information about the type of client authentication for the specified
-- directory. The following information is retrieved: The date and time
-- when the status of the client authentication type was last updated,
-- whether the client authentication type is enabled or disabled, and the
-- type of client authentication.
--
-- 'httpStatus', 'describeClientAuthenticationSettingsResponse_httpStatus' - The response's http status code.
newDescribeClientAuthenticationSettingsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeClientAuthenticationSettingsResponse
newDescribeClientAuthenticationSettingsResponse :: Int -> DescribeClientAuthenticationSettingsResponse
newDescribeClientAuthenticationSettingsResponse
  Int
pHttpStatus_ =
    DescribeClientAuthenticationSettingsResponse' :: Maybe Text
-> Maybe [ClientAuthenticationSettingInfo]
-> Int
-> DescribeClientAuthenticationSettingsResponse
DescribeClientAuthenticationSettingsResponse'
      { $sel:nextToken:DescribeClientAuthenticationSettingsResponse' :: Maybe Text
nextToken =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:clientAuthenticationSettingsInfo:DescribeClientAuthenticationSettingsResponse' :: Maybe [ClientAuthenticationSettingInfo]
clientAuthenticationSettingsInfo =
          Maybe [ClientAuthenticationSettingInfo]
forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:DescribeClientAuthenticationSettingsResponse' :: Int
httpStatus = Int
pHttpStatus_
      }

-- | The next token used to retrieve the client authentication settings if
-- the number of setting types exceeds page limit and there is another
-- page.
describeClientAuthenticationSettingsResponse_nextToken :: Lens.Lens' DescribeClientAuthenticationSettingsResponse (Prelude.Maybe Prelude.Text)
describeClientAuthenticationSettingsResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> DescribeClientAuthenticationSettingsResponse
-> f DescribeClientAuthenticationSettingsResponse
describeClientAuthenticationSettingsResponse_nextToken = (DescribeClientAuthenticationSettingsResponse -> Maybe Text)
-> (DescribeClientAuthenticationSettingsResponse
    -> Maybe Text -> DescribeClientAuthenticationSettingsResponse)
-> Lens
     DescribeClientAuthenticationSettingsResponse
     DescribeClientAuthenticationSettingsResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeClientAuthenticationSettingsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeClientAuthenticationSettingsResponse' :: DescribeClientAuthenticationSettingsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeClientAuthenticationSettingsResponse
s@DescribeClientAuthenticationSettingsResponse' {} Maybe Text
a -> DescribeClientAuthenticationSettingsResponse
s {$sel:nextToken:DescribeClientAuthenticationSettingsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeClientAuthenticationSettingsResponse)

-- | Information about the type of client authentication for the specified
-- directory. The following information is retrieved: The date and time
-- when the status of the client authentication type was last updated,
-- whether the client authentication type is enabled or disabled, and the
-- type of client authentication.
describeClientAuthenticationSettingsResponse_clientAuthenticationSettingsInfo :: Lens.Lens' DescribeClientAuthenticationSettingsResponse (Prelude.Maybe [ClientAuthenticationSettingInfo])
describeClientAuthenticationSettingsResponse_clientAuthenticationSettingsInfo :: (Maybe [ClientAuthenticationSettingInfo]
 -> f (Maybe [ClientAuthenticationSettingInfo]))
-> DescribeClientAuthenticationSettingsResponse
-> f DescribeClientAuthenticationSettingsResponse
describeClientAuthenticationSettingsResponse_clientAuthenticationSettingsInfo = (DescribeClientAuthenticationSettingsResponse
 -> Maybe [ClientAuthenticationSettingInfo])
-> (DescribeClientAuthenticationSettingsResponse
    -> Maybe [ClientAuthenticationSettingInfo]
    -> DescribeClientAuthenticationSettingsResponse)
-> Lens
     DescribeClientAuthenticationSettingsResponse
     DescribeClientAuthenticationSettingsResponse
     (Maybe [ClientAuthenticationSettingInfo])
     (Maybe [ClientAuthenticationSettingInfo])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeClientAuthenticationSettingsResponse' {Maybe [ClientAuthenticationSettingInfo]
clientAuthenticationSettingsInfo :: Maybe [ClientAuthenticationSettingInfo]
$sel:clientAuthenticationSettingsInfo:DescribeClientAuthenticationSettingsResponse' :: DescribeClientAuthenticationSettingsResponse
-> Maybe [ClientAuthenticationSettingInfo]
clientAuthenticationSettingsInfo} -> Maybe [ClientAuthenticationSettingInfo]
clientAuthenticationSettingsInfo) (\s :: DescribeClientAuthenticationSettingsResponse
s@DescribeClientAuthenticationSettingsResponse' {} Maybe [ClientAuthenticationSettingInfo]
a -> DescribeClientAuthenticationSettingsResponse
s {$sel:clientAuthenticationSettingsInfo:DescribeClientAuthenticationSettingsResponse' :: Maybe [ClientAuthenticationSettingInfo]
clientAuthenticationSettingsInfo = Maybe [ClientAuthenticationSettingInfo]
a} :: DescribeClientAuthenticationSettingsResponse) ((Maybe [ClientAuthenticationSettingInfo]
  -> f (Maybe [ClientAuthenticationSettingInfo]))
 -> DescribeClientAuthenticationSettingsResponse
 -> f DescribeClientAuthenticationSettingsResponse)
-> ((Maybe [ClientAuthenticationSettingInfo]
     -> f (Maybe [ClientAuthenticationSettingInfo]))
    -> Maybe [ClientAuthenticationSettingInfo]
    -> f (Maybe [ClientAuthenticationSettingInfo]))
-> (Maybe [ClientAuthenticationSettingInfo]
    -> f (Maybe [ClientAuthenticationSettingInfo]))
-> DescribeClientAuthenticationSettingsResponse
-> f DescribeClientAuthenticationSettingsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [ClientAuthenticationSettingInfo]
  [ClientAuthenticationSettingInfo]
  [ClientAuthenticationSettingInfo]
  [ClientAuthenticationSettingInfo]
-> Iso
     (Maybe [ClientAuthenticationSettingInfo])
     (Maybe [ClientAuthenticationSettingInfo])
     (Maybe [ClientAuthenticationSettingInfo])
     (Maybe [ClientAuthenticationSettingInfo])
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
  [ClientAuthenticationSettingInfo]
  [ClientAuthenticationSettingInfo]
  [ClientAuthenticationSettingInfo]
  [ClientAuthenticationSettingInfo]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance
  Prelude.NFData
    DescribeClientAuthenticationSettingsResponse