{-# 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.LdapServerMetadataInput
-- 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.LdapServerMetadataInput 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.
--
-- Does not apply to RabbitMQ brokers.
--
-- /See:/ 'newLdapServerMetadataInput' smart constructor.
data LdapServerMetadataInput = LdapServerMetadataInput'
  { -- | Specifies the LDAP attribute that identifies the group name attribute in
    -- the object returned from the group membership query.
    LdapServerMetadataInput -> 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.
    LdapServerMetadataInput -> Maybe Bool
roleSearchSubtree :: Prelude.Maybe Prelude.Bool,
    -- | Specifies the name of the LDAP attribute for the user group membership.
    LdapServerMetadataInput -> 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.
    LdapServerMetadataInput -> 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.
    LdapServerMetadataInput -> [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.
    LdapServerMetadataInput -> 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.
    LdapServerMetadataInput -> 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.
    LdapServerMetadataInput -> 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.
    LdapServerMetadataInput -> 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.
    LdapServerMetadataInput -> Text
roleBase :: Prelude.Text,
    -- | Service account password. 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.
    LdapServerMetadataInput -> Text
serviceAccountPassword :: Prelude.Text
  }
  deriving (LdapServerMetadataInput -> LdapServerMetadataInput -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: LdapServerMetadataInput -> LdapServerMetadataInput -> Bool
$c/= :: LdapServerMetadataInput -> LdapServerMetadataInput -> Bool
== :: LdapServerMetadataInput -> LdapServerMetadataInput -> Bool
$c== :: LdapServerMetadataInput -> LdapServerMetadataInput -> Bool
Prelude.Eq, ReadPrec [LdapServerMetadataInput]
ReadPrec LdapServerMetadataInput
Int -> ReadS LdapServerMetadataInput
ReadS [LdapServerMetadataInput]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [LdapServerMetadataInput]
$creadListPrec :: ReadPrec [LdapServerMetadataInput]
readPrec :: ReadPrec LdapServerMetadataInput
$creadPrec :: ReadPrec LdapServerMetadataInput
readList :: ReadS [LdapServerMetadataInput]
$creadList :: ReadS [LdapServerMetadataInput]
readsPrec :: Int -> ReadS LdapServerMetadataInput
$creadsPrec :: Int -> ReadS LdapServerMetadataInput
Prelude.Read, Int -> LdapServerMetadataInput -> ShowS
[LdapServerMetadataInput] -> ShowS
LdapServerMetadataInput -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [LdapServerMetadataInput] -> ShowS
$cshowList :: [LdapServerMetadataInput] -> ShowS
show :: LdapServerMetadataInput -> String
$cshow :: LdapServerMetadataInput -> String
showsPrec :: Int -> LdapServerMetadataInput -> ShowS
$cshowsPrec :: Int -> LdapServerMetadataInput -> ShowS
Prelude.Show, forall x. Rep LdapServerMetadataInput x -> LdapServerMetadataInput
forall x. LdapServerMetadataInput -> Rep LdapServerMetadataInput x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep LdapServerMetadataInput x -> LdapServerMetadataInput
$cfrom :: forall x. LdapServerMetadataInput -> Rep LdapServerMetadataInput x
Prelude.Generic)

-- |
-- Create a value of 'LdapServerMetadataInput' 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', 'ldapServerMetadataInput_roleName' - Specifies the LDAP attribute that identifies the group name attribute in
-- the object returned from the group membership query.
--
-- 'roleSearchSubtree', 'ldapServerMetadataInput_roleSearchSubtree' - The directory search scope for the role. If set to true, scope is to
-- search the entire subtree.
--
-- 'userRoleName', 'ldapServerMetadataInput_userRoleName' - Specifies the name of the LDAP attribute for the user group membership.
--
-- 'userSearchSubtree', 'ldapServerMetadataInput_userSearchSubtree' - The directory search scope for the user. If set to true, scope is to
-- search the entire subtree.
--
-- 'hosts', 'ldapServerMetadataInput_hosts' - Specifies the location of the LDAP server such as AWS Directory Service
-- for Microsoft Active Directory . Optional failover server.
--
-- 'userSearchMatching', 'ldapServerMetadataInput_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', 'ldapServerMetadataInput_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', 'ldapServerMetadataInput_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', 'ldapServerMetadataInput_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', 'ldapServerMetadataInput_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.
--
-- 'serviceAccountPassword', 'ldapServerMetadataInput_serviceAccountPassword' - Service account password. 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.
newLdapServerMetadataInput ::
  -- | 'userSearchMatching'
  Prelude.Text ->
  -- | 'userBase'
  Prelude.Text ->
  -- | 'roleSearchMatching'
  Prelude.Text ->
  -- | 'serviceAccountUsername'
  Prelude.Text ->
  -- | 'roleBase'
  Prelude.Text ->
  -- | 'serviceAccountPassword'
  Prelude.Text ->
  LdapServerMetadataInput
newLdapServerMetadataInput :: Text
-> Text -> Text -> Text -> Text -> Text -> LdapServerMetadataInput
newLdapServerMetadataInput
  Text
pUserSearchMatching_
  Text
pUserBase_
  Text
pRoleSearchMatching_
  Text
pServiceAccountUsername_
  Text
pRoleBase_
  Text
pServiceAccountPassword_ =
    LdapServerMetadataInput'
      { $sel:roleName:LdapServerMetadataInput' :: Maybe Text
roleName =
          forall a. Maybe a
Prelude.Nothing,
        $sel:roleSearchSubtree:LdapServerMetadataInput' :: Maybe Bool
roleSearchSubtree = forall a. Maybe a
Prelude.Nothing,
        $sel:userRoleName:LdapServerMetadataInput' :: Maybe Text
userRoleName = forall a. Maybe a
Prelude.Nothing,
        $sel:userSearchSubtree:LdapServerMetadataInput' :: Maybe Bool
userSearchSubtree = forall a. Maybe a
Prelude.Nothing,
        $sel:hosts:LdapServerMetadataInput' :: [Text]
hosts = forall a. Monoid a => a
Prelude.mempty,
        $sel:userSearchMatching:LdapServerMetadataInput' :: Text
userSearchMatching = Text
pUserSearchMatching_,
        $sel:userBase:LdapServerMetadataInput' :: Text
userBase = Text
pUserBase_,
        $sel:roleSearchMatching:LdapServerMetadataInput' :: Text
roleSearchMatching = Text
pRoleSearchMatching_,
        $sel:serviceAccountUsername:LdapServerMetadataInput' :: Text
serviceAccountUsername = Text
pServiceAccountUsername_,
        $sel:roleBase:LdapServerMetadataInput' :: Text
roleBase = Text
pRoleBase_,
        $sel:serviceAccountPassword:LdapServerMetadataInput' :: Text
serviceAccountPassword = Text
pServiceAccountPassword_
      }

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

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

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

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

-- | Specifies the location of the LDAP server such as AWS Directory Service
-- for Microsoft Active Directory . Optional failover server.
ldapServerMetadataInput_hosts :: Lens.Lens' LdapServerMetadataInput [Prelude.Text]
ldapServerMetadataInput_hosts :: Lens' LdapServerMetadataInput [Text]
ldapServerMetadataInput_hosts = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LdapServerMetadataInput' {[Text]
hosts :: [Text]
$sel:hosts:LdapServerMetadataInput' :: LdapServerMetadataInput -> [Text]
hosts} -> [Text]
hosts) (\s :: LdapServerMetadataInput
s@LdapServerMetadataInput' {} [Text]
a -> LdapServerMetadataInput
s {$sel:hosts:LdapServerMetadataInput' :: [Text]
hosts = [Text]
a} :: LdapServerMetadataInput) 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.
ldapServerMetadataInput_userSearchMatching :: Lens.Lens' LdapServerMetadataInput Prelude.Text
ldapServerMetadataInput_userSearchMatching :: Lens' LdapServerMetadataInput Text
ldapServerMetadataInput_userSearchMatching = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LdapServerMetadataInput' {Text
userSearchMatching :: Text
$sel:userSearchMatching:LdapServerMetadataInput' :: LdapServerMetadataInput -> Text
userSearchMatching} -> Text
userSearchMatching) (\s :: LdapServerMetadataInput
s@LdapServerMetadataInput' {} Text
a -> LdapServerMetadataInput
s {$sel:userSearchMatching:LdapServerMetadataInput' :: Text
userSearchMatching = Text
a} :: LdapServerMetadataInput)

-- | 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.
ldapServerMetadataInput_userBase :: Lens.Lens' LdapServerMetadataInput Prelude.Text
ldapServerMetadataInput_userBase :: Lens' LdapServerMetadataInput Text
ldapServerMetadataInput_userBase = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LdapServerMetadataInput' {Text
userBase :: Text
$sel:userBase:LdapServerMetadataInput' :: LdapServerMetadataInput -> Text
userBase} -> Text
userBase) (\s :: LdapServerMetadataInput
s@LdapServerMetadataInput' {} Text
a -> LdapServerMetadataInput
s {$sel:userBase:LdapServerMetadataInput' :: Text
userBase = Text
a} :: LdapServerMetadataInput)

-- | 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.
ldapServerMetadataInput_roleSearchMatching :: Lens.Lens' LdapServerMetadataInput Prelude.Text
ldapServerMetadataInput_roleSearchMatching :: Lens' LdapServerMetadataInput Text
ldapServerMetadataInput_roleSearchMatching = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LdapServerMetadataInput' {Text
roleSearchMatching :: Text
$sel:roleSearchMatching:LdapServerMetadataInput' :: LdapServerMetadataInput -> Text
roleSearchMatching} -> Text
roleSearchMatching) (\s :: LdapServerMetadataInput
s@LdapServerMetadataInput' {} Text
a -> LdapServerMetadataInput
s {$sel:roleSearchMatching:LdapServerMetadataInput' :: Text
roleSearchMatching = Text
a} :: LdapServerMetadataInput)

-- | 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.
ldapServerMetadataInput_serviceAccountUsername :: Lens.Lens' LdapServerMetadataInput Prelude.Text
ldapServerMetadataInput_serviceAccountUsername :: Lens' LdapServerMetadataInput Text
ldapServerMetadataInput_serviceAccountUsername = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LdapServerMetadataInput' {Text
serviceAccountUsername :: Text
$sel:serviceAccountUsername:LdapServerMetadataInput' :: LdapServerMetadataInput -> Text
serviceAccountUsername} -> Text
serviceAccountUsername) (\s :: LdapServerMetadataInput
s@LdapServerMetadataInput' {} Text
a -> LdapServerMetadataInput
s {$sel:serviceAccountUsername:LdapServerMetadataInput' :: Text
serviceAccountUsername = Text
a} :: LdapServerMetadataInput)

-- | 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.
ldapServerMetadataInput_roleBase :: Lens.Lens' LdapServerMetadataInput Prelude.Text
ldapServerMetadataInput_roleBase :: Lens' LdapServerMetadataInput Text
ldapServerMetadataInput_roleBase = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LdapServerMetadataInput' {Text
roleBase :: Text
$sel:roleBase:LdapServerMetadataInput' :: LdapServerMetadataInput -> Text
roleBase} -> Text
roleBase) (\s :: LdapServerMetadataInput
s@LdapServerMetadataInput' {} Text
a -> LdapServerMetadataInput
s {$sel:roleBase:LdapServerMetadataInput' :: Text
roleBase = Text
a} :: LdapServerMetadataInput)

-- | Service account password. 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.
ldapServerMetadataInput_serviceAccountPassword :: Lens.Lens' LdapServerMetadataInput Prelude.Text
ldapServerMetadataInput_serviceAccountPassword :: Lens' LdapServerMetadataInput Text
ldapServerMetadataInput_serviceAccountPassword = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LdapServerMetadataInput' {Text
serviceAccountPassword :: Text
$sel:serviceAccountPassword:LdapServerMetadataInput' :: LdapServerMetadataInput -> Text
serviceAccountPassword} -> Text
serviceAccountPassword) (\s :: LdapServerMetadataInput
s@LdapServerMetadataInput' {} Text
a -> LdapServerMetadataInput
s {$sel:serviceAccountPassword:LdapServerMetadataInput' :: Text
serviceAccountPassword = Text
a} :: LdapServerMetadataInput)

instance Prelude.Hashable LdapServerMetadataInput where
  hashWithSalt :: Int -> LdapServerMetadataInput -> Int
hashWithSalt Int
_salt LdapServerMetadataInput' {[Text]
Maybe Bool
Maybe Text
Text
serviceAccountPassword :: 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:serviceAccountPassword:LdapServerMetadataInput' :: LdapServerMetadataInput -> Text
$sel:roleBase:LdapServerMetadataInput' :: LdapServerMetadataInput -> Text
$sel:serviceAccountUsername:LdapServerMetadataInput' :: LdapServerMetadataInput -> Text
$sel:roleSearchMatching:LdapServerMetadataInput' :: LdapServerMetadataInput -> Text
$sel:userBase:LdapServerMetadataInput' :: LdapServerMetadataInput -> Text
$sel:userSearchMatching:LdapServerMetadataInput' :: LdapServerMetadataInput -> Text
$sel:hosts:LdapServerMetadataInput' :: LdapServerMetadataInput -> [Text]
$sel:userSearchSubtree:LdapServerMetadataInput' :: LdapServerMetadataInput -> Maybe Bool
$sel:userRoleName:LdapServerMetadataInput' :: LdapServerMetadataInput -> Maybe Text
$sel:roleSearchSubtree:LdapServerMetadataInput' :: LdapServerMetadataInput -> Maybe Bool
$sel:roleName:LdapServerMetadataInput' :: LdapServerMetadataInput -> 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
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
serviceAccountPassword

instance Prelude.NFData LdapServerMetadataInput where
  rnf :: LdapServerMetadataInput -> ()
rnf LdapServerMetadataInput' {[Text]
Maybe Bool
Maybe Text
Text
serviceAccountPassword :: 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:serviceAccountPassword:LdapServerMetadataInput' :: LdapServerMetadataInput -> Text
$sel:roleBase:LdapServerMetadataInput' :: LdapServerMetadataInput -> Text
$sel:serviceAccountUsername:LdapServerMetadataInput' :: LdapServerMetadataInput -> Text
$sel:roleSearchMatching:LdapServerMetadataInput' :: LdapServerMetadataInput -> Text
$sel:userBase:LdapServerMetadataInput' :: LdapServerMetadataInput -> Text
$sel:userSearchMatching:LdapServerMetadataInput' :: LdapServerMetadataInput -> Text
$sel:hosts:LdapServerMetadataInput' :: LdapServerMetadataInput -> [Text]
$sel:userSearchSubtree:LdapServerMetadataInput' :: LdapServerMetadataInput -> Maybe Bool
$sel:userRoleName:LdapServerMetadataInput' :: LdapServerMetadataInput -> Maybe Text
$sel:roleSearchSubtree:LdapServerMetadataInput' :: LdapServerMetadataInput -> Maybe Bool
$sel:roleName:LdapServerMetadataInput' :: LdapServerMetadataInput -> 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
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
serviceAccountPassword

instance Data.ToJSON LdapServerMetadataInput where
  toJSON :: LdapServerMetadataInput -> Value
toJSON LdapServerMetadataInput' {[Text]
Maybe Bool
Maybe Text
Text
serviceAccountPassword :: 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:serviceAccountPassword:LdapServerMetadataInput' :: LdapServerMetadataInput -> Text
$sel:roleBase:LdapServerMetadataInput' :: LdapServerMetadataInput -> Text
$sel:serviceAccountUsername:LdapServerMetadataInput' :: LdapServerMetadataInput -> Text
$sel:roleSearchMatching:LdapServerMetadataInput' :: LdapServerMetadataInput -> Text
$sel:userBase:LdapServerMetadataInput' :: LdapServerMetadataInput -> Text
$sel:userSearchMatching:LdapServerMetadataInput' :: LdapServerMetadataInput -> Text
$sel:hosts:LdapServerMetadataInput' :: LdapServerMetadataInput -> [Text]
$sel:userSearchSubtree:LdapServerMetadataInput' :: LdapServerMetadataInput -> Maybe Bool
$sel:userRoleName:LdapServerMetadataInput' :: LdapServerMetadataInput -> Maybe Text
$sel:roleSearchSubtree:LdapServerMetadataInput' :: LdapServerMetadataInput -> Maybe Bool
$sel:roleName:LdapServerMetadataInput' :: LdapServerMetadataInput -> Maybe Text
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"roleName" 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
roleName,
            (Key
"roleSearchSubtree" 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 Bool
roleSearchSubtree,
            (Key
"userRoleName" 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
userRoleName,
            (Key
"userSearchSubtree" 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 Bool
userSearchSubtree,
            forall a. a -> Maybe a
Prelude.Just (Key
"hosts" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= [Text]
hosts),
            forall a. a -> Maybe a
Prelude.Just
              (Key
"userSearchMatching" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
userSearchMatching),
            forall a. a -> Maybe a
Prelude.Just (Key
"userBase" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
userBase),
            forall a. a -> Maybe a
Prelude.Just
              (Key
"roleSearchMatching" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
roleSearchMatching),
            forall a. a -> Maybe a
Prelude.Just
              ( Key
"serviceAccountUsername"
                  forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
serviceAccountUsername
              ),
            forall a. a -> Maybe a
Prelude.Just (Key
"roleBase" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
roleBase),
            forall a. a -> Maybe a
Prelude.Just
              ( Key
"serviceAccountPassword"
                  forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
serviceAccountPassword
              )
          ]
      )