{-# 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.MySQLSettings
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.DMS.Types.MySQLSettings where

import qualified Amazonka.Core as Core
import Amazonka.DMS.Types.TargetDbType
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Provides information that defines a MySQL endpoint.
--
-- /See:/ 'newMySQLSettings' smart constructor.
data MySQLSettings = MySQLSettings'
  { -- | Specifies the maximum size (in KB) of any .csv file used to transfer
    -- data to a MySQL-compatible database.
    --
    -- Example: @maxFileSize=512@
    MySQLSettings -> Maybe Int
maxFileSize :: Prelude.Maybe Prelude.Int,
    -- | Specifies where to migrate source tables on the target, either to a
    -- single database or multiple databases.
    --
    -- Example: @targetDbType=MULTIPLE_DATABASES@
    MySQLSettings -> Maybe TargetDbType
targetDbType :: Prelude.Maybe TargetDbType,
    -- | Fully qualified domain name of the endpoint.
    MySQLSettings -> Maybe Text
serverName :: Prelude.Maybe Prelude.Text,
    -- | Adjusts the behavior of DMS when migrating from an SQL Server source
    -- database that is hosted as part of an Always On availability group
    -- cluster. If you need DMS to poll all the nodes in the Always On cluster
    -- for transaction backups, set this attribute to @false@.
    MySQLSettings -> Maybe Bool
cleanSourceMetadataOnMismatch :: Prelude.Maybe Prelude.Bool,
    -- | Improves performance when loading data into the MySQL-compatible target
    -- database. Specifies how many threads to use to load the data into the
    -- MySQL-compatible target database. Setting a large number of threads can
    -- have an adverse effect on database performance, because a separate
    -- connection is required for each thread.
    --
    -- Example: @parallelLoadThreads=1@
    MySQLSettings -> Maybe Int
parallelLoadThreads :: 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 MySQL 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/.
    MySQLSettings -> Maybe Text
secretsManagerAccessRoleArn :: Prelude.Maybe Prelude.Text,
    -- | Endpoint connection user name.
    MySQLSettings -> Maybe Text
username :: Prelude.Maybe Prelude.Text,
    -- | Endpoint connection password.
    MySQLSettings -> Maybe (Sensitive Text)
password :: Prelude.Maybe (Core.Sensitive Prelude.Text),
    -- | Specifies how often to check the binary log for new changes\/events when
    -- the database is idle.
    --
    -- Example: @eventsPollInterval=5;@
    --
    -- In the example, DMS checks for changes in the binary logs every five
    -- seconds.
    MySQLSettings -> Maybe Int
eventsPollInterval :: Prelude.Maybe Prelude.Int,
    -- | Database name for the endpoint. For a MySQL source or target endpoint,
    -- don\'t explicitly specify the database using the @DatabaseName@ request
    -- parameter on either the @CreateEndpoint@ or @ModifyEndpoint@ API call.
    -- Specifying @DatabaseName@ when you create or modify a MySQL endpoint
    -- replicates all the task tables to this single database. For MySQL
    -- endpoints, you specify the database only when you specify the schema in
    -- the table-mapping rules of the DMS task.
    MySQLSettings -> Maybe Text
databaseName :: Prelude.Maybe Prelude.Text,
    -- | Specifies a script to run immediately after DMS connects to the
    -- endpoint. The migration task continues running regardless if the SQL
    -- statement succeeds or fails.
    --
    -- For this parameter, provide the code of the script itself, not the name
    -- of a file containing the script.
    MySQLSettings -> Maybe Text
afterConnectScript :: Prelude.Maybe Prelude.Text,
    -- | The full ARN, partial ARN, or friendly name of the
    -- @SecretsManagerSecret@ that contains the MySQL endpoint connection
    -- details.
    MySQLSettings -> Maybe Text
secretsManagerSecretId :: Prelude.Maybe Prelude.Text,
    -- | Specifies the time zone for the source MySQL database.
    --
    -- Example: @serverTimezone=US\/Pacific;@
    --
    -- Note: Do not enclose time zones in single quotes.
    MySQLSettings -> Maybe Text
serverTimezone :: Prelude.Maybe Prelude.Text,
    -- | Endpoint TCP port.
    MySQLSettings -> Maybe Int
port :: Prelude.Maybe Prelude.Int
  }
  deriving (MySQLSettings -> MySQLSettings -> Bool
(MySQLSettings -> MySQLSettings -> Bool)
-> (MySQLSettings -> MySQLSettings -> Bool) -> Eq MySQLSettings
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: MySQLSettings -> MySQLSettings -> Bool
$c/= :: MySQLSettings -> MySQLSettings -> Bool
== :: MySQLSettings -> MySQLSettings -> Bool
$c== :: MySQLSettings -> MySQLSettings -> Bool
Prelude.Eq, Int -> MySQLSettings -> ShowS
[MySQLSettings] -> ShowS
MySQLSettings -> String
(Int -> MySQLSettings -> ShowS)
-> (MySQLSettings -> String)
-> ([MySQLSettings] -> ShowS)
-> Show MySQLSettings
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [MySQLSettings] -> ShowS
$cshowList :: [MySQLSettings] -> ShowS
show :: MySQLSettings -> String
$cshow :: MySQLSettings -> String
showsPrec :: Int -> MySQLSettings -> ShowS
$cshowsPrec :: Int -> MySQLSettings -> ShowS
Prelude.Show, (forall x. MySQLSettings -> Rep MySQLSettings x)
-> (forall x. Rep MySQLSettings x -> MySQLSettings)
-> Generic MySQLSettings
forall x. Rep MySQLSettings x -> MySQLSettings
forall x. MySQLSettings -> Rep MySQLSettings x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep MySQLSettings x -> MySQLSettings
$cfrom :: forall x. MySQLSettings -> Rep MySQLSettings x
Prelude.Generic)

-- |
-- Create a value of 'MySQLSettings' 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:
--
-- 'maxFileSize', 'mySQLSettings_maxFileSize' - Specifies the maximum size (in KB) of any .csv file used to transfer
-- data to a MySQL-compatible database.
--
-- Example: @maxFileSize=512@
--
-- 'targetDbType', 'mySQLSettings_targetDbType' - Specifies where to migrate source tables on the target, either to a
-- single database or multiple databases.
--
-- Example: @targetDbType=MULTIPLE_DATABASES@
--
-- 'serverName', 'mySQLSettings_serverName' - Fully qualified domain name of the endpoint.
--
-- 'cleanSourceMetadataOnMismatch', 'mySQLSettings_cleanSourceMetadataOnMismatch' - Adjusts the behavior of DMS when migrating from an SQL Server source
-- database that is hosted as part of an Always On availability group
-- cluster. If you need DMS to poll all the nodes in the Always On cluster
-- for transaction backups, set this attribute to @false@.
--
-- 'parallelLoadThreads', 'mySQLSettings_parallelLoadThreads' - Improves performance when loading data into the MySQL-compatible target
-- database. Specifies how many threads to use to load the data into the
-- MySQL-compatible target database. Setting a large number of threads can
-- have an adverse effect on database performance, because a separate
-- connection is required for each thread.
--
-- Example: @parallelLoadThreads=1@
--
-- 'secretsManagerAccessRoleArn', 'mySQLSettings_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 MySQL 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/.
--
-- 'username', 'mySQLSettings_username' - Endpoint connection user name.
--
-- 'password', 'mySQLSettings_password' - Endpoint connection password.
--
-- 'eventsPollInterval', 'mySQLSettings_eventsPollInterval' - Specifies how often to check the binary log for new changes\/events when
-- the database is idle.
--
-- Example: @eventsPollInterval=5;@
--
-- In the example, DMS checks for changes in the binary logs every five
-- seconds.
--
-- 'databaseName', 'mySQLSettings_databaseName' - Database name for the endpoint. For a MySQL source or target endpoint,
-- don\'t explicitly specify the database using the @DatabaseName@ request
-- parameter on either the @CreateEndpoint@ or @ModifyEndpoint@ API call.
-- Specifying @DatabaseName@ when you create or modify a MySQL endpoint
-- replicates all the task tables to this single database. For MySQL
-- endpoints, you specify the database only when you specify the schema in
-- the table-mapping rules of the DMS task.
--
-- 'afterConnectScript', 'mySQLSettings_afterConnectScript' - Specifies a script to run immediately after DMS connects to the
-- endpoint. The migration task continues running regardless if the SQL
-- statement succeeds or fails.
--
-- For this parameter, provide the code of the script itself, not the name
-- of a file containing the script.
--
-- 'secretsManagerSecretId', 'mySQLSettings_secretsManagerSecretId' - The full ARN, partial ARN, or friendly name of the
-- @SecretsManagerSecret@ that contains the MySQL endpoint connection
-- details.
--
-- 'serverTimezone', 'mySQLSettings_serverTimezone' - Specifies the time zone for the source MySQL database.
--
-- Example: @serverTimezone=US\/Pacific;@
--
-- Note: Do not enclose time zones in single quotes.
--
-- 'port', 'mySQLSettings_port' - Endpoint TCP port.
newMySQLSettings ::
  MySQLSettings
newMySQLSettings :: MySQLSettings
newMySQLSettings =
  MySQLSettings' :: Maybe Int
-> Maybe TargetDbType
-> Maybe Text
-> Maybe Bool
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe (Sensitive Text)
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> MySQLSettings
MySQLSettings'
    { $sel:maxFileSize:MySQLSettings' :: Maybe Int
maxFileSize = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:targetDbType:MySQLSettings' :: Maybe TargetDbType
targetDbType = Maybe TargetDbType
forall a. Maybe a
Prelude.Nothing,
      $sel:serverName:MySQLSettings' :: Maybe Text
serverName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:cleanSourceMetadataOnMismatch:MySQLSettings' :: Maybe Bool
cleanSourceMetadataOnMismatch = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:parallelLoadThreads:MySQLSettings' :: Maybe Int
parallelLoadThreads = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:secretsManagerAccessRoleArn:MySQLSettings' :: Maybe Text
secretsManagerAccessRoleArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:username:MySQLSettings' :: Maybe Text
username = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:password:MySQLSettings' :: Maybe (Sensitive Text)
password = Maybe (Sensitive Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:eventsPollInterval:MySQLSettings' :: Maybe Int
eventsPollInterval = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:databaseName:MySQLSettings' :: Maybe Text
databaseName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:afterConnectScript:MySQLSettings' :: Maybe Text
afterConnectScript = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:secretsManagerSecretId:MySQLSettings' :: Maybe Text
secretsManagerSecretId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:serverTimezone:MySQLSettings' :: Maybe Text
serverTimezone = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:port:MySQLSettings' :: Maybe Int
port = Maybe Int
forall a. Maybe a
Prelude.Nothing
    }

-- | Specifies the maximum size (in KB) of any .csv file used to transfer
-- data to a MySQL-compatible database.
--
-- Example: @maxFileSize=512@
mySQLSettings_maxFileSize :: Lens.Lens' MySQLSettings (Prelude.Maybe Prelude.Int)
mySQLSettings_maxFileSize :: (Maybe Int -> f (Maybe Int)) -> MySQLSettings -> f MySQLSettings
mySQLSettings_maxFileSize = (MySQLSettings -> Maybe Int)
-> (MySQLSettings -> Maybe Int -> MySQLSettings)
-> Lens MySQLSettings MySQLSettings (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MySQLSettings' {Maybe Int
maxFileSize :: Maybe Int
$sel:maxFileSize:MySQLSettings' :: MySQLSettings -> Maybe Int
maxFileSize} -> Maybe Int
maxFileSize) (\s :: MySQLSettings
s@MySQLSettings' {} Maybe Int
a -> MySQLSettings
s {$sel:maxFileSize:MySQLSettings' :: Maybe Int
maxFileSize = Maybe Int
a} :: MySQLSettings)

-- | Specifies where to migrate source tables on the target, either to a
-- single database or multiple databases.
--
-- Example: @targetDbType=MULTIPLE_DATABASES@
mySQLSettings_targetDbType :: Lens.Lens' MySQLSettings (Prelude.Maybe TargetDbType)
mySQLSettings_targetDbType :: (Maybe TargetDbType -> f (Maybe TargetDbType))
-> MySQLSettings -> f MySQLSettings
mySQLSettings_targetDbType = (MySQLSettings -> Maybe TargetDbType)
-> (MySQLSettings -> Maybe TargetDbType -> MySQLSettings)
-> Lens
     MySQLSettings
     MySQLSettings
     (Maybe TargetDbType)
     (Maybe TargetDbType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MySQLSettings' {Maybe TargetDbType
targetDbType :: Maybe TargetDbType
$sel:targetDbType:MySQLSettings' :: MySQLSettings -> Maybe TargetDbType
targetDbType} -> Maybe TargetDbType
targetDbType) (\s :: MySQLSettings
s@MySQLSettings' {} Maybe TargetDbType
a -> MySQLSettings
s {$sel:targetDbType:MySQLSettings' :: Maybe TargetDbType
targetDbType = Maybe TargetDbType
a} :: MySQLSettings)

-- | Fully qualified domain name of the endpoint.
mySQLSettings_serverName :: Lens.Lens' MySQLSettings (Prelude.Maybe Prelude.Text)
mySQLSettings_serverName :: (Maybe Text -> f (Maybe Text)) -> MySQLSettings -> f MySQLSettings
mySQLSettings_serverName = (MySQLSettings -> Maybe Text)
-> (MySQLSettings -> Maybe Text -> MySQLSettings)
-> Lens MySQLSettings MySQLSettings (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MySQLSettings' {Maybe Text
serverName :: Maybe Text
$sel:serverName:MySQLSettings' :: MySQLSettings -> Maybe Text
serverName} -> Maybe Text
serverName) (\s :: MySQLSettings
s@MySQLSettings' {} Maybe Text
a -> MySQLSettings
s {$sel:serverName:MySQLSettings' :: Maybe Text
serverName = Maybe Text
a} :: MySQLSettings)

-- | Adjusts the behavior of DMS when migrating from an SQL Server source
-- database that is hosted as part of an Always On availability group
-- cluster. If you need DMS to poll all the nodes in the Always On cluster
-- for transaction backups, set this attribute to @false@.
mySQLSettings_cleanSourceMetadataOnMismatch :: Lens.Lens' MySQLSettings (Prelude.Maybe Prelude.Bool)
mySQLSettings_cleanSourceMetadataOnMismatch :: (Maybe Bool -> f (Maybe Bool)) -> MySQLSettings -> f MySQLSettings
mySQLSettings_cleanSourceMetadataOnMismatch = (MySQLSettings -> Maybe Bool)
-> (MySQLSettings -> Maybe Bool -> MySQLSettings)
-> Lens MySQLSettings MySQLSettings (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MySQLSettings' {Maybe Bool
cleanSourceMetadataOnMismatch :: Maybe Bool
$sel:cleanSourceMetadataOnMismatch:MySQLSettings' :: MySQLSettings -> Maybe Bool
cleanSourceMetadataOnMismatch} -> Maybe Bool
cleanSourceMetadataOnMismatch) (\s :: MySQLSettings
s@MySQLSettings' {} Maybe Bool
a -> MySQLSettings
s {$sel:cleanSourceMetadataOnMismatch:MySQLSettings' :: Maybe Bool
cleanSourceMetadataOnMismatch = Maybe Bool
a} :: MySQLSettings)

-- | Improves performance when loading data into the MySQL-compatible target
-- database. Specifies how many threads to use to load the data into the
-- MySQL-compatible target database. Setting a large number of threads can
-- have an adverse effect on database performance, because a separate
-- connection is required for each thread.
--
-- Example: @parallelLoadThreads=1@
mySQLSettings_parallelLoadThreads :: Lens.Lens' MySQLSettings (Prelude.Maybe Prelude.Int)
mySQLSettings_parallelLoadThreads :: (Maybe Int -> f (Maybe Int)) -> MySQLSettings -> f MySQLSettings
mySQLSettings_parallelLoadThreads = (MySQLSettings -> Maybe Int)
-> (MySQLSettings -> Maybe Int -> MySQLSettings)
-> Lens MySQLSettings MySQLSettings (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MySQLSettings' {Maybe Int
parallelLoadThreads :: Maybe Int
$sel:parallelLoadThreads:MySQLSettings' :: MySQLSettings -> Maybe Int
parallelLoadThreads} -> Maybe Int
parallelLoadThreads) (\s :: MySQLSettings
s@MySQLSettings' {} Maybe Int
a -> MySQLSettings
s {$sel:parallelLoadThreads:MySQLSettings' :: Maybe Int
parallelLoadThreads = Maybe Int
a} :: MySQLSettings)

-- | 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 MySQL 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/.
mySQLSettings_secretsManagerAccessRoleArn :: Lens.Lens' MySQLSettings (Prelude.Maybe Prelude.Text)
mySQLSettings_secretsManagerAccessRoleArn :: (Maybe Text -> f (Maybe Text)) -> MySQLSettings -> f MySQLSettings
mySQLSettings_secretsManagerAccessRoleArn = (MySQLSettings -> Maybe Text)
-> (MySQLSettings -> Maybe Text -> MySQLSettings)
-> Lens MySQLSettings MySQLSettings (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MySQLSettings' {Maybe Text
secretsManagerAccessRoleArn :: Maybe Text
$sel:secretsManagerAccessRoleArn:MySQLSettings' :: MySQLSettings -> Maybe Text
secretsManagerAccessRoleArn} -> Maybe Text
secretsManagerAccessRoleArn) (\s :: MySQLSettings
s@MySQLSettings' {} Maybe Text
a -> MySQLSettings
s {$sel:secretsManagerAccessRoleArn:MySQLSettings' :: Maybe Text
secretsManagerAccessRoleArn = Maybe Text
a} :: MySQLSettings)

-- | Endpoint connection user name.
mySQLSettings_username :: Lens.Lens' MySQLSettings (Prelude.Maybe Prelude.Text)
mySQLSettings_username :: (Maybe Text -> f (Maybe Text)) -> MySQLSettings -> f MySQLSettings
mySQLSettings_username = (MySQLSettings -> Maybe Text)
-> (MySQLSettings -> Maybe Text -> MySQLSettings)
-> Lens MySQLSettings MySQLSettings (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MySQLSettings' {Maybe Text
username :: Maybe Text
$sel:username:MySQLSettings' :: MySQLSettings -> Maybe Text
username} -> Maybe Text
username) (\s :: MySQLSettings
s@MySQLSettings' {} Maybe Text
a -> MySQLSettings
s {$sel:username:MySQLSettings' :: Maybe Text
username = Maybe Text
a} :: MySQLSettings)

-- | Endpoint connection password.
mySQLSettings_password :: Lens.Lens' MySQLSettings (Prelude.Maybe Prelude.Text)
mySQLSettings_password :: (Maybe Text -> f (Maybe Text)) -> MySQLSettings -> f MySQLSettings
mySQLSettings_password = (MySQLSettings -> Maybe (Sensitive Text))
-> (MySQLSettings -> Maybe (Sensitive Text) -> MySQLSettings)
-> Lens
     MySQLSettings
     MySQLSettings
     (Maybe (Sensitive Text))
     (Maybe (Sensitive Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MySQLSettings' {Maybe (Sensitive Text)
password :: Maybe (Sensitive Text)
$sel:password:MySQLSettings' :: MySQLSettings -> Maybe (Sensitive Text)
password} -> Maybe (Sensitive Text)
password) (\s :: MySQLSettings
s@MySQLSettings' {} Maybe (Sensitive Text)
a -> MySQLSettings
s {$sel:password:MySQLSettings' :: Maybe (Sensitive Text)
password = Maybe (Sensitive Text)
a} :: MySQLSettings) ((Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
 -> MySQLSettings -> f MySQLSettings)
-> ((Maybe Text -> f (Maybe Text))
    -> Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> (Maybe Text -> f (Maybe Text))
-> MySQLSettings
-> f MySQLSettings
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso (Sensitive Text) (Sensitive Text) Text Text
-> Iso
     (Maybe (Sensitive Text))
     (Maybe (Sensitive Text))
     (Maybe Text)
     (Maybe Text)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso (Sensitive Text) (Sensitive Text) Text Text
forall a. Iso' (Sensitive a) a
Core._Sensitive

-- | Specifies how often to check the binary log for new changes\/events when
-- the database is idle.
--
-- Example: @eventsPollInterval=5;@
--
-- In the example, DMS checks for changes in the binary logs every five
-- seconds.
mySQLSettings_eventsPollInterval :: Lens.Lens' MySQLSettings (Prelude.Maybe Prelude.Int)
mySQLSettings_eventsPollInterval :: (Maybe Int -> f (Maybe Int)) -> MySQLSettings -> f MySQLSettings
mySQLSettings_eventsPollInterval = (MySQLSettings -> Maybe Int)
-> (MySQLSettings -> Maybe Int -> MySQLSettings)
-> Lens MySQLSettings MySQLSettings (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MySQLSettings' {Maybe Int
eventsPollInterval :: Maybe Int
$sel:eventsPollInterval:MySQLSettings' :: MySQLSettings -> Maybe Int
eventsPollInterval} -> Maybe Int
eventsPollInterval) (\s :: MySQLSettings
s@MySQLSettings' {} Maybe Int
a -> MySQLSettings
s {$sel:eventsPollInterval:MySQLSettings' :: Maybe Int
eventsPollInterval = Maybe Int
a} :: MySQLSettings)

-- | Database name for the endpoint. For a MySQL source or target endpoint,
-- don\'t explicitly specify the database using the @DatabaseName@ request
-- parameter on either the @CreateEndpoint@ or @ModifyEndpoint@ API call.
-- Specifying @DatabaseName@ when you create or modify a MySQL endpoint
-- replicates all the task tables to this single database. For MySQL
-- endpoints, you specify the database only when you specify the schema in
-- the table-mapping rules of the DMS task.
mySQLSettings_databaseName :: Lens.Lens' MySQLSettings (Prelude.Maybe Prelude.Text)
mySQLSettings_databaseName :: (Maybe Text -> f (Maybe Text)) -> MySQLSettings -> f MySQLSettings
mySQLSettings_databaseName = (MySQLSettings -> Maybe Text)
-> (MySQLSettings -> Maybe Text -> MySQLSettings)
-> Lens MySQLSettings MySQLSettings (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MySQLSettings' {Maybe Text
databaseName :: Maybe Text
$sel:databaseName:MySQLSettings' :: MySQLSettings -> Maybe Text
databaseName} -> Maybe Text
databaseName) (\s :: MySQLSettings
s@MySQLSettings' {} Maybe Text
a -> MySQLSettings
s {$sel:databaseName:MySQLSettings' :: Maybe Text
databaseName = Maybe Text
a} :: MySQLSettings)

-- | Specifies a script to run immediately after DMS connects to the
-- endpoint. The migration task continues running regardless if the SQL
-- statement succeeds or fails.
--
-- For this parameter, provide the code of the script itself, not the name
-- of a file containing the script.
mySQLSettings_afterConnectScript :: Lens.Lens' MySQLSettings (Prelude.Maybe Prelude.Text)
mySQLSettings_afterConnectScript :: (Maybe Text -> f (Maybe Text)) -> MySQLSettings -> f MySQLSettings
mySQLSettings_afterConnectScript = (MySQLSettings -> Maybe Text)
-> (MySQLSettings -> Maybe Text -> MySQLSettings)
-> Lens MySQLSettings MySQLSettings (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MySQLSettings' {Maybe Text
afterConnectScript :: Maybe Text
$sel:afterConnectScript:MySQLSettings' :: MySQLSettings -> Maybe Text
afterConnectScript} -> Maybe Text
afterConnectScript) (\s :: MySQLSettings
s@MySQLSettings' {} Maybe Text
a -> MySQLSettings
s {$sel:afterConnectScript:MySQLSettings' :: Maybe Text
afterConnectScript = Maybe Text
a} :: MySQLSettings)

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

-- | Specifies the time zone for the source MySQL database.
--
-- Example: @serverTimezone=US\/Pacific;@
--
-- Note: Do not enclose time zones in single quotes.
mySQLSettings_serverTimezone :: Lens.Lens' MySQLSettings (Prelude.Maybe Prelude.Text)
mySQLSettings_serverTimezone :: (Maybe Text -> f (Maybe Text)) -> MySQLSettings -> f MySQLSettings
mySQLSettings_serverTimezone = (MySQLSettings -> Maybe Text)
-> (MySQLSettings -> Maybe Text -> MySQLSettings)
-> Lens MySQLSettings MySQLSettings (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MySQLSettings' {Maybe Text
serverTimezone :: Maybe Text
$sel:serverTimezone:MySQLSettings' :: MySQLSettings -> Maybe Text
serverTimezone} -> Maybe Text
serverTimezone) (\s :: MySQLSettings
s@MySQLSettings' {} Maybe Text
a -> MySQLSettings
s {$sel:serverTimezone:MySQLSettings' :: Maybe Text
serverTimezone = Maybe Text
a} :: MySQLSettings)

-- | Endpoint TCP port.
mySQLSettings_port :: Lens.Lens' MySQLSettings (Prelude.Maybe Prelude.Int)
mySQLSettings_port :: (Maybe Int -> f (Maybe Int)) -> MySQLSettings -> f MySQLSettings
mySQLSettings_port = (MySQLSettings -> Maybe Int)
-> (MySQLSettings -> Maybe Int -> MySQLSettings)
-> Lens MySQLSettings MySQLSettings (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MySQLSettings' {Maybe Int
port :: Maybe Int
$sel:port:MySQLSettings' :: MySQLSettings -> Maybe Int
port} -> Maybe Int
port) (\s :: MySQLSettings
s@MySQLSettings' {} Maybe Int
a -> MySQLSettings
s {$sel:port:MySQLSettings' :: Maybe Int
port = Maybe Int
a} :: MySQLSettings)

instance Core.FromJSON MySQLSettings where
  parseJSON :: Value -> Parser MySQLSettings
parseJSON =
    String
-> (Object -> Parser MySQLSettings)
-> Value
-> Parser MySQLSettings
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"MySQLSettings"
      ( \Object
x ->
          Maybe Int
-> Maybe TargetDbType
-> Maybe Text
-> Maybe Bool
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe (Sensitive Text)
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> MySQLSettings
MySQLSettings'
            (Maybe Int
 -> Maybe TargetDbType
 -> Maybe Text
 -> Maybe Bool
 -> Maybe Int
 -> Maybe Text
 -> Maybe Text
 -> Maybe (Sensitive Text)
 -> Maybe Int
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Int
 -> MySQLSettings)
-> Parser (Maybe Int)
-> Parser
     (Maybe TargetDbType
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe (Sensitive Text)
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> MySQLSettings)
forall (f :: * -> *) a b. Functor 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
"MaxFileSize")
            Parser
  (Maybe TargetDbType
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe (Sensitive Text)
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> MySQLSettings)
-> Parser (Maybe TargetDbType)
-> Parser
     (Maybe Text
      -> Maybe Bool
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe (Sensitive Text)
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> MySQLSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe TargetDbType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"TargetDbType")
            Parser
  (Maybe Text
   -> Maybe Bool
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe (Sensitive Text)
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> MySQLSettings)
-> Parser (Maybe Text)
-> Parser
     (Maybe Bool
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe (Sensitive Text)
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> MySQLSettings)
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
"ServerName")
            Parser
  (Maybe Bool
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe (Sensitive Text)
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> MySQLSettings)
-> Parser (Maybe Bool)
-> Parser
     (Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe (Sensitive Text)
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> MySQLSettings)
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
"CleanSourceMetadataOnMismatch")
            Parser
  (Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe (Sensitive Text)
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> MySQLSettings)
-> Parser (Maybe Int)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe (Sensitive Text)
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> MySQLSettings)
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
"ParallelLoadThreads")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe (Sensitive Text)
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> MySQLSettings)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe (Sensitive Text)
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> MySQLSettings)
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 Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> MySQLSettings)
-> Parser (Maybe Text)
-> Parser
     (Maybe (Sensitive Text)
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> MySQLSettings)
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 Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> MySQLSettings)
-> Parser (Maybe (Sensitive Text))
-> Parser
     (Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> MySQLSettings)
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 Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> MySQLSettings)
-> Parser (Maybe Int)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> MySQLSettings)
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
"EventsPollInterval")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> MySQLSettings)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text -> Maybe Text -> Maybe Int -> MySQLSettings)
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 Int -> MySQLSettings)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> Maybe Int -> MySQLSettings)
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
"AfterConnectScript")
            Parser (Maybe Text -> Maybe Text -> Maybe Int -> MySQLSettings)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Int -> MySQLSettings)
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 Int -> MySQLSettings)
-> Parser (Maybe Text) -> Parser (Maybe Int -> MySQLSettings)
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
"ServerTimezone")
            Parser (Maybe Int -> MySQLSettings)
-> Parser (Maybe Int) -> Parser MySQLSettings
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 MySQLSettings

instance Prelude.NFData MySQLSettings

instance Core.ToJSON MySQLSettings where
  toJSON :: MySQLSettings -> Value
toJSON MySQLSettings' {Maybe Bool
Maybe Int
Maybe Text
Maybe (Sensitive Text)
Maybe TargetDbType
port :: Maybe Int
serverTimezone :: Maybe Text
secretsManagerSecretId :: Maybe Text
afterConnectScript :: Maybe Text
databaseName :: Maybe Text
eventsPollInterval :: Maybe Int
password :: Maybe (Sensitive Text)
username :: Maybe Text
secretsManagerAccessRoleArn :: Maybe Text
parallelLoadThreads :: Maybe Int
cleanSourceMetadataOnMismatch :: Maybe Bool
serverName :: Maybe Text
targetDbType :: Maybe TargetDbType
maxFileSize :: Maybe Int
$sel:port:MySQLSettings' :: MySQLSettings -> Maybe Int
$sel:serverTimezone:MySQLSettings' :: MySQLSettings -> Maybe Text
$sel:secretsManagerSecretId:MySQLSettings' :: MySQLSettings -> Maybe Text
$sel:afterConnectScript:MySQLSettings' :: MySQLSettings -> Maybe Text
$sel:databaseName:MySQLSettings' :: MySQLSettings -> Maybe Text
$sel:eventsPollInterval:MySQLSettings' :: MySQLSettings -> Maybe Int
$sel:password:MySQLSettings' :: MySQLSettings -> Maybe (Sensitive Text)
$sel:username:MySQLSettings' :: MySQLSettings -> Maybe Text
$sel:secretsManagerAccessRoleArn:MySQLSettings' :: MySQLSettings -> Maybe Text
$sel:parallelLoadThreads:MySQLSettings' :: MySQLSettings -> Maybe Int
$sel:cleanSourceMetadataOnMismatch:MySQLSettings' :: MySQLSettings -> Maybe Bool
$sel:serverName:MySQLSettings' :: MySQLSettings -> Maybe Text
$sel:targetDbType:MySQLSettings' :: MySQLSettings -> Maybe TargetDbType
$sel:maxFileSize:MySQLSettings' :: MySQLSettings -> Maybe Int
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"MaxFileSize" 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
maxFileSize,
            (Text
"TargetDbType" Text -> TargetDbType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (TargetDbType -> Pair) -> Maybe TargetDbType -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe TargetDbType
targetDbType,
            (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
"CleanSourceMetadataOnMismatch" 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
cleanSourceMetadataOnMismatch,
            (Text
"ParallelLoadThreads" 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
parallelLoadThreads,
            (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
"EventsPollInterval" 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
eventsPollInterval,
            (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
"AfterConnectScript" 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
afterConnectScript,
            (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
"ServerTimezone" 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
serverTimezone,
            (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
          ]
      )