{-# 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.DocDbSettings where
import qualified Amazonka.Core as Core
import Amazonka.DMS.Types.NestingLevelValue
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data DocDbSettings = DocDbSettings'
{
DocDbSettings -> Maybe Text
serverName :: Prelude.Maybe Prelude.Text,
DocDbSettings -> Maybe Text
secretsManagerAccessRoleArn :: Prelude.Maybe Prelude.Text,
DocDbSettings -> Maybe Text
username :: Prelude.Maybe Prelude.Text,
DocDbSettings -> Maybe Text
kmsKeyId :: Prelude.Maybe Prelude.Text,
DocDbSettings -> Maybe (Sensitive Text)
password :: Prelude.Maybe (Core.Sensitive Prelude.Text),
DocDbSettings -> Maybe NestingLevelValue
nestingLevel :: Prelude.Maybe NestingLevelValue,
DocDbSettings -> Maybe Text
databaseName :: Prelude.Maybe Prelude.Text,
DocDbSettings -> Maybe Int
docsToInvestigate :: Prelude.Maybe Prelude.Int,
DocDbSettings -> Maybe Text
secretsManagerSecretId :: Prelude.Maybe Prelude.Text,
:: Prelude.Maybe Prelude.Bool,
DocDbSettings -> Maybe Int
port :: Prelude.Maybe Prelude.Int
}
deriving (DocDbSettings -> DocDbSettings -> Bool
(DocDbSettings -> DocDbSettings -> Bool)
-> (DocDbSettings -> DocDbSettings -> Bool) -> Eq DocDbSettings
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DocDbSettings -> DocDbSettings -> Bool
$c/= :: DocDbSettings -> DocDbSettings -> Bool
== :: DocDbSettings -> DocDbSettings -> Bool
$c== :: DocDbSettings -> DocDbSettings -> Bool
Prelude.Eq, Int -> DocDbSettings -> ShowS
[DocDbSettings] -> ShowS
DocDbSettings -> String
(Int -> DocDbSettings -> ShowS)
-> (DocDbSettings -> String)
-> ([DocDbSettings] -> ShowS)
-> Show DocDbSettings
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DocDbSettings] -> ShowS
$cshowList :: [DocDbSettings] -> ShowS
show :: DocDbSettings -> String
$cshow :: DocDbSettings -> String
showsPrec :: Int -> DocDbSettings -> ShowS
$cshowsPrec :: Int -> DocDbSettings -> ShowS
Prelude.Show, (forall x. DocDbSettings -> Rep DocDbSettings x)
-> (forall x. Rep DocDbSettings x -> DocDbSettings)
-> Generic DocDbSettings
forall x. Rep DocDbSettings x -> DocDbSettings
forall x. DocDbSettings -> Rep DocDbSettings x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DocDbSettings x -> DocDbSettings
$cfrom :: forall x. DocDbSettings -> Rep DocDbSettings x
Prelude.Generic)
newDocDbSettings ::
DocDbSettings
newDocDbSettings :: DocDbSettings
newDocDbSettings =
DocDbSettings' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe (Sensitive Text)
-> Maybe NestingLevelValue
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Bool
-> Maybe Int
-> DocDbSettings
DocDbSettings'
{ $sel:serverName:DocDbSettings' :: Maybe Text
serverName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:secretsManagerAccessRoleArn:DocDbSettings' :: Maybe Text
secretsManagerAccessRoleArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:username:DocDbSettings' :: Maybe Text
username = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:kmsKeyId:DocDbSettings' :: Maybe Text
kmsKeyId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:password:DocDbSettings' :: Maybe (Sensitive Text)
password = Maybe (Sensitive Text)
forall a. Maybe a
Prelude.Nothing,
$sel:nestingLevel:DocDbSettings' :: Maybe NestingLevelValue
nestingLevel = Maybe NestingLevelValue
forall a. Maybe a
Prelude.Nothing,
$sel:databaseName:DocDbSettings' :: Maybe Text
databaseName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:docsToInvestigate:DocDbSettings' :: Maybe Int
docsToInvestigate = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:secretsManagerSecretId:DocDbSettings' :: Maybe Text
secretsManagerSecretId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:extractDocId:DocDbSettings' :: Maybe Bool
extractDocId = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:port:DocDbSettings' :: Maybe Int
port = Maybe Int
forall a. Maybe a
Prelude.Nothing
}
docDbSettings_serverName :: Lens.Lens' DocDbSettings (Prelude.Maybe Prelude.Text)
docDbSettings_serverName :: (Maybe Text -> f (Maybe Text)) -> DocDbSettings -> f DocDbSettings
docDbSettings_serverName = (DocDbSettings -> Maybe Text)
-> (DocDbSettings -> Maybe Text -> DocDbSettings)
-> Lens DocDbSettings DocDbSettings (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DocDbSettings' {Maybe Text
serverName :: Maybe Text
$sel:serverName:DocDbSettings' :: DocDbSettings -> Maybe Text
serverName} -> Maybe Text
serverName) (\s :: DocDbSettings
s@DocDbSettings' {} Maybe Text
a -> DocDbSettings
s {$sel:serverName:DocDbSettings' :: Maybe Text
serverName = Maybe Text
a} :: DocDbSettings)
docDbSettings_secretsManagerAccessRoleArn :: Lens.Lens' DocDbSettings (Prelude.Maybe Prelude.Text)
docDbSettings_secretsManagerAccessRoleArn :: (Maybe Text -> f (Maybe Text)) -> DocDbSettings -> f DocDbSettings
docDbSettings_secretsManagerAccessRoleArn = (DocDbSettings -> Maybe Text)
-> (DocDbSettings -> Maybe Text -> DocDbSettings)
-> Lens DocDbSettings DocDbSettings (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DocDbSettings' {Maybe Text
secretsManagerAccessRoleArn :: Maybe Text
$sel:secretsManagerAccessRoleArn:DocDbSettings' :: DocDbSettings -> Maybe Text
secretsManagerAccessRoleArn} -> Maybe Text
secretsManagerAccessRoleArn) (\s :: DocDbSettings
s@DocDbSettings' {} Maybe Text
a -> DocDbSettings
s {$sel:secretsManagerAccessRoleArn:DocDbSettings' :: Maybe Text
secretsManagerAccessRoleArn = Maybe Text
a} :: DocDbSettings)
docDbSettings_username :: Lens.Lens' DocDbSettings (Prelude.Maybe Prelude.Text)
docDbSettings_username :: (Maybe Text -> f (Maybe Text)) -> DocDbSettings -> f DocDbSettings
docDbSettings_username = (DocDbSettings -> Maybe Text)
-> (DocDbSettings -> Maybe Text -> DocDbSettings)
-> Lens DocDbSettings DocDbSettings (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DocDbSettings' {Maybe Text
username :: Maybe Text
$sel:username:DocDbSettings' :: DocDbSettings -> Maybe Text
username} -> Maybe Text
username) (\s :: DocDbSettings
s@DocDbSettings' {} Maybe Text
a -> DocDbSettings
s {$sel:username:DocDbSettings' :: Maybe Text
username = Maybe Text
a} :: DocDbSettings)
docDbSettings_kmsKeyId :: Lens.Lens' DocDbSettings (Prelude.Maybe Prelude.Text)
docDbSettings_kmsKeyId :: (Maybe Text -> f (Maybe Text)) -> DocDbSettings -> f DocDbSettings
docDbSettings_kmsKeyId = (DocDbSettings -> Maybe Text)
-> (DocDbSettings -> Maybe Text -> DocDbSettings)
-> Lens DocDbSettings DocDbSettings (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DocDbSettings' {Maybe Text
kmsKeyId :: Maybe Text
$sel:kmsKeyId:DocDbSettings' :: DocDbSettings -> Maybe Text
kmsKeyId} -> Maybe Text
kmsKeyId) (\s :: DocDbSettings
s@DocDbSettings' {} Maybe Text
a -> DocDbSettings
s {$sel:kmsKeyId:DocDbSettings' :: Maybe Text
kmsKeyId = Maybe Text
a} :: DocDbSettings)
docDbSettings_password :: Lens.Lens' DocDbSettings (Prelude.Maybe Prelude.Text)
docDbSettings_password :: (Maybe Text -> f (Maybe Text)) -> DocDbSettings -> f DocDbSettings
docDbSettings_password = (DocDbSettings -> Maybe (Sensitive Text))
-> (DocDbSettings -> Maybe (Sensitive Text) -> DocDbSettings)
-> Lens
DocDbSettings
DocDbSettings
(Maybe (Sensitive Text))
(Maybe (Sensitive Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DocDbSettings' {Maybe (Sensitive Text)
password :: Maybe (Sensitive Text)
$sel:password:DocDbSettings' :: DocDbSettings -> Maybe (Sensitive Text)
password} -> Maybe (Sensitive Text)
password) (\s :: DocDbSettings
s@DocDbSettings' {} Maybe (Sensitive Text)
a -> DocDbSettings
s {$sel:password:DocDbSettings' :: Maybe (Sensitive Text)
password = Maybe (Sensitive Text)
a} :: DocDbSettings) ((Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> DocDbSettings -> f DocDbSettings)
-> ((Maybe Text -> f (Maybe Text))
-> Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> (Maybe Text -> f (Maybe Text))
-> DocDbSettings
-> f DocDbSettings
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
docDbSettings_nestingLevel :: Lens.Lens' DocDbSettings (Prelude.Maybe NestingLevelValue)
docDbSettings_nestingLevel :: (Maybe NestingLevelValue -> f (Maybe NestingLevelValue))
-> DocDbSettings -> f DocDbSettings
docDbSettings_nestingLevel = (DocDbSettings -> Maybe NestingLevelValue)
-> (DocDbSettings -> Maybe NestingLevelValue -> DocDbSettings)
-> Lens
DocDbSettings
DocDbSettings
(Maybe NestingLevelValue)
(Maybe NestingLevelValue)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DocDbSettings' {Maybe NestingLevelValue
nestingLevel :: Maybe NestingLevelValue
$sel:nestingLevel:DocDbSettings' :: DocDbSettings -> Maybe NestingLevelValue
nestingLevel} -> Maybe NestingLevelValue
nestingLevel) (\s :: DocDbSettings
s@DocDbSettings' {} Maybe NestingLevelValue
a -> DocDbSettings
s {$sel:nestingLevel:DocDbSettings' :: Maybe NestingLevelValue
nestingLevel = Maybe NestingLevelValue
a} :: DocDbSettings)
docDbSettings_databaseName :: Lens.Lens' DocDbSettings (Prelude.Maybe Prelude.Text)
docDbSettings_databaseName :: (Maybe Text -> f (Maybe Text)) -> DocDbSettings -> f DocDbSettings
docDbSettings_databaseName = (DocDbSettings -> Maybe Text)
-> (DocDbSettings -> Maybe Text -> DocDbSettings)
-> Lens DocDbSettings DocDbSettings (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DocDbSettings' {Maybe Text
databaseName :: Maybe Text
$sel:databaseName:DocDbSettings' :: DocDbSettings -> Maybe Text
databaseName} -> Maybe Text
databaseName) (\s :: DocDbSettings
s@DocDbSettings' {} Maybe Text
a -> DocDbSettings
s {$sel:databaseName:DocDbSettings' :: Maybe Text
databaseName = Maybe Text
a} :: DocDbSettings)
docDbSettings_docsToInvestigate :: Lens.Lens' DocDbSettings (Prelude.Maybe Prelude.Int)
docDbSettings_docsToInvestigate :: (Maybe Int -> f (Maybe Int)) -> DocDbSettings -> f DocDbSettings
docDbSettings_docsToInvestigate = (DocDbSettings -> Maybe Int)
-> (DocDbSettings -> Maybe Int -> DocDbSettings)
-> Lens DocDbSettings DocDbSettings (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DocDbSettings' {Maybe Int
docsToInvestigate :: Maybe Int
$sel:docsToInvestigate:DocDbSettings' :: DocDbSettings -> Maybe Int
docsToInvestigate} -> Maybe Int
docsToInvestigate) (\s :: DocDbSettings
s@DocDbSettings' {} Maybe Int
a -> DocDbSettings
s {$sel:docsToInvestigate:DocDbSettings' :: Maybe Int
docsToInvestigate = Maybe Int
a} :: DocDbSettings)
docDbSettings_secretsManagerSecretId :: Lens.Lens' DocDbSettings (Prelude.Maybe Prelude.Text)
docDbSettings_secretsManagerSecretId :: (Maybe Text -> f (Maybe Text)) -> DocDbSettings -> f DocDbSettings
docDbSettings_secretsManagerSecretId = (DocDbSettings -> Maybe Text)
-> (DocDbSettings -> Maybe Text -> DocDbSettings)
-> Lens DocDbSettings DocDbSettings (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DocDbSettings' {Maybe Text
secretsManagerSecretId :: Maybe Text
$sel:secretsManagerSecretId:DocDbSettings' :: DocDbSettings -> Maybe Text
secretsManagerSecretId} -> Maybe Text
secretsManagerSecretId) (\s :: DocDbSettings
s@DocDbSettings' {} Maybe Text
a -> DocDbSettings
s {$sel:secretsManagerSecretId:DocDbSettings' :: Maybe Text
secretsManagerSecretId = Maybe Text
a} :: DocDbSettings)
docDbSettings_extractDocId :: Lens.Lens' DocDbSettings (Prelude.Maybe Prelude.Bool)
= (DocDbSettings -> Maybe Bool)
-> (DocDbSettings -> Maybe Bool -> DocDbSettings)
-> Lens DocDbSettings DocDbSettings (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DocDbSettings' {Maybe Bool
extractDocId :: Maybe Bool
$sel:extractDocId:DocDbSettings' :: DocDbSettings -> Maybe Bool
extractDocId} -> Maybe Bool
extractDocId) (\s :: DocDbSettings
s@DocDbSettings' {} Maybe Bool
a -> DocDbSettings
s {$sel:extractDocId:DocDbSettings' :: Maybe Bool
extractDocId = Maybe Bool
a} :: DocDbSettings)
docDbSettings_port :: Lens.Lens' DocDbSettings (Prelude.Maybe Prelude.Int)
docDbSettings_port :: (Maybe Int -> f (Maybe Int)) -> DocDbSettings -> f DocDbSettings
docDbSettings_port = (DocDbSettings -> Maybe Int)
-> (DocDbSettings -> Maybe Int -> DocDbSettings)
-> Lens DocDbSettings DocDbSettings (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DocDbSettings' {Maybe Int
port :: Maybe Int
$sel:port:DocDbSettings' :: DocDbSettings -> Maybe Int
port} -> Maybe Int
port) (\s :: DocDbSettings
s@DocDbSettings' {} Maybe Int
a -> DocDbSettings
s {$sel:port:DocDbSettings' :: Maybe Int
port = Maybe Int
a} :: DocDbSettings)
instance Core.FromJSON DocDbSettings where
parseJSON :: Value -> Parser DocDbSettings
parseJSON =
String
-> (Object -> Parser DocDbSettings)
-> Value
-> Parser DocDbSettings
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"DocDbSettings"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe (Sensitive Text)
-> Maybe NestingLevelValue
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Bool
-> Maybe Int
-> DocDbSettings
DocDbSettings'
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe (Sensitive Text)
-> Maybe NestingLevelValue
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Bool
-> Maybe Int
-> DocDbSettings)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe (Sensitive Text)
-> Maybe NestingLevelValue
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Bool
-> Maybe Int
-> DocDbSettings)
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 Text
-> Maybe Text
-> Maybe (Sensitive Text)
-> Maybe NestingLevelValue
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Bool
-> Maybe Int
-> DocDbSettings)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe (Sensitive Text)
-> Maybe NestingLevelValue
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Bool
-> Maybe Int
-> DocDbSettings)
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 Text
-> Maybe Text
-> Maybe (Sensitive Text)
-> Maybe NestingLevelValue
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Bool
-> Maybe Int
-> DocDbSettings)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe (Sensitive Text)
-> Maybe NestingLevelValue
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Bool
-> Maybe Int
-> DocDbSettings)
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 Int
-> Maybe Text
-> Maybe Bool
-> Maybe Int
-> DocDbSettings)
-> Parser (Maybe Text)
-> Parser
(Maybe (Sensitive Text)
-> Maybe NestingLevelValue
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Bool
-> Maybe Int
-> DocDbSettings)
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 Int
-> Maybe Text
-> Maybe Bool
-> Maybe Int
-> DocDbSettings)
-> Parser (Maybe (Sensitive Text))
-> Parser
(Maybe NestingLevelValue
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Bool
-> Maybe Int
-> DocDbSettings)
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 Int
-> Maybe Text
-> Maybe Bool
-> Maybe Int
-> DocDbSettings)
-> Parser (Maybe NestingLevelValue)
-> Parser
(Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Bool
-> Maybe Int
-> DocDbSettings)
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 Int
-> Maybe Text
-> Maybe Bool
-> Maybe Int
-> DocDbSettings)
-> Parser (Maybe Text)
-> Parser
(Maybe Int
-> Maybe Text -> Maybe Bool -> Maybe Int -> DocDbSettings)
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 Int
-> Maybe Text -> Maybe Bool -> Maybe Int -> DocDbSettings)
-> Parser (Maybe Int)
-> Parser (Maybe Text -> Maybe Bool -> Maybe Int -> DocDbSettings)
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
"DocsToInvestigate")
Parser (Maybe Text -> Maybe Bool -> Maybe Int -> DocDbSettings)
-> Parser (Maybe Text)
-> Parser (Maybe Bool -> Maybe Int -> DocDbSettings)
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 Bool -> Maybe Int -> DocDbSettings)
-> Parser (Maybe Bool) -> Parser (Maybe Int -> DocDbSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ExtractDocId")
Parser (Maybe Int -> DocDbSettings)
-> Parser (Maybe Int) -> Parser DocDbSettings
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 DocDbSettings
instance Prelude.NFData DocDbSettings
instance Core.ToJSON DocDbSettings where
toJSON :: DocDbSettings -> Value
toJSON DocDbSettings' {Maybe Bool
Maybe Int
Maybe Text
Maybe (Sensitive Text)
Maybe NestingLevelValue
port :: Maybe Int
extractDocId :: Maybe Bool
secretsManagerSecretId :: Maybe Text
docsToInvestigate :: Maybe Int
databaseName :: Maybe Text
nestingLevel :: Maybe NestingLevelValue
password :: Maybe (Sensitive Text)
kmsKeyId :: Maybe Text
username :: Maybe Text
secretsManagerAccessRoleArn :: Maybe Text
serverName :: Maybe Text
$sel:port:DocDbSettings' :: DocDbSettings -> Maybe Int
$sel:extractDocId:DocDbSettings' :: DocDbSettings -> Maybe Bool
$sel:secretsManagerSecretId:DocDbSettings' :: DocDbSettings -> Maybe Text
$sel:docsToInvestigate:DocDbSettings' :: DocDbSettings -> Maybe Int
$sel:databaseName:DocDbSettings' :: DocDbSettings -> Maybe Text
$sel:nestingLevel:DocDbSettings' :: DocDbSettings -> Maybe NestingLevelValue
$sel:password:DocDbSettings' :: DocDbSettings -> Maybe (Sensitive Text)
$sel:kmsKeyId:DocDbSettings' :: DocDbSettings -> Maybe Text
$sel:username:DocDbSettings' :: DocDbSettings -> Maybe Text
$sel:secretsManagerAccessRoleArn:DocDbSettings' :: DocDbSettings -> Maybe Text
$sel:serverName:DocDbSettings' :: DocDbSettings -> 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
"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 -> 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
docsToInvestigate,
(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 -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
extractDocId,
(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
]
)