{-# 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.IBMDb2Settings where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data IBMDb2Settings = IBMDb2Settings'
{
IBMDb2Settings -> Maybe Text
serverName :: Prelude.Maybe Prelude.Text,
IBMDb2Settings -> Maybe Text
currentLsn :: Prelude.Maybe Prelude.Text,
IBMDb2Settings -> Maybe Bool
setDataCaptureChanges :: Prelude.Maybe Prelude.Bool,
IBMDb2Settings -> Maybe Text
secretsManagerAccessRoleArn :: Prelude.Maybe Prelude.Text,
IBMDb2Settings -> Maybe Text
username :: Prelude.Maybe Prelude.Text,
IBMDb2Settings -> Maybe (Sensitive Text)
password :: Prelude.Maybe (Core.Sensitive Prelude.Text),
IBMDb2Settings -> Maybe Text
databaseName :: Prelude.Maybe Prelude.Text,
IBMDb2Settings -> Maybe Text
secretsManagerSecretId :: Prelude.Maybe Prelude.Text,
IBMDb2Settings -> Maybe Int
maxKBytesPerRead :: Prelude.Maybe Prelude.Int,
IBMDb2Settings -> Maybe Int
port :: Prelude.Maybe Prelude.Int
}
deriving (IBMDb2Settings -> IBMDb2Settings -> Bool
(IBMDb2Settings -> IBMDb2Settings -> Bool)
-> (IBMDb2Settings -> IBMDb2Settings -> Bool) -> Eq IBMDb2Settings
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: IBMDb2Settings -> IBMDb2Settings -> Bool
$c/= :: IBMDb2Settings -> IBMDb2Settings -> Bool
== :: IBMDb2Settings -> IBMDb2Settings -> Bool
$c== :: IBMDb2Settings -> IBMDb2Settings -> Bool
Prelude.Eq, Int -> IBMDb2Settings -> ShowS
[IBMDb2Settings] -> ShowS
IBMDb2Settings -> String
(Int -> IBMDb2Settings -> ShowS)
-> (IBMDb2Settings -> String)
-> ([IBMDb2Settings] -> ShowS)
-> Show IBMDb2Settings
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [IBMDb2Settings] -> ShowS
$cshowList :: [IBMDb2Settings] -> ShowS
show :: IBMDb2Settings -> String
$cshow :: IBMDb2Settings -> String
showsPrec :: Int -> IBMDb2Settings -> ShowS
$cshowsPrec :: Int -> IBMDb2Settings -> ShowS
Prelude.Show, (forall x. IBMDb2Settings -> Rep IBMDb2Settings x)
-> (forall x. Rep IBMDb2Settings x -> IBMDb2Settings)
-> Generic IBMDb2Settings
forall x. Rep IBMDb2Settings x -> IBMDb2Settings
forall x. IBMDb2Settings -> Rep IBMDb2Settings x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep IBMDb2Settings x -> IBMDb2Settings
$cfrom :: forall x. IBMDb2Settings -> Rep IBMDb2Settings x
Prelude.Generic)
newIBMDb2Settings ::
IBMDb2Settings
newIBMDb2Settings :: IBMDb2Settings
newIBMDb2Settings =
IBMDb2Settings' :: Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe (Sensitive Text)
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Int
-> IBMDb2Settings
IBMDb2Settings'
{ $sel:serverName:IBMDb2Settings' :: Maybe Text
serverName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:currentLsn:IBMDb2Settings' :: Maybe Text
currentLsn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:setDataCaptureChanges:IBMDb2Settings' :: Maybe Bool
setDataCaptureChanges = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:secretsManagerAccessRoleArn:IBMDb2Settings' :: Maybe Text
secretsManagerAccessRoleArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:username:IBMDb2Settings' :: Maybe Text
username = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:password:IBMDb2Settings' :: Maybe (Sensitive Text)
password = Maybe (Sensitive Text)
forall a. Maybe a
Prelude.Nothing,
$sel:databaseName:IBMDb2Settings' :: Maybe Text
databaseName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:secretsManagerSecretId:IBMDb2Settings' :: Maybe Text
secretsManagerSecretId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:maxKBytesPerRead:IBMDb2Settings' :: Maybe Int
maxKBytesPerRead = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:port:IBMDb2Settings' :: Maybe Int
port = Maybe Int
forall a. Maybe a
Prelude.Nothing
}
iBMDb2Settings_serverName :: Lens.Lens' IBMDb2Settings (Prelude.Maybe Prelude.Text)
iBMDb2Settings_serverName :: (Maybe Text -> f (Maybe Text))
-> IBMDb2Settings -> f IBMDb2Settings
iBMDb2Settings_serverName = (IBMDb2Settings -> Maybe Text)
-> (IBMDb2Settings -> Maybe Text -> IBMDb2Settings)
-> Lens IBMDb2Settings IBMDb2Settings (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\IBMDb2Settings' {Maybe Text
serverName :: Maybe Text
$sel:serverName:IBMDb2Settings' :: IBMDb2Settings -> Maybe Text
serverName} -> Maybe Text
serverName) (\s :: IBMDb2Settings
s@IBMDb2Settings' {} Maybe Text
a -> IBMDb2Settings
s {$sel:serverName:IBMDb2Settings' :: Maybe Text
serverName = Maybe Text
a} :: IBMDb2Settings)
iBMDb2Settings_currentLsn :: Lens.Lens' IBMDb2Settings (Prelude.Maybe Prelude.Text)
iBMDb2Settings_currentLsn :: (Maybe Text -> f (Maybe Text))
-> IBMDb2Settings -> f IBMDb2Settings
iBMDb2Settings_currentLsn = (IBMDb2Settings -> Maybe Text)
-> (IBMDb2Settings -> Maybe Text -> IBMDb2Settings)
-> Lens IBMDb2Settings IBMDb2Settings (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\IBMDb2Settings' {Maybe Text
currentLsn :: Maybe Text
$sel:currentLsn:IBMDb2Settings' :: IBMDb2Settings -> Maybe Text
currentLsn} -> Maybe Text
currentLsn) (\s :: IBMDb2Settings
s@IBMDb2Settings' {} Maybe Text
a -> IBMDb2Settings
s {$sel:currentLsn:IBMDb2Settings' :: Maybe Text
currentLsn = Maybe Text
a} :: IBMDb2Settings)
iBMDb2Settings_setDataCaptureChanges :: Lens.Lens' IBMDb2Settings (Prelude.Maybe Prelude.Bool)
iBMDb2Settings_setDataCaptureChanges :: (Maybe Bool -> f (Maybe Bool))
-> IBMDb2Settings -> f IBMDb2Settings
iBMDb2Settings_setDataCaptureChanges = (IBMDb2Settings -> Maybe Bool)
-> (IBMDb2Settings -> Maybe Bool -> IBMDb2Settings)
-> Lens IBMDb2Settings IBMDb2Settings (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\IBMDb2Settings' {Maybe Bool
setDataCaptureChanges :: Maybe Bool
$sel:setDataCaptureChanges:IBMDb2Settings' :: IBMDb2Settings -> Maybe Bool
setDataCaptureChanges} -> Maybe Bool
setDataCaptureChanges) (\s :: IBMDb2Settings
s@IBMDb2Settings' {} Maybe Bool
a -> IBMDb2Settings
s {$sel:setDataCaptureChanges:IBMDb2Settings' :: Maybe Bool
setDataCaptureChanges = Maybe Bool
a} :: IBMDb2Settings)
iBMDb2Settings_secretsManagerAccessRoleArn :: Lens.Lens' IBMDb2Settings (Prelude.Maybe Prelude.Text)
iBMDb2Settings_secretsManagerAccessRoleArn :: (Maybe Text -> f (Maybe Text))
-> IBMDb2Settings -> f IBMDb2Settings
iBMDb2Settings_secretsManagerAccessRoleArn = (IBMDb2Settings -> Maybe Text)
-> (IBMDb2Settings -> Maybe Text -> IBMDb2Settings)
-> Lens IBMDb2Settings IBMDb2Settings (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\IBMDb2Settings' {Maybe Text
secretsManagerAccessRoleArn :: Maybe Text
$sel:secretsManagerAccessRoleArn:IBMDb2Settings' :: IBMDb2Settings -> Maybe Text
secretsManagerAccessRoleArn} -> Maybe Text
secretsManagerAccessRoleArn) (\s :: IBMDb2Settings
s@IBMDb2Settings' {} Maybe Text
a -> IBMDb2Settings
s {$sel:secretsManagerAccessRoleArn:IBMDb2Settings' :: Maybe Text
secretsManagerAccessRoleArn = Maybe Text
a} :: IBMDb2Settings)
iBMDb2Settings_username :: Lens.Lens' IBMDb2Settings (Prelude.Maybe Prelude.Text)
iBMDb2Settings_username :: (Maybe Text -> f (Maybe Text))
-> IBMDb2Settings -> f IBMDb2Settings
iBMDb2Settings_username = (IBMDb2Settings -> Maybe Text)
-> (IBMDb2Settings -> Maybe Text -> IBMDb2Settings)
-> Lens IBMDb2Settings IBMDb2Settings (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\IBMDb2Settings' {Maybe Text
username :: Maybe Text
$sel:username:IBMDb2Settings' :: IBMDb2Settings -> Maybe Text
username} -> Maybe Text
username) (\s :: IBMDb2Settings
s@IBMDb2Settings' {} Maybe Text
a -> IBMDb2Settings
s {$sel:username:IBMDb2Settings' :: Maybe Text
username = Maybe Text
a} :: IBMDb2Settings)
iBMDb2Settings_password :: Lens.Lens' IBMDb2Settings (Prelude.Maybe Prelude.Text)
iBMDb2Settings_password :: (Maybe Text -> f (Maybe Text))
-> IBMDb2Settings -> f IBMDb2Settings
iBMDb2Settings_password = (IBMDb2Settings -> Maybe (Sensitive Text))
-> (IBMDb2Settings -> Maybe (Sensitive Text) -> IBMDb2Settings)
-> Lens
IBMDb2Settings
IBMDb2Settings
(Maybe (Sensitive Text))
(Maybe (Sensitive Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\IBMDb2Settings' {Maybe (Sensitive Text)
password :: Maybe (Sensitive Text)
$sel:password:IBMDb2Settings' :: IBMDb2Settings -> Maybe (Sensitive Text)
password} -> Maybe (Sensitive Text)
password) (\s :: IBMDb2Settings
s@IBMDb2Settings' {} Maybe (Sensitive Text)
a -> IBMDb2Settings
s {$sel:password:IBMDb2Settings' :: Maybe (Sensitive Text)
password = Maybe (Sensitive Text)
a} :: IBMDb2Settings) ((Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> IBMDb2Settings -> f IBMDb2Settings)
-> ((Maybe Text -> f (Maybe Text))
-> Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> (Maybe Text -> f (Maybe Text))
-> IBMDb2Settings
-> f IBMDb2Settings
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
iBMDb2Settings_databaseName :: Lens.Lens' IBMDb2Settings (Prelude.Maybe Prelude.Text)
iBMDb2Settings_databaseName :: (Maybe Text -> f (Maybe Text))
-> IBMDb2Settings -> f IBMDb2Settings
iBMDb2Settings_databaseName = (IBMDb2Settings -> Maybe Text)
-> (IBMDb2Settings -> Maybe Text -> IBMDb2Settings)
-> Lens IBMDb2Settings IBMDb2Settings (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\IBMDb2Settings' {Maybe Text
databaseName :: Maybe Text
$sel:databaseName:IBMDb2Settings' :: IBMDb2Settings -> Maybe Text
databaseName} -> Maybe Text
databaseName) (\s :: IBMDb2Settings
s@IBMDb2Settings' {} Maybe Text
a -> IBMDb2Settings
s {$sel:databaseName:IBMDb2Settings' :: Maybe Text
databaseName = Maybe Text
a} :: IBMDb2Settings)
iBMDb2Settings_secretsManagerSecretId :: Lens.Lens' IBMDb2Settings (Prelude.Maybe Prelude.Text)
iBMDb2Settings_secretsManagerSecretId :: (Maybe Text -> f (Maybe Text))
-> IBMDb2Settings -> f IBMDb2Settings
iBMDb2Settings_secretsManagerSecretId = (IBMDb2Settings -> Maybe Text)
-> (IBMDb2Settings -> Maybe Text -> IBMDb2Settings)
-> Lens IBMDb2Settings IBMDb2Settings (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\IBMDb2Settings' {Maybe Text
secretsManagerSecretId :: Maybe Text
$sel:secretsManagerSecretId:IBMDb2Settings' :: IBMDb2Settings -> Maybe Text
secretsManagerSecretId} -> Maybe Text
secretsManagerSecretId) (\s :: IBMDb2Settings
s@IBMDb2Settings' {} Maybe Text
a -> IBMDb2Settings
s {$sel:secretsManagerSecretId:IBMDb2Settings' :: Maybe Text
secretsManagerSecretId = Maybe Text
a} :: IBMDb2Settings)
iBMDb2Settings_maxKBytesPerRead :: Lens.Lens' IBMDb2Settings (Prelude.Maybe Prelude.Int)
iBMDb2Settings_maxKBytesPerRead :: (Maybe Int -> f (Maybe Int)) -> IBMDb2Settings -> f IBMDb2Settings
iBMDb2Settings_maxKBytesPerRead = (IBMDb2Settings -> Maybe Int)
-> (IBMDb2Settings -> Maybe Int -> IBMDb2Settings)
-> Lens IBMDb2Settings IBMDb2Settings (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\IBMDb2Settings' {Maybe Int
maxKBytesPerRead :: Maybe Int
$sel:maxKBytesPerRead:IBMDb2Settings' :: IBMDb2Settings -> Maybe Int
maxKBytesPerRead} -> Maybe Int
maxKBytesPerRead) (\s :: IBMDb2Settings
s@IBMDb2Settings' {} Maybe Int
a -> IBMDb2Settings
s {$sel:maxKBytesPerRead:IBMDb2Settings' :: Maybe Int
maxKBytesPerRead = Maybe Int
a} :: IBMDb2Settings)
iBMDb2Settings_port :: Lens.Lens' IBMDb2Settings (Prelude.Maybe Prelude.Int)
iBMDb2Settings_port :: (Maybe Int -> f (Maybe Int)) -> IBMDb2Settings -> f IBMDb2Settings
iBMDb2Settings_port = (IBMDb2Settings -> Maybe Int)
-> (IBMDb2Settings -> Maybe Int -> IBMDb2Settings)
-> Lens IBMDb2Settings IBMDb2Settings (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\IBMDb2Settings' {Maybe Int
port :: Maybe Int
$sel:port:IBMDb2Settings' :: IBMDb2Settings -> Maybe Int
port} -> Maybe Int
port) (\s :: IBMDb2Settings
s@IBMDb2Settings' {} Maybe Int
a -> IBMDb2Settings
s {$sel:port:IBMDb2Settings' :: Maybe Int
port = Maybe Int
a} :: IBMDb2Settings)
instance Core.FromJSON IBMDb2Settings where
parseJSON :: Value -> Parser IBMDb2Settings
parseJSON =
String
-> (Object -> Parser IBMDb2Settings)
-> Value
-> Parser IBMDb2Settings
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"IBMDb2Settings"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe (Sensitive Text)
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Int
-> IBMDb2Settings
IBMDb2Settings'
(Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe (Sensitive Text)
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Int
-> IBMDb2Settings)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe (Sensitive Text)
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Int
-> IBMDb2Settings)
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 Bool
-> Maybe Text
-> Maybe Text
-> Maybe (Sensitive Text)
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Int
-> IBMDb2Settings)
-> Parser (Maybe Text)
-> Parser
(Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe (Sensitive Text)
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Int
-> IBMDb2Settings)
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
"CurrentLsn")
Parser
(Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe (Sensitive Text)
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Int
-> IBMDb2Settings)
-> Parser (Maybe Bool)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe (Sensitive Text)
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Int
-> IBMDb2Settings)
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
"SetDataCaptureChanges")
Parser
(Maybe Text
-> Maybe Text
-> Maybe (Sensitive Text)
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Int
-> IBMDb2Settings)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe (Sensitive Text)
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Int
-> IBMDb2Settings)
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 (Sensitive Text)
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Int
-> IBMDb2Settings)
-> Parser (Maybe Text)
-> Parser
(Maybe (Sensitive Text)
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Int
-> IBMDb2Settings)
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 (Sensitive Text)
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Int
-> IBMDb2Settings)
-> Parser (Maybe (Sensitive Text))
-> Parser
(Maybe Text
-> Maybe Text -> Maybe Int -> Maybe Int -> IBMDb2Settings)
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 Text
-> Maybe Text -> Maybe Int -> Maybe Int -> IBMDb2Settings)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Int -> Maybe Int -> IBMDb2Settings)
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 Int -> Maybe Int -> IBMDb2Settings)
-> Parser (Maybe Text)
-> Parser (Maybe Int -> Maybe Int -> IBMDb2Settings)
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 Int -> Maybe Int -> IBMDb2Settings)
-> Parser (Maybe Int) -> Parser (Maybe Int -> IBMDb2Settings)
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
"MaxKBytesPerRead")
Parser (Maybe Int -> IBMDb2Settings)
-> Parser (Maybe Int) -> Parser IBMDb2Settings
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 IBMDb2Settings
instance Prelude.NFData IBMDb2Settings
instance Core.ToJSON IBMDb2Settings where
toJSON :: IBMDb2Settings -> Value
toJSON IBMDb2Settings' {Maybe Bool
Maybe Int
Maybe Text
Maybe (Sensitive Text)
port :: Maybe Int
maxKBytesPerRead :: Maybe Int
secretsManagerSecretId :: Maybe Text
databaseName :: Maybe Text
password :: Maybe (Sensitive Text)
username :: Maybe Text
secretsManagerAccessRoleArn :: Maybe Text
setDataCaptureChanges :: Maybe Bool
currentLsn :: Maybe Text
serverName :: Maybe Text
$sel:port:IBMDb2Settings' :: IBMDb2Settings -> Maybe Int
$sel:maxKBytesPerRead:IBMDb2Settings' :: IBMDb2Settings -> Maybe Int
$sel:secretsManagerSecretId:IBMDb2Settings' :: IBMDb2Settings -> Maybe Text
$sel:databaseName:IBMDb2Settings' :: IBMDb2Settings -> Maybe Text
$sel:password:IBMDb2Settings' :: IBMDb2Settings -> Maybe (Sensitive Text)
$sel:username:IBMDb2Settings' :: IBMDb2Settings -> Maybe Text
$sel:secretsManagerAccessRoleArn:IBMDb2Settings' :: IBMDb2Settings -> Maybe Text
$sel:setDataCaptureChanges:IBMDb2Settings' :: IBMDb2Settings -> Maybe Bool
$sel:currentLsn:IBMDb2Settings' :: IBMDb2Settings -> Maybe Text
$sel:serverName:IBMDb2Settings' :: IBMDb2Settings -> 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
"CurrentLsn" 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
currentLsn,
(Text
"SetDataCaptureChanges" 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
setDataCaptureChanges,
(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
"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
"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
"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
"MaxKBytesPerRead" 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
maxKBytesPerRead,
(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
]
)