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

import qualified Amazonka.Core as Core
import Amazonka.DMS.Types.SafeguardPolicy
import qualified Amazonka.Lens as Lens
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,
    -- | 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,
    -- | Fully qualified domain name of the endpoint.
    MicrosoftSQLServerSettings -> Maybe Text
serverName :: Prelude.Maybe Prelude.Text,
    -- | 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,
    -- | 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,
    -- | Endpoint connection user name.
    MicrosoftSQLServerSettings -> Maybe Text
username :: Prelude.Maybe Prelude.Text,
    -- | 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,
    -- | Endpoint connection password.
    MicrosoftSQLServerSettings -> Maybe (Sensitive Text)
password :: Prelude.Maybe (Core.Sensitive Prelude.Text),
    -- | Database name for the endpoint.
    MicrosoftSQLServerSettings -> Maybe Text
databaseName :: 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,
    -- | 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,
    -- | 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,
    -- | 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,
    -- | Endpoint TCP port.
    MicrosoftSQLServerSettings -> Maybe Int
port :: Prelude.Maybe Prelude.Int
  }
  deriving (MicrosoftSQLServerSettings -> MicrosoftSQLServerSettings -> Bool
(MicrosoftSQLServerSettings -> MicrosoftSQLServerSettings -> Bool)
-> (MicrosoftSQLServerSettings
    -> MicrosoftSQLServerSettings -> Bool)
-> Eq MicrosoftSQLServerSettings
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
(Int -> MicrosoftSQLServerSettings -> ShowS)
-> (MicrosoftSQLServerSettings -> String)
-> ([MicrosoftSQLServerSettings] -> ShowS)
-> Show MicrosoftSQLServerSettings
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.
 MicrosoftSQLServerSettings -> Rep MicrosoftSQLServerSettings x)
-> (forall x.
    Rep MicrosoftSQLServerSettings x -> MicrosoftSQLServerSettings)
-> Generic MicrosoftSQLServerSettings
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.
--
-- '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.
--
-- 'serverName', 'microsoftSQLServerSettings_serverName' - Fully qualified domain name of the endpoint.
--
-- '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.
--
-- '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/.
--
-- 'username', 'microsoftSQLServerSettings_username' - Endpoint connection user name.
--
-- '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.
--
-- 'password', 'microsoftSQLServerSettings_password' - Endpoint connection password.
--
-- 'databaseName', 'microsoftSQLServerSettings_databaseName' - Database name for the endpoint.
--
-- 'secretsManagerSecretId', 'microsoftSQLServerSettings_secretsManagerSecretId' - The full ARN, partial ARN, or friendly name of the
-- @SecretsManagerSecret@ that contains the SQL Server endpoint connection
-- details.
--
-- '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.
--
-- 'useThirdPartyBackupDevice', 'microsoftSQLServerSettings_useThirdPartyBackupDevice' - When this attribute is set to @Y@, DMS processes third-party transaction
-- log backups if they are created in native format.
--
-- '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.
--
-- 'port', 'microsoftSQLServerSettings_port' - Endpoint TCP port.
newMicrosoftSQLServerSettings ::
  MicrosoftSQLServerSettings
newMicrosoftSQLServerSettings :: MicrosoftSQLServerSettings
newMicrosoftSQLServerSettings =
  MicrosoftSQLServerSettings' :: Maybe Int
-> Maybe Bool
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe SafeguardPolicy
-> Maybe (Sensitive Text)
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe Int
-> MicrosoftSQLServerSettings
MicrosoftSQLServerSettings'
    { $sel:bcpPacketSize:MicrosoftSQLServerSettings' :: Maybe Int
bcpPacketSize =
        Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:useBcpFullLoad:MicrosoftSQLServerSettings' :: Maybe Bool
useBcpFullLoad = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:serverName:MicrosoftSQLServerSettings' :: Maybe Text
serverName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:querySingleAlwaysOnNode:MicrosoftSQLServerSettings' :: Maybe Bool
querySingleAlwaysOnNode = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:secretsManagerAccessRoleArn:MicrosoftSQLServerSettings' :: Maybe Text
secretsManagerAccessRoleArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:username:MicrosoftSQLServerSettings' :: Maybe Text
username = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:safeguardPolicy:MicrosoftSQLServerSettings' :: Maybe SafeguardPolicy
safeguardPolicy = Maybe SafeguardPolicy
forall a. Maybe a
Prelude.Nothing,
      $sel:password:MicrosoftSQLServerSettings' :: Maybe (Sensitive Text)
password = Maybe (Sensitive Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:databaseName:MicrosoftSQLServerSettings' :: Maybe Text
databaseName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:secretsManagerSecretId:MicrosoftSQLServerSettings' :: Maybe Text
secretsManagerSecretId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:readBackupOnly:MicrosoftSQLServerSettings' :: Maybe Bool
readBackupOnly = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:useThirdPartyBackupDevice:MicrosoftSQLServerSettings' :: Maybe Bool
useThirdPartyBackupDevice = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:controlTablesFileGroup:MicrosoftSQLServerSettings' :: Maybe Text
controlTablesFileGroup = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:port:MicrosoftSQLServerSettings' :: Maybe Int
port = Maybe Int
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 :: (Maybe Int -> f (Maybe Int))
-> MicrosoftSQLServerSettings -> f MicrosoftSQLServerSettings
microsoftSQLServerSettings_bcpPacketSize = (MicrosoftSQLServerSettings -> Maybe Int)
-> (MicrosoftSQLServerSettings
    -> Maybe Int -> MicrosoftSQLServerSettings)
-> Lens
     MicrosoftSQLServerSettings
     MicrosoftSQLServerSettings
     (Maybe Int)
     (Maybe Int)
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)

-- | 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 :: (Maybe Bool -> f (Maybe Bool))
-> MicrosoftSQLServerSettings -> f MicrosoftSQLServerSettings
microsoftSQLServerSettings_useBcpFullLoad = (MicrosoftSQLServerSettings -> Maybe Bool)
-> (MicrosoftSQLServerSettings
    -> Maybe Bool -> MicrosoftSQLServerSettings)
-> Lens
     MicrosoftSQLServerSettings
     MicrosoftSQLServerSettings
     (Maybe Bool)
     (Maybe Bool)
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)

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

-- | 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 :: (Maybe Bool -> f (Maybe Bool))
-> MicrosoftSQLServerSettings -> f MicrosoftSQLServerSettings
microsoftSQLServerSettings_querySingleAlwaysOnNode = (MicrosoftSQLServerSettings -> Maybe Bool)
-> (MicrosoftSQLServerSettings
    -> Maybe Bool -> MicrosoftSQLServerSettings)
-> Lens
     MicrosoftSQLServerSettings
     MicrosoftSQLServerSettings
     (Maybe Bool)
     (Maybe Bool)
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)

-- | 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 :: (Maybe Text -> f (Maybe Text))
-> MicrosoftSQLServerSettings -> f MicrosoftSQLServerSettings
microsoftSQLServerSettings_secretsManagerAccessRoleArn = (MicrosoftSQLServerSettings -> Maybe Text)
-> (MicrosoftSQLServerSettings
    -> Maybe Text -> MicrosoftSQLServerSettings)
-> Lens
     MicrosoftSQLServerSettings
     MicrosoftSQLServerSettings
     (Maybe Text)
     (Maybe Text)
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)

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

-- | 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 :: (Maybe SafeguardPolicy -> f (Maybe SafeguardPolicy))
-> MicrosoftSQLServerSettings -> f MicrosoftSQLServerSettings
microsoftSQLServerSettings_safeguardPolicy = (MicrosoftSQLServerSettings -> Maybe SafeguardPolicy)
-> (MicrosoftSQLServerSettings
    -> Maybe SafeguardPolicy -> MicrosoftSQLServerSettings)
-> Lens
     MicrosoftSQLServerSettings
     MicrosoftSQLServerSettings
     (Maybe SafeguardPolicy)
     (Maybe 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)

-- | Endpoint connection password.
microsoftSQLServerSettings_password :: Lens.Lens' MicrosoftSQLServerSettings (Prelude.Maybe Prelude.Text)
microsoftSQLServerSettings_password :: (Maybe Text -> f (Maybe Text))
-> MicrosoftSQLServerSettings -> f MicrosoftSQLServerSettings
microsoftSQLServerSettings_password = (MicrosoftSQLServerSettings -> Maybe (Sensitive Text))
-> (MicrosoftSQLServerSettings
    -> Maybe (Sensitive Text) -> MicrosoftSQLServerSettings)
-> Lens
     MicrosoftSQLServerSettings
     MicrosoftSQLServerSettings
     (Maybe (Sensitive Text))
     (Maybe (Sensitive Text))
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) ((Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
 -> MicrosoftSQLServerSettings -> f MicrosoftSQLServerSettings)
-> ((Maybe Text -> f (Maybe Text))
    -> Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> (Maybe Text -> f (Maybe Text))
-> MicrosoftSQLServerSettings
-> f MicrosoftSQLServerSettings
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso (Sensitive Text) (Sensitive Text) Text Text
-> Iso
     (Maybe (Sensitive Text))
     (Maybe (Sensitive Text))
     (Maybe Text)
     (Maybe Text)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso (Sensitive Text) (Sensitive Text) Text Text
forall a. Iso' (Sensitive a) a
Core._Sensitive

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

-- | 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 :: (Maybe Text -> f (Maybe Text))
-> MicrosoftSQLServerSettings -> f MicrosoftSQLServerSettings
microsoftSQLServerSettings_secretsManagerSecretId = (MicrosoftSQLServerSettings -> Maybe Text)
-> (MicrosoftSQLServerSettings
    -> Maybe Text -> MicrosoftSQLServerSettings)
-> Lens
     MicrosoftSQLServerSettings
     MicrosoftSQLServerSettings
     (Maybe Text)
     (Maybe Text)
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)

-- | 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 :: (Maybe Bool -> f (Maybe Bool))
-> MicrosoftSQLServerSettings -> f MicrosoftSQLServerSettings
microsoftSQLServerSettings_readBackupOnly = (MicrosoftSQLServerSettings -> Maybe Bool)
-> (MicrosoftSQLServerSettings
    -> Maybe Bool -> MicrosoftSQLServerSettings)
-> Lens
     MicrosoftSQLServerSettings
     MicrosoftSQLServerSettings
     (Maybe Bool)
     (Maybe Bool)
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)

-- | 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 :: (Maybe Bool -> f (Maybe Bool))
-> MicrosoftSQLServerSettings -> f MicrosoftSQLServerSettings
microsoftSQLServerSettings_useThirdPartyBackupDevice = (MicrosoftSQLServerSettings -> Maybe Bool)
-> (MicrosoftSQLServerSettings
    -> Maybe Bool -> MicrosoftSQLServerSettings)
-> Lens
     MicrosoftSQLServerSettings
     MicrosoftSQLServerSettings
     (Maybe Bool)
     (Maybe Bool)
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)

-- | 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 :: (Maybe Text -> f (Maybe Text))
-> MicrosoftSQLServerSettings -> f MicrosoftSQLServerSettings
microsoftSQLServerSettings_controlTablesFileGroup = (MicrosoftSQLServerSettings -> Maybe Text)
-> (MicrosoftSQLServerSettings
    -> Maybe Text -> MicrosoftSQLServerSettings)
-> Lens
     MicrosoftSQLServerSettings
     MicrosoftSQLServerSettings
     (Maybe Text)
     (Maybe Text)
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)

-- | Endpoint TCP port.
microsoftSQLServerSettings_port :: Lens.Lens' MicrosoftSQLServerSettings (Prelude.Maybe Prelude.Int)
microsoftSQLServerSettings_port :: (Maybe Int -> f (Maybe Int))
-> MicrosoftSQLServerSettings -> f MicrosoftSQLServerSettings
microsoftSQLServerSettings_port = (MicrosoftSQLServerSettings -> Maybe Int)
-> (MicrosoftSQLServerSettings
    -> Maybe Int -> MicrosoftSQLServerSettings)
-> Lens
     MicrosoftSQLServerSettings
     MicrosoftSQLServerSettings
     (Maybe Int)
     (Maybe Int)
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)

instance Core.FromJSON MicrosoftSQLServerSettings where
  parseJSON :: Value -> Parser MicrosoftSQLServerSettings
parseJSON =
    String
-> (Object -> Parser MicrosoftSQLServerSettings)
-> Value
-> Parser MicrosoftSQLServerSettings
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"MicrosoftSQLServerSettings"
      ( \Object
x ->
          Maybe Int
-> Maybe Bool
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe SafeguardPolicy
-> Maybe (Sensitive Text)
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe Int
-> MicrosoftSQLServerSettings
MicrosoftSQLServerSettings'
            (Maybe Int
 -> Maybe Bool
 -> Maybe Text
 -> Maybe Bool
 -> Maybe Text
 -> Maybe Text
 -> Maybe SafeguardPolicy
 -> Maybe (Sensitive Text)
 -> Maybe Text
 -> Maybe Text
 -> Maybe Bool
 -> Maybe Bool
 -> Maybe Text
 -> Maybe Int
 -> MicrosoftSQLServerSettings)
-> Parser (Maybe Int)
-> Parser
     (Maybe Bool
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe SafeguardPolicy
      -> Maybe (Sensitive Text)
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Int
      -> MicrosoftSQLServerSettings)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"BcpPacketSize")
            Parser
  (Maybe Bool
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe SafeguardPolicy
   -> Maybe (Sensitive Text)
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Int
   -> MicrosoftSQLServerSettings)
-> Parser (Maybe Bool)
-> Parser
     (Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe SafeguardPolicy
      -> Maybe (Sensitive Text)
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Int
      -> MicrosoftSQLServerSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"UseBcpFullLoad")
            Parser
  (Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe SafeguardPolicy
   -> Maybe (Sensitive Text)
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Int
   -> MicrosoftSQLServerSettings)
-> Parser (Maybe Text)
-> Parser
     (Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe SafeguardPolicy
      -> Maybe (Sensitive Text)
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Int
      -> MicrosoftSQLServerSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ServerName")
            Parser
  (Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe SafeguardPolicy
   -> Maybe (Sensitive Text)
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Int
   -> MicrosoftSQLServerSettings)
-> Parser (Maybe Bool)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe SafeguardPolicy
      -> Maybe (Sensitive Text)
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Int
      -> MicrosoftSQLServerSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"QuerySingleAlwaysOnNode")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe SafeguardPolicy
   -> Maybe (Sensitive Text)
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Int
   -> MicrosoftSQLServerSettings)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe SafeguardPolicy
      -> Maybe (Sensitive Text)
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Int
      -> MicrosoftSQLServerSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"SecretsManagerAccessRoleArn")
            Parser
  (Maybe Text
   -> Maybe SafeguardPolicy
   -> Maybe (Sensitive Text)
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Int
   -> MicrosoftSQLServerSettings)
-> Parser (Maybe Text)
-> Parser
     (Maybe SafeguardPolicy
      -> Maybe (Sensitive Text)
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Int
      -> MicrosoftSQLServerSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Username")
            Parser
  (Maybe SafeguardPolicy
   -> Maybe (Sensitive Text)
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Int
   -> MicrosoftSQLServerSettings)
-> Parser (Maybe SafeguardPolicy)
-> Parser
     (Maybe (Sensitive Text)
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Int
      -> MicrosoftSQLServerSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe SafeguardPolicy)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"SafeguardPolicy")
            Parser
  (Maybe (Sensitive Text)
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Int
   -> MicrosoftSQLServerSettings)
-> Parser (Maybe (Sensitive Text))
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Int
      -> MicrosoftSQLServerSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Sensitive Text))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Password")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Int
   -> MicrosoftSQLServerSettings)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Int
      -> MicrosoftSQLServerSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"DatabaseName")
            Parser
  (Maybe Text
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Int
   -> MicrosoftSQLServerSettings)
-> Parser (Maybe Text)
-> Parser
     (Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Int
      -> MicrosoftSQLServerSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"SecretsManagerSecretId")
            Parser
  (Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Int
   -> MicrosoftSQLServerSettings)
-> Parser (Maybe Bool)
-> Parser
     (Maybe Bool
      -> Maybe Text -> Maybe Int -> MicrosoftSQLServerSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ReadBackupOnly")
            Parser
  (Maybe Bool
   -> Maybe Text -> Maybe Int -> MicrosoftSQLServerSettings)
-> Parser (Maybe Bool)
-> Parser (Maybe Text -> Maybe Int -> MicrosoftSQLServerSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"UseThirdPartyBackupDevice")
            Parser (Maybe Text -> Maybe Int -> MicrosoftSQLServerSettings)
-> Parser (Maybe Text)
-> Parser (Maybe Int -> MicrosoftSQLServerSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ControlTablesFileGroup")
            Parser (Maybe Int -> MicrosoftSQLServerSettings)
-> Parser (Maybe Int) -> Parser MicrosoftSQLServerSettings
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Port")
      )

instance Prelude.Hashable MicrosoftSQLServerSettings

instance Prelude.NFData MicrosoftSQLServerSettings

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