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

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

-- | Provides information that defines a Microsoft SQL Server endpoint.
--
-- /See:/ 'newMicrosoftSQLServerSettings' smart constructor.
data MicrosoftSQLServerSettings = MicrosoftSQLServerSettings'
  { -- | The maximum size of the packets (in bytes) used to transfer data using
    -- BCP.
    MicrosoftSQLServerSettings -> Maybe Int
bcpPacketSize :: Prelude.Maybe Prelude.Int,
    -- | Specifies a file group for the DMS internal tables. When the replication
    -- task starts, all the internal DMS control tables (awsdms_
    -- apply_exception, awsdms_apply, awsdms_changes) are created for the
    -- specified file group.
    MicrosoftSQLServerSettings -> Maybe Text
controlTablesFileGroup :: Prelude.Maybe Prelude.Text,
    -- | Database name for the endpoint.
    MicrosoftSQLServerSettings -> Maybe Text
databaseName :: Prelude.Maybe Prelude.Text,
    -- | Endpoint connection password.
    MicrosoftSQLServerSettings -> Maybe (Sensitive Text)
password :: Prelude.Maybe (Data.Sensitive Prelude.Text),
    -- | Endpoint TCP port.
    MicrosoftSQLServerSettings -> Maybe Int
port :: Prelude.Maybe Prelude.Int,
    -- | Cleans and recreates table metadata information on the replication
    -- instance when a mismatch occurs. An example is a situation where running
    -- an alter DDL statement on a table might result in different information
    -- about the table cached in the replication instance.
    MicrosoftSQLServerSettings -> Maybe Bool
querySingleAlwaysOnNode :: Prelude.Maybe Prelude.Bool,
    -- | When this attribute is set to @Y@, DMS only reads changes from
    -- transaction log backups and doesn\'t read from the active transaction
    -- log file during ongoing replication. Setting this parameter to @Y@
    -- enables you to control active transaction log file growth during full
    -- load and ongoing replication tasks. However, it can add some source
    -- latency to ongoing replication.
    MicrosoftSQLServerSettings -> Maybe Bool
readBackupOnly :: Prelude.Maybe Prelude.Bool,
    -- | Use this attribute to minimize the need to access the backup log and
    -- enable DMS to prevent truncation using one of the following two methods.
    --
    -- /Start transactions in the database:/ This is the default method. When
    -- this method is used, DMS prevents TLOG truncation by mimicking a
    -- transaction in the database. As long as such a transaction is open,
    -- changes that appear after the transaction started aren\'t truncated. If
    -- you need Microsoft Replication to be enabled in your database, then you
    -- must choose this method.
    --
    -- /Exclusively use sp_repldone within a single task/: When this method is
    -- used, DMS reads the changes and then uses sp_repldone to mark the TLOG
    -- transactions as ready for truncation. Although this method doesn\'t
    -- involve any transactional activities, it can only be used when Microsoft
    -- Replication isn\'t running. Also, when using this method, only one DMS
    -- task can access the database at any given time. Therefore, if you need
    -- to run parallel DMS tasks against the same database, use the default
    -- method.
    MicrosoftSQLServerSettings -> Maybe SafeguardPolicy
safeguardPolicy :: Prelude.Maybe SafeguardPolicy,
    -- | 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 SQL Server 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/.
    MicrosoftSQLServerSettings -> Maybe Text
secretsManagerAccessRoleArn :: Prelude.Maybe Prelude.Text,
    -- | The full ARN, partial ARN, or friendly name of the
    -- @SecretsManagerSecret@ that contains the SQL Server endpoint connection
    -- details.
    MicrosoftSQLServerSettings -> Maybe Text
secretsManagerSecretId :: Prelude.Maybe Prelude.Text,
    -- | Fully qualified domain name of the endpoint.
    MicrosoftSQLServerSettings -> Maybe Text
serverName :: 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@.
    MicrosoftSQLServerSettings -> Maybe Bool
trimSpaceInChar :: Prelude.Maybe Prelude.Bool,
    -- | Use this to attribute to transfer data for full-load operations using
    -- BCP. When the target table contains an identity column that does not
    -- exist in the source table, you must disable the use BCP for loading
    -- table option.
    MicrosoftSQLServerSettings -> Maybe Bool
useBcpFullLoad :: Prelude.Maybe Prelude.Bool,
    -- | When this attribute is set to @Y@, DMS processes third-party transaction
    -- log backups if they are created in native format.
    MicrosoftSQLServerSettings -> Maybe Bool
useThirdPartyBackupDevice :: Prelude.Maybe Prelude.Bool,
    -- | Endpoint connection user name.
    MicrosoftSQLServerSettings -> Maybe Text
username :: Prelude.Maybe Prelude.Text
  }
  deriving (MicrosoftSQLServerSettings -> MicrosoftSQLServerSettings -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: MicrosoftSQLServerSettings -> MicrosoftSQLServerSettings -> Bool
$c/= :: MicrosoftSQLServerSettings -> MicrosoftSQLServerSettings -> Bool
== :: MicrosoftSQLServerSettings -> MicrosoftSQLServerSettings -> Bool
$c== :: MicrosoftSQLServerSettings -> MicrosoftSQLServerSettings -> Bool
Prelude.Eq, Int -> MicrosoftSQLServerSettings -> ShowS
[MicrosoftSQLServerSettings] -> ShowS
MicrosoftSQLServerSettings -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [MicrosoftSQLServerSettings] -> ShowS
$cshowList :: [MicrosoftSQLServerSettings] -> ShowS
show :: MicrosoftSQLServerSettings -> String
$cshow :: MicrosoftSQLServerSettings -> String
showsPrec :: Int -> MicrosoftSQLServerSettings -> ShowS
$cshowsPrec :: Int -> MicrosoftSQLServerSettings -> ShowS
Prelude.Show, forall x.
Rep MicrosoftSQLServerSettings x -> MicrosoftSQLServerSettings
forall x.
MicrosoftSQLServerSettings -> Rep MicrosoftSQLServerSettings x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep MicrosoftSQLServerSettings x -> MicrosoftSQLServerSettings
$cfrom :: forall x.
MicrosoftSQLServerSettings -> Rep MicrosoftSQLServerSettings x
Prelude.Generic)

-- |
-- Create a value of 'MicrosoftSQLServerSettings' 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:
--
-- 'bcpPacketSize', 'microsoftSQLServerSettings_bcpPacketSize' - The maximum size of the packets (in bytes) used to transfer data using
-- BCP.
--
-- 'controlTablesFileGroup', 'microsoftSQLServerSettings_controlTablesFileGroup' - Specifies a file group for the DMS internal tables. When the replication
-- task starts, all the internal DMS control tables (awsdms_
-- apply_exception, awsdms_apply, awsdms_changes) are created for the
-- specified file group.
--
-- 'databaseName', 'microsoftSQLServerSettings_databaseName' - Database name for the endpoint.
--
-- 'password', 'microsoftSQLServerSettings_password' - Endpoint connection password.
--
-- 'port', 'microsoftSQLServerSettings_port' - Endpoint TCP port.
--
-- 'querySingleAlwaysOnNode', 'microsoftSQLServerSettings_querySingleAlwaysOnNode' - Cleans and recreates table metadata information on the replication
-- instance when a mismatch occurs. An example is a situation where running
-- an alter DDL statement on a table might result in different information
-- about the table cached in the replication instance.
--
-- 'readBackupOnly', 'microsoftSQLServerSettings_readBackupOnly' - When this attribute is set to @Y@, DMS only reads changes from
-- transaction log backups and doesn\'t read from the active transaction
-- log file during ongoing replication. Setting this parameter to @Y@
-- enables you to control active transaction log file growth during full
-- load and ongoing replication tasks. However, it can add some source
-- latency to ongoing replication.
--
-- 'safeguardPolicy', 'microsoftSQLServerSettings_safeguardPolicy' - Use this attribute to minimize the need to access the backup log and
-- enable DMS to prevent truncation using one of the following two methods.
--
-- /Start transactions in the database:/ This is the default method. When
-- this method is used, DMS prevents TLOG truncation by mimicking a
-- transaction in the database. As long as such a transaction is open,
-- changes that appear after the transaction started aren\'t truncated. If
-- you need Microsoft Replication to be enabled in your database, then you
-- must choose this method.
--
-- /Exclusively use sp_repldone within a single task/: When this method is
-- used, DMS reads the changes and then uses sp_repldone to mark the TLOG
-- transactions as ready for truncation. Although this method doesn\'t
-- involve any transactional activities, it can only be used when Microsoft
-- Replication isn\'t running. Also, when using this method, only one DMS
-- task can access the database at any given time. Therefore, if you need
-- to run parallel DMS tasks against the same database, use the default
-- method.
--
-- 'secretsManagerAccessRoleArn', 'microsoftSQLServerSettings_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 SQL Server 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', 'microsoftSQLServerSettings_secretsManagerSecretId' - The full ARN, partial ARN, or friendly name of the
-- @SecretsManagerSecret@ that contains the SQL Server endpoint connection
-- details.
--
-- 'serverName', 'microsoftSQLServerSettings_serverName' - Fully qualified domain name of the endpoint.
--
-- 'trimSpaceInChar', 'microsoftSQLServerSettings_trimSpaceInChar' - Use the @TrimSpaceInChar@ source endpoint setting to trim data on CHAR
-- and NCHAR data types during migration. The default value is @true@.
--
-- 'useBcpFullLoad', 'microsoftSQLServerSettings_useBcpFullLoad' - Use this to attribute to transfer data for full-load operations using
-- BCP. When the target table contains an identity column that does not
-- exist in the source table, you must disable the use BCP for loading
-- table option.
--
-- 'useThirdPartyBackupDevice', 'microsoftSQLServerSettings_useThirdPartyBackupDevice' - When this attribute is set to @Y@, DMS processes third-party transaction
-- log backups if they are created in native format.
--
-- 'username', 'microsoftSQLServerSettings_username' - Endpoint connection user name.
newMicrosoftSQLServerSettings ::
  MicrosoftSQLServerSettings
newMicrosoftSQLServerSettings :: MicrosoftSQLServerSettings
newMicrosoftSQLServerSettings =
  MicrosoftSQLServerSettings'
    { $sel:bcpPacketSize:MicrosoftSQLServerSettings' :: Maybe Int
bcpPacketSize =
        forall a. Maybe a
Prelude.Nothing,
      $sel:controlTablesFileGroup:MicrosoftSQLServerSettings' :: Maybe Text
controlTablesFileGroup = forall a. Maybe a
Prelude.Nothing,
      $sel:databaseName:MicrosoftSQLServerSettings' :: Maybe Text
databaseName = forall a. Maybe a
Prelude.Nothing,
      $sel:password:MicrosoftSQLServerSettings' :: Maybe (Sensitive Text)
password = forall a. Maybe a
Prelude.Nothing,
      $sel:port:MicrosoftSQLServerSettings' :: Maybe Int
port = forall a. Maybe a
Prelude.Nothing,
      $sel:querySingleAlwaysOnNode:MicrosoftSQLServerSettings' :: Maybe Bool
querySingleAlwaysOnNode = forall a. Maybe a
Prelude.Nothing,
      $sel:readBackupOnly:MicrosoftSQLServerSettings' :: Maybe Bool
readBackupOnly = forall a. Maybe a
Prelude.Nothing,
      $sel:safeguardPolicy:MicrosoftSQLServerSettings' :: Maybe SafeguardPolicy
safeguardPolicy = forall a. Maybe a
Prelude.Nothing,
      $sel:secretsManagerAccessRoleArn:MicrosoftSQLServerSettings' :: Maybe Text
secretsManagerAccessRoleArn = forall a. Maybe a
Prelude.Nothing,
      $sel:secretsManagerSecretId:MicrosoftSQLServerSettings' :: Maybe Text
secretsManagerSecretId = forall a. Maybe a
Prelude.Nothing,
      $sel:serverName:MicrosoftSQLServerSettings' :: Maybe Text
serverName = forall a. Maybe a
Prelude.Nothing,
      $sel:trimSpaceInChar:MicrosoftSQLServerSettings' :: Maybe Bool
trimSpaceInChar = forall a. Maybe a
Prelude.Nothing,
      $sel:useBcpFullLoad:MicrosoftSQLServerSettings' :: Maybe Bool
useBcpFullLoad = forall a. Maybe a
Prelude.Nothing,
      $sel:useThirdPartyBackupDevice:MicrosoftSQLServerSettings' :: Maybe Bool
useThirdPartyBackupDevice = forall a. Maybe a
Prelude.Nothing,
      $sel:username:MicrosoftSQLServerSettings' :: Maybe Text
username = forall a. Maybe a
Prelude.Nothing
    }

-- | The maximum size of the packets (in bytes) used to transfer data using
-- BCP.
microsoftSQLServerSettings_bcpPacketSize :: Lens.Lens' MicrosoftSQLServerSettings (Prelude.Maybe Prelude.Int)
microsoftSQLServerSettings_bcpPacketSize :: Lens' MicrosoftSQLServerSettings (Maybe Int)
microsoftSQLServerSettings_bcpPacketSize = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MicrosoftSQLServerSettings' {Maybe Int
bcpPacketSize :: Maybe Int
$sel:bcpPacketSize:MicrosoftSQLServerSettings' :: MicrosoftSQLServerSettings -> Maybe Int
bcpPacketSize} -> Maybe Int
bcpPacketSize) (\s :: MicrosoftSQLServerSettings
s@MicrosoftSQLServerSettings' {} Maybe Int
a -> MicrosoftSQLServerSettings
s {$sel:bcpPacketSize:MicrosoftSQLServerSettings' :: Maybe Int
bcpPacketSize = Maybe Int
a} :: MicrosoftSQLServerSettings)

-- | Specifies a file group for the DMS internal tables. When the replication
-- task starts, all the internal DMS control tables (awsdms_
-- apply_exception, awsdms_apply, awsdms_changes) are created for the
-- specified file group.
microsoftSQLServerSettings_controlTablesFileGroup :: Lens.Lens' MicrosoftSQLServerSettings (Prelude.Maybe Prelude.Text)
microsoftSQLServerSettings_controlTablesFileGroup :: Lens' MicrosoftSQLServerSettings (Maybe Text)
microsoftSQLServerSettings_controlTablesFileGroup = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MicrosoftSQLServerSettings' {Maybe Text
controlTablesFileGroup :: Maybe Text
$sel:controlTablesFileGroup:MicrosoftSQLServerSettings' :: MicrosoftSQLServerSettings -> Maybe Text
controlTablesFileGroup} -> Maybe Text
controlTablesFileGroup) (\s :: MicrosoftSQLServerSettings
s@MicrosoftSQLServerSettings' {} Maybe Text
a -> MicrosoftSQLServerSettings
s {$sel:controlTablesFileGroup:MicrosoftSQLServerSettings' :: Maybe Text
controlTablesFileGroup = Maybe Text
a} :: MicrosoftSQLServerSettings)

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

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

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

-- | Cleans and recreates table metadata information on the replication
-- instance when a mismatch occurs. An example is a situation where running
-- an alter DDL statement on a table might result in different information
-- about the table cached in the replication instance.
microsoftSQLServerSettings_querySingleAlwaysOnNode :: Lens.Lens' MicrosoftSQLServerSettings (Prelude.Maybe Prelude.Bool)
microsoftSQLServerSettings_querySingleAlwaysOnNode :: Lens' MicrosoftSQLServerSettings (Maybe Bool)
microsoftSQLServerSettings_querySingleAlwaysOnNode = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MicrosoftSQLServerSettings' {Maybe Bool
querySingleAlwaysOnNode :: Maybe Bool
$sel:querySingleAlwaysOnNode:MicrosoftSQLServerSettings' :: MicrosoftSQLServerSettings -> Maybe Bool
querySingleAlwaysOnNode} -> Maybe Bool
querySingleAlwaysOnNode) (\s :: MicrosoftSQLServerSettings
s@MicrosoftSQLServerSettings' {} Maybe Bool
a -> MicrosoftSQLServerSettings
s {$sel:querySingleAlwaysOnNode:MicrosoftSQLServerSettings' :: Maybe Bool
querySingleAlwaysOnNode = Maybe Bool
a} :: MicrosoftSQLServerSettings)

-- | When this attribute is set to @Y@, DMS only reads changes from
-- transaction log backups and doesn\'t read from the active transaction
-- log file during ongoing replication. Setting this parameter to @Y@
-- enables you to control active transaction log file growth during full
-- load and ongoing replication tasks. However, it can add some source
-- latency to ongoing replication.
microsoftSQLServerSettings_readBackupOnly :: Lens.Lens' MicrosoftSQLServerSettings (Prelude.Maybe Prelude.Bool)
microsoftSQLServerSettings_readBackupOnly :: Lens' MicrosoftSQLServerSettings (Maybe Bool)
microsoftSQLServerSettings_readBackupOnly = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MicrosoftSQLServerSettings' {Maybe Bool
readBackupOnly :: Maybe Bool
$sel:readBackupOnly:MicrosoftSQLServerSettings' :: MicrosoftSQLServerSettings -> Maybe Bool
readBackupOnly} -> Maybe Bool
readBackupOnly) (\s :: MicrosoftSQLServerSettings
s@MicrosoftSQLServerSettings' {} Maybe Bool
a -> MicrosoftSQLServerSettings
s {$sel:readBackupOnly:MicrosoftSQLServerSettings' :: Maybe Bool
readBackupOnly = Maybe Bool
a} :: MicrosoftSQLServerSettings)

-- | Use this attribute to minimize the need to access the backup log and
-- enable DMS to prevent truncation using one of the following two methods.
--
-- /Start transactions in the database:/ This is the default method. When
-- this method is used, DMS prevents TLOG truncation by mimicking a
-- transaction in the database. As long as such a transaction is open,
-- changes that appear after the transaction started aren\'t truncated. If
-- you need Microsoft Replication to be enabled in your database, then you
-- must choose this method.
--
-- /Exclusively use sp_repldone within a single task/: When this method is
-- used, DMS reads the changes and then uses sp_repldone to mark the TLOG
-- transactions as ready for truncation. Although this method doesn\'t
-- involve any transactional activities, it can only be used when Microsoft
-- Replication isn\'t running. Also, when using this method, only one DMS
-- task can access the database at any given time. Therefore, if you need
-- to run parallel DMS tasks against the same database, use the default
-- method.
microsoftSQLServerSettings_safeguardPolicy :: Lens.Lens' MicrosoftSQLServerSettings (Prelude.Maybe SafeguardPolicy)
microsoftSQLServerSettings_safeguardPolicy :: Lens' MicrosoftSQLServerSettings (Maybe SafeguardPolicy)
microsoftSQLServerSettings_safeguardPolicy = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MicrosoftSQLServerSettings' {Maybe SafeguardPolicy
safeguardPolicy :: Maybe SafeguardPolicy
$sel:safeguardPolicy:MicrosoftSQLServerSettings' :: MicrosoftSQLServerSettings -> Maybe SafeguardPolicy
safeguardPolicy} -> Maybe SafeguardPolicy
safeguardPolicy) (\s :: MicrosoftSQLServerSettings
s@MicrosoftSQLServerSettings' {} Maybe SafeguardPolicy
a -> MicrosoftSQLServerSettings
s {$sel:safeguardPolicy:MicrosoftSQLServerSettings' :: Maybe SafeguardPolicy
safeguardPolicy = Maybe SafeguardPolicy
a} :: MicrosoftSQLServerSettings)

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

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

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

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

-- | Use this to attribute to transfer data for full-load operations using
-- BCP. When the target table contains an identity column that does not
-- exist in the source table, you must disable the use BCP for loading
-- table option.
microsoftSQLServerSettings_useBcpFullLoad :: Lens.Lens' MicrosoftSQLServerSettings (Prelude.Maybe Prelude.Bool)
microsoftSQLServerSettings_useBcpFullLoad :: Lens' MicrosoftSQLServerSettings (Maybe Bool)
microsoftSQLServerSettings_useBcpFullLoad = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MicrosoftSQLServerSettings' {Maybe Bool
useBcpFullLoad :: Maybe Bool
$sel:useBcpFullLoad:MicrosoftSQLServerSettings' :: MicrosoftSQLServerSettings -> Maybe Bool
useBcpFullLoad} -> Maybe Bool
useBcpFullLoad) (\s :: MicrosoftSQLServerSettings
s@MicrosoftSQLServerSettings' {} Maybe Bool
a -> MicrosoftSQLServerSettings
s {$sel:useBcpFullLoad:MicrosoftSQLServerSettings' :: Maybe Bool
useBcpFullLoad = Maybe Bool
a} :: MicrosoftSQLServerSettings)

-- | When this attribute is set to @Y@, DMS processes third-party transaction
-- log backups if they are created in native format.
microsoftSQLServerSettings_useThirdPartyBackupDevice :: Lens.Lens' MicrosoftSQLServerSettings (Prelude.Maybe Prelude.Bool)
microsoftSQLServerSettings_useThirdPartyBackupDevice :: Lens' MicrosoftSQLServerSettings (Maybe Bool)
microsoftSQLServerSettings_useThirdPartyBackupDevice = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MicrosoftSQLServerSettings' {Maybe Bool
useThirdPartyBackupDevice :: Maybe Bool
$sel:useThirdPartyBackupDevice:MicrosoftSQLServerSettings' :: MicrosoftSQLServerSettings -> Maybe Bool
useThirdPartyBackupDevice} -> Maybe Bool
useThirdPartyBackupDevice) (\s :: MicrosoftSQLServerSettings
s@MicrosoftSQLServerSettings' {} Maybe Bool
a -> MicrosoftSQLServerSettings
s {$sel:useThirdPartyBackupDevice:MicrosoftSQLServerSettings' :: Maybe Bool
useThirdPartyBackupDevice = Maybe Bool
a} :: MicrosoftSQLServerSettings)

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

instance Data.FromJSON MicrosoftSQLServerSettings where
  parseJSON :: Value -> Parser MicrosoftSQLServerSettings
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"MicrosoftSQLServerSettings"
      ( \Object
x ->
          Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe (Sensitive Text)
-> Maybe Int
-> Maybe Bool
-> Maybe Bool
-> Maybe SafeguardPolicy
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> MicrosoftSQLServerSettings
MicrosoftSQLServerSettings'
            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
"BcpPacketSize")
            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
"ControlTablesFileGroup")
            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
"Password")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Port")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"QuerySingleAlwaysOnNode")
            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
"ReadBackupOnly")
            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
"SafeguardPolicy")
            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
"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
"UseBcpFullLoad")
            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
"UseThirdPartyBackupDevice")
            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 MicrosoftSQLServerSettings where
  hashWithSalt :: Int -> MicrosoftSQLServerSettings -> Int
hashWithSalt Int
_salt MicrosoftSQLServerSettings' {Maybe Bool
Maybe Int
Maybe Text
Maybe (Sensitive Text)
Maybe SafeguardPolicy
username :: Maybe Text
useThirdPartyBackupDevice :: Maybe Bool
useBcpFullLoad :: Maybe Bool
trimSpaceInChar :: Maybe Bool
serverName :: Maybe Text
secretsManagerSecretId :: Maybe Text
secretsManagerAccessRoleArn :: Maybe Text
safeguardPolicy :: Maybe SafeguardPolicy
readBackupOnly :: Maybe Bool
querySingleAlwaysOnNode :: Maybe Bool
port :: Maybe Int
password :: Maybe (Sensitive Text)
databaseName :: Maybe Text
controlTablesFileGroup :: Maybe Text
bcpPacketSize :: Maybe Int
$sel:username:MicrosoftSQLServerSettings' :: MicrosoftSQLServerSettings -> Maybe Text
$sel:useThirdPartyBackupDevice:MicrosoftSQLServerSettings' :: MicrosoftSQLServerSettings -> Maybe Bool
$sel:useBcpFullLoad:MicrosoftSQLServerSettings' :: MicrosoftSQLServerSettings -> Maybe Bool
$sel:trimSpaceInChar:MicrosoftSQLServerSettings' :: MicrosoftSQLServerSettings -> Maybe Bool
$sel:serverName:MicrosoftSQLServerSettings' :: MicrosoftSQLServerSettings -> Maybe Text
$sel:secretsManagerSecretId:MicrosoftSQLServerSettings' :: MicrosoftSQLServerSettings -> Maybe Text
$sel:secretsManagerAccessRoleArn:MicrosoftSQLServerSettings' :: MicrosoftSQLServerSettings -> Maybe Text
$sel:safeguardPolicy:MicrosoftSQLServerSettings' :: MicrosoftSQLServerSettings -> Maybe SafeguardPolicy
$sel:readBackupOnly:MicrosoftSQLServerSettings' :: MicrosoftSQLServerSettings -> Maybe Bool
$sel:querySingleAlwaysOnNode:MicrosoftSQLServerSettings' :: MicrosoftSQLServerSettings -> Maybe Bool
$sel:port:MicrosoftSQLServerSettings' :: MicrosoftSQLServerSettings -> Maybe Int
$sel:password:MicrosoftSQLServerSettings' :: MicrosoftSQLServerSettings -> Maybe (Sensitive Text)
$sel:databaseName:MicrosoftSQLServerSettings' :: MicrosoftSQLServerSettings -> Maybe Text
$sel:controlTablesFileGroup:MicrosoftSQLServerSettings' :: MicrosoftSQLServerSettings -> Maybe Text
$sel:bcpPacketSize:MicrosoftSQLServerSettings' :: MicrosoftSQLServerSettings -> Maybe Int
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
bcpPacketSize
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
controlTablesFileGroup
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
databaseName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (Sensitive Text)
password
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
port
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
querySingleAlwaysOnNode
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
readBackupOnly
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe SafeguardPolicy
safeguardPolicy
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
secretsManagerAccessRoleArn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
secretsManagerSecretId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
serverName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
trimSpaceInChar
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
useBcpFullLoad
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
useThirdPartyBackupDevice
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
username

instance Prelude.NFData MicrosoftSQLServerSettings where
  rnf :: MicrosoftSQLServerSettings -> ()
rnf MicrosoftSQLServerSettings' {Maybe Bool
Maybe Int
Maybe Text
Maybe (Sensitive Text)
Maybe SafeguardPolicy
username :: Maybe Text
useThirdPartyBackupDevice :: Maybe Bool
useBcpFullLoad :: Maybe Bool
trimSpaceInChar :: Maybe Bool
serverName :: Maybe Text
secretsManagerSecretId :: Maybe Text
secretsManagerAccessRoleArn :: Maybe Text
safeguardPolicy :: Maybe SafeguardPolicy
readBackupOnly :: Maybe Bool
querySingleAlwaysOnNode :: Maybe Bool
port :: Maybe Int
password :: Maybe (Sensitive Text)
databaseName :: Maybe Text
controlTablesFileGroup :: Maybe Text
bcpPacketSize :: Maybe Int
$sel:username:MicrosoftSQLServerSettings' :: MicrosoftSQLServerSettings -> Maybe Text
$sel:useThirdPartyBackupDevice:MicrosoftSQLServerSettings' :: MicrosoftSQLServerSettings -> Maybe Bool
$sel:useBcpFullLoad:MicrosoftSQLServerSettings' :: MicrosoftSQLServerSettings -> Maybe Bool
$sel:trimSpaceInChar:MicrosoftSQLServerSettings' :: MicrosoftSQLServerSettings -> Maybe Bool
$sel:serverName:MicrosoftSQLServerSettings' :: MicrosoftSQLServerSettings -> Maybe Text
$sel:secretsManagerSecretId:MicrosoftSQLServerSettings' :: MicrosoftSQLServerSettings -> Maybe Text
$sel:secretsManagerAccessRoleArn:MicrosoftSQLServerSettings' :: MicrosoftSQLServerSettings -> Maybe Text
$sel:safeguardPolicy:MicrosoftSQLServerSettings' :: MicrosoftSQLServerSettings -> Maybe SafeguardPolicy
$sel:readBackupOnly:MicrosoftSQLServerSettings' :: MicrosoftSQLServerSettings -> Maybe Bool
$sel:querySingleAlwaysOnNode:MicrosoftSQLServerSettings' :: MicrosoftSQLServerSettings -> Maybe Bool
$sel:port:MicrosoftSQLServerSettings' :: MicrosoftSQLServerSettings -> Maybe Int
$sel:password:MicrosoftSQLServerSettings' :: MicrosoftSQLServerSettings -> Maybe (Sensitive Text)
$sel:databaseName:MicrosoftSQLServerSettings' :: MicrosoftSQLServerSettings -> Maybe Text
$sel:controlTablesFileGroup:MicrosoftSQLServerSettings' :: MicrosoftSQLServerSettings -> Maybe Text
$sel:bcpPacketSize:MicrosoftSQLServerSettings' :: MicrosoftSQLServerSettings -> Maybe Int
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
bcpPacketSize
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
controlTablesFileGroup
      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 (Sensitive Text)
password
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
port
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
querySingleAlwaysOnNode
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
readBackupOnly
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe SafeguardPolicy
safeguardPolicy
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
secretsManagerAccessRoleArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
secretsManagerSecretId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
serverName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
trimSpaceInChar
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
useBcpFullLoad
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
useThirdPartyBackupDevice
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
username

instance Data.ToJSON MicrosoftSQLServerSettings where
  toJSON :: MicrosoftSQLServerSettings -> Value
toJSON MicrosoftSQLServerSettings' {Maybe Bool
Maybe Int
Maybe Text
Maybe (Sensitive Text)
Maybe SafeguardPolicy
username :: Maybe Text
useThirdPartyBackupDevice :: Maybe Bool
useBcpFullLoad :: Maybe Bool
trimSpaceInChar :: Maybe Bool
serverName :: Maybe Text
secretsManagerSecretId :: Maybe Text
secretsManagerAccessRoleArn :: Maybe Text
safeguardPolicy :: Maybe SafeguardPolicy
readBackupOnly :: Maybe Bool
querySingleAlwaysOnNode :: Maybe Bool
port :: Maybe Int
password :: Maybe (Sensitive Text)
databaseName :: Maybe Text
controlTablesFileGroup :: Maybe Text
bcpPacketSize :: Maybe Int
$sel:username:MicrosoftSQLServerSettings' :: MicrosoftSQLServerSettings -> Maybe Text
$sel:useThirdPartyBackupDevice:MicrosoftSQLServerSettings' :: MicrosoftSQLServerSettings -> Maybe Bool
$sel:useBcpFullLoad:MicrosoftSQLServerSettings' :: MicrosoftSQLServerSettings -> Maybe Bool
$sel:trimSpaceInChar:MicrosoftSQLServerSettings' :: MicrosoftSQLServerSettings -> Maybe Bool
$sel:serverName:MicrosoftSQLServerSettings' :: MicrosoftSQLServerSettings -> Maybe Text
$sel:secretsManagerSecretId:MicrosoftSQLServerSettings' :: MicrosoftSQLServerSettings -> Maybe Text
$sel:secretsManagerAccessRoleArn:MicrosoftSQLServerSettings' :: MicrosoftSQLServerSettings -> Maybe Text
$sel:safeguardPolicy:MicrosoftSQLServerSettings' :: MicrosoftSQLServerSettings -> Maybe SafeguardPolicy
$sel:readBackupOnly:MicrosoftSQLServerSettings' :: MicrosoftSQLServerSettings -> Maybe Bool
$sel:querySingleAlwaysOnNode:MicrosoftSQLServerSettings' :: MicrosoftSQLServerSettings -> Maybe Bool
$sel:port:MicrosoftSQLServerSettings' :: MicrosoftSQLServerSettings -> Maybe Int
$sel:password:MicrosoftSQLServerSettings' :: MicrosoftSQLServerSettings -> Maybe (Sensitive Text)
$sel:databaseName:MicrosoftSQLServerSettings' :: MicrosoftSQLServerSettings -> Maybe Text
$sel:controlTablesFileGroup:MicrosoftSQLServerSettings' :: MicrosoftSQLServerSettings -> Maybe Text
$sel:bcpPacketSize:MicrosoftSQLServerSettings' :: MicrosoftSQLServerSettings -> Maybe Int
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"BcpPacketSize" 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
bcpPacketSize,
            (Key
"ControlTablesFileGroup" 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
controlTablesFileGroup,
            (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
"Password" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Sensitive Text)
password,
            (Key
"Port" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
port,
            (Key
"QuerySingleAlwaysOnNode" 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
querySingleAlwaysOnNode,
            (Key
"ReadBackupOnly" 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
readBackupOnly,
            (Key
"SafeguardPolicy" 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 SafeguardPolicy
safeguardPolicy,
            (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
"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
"UseBcpFullLoad" 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
useBcpFullLoad,
            (Key
"UseThirdPartyBackupDevice" 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
useThirdPartyBackupDevice,
            (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
          ]
      )