{-# 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 #-}
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
data MongoDbSettings = MongoDbSettings'
{
MongoDbSettings -> Maybe Text
serverName :: Prelude.Maybe Prelude.Text,
MongoDbSettings -> Maybe Text
secretsManagerAccessRoleArn :: Prelude.Maybe Prelude.Text,
MongoDbSettings -> Maybe AuthMechanismValue
authMechanism :: Prelude.Maybe AuthMechanismValue,
MongoDbSettings -> Maybe Text
username :: Prelude.Maybe Prelude.Text,
MongoDbSettings -> Maybe Text
kmsKeyId :: Prelude.Maybe Prelude.Text,
MongoDbSettings -> Maybe (Sensitive Text)
password :: Prelude.Maybe (Core.Sensitive Prelude.Text),
MongoDbSettings -> Maybe NestingLevelValue
nestingLevel :: Prelude.Maybe NestingLevelValue,
MongoDbSettings -> Maybe Text
databaseName :: Prelude.Maybe Prelude.Text,
MongoDbSettings -> Maybe Text
docsToInvestigate :: Prelude.Maybe Prelude.Text,
MongoDbSettings -> Maybe Text
authSource :: Prelude.Maybe Prelude.Text,
MongoDbSettings -> Maybe Text
secretsManagerSecretId :: Prelude.Maybe Prelude.Text,
:: Prelude.Maybe Prelude.Text,
MongoDbSettings -> Maybe AuthTypeValue
authType :: Prelude.Maybe AuthTypeValue,
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)
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
}
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)
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)
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)
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)
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)
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
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)
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)
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)
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)
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)
mongoDbSettings_extractDocId :: Lens.Lens' MongoDbSettings (Prelude.Maybe Prelude.Text)
= (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)
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)
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
]
)