{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.SES.GetCustomVerificationEmailTemplate
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Returns the custom email verification template for the template name you
-- specify.
--
-- For more information about custom verification email templates, see
-- <https://docs.aws.amazon.com/ses/latest/DeveloperGuide/custom-verification-emails.html Using Custom Verification Email Templates>
-- in the /Amazon SES Developer Guide/.
--
-- You can execute this operation no more than once per second.
module Amazonka.SES.GetCustomVerificationEmailTemplate
  ( -- * Creating a Request
    GetCustomVerificationEmailTemplate (..),
    newGetCustomVerificationEmailTemplate,

    -- * Request Lenses
    getCustomVerificationEmailTemplate_templateName,

    -- * Destructuring the Response
    GetCustomVerificationEmailTemplateResponse (..),
    newGetCustomVerificationEmailTemplateResponse,

    -- * Response Lenses
    getCustomVerificationEmailTemplateResponse_failureRedirectionURL,
    getCustomVerificationEmailTemplateResponse_fromEmailAddress,
    getCustomVerificationEmailTemplateResponse_successRedirectionURL,
    getCustomVerificationEmailTemplateResponse_templateContent,
    getCustomVerificationEmailTemplateResponse_templateName,
    getCustomVerificationEmailTemplateResponse_templateSubject,
    getCustomVerificationEmailTemplateResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
import Amazonka.SES.Types

-- | Represents a request to retrieve an existing custom verification email
-- template.
--
-- /See:/ 'newGetCustomVerificationEmailTemplate' smart constructor.
data GetCustomVerificationEmailTemplate = GetCustomVerificationEmailTemplate'
  { -- | The name of the custom verification email template that you want to
    -- retrieve.
    GetCustomVerificationEmailTemplate -> Text
templateName :: Prelude.Text
  }
  deriving (GetCustomVerificationEmailTemplate
-> GetCustomVerificationEmailTemplate -> Bool
(GetCustomVerificationEmailTemplate
 -> GetCustomVerificationEmailTemplate -> Bool)
-> (GetCustomVerificationEmailTemplate
    -> GetCustomVerificationEmailTemplate -> Bool)
-> Eq GetCustomVerificationEmailTemplate
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: GetCustomVerificationEmailTemplate
-> GetCustomVerificationEmailTemplate -> Bool
== :: GetCustomVerificationEmailTemplate
-> GetCustomVerificationEmailTemplate -> Bool
$c/= :: GetCustomVerificationEmailTemplate
-> GetCustomVerificationEmailTemplate -> Bool
/= :: GetCustomVerificationEmailTemplate
-> GetCustomVerificationEmailTemplate -> Bool
Prelude.Eq, ReadPrec [GetCustomVerificationEmailTemplate]
ReadPrec GetCustomVerificationEmailTemplate
Int -> ReadS GetCustomVerificationEmailTemplate
ReadS [GetCustomVerificationEmailTemplate]
(Int -> ReadS GetCustomVerificationEmailTemplate)
-> ReadS [GetCustomVerificationEmailTemplate]
-> ReadPrec GetCustomVerificationEmailTemplate
-> ReadPrec [GetCustomVerificationEmailTemplate]
-> Read GetCustomVerificationEmailTemplate
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
$creadsPrec :: Int -> ReadS GetCustomVerificationEmailTemplate
readsPrec :: Int -> ReadS GetCustomVerificationEmailTemplate
$creadList :: ReadS [GetCustomVerificationEmailTemplate]
readList :: ReadS [GetCustomVerificationEmailTemplate]
$creadPrec :: ReadPrec GetCustomVerificationEmailTemplate
readPrec :: ReadPrec GetCustomVerificationEmailTemplate
$creadListPrec :: ReadPrec [GetCustomVerificationEmailTemplate]
readListPrec :: ReadPrec [GetCustomVerificationEmailTemplate]
Prelude.Read, Int -> GetCustomVerificationEmailTemplate -> ShowS
[GetCustomVerificationEmailTemplate] -> ShowS
GetCustomVerificationEmailTemplate -> String
(Int -> GetCustomVerificationEmailTemplate -> ShowS)
-> (GetCustomVerificationEmailTemplate -> String)
-> ([GetCustomVerificationEmailTemplate] -> ShowS)
-> Show GetCustomVerificationEmailTemplate
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> GetCustomVerificationEmailTemplate -> ShowS
showsPrec :: Int -> GetCustomVerificationEmailTemplate -> ShowS
$cshow :: GetCustomVerificationEmailTemplate -> String
show :: GetCustomVerificationEmailTemplate -> String
$cshowList :: [GetCustomVerificationEmailTemplate] -> ShowS
showList :: [GetCustomVerificationEmailTemplate] -> ShowS
Prelude.Show, (forall x.
 GetCustomVerificationEmailTemplate
 -> Rep GetCustomVerificationEmailTemplate x)
-> (forall x.
    Rep GetCustomVerificationEmailTemplate x
    -> GetCustomVerificationEmailTemplate)
-> Generic GetCustomVerificationEmailTemplate
forall x.
Rep GetCustomVerificationEmailTemplate x
-> GetCustomVerificationEmailTemplate
forall x.
GetCustomVerificationEmailTemplate
-> Rep GetCustomVerificationEmailTemplate x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x.
GetCustomVerificationEmailTemplate
-> Rep GetCustomVerificationEmailTemplate x
from :: forall x.
GetCustomVerificationEmailTemplate
-> Rep GetCustomVerificationEmailTemplate x
$cto :: forall x.
Rep GetCustomVerificationEmailTemplate x
-> GetCustomVerificationEmailTemplate
to :: forall x.
Rep GetCustomVerificationEmailTemplate x
-> GetCustomVerificationEmailTemplate
Prelude.Generic)

-- |
-- Create a value of 'GetCustomVerificationEmailTemplate' 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:
--
-- 'templateName', 'getCustomVerificationEmailTemplate_templateName' - The name of the custom verification email template that you want to
-- retrieve.
newGetCustomVerificationEmailTemplate ::
  -- | 'templateName'
  Prelude.Text ->
  GetCustomVerificationEmailTemplate
newGetCustomVerificationEmailTemplate :: Text -> GetCustomVerificationEmailTemplate
newGetCustomVerificationEmailTemplate Text
pTemplateName_ =
  GetCustomVerificationEmailTemplate'
    { $sel:templateName:GetCustomVerificationEmailTemplate' :: Text
templateName =
        Text
pTemplateName_
    }

-- | The name of the custom verification email template that you want to
-- retrieve.
getCustomVerificationEmailTemplate_templateName :: Lens.Lens' GetCustomVerificationEmailTemplate Prelude.Text
getCustomVerificationEmailTemplate_templateName :: Lens' GetCustomVerificationEmailTemplate Text
getCustomVerificationEmailTemplate_templateName = (GetCustomVerificationEmailTemplate -> Text)
-> (GetCustomVerificationEmailTemplate
    -> Text -> GetCustomVerificationEmailTemplate)
-> Lens' GetCustomVerificationEmailTemplate Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetCustomVerificationEmailTemplate' {Text
$sel:templateName:GetCustomVerificationEmailTemplate' :: GetCustomVerificationEmailTemplate -> Text
templateName :: Text
templateName} -> Text
templateName) (\s :: GetCustomVerificationEmailTemplate
s@GetCustomVerificationEmailTemplate' {} Text
a -> GetCustomVerificationEmailTemplate
s {templateName = a} :: GetCustomVerificationEmailTemplate)

instance
  Core.AWSRequest
    GetCustomVerificationEmailTemplate
  where
  type
    AWSResponse GetCustomVerificationEmailTemplate =
      GetCustomVerificationEmailTemplateResponse
  request :: (Service -> Service)
-> GetCustomVerificationEmailTemplate
-> Request GetCustomVerificationEmailTemplate
request Service -> Service
overrides =
    Service
-> GetCustomVerificationEmailTemplate
-> Request GetCustomVerificationEmailTemplate
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy GetCustomVerificationEmailTemplate
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse GetCustomVerificationEmailTemplate)))
response =
    Text
-> (Int
    -> ResponseHeaders
    -> [Node]
    -> Either String (AWSResponse GetCustomVerificationEmailTemplate))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy GetCustomVerificationEmailTemplate
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse GetCustomVerificationEmailTemplate)))
forall (m :: * -> *) a.
MonadResource m =>
Text
-> (Int
    -> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveXMLWrapper
      Text
"GetCustomVerificationEmailTemplateResult"
      ( \Int
s ResponseHeaders
h [Node]
x ->
          Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Int
-> GetCustomVerificationEmailTemplateResponse
GetCustomVerificationEmailTemplateResponse'
            (Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Int
 -> GetCustomVerificationEmailTemplateResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> GetCustomVerificationEmailTemplateResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"FailureRedirectionURL")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> GetCustomVerificationEmailTemplateResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> GetCustomVerificationEmailTemplateResponse)
forall a b.
Either String (a -> b) -> Either String a -> Either String b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"FromEmailAddress")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> GetCustomVerificationEmailTemplateResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> GetCustomVerificationEmailTemplateResponse)
forall a b.
Either String (a -> b) -> Either String a -> Either String b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"SuccessRedirectionURL")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> GetCustomVerificationEmailTemplateResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text -> Int -> GetCustomVerificationEmailTemplateResponse)
forall a b.
Either String (a -> b) -> Either String a -> Either String b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"TemplateContent")
            Either
  String
  (Maybe Text
   -> Maybe Text -> Int -> GetCustomVerificationEmailTemplateResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text -> Int -> GetCustomVerificationEmailTemplateResponse)
forall a b.
Either String (a -> b) -> Either String a -> Either String b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"TemplateName")
            Either
  String
  (Maybe Text -> Int -> GetCustomVerificationEmailTemplateResponse)
-> Either String (Maybe Text)
-> Either
     String (Int -> GetCustomVerificationEmailTemplateResponse)
forall a b.
Either String (a -> b) -> Either String a -> Either String b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"TemplateSubject")
            Either String (Int -> GetCustomVerificationEmailTemplateResponse)
-> Either String Int
-> Either String GetCustomVerificationEmailTemplateResponse
forall a b.
Either String (a -> b) -> Either String a -> Either String b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall a. a -> Either String a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance
  Prelude.Hashable
    GetCustomVerificationEmailTemplate
  where
  hashWithSalt :: Int -> GetCustomVerificationEmailTemplate -> Int
hashWithSalt
    Int
_salt
    GetCustomVerificationEmailTemplate' {Text
$sel:templateName:GetCustomVerificationEmailTemplate' :: GetCustomVerificationEmailTemplate -> Text
templateName :: Text
..} =
      Int
_salt Int -> Text -> Int
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
templateName

instance
  Prelude.NFData
    GetCustomVerificationEmailTemplate
  where
  rnf :: GetCustomVerificationEmailTemplate -> ()
rnf GetCustomVerificationEmailTemplate' {Text
$sel:templateName:GetCustomVerificationEmailTemplate' :: GetCustomVerificationEmailTemplate -> Text
templateName :: Text
..} =
    Text -> ()
forall a. NFData a => a -> ()
Prelude.rnf Text
templateName

instance
  Data.ToHeaders
    GetCustomVerificationEmailTemplate
  where
  toHeaders :: GetCustomVerificationEmailTemplate -> ResponseHeaders
toHeaders = ResponseHeaders
-> GetCustomVerificationEmailTemplate -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty

instance
  Data.ToPath
    GetCustomVerificationEmailTemplate
  where
  toPath :: GetCustomVerificationEmailTemplate -> ByteString
toPath = ByteString -> GetCustomVerificationEmailTemplate -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"

instance
  Data.ToQuery
    GetCustomVerificationEmailTemplate
  where
  toQuery :: GetCustomVerificationEmailTemplate -> QueryString
toQuery GetCustomVerificationEmailTemplate' {Text
$sel:templateName:GetCustomVerificationEmailTemplate' :: GetCustomVerificationEmailTemplate -> Text
templateName :: Text
..} =
    [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"Action"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: ( ByteString
"GetCustomVerificationEmailTemplate" ::
                      Prelude.ByteString
                  ),
        ByteString
"Version"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"2010-12-01" :: Prelude.ByteString),
        ByteString
"TemplateName" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Text
templateName
      ]

-- | The content of the custom verification email template.
--
-- /See:/ 'newGetCustomVerificationEmailTemplateResponse' smart constructor.
data GetCustomVerificationEmailTemplateResponse = GetCustomVerificationEmailTemplateResponse'
  { -- | The URL that the recipient of the verification email is sent to if his
    -- or her address is not successfully verified.
    GetCustomVerificationEmailTemplateResponse -> Maybe Text
failureRedirectionURL :: Prelude.Maybe Prelude.Text,
    -- | The email address that the custom verification email is sent from.
    GetCustomVerificationEmailTemplateResponse -> Maybe Text
fromEmailAddress :: Prelude.Maybe Prelude.Text,
    -- | The URL that the recipient of the verification email is sent to if his
    -- or her address is successfully verified.
    GetCustomVerificationEmailTemplateResponse -> Maybe Text
successRedirectionURL :: Prelude.Maybe Prelude.Text,
    -- | The content of the custom verification email.
    GetCustomVerificationEmailTemplateResponse -> Maybe Text
templateContent :: Prelude.Maybe Prelude.Text,
    -- | The name of the custom verification email template.
    GetCustomVerificationEmailTemplateResponse -> Maybe Text
templateName :: Prelude.Maybe Prelude.Text,
    -- | The subject line of the custom verification email.
    GetCustomVerificationEmailTemplateResponse -> Maybe Text
templateSubject :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    GetCustomVerificationEmailTemplateResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (GetCustomVerificationEmailTemplateResponse
-> GetCustomVerificationEmailTemplateResponse -> Bool
(GetCustomVerificationEmailTemplateResponse
 -> GetCustomVerificationEmailTemplateResponse -> Bool)
-> (GetCustomVerificationEmailTemplateResponse
    -> GetCustomVerificationEmailTemplateResponse -> Bool)
-> Eq GetCustomVerificationEmailTemplateResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: GetCustomVerificationEmailTemplateResponse
-> GetCustomVerificationEmailTemplateResponse -> Bool
== :: GetCustomVerificationEmailTemplateResponse
-> GetCustomVerificationEmailTemplateResponse -> Bool
$c/= :: GetCustomVerificationEmailTemplateResponse
-> GetCustomVerificationEmailTemplateResponse -> Bool
/= :: GetCustomVerificationEmailTemplateResponse
-> GetCustomVerificationEmailTemplateResponse -> Bool
Prelude.Eq, ReadPrec [GetCustomVerificationEmailTemplateResponse]
ReadPrec GetCustomVerificationEmailTemplateResponse
Int -> ReadS GetCustomVerificationEmailTemplateResponse
ReadS [GetCustomVerificationEmailTemplateResponse]
(Int -> ReadS GetCustomVerificationEmailTemplateResponse)
-> ReadS [GetCustomVerificationEmailTemplateResponse]
-> ReadPrec GetCustomVerificationEmailTemplateResponse
-> ReadPrec [GetCustomVerificationEmailTemplateResponse]
-> Read GetCustomVerificationEmailTemplateResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
$creadsPrec :: Int -> ReadS GetCustomVerificationEmailTemplateResponse
readsPrec :: Int -> ReadS GetCustomVerificationEmailTemplateResponse
$creadList :: ReadS [GetCustomVerificationEmailTemplateResponse]
readList :: ReadS [GetCustomVerificationEmailTemplateResponse]
$creadPrec :: ReadPrec GetCustomVerificationEmailTemplateResponse
readPrec :: ReadPrec GetCustomVerificationEmailTemplateResponse
$creadListPrec :: ReadPrec [GetCustomVerificationEmailTemplateResponse]
readListPrec :: ReadPrec [GetCustomVerificationEmailTemplateResponse]
Prelude.Read, Int -> GetCustomVerificationEmailTemplateResponse -> ShowS
[GetCustomVerificationEmailTemplateResponse] -> ShowS
GetCustomVerificationEmailTemplateResponse -> String
(Int -> GetCustomVerificationEmailTemplateResponse -> ShowS)
-> (GetCustomVerificationEmailTemplateResponse -> String)
-> ([GetCustomVerificationEmailTemplateResponse] -> ShowS)
-> Show GetCustomVerificationEmailTemplateResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> GetCustomVerificationEmailTemplateResponse -> ShowS
showsPrec :: Int -> GetCustomVerificationEmailTemplateResponse -> ShowS
$cshow :: GetCustomVerificationEmailTemplateResponse -> String
show :: GetCustomVerificationEmailTemplateResponse -> String
$cshowList :: [GetCustomVerificationEmailTemplateResponse] -> ShowS
showList :: [GetCustomVerificationEmailTemplateResponse] -> ShowS
Prelude.Show, (forall x.
 GetCustomVerificationEmailTemplateResponse
 -> Rep GetCustomVerificationEmailTemplateResponse x)
-> (forall x.
    Rep GetCustomVerificationEmailTemplateResponse x
    -> GetCustomVerificationEmailTemplateResponse)
-> Generic GetCustomVerificationEmailTemplateResponse
forall x.
Rep GetCustomVerificationEmailTemplateResponse x
-> GetCustomVerificationEmailTemplateResponse
forall x.
GetCustomVerificationEmailTemplateResponse
-> Rep GetCustomVerificationEmailTemplateResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x.
GetCustomVerificationEmailTemplateResponse
-> Rep GetCustomVerificationEmailTemplateResponse x
from :: forall x.
GetCustomVerificationEmailTemplateResponse
-> Rep GetCustomVerificationEmailTemplateResponse x
$cto :: forall x.
Rep GetCustomVerificationEmailTemplateResponse x
-> GetCustomVerificationEmailTemplateResponse
to :: forall x.
Rep GetCustomVerificationEmailTemplateResponse x
-> GetCustomVerificationEmailTemplateResponse
Prelude.Generic)

-- |
-- Create a value of 'GetCustomVerificationEmailTemplateResponse' 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:
--
-- 'failureRedirectionURL', 'getCustomVerificationEmailTemplateResponse_failureRedirectionURL' - The URL that the recipient of the verification email is sent to if his
-- or her address is not successfully verified.
--
-- 'fromEmailAddress', 'getCustomVerificationEmailTemplateResponse_fromEmailAddress' - The email address that the custom verification email is sent from.
--
-- 'successRedirectionURL', 'getCustomVerificationEmailTemplateResponse_successRedirectionURL' - The URL that the recipient of the verification email is sent to if his
-- or her address is successfully verified.
--
-- 'templateContent', 'getCustomVerificationEmailTemplateResponse_templateContent' - The content of the custom verification email.
--
-- 'templateName', 'getCustomVerificationEmailTemplateResponse_templateName' - The name of the custom verification email template.
--
-- 'templateSubject', 'getCustomVerificationEmailTemplateResponse_templateSubject' - The subject line of the custom verification email.
--
-- 'httpStatus', 'getCustomVerificationEmailTemplateResponse_httpStatus' - The response's http status code.
newGetCustomVerificationEmailTemplateResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  GetCustomVerificationEmailTemplateResponse
newGetCustomVerificationEmailTemplateResponse :: Int -> GetCustomVerificationEmailTemplateResponse
newGetCustomVerificationEmailTemplateResponse
  Int
pHttpStatus_ =
    GetCustomVerificationEmailTemplateResponse'
      { $sel:failureRedirectionURL:GetCustomVerificationEmailTemplateResponse' :: Maybe Text
failureRedirectionURL =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:fromEmailAddress:GetCustomVerificationEmailTemplateResponse' :: Maybe Text
fromEmailAddress =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:successRedirectionURL:GetCustomVerificationEmailTemplateResponse' :: Maybe Text
successRedirectionURL =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:templateContent:GetCustomVerificationEmailTemplateResponse' :: Maybe Text
templateContent =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        templateName :: Maybe Text
templateName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:templateSubject:GetCustomVerificationEmailTemplateResponse' :: Maybe Text
templateSubject =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:GetCustomVerificationEmailTemplateResponse' :: Int
httpStatus = Int
pHttpStatus_
      }

-- | The URL that the recipient of the verification email is sent to if his
-- or her address is not successfully verified.
getCustomVerificationEmailTemplateResponse_failureRedirectionURL :: Lens.Lens' GetCustomVerificationEmailTemplateResponse (Prelude.Maybe Prelude.Text)
getCustomVerificationEmailTemplateResponse_failureRedirectionURL :: Lens' GetCustomVerificationEmailTemplateResponse (Maybe Text)
getCustomVerificationEmailTemplateResponse_failureRedirectionURL = (GetCustomVerificationEmailTemplateResponse -> Maybe Text)
-> (GetCustomVerificationEmailTemplateResponse
    -> Maybe Text -> GetCustomVerificationEmailTemplateResponse)
-> Lens' GetCustomVerificationEmailTemplateResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetCustomVerificationEmailTemplateResponse' {Maybe Text
$sel:failureRedirectionURL:GetCustomVerificationEmailTemplateResponse' :: GetCustomVerificationEmailTemplateResponse -> Maybe Text
failureRedirectionURL :: Maybe Text
failureRedirectionURL} -> Maybe Text
failureRedirectionURL) (\s :: GetCustomVerificationEmailTemplateResponse
s@GetCustomVerificationEmailTemplateResponse' {} Maybe Text
a -> GetCustomVerificationEmailTemplateResponse
s {failureRedirectionURL = a} :: GetCustomVerificationEmailTemplateResponse)

-- | The email address that the custom verification email is sent from.
getCustomVerificationEmailTemplateResponse_fromEmailAddress :: Lens.Lens' GetCustomVerificationEmailTemplateResponse (Prelude.Maybe Prelude.Text)
getCustomVerificationEmailTemplateResponse_fromEmailAddress :: Lens' GetCustomVerificationEmailTemplateResponse (Maybe Text)
getCustomVerificationEmailTemplateResponse_fromEmailAddress = (GetCustomVerificationEmailTemplateResponse -> Maybe Text)
-> (GetCustomVerificationEmailTemplateResponse
    -> Maybe Text -> GetCustomVerificationEmailTemplateResponse)
-> Lens' GetCustomVerificationEmailTemplateResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetCustomVerificationEmailTemplateResponse' {Maybe Text
$sel:fromEmailAddress:GetCustomVerificationEmailTemplateResponse' :: GetCustomVerificationEmailTemplateResponse -> Maybe Text
fromEmailAddress :: Maybe Text
fromEmailAddress} -> Maybe Text
fromEmailAddress) (\s :: GetCustomVerificationEmailTemplateResponse
s@GetCustomVerificationEmailTemplateResponse' {} Maybe Text
a -> GetCustomVerificationEmailTemplateResponse
s {fromEmailAddress = a} :: GetCustomVerificationEmailTemplateResponse)

-- | The URL that the recipient of the verification email is sent to if his
-- or her address is successfully verified.
getCustomVerificationEmailTemplateResponse_successRedirectionURL :: Lens.Lens' GetCustomVerificationEmailTemplateResponse (Prelude.Maybe Prelude.Text)
getCustomVerificationEmailTemplateResponse_successRedirectionURL :: Lens' GetCustomVerificationEmailTemplateResponse (Maybe Text)
getCustomVerificationEmailTemplateResponse_successRedirectionURL = (GetCustomVerificationEmailTemplateResponse -> Maybe Text)
-> (GetCustomVerificationEmailTemplateResponse
    -> Maybe Text -> GetCustomVerificationEmailTemplateResponse)
-> Lens' GetCustomVerificationEmailTemplateResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetCustomVerificationEmailTemplateResponse' {Maybe Text
$sel:successRedirectionURL:GetCustomVerificationEmailTemplateResponse' :: GetCustomVerificationEmailTemplateResponse -> Maybe Text
successRedirectionURL :: Maybe Text
successRedirectionURL} -> Maybe Text
successRedirectionURL) (\s :: GetCustomVerificationEmailTemplateResponse
s@GetCustomVerificationEmailTemplateResponse' {} Maybe Text
a -> GetCustomVerificationEmailTemplateResponse
s {successRedirectionURL = a} :: GetCustomVerificationEmailTemplateResponse)

-- | The content of the custom verification email.
getCustomVerificationEmailTemplateResponse_templateContent :: Lens.Lens' GetCustomVerificationEmailTemplateResponse (Prelude.Maybe Prelude.Text)
getCustomVerificationEmailTemplateResponse_templateContent :: Lens' GetCustomVerificationEmailTemplateResponse (Maybe Text)
getCustomVerificationEmailTemplateResponse_templateContent = (GetCustomVerificationEmailTemplateResponse -> Maybe Text)
-> (GetCustomVerificationEmailTemplateResponse
    -> Maybe Text -> GetCustomVerificationEmailTemplateResponse)
-> Lens' GetCustomVerificationEmailTemplateResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetCustomVerificationEmailTemplateResponse' {Maybe Text
$sel:templateContent:GetCustomVerificationEmailTemplateResponse' :: GetCustomVerificationEmailTemplateResponse -> Maybe Text
templateContent :: Maybe Text
templateContent} -> Maybe Text
templateContent) (\s :: GetCustomVerificationEmailTemplateResponse
s@GetCustomVerificationEmailTemplateResponse' {} Maybe Text
a -> GetCustomVerificationEmailTemplateResponse
s {templateContent = a} :: GetCustomVerificationEmailTemplateResponse)

-- | The name of the custom verification email template.
getCustomVerificationEmailTemplateResponse_templateName :: Lens.Lens' GetCustomVerificationEmailTemplateResponse (Prelude.Maybe Prelude.Text)
getCustomVerificationEmailTemplateResponse_templateName :: Lens' GetCustomVerificationEmailTemplateResponse (Maybe Text)
getCustomVerificationEmailTemplateResponse_templateName = (GetCustomVerificationEmailTemplateResponse -> Maybe Text)
-> (GetCustomVerificationEmailTemplateResponse
    -> Maybe Text -> GetCustomVerificationEmailTemplateResponse)
-> Lens' GetCustomVerificationEmailTemplateResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetCustomVerificationEmailTemplateResponse' {Maybe Text
templateName :: GetCustomVerificationEmailTemplateResponse -> Maybe Text
templateName :: Maybe Text
templateName} -> Maybe Text
templateName) (\s :: GetCustomVerificationEmailTemplateResponse
s@GetCustomVerificationEmailTemplateResponse' {} Maybe Text
a -> GetCustomVerificationEmailTemplateResponse
s {templateName = a} :: GetCustomVerificationEmailTemplateResponse)

-- | The subject line of the custom verification email.
getCustomVerificationEmailTemplateResponse_templateSubject :: Lens.Lens' GetCustomVerificationEmailTemplateResponse (Prelude.Maybe Prelude.Text)
getCustomVerificationEmailTemplateResponse_templateSubject :: Lens' GetCustomVerificationEmailTemplateResponse (Maybe Text)
getCustomVerificationEmailTemplateResponse_templateSubject = (GetCustomVerificationEmailTemplateResponse -> Maybe Text)
-> (GetCustomVerificationEmailTemplateResponse
    -> Maybe Text -> GetCustomVerificationEmailTemplateResponse)
-> Lens' GetCustomVerificationEmailTemplateResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetCustomVerificationEmailTemplateResponse' {Maybe Text
$sel:templateSubject:GetCustomVerificationEmailTemplateResponse' :: GetCustomVerificationEmailTemplateResponse -> Maybe Text
templateSubject :: Maybe Text
templateSubject} -> Maybe Text
templateSubject) (\s :: GetCustomVerificationEmailTemplateResponse
s@GetCustomVerificationEmailTemplateResponse' {} Maybe Text
a -> GetCustomVerificationEmailTemplateResponse
s {templateSubject = a} :: GetCustomVerificationEmailTemplateResponse)

-- | The response's http status code.
getCustomVerificationEmailTemplateResponse_httpStatus :: Lens.Lens' GetCustomVerificationEmailTemplateResponse Prelude.Int
getCustomVerificationEmailTemplateResponse_httpStatus :: Lens' GetCustomVerificationEmailTemplateResponse Int
getCustomVerificationEmailTemplateResponse_httpStatus = (GetCustomVerificationEmailTemplateResponse -> Int)
-> (GetCustomVerificationEmailTemplateResponse
    -> Int -> GetCustomVerificationEmailTemplateResponse)
-> Lens' GetCustomVerificationEmailTemplateResponse Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetCustomVerificationEmailTemplateResponse' {Int
$sel:httpStatus:GetCustomVerificationEmailTemplateResponse' :: GetCustomVerificationEmailTemplateResponse -> Int
httpStatus :: Int
httpStatus} -> Int
httpStatus) (\s :: GetCustomVerificationEmailTemplateResponse
s@GetCustomVerificationEmailTemplateResponse' {} Int
a -> GetCustomVerificationEmailTemplateResponse
s {httpStatus = a} :: GetCustomVerificationEmailTemplateResponse)

instance
  Prelude.NFData
    GetCustomVerificationEmailTemplateResponse
  where
  rnf :: GetCustomVerificationEmailTemplateResponse -> ()
rnf GetCustomVerificationEmailTemplateResponse' {Int
Maybe Text
templateName :: GetCustomVerificationEmailTemplateResponse -> Maybe Text
$sel:failureRedirectionURL:GetCustomVerificationEmailTemplateResponse' :: GetCustomVerificationEmailTemplateResponse -> Maybe Text
$sel:fromEmailAddress:GetCustomVerificationEmailTemplateResponse' :: GetCustomVerificationEmailTemplateResponse -> Maybe Text
$sel:successRedirectionURL:GetCustomVerificationEmailTemplateResponse' :: GetCustomVerificationEmailTemplateResponse -> Maybe Text
$sel:templateContent:GetCustomVerificationEmailTemplateResponse' :: GetCustomVerificationEmailTemplateResponse -> Maybe Text
$sel:templateSubject:GetCustomVerificationEmailTemplateResponse' :: GetCustomVerificationEmailTemplateResponse -> Maybe Text
$sel:httpStatus:GetCustomVerificationEmailTemplateResponse' :: GetCustomVerificationEmailTemplateResponse -> Int
failureRedirectionURL :: Maybe Text
fromEmailAddress :: Maybe Text
successRedirectionURL :: Maybe Text
templateContent :: Maybe Text
templateName :: Maybe Text
templateSubject :: Maybe Text
httpStatus :: Int
..} =
    Maybe Text -> ()
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
failureRedirectionURL
      () -> () -> ()
forall a b. a -> b -> b
`Prelude.seq` Maybe Text -> ()
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
fromEmailAddress
      () -> () -> ()
forall a b. a -> b -> b
`Prelude.seq` Maybe Text -> ()
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
successRedirectionURL
      () -> () -> ()
forall a b. a -> b -> b
`Prelude.seq` Maybe Text -> ()
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
templateContent
      () -> () -> ()
forall a b. a -> b -> b
`Prelude.seq` Maybe Text -> ()
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
templateName
      () -> () -> ()
forall a b. a -> b -> b
`Prelude.seq` Maybe Text -> ()
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
templateSubject
      () -> () -> ()
forall a b. a -> b -> b
`Prelude.seq` Int -> ()
forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus