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

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

-- | Provides information that defines a SAP ASE endpoint.
--
-- /See:/ 'newSybaseSettings' smart constructor.
data SybaseSettings = SybaseSettings'
  { -- | Fully qualified domain name of the endpoint.
    SybaseSettings -> Maybe Text
serverName :: Prelude.Maybe Prelude.Text,
    -- | 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 SAP ASE 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/.
    SybaseSettings -> Maybe Text
secretsManagerAccessRoleArn :: Prelude.Maybe Prelude.Text,
    -- | Endpoint connection user name.
    SybaseSettings -> Maybe Text
username :: Prelude.Maybe Prelude.Text,
    -- | Endpoint connection password.
    SybaseSettings -> Maybe (Sensitive Text)
password :: Prelude.Maybe (Core.Sensitive Prelude.Text),
    -- | Database name for the endpoint.
    SybaseSettings -> Maybe Text
databaseName :: Prelude.Maybe Prelude.Text,
    -- | The full ARN, partial ARN, or friendly name of the
    -- @SecretsManagerSecret@ that contains the SAP SAE endpoint connection
    -- details.
    SybaseSettings -> Maybe Text
secretsManagerSecretId :: Prelude.Maybe Prelude.Text,
    -- | Endpoint TCP port.
    SybaseSettings -> Maybe Int
port :: Prelude.Maybe Prelude.Int
  }
  deriving (SybaseSettings -> SybaseSettings -> Bool
(SybaseSettings -> SybaseSettings -> Bool)
-> (SybaseSettings -> SybaseSettings -> Bool) -> Eq SybaseSettings
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SybaseSettings -> SybaseSettings -> Bool
$c/= :: SybaseSettings -> SybaseSettings -> Bool
== :: SybaseSettings -> SybaseSettings -> Bool
$c== :: SybaseSettings -> SybaseSettings -> Bool
Prelude.Eq, Int -> SybaseSettings -> ShowS
[SybaseSettings] -> ShowS
SybaseSettings -> String
(Int -> SybaseSettings -> ShowS)
-> (SybaseSettings -> String)
-> ([SybaseSettings] -> ShowS)
-> Show SybaseSettings
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SybaseSettings] -> ShowS
$cshowList :: [SybaseSettings] -> ShowS
show :: SybaseSettings -> String
$cshow :: SybaseSettings -> String
showsPrec :: Int -> SybaseSettings -> ShowS
$cshowsPrec :: Int -> SybaseSettings -> ShowS
Prelude.Show, (forall x. SybaseSettings -> Rep SybaseSettings x)
-> (forall x. Rep SybaseSettings x -> SybaseSettings)
-> Generic SybaseSettings
forall x. Rep SybaseSettings x -> SybaseSettings
forall x. SybaseSettings -> Rep SybaseSettings x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SybaseSettings x -> SybaseSettings
$cfrom :: forall x. SybaseSettings -> Rep SybaseSettings x
Prelude.Generic)

-- |
-- Create a value of 'SybaseSettings' 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:
--
-- 'serverName', 'sybaseSettings_serverName' - Fully qualified domain name of the endpoint.
--
-- 'secretsManagerAccessRoleArn', 'sybaseSettings_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 SAP ASE 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', 'sybaseSettings_username' - Endpoint connection user name.
--
-- 'password', 'sybaseSettings_password' - Endpoint connection password.
--
-- 'databaseName', 'sybaseSettings_databaseName' - Database name for the endpoint.
--
-- 'secretsManagerSecretId', 'sybaseSettings_secretsManagerSecretId' - The full ARN, partial ARN, or friendly name of the
-- @SecretsManagerSecret@ that contains the SAP SAE endpoint connection
-- details.
--
-- 'port', 'sybaseSettings_port' - Endpoint TCP port.
newSybaseSettings ::
  SybaseSettings
newSybaseSettings :: SybaseSettings
newSybaseSettings =
  SybaseSettings' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe (Sensitive Text)
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> SybaseSettings
SybaseSettings'
    { $sel:serverName:SybaseSettings' :: Maybe Text
serverName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:secretsManagerAccessRoleArn:SybaseSettings' :: Maybe Text
secretsManagerAccessRoleArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:username:SybaseSettings' :: Maybe Text
username = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:password:SybaseSettings' :: Maybe (Sensitive Text)
password = Maybe (Sensitive Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:databaseName:SybaseSettings' :: Maybe Text
databaseName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:secretsManagerSecretId:SybaseSettings' :: Maybe Text
secretsManagerSecretId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:port:SybaseSettings' :: Maybe Int
port = Maybe Int
forall a. Maybe a
Prelude.Nothing
    }

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

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

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

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

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

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

instance Core.FromJSON SybaseSettings where
  parseJSON :: Value -> Parser SybaseSettings
parseJSON =
    String
-> (Object -> Parser SybaseSettings)
-> Value
-> Parser SybaseSettings
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"SybaseSettings"
      ( \Object
x ->
          Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe (Sensitive Text)
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> SybaseSettings
SybaseSettings'
            (Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe (Sensitive Text)
 -> Maybe Text
 -> Maybe Text
 -> Maybe Int
 -> SybaseSettings)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe (Sensitive Text)
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> SybaseSettings)
forall (f :: * -> *) a b. Functor 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 Text
   -> Maybe Text
   -> Maybe (Sensitive Text)
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> SybaseSettings)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe (Sensitive Text)
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> SybaseSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"SecretsManagerAccessRoleArn")
            Parser
  (Maybe Text
   -> Maybe (Sensitive Text)
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> SybaseSettings)
-> Parser (Maybe Text)
-> Parser
     (Maybe (Sensitive Text)
      -> Maybe Text -> Maybe Text -> Maybe Int -> SybaseSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Username")
            Parser
  (Maybe (Sensitive Text)
   -> Maybe Text -> Maybe Text -> Maybe Int -> SybaseSettings)
-> Parser (Maybe (Sensitive Text))
-> Parser (Maybe Text -> Maybe Text -> Maybe Int -> SybaseSettings)
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 Int -> SybaseSettings)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Int -> SybaseSettings)
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 Int -> SybaseSettings)
-> Parser (Maybe Text) -> Parser (Maybe Int -> SybaseSettings)
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 Int -> SybaseSettings)
-> Parser (Maybe Int) -> Parser SybaseSettings
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 SybaseSettings

instance Prelude.NFData SybaseSettings

instance Core.ToJSON SybaseSettings where
  toJSON :: SybaseSettings -> Value
toJSON SybaseSettings' {Maybe Int
Maybe Text
Maybe (Sensitive Text)
port :: Maybe Int
secretsManagerSecretId :: Maybe Text
databaseName :: Maybe Text
password :: Maybe (Sensitive Text)
username :: Maybe Text
secretsManagerAccessRoleArn :: Maybe Text
serverName :: Maybe Text
$sel:port:SybaseSettings' :: SybaseSettings -> Maybe Int
$sel:secretsManagerSecretId:SybaseSettings' :: SybaseSettings -> Maybe Text
$sel:databaseName:SybaseSettings' :: SybaseSettings -> Maybe Text
$sel:password:SybaseSettings' :: SybaseSettings -> Maybe (Sensitive Text)
$sel:username:SybaseSettings' :: SybaseSettings -> Maybe Text
$sel:secretsManagerAccessRoleArn:SybaseSettings' :: SybaseSettings -> Maybe Text
$sel:serverName:SybaseSettings' :: SybaseSettings -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (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
"SecretsManagerAccessRoleArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
secretsManagerAccessRoleArn,
            (Text
"Username" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
username,
            (Text
"Password" Text -> Sensitive Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Sensitive Text -> Pair) -> Maybe (Sensitive Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Sensitive Text)
password,
            (Text
"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
"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
          ]
      )