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

import qualified Amazonka.Core as Core
import Amazonka.DMS.Types.RedisAuthTypeValue
import Amazonka.DMS.Types.SslSecurityProtocolValue
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Provides information that defines a Redis target endpoint.
--
-- /See:/ 'newRedisSettings' smart constructor.
data RedisSettings = RedisSettings'
  { -- | The connection to a Redis target endpoint using Transport Layer Security
    -- (TLS). Valid values include @plaintext@ and @ssl-encryption@. The
    -- default is @ssl-encryption@. The @ssl-encryption@ option makes an
    -- encrypted connection. Optionally, you can identify an Amazon Resource
    -- Name (ARN) for an SSL certificate authority (CA) using the
    -- @SslCaCertificateArn @setting. If an ARN isn\'t given for a CA, DMS uses
    -- the Amazon root CA.
    --
    -- The @plaintext@ option doesn\'t provide Transport Layer Security (TLS)
    -- encryption for traffic between endpoint and database.
    RedisSettings -> Maybe SslSecurityProtocolValue
sslSecurityProtocol :: Prelude.Maybe SslSecurityProtocolValue,
    -- | The user name provided with the @auth-role@ option of the @AuthType@
    -- setting for a Redis target endpoint.
    RedisSettings -> Maybe Text
authUserName :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Resource Name (ARN) for the certificate authority (CA) that
    -- DMS uses to connect to your Redis target endpoint.
    RedisSettings -> Maybe Text
sslCaCertificateArn :: Prelude.Maybe Prelude.Text,
    -- | The password provided with the @auth-role@ and @auth-token@ options of
    -- the @AuthType@ setting for a Redis target endpoint.
    RedisSettings -> Maybe (Sensitive Text)
authPassword :: Prelude.Maybe (Core.Sensitive Prelude.Text),
    -- | The type of authentication to perform when connecting to a Redis target.
    -- Options include @none@, @auth-token@, and @auth-role@. The @auth-token@
    -- option requires an @AuthPassword@ value to be provided. The @auth-role@
    -- option requires @AuthUserName@ and @AuthPassword@ values to be provided.
    RedisSettings -> Maybe RedisAuthTypeValue
authType :: Prelude.Maybe RedisAuthTypeValue,
    -- | Fully qualified domain name of the endpoint.
    RedisSettings -> Text
serverName :: Prelude.Text,
    -- | Transmission Control Protocol (TCP) port for the endpoint.
    RedisSettings -> Int
port :: Prelude.Int
  }
  deriving (RedisSettings -> RedisSettings -> Bool
(RedisSettings -> RedisSettings -> Bool)
-> (RedisSettings -> RedisSettings -> Bool) -> Eq RedisSettings
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RedisSettings -> RedisSettings -> Bool
$c/= :: RedisSettings -> RedisSettings -> Bool
== :: RedisSettings -> RedisSettings -> Bool
$c== :: RedisSettings -> RedisSettings -> Bool
Prelude.Eq, Int -> RedisSettings -> ShowS
[RedisSettings] -> ShowS
RedisSettings -> String
(Int -> RedisSettings -> ShowS)
-> (RedisSettings -> String)
-> ([RedisSettings] -> ShowS)
-> Show RedisSettings
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RedisSettings] -> ShowS
$cshowList :: [RedisSettings] -> ShowS
show :: RedisSettings -> String
$cshow :: RedisSettings -> String
showsPrec :: Int -> RedisSettings -> ShowS
$cshowsPrec :: Int -> RedisSettings -> ShowS
Prelude.Show, (forall x. RedisSettings -> Rep RedisSettings x)
-> (forall x. Rep RedisSettings x -> RedisSettings)
-> Generic RedisSettings
forall x. Rep RedisSettings x -> RedisSettings
forall x. RedisSettings -> Rep RedisSettings x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep RedisSettings x -> RedisSettings
$cfrom :: forall x. RedisSettings -> Rep RedisSettings x
Prelude.Generic)

-- |
-- Create a value of 'RedisSettings' 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:
--
-- 'sslSecurityProtocol', 'redisSettings_sslSecurityProtocol' - The connection to a Redis target endpoint using Transport Layer Security
-- (TLS). Valid values include @plaintext@ and @ssl-encryption@. The
-- default is @ssl-encryption@. The @ssl-encryption@ option makes an
-- encrypted connection. Optionally, you can identify an Amazon Resource
-- Name (ARN) for an SSL certificate authority (CA) using the
-- @SslCaCertificateArn @setting. If an ARN isn\'t given for a CA, DMS uses
-- the Amazon root CA.
--
-- The @plaintext@ option doesn\'t provide Transport Layer Security (TLS)
-- encryption for traffic between endpoint and database.
--
-- 'authUserName', 'redisSettings_authUserName' - The user name provided with the @auth-role@ option of the @AuthType@
-- setting for a Redis target endpoint.
--
-- 'sslCaCertificateArn', 'redisSettings_sslCaCertificateArn' - The Amazon Resource Name (ARN) for the certificate authority (CA) that
-- DMS uses to connect to your Redis target endpoint.
--
-- 'authPassword', 'redisSettings_authPassword' - The password provided with the @auth-role@ and @auth-token@ options of
-- the @AuthType@ setting for a Redis target endpoint.
--
-- 'authType', 'redisSettings_authType' - The type of authentication to perform when connecting to a Redis target.
-- Options include @none@, @auth-token@, and @auth-role@. The @auth-token@
-- option requires an @AuthPassword@ value to be provided. The @auth-role@
-- option requires @AuthUserName@ and @AuthPassword@ values to be provided.
--
-- 'serverName', 'redisSettings_serverName' - Fully qualified domain name of the endpoint.
--
-- 'port', 'redisSettings_port' - Transmission Control Protocol (TCP) port for the endpoint.
newRedisSettings ::
  -- | 'serverName'
  Prelude.Text ->
  -- | 'port'
  Prelude.Int ->
  RedisSettings
newRedisSettings :: Text -> Int -> RedisSettings
newRedisSettings Text
pServerName_ Int
pPort_ =
  RedisSettings' :: Maybe SslSecurityProtocolValue
-> Maybe Text
-> Maybe Text
-> Maybe (Sensitive Text)
-> Maybe RedisAuthTypeValue
-> Text
-> Int
-> RedisSettings
RedisSettings'
    { $sel:sslSecurityProtocol:RedisSettings' :: Maybe SslSecurityProtocolValue
sslSecurityProtocol =
        Maybe SslSecurityProtocolValue
forall a. Maybe a
Prelude.Nothing,
      $sel:authUserName:RedisSettings' :: Maybe Text
authUserName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:sslCaCertificateArn:RedisSettings' :: Maybe Text
sslCaCertificateArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:authPassword:RedisSettings' :: Maybe (Sensitive Text)
authPassword = Maybe (Sensitive Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:authType:RedisSettings' :: Maybe RedisAuthTypeValue
authType = Maybe RedisAuthTypeValue
forall a. Maybe a
Prelude.Nothing,
      $sel:serverName:RedisSettings' :: Text
serverName = Text
pServerName_,
      $sel:port:RedisSettings' :: Int
port = Int
pPort_
    }

-- | The connection to a Redis target endpoint using Transport Layer Security
-- (TLS). Valid values include @plaintext@ and @ssl-encryption@. The
-- default is @ssl-encryption@. The @ssl-encryption@ option makes an
-- encrypted connection. Optionally, you can identify an Amazon Resource
-- Name (ARN) for an SSL certificate authority (CA) using the
-- @SslCaCertificateArn @setting. If an ARN isn\'t given for a CA, DMS uses
-- the Amazon root CA.
--
-- The @plaintext@ option doesn\'t provide Transport Layer Security (TLS)
-- encryption for traffic between endpoint and database.
redisSettings_sslSecurityProtocol :: Lens.Lens' RedisSettings (Prelude.Maybe SslSecurityProtocolValue)
redisSettings_sslSecurityProtocol :: (Maybe SslSecurityProtocolValue
 -> f (Maybe SslSecurityProtocolValue))
-> RedisSettings -> f RedisSettings
redisSettings_sslSecurityProtocol = (RedisSettings -> Maybe SslSecurityProtocolValue)
-> (RedisSettings
    -> Maybe SslSecurityProtocolValue -> RedisSettings)
-> Lens
     RedisSettings
     RedisSettings
     (Maybe SslSecurityProtocolValue)
     (Maybe SslSecurityProtocolValue)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RedisSettings' {Maybe SslSecurityProtocolValue
sslSecurityProtocol :: Maybe SslSecurityProtocolValue
$sel:sslSecurityProtocol:RedisSettings' :: RedisSettings -> Maybe SslSecurityProtocolValue
sslSecurityProtocol} -> Maybe SslSecurityProtocolValue
sslSecurityProtocol) (\s :: RedisSettings
s@RedisSettings' {} Maybe SslSecurityProtocolValue
a -> RedisSettings
s {$sel:sslSecurityProtocol:RedisSettings' :: Maybe SslSecurityProtocolValue
sslSecurityProtocol = Maybe SslSecurityProtocolValue
a} :: RedisSettings)

-- | The user name provided with the @auth-role@ option of the @AuthType@
-- setting for a Redis target endpoint.
redisSettings_authUserName :: Lens.Lens' RedisSettings (Prelude.Maybe Prelude.Text)
redisSettings_authUserName :: (Maybe Text -> f (Maybe Text)) -> RedisSettings -> f RedisSettings
redisSettings_authUserName = (RedisSettings -> Maybe Text)
-> (RedisSettings -> Maybe Text -> RedisSettings)
-> Lens RedisSettings RedisSettings (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RedisSettings' {Maybe Text
authUserName :: Maybe Text
$sel:authUserName:RedisSettings' :: RedisSettings -> Maybe Text
authUserName} -> Maybe Text
authUserName) (\s :: RedisSettings
s@RedisSettings' {} Maybe Text
a -> RedisSettings
s {$sel:authUserName:RedisSettings' :: Maybe Text
authUserName = Maybe Text
a} :: RedisSettings)

-- | The Amazon Resource Name (ARN) for the certificate authority (CA) that
-- DMS uses to connect to your Redis target endpoint.
redisSettings_sslCaCertificateArn :: Lens.Lens' RedisSettings (Prelude.Maybe Prelude.Text)
redisSettings_sslCaCertificateArn :: (Maybe Text -> f (Maybe Text)) -> RedisSettings -> f RedisSettings
redisSettings_sslCaCertificateArn = (RedisSettings -> Maybe Text)
-> (RedisSettings -> Maybe Text -> RedisSettings)
-> Lens RedisSettings RedisSettings (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RedisSettings' {Maybe Text
sslCaCertificateArn :: Maybe Text
$sel:sslCaCertificateArn:RedisSettings' :: RedisSettings -> Maybe Text
sslCaCertificateArn} -> Maybe Text
sslCaCertificateArn) (\s :: RedisSettings
s@RedisSettings' {} Maybe Text
a -> RedisSettings
s {$sel:sslCaCertificateArn:RedisSettings' :: Maybe Text
sslCaCertificateArn = Maybe Text
a} :: RedisSettings)

-- | The password provided with the @auth-role@ and @auth-token@ options of
-- the @AuthType@ setting for a Redis target endpoint.
redisSettings_authPassword :: Lens.Lens' RedisSettings (Prelude.Maybe Prelude.Text)
redisSettings_authPassword :: (Maybe Text -> f (Maybe Text)) -> RedisSettings -> f RedisSettings
redisSettings_authPassword = (RedisSettings -> Maybe (Sensitive Text))
-> (RedisSettings -> Maybe (Sensitive Text) -> RedisSettings)
-> Lens
     RedisSettings
     RedisSettings
     (Maybe (Sensitive Text))
     (Maybe (Sensitive Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RedisSettings' {Maybe (Sensitive Text)
authPassword :: Maybe (Sensitive Text)
$sel:authPassword:RedisSettings' :: RedisSettings -> Maybe (Sensitive Text)
authPassword} -> Maybe (Sensitive Text)
authPassword) (\s :: RedisSettings
s@RedisSettings' {} Maybe (Sensitive Text)
a -> RedisSettings
s {$sel:authPassword:RedisSettings' :: Maybe (Sensitive Text)
authPassword = Maybe (Sensitive Text)
a} :: RedisSettings) ((Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
 -> RedisSettings -> f RedisSettings)
-> ((Maybe Text -> f (Maybe Text))
    -> Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> (Maybe Text -> f (Maybe Text))
-> RedisSettings
-> f RedisSettings
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

-- | The type of authentication to perform when connecting to a Redis target.
-- Options include @none@, @auth-token@, and @auth-role@. The @auth-token@
-- option requires an @AuthPassword@ value to be provided. The @auth-role@
-- option requires @AuthUserName@ and @AuthPassword@ values to be provided.
redisSettings_authType :: Lens.Lens' RedisSettings (Prelude.Maybe RedisAuthTypeValue)
redisSettings_authType :: (Maybe RedisAuthTypeValue -> f (Maybe RedisAuthTypeValue))
-> RedisSettings -> f RedisSettings
redisSettings_authType = (RedisSettings -> Maybe RedisAuthTypeValue)
-> (RedisSettings -> Maybe RedisAuthTypeValue -> RedisSettings)
-> Lens
     RedisSettings
     RedisSettings
     (Maybe RedisAuthTypeValue)
     (Maybe RedisAuthTypeValue)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RedisSettings' {Maybe RedisAuthTypeValue
authType :: Maybe RedisAuthTypeValue
$sel:authType:RedisSettings' :: RedisSettings -> Maybe RedisAuthTypeValue
authType} -> Maybe RedisAuthTypeValue
authType) (\s :: RedisSettings
s@RedisSettings' {} Maybe RedisAuthTypeValue
a -> RedisSettings
s {$sel:authType:RedisSettings' :: Maybe RedisAuthTypeValue
authType = Maybe RedisAuthTypeValue
a} :: RedisSettings)

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

-- | Transmission Control Protocol (TCP) port for the endpoint.
redisSettings_port :: Lens.Lens' RedisSettings Prelude.Int
redisSettings_port :: (Int -> f Int) -> RedisSettings -> f RedisSettings
redisSettings_port = (RedisSettings -> Int)
-> (RedisSettings -> Int -> RedisSettings)
-> Lens RedisSettings RedisSettings Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RedisSettings' {Int
port :: Int
$sel:port:RedisSettings' :: RedisSettings -> Int
port} -> Int
port) (\s :: RedisSettings
s@RedisSettings' {} Int
a -> RedisSettings
s {$sel:port:RedisSettings' :: Int
port = Int
a} :: RedisSettings)

instance Core.FromJSON RedisSettings where
  parseJSON :: Value -> Parser RedisSettings
parseJSON =
    String
-> (Object -> Parser RedisSettings)
-> Value
-> Parser RedisSettings
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"RedisSettings"
      ( \Object
x ->
          Maybe SslSecurityProtocolValue
-> Maybe Text
-> Maybe Text
-> Maybe (Sensitive Text)
-> Maybe RedisAuthTypeValue
-> Text
-> Int
-> RedisSettings
RedisSettings'
            (Maybe SslSecurityProtocolValue
 -> Maybe Text
 -> Maybe Text
 -> Maybe (Sensitive Text)
 -> Maybe RedisAuthTypeValue
 -> Text
 -> Int
 -> RedisSettings)
-> Parser (Maybe SslSecurityProtocolValue)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe (Sensitive Text)
      -> Maybe RedisAuthTypeValue
      -> Text
      -> Int
      -> RedisSettings)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe SslSecurityProtocolValue)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"SslSecurityProtocol")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe (Sensitive Text)
   -> Maybe RedisAuthTypeValue
   -> Text
   -> Int
   -> RedisSettings)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe (Sensitive Text)
      -> Maybe RedisAuthTypeValue
      -> Text
      -> Int
      -> RedisSettings)
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
"AuthUserName")
            Parser
  (Maybe Text
   -> Maybe (Sensitive Text)
   -> Maybe RedisAuthTypeValue
   -> Text
   -> Int
   -> RedisSettings)
-> Parser (Maybe Text)
-> Parser
     (Maybe (Sensitive Text)
      -> Maybe RedisAuthTypeValue -> Text -> Int -> RedisSettings)
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
"SslCaCertificateArn")
            Parser
  (Maybe (Sensitive Text)
   -> Maybe RedisAuthTypeValue -> Text -> Int -> RedisSettings)
-> Parser (Maybe (Sensitive Text))
-> Parser
     (Maybe RedisAuthTypeValue -> Text -> Int -> RedisSettings)
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
"AuthPassword")
            Parser (Maybe RedisAuthTypeValue -> Text -> Int -> RedisSettings)
-> Parser (Maybe RedisAuthTypeValue)
-> Parser (Text -> Int -> RedisSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe RedisAuthTypeValue)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"AuthType")
            Parser (Text -> Int -> RedisSettings)
-> Parser Text -> Parser (Int -> RedisSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"ServerName")
            Parser (Int -> RedisSettings) -> Parser Int -> Parser RedisSettings
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Int
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"Port")
      )

instance Prelude.Hashable RedisSettings

instance Prelude.NFData RedisSettings

instance Core.ToJSON RedisSettings where
  toJSON :: RedisSettings -> Value
toJSON RedisSettings' {Int
Maybe Text
Maybe (Sensitive Text)
Maybe RedisAuthTypeValue
Maybe SslSecurityProtocolValue
Text
port :: Int
serverName :: Text
authType :: Maybe RedisAuthTypeValue
authPassword :: Maybe (Sensitive Text)
sslCaCertificateArn :: Maybe Text
authUserName :: Maybe Text
sslSecurityProtocol :: Maybe SslSecurityProtocolValue
$sel:port:RedisSettings' :: RedisSettings -> Int
$sel:serverName:RedisSettings' :: RedisSettings -> Text
$sel:authType:RedisSettings' :: RedisSettings -> Maybe RedisAuthTypeValue
$sel:authPassword:RedisSettings' :: RedisSettings -> Maybe (Sensitive Text)
$sel:sslCaCertificateArn:RedisSettings' :: RedisSettings -> Maybe Text
$sel:authUserName:RedisSettings' :: RedisSettings -> Maybe Text
$sel:sslSecurityProtocol:RedisSettings' :: RedisSettings -> Maybe SslSecurityProtocolValue
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"SslSecurityProtocol" Text -> SslSecurityProtocolValue -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (SslSecurityProtocolValue -> Pair)
-> Maybe SslSecurityProtocolValue -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe SslSecurityProtocolValue
sslSecurityProtocol,
            (Text
"AuthUserName" 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
authUserName,
            (Text
"SslCaCertificateArn" 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
sslCaCertificateArn,
            (Text
"AuthPassword" 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)
authPassword,
            (Text
"AuthType" Text -> RedisAuthTypeValue -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (RedisAuthTypeValue -> Pair)
-> Maybe RedisAuthTypeValue -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe RedisAuthTypeValue
authType,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"ServerName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
serverName),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Port" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Int
port)
          ]
      )