{-# 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.PostgreSQLSettings
-- 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.PostgreSQLSettings where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import Amazonka.DMS.Types.PluginNameValue
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude

-- | Provides information that defines a PostgreSQL endpoint.
--
-- /See:/ 'newPostgreSQLSettings' smart constructor.
data PostgreSQLSettings = PostgreSQLSettings'
  { -- | For use with change data capture (CDC) only, this attribute has DMS
    -- bypass foreign keys and user triggers to reduce the time it takes to
    -- bulk load data.
    --
    -- Example: @afterConnectScript=SET session_replication_role=\'replica\'@
    PostgreSQLSettings -> Maybe Text
afterConnectScript :: Prelude.Maybe Prelude.Text,
    -- | To capture DDL events, DMS creates various artifacts in the PostgreSQL
    -- database when the task starts. You can later remove these artifacts.
    --
    -- If this value is set to @N@, you don\'t have to create tables or
    -- triggers on the source database.
    PostgreSQLSettings -> Maybe Bool
captureDdls :: Prelude.Maybe Prelude.Bool,
    -- | Database name for the endpoint.
    PostgreSQLSettings -> Maybe Text
databaseName :: Prelude.Maybe Prelude.Text,
    -- | The schema in which the operational DDL database artifacts are created.
    --
    -- Example: @ddlArtifactsSchema=xyzddlschema;@
    PostgreSQLSettings -> Maybe Text
ddlArtifactsSchema :: Prelude.Maybe Prelude.Text,
    -- | Sets the client statement timeout for the PostgreSQL instance, in
    -- seconds. The default value is 60 seconds.
    --
    -- Example: @executeTimeout=100;@
    PostgreSQLSettings -> Maybe Int
executeTimeout :: Prelude.Maybe Prelude.Int,
    -- | When set to @true@, this value causes a task to fail if the actual size
    -- of a LOB column is greater than the specified @LobMaxSize@.
    --
    -- If task is set to Limited LOB mode and this option is set to true, the
    -- task fails instead of truncating the LOB data.
    PostgreSQLSettings -> Maybe Bool
failTasksOnLobTruncation :: Prelude.Maybe Prelude.Bool,
    -- | The write-ahead log (WAL) heartbeat feature mimics a dummy transaction.
    -- By doing this, it prevents idle logical replication slots from holding
    -- onto old WAL logs, which can result in storage full situations on the
    -- source. This heartbeat keeps @restart_lsn@ moving and prevents storage
    -- full scenarios.
    PostgreSQLSettings -> Maybe Bool
heartbeatEnable :: Prelude.Maybe Prelude.Bool,
    -- | Sets the WAL heartbeat frequency (in minutes).
    PostgreSQLSettings -> Maybe Int
heartbeatFrequency :: Prelude.Maybe Prelude.Int,
    -- | Sets the schema in which the heartbeat artifacts are created.
    PostgreSQLSettings -> Maybe Text
heartbeatSchema :: Prelude.Maybe Prelude.Text,
    -- | Specifies the maximum size (in KB) of any .csv file used to transfer
    -- data to PostgreSQL.
    --
    -- Example: @maxFileSize=512@
    PostgreSQLSettings -> Maybe Int
maxFileSize :: Prelude.Maybe Prelude.Int,
    -- | Endpoint connection password.
    PostgreSQLSettings -> Maybe (Sensitive Text)
password :: Prelude.Maybe (Data.Sensitive Prelude.Text),
    -- | Specifies the plugin to use to create a replication slot.
    PostgreSQLSettings -> Maybe PluginNameValue
pluginName :: Prelude.Maybe PluginNameValue,
    -- | Endpoint TCP port. The default is 5432.
    PostgreSQLSettings -> 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 PostgreSQL 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/.
    PostgreSQLSettings -> Maybe Text
secretsManagerAccessRoleArn :: Prelude.Maybe Prelude.Text,
    -- | The full ARN, partial ARN, or friendly name of the
    -- @SecretsManagerSecret@ that contains the PostgreSQL endpoint connection
    -- details.
    PostgreSQLSettings -> Maybe Text
secretsManagerSecretId :: Prelude.Maybe Prelude.Text,
    -- | Fully qualified domain name of the endpoint.
    PostgreSQLSettings -> Maybe Text
serverName :: Prelude.Maybe Prelude.Text,
    -- | Sets the name of a previously created logical replication slot for a
    -- change data capture (CDC) load of the PostgreSQL source instance.
    --
    -- When used with the @CdcStartPosition@ request parameter for the DMS API
    -- , this attribute also makes it possible to use native CDC start points.
    -- DMS verifies that the specified logical replication slot exists before
    -- starting the CDC load task. It also verifies that the task was created
    -- with a valid setting of @CdcStartPosition@. If the specified slot
    -- doesn\'t exist or the task doesn\'t have a valid @CdcStartPosition@
    -- setting, DMS raises an error.
    --
    -- For more information about setting the @CdcStartPosition@ request
    -- parameter, see
    -- <dms/latest/userguide/CHAP_Task.CDC.html#CHAP_Task.CDC.StartPoint.Native Determining a CDC native start point>
    -- in the /Database Migration Service User Guide/. For more information
    -- about using @CdcStartPosition@, see
    -- <https://docs.aws.amazon.com/dms/latest/APIReference/API_CreateReplicationTask.html CreateReplicationTask>,
    -- <https://docs.aws.amazon.com/dms/latest/APIReference/API_StartReplicationTask.html StartReplicationTask>,
    -- and
    -- <https://docs.aws.amazon.com/dms/latest/APIReference/API_ModifyReplicationTask.html ModifyReplicationTask>.
    PostgreSQLSettings -> Maybe Text
slotName :: Prelude.Maybe Prelude.Text,
    -- | Use the @TrimSpaceInChar@ source endpoint setting to trim data on CHAR
    -- and NCHAR data types during migration. The default value is @true@.
    PostgreSQLSettings -> Maybe Bool
trimSpaceInChar :: Prelude.Maybe Prelude.Bool,
    -- | Endpoint connection user name.
    PostgreSQLSettings -> Maybe Text
username :: Prelude.Maybe Prelude.Text
  }
  deriving (PostgreSQLSettings -> PostgreSQLSettings -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PostgreSQLSettings -> PostgreSQLSettings -> Bool
$c/= :: PostgreSQLSettings -> PostgreSQLSettings -> Bool
== :: PostgreSQLSettings -> PostgreSQLSettings -> Bool
$c== :: PostgreSQLSettings -> PostgreSQLSettings -> Bool
Prelude.Eq, Int -> PostgreSQLSettings -> ShowS
[PostgreSQLSettings] -> ShowS
PostgreSQLSettings -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PostgreSQLSettings] -> ShowS
$cshowList :: [PostgreSQLSettings] -> ShowS
show :: PostgreSQLSettings -> String
$cshow :: PostgreSQLSettings -> String
showsPrec :: Int -> PostgreSQLSettings -> ShowS
$cshowsPrec :: Int -> PostgreSQLSettings -> ShowS
Prelude.Show, forall x. Rep PostgreSQLSettings x -> PostgreSQLSettings
forall x. PostgreSQLSettings -> Rep PostgreSQLSettings x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep PostgreSQLSettings x -> PostgreSQLSettings
$cfrom :: forall x. PostgreSQLSettings -> Rep PostgreSQLSettings x
Prelude.Generic)

-- |
-- Create a value of 'PostgreSQLSettings' 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:
--
-- 'afterConnectScript', 'postgreSQLSettings_afterConnectScript' - For use with change data capture (CDC) only, this attribute has DMS
-- bypass foreign keys and user triggers to reduce the time it takes to
-- bulk load data.
--
-- Example: @afterConnectScript=SET session_replication_role=\'replica\'@
--
-- 'captureDdls', 'postgreSQLSettings_captureDdls' - To capture DDL events, DMS creates various artifacts in the PostgreSQL
-- database when the task starts. You can later remove these artifacts.
--
-- If this value is set to @N@, you don\'t have to create tables or
-- triggers on the source database.
--
-- 'databaseName', 'postgreSQLSettings_databaseName' - Database name for the endpoint.
--
-- 'ddlArtifactsSchema', 'postgreSQLSettings_ddlArtifactsSchema' - The schema in which the operational DDL database artifacts are created.
--
-- Example: @ddlArtifactsSchema=xyzddlschema;@
--
-- 'executeTimeout', 'postgreSQLSettings_executeTimeout' - Sets the client statement timeout for the PostgreSQL instance, in
-- seconds. The default value is 60 seconds.
--
-- Example: @executeTimeout=100;@
--
-- 'failTasksOnLobTruncation', 'postgreSQLSettings_failTasksOnLobTruncation' - When set to @true@, this value causes a task to fail if the actual size
-- of a LOB column is greater than the specified @LobMaxSize@.
--
-- If task is set to Limited LOB mode and this option is set to true, the
-- task fails instead of truncating the LOB data.
--
-- 'heartbeatEnable', 'postgreSQLSettings_heartbeatEnable' - The write-ahead log (WAL) heartbeat feature mimics a dummy transaction.
-- By doing this, it prevents idle logical replication slots from holding
-- onto old WAL logs, which can result in storage full situations on the
-- source. This heartbeat keeps @restart_lsn@ moving and prevents storage
-- full scenarios.
--
-- 'heartbeatFrequency', 'postgreSQLSettings_heartbeatFrequency' - Sets the WAL heartbeat frequency (in minutes).
--
-- 'heartbeatSchema', 'postgreSQLSettings_heartbeatSchema' - Sets the schema in which the heartbeat artifacts are created.
--
-- 'maxFileSize', 'postgreSQLSettings_maxFileSize' - Specifies the maximum size (in KB) of any .csv file used to transfer
-- data to PostgreSQL.
--
-- Example: @maxFileSize=512@
--
-- 'password', 'postgreSQLSettings_password' - Endpoint connection password.
--
-- 'pluginName', 'postgreSQLSettings_pluginName' - Specifies the plugin to use to create a replication slot.
--
-- 'port', 'postgreSQLSettings_port' - Endpoint TCP port. The default is 5432.
--
-- 'secretsManagerAccessRoleArn', 'postgreSQLSettings_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 PostgreSQL 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', 'postgreSQLSettings_secretsManagerSecretId' - The full ARN, partial ARN, or friendly name of the
-- @SecretsManagerSecret@ that contains the PostgreSQL endpoint connection
-- details.
--
-- 'serverName', 'postgreSQLSettings_serverName' - Fully qualified domain name of the endpoint.
--
-- 'slotName', 'postgreSQLSettings_slotName' - Sets the name of a previously created logical replication slot for a
-- change data capture (CDC) load of the PostgreSQL source instance.
--
-- When used with the @CdcStartPosition@ request parameter for the DMS API
-- , this attribute also makes it possible to use native CDC start points.
-- DMS verifies that the specified logical replication slot exists before
-- starting the CDC load task. It also verifies that the task was created
-- with a valid setting of @CdcStartPosition@. If the specified slot
-- doesn\'t exist or the task doesn\'t have a valid @CdcStartPosition@
-- setting, DMS raises an error.
--
-- For more information about setting the @CdcStartPosition@ request
-- parameter, see
-- <dms/latest/userguide/CHAP_Task.CDC.html#CHAP_Task.CDC.StartPoint.Native Determining a CDC native start point>
-- in the /Database Migration Service User Guide/. For more information
-- about using @CdcStartPosition@, see
-- <https://docs.aws.amazon.com/dms/latest/APIReference/API_CreateReplicationTask.html CreateReplicationTask>,
-- <https://docs.aws.amazon.com/dms/latest/APIReference/API_StartReplicationTask.html StartReplicationTask>,
-- and
-- <https://docs.aws.amazon.com/dms/latest/APIReference/API_ModifyReplicationTask.html ModifyReplicationTask>.
--
-- 'trimSpaceInChar', 'postgreSQLSettings_trimSpaceInChar' - Use the @TrimSpaceInChar@ source endpoint setting to trim data on CHAR
-- and NCHAR data types during migration. The default value is @true@.
--
-- 'username', 'postgreSQLSettings_username' - Endpoint connection user name.
newPostgreSQLSettings ::
  PostgreSQLSettings
newPostgreSQLSettings :: PostgreSQLSettings
newPostgreSQLSettings =
  PostgreSQLSettings'
    { $sel:afterConnectScript:PostgreSQLSettings' :: Maybe Text
afterConnectScript =
        forall a. Maybe a
Prelude.Nothing,
      $sel:captureDdls:PostgreSQLSettings' :: Maybe Bool
captureDdls = forall a. Maybe a
Prelude.Nothing,
      $sel:databaseName:PostgreSQLSettings' :: Maybe Text
databaseName = forall a. Maybe a
Prelude.Nothing,
      $sel:ddlArtifactsSchema:PostgreSQLSettings' :: Maybe Text
ddlArtifactsSchema = forall a. Maybe a
Prelude.Nothing,
      $sel:executeTimeout:PostgreSQLSettings' :: Maybe Int
executeTimeout = forall a. Maybe a
Prelude.Nothing,
      $sel:failTasksOnLobTruncation:PostgreSQLSettings' :: Maybe Bool
failTasksOnLobTruncation = forall a. Maybe a
Prelude.Nothing,
      $sel:heartbeatEnable:PostgreSQLSettings' :: Maybe Bool
heartbeatEnable = forall a. Maybe a
Prelude.Nothing,
      $sel:heartbeatFrequency:PostgreSQLSettings' :: Maybe Int
heartbeatFrequency = forall a. Maybe a
Prelude.Nothing,
      $sel:heartbeatSchema:PostgreSQLSettings' :: Maybe Text
heartbeatSchema = forall a. Maybe a
Prelude.Nothing,
      $sel:maxFileSize:PostgreSQLSettings' :: Maybe Int
maxFileSize = forall a. Maybe a
Prelude.Nothing,
      $sel:password:PostgreSQLSettings' :: Maybe (Sensitive Text)
password = forall a. Maybe a
Prelude.Nothing,
      $sel:pluginName:PostgreSQLSettings' :: Maybe PluginNameValue
pluginName = forall a. Maybe a
Prelude.Nothing,
      $sel:port:PostgreSQLSettings' :: Maybe Int
port = forall a. Maybe a
Prelude.Nothing,
      $sel:secretsManagerAccessRoleArn:PostgreSQLSettings' :: Maybe Text
secretsManagerAccessRoleArn = forall a. Maybe a
Prelude.Nothing,
      $sel:secretsManagerSecretId:PostgreSQLSettings' :: Maybe Text
secretsManagerSecretId = forall a. Maybe a
Prelude.Nothing,
      $sel:serverName:PostgreSQLSettings' :: Maybe Text
serverName = forall a. Maybe a
Prelude.Nothing,
      $sel:slotName:PostgreSQLSettings' :: Maybe Text
slotName = forall a. Maybe a
Prelude.Nothing,
      $sel:trimSpaceInChar:PostgreSQLSettings' :: Maybe Bool
trimSpaceInChar = forall a. Maybe a
Prelude.Nothing,
      $sel:username:PostgreSQLSettings' :: Maybe Text
username = forall a. Maybe a
Prelude.Nothing
    }

-- | For use with change data capture (CDC) only, this attribute has DMS
-- bypass foreign keys and user triggers to reduce the time it takes to
-- bulk load data.
--
-- Example: @afterConnectScript=SET session_replication_role=\'replica\'@
postgreSQLSettings_afterConnectScript :: Lens.Lens' PostgreSQLSettings (Prelude.Maybe Prelude.Text)
postgreSQLSettings_afterConnectScript :: Lens' PostgreSQLSettings (Maybe Text)
postgreSQLSettings_afterConnectScript = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PostgreSQLSettings' {Maybe Text
afterConnectScript :: Maybe Text
$sel:afterConnectScript:PostgreSQLSettings' :: PostgreSQLSettings -> Maybe Text
afterConnectScript} -> Maybe Text
afterConnectScript) (\s :: PostgreSQLSettings
s@PostgreSQLSettings' {} Maybe Text
a -> PostgreSQLSettings
s {$sel:afterConnectScript:PostgreSQLSettings' :: Maybe Text
afterConnectScript = Maybe Text
a} :: PostgreSQLSettings)

-- | To capture DDL events, DMS creates various artifacts in the PostgreSQL
-- database when the task starts. You can later remove these artifacts.
--
-- If this value is set to @N@, you don\'t have to create tables or
-- triggers on the source database.
postgreSQLSettings_captureDdls :: Lens.Lens' PostgreSQLSettings (Prelude.Maybe Prelude.Bool)
postgreSQLSettings_captureDdls :: Lens' PostgreSQLSettings (Maybe Bool)
postgreSQLSettings_captureDdls = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PostgreSQLSettings' {Maybe Bool
captureDdls :: Maybe Bool
$sel:captureDdls:PostgreSQLSettings' :: PostgreSQLSettings -> Maybe Bool
captureDdls} -> Maybe Bool
captureDdls) (\s :: PostgreSQLSettings
s@PostgreSQLSettings' {} Maybe Bool
a -> PostgreSQLSettings
s {$sel:captureDdls:PostgreSQLSettings' :: Maybe Bool
captureDdls = Maybe Bool
a} :: PostgreSQLSettings)

-- | Database name for the endpoint.
postgreSQLSettings_databaseName :: Lens.Lens' PostgreSQLSettings (Prelude.Maybe Prelude.Text)
postgreSQLSettings_databaseName :: Lens' PostgreSQLSettings (Maybe Text)
postgreSQLSettings_databaseName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PostgreSQLSettings' {Maybe Text
databaseName :: Maybe Text
$sel:databaseName:PostgreSQLSettings' :: PostgreSQLSettings -> Maybe Text
databaseName} -> Maybe Text
databaseName) (\s :: PostgreSQLSettings
s@PostgreSQLSettings' {} Maybe Text
a -> PostgreSQLSettings
s {$sel:databaseName:PostgreSQLSettings' :: Maybe Text
databaseName = Maybe Text
a} :: PostgreSQLSettings)

-- | The schema in which the operational DDL database artifacts are created.
--
-- Example: @ddlArtifactsSchema=xyzddlschema;@
postgreSQLSettings_ddlArtifactsSchema :: Lens.Lens' PostgreSQLSettings (Prelude.Maybe Prelude.Text)
postgreSQLSettings_ddlArtifactsSchema :: Lens' PostgreSQLSettings (Maybe Text)
postgreSQLSettings_ddlArtifactsSchema = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PostgreSQLSettings' {Maybe Text
ddlArtifactsSchema :: Maybe Text
$sel:ddlArtifactsSchema:PostgreSQLSettings' :: PostgreSQLSettings -> Maybe Text
ddlArtifactsSchema} -> Maybe Text
ddlArtifactsSchema) (\s :: PostgreSQLSettings
s@PostgreSQLSettings' {} Maybe Text
a -> PostgreSQLSettings
s {$sel:ddlArtifactsSchema:PostgreSQLSettings' :: Maybe Text
ddlArtifactsSchema = Maybe Text
a} :: PostgreSQLSettings)

-- | Sets the client statement timeout for the PostgreSQL instance, in
-- seconds. The default value is 60 seconds.
--
-- Example: @executeTimeout=100;@
postgreSQLSettings_executeTimeout :: Lens.Lens' PostgreSQLSettings (Prelude.Maybe Prelude.Int)
postgreSQLSettings_executeTimeout :: Lens' PostgreSQLSettings (Maybe Int)
postgreSQLSettings_executeTimeout = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PostgreSQLSettings' {Maybe Int
executeTimeout :: Maybe Int
$sel:executeTimeout:PostgreSQLSettings' :: PostgreSQLSettings -> Maybe Int
executeTimeout} -> Maybe Int
executeTimeout) (\s :: PostgreSQLSettings
s@PostgreSQLSettings' {} Maybe Int
a -> PostgreSQLSettings
s {$sel:executeTimeout:PostgreSQLSettings' :: Maybe Int
executeTimeout = Maybe Int
a} :: PostgreSQLSettings)

-- | When set to @true@, this value causes a task to fail if the actual size
-- of a LOB column is greater than the specified @LobMaxSize@.
--
-- If task is set to Limited LOB mode and this option is set to true, the
-- task fails instead of truncating the LOB data.
postgreSQLSettings_failTasksOnLobTruncation :: Lens.Lens' PostgreSQLSettings (Prelude.Maybe Prelude.Bool)
postgreSQLSettings_failTasksOnLobTruncation :: Lens' PostgreSQLSettings (Maybe Bool)
postgreSQLSettings_failTasksOnLobTruncation = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PostgreSQLSettings' {Maybe Bool
failTasksOnLobTruncation :: Maybe Bool
$sel:failTasksOnLobTruncation:PostgreSQLSettings' :: PostgreSQLSettings -> Maybe Bool
failTasksOnLobTruncation} -> Maybe Bool
failTasksOnLobTruncation) (\s :: PostgreSQLSettings
s@PostgreSQLSettings' {} Maybe Bool
a -> PostgreSQLSettings
s {$sel:failTasksOnLobTruncation:PostgreSQLSettings' :: Maybe Bool
failTasksOnLobTruncation = Maybe Bool
a} :: PostgreSQLSettings)

-- | The write-ahead log (WAL) heartbeat feature mimics a dummy transaction.
-- By doing this, it prevents idle logical replication slots from holding
-- onto old WAL logs, which can result in storage full situations on the
-- source. This heartbeat keeps @restart_lsn@ moving and prevents storage
-- full scenarios.
postgreSQLSettings_heartbeatEnable :: Lens.Lens' PostgreSQLSettings (Prelude.Maybe Prelude.Bool)
postgreSQLSettings_heartbeatEnable :: Lens' PostgreSQLSettings (Maybe Bool)
postgreSQLSettings_heartbeatEnable = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PostgreSQLSettings' {Maybe Bool
heartbeatEnable :: Maybe Bool
$sel:heartbeatEnable:PostgreSQLSettings' :: PostgreSQLSettings -> Maybe Bool
heartbeatEnable} -> Maybe Bool
heartbeatEnable) (\s :: PostgreSQLSettings
s@PostgreSQLSettings' {} Maybe Bool
a -> PostgreSQLSettings
s {$sel:heartbeatEnable:PostgreSQLSettings' :: Maybe Bool
heartbeatEnable = Maybe Bool
a} :: PostgreSQLSettings)

-- | Sets the WAL heartbeat frequency (in minutes).
postgreSQLSettings_heartbeatFrequency :: Lens.Lens' PostgreSQLSettings (Prelude.Maybe Prelude.Int)
postgreSQLSettings_heartbeatFrequency :: Lens' PostgreSQLSettings (Maybe Int)
postgreSQLSettings_heartbeatFrequency = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PostgreSQLSettings' {Maybe Int
heartbeatFrequency :: Maybe Int
$sel:heartbeatFrequency:PostgreSQLSettings' :: PostgreSQLSettings -> Maybe Int
heartbeatFrequency} -> Maybe Int
heartbeatFrequency) (\s :: PostgreSQLSettings
s@PostgreSQLSettings' {} Maybe Int
a -> PostgreSQLSettings
s {$sel:heartbeatFrequency:PostgreSQLSettings' :: Maybe Int
heartbeatFrequency = Maybe Int
a} :: PostgreSQLSettings)

-- | Sets the schema in which the heartbeat artifacts are created.
postgreSQLSettings_heartbeatSchema :: Lens.Lens' PostgreSQLSettings (Prelude.Maybe Prelude.Text)
postgreSQLSettings_heartbeatSchema :: Lens' PostgreSQLSettings (Maybe Text)
postgreSQLSettings_heartbeatSchema = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PostgreSQLSettings' {Maybe Text
heartbeatSchema :: Maybe Text
$sel:heartbeatSchema:PostgreSQLSettings' :: PostgreSQLSettings -> Maybe Text
heartbeatSchema} -> Maybe Text
heartbeatSchema) (\s :: PostgreSQLSettings
s@PostgreSQLSettings' {} Maybe Text
a -> PostgreSQLSettings
s {$sel:heartbeatSchema:PostgreSQLSettings' :: Maybe Text
heartbeatSchema = Maybe Text
a} :: PostgreSQLSettings)

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

-- | Endpoint connection password.
postgreSQLSettings_password :: Lens.Lens' PostgreSQLSettings (Prelude.Maybe Prelude.Text)
postgreSQLSettings_password :: Lens' PostgreSQLSettings (Maybe Text)
postgreSQLSettings_password = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PostgreSQLSettings' {Maybe (Sensitive Text)
password :: Maybe (Sensitive Text)
$sel:password:PostgreSQLSettings' :: PostgreSQLSettings -> Maybe (Sensitive Text)
password} -> Maybe (Sensitive Text)
password) (\s :: PostgreSQLSettings
s@PostgreSQLSettings' {} Maybe (Sensitive Text)
a -> PostgreSQLSettings
s {$sel:password:PostgreSQLSettings' :: Maybe (Sensitive Text)
password = Maybe (Sensitive Text)
a} :: PostgreSQLSettings) 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

-- | Specifies the plugin to use to create a replication slot.
postgreSQLSettings_pluginName :: Lens.Lens' PostgreSQLSettings (Prelude.Maybe PluginNameValue)
postgreSQLSettings_pluginName :: Lens' PostgreSQLSettings (Maybe PluginNameValue)
postgreSQLSettings_pluginName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PostgreSQLSettings' {Maybe PluginNameValue
pluginName :: Maybe PluginNameValue
$sel:pluginName:PostgreSQLSettings' :: PostgreSQLSettings -> Maybe PluginNameValue
pluginName} -> Maybe PluginNameValue
pluginName) (\s :: PostgreSQLSettings
s@PostgreSQLSettings' {} Maybe PluginNameValue
a -> PostgreSQLSettings
s {$sel:pluginName:PostgreSQLSettings' :: Maybe PluginNameValue
pluginName = Maybe PluginNameValue
a} :: PostgreSQLSettings)

-- | Endpoint TCP port. The default is 5432.
postgreSQLSettings_port :: Lens.Lens' PostgreSQLSettings (Prelude.Maybe Prelude.Int)
postgreSQLSettings_port :: Lens' PostgreSQLSettings (Maybe Int)
postgreSQLSettings_port = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PostgreSQLSettings' {Maybe Int
port :: Maybe Int
$sel:port:PostgreSQLSettings' :: PostgreSQLSettings -> Maybe Int
port} -> Maybe Int
port) (\s :: PostgreSQLSettings
s@PostgreSQLSettings' {} Maybe Int
a -> PostgreSQLSettings
s {$sel:port:PostgreSQLSettings' :: Maybe Int
port = Maybe Int
a} :: PostgreSQLSettings)

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

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

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

-- | Sets the name of a previously created logical replication slot for a
-- change data capture (CDC) load of the PostgreSQL source instance.
--
-- When used with the @CdcStartPosition@ request parameter for the DMS API
-- , this attribute also makes it possible to use native CDC start points.
-- DMS verifies that the specified logical replication slot exists before
-- starting the CDC load task. It also verifies that the task was created
-- with a valid setting of @CdcStartPosition@. If the specified slot
-- doesn\'t exist or the task doesn\'t have a valid @CdcStartPosition@
-- setting, DMS raises an error.
--
-- For more information about setting the @CdcStartPosition@ request
-- parameter, see
-- <dms/latest/userguide/CHAP_Task.CDC.html#CHAP_Task.CDC.StartPoint.Native Determining a CDC native start point>
-- in the /Database Migration Service User Guide/. For more information
-- about using @CdcStartPosition@, see
-- <https://docs.aws.amazon.com/dms/latest/APIReference/API_CreateReplicationTask.html CreateReplicationTask>,
-- <https://docs.aws.amazon.com/dms/latest/APIReference/API_StartReplicationTask.html StartReplicationTask>,
-- and
-- <https://docs.aws.amazon.com/dms/latest/APIReference/API_ModifyReplicationTask.html ModifyReplicationTask>.
postgreSQLSettings_slotName :: Lens.Lens' PostgreSQLSettings (Prelude.Maybe Prelude.Text)
postgreSQLSettings_slotName :: Lens' PostgreSQLSettings (Maybe Text)
postgreSQLSettings_slotName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PostgreSQLSettings' {Maybe Text
slotName :: Maybe Text
$sel:slotName:PostgreSQLSettings' :: PostgreSQLSettings -> Maybe Text
slotName} -> Maybe Text
slotName) (\s :: PostgreSQLSettings
s@PostgreSQLSettings' {} Maybe Text
a -> PostgreSQLSettings
s {$sel:slotName:PostgreSQLSettings' :: Maybe Text
slotName = Maybe Text
a} :: PostgreSQLSettings)

-- | Use the @TrimSpaceInChar@ source endpoint setting to trim data on CHAR
-- and NCHAR data types during migration. The default value is @true@.
postgreSQLSettings_trimSpaceInChar :: Lens.Lens' PostgreSQLSettings (Prelude.Maybe Prelude.Bool)
postgreSQLSettings_trimSpaceInChar :: Lens' PostgreSQLSettings (Maybe Bool)
postgreSQLSettings_trimSpaceInChar = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PostgreSQLSettings' {Maybe Bool
trimSpaceInChar :: Maybe Bool
$sel:trimSpaceInChar:PostgreSQLSettings' :: PostgreSQLSettings -> Maybe Bool
trimSpaceInChar} -> Maybe Bool
trimSpaceInChar) (\s :: PostgreSQLSettings
s@PostgreSQLSettings' {} Maybe Bool
a -> PostgreSQLSettings
s {$sel:trimSpaceInChar:PostgreSQLSettings' :: Maybe Bool
trimSpaceInChar = Maybe Bool
a} :: PostgreSQLSettings)

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

instance Data.FromJSON PostgreSQLSettings where
  parseJSON :: Value -> Parser PostgreSQLSettings
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"PostgreSQLSettings"
      ( \Object
x ->
          Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Bool
-> Maybe Bool
-> Maybe Int
-> Maybe Text
-> Maybe Int
-> Maybe (Sensitive Text)
-> Maybe PluginNameValue
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> PostgreSQLSettings
PostgreSQLSettings'
            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
"AfterConnectScript")
            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
"CaptureDdls")
            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
"DdlArtifactsSchema")
            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
"ExecuteTimeout")
            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
"FailTasksOnLobTruncation")
            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
"HeartbeatEnable")
            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
"HeartbeatFrequency")
            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
"HeartbeatSchema")
            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
"MaxFileSize")
            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
"PluginName")
            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
"SlotName")
            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
"TrimSpaceInChar")
            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 PostgreSQLSettings where
  hashWithSalt :: Int -> PostgreSQLSettings -> Int
hashWithSalt Int
_salt PostgreSQLSettings' {Maybe Bool
Maybe Int
Maybe Text
Maybe (Sensitive Text)
Maybe PluginNameValue
username :: Maybe Text
trimSpaceInChar :: Maybe Bool
slotName :: Maybe Text
serverName :: Maybe Text
secretsManagerSecretId :: Maybe Text
secretsManagerAccessRoleArn :: Maybe Text
port :: Maybe Int
pluginName :: Maybe PluginNameValue
password :: Maybe (Sensitive Text)
maxFileSize :: Maybe Int
heartbeatSchema :: Maybe Text
heartbeatFrequency :: Maybe Int
heartbeatEnable :: Maybe Bool
failTasksOnLobTruncation :: Maybe Bool
executeTimeout :: Maybe Int
ddlArtifactsSchema :: Maybe Text
databaseName :: Maybe Text
captureDdls :: Maybe Bool
afterConnectScript :: Maybe Text
$sel:username:PostgreSQLSettings' :: PostgreSQLSettings -> Maybe Text
$sel:trimSpaceInChar:PostgreSQLSettings' :: PostgreSQLSettings -> Maybe Bool
$sel:slotName:PostgreSQLSettings' :: PostgreSQLSettings -> Maybe Text
$sel:serverName:PostgreSQLSettings' :: PostgreSQLSettings -> Maybe Text
$sel:secretsManagerSecretId:PostgreSQLSettings' :: PostgreSQLSettings -> Maybe Text
$sel:secretsManagerAccessRoleArn:PostgreSQLSettings' :: PostgreSQLSettings -> Maybe Text
$sel:port:PostgreSQLSettings' :: PostgreSQLSettings -> Maybe Int
$sel:pluginName:PostgreSQLSettings' :: PostgreSQLSettings -> Maybe PluginNameValue
$sel:password:PostgreSQLSettings' :: PostgreSQLSettings -> Maybe (Sensitive Text)
$sel:maxFileSize:PostgreSQLSettings' :: PostgreSQLSettings -> Maybe Int
$sel:heartbeatSchema:PostgreSQLSettings' :: PostgreSQLSettings -> Maybe Text
$sel:heartbeatFrequency:PostgreSQLSettings' :: PostgreSQLSettings -> Maybe Int
$sel:heartbeatEnable:PostgreSQLSettings' :: PostgreSQLSettings -> Maybe Bool
$sel:failTasksOnLobTruncation:PostgreSQLSettings' :: PostgreSQLSettings -> Maybe Bool
$sel:executeTimeout:PostgreSQLSettings' :: PostgreSQLSettings -> Maybe Int
$sel:ddlArtifactsSchema:PostgreSQLSettings' :: PostgreSQLSettings -> Maybe Text
$sel:databaseName:PostgreSQLSettings' :: PostgreSQLSettings -> Maybe Text
$sel:captureDdls:PostgreSQLSettings' :: PostgreSQLSettings -> Maybe Bool
$sel:afterConnectScript:PostgreSQLSettings' :: PostgreSQLSettings -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
afterConnectScript
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
captureDdls
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
databaseName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
ddlArtifactsSchema
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
executeTimeout
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
failTasksOnLobTruncation
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
heartbeatEnable
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
heartbeatFrequency
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
heartbeatSchema
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
maxFileSize
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (Sensitive Text)
password
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe PluginNameValue
pluginName
      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 Text
slotName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
trimSpaceInChar
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
username

instance Prelude.NFData PostgreSQLSettings where
  rnf :: PostgreSQLSettings -> ()
rnf PostgreSQLSettings' {Maybe Bool
Maybe Int
Maybe Text
Maybe (Sensitive Text)
Maybe PluginNameValue
username :: Maybe Text
trimSpaceInChar :: Maybe Bool
slotName :: Maybe Text
serverName :: Maybe Text
secretsManagerSecretId :: Maybe Text
secretsManagerAccessRoleArn :: Maybe Text
port :: Maybe Int
pluginName :: Maybe PluginNameValue
password :: Maybe (Sensitive Text)
maxFileSize :: Maybe Int
heartbeatSchema :: Maybe Text
heartbeatFrequency :: Maybe Int
heartbeatEnable :: Maybe Bool
failTasksOnLobTruncation :: Maybe Bool
executeTimeout :: Maybe Int
ddlArtifactsSchema :: Maybe Text
databaseName :: Maybe Text
captureDdls :: Maybe Bool
afterConnectScript :: Maybe Text
$sel:username:PostgreSQLSettings' :: PostgreSQLSettings -> Maybe Text
$sel:trimSpaceInChar:PostgreSQLSettings' :: PostgreSQLSettings -> Maybe Bool
$sel:slotName:PostgreSQLSettings' :: PostgreSQLSettings -> Maybe Text
$sel:serverName:PostgreSQLSettings' :: PostgreSQLSettings -> Maybe Text
$sel:secretsManagerSecretId:PostgreSQLSettings' :: PostgreSQLSettings -> Maybe Text
$sel:secretsManagerAccessRoleArn:PostgreSQLSettings' :: PostgreSQLSettings -> Maybe Text
$sel:port:PostgreSQLSettings' :: PostgreSQLSettings -> Maybe Int
$sel:pluginName:PostgreSQLSettings' :: PostgreSQLSettings -> Maybe PluginNameValue
$sel:password:PostgreSQLSettings' :: PostgreSQLSettings -> Maybe (Sensitive Text)
$sel:maxFileSize:PostgreSQLSettings' :: PostgreSQLSettings -> Maybe Int
$sel:heartbeatSchema:PostgreSQLSettings' :: PostgreSQLSettings -> Maybe Text
$sel:heartbeatFrequency:PostgreSQLSettings' :: PostgreSQLSettings -> Maybe Int
$sel:heartbeatEnable:PostgreSQLSettings' :: PostgreSQLSettings -> Maybe Bool
$sel:failTasksOnLobTruncation:PostgreSQLSettings' :: PostgreSQLSettings -> Maybe Bool
$sel:executeTimeout:PostgreSQLSettings' :: PostgreSQLSettings -> Maybe Int
$sel:ddlArtifactsSchema:PostgreSQLSettings' :: PostgreSQLSettings -> Maybe Text
$sel:databaseName:PostgreSQLSettings' :: PostgreSQLSettings -> Maybe Text
$sel:captureDdls:PostgreSQLSettings' :: PostgreSQLSettings -> Maybe Bool
$sel:afterConnectScript:PostgreSQLSettings' :: PostgreSQLSettings -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
afterConnectScript
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
captureDdls
      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 Text
ddlArtifactsSchema
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
executeTimeout
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
failTasksOnLobTruncation
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
heartbeatEnable
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
heartbeatFrequency
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
heartbeatSchema
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
maxFileSize
      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 PluginNameValue
pluginName
      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 Text
slotName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
trimSpaceInChar
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
username

instance Data.ToJSON PostgreSQLSettings where
  toJSON :: PostgreSQLSettings -> Value
toJSON PostgreSQLSettings' {Maybe Bool
Maybe Int
Maybe Text
Maybe (Sensitive Text)
Maybe PluginNameValue
username :: Maybe Text
trimSpaceInChar :: Maybe Bool
slotName :: Maybe Text
serverName :: Maybe Text
secretsManagerSecretId :: Maybe Text
secretsManagerAccessRoleArn :: Maybe Text
port :: Maybe Int
pluginName :: Maybe PluginNameValue
password :: Maybe (Sensitive Text)
maxFileSize :: Maybe Int
heartbeatSchema :: Maybe Text
heartbeatFrequency :: Maybe Int
heartbeatEnable :: Maybe Bool
failTasksOnLobTruncation :: Maybe Bool
executeTimeout :: Maybe Int
ddlArtifactsSchema :: Maybe Text
databaseName :: Maybe Text
captureDdls :: Maybe Bool
afterConnectScript :: Maybe Text
$sel:username:PostgreSQLSettings' :: PostgreSQLSettings -> Maybe Text
$sel:trimSpaceInChar:PostgreSQLSettings' :: PostgreSQLSettings -> Maybe Bool
$sel:slotName:PostgreSQLSettings' :: PostgreSQLSettings -> Maybe Text
$sel:serverName:PostgreSQLSettings' :: PostgreSQLSettings -> Maybe Text
$sel:secretsManagerSecretId:PostgreSQLSettings' :: PostgreSQLSettings -> Maybe Text
$sel:secretsManagerAccessRoleArn:PostgreSQLSettings' :: PostgreSQLSettings -> Maybe Text
$sel:port:PostgreSQLSettings' :: PostgreSQLSettings -> Maybe Int
$sel:pluginName:PostgreSQLSettings' :: PostgreSQLSettings -> Maybe PluginNameValue
$sel:password:PostgreSQLSettings' :: PostgreSQLSettings -> Maybe (Sensitive Text)
$sel:maxFileSize:PostgreSQLSettings' :: PostgreSQLSettings -> Maybe Int
$sel:heartbeatSchema:PostgreSQLSettings' :: PostgreSQLSettings -> Maybe Text
$sel:heartbeatFrequency:PostgreSQLSettings' :: PostgreSQLSettings -> Maybe Int
$sel:heartbeatEnable:PostgreSQLSettings' :: PostgreSQLSettings -> Maybe Bool
$sel:failTasksOnLobTruncation:PostgreSQLSettings' :: PostgreSQLSettings -> Maybe Bool
$sel:executeTimeout:PostgreSQLSettings' :: PostgreSQLSettings -> Maybe Int
$sel:ddlArtifactsSchema:PostgreSQLSettings' :: PostgreSQLSettings -> Maybe Text
$sel:databaseName:PostgreSQLSettings' :: PostgreSQLSettings -> Maybe Text
$sel:captureDdls:PostgreSQLSettings' :: PostgreSQLSettings -> Maybe Bool
$sel:afterConnectScript:PostgreSQLSettings' :: PostgreSQLSettings -> Maybe Text
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"AfterConnectScript" 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
afterConnectScript,
            (Key
"CaptureDdls" 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
captureDdls,
            (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
"DdlArtifactsSchema" 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
ddlArtifactsSchema,
            (Key
"ExecuteTimeout" 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
executeTimeout,
            (Key
"FailTasksOnLobTruncation" 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
failTasksOnLobTruncation,
            (Key
"HeartbeatEnable" 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
heartbeatEnable,
            (Key
"HeartbeatFrequency" 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
heartbeatFrequency,
            (Key
"HeartbeatSchema" 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
heartbeatSchema,
            (Key
"MaxFileSize" 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
maxFileSize,
            (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
"PluginName" 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 PluginNameValue
pluginName,
            (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
"SlotName" 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
slotName,
            (Key
"TrimSpaceInChar" 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
trimSpaceInChar,
            (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
          ]
      )