{-# 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.FSx.Types.SelfManagedActiveDirectoryConfiguration
-- 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.FSx.Types.SelfManagedActiveDirectoryConfiguration 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

-- | The configuration that Amazon FSx uses to join a FSx for Windows File
-- Server file system or an ONTAP storage virtual machine (SVM) to a
-- self-managed (including on-premises) Microsoft Active Directory (AD)
-- directory. For more information, see
-- <https://docs.aws.amazon.com/fsx/latest/WindowsGuide/self-managed-AD.html Using Amazon FSx with your self-managed Microsoft Active Directory>
-- or
-- <https://docs.aws.amazon.com/fsx/latest/ONTAPGuide/managing-svms.html Managing SVMs>.
--
-- /See:/ 'newSelfManagedActiveDirectoryConfiguration' smart constructor.
data SelfManagedActiveDirectoryConfiguration = SelfManagedActiveDirectoryConfiguration'
  { -- | (Optional) The name of the domain group whose members are granted
    -- administrative privileges for the file system. Administrative privileges
    -- include taking ownership of files and folders, setting audit controls
    -- (audit ACLs) on files and folders, and administering the file system
    -- remotely by using the FSx Remote PowerShell. The group that you specify
    -- must already exist in your domain. If you don\'t provide one, your AD
    -- domain\'s Domain Admins group is used.
    SelfManagedActiveDirectoryConfiguration -> Maybe Text
fileSystemAdministratorsGroup :: Prelude.Maybe Prelude.Text,
    -- | (Optional) The fully qualified distinguished name of the organizational
    -- unit within your self-managed AD directory. Amazon FSx only accepts OU
    -- as the direct parent of the file system. An example is
    -- @OU=FSx,DC=yourdomain,DC=corp,DC=com@. To learn more, see
    -- <https://tools.ietf.org/html/rfc2253 RFC 2253>. If none is provided, the
    -- FSx file system is created in the default location of your self-managed
    -- AD directory.
    --
    -- Only Organizational Unit (OU) objects can be the direct parent of the
    -- file system that you\'re creating.
    SelfManagedActiveDirectoryConfiguration -> Maybe Text
organizationalUnitDistinguishedName :: Prelude.Maybe Prelude.Text,
    -- | The fully qualified domain name of the self-managed AD directory, such
    -- as @corp.example.com@.
    SelfManagedActiveDirectoryConfiguration -> Text
domainName :: Prelude.Text,
    -- | The user name for the service account on your self-managed AD domain
    -- that Amazon FSx will use to join to your AD domain. This account must
    -- have the permission to join computers to the domain in the
    -- organizational unit provided in @OrganizationalUnitDistinguishedName@,
    -- or in the default location of your AD domain.
    SelfManagedActiveDirectoryConfiguration -> Text
userName :: Prelude.Text,
    -- | The password for the service account on your self-managed AD domain that
    -- Amazon FSx will use to join to your AD domain.
    SelfManagedActiveDirectoryConfiguration -> Sensitive Text
password :: Data.Sensitive Prelude.Text,
    -- | A list of up to three IP addresses of DNS servers or domain controllers
    -- in the self-managed AD directory.
    SelfManagedActiveDirectoryConfiguration -> NonEmpty Text
dnsIps :: Prelude.NonEmpty Prelude.Text
  }
  deriving (SelfManagedActiveDirectoryConfiguration
-> SelfManagedActiveDirectoryConfiguration -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SelfManagedActiveDirectoryConfiguration
-> SelfManagedActiveDirectoryConfiguration -> Bool
$c/= :: SelfManagedActiveDirectoryConfiguration
-> SelfManagedActiveDirectoryConfiguration -> Bool
== :: SelfManagedActiveDirectoryConfiguration
-> SelfManagedActiveDirectoryConfiguration -> Bool
$c== :: SelfManagedActiveDirectoryConfiguration
-> SelfManagedActiveDirectoryConfiguration -> Bool
Prelude.Eq, Int -> SelfManagedActiveDirectoryConfiguration -> ShowS
[SelfManagedActiveDirectoryConfiguration] -> ShowS
SelfManagedActiveDirectoryConfiguration -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SelfManagedActiveDirectoryConfiguration] -> ShowS
$cshowList :: [SelfManagedActiveDirectoryConfiguration] -> ShowS
show :: SelfManagedActiveDirectoryConfiguration -> String
$cshow :: SelfManagedActiveDirectoryConfiguration -> String
showsPrec :: Int -> SelfManagedActiveDirectoryConfiguration -> ShowS
$cshowsPrec :: Int -> SelfManagedActiveDirectoryConfiguration -> ShowS
Prelude.Show, forall x.
Rep SelfManagedActiveDirectoryConfiguration x
-> SelfManagedActiveDirectoryConfiguration
forall x.
SelfManagedActiveDirectoryConfiguration
-> Rep SelfManagedActiveDirectoryConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep SelfManagedActiveDirectoryConfiguration x
-> SelfManagedActiveDirectoryConfiguration
$cfrom :: forall x.
SelfManagedActiveDirectoryConfiguration
-> Rep SelfManagedActiveDirectoryConfiguration x
Prelude.Generic)

-- |
-- Create a value of 'SelfManagedActiveDirectoryConfiguration' 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:
--
-- 'fileSystemAdministratorsGroup', 'selfManagedActiveDirectoryConfiguration_fileSystemAdministratorsGroup' - (Optional) The name of the domain group whose members are granted
-- administrative privileges for the file system. Administrative privileges
-- include taking ownership of files and folders, setting audit controls
-- (audit ACLs) on files and folders, and administering the file system
-- remotely by using the FSx Remote PowerShell. The group that you specify
-- must already exist in your domain. If you don\'t provide one, your AD
-- domain\'s Domain Admins group is used.
--
-- 'organizationalUnitDistinguishedName', 'selfManagedActiveDirectoryConfiguration_organizationalUnitDistinguishedName' - (Optional) The fully qualified distinguished name of the organizational
-- unit within your self-managed AD directory. Amazon FSx only accepts OU
-- as the direct parent of the file system. An example is
-- @OU=FSx,DC=yourdomain,DC=corp,DC=com@. To learn more, see
-- <https://tools.ietf.org/html/rfc2253 RFC 2253>. If none is provided, the
-- FSx file system is created in the default location of your self-managed
-- AD directory.
--
-- Only Organizational Unit (OU) objects can be the direct parent of the
-- file system that you\'re creating.
--
-- 'domainName', 'selfManagedActiveDirectoryConfiguration_domainName' - The fully qualified domain name of the self-managed AD directory, such
-- as @corp.example.com@.
--
-- 'userName', 'selfManagedActiveDirectoryConfiguration_userName' - The user name for the service account on your self-managed AD domain
-- that Amazon FSx will use to join to your AD domain. This account must
-- have the permission to join computers to the domain in the
-- organizational unit provided in @OrganizationalUnitDistinguishedName@,
-- or in the default location of your AD domain.
--
-- 'password', 'selfManagedActiveDirectoryConfiguration_password' - The password for the service account on your self-managed AD domain that
-- Amazon FSx will use to join to your AD domain.
--
-- 'dnsIps', 'selfManagedActiveDirectoryConfiguration_dnsIps' - A list of up to three IP addresses of DNS servers or domain controllers
-- in the self-managed AD directory.
newSelfManagedActiveDirectoryConfiguration ::
  -- | 'domainName'
  Prelude.Text ->
  -- | 'userName'
  Prelude.Text ->
  -- | 'password'
  Prelude.Text ->
  -- | 'dnsIps'
  Prelude.NonEmpty Prelude.Text ->
  SelfManagedActiveDirectoryConfiguration
newSelfManagedActiveDirectoryConfiguration :: Text
-> Text
-> Text
-> NonEmpty Text
-> SelfManagedActiveDirectoryConfiguration
newSelfManagedActiveDirectoryConfiguration
  Text
pDomainName_
  Text
pUserName_
  Text
pPassword_
  NonEmpty Text
pDnsIps_ =
    SelfManagedActiveDirectoryConfiguration'
      { $sel:fileSystemAdministratorsGroup:SelfManagedActiveDirectoryConfiguration' :: Maybe Text
fileSystemAdministratorsGroup =
          forall a. Maybe a
Prelude.Nothing,
        $sel:organizationalUnitDistinguishedName:SelfManagedActiveDirectoryConfiguration' :: Maybe Text
organizationalUnitDistinguishedName =
          forall a. Maybe a
Prelude.Nothing,
        $sel:domainName:SelfManagedActiveDirectoryConfiguration' :: Text
domainName = Text
pDomainName_,
        $sel:userName:SelfManagedActiveDirectoryConfiguration' :: Text
userName = Text
pUserName_,
        $sel:password:SelfManagedActiveDirectoryConfiguration' :: Sensitive Text
password =
          forall a. Iso' (Sensitive a) a
Data._Sensitive
            forall t b. AReview t b -> b -> t
Lens.# Text
pPassword_,
        $sel:dnsIps:SelfManagedActiveDirectoryConfiguration' :: NonEmpty Text
dnsIps =
          forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced forall t b. AReview t b -> b -> t
Lens.# NonEmpty Text
pDnsIps_
      }

-- | (Optional) The name of the domain group whose members are granted
-- administrative privileges for the file system. Administrative privileges
-- include taking ownership of files and folders, setting audit controls
-- (audit ACLs) on files and folders, and administering the file system
-- remotely by using the FSx Remote PowerShell. The group that you specify
-- must already exist in your domain. If you don\'t provide one, your AD
-- domain\'s Domain Admins group is used.
selfManagedActiveDirectoryConfiguration_fileSystemAdministratorsGroup :: Lens.Lens' SelfManagedActiveDirectoryConfiguration (Prelude.Maybe Prelude.Text)
selfManagedActiveDirectoryConfiguration_fileSystemAdministratorsGroup :: Lens' SelfManagedActiveDirectoryConfiguration (Maybe Text)
selfManagedActiveDirectoryConfiguration_fileSystemAdministratorsGroup = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SelfManagedActiveDirectoryConfiguration' {Maybe Text
fileSystemAdministratorsGroup :: Maybe Text
$sel:fileSystemAdministratorsGroup:SelfManagedActiveDirectoryConfiguration' :: SelfManagedActiveDirectoryConfiguration -> Maybe Text
fileSystemAdministratorsGroup} -> Maybe Text
fileSystemAdministratorsGroup) (\s :: SelfManagedActiveDirectoryConfiguration
s@SelfManagedActiveDirectoryConfiguration' {} Maybe Text
a -> SelfManagedActiveDirectoryConfiguration
s {$sel:fileSystemAdministratorsGroup:SelfManagedActiveDirectoryConfiguration' :: Maybe Text
fileSystemAdministratorsGroup = Maybe Text
a} :: SelfManagedActiveDirectoryConfiguration)

-- | (Optional) The fully qualified distinguished name of the organizational
-- unit within your self-managed AD directory. Amazon FSx only accepts OU
-- as the direct parent of the file system. An example is
-- @OU=FSx,DC=yourdomain,DC=corp,DC=com@. To learn more, see
-- <https://tools.ietf.org/html/rfc2253 RFC 2253>. If none is provided, the
-- FSx file system is created in the default location of your self-managed
-- AD directory.
--
-- Only Organizational Unit (OU) objects can be the direct parent of the
-- file system that you\'re creating.
selfManagedActiveDirectoryConfiguration_organizationalUnitDistinguishedName :: Lens.Lens' SelfManagedActiveDirectoryConfiguration (Prelude.Maybe Prelude.Text)
selfManagedActiveDirectoryConfiguration_organizationalUnitDistinguishedName :: Lens' SelfManagedActiveDirectoryConfiguration (Maybe Text)
selfManagedActiveDirectoryConfiguration_organizationalUnitDistinguishedName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SelfManagedActiveDirectoryConfiguration' {Maybe Text
organizationalUnitDistinguishedName :: Maybe Text
$sel:organizationalUnitDistinguishedName:SelfManagedActiveDirectoryConfiguration' :: SelfManagedActiveDirectoryConfiguration -> Maybe Text
organizationalUnitDistinguishedName} -> Maybe Text
organizationalUnitDistinguishedName) (\s :: SelfManagedActiveDirectoryConfiguration
s@SelfManagedActiveDirectoryConfiguration' {} Maybe Text
a -> SelfManagedActiveDirectoryConfiguration
s {$sel:organizationalUnitDistinguishedName:SelfManagedActiveDirectoryConfiguration' :: Maybe Text
organizationalUnitDistinguishedName = Maybe Text
a} :: SelfManagedActiveDirectoryConfiguration)

-- | The fully qualified domain name of the self-managed AD directory, such
-- as @corp.example.com@.
selfManagedActiveDirectoryConfiguration_domainName :: Lens.Lens' SelfManagedActiveDirectoryConfiguration Prelude.Text
selfManagedActiveDirectoryConfiguration_domainName :: Lens' SelfManagedActiveDirectoryConfiguration Text
selfManagedActiveDirectoryConfiguration_domainName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SelfManagedActiveDirectoryConfiguration' {Text
domainName :: Text
$sel:domainName:SelfManagedActiveDirectoryConfiguration' :: SelfManagedActiveDirectoryConfiguration -> Text
domainName} -> Text
domainName) (\s :: SelfManagedActiveDirectoryConfiguration
s@SelfManagedActiveDirectoryConfiguration' {} Text
a -> SelfManagedActiveDirectoryConfiguration
s {$sel:domainName:SelfManagedActiveDirectoryConfiguration' :: Text
domainName = Text
a} :: SelfManagedActiveDirectoryConfiguration)

-- | The user name for the service account on your self-managed AD domain
-- that Amazon FSx will use to join to your AD domain. This account must
-- have the permission to join computers to the domain in the
-- organizational unit provided in @OrganizationalUnitDistinguishedName@,
-- or in the default location of your AD domain.
selfManagedActiveDirectoryConfiguration_userName :: Lens.Lens' SelfManagedActiveDirectoryConfiguration Prelude.Text
selfManagedActiveDirectoryConfiguration_userName :: Lens' SelfManagedActiveDirectoryConfiguration Text
selfManagedActiveDirectoryConfiguration_userName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SelfManagedActiveDirectoryConfiguration' {Text
userName :: Text
$sel:userName:SelfManagedActiveDirectoryConfiguration' :: SelfManagedActiveDirectoryConfiguration -> Text
userName} -> Text
userName) (\s :: SelfManagedActiveDirectoryConfiguration
s@SelfManagedActiveDirectoryConfiguration' {} Text
a -> SelfManagedActiveDirectoryConfiguration
s {$sel:userName:SelfManagedActiveDirectoryConfiguration' :: Text
userName = Text
a} :: SelfManagedActiveDirectoryConfiguration)

-- | The password for the service account on your self-managed AD domain that
-- Amazon FSx will use to join to your AD domain.
selfManagedActiveDirectoryConfiguration_password :: Lens.Lens' SelfManagedActiveDirectoryConfiguration Prelude.Text
selfManagedActiveDirectoryConfiguration_password :: Lens' SelfManagedActiveDirectoryConfiguration Text
selfManagedActiveDirectoryConfiguration_password = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SelfManagedActiveDirectoryConfiguration' {Sensitive Text
password :: Sensitive Text
$sel:password:SelfManagedActiveDirectoryConfiguration' :: SelfManagedActiveDirectoryConfiguration -> Sensitive Text
password} -> Sensitive Text
password) (\s :: SelfManagedActiveDirectoryConfiguration
s@SelfManagedActiveDirectoryConfiguration' {} Sensitive Text
a -> SelfManagedActiveDirectoryConfiguration
s {$sel:password:SelfManagedActiveDirectoryConfiguration' :: Sensitive Text
password = Sensitive Text
a} :: SelfManagedActiveDirectoryConfiguration) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a. Iso' (Sensitive a) a
Data._Sensitive

-- | A list of up to three IP addresses of DNS servers or domain controllers
-- in the self-managed AD directory.
selfManagedActiveDirectoryConfiguration_dnsIps :: Lens.Lens' SelfManagedActiveDirectoryConfiguration (Prelude.NonEmpty Prelude.Text)
selfManagedActiveDirectoryConfiguration_dnsIps :: Lens' SelfManagedActiveDirectoryConfiguration (NonEmpty Text)
selfManagedActiveDirectoryConfiguration_dnsIps = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SelfManagedActiveDirectoryConfiguration' {NonEmpty Text
dnsIps :: NonEmpty Text
$sel:dnsIps:SelfManagedActiveDirectoryConfiguration' :: SelfManagedActiveDirectoryConfiguration -> NonEmpty Text
dnsIps} -> NonEmpty Text
dnsIps) (\s :: SelfManagedActiveDirectoryConfiguration
s@SelfManagedActiveDirectoryConfiguration' {} NonEmpty Text
a -> SelfManagedActiveDirectoryConfiguration
s {$sel:dnsIps:SelfManagedActiveDirectoryConfiguration' :: NonEmpty Text
dnsIps = NonEmpty Text
a} :: SelfManagedActiveDirectoryConfiguration) 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

instance
  Prelude.Hashable
    SelfManagedActiveDirectoryConfiguration
  where
  hashWithSalt :: Int -> SelfManagedActiveDirectoryConfiguration -> Int
hashWithSalt
    Int
_salt
    SelfManagedActiveDirectoryConfiguration' {Maybe Text
NonEmpty Text
Text
Sensitive Text
dnsIps :: NonEmpty Text
password :: Sensitive Text
userName :: Text
domainName :: Text
organizationalUnitDistinguishedName :: Maybe Text
fileSystemAdministratorsGroup :: Maybe Text
$sel:dnsIps:SelfManagedActiveDirectoryConfiguration' :: SelfManagedActiveDirectoryConfiguration -> NonEmpty Text
$sel:password:SelfManagedActiveDirectoryConfiguration' :: SelfManagedActiveDirectoryConfiguration -> Sensitive Text
$sel:userName:SelfManagedActiveDirectoryConfiguration' :: SelfManagedActiveDirectoryConfiguration -> Text
$sel:domainName:SelfManagedActiveDirectoryConfiguration' :: SelfManagedActiveDirectoryConfiguration -> Text
$sel:organizationalUnitDistinguishedName:SelfManagedActiveDirectoryConfiguration' :: SelfManagedActiveDirectoryConfiguration -> Maybe Text
$sel:fileSystemAdministratorsGroup:SelfManagedActiveDirectoryConfiguration' :: SelfManagedActiveDirectoryConfiguration -> Maybe Text
..} =
      Int
_salt
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
fileSystemAdministratorsGroup
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
organizationalUnitDistinguishedName
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
domainName
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
userName
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Sensitive Text
password
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` NonEmpty Text
dnsIps

instance
  Prelude.NFData
    SelfManagedActiveDirectoryConfiguration
  where
  rnf :: SelfManagedActiveDirectoryConfiguration -> ()
rnf SelfManagedActiveDirectoryConfiguration' {Maybe Text
NonEmpty Text
Text
Sensitive Text
dnsIps :: NonEmpty Text
password :: Sensitive Text
userName :: Text
domainName :: Text
organizationalUnitDistinguishedName :: Maybe Text
fileSystemAdministratorsGroup :: Maybe Text
$sel:dnsIps:SelfManagedActiveDirectoryConfiguration' :: SelfManagedActiveDirectoryConfiguration -> NonEmpty Text
$sel:password:SelfManagedActiveDirectoryConfiguration' :: SelfManagedActiveDirectoryConfiguration -> Sensitive Text
$sel:userName:SelfManagedActiveDirectoryConfiguration' :: SelfManagedActiveDirectoryConfiguration -> Text
$sel:domainName:SelfManagedActiveDirectoryConfiguration' :: SelfManagedActiveDirectoryConfiguration -> Text
$sel:organizationalUnitDistinguishedName:SelfManagedActiveDirectoryConfiguration' :: SelfManagedActiveDirectoryConfiguration -> Maybe Text
$sel:fileSystemAdministratorsGroup:SelfManagedActiveDirectoryConfiguration' :: SelfManagedActiveDirectoryConfiguration -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
fileSystemAdministratorsGroup
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
organizationalUnitDistinguishedName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
domainName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
userName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Sensitive Text
password
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf NonEmpty Text
dnsIps

instance
  Data.ToJSON
    SelfManagedActiveDirectoryConfiguration
  where
  toJSON :: SelfManagedActiveDirectoryConfiguration -> Value
toJSON SelfManagedActiveDirectoryConfiguration' {Maybe Text
NonEmpty Text
Text
Sensitive Text
dnsIps :: NonEmpty Text
password :: Sensitive Text
userName :: Text
domainName :: Text
organizationalUnitDistinguishedName :: Maybe Text
fileSystemAdministratorsGroup :: Maybe Text
$sel:dnsIps:SelfManagedActiveDirectoryConfiguration' :: SelfManagedActiveDirectoryConfiguration -> NonEmpty Text
$sel:password:SelfManagedActiveDirectoryConfiguration' :: SelfManagedActiveDirectoryConfiguration -> Sensitive Text
$sel:userName:SelfManagedActiveDirectoryConfiguration' :: SelfManagedActiveDirectoryConfiguration -> Text
$sel:domainName:SelfManagedActiveDirectoryConfiguration' :: SelfManagedActiveDirectoryConfiguration -> Text
$sel:organizationalUnitDistinguishedName:SelfManagedActiveDirectoryConfiguration' :: SelfManagedActiveDirectoryConfiguration -> Maybe Text
$sel:fileSystemAdministratorsGroup:SelfManagedActiveDirectoryConfiguration' :: SelfManagedActiveDirectoryConfiguration -> Maybe Text
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"FileSystemAdministratorsGroup" 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
fileSystemAdministratorsGroup,
            (Key
"OrganizationalUnitDistinguishedName" 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
organizationalUnitDistinguishedName,
            forall a. a -> Maybe a
Prelude.Just (Key
"DomainName" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
domainName),
            forall a. a -> Maybe a
Prelude.Just (Key
"UserName" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
userName),
            forall a. a -> Maybe a
Prelude.Just (Key
"Password" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Sensitive Text
password),
            forall a. a -> Maybe a
Prelude.Just (Key
"DnsIps" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= NonEmpty Text
dnsIps)
          ]
      )