{-# 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.SESV2.GetCustomVerificationEmailTemplate
-- 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)
--
-- 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/send-email-verify-address-custom.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.SESV2.GetCustomVerificationEmailTemplate
  ( -- * Creating a Request
    GetCustomVerificationEmailTemplate (..),
    newGetCustomVerificationEmailTemplate,

    -- * Request Lenses
    getCustomVerificationEmailTemplate_templateName,

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

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

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
import Amazonka.SESV2.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
/= :: GetCustomVerificationEmailTemplate
-> GetCustomVerificationEmailTemplate -> Bool
$c/= :: GetCustomVerificationEmailTemplate
-> GetCustomVerificationEmailTemplate -> Bool
== :: GetCustomVerificationEmailTemplate
-> GetCustomVerificationEmailTemplate -> Bool
$c== :: 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
readListPrec :: ReadPrec [GetCustomVerificationEmailTemplate]
$creadListPrec :: ReadPrec [GetCustomVerificationEmailTemplate]
readPrec :: ReadPrec GetCustomVerificationEmailTemplate
$creadPrec :: ReadPrec GetCustomVerificationEmailTemplate
readList :: ReadS [GetCustomVerificationEmailTemplate]
$creadList :: ReadS [GetCustomVerificationEmailTemplate]
readsPrec :: Int -> ReadS GetCustomVerificationEmailTemplate
$creadsPrec :: Int -> ReadS 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
showList :: [GetCustomVerificationEmailTemplate] -> ShowS
$cshowList :: [GetCustomVerificationEmailTemplate] -> ShowS
show :: GetCustomVerificationEmailTemplate -> String
$cshow :: GetCustomVerificationEmailTemplate -> String
showsPrec :: Int -> GetCustomVerificationEmailTemplate -> ShowS
$cshowsPrec :: Int -> 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
$cto :: forall x.
Rep GetCustomVerificationEmailTemplate x
-> GetCustomVerificationEmailTemplate
$cfrom :: forall x.
GetCustomVerificationEmailTemplate
-> Rep GetCustomVerificationEmailTemplate x
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' :: Text -> GetCustomVerificationEmailTemplate
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 :: (Text -> f Text)
-> GetCustomVerificationEmailTemplate
-> f GetCustomVerificationEmailTemplate
getCustomVerificationEmailTemplate_templateName = (GetCustomVerificationEmailTemplate -> Text)
-> (GetCustomVerificationEmailTemplate
    -> Text -> GetCustomVerificationEmailTemplate)
-> Lens
     GetCustomVerificationEmailTemplate
     GetCustomVerificationEmailTemplate
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetCustomVerificationEmailTemplate' {Text
templateName :: Text
$sel:templateName:GetCustomVerificationEmailTemplate' :: GetCustomVerificationEmailTemplate -> Text
templateName} -> Text
templateName) (\s :: GetCustomVerificationEmailTemplate
s@GetCustomVerificationEmailTemplate' {} Text
a -> GetCustomVerificationEmailTemplate
s {$sel:templateName:GetCustomVerificationEmailTemplate' :: Text
templateName = Text
a} :: GetCustomVerificationEmailTemplate)

instance
  Core.AWSRequest
    GetCustomVerificationEmailTemplate
  where
  type
    AWSResponse GetCustomVerificationEmailTemplate =
      GetCustomVerificationEmailTemplateResponse
  request :: GetCustomVerificationEmailTemplate
-> Request GetCustomVerificationEmailTemplate
request = Service
-> GetCustomVerificationEmailTemplate
-> Request GetCustomVerificationEmailTemplate
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
  response :: Logger
-> Service
-> Proxy GetCustomVerificationEmailTemplate
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse GetCustomVerificationEmailTemplate)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse GetCustomVerificationEmailTemplate))
-> Logger
-> Service
-> Proxy GetCustomVerificationEmailTemplate
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse GetCustomVerificationEmailTemplate)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
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.<$> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"FromEmailAddress")
              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 (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"TemplateName")
              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 (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"FailureRedirectionURL")
              Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> GetCustomVerificationEmailTemplateResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text -> Int -> GetCustomVerificationEmailTemplateResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"TemplateSubject")
              Either
  String
  (Maybe Text
   -> Maybe Text -> Int -> GetCustomVerificationEmailTemplateResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text -> Int -> GetCustomVerificationEmailTemplateResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"SuccessRedirectionURL")
              Either
  String
  (Maybe Text -> Int -> GetCustomVerificationEmailTemplateResponse)
-> Either String (Maybe Text)
-> Either
     String (Int -> GetCustomVerificationEmailTemplateResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"TemplateContent")
              Either String (Int -> GetCustomVerificationEmailTemplateResponse)
-> Either String Int
-> Either String GetCustomVerificationEmailTemplateResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
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

instance
  Prelude.NFData
    GetCustomVerificationEmailTemplate

instance
  Core.ToHeaders
    GetCustomVerificationEmailTemplate
  where
  toHeaders :: GetCustomVerificationEmailTemplate -> ResponseHeaders
toHeaders =
    ResponseHeaders
-> GetCustomVerificationEmailTemplate -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"Content-Type"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance
  Core.ToPath
    GetCustomVerificationEmailTemplate
  where
  toPath :: GetCustomVerificationEmailTemplate -> ByteString
toPath GetCustomVerificationEmailTemplate' {Text
templateName :: Text
$sel:templateName:GetCustomVerificationEmailTemplate' :: GetCustomVerificationEmailTemplate -> Text
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/v2/email/custom-verification-email-templates/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
templateName
      ]

instance
  Core.ToQuery
    GetCustomVerificationEmailTemplate
  where
  toQuery :: GetCustomVerificationEmailTemplate -> QueryString
toQuery = QueryString -> GetCustomVerificationEmailTemplate -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty

-- | The following elements are returned by the service.
--
-- /See:/ 'newGetCustomVerificationEmailTemplateResponse' smart constructor.
data GetCustomVerificationEmailTemplateResponse = GetCustomVerificationEmailTemplateResponse'
  { -- | The email address that the custom verification email is sent from.
    GetCustomVerificationEmailTemplateResponse -> Maybe Text
fromEmailAddress :: Prelude.Maybe Prelude.Text,
    -- | The name of the custom verification email template.
    GetCustomVerificationEmailTemplateResponse -> Maybe Text
templateName :: Prelude.Maybe Prelude.Text,
    -- | 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 subject line of the custom verification email.
    GetCustomVerificationEmailTemplateResponse -> Maybe Text
templateSubject :: 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 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
/= :: GetCustomVerificationEmailTemplateResponse
-> GetCustomVerificationEmailTemplateResponse -> Bool
$c/= :: GetCustomVerificationEmailTemplateResponse
-> GetCustomVerificationEmailTemplateResponse -> Bool
== :: GetCustomVerificationEmailTemplateResponse
-> GetCustomVerificationEmailTemplateResponse -> Bool
$c== :: 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
readListPrec :: ReadPrec [GetCustomVerificationEmailTemplateResponse]
$creadListPrec :: ReadPrec [GetCustomVerificationEmailTemplateResponse]
readPrec :: ReadPrec GetCustomVerificationEmailTemplateResponse
$creadPrec :: ReadPrec GetCustomVerificationEmailTemplateResponse
readList :: ReadS [GetCustomVerificationEmailTemplateResponse]
$creadList :: ReadS [GetCustomVerificationEmailTemplateResponse]
readsPrec :: Int -> ReadS GetCustomVerificationEmailTemplateResponse
$creadsPrec :: Int -> ReadS 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
showList :: [GetCustomVerificationEmailTemplateResponse] -> ShowS
$cshowList :: [GetCustomVerificationEmailTemplateResponse] -> ShowS
show :: GetCustomVerificationEmailTemplateResponse -> String
$cshow :: GetCustomVerificationEmailTemplateResponse -> String
showsPrec :: Int -> GetCustomVerificationEmailTemplateResponse -> ShowS
$cshowsPrec :: Int -> 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
$cto :: forall x.
Rep GetCustomVerificationEmailTemplateResponse x
-> GetCustomVerificationEmailTemplateResponse
$cfrom :: forall x.
GetCustomVerificationEmailTemplateResponse
-> Rep GetCustomVerificationEmailTemplateResponse x
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:
--
-- 'fromEmailAddress', 'getCustomVerificationEmailTemplateResponse_fromEmailAddress' - The email address that the custom verification email is sent from.
--
-- 'templateName', 'getCustomVerificationEmailTemplateResponse_templateName' - The name of the custom verification email template.
--
-- 'failureRedirectionURL', 'getCustomVerificationEmailTemplateResponse_failureRedirectionURL' - The URL that the recipient of the verification email is sent to if his
-- or her address is not successfully verified.
--
-- 'templateSubject', 'getCustomVerificationEmailTemplateResponse_templateSubject' - The subject line of the custom verification email.
--
-- '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.
--
-- 'httpStatus', 'getCustomVerificationEmailTemplateResponse_httpStatus' - The response's http status code.
newGetCustomVerificationEmailTemplateResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  GetCustomVerificationEmailTemplateResponse
newGetCustomVerificationEmailTemplateResponse :: Int -> GetCustomVerificationEmailTemplateResponse
newGetCustomVerificationEmailTemplateResponse
  Int
pHttpStatus_ =
    GetCustomVerificationEmailTemplateResponse' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Int
-> GetCustomVerificationEmailTemplateResponse
GetCustomVerificationEmailTemplateResponse'
      { $sel:fromEmailAddress:GetCustomVerificationEmailTemplateResponse' :: Maybe Text
fromEmailAddress =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:templateName:GetCustomVerificationEmailTemplateResponse' :: Maybe Text
templateName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:failureRedirectionURL:GetCustomVerificationEmailTemplateResponse' :: Maybe Text
failureRedirectionURL =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:templateSubject:GetCustomVerificationEmailTemplateResponse' :: Maybe Text
templateSubject =
          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,
        $sel:httpStatus:GetCustomVerificationEmailTemplateResponse' :: Int
httpStatus = Int
pHttpStatus_
      }

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

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

-- | 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 :: (Maybe Text -> f (Maybe Text))
-> GetCustomVerificationEmailTemplateResponse
-> f GetCustomVerificationEmailTemplateResponse
getCustomVerificationEmailTemplateResponse_failureRedirectionURL = (GetCustomVerificationEmailTemplateResponse -> Maybe Text)
-> (GetCustomVerificationEmailTemplateResponse
    -> Maybe Text -> GetCustomVerificationEmailTemplateResponse)
-> Lens
     GetCustomVerificationEmailTemplateResponse
     GetCustomVerificationEmailTemplateResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetCustomVerificationEmailTemplateResponse' {Maybe Text
failureRedirectionURL :: Maybe Text
$sel:failureRedirectionURL:GetCustomVerificationEmailTemplateResponse' :: GetCustomVerificationEmailTemplateResponse -> Maybe Text
failureRedirectionURL} -> Maybe Text
failureRedirectionURL) (\s :: GetCustomVerificationEmailTemplateResponse
s@GetCustomVerificationEmailTemplateResponse' {} Maybe Text
a -> GetCustomVerificationEmailTemplateResponse
s {$sel:failureRedirectionURL:GetCustomVerificationEmailTemplateResponse' :: Maybe Text
failureRedirectionURL = Maybe Text
a} :: GetCustomVerificationEmailTemplateResponse)

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

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

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

instance
  Prelude.NFData
    GetCustomVerificationEmailTemplateResponse