{-# 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 #-}
module Amazonka.CertificateManager.ResendValidationEmail
(
ResendValidationEmail (..),
newResendValidationEmail,
resendValidationEmail_certificateArn,
resendValidationEmail_domain,
resendValidationEmail_validationDomain,
ResendValidationEmailResponse (..),
newResendValidationEmailResponse,
)
where
import Amazonka.CertificateManager.Types
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
data ResendValidationEmail = ResendValidationEmail'
{
ResendValidationEmail -> Text
certificateArn :: Prelude.Text,
ResendValidationEmail -> Text
domain :: Prelude.Text,
ResendValidationEmail -> Text
validationDomain :: Prelude.Text
}
deriving (ResendValidationEmail -> ResendValidationEmail -> Bool
(ResendValidationEmail -> ResendValidationEmail -> Bool)
-> (ResendValidationEmail -> ResendValidationEmail -> Bool)
-> Eq ResendValidationEmail
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ResendValidationEmail -> ResendValidationEmail -> Bool
$c/= :: ResendValidationEmail -> ResendValidationEmail -> Bool
== :: ResendValidationEmail -> ResendValidationEmail -> Bool
$c== :: ResendValidationEmail -> ResendValidationEmail -> Bool
Prelude.Eq, ReadPrec [ResendValidationEmail]
ReadPrec ResendValidationEmail
Int -> ReadS ResendValidationEmail
ReadS [ResendValidationEmail]
(Int -> ReadS ResendValidationEmail)
-> ReadS [ResendValidationEmail]
-> ReadPrec ResendValidationEmail
-> ReadPrec [ResendValidationEmail]
-> Read ResendValidationEmail
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ResendValidationEmail]
$creadListPrec :: ReadPrec [ResendValidationEmail]
readPrec :: ReadPrec ResendValidationEmail
$creadPrec :: ReadPrec ResendValidationEmail
readList :: ReadS [ResendValidationEmail]
$creadList :: ReadS [ResendValidationEmail]
readsPrec :: Int -> ReadS ResendValidationEmail
$creadsPrec :: Int -> ReadS ResendValidationEmail
Prelude.Read, Int -> ResendValidationEmail -> ShowS
[ResendValidationEmail] -> ShowS
ResendValidationEmail -> String
(Int -> ResendValidationEmail -> ShowS)
-> (ResendValidationEmail -> String)
-> ([ResendValidationEmail] -> ShowS)
-> Show ResendValidationEmail
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ResendValidationEmail] -> ShowS
$cshowList :: [ResendValidationEmail] -> ShowS
show :: ResendValidationEmail -> String
$cshow :: ResendValidationEmail -> String
showsPrec :: Int -> ResendValidationEmail -> ShowS
$cshowsPrec :: Int -> ResendValidationEmail -> ShowS
Prelude.Show, (forall x. ResendValidationEmail -> Rep ResendValidationEmail x)
-> (forall x. Rep ResendValidationEmail x -> ResendValidationEmail)
-> Generic ResendValidationEmail
forall x. Rep ResendValidationEmail x -> ResendValidationEmail
forall x. ResendValidationEmail -> Rep ResendValidationEmail x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ResendValidationEmail x -> ResendValidationEmail
$cfrom :: forall x. ResendValidationEmail -> Rep ResendValidationEmail x
Prelude.Generic)
newResendValidationEmail ::
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
ResendValidationEmail
newResendValidationEmail :: Text -> Text -> Text -> ResendValidationEmail
newResendValidationEmail
Text
pCertificateArn_
Text
pDomain_
Text
pValidationDomain_ =
ResendValidationEmail' :: Text -> Text -> Text -> ResendValidationEmail
ResendValidationEmail'
{ $sel:certificateArn:ResendValidationEmail' :: Text
certificateArn =
Text
pCertificateArn_,
$sel:domain:ResendValidationEmail' :: Text
domain = Text
pDomain_,
$sel:validationDomain:ResendValidationEmail' :: Text
validationDomain = Text
pValidationDomain_
}
resendValidationEmail_certificateArn :: Lens.Lens' ResendValidationEmail Prelude.Text
resendValidationEmail_certificateArn :: (Text -> f Text)
-> ResendValidationEmail -> f ResendValidationEmail
resendValidationEmail_certificateArn = (ResendValidationEmail -> Text)
-> (ResendValidationEmail -> Text -> ResendValidationEmail)
-> Lens ResendValidationEmail ResendValidationEmail Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResendValidationEmail' {Text
certificateArn :: Text
$sel:certificateArn:ResendValidationEmail' :: ResendValidationEmail -> Text
certificateArn} -> Text
certificateArn) (\s :: ResendValidationEmail
s@ResendValidationEmail' {} Text
a -> ResendValidationEmail
s {$sel:certificateArn:ResendValidationEmail' :: Text
certificateArn = Text
a} :: ResendValidationEmail)
resendValidationEmail_domain :: Lens.Lens' ResendValidationEmail Prelude.Text
resendValidationEmail_domain :: (Text -> f Text)
-> ResendValidationEmail -> f ResendValidationEmail
resendValidationEmail_domain = (ResendValidationEmail -> Text)
-> (ResendValidationEmail -> Text -> ResendValidationEmail)
-> Lens ResendValidationEmail ResendValidationEmail Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResendValidationEmail' {Text
domain :: Text
$sel:domain:ResendValidationEmail' :: ResendValidationEmail -> Text
domain} -> Text
domain) (\s :: ResendValidationEmail
s@ResendValidationEmail' {} Text
a -> ResendValidationEmail
s {$sel:domain:ResendValidationEmail' :: Text
domain = Text
a} :: ResendValidationEmail)
resendValidationEmail_validationDomain :: Lens.Lens' ResendValidationEmail Prelude.Text
resendValidationEmail_validationDomain :: (Text -> f Text)
-> ResendValidationEmail -> f ResendValidationEmail
resendValidationEmail_validationDomain = (ResendValidationEmail -> Text)
-> (ResendValidationEmail -> Text -> ResendValidationEmail)
-> Lens ResendValidationEmail ResendValidationEmail Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResendValidationEmail' {Text
validationDomain :: Text
$sel:validationDomain:ResendValidationEmail' :: ResendValidationEmail -> Text
validationDomain} -> Text
validationDomain) (\s :: ResendValidationEmail
s@ResendValidationEmail' {} Text
a -> ResendValidationEmail
s {$sel:validationDomain:ResendValidationEmail' :: Text
validationDomain = Text
a} :: ResendValidationEmail)
instance Core.AWSRequest ResendValidationEmail where
type
AWSResponse ResendValidationEmail =
ResendValidationEmailResponse
request :: ResendValidationEmail -> Request ResendValidationEmail
request = Service -> ResendValidationEmail -> Request ResendValidationEmail
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy ResendValidationEmail
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse ResendValidationEmail)))
response =
AWSResponse ResendValidationEmail
-> Logger
-> Service
-> Proxy ResendValidationEmail
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse ResendValidationEmail)))
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull AWSResponse ResendValidationEmail
ResendValidationEmailResponse
ResendValidationEmailResponse'
instance Prelude.Hashable ResendValidationEmail
instance Prelude.NFData ResendValidationEmail
instance Core.ToHeaders ResendValidationEmail where
toHeaders :: ResendValidationEmail -> [Header]
toHeaders =
[Header] -> ResendValidationEmail -> [Header]
forall a b. a -> b -> a
Prelude.const
( [[Header]] -> [Header]
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
HeaderName -> ByteString -> [Header]
forall a. ToHeader a => HeaderName -> a -> [Header]
Core.=# ( ByteString
"CertificateManager.ResendValidationEmail" ::
Prelude.ByteString
),
HeaderName
"Content-Type"
HeaderName -> ByteString -> [Header]
forall a. ToHeader a => HeaderName -> a -> [Header]
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Core.ToJSON ResendValidationEmail where
toJSON :: ResendValidationEmail -> Value
toJSON ResendValidationEmail' {Text
validationDomain :: Text
domain :: Text
certificateArn :: Text
$sel:validationDomain:ResendValidationEmail' :: ResendValidationEmail -> Text
$sel:domain:ResendValidationEmail' :: ResendValidationEmail -> Text
$sel:certificateArn:ResendValidationEmail' :: ResendValidationEmail -> Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"CertificateArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
certificateArn),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Domain" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
domain),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"ValidationDomain" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
validationDomain)
]
)
instance Core.ToPath ResendValidationEmail where
toPath :: ResendValidationEmail -> ByteString
toPath = ByteString -> ResendValidationEmail -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery ResendValidationEmail where
toQuery :: ResendValidationEmail -> QueryString
toQuery = QueryString -> ResendValidationEmail -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data ResendValidationEmailResponse = ResendValidationEmailResponse'
{
}
deriving (ResendValidationEmailResponse
-> ResendValidationEmailResponse -> Bool
(ResendValidationEmailResponse
-> ResendValidationEmailResponse -> Bool)
-> (ResendValidationEmailResponse
-> ResendValidationEmailResponse -> Bool)
-> Eq ResendValidationEmailResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ResendValidationEmailResponse
-> ResendValidationEmailResponse -> Bool
$c/= :: ResendValidationEmailResponse
-> ResendValidationEmailResponse -> Bool
== :: ResendValidationEmailResponse
-> ResendValidationEmailResponse -> Bool
$c== :: ResendValidationEmailResponse
-> ResendValidationEmailResponse -> Bool
Prelude.Eq, ReadPrec [ResendValidationEmailResponse]
ReadPrec ResendValidationEmailResponse
Int -> ReadS ResendValidationEmailResponse
ReadS [ResendValidationEmailResponse]
(Int -> ReadS ResendValidationEmailResponse)
-> ReadS [ResendValidationEmailResponse]
-> ReadPrec ResendValidationEmailResponse
-> ReadPrec [ResendValidationEmailResponse]
-> Read ResendValidationEmailResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ResendValidationEmailResponse]
$creadListPrec :: ReadPrec [ResendValidationEmailResponse]
readPrec :: ReadPrec ResendValidationEmailResponse
$creadPrec :: ReadPrec ResendValidationEmailResponse
readList :: ReadS [ResendValidationEmailResponse]
$creadList :: ReadS [ResendValidationEmailResponse]
readsPrec :: Int -> ReadS ResendValidationEmailResponse
$creadsPrec :: Int -> ReadS ResendValidationEmailResponse
Prelude.Read, Int -> ResendValidationEmailResponse -> ShowS
[ResendValidationEmailResponse] -> ShowS
ResendValidationEmailResponse -> String
(Int -> ResendValidationEmailResponse -> ShowS)
-> (ResendValidationEmailResponse -> String)
-> ([ResendValidationEmailResponse] -> ShowS)
-> Show ResendValidationEmailResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ResendValidationEmailResponse] -> ShowS
$cshowList :: [ResendValidationEmailResponse] -> ShowS
show :: ResendValidationEmailResponse -> String
$cshow :: ResendValidationEmailResponse -> String
showsPrec :: Int -> ResendValidationEmailResponse -> ShowS
$cshowsPrec :: Int -> ResendValidationEmailResponse -> ShowS
Prelude.Show, (forall x.
ResendValidationEmailResponse
-> Rep ResendValidationEmailResponse x)
-> (forall x.
Rep ResendValidationEmailResponse x
-> ResendValidationEmailResponse)
-> Generic ResendValidationEmailResponse
forall x.
Rep ResendValidationEmailResponse x
-> ResendValidationEmailResponse
forall x.
ResendValidationEmailResponse
-> Rep ResendValidationEmailResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ResendValidationEmailResponse x
-> ResendValidationEmailResponse
$cfrom :: forall x.
ResendValidationEmailResponse
-> Rep ResendValidationEmailResponse x
Prelude.Generic)
newResendValidationEmailResponse ::
ResendValidationEmailResponse
newResendValidationEmailResponse :: ResendValidationEmailResponse
newResendValidationEmailResponse =
ResendValidationEmailResponse
ResendValidationEmailResponse'
instance Prelude.NFData ResendValidationEmailResponse