{-# 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.IBMDb2Settings
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.DMS.Types.IBMDb2Settings where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude

-- | Provides information that defines an IBM Db2 LUW endpoint.
--
-- /See:/ 'newIBMDb2Settings' smart constructor.
data IBMDb2Settings = IBMDb2Settings'
  { -- | For ongoing replication (CDC), use CurrentLSN to specify a log sequence
    -- number (LSN) where you want the replication to start.
    IBMDb2Settings -> Maybe Text
currentLsn :: Prelude.Maybe Prelude.Text,
    -- | Database name for the endpoint.
    IBMDb2Settings -> Maybe Text
databaseName :: Prelude.Maybe Prelude.Text,
    -- | Maximum number of bytes per read, as a NUMBER value. The default is 64
    -- KB.
    IBMDb2Settings -> Maybe Int
maxKBytesPerRead :: Prelude.Maybe Prelude.Int,
    -- | Endpoint connection password.
    IBMDb2Settings -> Maybe (Sensitive Text)
password :: Prelude.Maybe (Data.Sensitive Prelude.Text),
    -- | Endpoint TCP port. The default value is 50000.
    IBMDb2Settings -> Maybe Int
port :: Prelude.Maybe Prelude.Int,
    -- | 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 Db2 LUW 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/.
    IBMDb2Settings -> Maybe Text
secretsManagerAccessRoleArn :: Prelude.Maybe Prelude.Text,
    -- | The full ARN, partial ARN, or friendly name of the
    -- @SecretsManagerSecret@ that contains the Db2 LUW endpoint connection
    -- details.
    IBMDb2Settings -> Maybe Text
secretsManagerSecretId :: Prelude.Maybe Prelude.Text,
    -- | Fully qualified domain name of the endpoint.
    IBMDb2Settings -> Maybe Text
serverName :: Prelude.Maybe Prelude.Text,
    -- | Enables ongoing replication (CDC) as a BOOLEAN value. The default is
    -- true.
    IBMDb2Settings -> Maybe Bool
setDataCaptureChanges :: Prelude.Maybe Prelude.Bool,
    -- | Endpoint connection user name.
    IBMDb2Settings -> Maybe Text
username :: Prelude.Maybe Prelude.Text
  }
  deriving (IBMDb2Settings -> IBMDb2Settings -> Bool
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
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. 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)

-- |
-- Create a value of 'IBMDb2Settings' 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:
--
-- 'currentLsn', 'iBMDb2Settings_currentLsn' - For ongoing replication (CDC), use CurrentLSN to specify a log sequence
-- number (LSN) where you want the replication to start.
--
-- 'databaseName', 'iBMDb2Settings_databaseName' - Database name for the endpoint.
--
-- 'maxKBytesPerRead', 'iBMDb2Settings_maxKBytesPerRead' - Maximum number of bytes per read, as a NUMBER value. The default is 64
-- KB.
--
-- 'password', 'iBMDb2Settings_password' - Endpoint connection password.
--
-- 'port', 'iBMDb2Settings_port' - Endpoint TCP port. The default value is 50000.
--
-- 'secretsManagerAccessRoleArn', 'iBMDb2Settings_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 Db2 LUW 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/.
--
-- 'secretsManagerSecretId', 'iBMDb2Settings_secretsManagerSecretId' - The full ARN, partial ARN, or friendly name of the
-- @SecretsManagerSecret@ that contains the Db2 LUW endpoint connection
-- details.
--
-- 'serverName', 'iBMDb2Settings_serverName' - Fully qualified domain name of the endpoint.
--
-- 'setDataCaptureChanges', 'iBMDb2Settings_setDataCaptureChanges' - Enables ongoing replication (CDC) as a BOOLEAN value. The default is
-- true.
--
-- 'username', 'iBMDb2Settings_username' - Endpoint connection user name.
newIBMDb2Settings ::
  IBMDb2Settings
newIBMDb2Settings :: IBMDb2Settings
newIBMDb2Settings =
  IBMDb2Settings'
    { $sel:currentLsn:IBMDb2Settings' :: Maybe Text
currentLsn = forall a. Maybe a
Prelude.Nothing,
      $sel:databaseName:IBMDb2Settings' :: Maybe Text
databaseName = forall a. Maybe a
Prelude.Nothing,
      $sel:maxKBytesPerRead:IBMDb2Settings' :: Maybe Int
maxKBytesPerRead = forall a. Maybe a
Prelude.Nothing,
      $sel:password:IBMDb2Settings' :: Maybe (Sensitive Text)
password = forall a. Maybe a
Prelude.Nothing,
      $sel:port:IBMDb2Settings' :: Maybe Int
port = forall a. Maybe a
Prelude.Nothing,
      $sel:secretsManagerAccessRoleArn:IBMDb2Settings' :: Maybe Text
secretsManagerAccessRoleArn = forall a. Maybe a
Prelude.Nothing,
      $sel:secretsManagerSecretId:IBMDb2Settings' :: Maybe Text
secretsManagerSecretId = forall a. Maybe a
Prelude.Nothing,
      $sel:serverName:IBMDb2Settings' :: Maybe Text
serverName = forall a. Maybe a
Prelude.Nothing,
      $sel:setDataCaptureChanges:IBMDb2Settings' :: Maybe Bool
setDataCaptureChanges = forall a. Maybe a
Prelude.Nothing,
      $sel:username:IBMDb2Settings' :: Maybe Text
username = forall a. Maybe a
Prelude.Nothing
    }

-- | For ongoing replication (CDC), use CurrentLSN to specify a log sequence
-- number (LSN) where you want the replication to start.
iBMDb2Settings_currentLsn :: Lens.Lens' IBMDb2Settings (Prelude.Maybe Prelude.Text)
iBMDb2Settings_currentLsn :: Lens' IBMDb2Settings (Maybe Text)
iBMDb2Settings_currentLsn = 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)

-- | Database name for the endpoint.
iBMDb2Settings_databaseName :: Lens.Lens' IBMDb2Settings (Prelude.Maybe Prelude.Text)
iBMDb2Settings_databaseName :: Lens' IBMDb2Settings (Maybe Text)
iBMDb2Settings_databaseName = 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)

-- | Maximum number of bytes per read, as a NUMBER value. The default is 64
-- KB.
iBMDb2Settings_maxKBytesPerRead :: Lens.Lens' IBMDb2Settings (Prelude.Maybe Prelude.Int)
iBMDb2Settings_maxKBytesPerRead :: Lens' IBMDb2Settings (Maybe Int)
iBMDb2Settings_maxKBytesPerRead = 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)

-- | Endpoint connection password.
iBMDb2Settings_password :: Lens.Lens' IBMDb2Settings (Prelude.Maybe Prelude.Text)
iBMDb2Settings_password :: Lens' IBMDb2Settings (Maybe Text)
iBMDb2Settings_password = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall a. Iso' (Sensitive a) a
Data._Sensitive

-- | Endpoint TCP port. The default value is 50000.
iBMDb2Settings_port :: Lens.Lens' IBMDb2Settings (Prelude.Maybe Prelude.Int)
iBMDb2Settings_port :: Lens' IBMDb2Settings (Maybe Int)
iBMDb2Settings_port = 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)

-- | 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 Db2 LUW 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/.
iBMDb2Settings_secretsManagerAccessRoleArn :: Lens.Lens' IBMDb2Settings (Prelude.Maybe Prelude.Text)
iBMDb2Settings_secretsManagerAccessRoleArn :: Lens' IBMDb2Settings (Maybe Text)
iBMDb2Settings_secretsManagerAccessRoleArn = 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)

-- | The full ARN, partial ARN, or friendly name of the
-- @SecretsManagerSecret@ that contains the Db2 LUW endpoint connection
-- details.
iBMDb2Settings_secretsManagerSecretId :: Lens.Lens' IBMDb2Settings (Prelude.Maybe Prelude.Text)
iBMDb2Settings_secretsManagerSecretId :: Lens' IBMDb2Settings (Maybe Text)
iBMDb2Settings_secretsManagerSecretId = 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)

-- | Fully qualified domain name of the endpoint.
iBMDb2Settings_serverName :: Lens.Lens' IBMDb2Settings (Prelude.Maybe Prelude.Text)
iBMDb2Settings_serverName :: Lens' IBMDb2Settings (Maybe Text)
iBMDb2Settings_serverName = 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)

-- | Enables ongoing replication (CDC) as a BOOLEAN value. The default is
-- true.
iBMDb2Settings_setDataCaptureChanges :: Lens.Lens' IBMDb2Settings (Prelude.Maybe Prelude.Bool)
iBMDb2Settings_setDataCaptureChanges :: Lens' IBMDb2Settings (Maybe Bool)
iBMDb2Settings_setDataCaptureChanges = 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)

-- | Endpoint connection user name.
iBMDb2Settings_username :: Lens.Lens' IBMDb2Settings (Prelude.Maybe Prelude.Text)
iBMDb2Settings_username :: Lens' IBMDb2Settings (Maybe Text)
iBMDb2Settings_username = 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)

instance Data.FromJSON IBMDb2Settings where
  parseJSON :: Value -> Parser IBMDb2Settings
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"IBMDb2Settings"
      ( \Object
x ->
          Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe (Sensitive Text)
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> IBMDb2Settings
IBMDb2Settings'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"CurrentLsn")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"DatabaseName")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"MaxKBytesPerRead")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Password")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Port")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"SecretsManagerAccessRoleArn")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"SecretsManagerSecretId")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"ServerName")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"SetDataCaptureChanges")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Username")
      )

instance Prelude.Hashable IBMDb2Settings where
  hashWithSalt :: Int -> IBMDb2Settings -> Int
hashWithSalt Int
_salt IBMDb2Settings' {Maybe Bool
Maybe Int
Maybe Text
Maybe (Sensitive Text)
username :: Maybe Text
setDataCaptureChanges :: Maybe Bool
serverName :: Maybe Text
secretsManagerSecretId :: Maybe Text
secretsManagerAccessRoleArn :: Maybe Text
port :: Maybe Int
password :: Maybe (Sensitive Text)
maxKBytesPerRead :: Maybe Int
databaseName :: Maybe Text
currentLsn :: Maybe Text
$sel:username:IBMDb2Settings' :: IBMDb2Settings -> Maybe Text
$sel:setDataCaptureChanges:IBMDb2Settings' :: IBMDb2Settings -> Maybe Bool
$sel:serverName:IBMDb2Settings' :: IBMDb2Settings -> Maybe Text
$sel:secretsManagerSecretId:IBMDb2Settings' :: IBMDb2Settings -> Maybe Text
$sel:secretsManagerAccessRoleArn:IBMDb2Settings' :: IBMDb2Settings -> Maybe Text
$sel:port:IBMDb2Settings' :: IBMDb2Settings -> Maybe Int
$sel:password:IBMDb2Settings' :: IBMDb2Settings -> Maybe (Sensitive Text)
$sel:maxKBytesPerRead:IBMDb2Settings' :: IBMDb2Settings -> Maybe Int
$sel:databaseName:IBMDb2Settings' :: IBMDb2Settings -> Maybe Text
$sel:currentLsn:IBMDb2Settings' :: IBMDb2Settings -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
currentLsn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
databaseName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
maxKBytesPerRead
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (Sensitive Text)
password
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
port
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
secretsManagerAccessRoleArn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
secretsManagerSecretId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
serverName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
setDataCaptureChanges
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
username

instance Prelude.NFData IBMDb2Settings where
  rnf :: IBMDb2Settings -> ()
rnf IBMDb2Settings' {Maybe Bool
Maybe Int
Maybe Text
Maybe (Sensitive Text)
username :: Maybe Text
setDataCaptureChanges :: Maybe Bool
serverName :: Maybe Text
secretsManagerSecretId :: Maybe Text
secretsManagerAccessRoleArn :: Maybe Text
port :: Maybe Int
password :: Maybe (Sensitive Text)
maxKBytesPerRead :: Maybe Int
databaseName :: Maybe Text
currentLsn :: Maybe Text
$sel:username:IBMDb2Settings' :: IBMDb2Settings -> Maybe Text
$sel:setDataCaptureChanges:IBMDb2Settings' :: IBMDb2Settings -> Maybe Bool
$sel:serverName:IBMDb2Settings' :: IBMDb2Settings -> Maybe Text
$sel:secretsManagerSecretId:IBMDb2Settings' :: IBMDb2Settings -> Maybe Text
$sel:secretsManagerAccessRoleArn:IBMDb2Settings' :: IBMDb2Settings -> Maybe Text
$sel:port:IBMDb2Settings' :: IBMDb2Settings -> Maybe Int
$sel:password:IBMDb2Settings' :: IBMDb2Settings -> Maybe (Sensitive Text)
$sel:maxKBytesPerRead:IBMDb2Settings' :: IBMDb2Settings -> Maybe Int
$sel:databaseName:IBMDb2Settings' :: IBMDb2Settings -> Maybe Text
$sel:currentLsn:IBMDb2Settings' :: IBMDb2Settings -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
currentLsn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
databaseName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
maxKBytesPerRead
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (Sensitive Text)
password
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
port
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
secretsManagerAccessRoleArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
secretsManagerSecretId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
serverName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
setDataCaptureChanges
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
username

instance Data.ToJSON IBMDb2Settings where
  toJSON :: IBMDb2Settings -> Value
toJSON IBMDb2Settings' {Maybe Bool
Maybe Int
Maybe Text
Maybe (Sensitive Text)
username :: Maybe Text
setDataCaptureChanges :: Maybe Bool
serverName :: Maybe Text
secretsManagerSecretId :: Maybe Text
secretsManagerAccessRoleArn :: Maybe Text
port :: Maybe Int
password :: Maybe (Sensitive Text)
maxKBytesPerRead :: Maybe Int
databaseName :: Maybe Text
currentLsn :: Maybe Text
$sel:username:IBMDb2Settings' :: IBMDb2Settings -> Maybe Text
$sel:setDataCaptureChanges:IBMDb2Settings' :: IBMDb2Settings -> Maybe Bool
$sel:serverName:IBMDb2Settings' :: IBMDb2Settings -> Maybe Text
$sel:secretsManagerSecretId:IBMDb2Settings' :: IBMDb2Settings -> Maybe Text
$sel:secretsManagerAccessRoleArn:IBMDb2Settings' :: IBMDb2Settings -> Maybe Text
$sel:port:IBMDb2Settings' :: IBMDb2Settings -> Maybe Int
$sel:password:IBMDb2Settings' :: IBMDb2Settings -> Maybe (Sensitive Text)
$sel:maxKBytesPerRead:IBMDb2Settings' :: IBMDb2Settings -> Maybe Int
$sel:databaseName:IBMDb2Settings' :: IBMDb2Settings -> Maybe Text
$sel:currentLsn:IBMDb2Settings' :: IBMDb2Settings -> Maybe Text
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"CurrentLsn" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
currentLsn,
            (Key
"DatabaseName" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
databaseName,
            (Key
"MaxKBytesPerRead" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
maxKBytesPerRead,
            (Key
"Password" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Sensitive Text)
password,
            (Key
"Port" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
port,
            (Key
"SecretsManagerAccessRoleArn" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
secretsManagerAccessRoleArn,
            (Key
"SecretsManagerSecretId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
secretsManagerSecretId,
            (Key
"ServerName" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
serverName,
            (Key
"SetDataCaptureChanges" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
setDataCaptureChanges,
            (Key
"Username" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
username
          ]
      )