{-# 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.DMS.Types.MongoDbSettings
-- 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)
module Amazonka.DMS.Types.MongoDbSettings where

import qualified Amazonka.Core as Core
import Amazonka.DMS.Types.AuthMechanismValue
import Amazonka.DMS.Types.AuthTypeValue
import Amazonka.DMS.Types.NestingLevelValue
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Provides information that defines a MongoDB endpoint.
--
-- /See:/ 'newMongoDbSettings' smart constructor.
data MongoDbSettings = MongoDbSettings'
  { -- | The name of the server on the MongoDB source endpoint.
    MongoDbSettings -> Maybe Text
serverName :: Prelude.Maybe Prelude.Text,
    -- | The full Amazon Resource Name (ARN) of the IAM role that specifies DMS
    -- as the trusted entity and grants the required permissions to access the
    -- value in @SecretsManagerSecret@. The role must allow the @iam:PassRole@
    -- action. @SecretsManagerSecret@ has the value of the Amazon Web Services
    -- Secrets Manager secret that allows access to the MongoDB endpoint.
    --
    -- You can specify one of two sets of values for these permissions. You can
    -- specify the values for this setting and @SecretsManagerSecretId@. Or you
    -- can specify clear-text values for @UserName@, @Password@, @ServerName@,
    -- and @Port@. You can\'t specify both. For more information on creating
    -- this @SecretsManagerSecret@ and the @SecretsManagerAccessRoleArn@ and
    -- @SecretsManagerSecretId@ required to access it, see
    -- <https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Security.html#security-iam-secretsmanager Using secrets to access Database Migration Service resources>
    -- in the /Database Migration Service User Guide/.
    MongoDbSettings -> Maybe Text
secretsManagerAccessRoleArn :: Prelude.Maybe Prelude.Text,
    -- | The authentication mechanism you use to access the MongoDB source
    -- endpoint.
    --
    -- For the default value, in MongoDB version 2.x, @\"default\"@ is
    -- @\"mongodb_cr\"@. For MongoDB version 3.x or later, @\"default\"@ is
    -- @\"scram_sha_1\"@. This setting isn\'t used when @AuthType@ is set to
    -- @\"no\"@.
    MongoDbSettings -> Maybe AuthMechanismValue
authMechanism :: Prelude.Maybe AuthMechanismValue,
    -- | The user name you use to access the MongoDB source endpoint.
    MongoDbSettings -> Maybe Text
username :: Prelude.Maybe Prelude.Text,
    -- | The KMS key identifier that is used to encrypt the content on the
    -- replication instance. If you don\'t specify a value for the @KmsKeyId@
    -- parameter, then DMS uses your default encryption key. KMS creates the
    -- default encryption key for your Amazon Web Services account. Your Amazon
    -- Web Services account has a different default encryption key for each
    -- Amazon Web Services Region.
    MongoDbSettings -> Maybe Text
kmsKeyId :: Prelude.Maybe Prelude.Text,
    -- | The password for the user account you use to access the MongoDB source
    -- endpoint.
    MongoDbSettings -> Maybe (Sensitive Text)
password :: Prelude.Maybe (Core.Sensitive Prelude.Text),
    -- | Specifies either document or table mode.
    --
    -- Default value is @\"none\"@. Specify @\"none\"@ to use document mode.
    -- Specify @\"one\"@ to use table mode.
    MongoDbSettings -> Maybe NestingLevelValue
nestingLevel :: Prelude.Maybe NestingLevelValue,
    -- | The database name on the MongoDB source endpoint.
    MongoDbSettings -> Maybe Text
databaseName :: Prelude.Maybe Prelude.Text,
    -- | Indicates the number of documents to preview to determine the document
    -- organization. Use this setting when @NestingLevel@ is set to @\"one\"@.
    --
    -- Must be a positive value greater than @0@. Default value is @1000@.
    MongoDbSettings -> Maybe Text
docsToInvestigate :: Prelude.Maybe Prelude.Text,
    -- | The MongoDB database name. This setting isn\'t used when @AuthType@ is
    -- set to @\"no\"@.
    --
    -- The default is @\"admin\"@.
    MongoDbSettings -> Maybe Text
authSource :: Prelude.Maybe Prelude.Text,
    -- | The full ARN, partial ARN, or friendly name of the
    -- @SecretsManagerSecret@ that contains the MongoDB endpoint connection
    -- details.
    MongoDbSettings -> Maybe Text
secretsManagerSecretId :: Prelude.Maybe Prelude.Text,
    -- | Specifies the document ID. Use this setting when @NestingLevel@ is set
    -- to @\"none\"@.
    --
    -- Default value is @\"false\"@.
    MongoDbSettings -> Maybe Text
extractDocId :: Prelude.Maybe Prelude.Text,
    -- | The authentication type you use to access the MongoDB source endpoint.
    --
    -- When when set to @\"no\"@, user name and password parameters are not
    -- used and can be empty.
    MongoDbSettings -> Maybe AuthTypeValue
authType :: Prelude.Maybe AuthTypeValue,
    -- | The port value for the MongoDB source endpoint.
    MongoDbSettings -> Maybe Int
port :: Prelude.Maybe Prelude.Int
  }
  deriving (MongoDbSettings -> MongoDbSettings -> Bool
(MongoDbSettings -> MongoDbSettings -> Bool)
-> (MongoDbSettings -> MongoDbSettings -> Bool)
-> Eq MongoDbSettings
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: MongoDbSettings -> MongoDbSettings -> Bool
$c/= :: MongoDbSettings -> MongoDbSettings -> Bool
== :: MongoDbSettings -> MongoDbSettings -> Bool
$c== :: MongoDbSettings -> MongoDbSettings -> Bool
Prelude.Eq, Int -> MongoDbSettings -> ShowS
[MongoDbSettings] -> ShowS
MongoDbSettings -> String
(Int -> MongoDbSettings -> ShowS)
-> (MongoDbSettings -> String)
-> ([MongoDbSettings] -> ShowS)
-> Show MongoDbSettings
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [MongoDbSettings] -> ShowS
$cshowList :: [MongoDbSettings] -> ShowS
show :: MongoDbSettings -> String
$cshow :: MongoDbSettings -> String
showsPrec :: Int -> MongoDbSettings -> ShowS
$cshowsPrec :: Int -> MongoDbSettings -> ShowS
Prelude.Show, (forall x. MongoDbSettings -> Rep MongoDbSettings x)
-> (forall x. Rep MongoDbSettings x -> MongoDbSettings)
-> Generic MongoDbSettings
forall x. Rep MongoDbSettings x -> MongoDbSettings
forall x. MongoDbSettings -> Rep MongoDbSettings x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep MongoDbSettings x -> MongoDbSettings
$cfrom :: forall x. MongoDbSettings -> Rep MongoDbSettings x
Prelude.Generic)

-- |
-- Create a value of 'MongoDbSettings' 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:
--
-- 'serverName', 'mongoDbSettings_serverName' - The name of the server on the MongoDB source endpoint.
--
-- 'secretsManagerAccessRoleArn', 'mongoDbSettings_secretsManagerAccessRoleArn' - The full Amazon Resource Name (ARN) of the IAM role that specifies DMS
-- as the trusted entity and grants the required permissions to access the
-- value in @SecretsManagerSecret@. The role must allow the @iam:PassRole@
-- action. @SecretsManagerSecret@ has the value of the Amazon Web Services
-- Secrets Manager secret that allows access to the MongoDB endpoint.
--
-- You can specify one of two sets of values for these permissions. You can
-- specify the values for this setting and @SecretsManagerSecretId@. Or you
-- can specify clear-text values for @UserName@, @Password@, @ServerName@,
-- and @Port@. You can\'t specify both. For more information on creating
-- this @SecretsManagerSecret@ and the @SecretsManagerAccessRoleArn@ and
-- @SecretsManagerSecretId@ required to access it, see
-- <https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Security.html#security-iam-secretsmanager Using secrets to access Database Migration Service resources>
-- in the /Database Migration Service User Guide/.
--
-- 'authMechanism', 'mongoDbSettings_authMechanism' - The authentication mechanism you use to access the MongoDB source
-- endpoint.
--
-- For the default value, in MongoDB version 2.x, @\"default\"@ is
-- @\"mongodb_cr\"@. For MongoDB version 3.x or later, @\"default\"@ is
-- @\"scram_sha_1\"@. This setting isn\'t used when @AuthType@ is set to
-- @\"no\"@.
--
-- 'username', 'mongoDbSettings_username' - The user name you use to access the MongoDB source endpoint.
--
-- 'kmsKeyId', 'mongoDbSettings_kmsKeyId' - The KMS key identifier that is used to encrypt the content on the
-- replication instance. If you don\'t specify a value for the @KmsKeyId@
-- parameter, then DMS uses your default encryption key. KMS creates the
-- default encryption key for your Amazon Web Services account. Your Amazon
-- Web Services account has a different default encryption key for each
-- Amazon Web Services Region.
--
-- 'password', 'mongoDbSettings_password' - The password for the user account you use to access the MongoDB source
-- endpoint.
--
-- 'nestingLevel', 'mongoDbSettings_nestingLevel' - Specifies either document or table mode.
--
-- Default value is @\"none\"@. Specify @\"none\"@ to use document mode.
-- Specify @\"one\"@ to use table mode.
--
-- 'databaseName', 'mongoDbSettings_databaseName' - The database name on the MongoDB source endpoint.
--
-- 'docsToInvestigate', 'mongoDbSettings_docsToInvestigate' - Indicates the number of documents to preview to determine the document
-- organization. Use this setting when @NestingLevel@ is set to @\"one\"@.
--
-- Must be a positive value greater than @0@. Default value is @1000@.
--
-- 'authSource', 'mongoDbSettings_authSource' - The MongoDB database name. This setting isn\'t used when @AuthType@ is
-- set to @\"no\"@.
--
-- The default is @\"admin\"@.
--
-- 'secretsManagerSecretId', 'mongoDbSettings_secretsManagerSecretId' - The full ARN, partial ARN, or friendly name of the
-- @SecretsManagerSecret@ that contains the MongoDB endpoint connection
-- details.
--
-- 'extractDocId', 'mongoDbSettings_extractDocId' - Specifies the document ID. Use this setting when @NestingLevel@ is set
-- to @\"none\"@.
--
-- Default value is @\"false\"@.
--
-- 'authType', 'mongoDbSettings_authType' - The authentication type you use to access the MongoDB source endpoint.
--
-- When when set to @\"no\"@, user name and password parameters are not
-- used and can be empty.
--
-- 'port', 'mongoDbSettings_port' - The port value for the MongoDB source endpoint.
newMongoDbSettings ::
  MongoDbSettings
newMongoDbSettings :: MongoDbSettings
newMongoDbSettings =
  MongoDbSettings' :: Maybe Text
-> Maybe Text
-> Maybe AuthMechanismValue
-> Maybe Text
-> Maybe Text
-> Maybe (Sensitive Text)
-> Maybe NestingLevelValue
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AuthTypeValue
-> Maybe Int
-> MongoDbSettings
MongoDbSettings'
    { $sel:serverName:MongoDbSettings' :: Maybe Text
serverName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:secretsManagerAccessRoleArn:MongoDbSettings' :: Maybe Text
secretsManagerAccessRoleArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:authMechanism:MongoDbSettings' :: Maybe AuthMechanismValue
authMechanism = Maybe AuthMechanismValue
forall a. Maybe a
Prelude.Nothing,
      $sel:username:MongoDbSettings' :: Maybe Text
username = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:kmsKeyId:MongoDbSettings' :: Maybe Text
kmsKeyId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:password:MongoDbSettings' :: Maybe (Sensitive Text)
password = Maybe (Sensitive Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:nestingLevel:MongoDbSettings' :: Maybe NestingLevelValue
nestingLevel = Maybe NestingLevelValue
forall a. Maybe a
Prelude.Nothing,
      $sel:databaseName:MongoDbSettings' :: Maybe Text
databaseName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:docsToInvestigate:MongoDbSettings' :: Maybe Text
docsToInvestigate = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:authSource:MongoDbSettings' :: Maybe Text
authSource = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:secretsManagerSecretId:MongoDbSettings' :: Maybe Text
secretsManagerSecretId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:extractDocId:MongoDbSettings' :: Maybe Text
extractDocId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:authType:MongoDbSettings' :: Maybe AuthTypeValue
authType = Maybe AuthTypeValue
forall a. Maybe a
Prelude.Nothing,
      $sel:port:MongoDbSettings' :: Maybe Int
port = Maybe Int
forall a. Maybe a
Prelude.Nothing
    }

-- | The name of the server on the MongoDB source endpoint.
mongoDbSettings_serverName :: Lens.Lens' MongoDbSettings (Prelude.Maybe Prelude.Text)
mongoDbSettings_serverName :: (Maybe Text -> f (Maybe Text))
-> MongoDbSettings -> f MongoDbSettings
mongoDbSettings_serverName = (MongoDbSettings -> Maybe Text)
-> (MongoDbSettings -> Maybe Text -> MongoDbSettings)
-> Lens MongoDbSettings MongoDbSettings (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MongoDbSettings' {Maybe Text
serverName :: Maybe Text
$sel:serverName:MongoDbSettings' :: MongoDbSettings -> Maybe Text
serverName} -> Maybe Text
serverName) (\s :: MongoDbSettings
s@MongoDbSettings' {} Maybe Text
a -> MongoDbSettings
s {$sel:serverName:MongoDbSettings' :: Maybe Text
serverName = Maybe Text
a} :: MongoDbSettings)

-- | The full Amazon Resource Name (ARN) of the IAM role that specifies DMS
-- as the trusted entity and grants the required permissions to access the
-- value in @SecretsManagerSecret@. The role must allow the @iam:PassRole@
-- action. @SecretsManagerSecret@ has the value of the Amazon Web Services
-- Secrets Manager secret that allows access to the MongoDB endpoint.
--
-- You can specify one of two sets of values for these permissions. You can
-- specify the values for this setting and @SecretsManagerSecretId@. Or you
-- can specify clear-text values for @UserName@, @Password@, @ServerName@,
-- and @Port@. You can\'t specify both. For more information on creating
-- this @SecretsManagerSecret@ and the @SecretsManagerAccessRoleArn@ and
-- @SecretsManagerSecretId@ required to access it, see
-- <https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Security.html#security-iam-secretsmanager Using secrets to access Database Migration Service resources>
-- in the /Database Migration Service User Guide/.
mongoDbSettings_secretsManagerAccessRoleArn :: Lens.Lens' MongoDbSettings (Prelude.Maybe Prelude.Text)
mongoDbSettings_secretsManagerAccessRoleArn :: (Maybe Text -> f (Maybe Text))
-> MongoDbSettings -> f MongoDbSettings
mongoDbSettings_secretsManagerAccessRoleArn = (MongoDbSettings -> Maybe Text)
-> (MongoDbSettings -> Maybe Text -> MongoDbSettings)
-> Lens MongoDbSettings MongoDbSettings (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MongoDbSettings' {Maybe Text
secretsManagerAccessRoleArn :: Maybe Text
$sel:secretsManagerAccessRoleArn:MongoDbSettings' :: MongoDbSettings -> Maybe Text
secretsManagerAccessRoleArn} -> Maybe Text
secretsManagerAccessRoleArn) (\s :: MongoDbSettings
s@MongoDbSettings' {} Maybe Text
a -> MongoDbSettings
s {$sel:secretsManagerAccessRoleArn:MongoDbSettings' :: Maybe Text
secretsManagerAccessRoleArn = Maybe Text
a} :: MongoDbSettings)

-- | The authentication mechanism you use to access the MongoDB source
-- endpoint.
--
-- For the default value, in MongoDB version 2.x, @\"default\"@ is
-- @\"mongodb_cr\"@. For MongoDB version 3.x or later, @\"default\"@ is
-- @\"scram_sha_1\"@. This setting isn\'t used when @AuthType@ is set to
-- @\"no\"@.
mongoDbSettings_authMechanism :: Lens.Lens' MongoDbSettings (Prelude.Maybe AuthMechanismValue)
mongoDbSettings_authMechanism :: (Maybe AuthMechanismValue -> f (Maybe AuthMechanismValue))
-> MongoDbSettings -> f MongoDbSettings
mongoDbSettings_authMechanism = (MongoDbSettings -> Maybe AuthMechanismValue)
-> (MongoDbSettings -> Maybe AuthMechanismValue -> MongoDbSettings)
-> Lens
     MongoDbSettings
     MongoDbSettings
     (Maybe AuthMechanismValue)
     (Maybe AuthMechanismValue)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MongoDbSettings' {Maybe AuthMechanismValue
authMechanism :: Maybe AuthMechanismValue
$sel:authMechanism:MongoDbSettings' :: MongoDbSettings -> Maybe AuthMechanismValue
authMechanism} -> Maybe AuthMechanismValue
authMechanism) (\s :: MongoDbSettings
s@MongoDbSettings' {} Maybe AuthMechanismValue
a -> MongoDbSettings
s {$sel:authMechanism:MongoDbSettings' :: Maybe AuthMechanismValue
authMechanism = Maybe AuthMechanismValue
a} :: MongoDbSettings)

-- | The user name you use to access the MongoDB source endpoint.
mongoDbSettings_username :: Lens.Lens' MongoDbSettings (Prelude.Maybe Prelude.Text)
mongoDbSettings_username :: (Maybe Text -> f (Maybe Text))
-> MongoDbSettings -> f MongoDbSettings
mongoDbSettings_username = (MongoDbSettings -> Maybe Text)
-> (MongoDbSettings -> Maybe Text -> MongoDbSettings)
-> Lens MongoDbSettings MongoDbSettings (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MongoDbSettings' {Maybe Text
username :: Maybe Text
$sel:username:MongoDbSettings' :: MongoDbSettings -> Maybe Text
username} -> Maybe Text
username) (\s :: MongoDbSettings
s@MongoDbSettings' {} Maybe Text
a -> MongoDbSettings
s {$sel:username:MongoDbSettings' :: Maybe Text
username = Maybe Text
a} :: MongoDbSettings)

-- | The KMS key identifier that is used to encrypt the content on the
-- replication instance. If you don\'t specify a value for the @KmsKeyId@
-- parameter, then DMS uses your default encryption key. KMS creates the
-- default encryption key for your Amazon Web Services account. Your Amazon
-- Web Services account has a different default encryption key for each
-- Amazon Web Services Region.
mongoDbSettings_kmsKeyId :: Lens.Lens' MongoDbSettings (Prelude.Maybe Prelude.Text)
mongoDbSettings_kmsKeyId :: (Maybe Text -> f (Maybe Text))
-> MongoDbSettings -> f MongoDbSettings
mongoDbSettings_kmsKeyId = (MongoDbSettings -> Maybe Text)
-> (MongoDbSettings -> Maybe Text -> MongoDbSettings)
-> Lens MongoDbSettings MongoDbSettings (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MongoDbSettings' {Maybe Text
kmsKeyId :: Maybe Text
$sel:kmsKeyId:MongoDbSettings' :: MongoDbSettings -> Maybe Text
kmsKeyId} -> Maybe Text
kmsKeyId) (\s :: MongoDbSettings
s@MongoDbSettings' {} Maybe Text
a -> MongoDbSettings
s {$sel:kmsKeyId:MongoDbSettings' :: Maybe Text
kmsKeyId = Maybe Text
a} :: MongoDbSettings)

-- | The password for the user account you use to access the MongoDB source
-- endpoint.
mongoDbSettings_password :: Lens.Lens' MongoDbSettings (Prelude.Maybe Prelude.Text)
mongoDbSettings_password :: (Maybe Text -> f (Maybe Text))
-> MongoDbSettings -> f MongoDbSettings
mongoDbSettings_password = (MongoDbSettings -> Maybe (Sensitive Text))
-> (MongoDbSettings -> Maybe (Sensitive Text) -> MongoDbSettings)
-> Lens
     MongoDbSettings
     MongoDbSettings
     (Maybe (Sensitive Text))
     (Maybe (Sensitive Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MongoDbSettings' {Maybe (Sensitive Text)
password :: Maybe (Sensitive Text)
$sel:password:MongoDbSettings' :: MongoDbSettings -> Maybe (Sensitive Text)
password} -> Maybe (Sensitive Text)
password) (\s :: MongoDbSettings
s@MongoDbSettings' {} Maybe (Sensitive Text)
a -> MongoDbSettings
s {$sel:password:MongoDbSettings' :: Maybe (Sensitive Text)
password = Maybe (Sensitive Text)
a} :: MongoDbSettings) ((Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
 -> MongoDbSettings -> f MongoDbSettings)
-> ((Maybe Text -> f (Maybe Text))
    -> Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> (Maybe Text -> f (Maybe Text))
-> MongoDbSettings
-> f MongoDbSettings
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso (Sensitive Text) (Sensitive Text) Text Text
-> Iso
     (Maybe (Sensitive Text))
     (Maybe (Sensitive Text))
     (Maybe Text)
     (Maybe Text)
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 (Sensitive Text) (Sensitive Text) Text Text
forall a. Iso' (Sensitive a) a
Core._Sensitive

-- | Specifies either document or table mode.
--
-- Default value is @\"none\"@. Specify @\"none\"@ to use document mode.
-- Specify @\"one\"@ to use table mode.
mongoDbSettings_nestingLevel :: Lens.Lens' MongoDbSettings (Prelude.Maybe NestingLevelValue)
mongoDbSettings_nestingLevel :: (Maybe NestingLevelValue -> f (Maybe NestingLevelValue))
-> MongoDbSettings -> f MongoDbSettings
mongoDbSettings_nestingLevel = (MongoDbSettings -> Maybe NestingLevelValue)
-> (MongoDbSettings -> Maybe NestingLevelValue -> MongoDbSettings)
-> Lens
     MongoDbSettings
     MongoDbSettings
     (Maybe NestingLevelValue)
     (Maybe NestingLevelValue)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MongoDbSettings' {Maybe NestingLevelValue
nestingLevel :: Maybe NestingLevelValue
$sel:nestingLevel:MongoDbSettings' :: MongoDbSettings -> Maybe NestingLevelValue
nestingLevel} -> Maybe NestingLevelValue
nestingLevel) (\s :: MongoDbSettings
s@MongoDbSettings' {} Maybe NestingLevelValue
a -> MongoDbSettings
s {$sel:nestingLevel:MongoDbSettings' :: Maybe NestingLevelValue
nestingLevel = Maybe NestingLevelValue
a} :: MongoDbSettings)

-- | The database name on the MongoDB source endpoint.
mongoDbSettings_databaseName :: Lens.Lens' MongoDbSettings (Prelude.Maybe Prelude.Text)
mongoDbSettings_databaseName :: (Maybe Text -> f (Maybe Text))
-> MongoDbSettings -> f MongoDbSettings
mongoDbSettings_databaseName = (MongoDbSettings -> Maybe Text)
-> (MongoDbSettings -> Maybe Text -> MongoDbSettings)
-> Lens MongoDbSettings MongoDbSettings (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MongoDbSettings' {Maybe Text
databaseName :: Maybe Text
$sel:databaseName:MongoDbSettings' :: MongoDbSettings -> Maybe Text
databaseName} -> Maybe Text
databaseName) (\s :: MongoDbSettings
s@MongoDbSettings' {} Maybe Text
a -> MongoDbSettings
s {$sel:databaseName:MongoDbSettings' :: Maybe Text
databaseName = Maybe Text
a} :: MongoDbSettings)

-- | Indicates the number of documents to preview to determine the document
-- organization. Use this setting when @NestingLevel@ is set to @\"one\"@.
--
-- Must be a positive value greater than @0@. Default value is @1000@.
mongoDbSettings_docsToInvestigate :: Lens.Lens' MongoDbSettings (Prelude.Maybe Prelude.Text)
mongoDbSettings_docsToInvestigate :: (Maybe Text -> f (Maybe Text))
-> MongoDbSettings -> f MongoDbSettings
mongoDbSettings_docsToInvestigate = (MongoDbSettings -> Maybe Text)
-> (MongoDbSettings -> Maybe Text -> MongoDbSettings)
-> Lens MongoDbSettings MongoDbSettings (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MongoDbSettings' {Maybe Text
docsToInvestigate :: Maybe Text
$sel:docsToInvestigate:MongoDbSettings' :: MongoDbSettings -> Maybe Text
docsToInvestigate} -> Maybe Text
docsToInvestigate) (\s :: MongoDbSettings
s@MongoDbSettings' {} Maybe Text
a -> MongoDbSettings
s {$sel:docsToInvestigate:MongoDbSettings' :: Maybe Text
docsToInvestigate = Maybe Text
a} :: MongoDbSettings)

-- | The MongoDB database name. This setting isn\'t used when @AuthType@ is
-- set to @\"no\"@.
--
-- The default is @\"admin\"@.
mongoDbSettings_authSource :: Lens.Lens' MongoDbSettings (Prelude.Maybe Prelude.Text)
mongoDbSettings_authSource :: (Maybe Text -> f (Maybe Text))
-> MongoDbSettings -> f MongoDbSettings
mongoDbSettings_authSource = (MongoDbSettings -> Maybe Text)
-> (MongoDbSettings -> Maybe Text -> MongoDbSettings)
-> Lens MongoDbSettings MongoDbSettings (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MongoDbSettings' {Maybe Text
authSource :: Maybe Text
$sel:authSource:MongoDbSettings' :: MongoDbSettings -> Maybe Text
authSource} -> Maybe Text
authSource) (\s :: MongoDbSettings
s@MongoDbSettings' {} Maybe Text
a -> MongoDbSettings
s {$sel:authSource:MongoDbSettings' :: Maybe Text
authSource = Maybe Text
a} :: MongoDbSettings)

-- | The full ARN, partial ARN, or friendly name of the
-- @SecretsManagerSecret@ that contains the MongoDB endpoint connection
-- details.
mongoDbSettings_secretsManagerSecretId :: Lens.Lens' MongoDbSettings (Prelude.Maybe Prelude.Text)
mongoDbSettings_secretsManagerSecretId :: (Maybe Text -> f (Maybe Text))
-> MongoDbSettings -> f MongoDbSettings
mongoDbSettings_secretsManagerSecretId = (MongoDbSettings -> Maybe Text)
-> (MongoDbSettings -> Maybe Text -> MongoDbSettings)
-> Lens MongoDbSettings MongoDbSettings (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MongoDbSettings' {Maybe Text
secretsManagerSecretId :: Maybe Text
$sel:secretsManagerSecretId:MongoDbSettings' :: MongoDbSettings -> Maybe Text
secretsManagerSecretId} -> Maybe Text
secretsManagerSecretId) (\s :: MongoDbSettings
s@MongoDbSettings' {} Maybe Text
a -> MongoDbSettings
s {$sel:secretsManagerSecretId:MongoDbSettings' :: Maybe Text
secretsManagerSecretId = Maybe Text
a} :: MongoDbSettings)

-- | Specifies the document ID. Use this setting when @NestingLevel@ is set
-- to @\"none\"@.
--
-- Default value is @\"false\"@.
mongoDbSettings_extractDocId :: Lens.Lens' MongoDbSettings (Prelude.Maybe Prelude.Text)
mongoDbSettings_extractDocId :: (Maybe Text -> f (Maybe Text))
-> MongoDbSettings -> f MongoDbSettings
mongoDbSettings_extractDocId = (MongoDbSettings -> Maybe Text)
-> (MongoDbSettings -> Maybe Text -> MongoDbSettings)
-> Lens MongoDbSettings MongoDbSettings (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MongoDbSettings' {Maybe Text
extractDocId :: Maybe Text
$sel:extractDocId:MongoDbSettings' :: MongoDbSettings -> Maybe Text
extractDocId} -> Maybe Text
extractDocId) (\s :: MongoDbSettings
s@MongoDbSettings' {} Maybe Text
a -> MongoDbSettings
s {$sel:extractDocId:MongoDbSettings' :: Maybe Text
extractDocId = Maybe Text
a} :: MongoDbSettings)

-- | The authentication type you use to access the MongoDB source endpoint.
--
-- When when set to @\"no\"@, user name and password parameters are not
-- used and can be empty.
mongoDbSettings_authType :: Lens.Lens' MongoDbSettings (Prelude.Maybe AuthTypeValue)
mongoDbSettings_authType :: (Maybe AuthTypeValue -> f (Maybe AuthTypeValue))
-> MongoDbSettings -> f MongoDbSettings
mongoDbSettings_authType = (MongoDbSettings -> Maybe AuthTypeValue)
-> (MongoDbSettings -> Maybe AuthTypeValue -> MongoDbSettings)
-> Lens
     MongoDbSettings
     MongoDbSettings
     (Maybe AuthTypeValue)
     (Maybe AuthTypeValue)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MongoDbSettings' {Maybe AuthTypeValue
authType :: Maybe AuthTypeValue
$sel:authType:MongoDbSettings' :: MongoDbSettings -> Maybe AuthTypeValue
authType} -> Maybe AuthTypeValue
authType) (\s :: MongoDbSettings
s@MongoDbSettings' {} Maybe AuthTypeValue
a -> MongoDbSettings
s {$sel:authType:MongoDbSettings' :: Maybe AuthTypeValue
authType = Maybe AuthTypeValue
a} :: MongoDbSettings)

-- | The port value for the MongoDB source endpoint.
mongoDbSettings_port :: Lens.Lens' MongoDbSettings (Prelude.Maybe Prelude.Int)
mongoDbSettings_port :: (Maybe Int -> f (Maybe Int))
-> MongoDbSettings -> f MongoDbSettings
mongoDbSettings_port = (MongoDbSettings -> Maybe Int)
-> (MongoDbSettings -> Maybe Int -> MongoDbSettings)
-> Lens MongoDbSettings MongoDbSettings (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MongoDbSettings' {Maybe Int
port :: Maybe Int
$sel:port:MongoDbSettings' :: MongoDbSettings -> Maybe Int
port} -> Maybe Int
port) (\s :: MongoDbSettings
s@MongoDbSettings' {} Maybe Int
a -> MongoDbSettings
s {$sel:port:MongoDbSettings' :: Maybe Int
port = Maybe Int
a} :: MongoDbSettings)

instance Core.FromJSON MongoDbSettings where
  parseJSON :: Value -> Parser MongoDbSettings
parseJSON =
    String
-> (Object -> Parser MongoDbSettings)
-> Value
-> Parser MongoDbSettings
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"MongoDbSettings"
      ( \Object
x ->
          Maybe Text
-> Maybe Text
-> Maybe AuthMechanismValue
-> Maybe Text
-> Maybe Text
-> Maybe (Sensitive Text)
-> Maybe NestingLevelValue
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AuthTypeValue
-> Maybe Int
-> MongoDbSettings
MongoDbSettings'
            (Maybe Text
 -> Maybe Text
 -> Maybe AuthMechanismValue
 -> Maybe Text
 -> Maybe Text
 -> Maybe (Sensitive Text)
 -> Maybe NestingLevelValue
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe AuthTypeValue
 -> Maybe Int
 -> MongoDbSettings)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe AuthMechanismValue
      -> Maybe Text
      -> Maybe Text
      -> Maybe (Sensitive Text)
      -> Maybe NestingLevelValue
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe AuthTypeValue
      -> Maybe Int
      -> MongoDbSettings)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ServerName")
            Parser
  (Maybe Text
   -> Maybe AuthMechanismValue
   -> Maybe Text
   -> Maybe Text
   -> Maybe (Sensitive Text)
   -> Maybe NestingLevelValue
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe AuthTypeValue
   -> Maybe Int
   -> MongoDbSettings)
-> Parser (Maybe Text)
-> Parser
     (Maybe AuthMechanismValue
      -> Maybe Text
      -> Maybe Text
      -> Maybe (Sensitive Text)
      -> Maybe NestingLevelValue
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe AuthTypeValue
      -> Maybe Int
      -> MongoDbSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"SecretsManagerAccessRoleArn")
            Parser
  (Maybe AuthMechanismValue
   -> Maybe Text
   -> Maybe Text
   -> Maybe (Sensitive Text)
   -> Maybe NestingLevelValue
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe AuthTypeValue
   -> Maybe Int
   -> MongoDbSettings)
-> Parser (Maybe AuthMechanismValue)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe (Sensitive Text)
      -> Maybe NestingLevelValue
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe AuthTypeValue
      -> Maybe Int
      -> MongoDbSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe AuthMechanismValue)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"AuthMechanism")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe (Sensitive Text)
   -> Maybe NestingLevelValue
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe AuthTypeValue
   -> Maybe Int
   -> MongoDbSettings)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe (Sensitive Text)
      -> Maybe NestingLevelValue
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe AuthTypeValue
      -> Maybe Int
      -> MongoDbSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Username")
            Parser
  (Maybe Text
   -> Maybe (Sensitive Text)
   -> Maybe NestingLevelValue
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe AuthTypeValue
   -> Maybe Int
   -> MongoDbSettings)
-> Parser (Maybe Text)
-> Parser
     (Maybe (Sensitive Text)
      -> Maybe NestingLevelValue
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe AuthTypeValue
      -> Maybe Int
      -> MongoDbSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"KmsKeyId")
            Parser
  (Maybe (Sensitive Text)
   -> Maybe NestingLevelValue
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe AuthTypeValue
   -> Maybe Int
   -> MongoDbSettings)
-> Parser (Maybe (Sensitive Text))
-> Parser
     (Maybe NestingLevelValue
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe AuthTypeValue
      -> Maybe Int
      -> MongoDbSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Sensitive Text))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Password")
            Parser
  (Maybe NestingLevelValue
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe AuthTypeValue
   -> Maybe Int
   -> MongoDbSettings)
-> Parser (Maybe NestingLevelValue)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe AuthTypeValue
      -> Maybe Int
      -> MongoDbSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe NestingLevelValue)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"NestingLevel")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe AuthTypeValue
   -> Maybe Int
   -> MongoDbSettings)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe AuthTypeValue
      -> Maybe Int
      -> MongoDbSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"DatabaseName")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe AuthTypeValue
   -> Maybe Int
   -> MongoDbSettings)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe AuthTypeValue
      -> Maybe Int
      -> MongoDbSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"DocsToInvestigate")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe AuthTypeValue
   -> Maybe Int
   -> MongoDbSettings)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe AuthTypeValue
      -> Maybe Int
      -> MongoDbSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"AuthSource")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe AuthTypeValue
   -> Maybe Int
   -> MongoDbSettings)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text -> Maybe AuthTypeValue -> Maybe Int -> MongoDbSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"SecretsManagerSecretId")
            Parser
  (Maybe Text -> Maybe AuthTypeValue -> Maybe Int -> MongoDbSettings)
-> Parser (Maybe Text)
-> Parser (Maybe AuthTypeValue -> Maybe Int -> MongoDbSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ExtractDocId")
            Parser (Maybe AuthTypeValue -> Maybe Int -> MongoDbSettings)
-> Parser (Maybe AuthTypeValue)
-> Parser (Maybe Int -> MongoDbSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe AuthTypeValue)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"AuthType")
            Parser (Maybe Int -> MongoDbSettings)
-> Parser (Maybe Int) -> Parser MongoDbSettings
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Port")
      )

instance Prelude.Hashable MongoDbSettings

instance Prelude.NFData MongoDbSettings

instance Core.ToJSON MongoDbSettings where
  toJSON :: MongoDbSettings -> Value
toJSON MongoDbSettings' {Maybe Int
Maybe Text
Maybe (Sensitive Text)
Maybe AuthMechanismValue
Maybe AuthTypeValue
Maybe NestingLevelValue
port :: Maybe Int
authType :: Maybe AuthTypeValue
extractDocId :: Maybe Text
secretsManagerSecretId :: Maybe Text
authSource :: Maybe Text
docsToInvestigate :: Maybe Text
databaseName :: Maybe Text
nestingLevel :: Maybe NestingLevelValue
password :: Maybe (Sensitive Text)
kmsKeyId :: Maybe Text
username :: Maybe Text
authMechanism :: Maybe AuthMechanismValue
secretsManagerAccessRoleArn :: Maybe Text
serverName :: Maybe Text
$sel:port:MongoDbSettings' :: MongoDbSettings -> Maybe Int
$sel:authType:MongoDbSettings' :: MongoDbSettings -> Maybe AuthTypeValue
$sel:extractDocId:MongoDbSettings' :: MongoDbSettings -> Maybe Text
$sel:secretsManagerSecretId:MongoDbSettings' :: MongoDbSettings -> Maybe Text
$sel:authSource:MongoDbSettings' :: MongoDbSettings -> Maybe Text
$sel:docsToInvestigate:MongoDbSettings' :: MongoDbSettings -> Maybe Text
$sel:databaseName:MongoDbSettings' :: MongoDbSettings -> Maybe Text
$sel:nestingLevel:MongoDbSettings' :: MongoDbSettings -> Maybe NestingLevelValue
$sel:password:MongoDbSettings' :: MongoDbSettings -> Maybe (Sensitive Text)
$sel:kmsKeyId:MongoDbSettings' :: MongoDbSettings -> Maybe Text
$sel:username:MongoDbSettings' :: MongoDbSettings -> Maybe Text
$sel:authMechanism:MongoDbSettings' :: MongoDbSettings -> Maybe AuthMechanismValue
$sel:secretsManagerAccessRoleArn:MongoDbSettings' :: MongoDbSettings -> Maybe Text
$sel:serverName:MongoDbSettings' :: MongoDbSettings -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"ServerName" 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
serverName,
            (Text
"SecretsManagerAccessRoleArn" 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
secretsManagerAccessRoleArn,
            (Text
"AuthMechanism" Text -> AuthMechanismValue -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (AuthMechanismValue -> Pair)
-> Maybe AuthMechanismValue -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AuthMechanismValue
authMechanism,
            (Text
"Username" 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
username,
            (Text
"KmsKeyId" 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
kmsKeyId,
            (Text
"Password" Text -> Sensitive Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Sensitive Text -> Pair) -> Maybe (Sensitive Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Sensitive Text)
password,
            (Text
"NestingLevel" Text -> NestingLevelValue -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (NestingLevelValue -> Pair)
-> Maybe NestingLevelValue -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe NestingLevelValue
nestingLevel,
            (Text
"DatabaseName" 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
databaseName,
            (Text
"DocsToInvestigate" 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
docsToInvestigate,
            (Text
"AuthSource" 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
authSource,
            (Text
"SecretsManagerSecretId" 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
secretsManagerSecretId,
            (Text
"ExtractDocId" 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
extractDocId,
            (Text
"AuthType" Text -> AuthTypeValue -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (AuthTypeValue -> Pair) -> Maybe AuthTypeValue -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AuthTypeValue
authType,
            (Text
"Port" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Int -> Pair) -> Maybe Int -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
port
          ]
      )