{-# 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.CognitoIdentityProvider.Types.VerificationMessageTemplateType
-- 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.CognitoIdentityProvider.Types.VerificationMessageTemplateType where

import Amazonka.CognitoIdentityProvider.Types.DefaultEmailOptionType
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | The template for verification messages.
--
-- /See:/ 'newVerificationMessageTemplateType' smart constructor.
data VerificationMessageTemplateType = VerificationMessageTemplateType'
  { -- | The default email option.
    VerificationMessageTemplateType -> Maybe DefaultEmailOptionType
defaultEmailOption :: Prelude.Maybe DefaultEmailOptionType,
    -- | The subject line for the email message template. EmailSubject is allowed
    -- only if
    -- <https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_EmailConfigurationType.html#CognitoUserPools-Type-EmailConfigurationType-EmailSendingAccount EmailSendingAccount>
    -- is DEVELOPER.
    VerificationMessageTemplateType -> Maybe Text
emailSubject :: Prelude.Maybe Prelude.Text,
    -- | The subject line for the email message template for sending a
    -- confirmation link to the user. EmailSubjectByLink is allowed only
    -- <https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_EmailConfigurationType.html#CognitoUserPools-Type-EmailConfigurationType-EmailSendingAccount EmailSendingAccount>
    -- is DEVELOPER.
    VerificationMessageTemplateType -> Maybe Text
emailSubjectByLink :: Prelude.Maybe Prelude.Text,
    -- | The SMS message template.
    VerificationMessageTemplateType -> Maybe Text
smsMessage :: Prelude.Maybe Prelude.Text,
    -- | The email message template for sending a confirmation link to the user.
    -- EmailMessageByLink is allowed only if
    -- <https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_EmailConfigurationType.html#CognitoUserPools-Type-EmailConfigurationType-EmailSendingAccount EmailSendingAccount>
    -- is DEVELOPER.
    VerificationMessageTemplateType -> Maybe Text
emailMessageByLink :: Prelude.Maybe Prelude.Text,
    -- | The email message template. EmailMessage is allowed only if
    -- <https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_EmailConfigurationType.html#CognitoUserPools-Type-EmailConfigurationType-EmailSendingAccount EmailSendingAccount>
    -- is DEVELOPER.
    VerificationMessageTemplateType -> Maybe Text
emailMessage :: Prelude.Maybe Prelude.Text
  }
  deriving (VerificationMessageTemplateType
-> VerificationMessageTemplateType -> Bool
(VerificationMessageTemplateType
 -> VerificationMessageTemplateType -> Bool)
-> (VerificationMessageTemplateType
    -> VerificationMessageTemplateType -> Bool)
-> Eq VerificationMessageTemplateType
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: VerificationMessageTemplateType
-> VerificationMessageTemplateType -> Bool
$c/= :: VerificationMessageTemplateType
-> VerificationMessageTemplateType -> Bool
== :: VerificationMessageTemplateType
-> VerificationMessageTemplateType -> Bool
$c== :: VerificationMessageTemplateType
-> VerificationMessageTemplateType -> Bool
Prelude.Eq, ReadPrec [VerificationMessageTemplateType]
ReadPrec VerificationMessageTemplateType
Int -> ReadS VerificationMessageTemplateType
ReadS [VerificationMessageTemplateType]
(Int -> ReadS VerificationMessageTemplateType)
-> ReadS [VerificationMessageTemplateType]
-> ReadPrec VerificationMessageTemplateType
-> ReadPrec [VerificationMessageTemplateType]
-> Read VerificationMessageTemplateType
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [VerificationMessageTemplateType]
$creadListPrec :: ReadPrec [VerificationMessageTemplateType]
readPrec :: ReadPrec VerificationMessageTemplateType
$creadPrec :: ReadPrec VerificationMessageTemplateType
readList :: ReadS [VerificationMessageTemplateType]
$creadList :: ReadS [VerificationMessageTemplateType]
readsPrec :: Int -> ReadS VerificationMessageTemplateType
$creadsPrec :: Int -> ReadS VerificationMessageTemplateType
Prelude.Read, Int -> VerificationMessageTemplateType -> ShowS
[VerificationMessageTemplateType] -> ShowS
VerificationMessageTemplateType -> String
(Int -> VerificationMessageTemplateType -> ShowS)
-> (VerificationMessageTemplateType -> String)
-> ([VerificationMessageTemplateType] -> ShowS)
-> Show VerificationMessageTemplateType
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [VerificationMessageTemplateType] -> ShowS
$cshowList :: [VerificationMessageTemplateType] -> ShowS
show :: VerificationMessageTemplateType -> String
$cshow :: VerificationMessageTemplateType -> String
showsPrec :: Int -> VerificationMessageTemplateType -> ShowS
$cshowsPrec :: Int -> VerificationMessageTemplateType -> ShowS
Prelude.Show, (forall x.
 VerificationMessageTemplateType
 -> Rep VerificationMessageTemplateType x)
-> (forall x.
    Rep VerificationMessageTemplateType x
    -> VerificationMessageTemplateType)
-> Generic VerificationMessageTemplateType
forall x.
Rep VerificationMessageTemplateType x
-> VerificationMessageTemplateType
forall x.
VerificationMessageTemplateType
-> Rep VerificationMessageTemplateType x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep VerificationMessageTemplateType x
-> VerificationMessageTemplateType
$cfrom :: forall x.
VerificationMessageTemplateType
-> Rep VerificationMessageTemplateType x
Prelude.Generic)

-- |
-- Create a value of 'VerificationMessageTemplateType' 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:
--
-- 'defaultEmailOption', 'verificationMessageTemplateType_defaultEmailOption' - The default email option.
--
-- 'emailSubject', 'verificationMessageTemplateType_emailSubject' - The subject line for the email message template. EmailSubject is allowed
-- only if
-- <https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_EmailConfigurationType.html#CognitoUserPools-Type-EmailConfigurationType-EmailSendingAccount EmailSendingAccount>
-- is DEVELOPER.
--
-- 'emailSubjectByLink', 'verificationMessageTemplateType_emailSubjectByLink' - The subject line for the email message template for sending a
-- confirmation link to the user. EmailSubjectByLink is allowed only
-- <https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_EmailConfigurationType.html#CognitoUserPools-Type-EmailConfigurationType-EmailSendingAccount EmailSendingAccount>
-- is DEVELOPER.
--
-- 'smsMessage', 'verificationMessageTemplateType_smsMessage' - The SMS message template.
--
-- 'emailMessageByLink', 'verificationMessageTemplateType_emailMessageByLink' - The email message template for sending a confirmation link to the user.
-- EmailMessageByLink is allowed only if
-- <https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_EmailConfigurationType.html#CognitoUserPools-Type-EmailConfigurationType-EmailSendingAccount EmailSendingAccount>
-- is DEVELOPER.
--
-- 'emailMessage', 'verificationMessageTemplateType_emailMessage' - The email message template. EmailMessage is allowed only if
-- <https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_EmailConfigurationType.html#CognitoUserPools-Type-EmailConfigurationType-EmailSendingAccount EmailSendingAccount>
-- is DEVELOPER.
newVerificationMessageTemplateType ::
  VerificationMessageTemplateType
newVerificationMessageTemplateType :: VerificationMessageTemplateType
newVerificationMessageTemplateType =
  VerificationMessageTemplateType' :: Maybe DefaultEmailOptionType
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> VerificationMessageTemplateType
VerificationMessageTemplateType'
    { $sel:defaultEmailOption:VerificationMessageTemplateType' :: Maybe DefaultEmailOptionType
defaultEmailOption =
        Maybe DefaultEmailOptionType
forall a. Maybe a
Prelude.Nothing,
      $sel:emailSubject:VerificationMessageTemplateType' :: Maybe Text
emailSubject = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:emailSubjectByLink:VerificationMessageTemplateType' :: Maybe Text
emailSubjectByLink = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:smsMessage:VerificationMessageTemplateType' :: Maybe Text
smsMessage = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:emailMessageByLink:VerificationMessageTemplateType' :: Maybe Text
emailMessageByLink = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:emailMessage:VerificationMessageTemplateType' :: Maybe Text
emailMessage = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | The default email option.
verificationMessageTemplateType_defaultEmailOption :: Lens.Lens' VerificationMessageTemplateType (Prelude.Maybe DefaultEmailOptionType)
verificationMessageTemplateType_defaultEmailOption :: (Maybe DefaultEmailOptionType -> f (Maybe DefaultEmailOptionType))
-> VerificationMessageTemplateType
-> f VerificationMessageTemplateType
verificationMessageTemplateType_defaultEmailOption = (VerificationMessageTemplateType -> Maybe DefaultEmailOptionType)
-> (VerificationMessageTemplateType
    -> Maybe DefaultEmailOptionType -> VerificationMessageTemplateType)
-> Lens
     VerificationMessageTemplateType
     VerificationMessageTemplateType
     (Maybe DefaultEmailOptionType)
     (Maybe DefaultEmailOptionType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VerificationMessageTemplateType' {Maybe DefaultEmailOptionType
defaultEmailOption :: Maybe DefaultEmailOptionType
$sel:defaultEmailOption:VerificationMessageTemplateType' :: VerificationMessageTemplateType -> Maybe DefaultEmailOptionType
defaultEmailOption} -> Maybe DefaultEmailOptionType
defaultEmailOption) (\s :: VerificationMessageTemplateType
s@VerificationMessageTemplateType' {} Maybe DefaultEmailOptionType
a -> VerificationMessageTemplateType
s {$sel:defaultEmailOption:VerificationMessageTemplateType' :: Maybe DefaultEmailOptionType
defaultEmailOption = Maybe DefaultEmailOptionType
a} :: VerificationMessageTemplateType)

-- | The subject line for the email message template. EmailSubject is allowed
-- only if
-- <https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_EmailConfigurationType.html#CognitoUserPools-Type-EmailConfigurationType-EmailSendingAccount EmailSendingAccount>
-- is DEVELOPER.
verificationMessageTemplateType_emailSubject :: Lens.Lens' VerificationMessageTemplateType (Prelude.Maybe Prelude.Text)
verificationMessageTemplateType_emailSubject :: (Maybe Text -> f (Maybe Text))
-> VerificationMessageTemplateType
-> f VerificationMessageTemplateType
verificationMessageTemplateType_emailSubject = (VerificationMessageTemplateType -> Maybe Text)
-> (VerificationMessageTemplateType
    -> Maybe Text -> VerificationMessageTemplateType)
-> Lens
     VerificationMessageTemplateType
     VerificationMessageTemplateType
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VerificationMessageTemplateType' {Maybe Text
emailSubject :: Maybe Text
$sel:emailSubject:VerificationMessageTemplateType' :: VerificationMessageTemplateType -> Maybe Text
emailSubject} -> Maybe Text
emailSubject) (\s :: VerificationMessageTemplateType
s@VerificationMessageTemplateType' {} Maybe Text
a -> VerificationMessageTemplateType
s {$sel:emailSubject:VerificationMessageTemplateType' :: Maybe Text
emailSubject = Maybe Text
a} :: VerificationMessageTemplateType)

-- | The subject line for the email message template for sending a
-- confirmation link to the user. EmailSubjectByLink is allowed only
-- <https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_EmailConfigurationType.html#CognitoUserPools-Type-EmailConfigurationType-EmailSendingAccount EmailSendingAccount>
-- is DEVELOPER.
verificationMessageTemplateType_emailSubjectByLink :: Lens.Lens' VerificationMessageTemplateType (Prelude.Maybe Prelude.Text)
verificationMessageTemplateType_emailSubjectByLink :: (Maybe Text -> f (Maybe Text))
-> VerificationMessageTemplateType
-> f VerificationMessageTemplateType
verificationMessageTemplateType_emailSubjectByLink = (VerificationMessageTemplateType -> Maybe Text)
-> (VerificationMessageTemplateType
    -> Maybe Text -> VerificationMessageTemplateType)
-> Lens
     VerificationMessageTemplateType
     VerificationMessageTemplateType
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VerificationMessageTemplateType' {Maybe Text
emailSubjectByLink :: Maybe Text
$sel:emailSubjectByLink:VerificationMessageTemplateType' :: VerificationMessageTemplateType -> Maybe Text
emailSubjectByLink} -> Maybe Text
emailSubjectByLink) (\s :: VerificationMessageTemplateType
s@VerificationMessageTemplateType' {} Maybe Text
a -> VerificationMessageTemplateType
s {$sel:emailSubjectByLink:VerificationMessageTemplateType' :: Maybe Text
emailSubjectByLink = Maybe Text
a} :: VerificationMessageTemplateType)

-- | The SMS message template.
verificationMessageTemplateType_smsMessage :: Lens.Lens' VerificationMessageTemplateType (Prelude.Maybe Prelude.Text)
verificationMessageTemplateType_smsMessage :: (Maybe Text -> f (Maybe Text))
-> VerificationMessageTemplateType
-> f VerificationMessageTemplateType
verificationMessageTemplateType_smsMessage = (VerificationMessageTemplateType -> Maybe Text)
-> (VerificationMessageTemplateType
    -> Maybe Text -> VerificationMessageTemplateType)
-> Lens
     VerificationMessageTemplateType
     VerificationMessageTemplateType
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VerificationMessageTemplateType' {Maybe Text
smsMessage :: Maybe Text
$sel:smsMessage:VerificationMessageTemplateType' :: VerificationMessageTemplateType -> Maybe Text
smsMessage} -> Maybe Text
smsMessage) (\s :: VerificationMessageTemplateType
s@VerificationMessageTemplateType' {} Maybe Text
a -> VerificationMessageTemplateType
s {$sel:smsMessage:VerificationMessageTemplateType' :: Maybe Text
smsMessage = Maybe Text
a} :: VerificationMessageTemplateType)

-- | The email message template for sending a confirmation link to the user.
-- EmailMessageByLink is allowed only if
-- <https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_EmailConfigurationType.html#CognitoUserPools-Type-EmailConfigurationType-EmailSendingAccount EmailSendingAccount>
-- is DEVELOPER.
verificationMessageTemplateType_emailMessageByLink :: Lens.Lens' VerificationMessageTemplateType (Prelude.Maybe Prelude.Text)
verificationMessageTemplateType_emailMessageByLink :: (Maybe Text -> f (Maybe Text))
-> VerificationMessageTemplateType
-> f VerificationMessageTemplateType
verificationMessageTemplateType_emailMessageByLink = (VerificationMessageTemplateType -> Maybe Text)
-> (VerificationMessageTemplateType
    -> Maybe Text -> VerificationMessageTemplateType)
-> Lens
     VerificationMessageTemplateType
     VerificationMessageTemplateType
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VerificationMessageTemplateType' {Maybe Text
emailMessageByLink :: Maybe Text
$sel:emailMessageByLink:VerificationMessageTemplateType' :: VerificationMessageTemplateType -> Maybe Text
emailMessageByLink} -> Maybe Text
emailMessageByLink) (\s :: VerificationMessageTemplateType
s@VerificationMessageTemplateType' {} Maybe Text
a -> VerificationMessageTemplateType
s {$sel:emailMessageByLink:VerificationMessageTemplateType' :: Maybe Text
emailMessageByLink = Maybe Text
a} :: VerificationMessageTemplateType)

-- | The email message template. EmailMessage is allowed only if
-- <https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_EmailConfigurationType.html#CognitoUserPools-Type-EmailConfigurationType-EmailSendingAccount EmailSendingAccount>
-- is DEVELOPER.
verificationMessageTemplateType_emailMessage :: Lens.Lens' VerificationMessageTemplateType (Prelude.Maybe Prelude.Text)
verificationMessageTemplateType_emailMessage :: (Maybe Text -> f (Maybe Text))
-> VerificationMessageTemplateType
-> f VerificationMessageTemplateType
verificationMessageTemplateType_emailMessage = (VerificationMessageTemplateType -> Maybe Text)
-> (VerificationMessageTemplateType
    -> Maybe Text -> VerificationMessageTemplateType)
-> Lens
     VerificationMessageTemplateType
     VerificationMessageTemplateType
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VerificationMessageTemplateType' {Maybe Text
emailMessage :: Maybe Text
$sel:emailMessage:VerificationMessageTemplateType' :: VerificationMessageTemplateType -> Maybe Text
emailMessage} -> Maybe Text
emailMessage) (\s :: VerificationMessageTemplateType
s@VerificationMessageTemplateType' {} Maybe Text
a -> VerificationMessageTemplateType
s {$sel:emailMessage:VerificationMessageTemplateType' :: Maybe Text
emailMessage = Maybe Text
a} :: VerificationMessageTemplateType)

instance
  Core.FromJSON
    VerificationMessageTemplateType
  where
  parseJSON :: Value -> Parser VerificationMessageTemplateType
parseJSON =
    String
-> (Object -> Parser VerificationMessageTemplateType)
-> Value
-> Parser VerificationMessageTemplateType
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"VerificationMessageTemplateType"
      ( \Object
x ->
          Maybe DefaultEmailOptionType
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> VerificationMessageTemplateType
VerificationMessageTemplateType'
            (Maybe DefaultEmailOptionType
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> VerificationMessageTemplateType)
-> Parser (Maybe DefaultEmailOptionType)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> VerificationMessageTemplateType)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe DefaultEmailOptionType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"DefaultEmailOption")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> VerificationMessageTemplateType)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> VerificationMessageTemplateType)
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
"EmailSubject")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> VerificationMessageTemplateType)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text -> Maybe Text -> VerificationMessageTemplateType)
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
"EmailSubjectByLink")
            Parser
  (Maybe Text
   -> Maybe Text -> Maybe Text -> VerificationMessageTemplateType)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text -> Maybe Text -> VerificationMessageTemplateType)
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
"SmsMessage")
            Parser
  (Maybe Text -> Maybe Text -> VerificationMessageTemplateType)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> VerificationMessageTemplateType)
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
"EmailMessageByLink")
            Parser (Maybe Text -> VerificationMessageTemplateType)
-> Parser (Maybe Text) -> Parser VerificationMessageTemplateType
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
"EmailMessage")
      )

instance
  Prelude.Hashable
    VerificationMessageTemplateType

instance
  Prelude.NFData
    VerificationMessageTemplateType

instance Core.ToJSON VerificationMessageTemplateType where
  toJSON :: VerificationMessageTemplateType -> Value
toJSON VerificationMessageTemplateType' {Maybe Text
Maybe DefaultEmailOptionType
emailMessage :: Maybe Text
emailMessageByLink :: Maybe Text
smsMessage :: Maybe Text
emailSubjectByLink :: Maybe Text
emailSubject :: Maybe Text
defaultEmailOption :: Maybe DefaultEmailOptionType
$sel:emailMessage:VerificationMessageTemplateType' :: VerificationMessageTemplateType -> Maybe Text
$sel:emailMessageByLink:VerificationMessageTemplateType' :: VerificationMessageTemplateType -> Maybe Text
$sel:smsMessage:VerificationMessageTemplateType' :: VerificationMessageTemplateType -> Maybe Text
$sel:emailSubjectByLink:VerificationMessageTemplateType' :: VerificationMessageTemplateType -> Maybe Text
$sel:emailSubject:VerificationMessageTemplateType' :: VerificationMessageTemplateType -> Maybe Text
$sel:defaultEmailOption:VerificationMessageTemplateType' :: VerificationMessageTemplateType -> Maybe DefaultEmailOptionType
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"DefaultEmailOption" Text -> DefaultEmailOptionType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (DefaultEmailOptionType -> Pair)
-> Maybe DefaultEmailOptionType -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe DefaultEmailOptionType
defaultEmailOption,
            (Text
"EmailSubject" 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
emailSubject,
            (Text
"EmailSubjectByLink" 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
emailSubjectByLink,
            (Text
"SmsMessage" 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
smsMessage,
            (Text
"EmailMessageByLink" 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
emailMessageByLink,
            (Text
"EmailMessage" 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
emailMessage
          ]
      )