{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.MQ.Types.LdapServerMetadataOutput
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.MQ.Types.LdapServerMetadataOutput where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude

-- | Optional. The metadata of the LDAP server used to authenticate and
-- authorize connections to the broker.
--
-- /See:/ 'newLdapServerMetadataOutput' smart constructor.
data LdapServerMetadataOutput = LdapServerMetadataOutput'
  { -- | Specifies the LDAP attribute that identifies the group name attribute in
    -- the object returned from the group membership query.
    LdapServerMetadataOutput -> Maybe Text
roleName :: Prelude.Maybe Prelude.Text,
    -- | The directory search scope for the role. If set to true, scope is to
    -- search the entire subtree.
    LdapServerMetadataOutput -> Maybe Bool
roleSearchSubtree :: Prelude.Maybe Prelude.Bool,
    -- | Specifies the name of the LDAP attribute for the user group membership.
    LdapServerMetadataOutput -> Maybe Text
userRoleName :: Prelude.Maybe Prelude.Text,
    -- | The directory search scope for the user. If set to true, scope is to
    -- search the entire subtree.
    LdapServerMetadataOutput -> Maybe Bool
userSearchSubtree :: Prelude.Maybe Prelude.Bool,
    -- | Specifies the location of the LDAP server such as AWS Directory Service
    -- for Microsoft Active Directory . Optional failover server.
    LdapServerMetadataOutput -> [Text]
hosts :: [Prelude.Text],
    -- | The LDAP search filter used to find users within the userBase. The
    -- client\'s username is substituted into the {0} placeholder in the search
    -- filter. For example, if this option is set to (uid={0}) and the received
    -- username is janedoe, the search filter becomes (uid=janedoe) after
    -- string substitution. It will result in matching an entry like
    -- uid=janedoe, ou=Users,ou=corp, dc=corp, dc=example, dc=com.
    LdapServerMetadataOutput -> Text
userSearchMatching :: Prelude.Text,
    -- | Select a particular subtree of the directory information tree (DIT) to
    -- search for user entries. The subtree is specified by a DN, which
    -- specifies the base node of the subtree. For example, by setting this
    -- option to ou=Users,ou=corp, dc=corp, dc=example, dc=com, the search for
    -- user entries is restricted to the subtree beneath ou=Users, ou=corp,
    -- dc=corp, dc=example, dc=com.
    LdapServerMetadataOutput -> Text
userBase :: Prelude.Text,
    -- | The LDAP search filter used to find roles within the roleBase. The
    -- distinguished name of the user matched by userSearchMatching is
    -- substituted into the {0} placeholder in the search filter. The client\'s
    -- username is substituted into the {1} placeholder. For example, if you
    -- set this option to (member=uid={1})for the user janedoe, the search
    -- filter becomes (member=uid=janedoe) after string substitution. It
    -- matches all role entries that have a member attribute equal to
    -- uid=janedoe under the subtree selected by the roleBase.
    LdapServerMetadataOutput -> Text
roleSearchMatching :: Prelude.Text,
    -- | Service account username. A service account is an account in your LDAP
    -- server that has access to initiate a connection. For example,
    -- cn=admin,dc=corp, dc=example, dc=com.
    LdapServerMetadataOutput -> Text
serviceAccountUsername :: Prelude.Text,
    -- | The distinguished name of the node in the directory information tree
    -- (DIT) to search for roles or groups. For example, ou=group, ou=corp,
    -- dc=corp, dc=example, dc=com.
    LdapServerMetadataOutput -> Text
roleBase :: Prelude.Text
  }
  deriving (LdapServerMetadataOutput -> LdapServerMetadataOutput -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: LdapServerMetadataOutput -> LdapServerMetadataOutput -> Bool
$c/= :: LdapServerMetadataOutput -> LdapServerMetadataOutput -> Bool
== :: LdapServerMetadataOutput -> LdapServerMetadataOutput -> Bool
$c== :: LdapServerMetadataOutput -> LdapServerMetadataOutput -> Bool
Prelude.Eq, ReadPrec [LdapServerMetadataOutput]
ReadPrec LdapServerMetadataOutput
Int -> ReadS LdapServerMetadataOutput
ReadS [LdapServerMetadataOutput]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [LdapServerMetadataOutput]
$creadListPrec :: ReadPrec [LdapServerMetadataOutput]
readPrec :: ReadPrec LdapServerMetadataOutput
$creadPrec :: ReadPrec LdapServerMetadataOutput
readList :: ReadS [LdapServerMetadataOutput]
$creadList :: ReadS [LdapServerMetadataOutput]
readsPrec :: Int -> ReadS LdapServerMetadataOutput
$creadsPrec :: Int -> ReadS LdapServerMetadataOutput
Prelude.Read, Int -> LdapServerMetadataOutput -> ShowS
[LdapServerMetadataOutput] -> ShowS
LdapServerMetadataOutput -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [LdapServerMetadataOutput] -> ShowS
$cshowList :: [LdapServerMetadataOutput] -> ShowS
show :: LdapServerMetadataOutput -> String
$cshow :: LdapServerMetadataOutput -> String
showsPrec :: Int -> LdapServerMetadataOutput -> ShowS
$cshowsPrec :: Int -> LdapServerMetadataOutput -> ShowS
Prelude.Show, forall x.
Rep LdapServerMetadataOutput x -> LdapServerMetadataOutput
forall x.
LdapServerMetadataOutput -> Rep LdapServerMetadataOutput x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep LdapServerMetadataOutput x -> LdapServerMetadataOutput
$cfrom :: forall x.
LdapServerMetadataOutput -> Rep LdapServerMetadataOutput x
Prelude.Generic)

-- |
-- Create a value of 'LdapServerMetadataOutput' 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:
--
-- 'roleName', 'ldapServerMetadataOutput_roleName' - Specifies the LDAP attribute that identifies the group name attribute in
-- the object returned from the group membership query.
--
-- 'roleSearchSubtree', 'ldapServerMetadataOutput_roleSearchSubtree' - The directory search scope for the role. If set to true, scope is to
-- search the entire subtree.
--
-- 'userRoleName', 'ldapServerMetadataOutput_userRoleName' - Specifies the name of the LDAP attribute for the user group membership.
--
-- 'userSearchSubtree', 'ldapServerMetadataOutput_userSearchSubtree' - The directory search scope for the user. If set to true, scope is to
-- search the entire subtree.
--
-- 'hosts', 'ldapServerMetadataOutput_hosts' - Specifies the location of the LDAP server such as AWS Directory Service
-- for Microsoft Active Directory . Optional failover server.
--
-- 'userSearchMatching', 'ldapServerMetadataOutput_userSearchMatching' - The LDAP search filter used to find users within the userBase. The
-- client\'s username is substituted into the {0} placeholder in the search
-- filter. For example, if this option is set to (uid={0}) and the received
-- username is janedoe, the search filter becomes (uid=janedoe) after
-- string substitution. It will result in matching an entry like
-- uid=janedoe, ou=Users,ou=corp, dc=corp, dc=example, dc=com.
--
-- 'userBase', 'ldapServerMetadataOutput_userBase' - Select a particular subtree of the directory information tree (DIT) to
-- search for user entries. The subtree is specified by a DN, which
-- specifies the base node of the subtree. For example, by setting this
-- option to ou=Users,ou=corp, dc=corp, dc=example, dc=com, the search for
-- user entries is restricted to the subtree beneath ou=Users, ou=corp,
-- dc=corp, dc=example, dc=com.
--
-- 'roleSearchMatching', 'ldapServerMetadataOutput_roleSearchMatching' - The LDAP search filter used to find roles within the roleBase. The
-- distinguished name of the user matched by userSearchMatching is
-- substituted into the {0} placeholder in the search filter. The client\'s
-- username is substituted into the {1} placeholder. For example, if you
-- set this option to (member=uid={1})for the user janedoe, the search
-- filter becomes (member=uid=janedoe) after string substitution. It
-- matches all role entries that have a member attribute equal to
-- uid=janedoe under the subtree selected by the roleBase.
--
-- 'serviceAccountUsername', 'ldapServerMetadataOutput_serviceAccountUsername' - Service account username. A service account is an account in your LDAP
-- server that has access to initiate a connection. For example,
-- cn=admin,dc=corp, dc=example, dc=com.
--
-- 'roleBase', 'ldapServerMetadataOutput_roleBase' - The distinguished name of the node in the directory information tree
-- (DIT) to search for roles or groups. For example, ou=group, ou=corp,
-- dc=corp, dc=example, dc=com.
newLdapServerMetadataOutput ::
  -- | 'userSearchMatching'
  Prelude.Text ->
  -- | 'userBase'
  Prelude.Text ->
  -- | 'roleSearchMatching'
  Prelude.Text ->
  -- | 'serviceAccountUsername'
  Prelude.Text ->
  -- | 'roleBase'
  Prelude.Text ->
  LdapServerMetadataOutput
newLdapServerMetadataOutput :: Text -> Text -> Text -> Text -> Text -> LdapServerMetadataOutput
newLdapServerMetadataOutput
  Text
pUserSearchMatching_
  Text
pUserBase_
  Text
pRoleSearchMatching_
  Text
pServiceAccountUsername_
  Text
pRoleBase_ =
    LdapServerMetadataOutput'
      { $sel:roleName:LdapServerMetadataOutput' :: Maybe Text
roleName =
          forall a. Maybe a
Prelude.Nothing,
        $sel:roleSearchSubtree:LdapServerMetadataOutput' :: Maybe Bool
roleSearchSubtree = forall a. Maybe a
Prelude.Nothing,
        $sel:userRoleName:LdapServerMetadataOutput' :: Maybe Text
userRoleName = forall a. Maybe a
Prelude.Nothing,
        $sel:userSearchSubtree:LdapServerMetadataOutput' :: Maybe Bool
userSearchSubtree = forall a. Maybe a
Prelude.Nothing,
        $sel:hosts:LdapServerMetadataOutput' :: [Text]
hosts = forall a. Monoid a => a
Prelude.mempty,
        $sel:userSearchMatching:LdapServerMetadataOutput' :: Text
userSearchMatching = Text
pUserSearchMatching_,
        $sel:userBase:LdapServerMetadataOutput' :: Text
userBase = Text
pUserBase_,
        $sel:roleSearchMatching:LdapServerMetadataOutput' :: Text
roleSearchMatching = Text
pRoleSearchMatching_,
        $sel:serviceAccountUsername:LdapServerMetadataOutput' :: Text
serviceAccountUsername = Text
pServiceAccountUsername_,
        $sel:roleBase:LdapServerMetadataOutput' :: Text
roleBase = Text
pRoleBase_
      }

-- | Specifies the LDAP attribute that identifies the group name attribute in
-- the object returned from the group membership query.
ldapServerMetadataOutput_roleName :: Lens.Lens' LdapServerMetadataOutput (Prelude.Maybe Prelude.Text)
ldapServerMetadataOutput_roleName :: Lens' LdapServerMetadataOutput (Maybe Text)
ldapServerMetadataOutput_roleName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LdapServerMetadataOutput' {Maybe Text
roleName :: Maybe Text
$sel:roleName:LdapServerMetadataOutput' :: LdapServerMetadataOutput -> Maybe Text
roleName} -> Maybe Text
roleName) (\s :: LdapServerMetadataOutput
s@LdapServerMetadataOutput' {} Maybe Text
a -> LdapServerMetadataOutput
s {$sel:roleName:LdapServerMetadataOutput' :: Maybe Text
roleName = Maybe Text
a} :: LdapServerMetadataOutput)

-- | The directory search scope for the role. If set to true, scope is to
-- search the entire subtree.
ldapServerMetadataOutput_roleSearchSubtree :: Lens.Lens' LdapServerMetadataOutput (Prelude.Maybe Prelude.Bool)
ldapServerMetadataOutput_roleSearchSubtree :: Lens' LdapServerMetadataOutput (Maybe Bool)
ldapServerMetadataOutput_roleSearchSubtree = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LdapServerMetadataOutput' {Maybe Bool
roleSearchSubtree :: Maybe Bool
$sel:roleSearchSubtree:LdapServerMetadataOutput' :: LdapServerMetadataOutput -> Maybe Bool
roleSearchSubtree} -> Maybe Bool
roleSearchSubtree) (\s :: LdapServerMetadataOutput
s@LdapServerMetadataOutput' {} Maybe Bool
a -> LdapServerMetadataOutput
s {$sel:roleSearchSubtree:LdapServerMetadataOutput' :: Maybe Bool
roleSearchSubtree = Maybe Bool
a} :: LdapServerMetadataOutput)

-- | Specifies the name of the LDAP attribute for the user group membership.
ldapServerMetadataOutput_userRoleName :: Lens.Lens' LdapServerMetadataOutput (Prelude.Maybe Prelude.Text)
ldapServerMetadataOutput_userRoleName :: Lens' LdapServerMetadataOutput (Maybe Text)
ldapServerMetadataOutput_userRoleName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LdapServerMetadataOutput' {Maybe Text
userRoleName :: Maybe Text
$sel:userRoleName:LdapServerMetadataOutput' :: LdapServerMetadataOutput -> Maybe Text
userRoleName} -> Maybe Text
userRoleName) (\s :: LdapServerMetadataOutput
s@LdapServerMetadataOutput' {} Maybe Text
a -> LdapServerMetadataOutput
s {$sel:userRoleName:LdapServerMetadataOutput' :: Maybe Text
userRoleName = Maybe Text
a} :: LdapServerMetadataOutput)

-- | The directory search scope for the user. If set to true, scope is to
-- search the entire subtree.
ldapServerMetadataOutput_userSearchSubtree :: Lens.Lens' LdapServerMetadataOutput (Prelude.Maybe Prelude.Bool)
ldapServerMetadataOutput_userSearchSubtree :: Lens' LdapServerMetadataOutput (Maybe Bool)
ldapServerMetadataOutput_userSearchSubtree = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LdapServerMetadataOutput' {Maybe Bool
userSearchSubtree :: Maybe Bool
$sel:userSearchSubtree:LdapServerMetadataOutput' :: LdapServerMetadataOutput -> Maybe Bool
userSearchSubtree} -> Maybe Bool
userSearchSubtree) (\s :: LdapServerMetadataOutput
s@LdapServerMetadataOutput' {} Maybe Bool
a -> LdapServerMetadataOutput
s {$sel:userSearchSubtree:LdapServerMetadataOutput' :: Maybe Bool
userSearchSubtree = Maybe Bool
a} :: LdapServerMetadataOutput)

-- | Specifies the location of the LDAP server such as AWS Directory Service
-- for Microsoft Active Directory . Optional failover server.
ldapServerMetadataOutput_hosts :: Lens.Lens' LdapServerMetadataOutput [Prelude.Text]
ldapServerMetadataOutput_hosts :: Lens' LdapServerMetadataOutput [Text]
ldapServerMetadataOutput_hosts = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LdapServerMetadataOutput' {[Text]
hosts :: [Text]
$sel:hosts:LdapServerMetadataOutput' :: LdapServerMetadataOutput -> [Text]
hosts} -> [Text]
hosts) (\s :: LdapServerMetadataOutput
s@LdapServerMetadataOutput' {} [Text]
a -> LdapServerMetadataOutput
s {$sel:hosts:LdapServerMetadataOutput' :: [Text]
hosts = [Text]
a} :: LdapServerMetadataOutput) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The LDAP search filter used to find users within the userBase. The
-- client\'s username is substituted into the {0} placeholder in the search
-- filter. For example, if this option is set to (uid={0}) and the received
-- username is janedoe, the search filter becomes (uid=janedoe) after
-- string substitution. It will result in matching an entry like
-- uid=janedoe, ou=Users,ou=corp, dc=corp, dc=example, dc=com.
ldapServerMetadataOutput_userSearchMatching :: Lens.Lens' LdapServerMetadataOutput Prelude.Text
ldapServerMetadataOutput_userSearchMatching :: Lens' LdapServerMetadataOutput Text
ldapServerMetadataOutput_userSearchMatching = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LdapServerMetadataOutput' {Text
userSearchMatching :: Text
$sel:userSearchMatching:LdapServerMetadataOutput' :: LdapServerMetadataOutput -> Text
userSearchMatching} -> Text
userSearchMatching) (\s :: LdapServerMetadataOutput
s@LdapServerMetadataOutput' {} Text
a -> LdapServerMetadataOutput
s {$sel:userSearchMatching:LdapServerMetadataOutput' :: Text
userSearchMatching = Text
a} :: LdapServerMetadataOutput)

-- | Select a particular subtree of the directory information tree (DIT) to
-- search for user entries. The subtree is specified by a DN, which
-- specifies the base node of the subtree. For example, by setting this
-- option to ou=Users,ou=corp, dc=corp, dc=example, dc=com, the search for
-- user entries is restricted to the subtree beneath ou=Users, ou=corp,
-- dc=corp, dc=example, dc=com.
ldapServerMetadataOutput_userBase :: Lens.Lens' LdapServerMetadataOutput Prelude.Text
ldapServerMetadataOutput_userBase :: Lens' LdapServerMetadataOutput Text
ldapServerMetadataOutput_userBase = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LdapServerMetadataOutput' {Text
userBase :: Text
$sel:userBase:LdapServerMetadataOutput' :: LdapServerMetadataOutput -> Text
userBase} -> Text
userBase) (\s :: LdapServerMetadataOutput
s@LdapServerMetadataOutput' {} Text
a -> LdapServerMetadataOutput
s {$sel:userBase:LdapServerMetadataOutput' :: Text
userBase = Text
a} :: LdapServerMetadataOutput)

-- | The LDAP search filter used to find roles within the roleBase. The
-- distinguished name of the user matched by userSearchMatching is
-- substituted into the {0} placeholder in the search filter. The client\'s
-- username is substituted into the {1} placeholder. For example, if you
-- set this option to (member=uid={1})for the user janedoe, the search
-- filter becomes (member=uid=janedoe) after string substitution. It
-- matches all role entries that have a member attribute equal to
-- uid=janedoe under the subtree selected by the roleBase.
ldapServerMetadataOutput_roleSearchMatching :: Lens.Lens' LdapServerMetadataOutput Prelude.Text
ldapServerMetadataOutput_roleSearchMatching :: Lens' LdapServerMetadataOutput Text
ldapServerMetadataOutput_roleSearchMatching = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LdapServerMetadataOutput' {Text
roleSearchMatching :: Text
$sel:roleSearchMatching:LdapServerMetadataOutput' :: LdapServerMetadataOutput -> Text
roleSearchMatching} -> Text
roleSearchMatching) (\s :: LdapServerMetadataOutput
s@LdapServerMetadataOutput' {} Text
a -> LdapServerMetadataOutput
s {$sel:roleSearchMatching:LdapServerMetadataOutput' :: Text
roleSearchMatching = Text
a} :: LdapServerMetadataOutput)

-- | Service account username. A service account is an account in your LDAP
-- server that has access to initiate a connection. For example,
-- cn=admin,dc=corp, dc=example, dc=com.
ldapServerMetadataOutput_serviceAccountUsername :: Lens.Lens' LdapServerMetadataOutput Prelude.Text
ldapServerMetadataOutput_serviceAccountUsername :: Lens' LdapServerMetadataOutput Text
ldapServerMetadataOutput_serviceAccountUsername = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LdapServerMetadataOutput' {Text
serviceAccountUsername :: Text
$sel:serviceAccountUsername:LdapServerMetadataOutput' :: LdapServerMetadataOutput -> Text
serviceAccountUsername} -> Text
serviceAccountUsername) (\s :: LdapServerMetadataOutput
s@LdapServerMetadataOutput' {} Text
a -> LdapServerMetadataOutput
s {$sel:serviceAccountUsername:LdapServerMetadataOutput' :: Text
serviceAccountUsername = Text
a} :: LdapServerMetadataOutput)

-- | The distinguished name of the node in the directory information tree
-- (DIT) to search for roles or groups. For example, ou=group, ou=corp,
-- dc=corp, dc=example, dc=com.
ldapServerMetadataOutput_roleBase :: Lens.Lens' LdapServerMetadataOutput Prelude.Text
ldapServerMetadataOutput_roleBase :: Lens' LdapServerMetadataOutput Text
ldapServerMetadataOutput_roleBase = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LdapServerMetadataOutput' {Text
roleBase :: Text
$sel:roleBase:LdapServerMetadataOutput' :: LdapServerMetadataOutput -> Text
roleBase} -> Text
roleBase) (\s :: LdapServerMetadataOutput
s@LdapServerMetadataOutput' {} Text
a -> LdapServerMetadataOutput
s {$sel:roleBase:LdapServerMetadataOutput' :: Text
roleBase = Text
a} :: LdapServerMetadataOutput)

instance Data.FromJSON LdapServerMetadataOutput where
  parseJSON :: Value -> Parser LdapServerMetadataOutput
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"LdapServerMetadataOutput"
      ( \Object
x ->
          Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Bool
-> [Text]
-> Text
-> Text
-> Text
-> Text
-> Text
-> LdapServerMetadataOutput
LdapServerMetadataOutput'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"roleName")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"roleSearchSubtree")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"userRoleName")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"userSearchSubtree")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"hosts" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= 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 -> Parser a
Data..: Key
"userSearchMatching")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"userBase")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"roleSearchMatching")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"serviceAccountUsername")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"roleBase")
      )

instance Prelude.Hashable LdapServerMetadataOutput where
  hashWithSalt :: Int -> LdapServerMetadataOutput -> Int
hashWithSalt Int
_salt LdapServerMetadataOutput' {[Text]
Maybe Bool
Maybe Text
Text
roleBase :: Text
serviceAccountUsername :: Text
roleSearchMatching :: Text
userBase :: Text
userSearchMatching :: Text
hosts :: [Text]
userSearchSubtree :: Maybe Bool
userRoleName :: Maybe Text
roleSearchSubtree :: Maybe Bool
roleName :: Maybe Text
$sel:roleBase:LdapServerMetadataOutput' :: LdapServerMetadataOutput -> Text
$sel:serviceAccountUsername:LdapServerMetadataOutput' :: LdapServerMetadataOutput -> Text
$sel:roleSearchMatching:LdapServerMetadataOutput' :: LdapServerMetadataOutput -> Text
$sel:userBase:LdapServerMetadataOutput' :: LdapServerMetadataOutput -> Text
$sel:userSearchMatching:LdapServerMetadataOutput' :: LdapServerMetadataOutput -> Text
$sel:hosts:LdapServerMetadataOutput' :: LdapServerMetadataOutput -> [Text]
$sel:userSearchSubtree:LdapServerMetadataOutput' :: LdapServerMetadataOutput -> Maybe Bool
$sel:userRoleName:LdapServerMetadataOutput' :: LdapServerMetadataOutput -> Maybe Text
$sel:roleSearchSubtree:LdapServerMetadataOutput' :: LdapServerMetadataOutput -> Maybe Bool
$sel:roleName:LdapServerMetadataOutput' :: LdapServerMetadataOutput -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
roleName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
roleSearchSubtree
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
userRoleName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
userSearchSubtree
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` [Text]
hosts
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
userSearchMatching
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
userBase
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
roleSearchMatching
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
serviceAccountUsername
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
roleBase

instance Prelude.NFData LdapServerMetadataOutput where
  rnf :: LdapServerMetadataOutput -> ()
rnf LdapServerMetadataOutput' {[Text]
Maybe Bool
Maybe Text
Text
roleBase :: Text
serviceAccountUsername :: Text
roleSearchMatching :: Text
userBase :: Text
userSearchMatching :: Text
hosts :: [Text]
userSearchSubtree :: Maybe Bool
userRoleName :: Maybe Text
roleSearchSubtree :: Maybe Bool
roleName :: Maybe Text
$sel:roleBase:LdapServerMetadataOutput' :: LdapServerMetadataOutput -> Text
$sel:serviceAccountUsername:LdapServerMetadataOutput' :: LdapServerMetadataOutput -> Text
$sel:roleSearchMatching:LdapServerMetadataOutput' :: LdapServerMetadataOutput -> Text
$sel:userBase:LdapServerMetadataOutput' :: LdapServerMetadataOutput -> Text
$sel:userSearchMatching:LdapServerMetadataOutput' :: LdapServerMetadataOutput -> Text
$sel:hosts:LdapServerMetadataOutput' :: LdapServerMetadataOutput -> [Text]
$sel:userSearchSubtree:LdapServerMetadataOutput' :: LdapServerMetadataOutput -> Maybe Bool
$sel:userRoleName:LdapServerMetadataOutput' :: LdapServerMetadataOutput -> Maybe Text
$sel:roleSearchSubtree:LdapServerMetadataOutput' :: LdapServerMetadataOutput -> Maybe Bool
$sel:roleName:LdapServerMetadataOutput' :: LdapServerMetadataOutput -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
roleName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
roleSearchSubtree
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
userRoleName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
userSearchSubtree
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf [Text]
hosts
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
userSearchMatching
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
userBase
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
roleSearchMatching
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
serviceAccountUsername
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
roleBase