{-# 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.SESV2.ListCustomVerificationEmailTemplates
(
ListCustomVerificationEmailTemplates (..),
newListCustomVerificationEmailTemplates,
listCustomVerificationEmailTemplates_nextToken,
listCustomVerificationEmailTemplates_pageSize,
ListCustomVerificationEmailTemplatesResponse (..),
newListCustomVerificationEmailTemplatesResponse,
listCustomVerificationEmailTemplatesResponse_customVerificationEmailTemplates,
listCustomVerificationEmailTemplatesResponse_nextToken,
listCustomVerificationEmailTemplatesResponse_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.SESV2.Types
data ListCustomVerificationEmailTemplates = ListCustomVerificationEmailTemplates'
{
ListCustomVerificationEmailTemplates -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
ListCustomVerificationEmailTemplates -> Maybe Int
pageSize :: Prelude.Maybe Prelude.Int
}
deriving (ListCustomVerificationEmailTemplates
-> ListCustomVerificationEmailTemplates -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListCustomVerificationEmailTemplates
-> ListCustomVerificationEmailTemplates -> Bool
$c/= :: ListCustomVerificationEmailTemplates
-> ListCustomVerificationEmailTemplates -> Bool
== :: ListCustomVerificationEmailTemplates
-> ListCustomVerificationEmailTemplates -> Bool
$c== :: ListCustomVerificationEmailTemplates
-> ListCustomVerificationEmailTemplates -> Bool
Prelude.Eq, ReadPrec [ListCustomVerificationEmailTemplates]
ReadPrec ListCustomVerificationEmailTemplates
Int -> ReadS ListCustomVerificationEmailTemplates
ReadS [ListCustomVerificationEmailTemplates]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListCustomVerificationEmailTemplates]
$creadListPrec :: ReadPrec [ListCustomVerificationEmailTemplates]
readPrec :: ReadPrec ListCustomVerificationEmailTemplates
$creadPrec :: ReadPrec ListCustomVerificationEmailTemplates
readList :: ReadS [ListCustomVerificationEmailTemplates]
$creadList :: ReadS [ListCustomVerificationEmailTemplates]
readsPrec :: Int -> ReadS ListCustomVerificationEmailTemplates
$creadsPrec :: Int -> ReadS ListCustomVerificationEmailTemplates
Prelude.Read, Int -> ListCustomVerificationEmailTemplates -> ShowS
[ListCustomVerificationEmailTemplates] -> ShowS
ListCustomVerificationEmailTemplates -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListCustomVerificationEmailTemplates] -> ShowS
$cshowList :: [ListCustomVerificationEmailTemplates] -> ShowS
show :: ListCustomVerificationEmailTemplates -> String
$cshow :: ListCustomVerificationEmailTemplates -> String
showsPrec :: Int -> ListCustomVerificationEmailTemplates -> ShowS
$cshowsPrec :: Int -> ListCustomVerificationEmailTemplates -> ShowS
Prelude.Show, forall x.
Rep ListCustomVerificationEmailTemplates x
-> ListCustomVerificationEmailTemplates
forall x.
ListCustomVerificationEmailTemplates
-> Rep ListCustomVerificationEmailTemplates x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListCustomVerificationEmailTemplates x
-> ListCustomVerificationEmailTemplates
$cfrom :: forall x.
ListCustomVerificationEmailTemplates
-> Rep ListCustomVerificationEmailTemplates x
Prelude.Generic)
newListCustomVerificationEmailTemplates ::
ListCustomVerificationEmailTemplates
newListCustomVerificationEmailTemplates :: ListCustomVerificationEmailTemplates
newListCustomVerificationEmailTemplates =
ListCustomVerificationEmailTemplates'
{ $sel:nextToken:ListCustomVerificationEmailTemplates' :: Maybe Text
nextToken =
forall a. Maybe a
Prelude.Nothing,
$sel:pageSize:ListCustomVerificationEmailTemplates' :: Maybe Int
pageSize = forall a. Maybe a
Prelude.Nothing
}
listCustomVerificationEmailTemplates_nextToken :: Lens.Lens' ListCustomVerificationEmailTemplates (Prelude.Maybe Prelude.Text)
listCustomVerificationEmailTemplates_nextToken :: Lens' ListCustomVerificationEmailTemplates (Maybe Text)
listCustomVerificationEmailTemplates_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListCustomVerificationEmailTemplates' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListCustomVerificationEmailTemplates' :: ListCustomVerificationEmailTemplates -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListCustomVerificationEmailTemplates
s@ListCustomVerificationEmailTemplates' {} Maybe Text
a -> ListCustomVerificationEmailTemplates
s {$sel:nextToken:ListCustomVerificationEmailTemplates' :: Maybe Text
nextToken = Maybe Text
a} :: ListCustomVerificationEmailTemplates)
listCustomVerificationEmailTemplates_pageSize :: Lens.Lens' ListCustomVerificationEmailTemplates (Prelude.Maybe Prelude.Int)
listCustomVerificationEmailTemplates_pageSize :: Lens' ListCustomVerificationEmailTemplates (Maybe Int)
listCustomVerificationEmailTemplates_pageSize = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListCustomVerificationEmailTemplates' {Maybe Int
pageSize :: Maybe Int
$sel:pageSize:ListCustomVerificationEmailTemplates' :: ListCustomVerificationEmailTemplates -> Maybe Int
pageSize} -> Maybe Int
pageSize) (\s :: ListCustomVerificationEmailTemplates
s@ListCustomVerificationEmailTemplates' {} Maybe Int
a -> ListCustomVerificationEmailTemplates
s {$sel:pageSize:ListCustomVerificationEmailTemplates' :: Maybe Int
pageSize = Maybe Int
a} :: ListCustomVerificationEmailTemplates)
instance
Core.AWSRequest
ListCustomVerificationEmailTemplates
where
type
AWSResponse ListCustomVerificationEmailTemplates =
ListCustomVerificationEmailTemplatesResponse
request :: (Service -> Service)
-> ListCustomVerificationEmailTemplates
-> Request ListCustomVerificationEmailTemplates
request Service -> Service
overrides =
forall a. ToRequest a => Service -> a -> Request a
Request.get (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy ListCustomVerificationEmailTemplates
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse
(AWSResponse ListCustomVerificationEmailTemplates)))
response =
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
( \Int
s ResponseHeaders
h Object
x ->
Maybe [CustomVerificationEmailTemplateMetadata]
-> Maybe Text
-> Int
-> ListCustomVerificationEmailTemplatesResponse
ListCustomVerificationEmailTemplatesResponse'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( Object
x
forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"CustomVerificationEmailTemplates"
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty
)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"NextToken")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance
Prelude.Hashable
ListCustomVerificationEmailTemplates
where
hashWithSalt :: Int -> ListCustomVerificationEmailTemplates -> Int
hashWithSalt
Int
_salt
ListCustomVerificationEmailTemplates' {Maybe Int
Maybe Text
pageSize :: Maybe Int
nextToken :: Maybe Text
$sel:pageSize:ListCustomVerificationEmailTemplates' :: ListCustomVerificationEmailTemplates -> Maybe Int
$sel:nextToken:ListCustomVerificationEmailTemplates' :: ListCustomVerificationEmailTemplates -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
nextToken
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
pageSize
instance
Prelude.NFData
ListCustomVerificationEmailTemplates
where
rnf :: ListCustomVerificationEmailTemplates -> ()
rnf ListCustomVerificationEmailTemplates' {Maybe Int
Maybe Text
pageSize :: Maybe Int
nextToken :: Maybe Text
$sel:pageSize:ListCustomVerificationEmailTemplates' :: ListCustomVerificationEmailTemplates -> Maybe Int
$sel:nextToken:ListCustomVerificationEmailTemplates' :: ListCustomVerificationEmailTemplates -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
pageSize
instance
Data.ToHeaders
ListCustomVerificationEmailTemplates
where
toHeaders :: ListCustomVerificationEmailTemplates -> ResponseHeaders
toHeaders =
forall a b. a -> b -> a
Prelude.const
( forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"Content-Type"
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance
Data.ToPath
ListCustomVerificationEmailTemplates
where
toPath :: ListCustomVerificationEmailTemplates -> ByteString
toPath =
forall a b. a -> b -> a
Prelude.const
ByteString
"/v2/email/custom-verification-email-templates"
instance
Data.ToQuery
ListCustomVerificationEmailTemplates
where
toQuery :: ListCustomVerificationEmailTemplates -> QueryString
toQuery ListCustomVerificationEmailTemplates' {Maybe Int
Maybe Text
pageSize :: Maybe Int
nextToken :: Maybe Text
$sel:pageSize:ListCustomVerificationEmailTemplates' :: ListCustomVerificationEmailTemplates -> Maybe Int
$sel:nextToken:ListCustomVerificationEmailTemplates' :: ListCustomVerificationEmailTemplates -> Maybe Text
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"NextToken" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
nextToken,
ByteString
"PageSize" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Int
pageSize
]
data ListCustomVerificationEmailTemplatesResponse = ListCustomVerificationEmailTemplatesResponse'
{
ListCustomVerificationEmailTemplatesResponse
-> Maybe [CustomVerificationEmailTemplateMetadata]
customVerificationEmailTemplates :: Prelude.Maybe [CustomVerificationEmailTemplateMetadata],
ListCustomVerificationEmailTemplatesResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
ListCustomVerificationEmailTemplatesResponse -> Int
httpStatus :: Prelude.Int
}
deriving (ListCustomVerificationEmailTemplatesResponse
-> ListCustomVerificationEmailTemplatesResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListCustomVerificationEmailTemplatesResponse
-> ListCustomVerificationEmailTemplatesResponse -> Bool
$c/= :: ListCustomVerificationEmailTemplatesResponse
-> ListCustomVerificationEmailTemplatesResponse -> Bool
== :: ListCustomVerificationEmailTemplatesResponse
-> ListCustomVerificationEmailTemplatesResponse -> Bool
$c== :: ListCustomVerificationEmailTemplatesResponse
-> ListCustomVerificationEmailTemplatesResponse -> Bool
Prelude.Eq, ReadPrec [ListCustomVerificationEmailTemplatesResponse]
ReadPrec ListCustomVerificationEmailTemplatesResponse
Int -> ReadS ListCustomVerificationEmailTemplatesResponse
ReadS [ListCustomVerificationEmailTemplatesResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListCustomVerificationEmailTemplatesResponse]
$creadListPrec :: ReadPrec [ListCustomVerificationEmailTemplatesResponse]
readPrec :: ReadPrec ListCustomVerificationEmailTemplatesResponse
$creadPrec :: ReadPrec ListCustomVerificationEmailTemplatesResponse
readList :: ReadS [ListCustomVerificationEmailTemplatesResponse]
$creadList :: ReadS [ListCustomVerificationEmailTemplatesResponse]
readsPrec :: Int -> ReadS ListCustomVerificationEmailTemplatesResponse
$creadsPrec :: Int -> ReadS ListCustomVerificationEmailTemplatesResponse
Prelude.Read, Int -> ListCustomVerificationEmailTemplatesResponse -> ShowS
[ListCustomVerificationEmailTemplatesResponse] -> ShowS
ListCustomVerificationEmailTemplatesResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListCustomVerificationEmailTemplatesResponse] -> ShowS
$cshowList :: [ListCustomVerificationEmailTemplatesResponse] -> ShowS
show :: ListCustomVerificationEmailTemplatesResponse -> String
$cshow :: ListCustomVerificationEmailTemplatesResponse -> String
showsPrec :: Int -> ListCustomVerificationEmailTemplatesResponse -> ShowS
$cshowsPrec :: Int -> ListCustomVerificationEmailTemplatesResponse -> ShowS
Prelude.Show, forall x.
Rep ListCustomVerificationEmailTemplatesResponse x
-> ListCustomVerificationEmailTemplatesResponse
forall x.
ListCustomVerificationEmailTemplatesResponse
-> Rep ListCustomVerificationEmailTemplatesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListCustomVerificationEmailTemplatesResponse x
-> ListCustomVerificationEmailTemplatesResponse
$cfrom :: forall x.
ListCustomVerificationEmailTemplatesResponse
-> Rep ListCustomVerificationEmailTemplatesResponse x
Prelude.Generic)
newListCustomVerificationEmailTemplatesResponse ::
Prelude.Int ->
ListCustomVerificationEmailTemplatesResponse
newListCustomVerificationEmailTemplatesResponse :: Int -> ListCustomVerificationEmailTemplatesResponse
newListCustomVerificationEmailTemplatesResponse
Int
pHttpStatus_ =
ListCustomVerificationEmailTemplatesResponse'
{ $sel:customVerificationEmailTemplates:ListCustomVerificationEmailTemplatesResponse' :: Maybe [CustomVerificationEmailTemplateMetadata]
customVerificationEmailTemplates =
forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:ListCustomVerificationEmailTemplatesResponse' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:ListCustomVerificationEmailTemplatesResponse' :: Int
httpStatus = Int
pHttpStatus_
}
listCustomVerificationEmailTemplatesResponse_customVerificationEmailTemplates :: Lens.Lens' ListCustomVerificationEmailTemplatesResponse (Prelude.Maybe [CustomVerificationEmailTemplateMetadata])
listCustomVerificationEmailTemplatesResponse_customVerificationEmailTemplates :: Lens'
ListCustomVerificationEmailTemplatesResponse
(Maybe [CustomVerificationEmailTemplateMetadata])
listCustomVerificationEmailTemplatesResponse_customVerificationEmailTemplates = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListCustomVerificationEmailTemplatesResponse' {Maybe [CustomVerificationEmailTemplateMetadata]
customVerificationEmailTemplates :: Maybe [CustomVerificationEmailTemplateMetadata]
$sel:customVerificationEmailTemplates:ListCustomVerificationEmailTemplatesResponse' :: ListCustomVerificationEmailTemplatesResponse
-> Maybe [CustomVerificationEmailTemplateMetadata]
customVerificationEmailTemplates} -> Maybe [CustomVerificationEmailTemplateMetadata]
customVerificationEmailTemplates) (\s :: ListCustomVerificationEmailTemplatesResponse
s@ListCustomVerificationEmailTemplatesResponse' {} Maybe [CustomVerificationEmailTemplateMetadata]
a -> ListCustomVerificationEmailTemplatesResponse
s {$sel:customVerificationEmailTemplates:ListCustomVerificationEmailTemplatesResponse' :: Maybe [CustomVerificationEmailTemplateMetadata]
customVerificationEmailTemplates = Maybe [CustomVerificationEmailTemplateMetadata]
a} :: ListCustomVerificationEmailTemplatesResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
listCustomVerificationEmailTemplatesResponse_nextToken :: Lens.Lens' ListCustomVerificationEmailTemplatesResponse (Prelude.Maybe Prelude.Text)
listCustomVerificationEmailTemplatesResponse_nextToken :: Lens' ListCustomVerificationEmailTemplatesResponse (Maybe Text)
listCustomVerificationEmailTemplatesResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListCustomVerificationEmailTemplatesResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListCustomVerificationEmailTemplatesResponse' :: ListCustomVerificationEmailTemplatesResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListCustomVerificationEmailTemplatesResponse
s@ListCustomVerificationEmailTemplatesResponse' {} Maybe Text
a -> ListCustomVerificationEmailTemplatesResponse
s {$sel:nextToken:ListCustomVerificationEmailTemplatesResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListCustomVerificationEmailTemplatesResponse)
listCustomVerificationEmailTemplatesResponse_httpStatus :: Lens.Lens' ListCustomVerificationEmailTemplatesResponse Prelude.Int
listCustomVerificationEmailTemplatesResponse_httpStatus :: Lens' ListCustomVerificationEmailTemplatesResponse Int
listCustomVerificationEmailTemplatesResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListCustomVerificationEmailTemplatesResponse' {Int
httpStatus :: Int
$sel:httpStatus:ListCustomVerificationEmailTemplatesResponse' :: ListCustomVerificationEmailTemplatesResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: ListCustomVerificationEmailTemplatesResponse
s@ListCustomVerificationEmailTemplatesResponse' {} Int
a -> ListCustomVerificationEmailTemplatesResponse
s {$sel:httpStatus:ListCustomVerificationEmailTemplatesResponse' :: Int
httpStatus = Int
a} :: ListCustomVerificationEmailTemplatesResponse)
instance
Prelude.NFData
ListCustomVerificationEmailTemplatesResponse
where
rnf :: ListCustomVerificationEmailTemplatesResponse -> ()
rnf ListCustomVerificationEmailTemplatesResponse' {Int
Maybe [CustomVerificationEmailTemplateMetadata]
Maybe Text
httpStatus :: Int
nextToken :: Maybe Text
customVerificationEmailTemplates :: Maybe [CustomVerificationEmailTemplateMetadata]
$sel:httpStatus:ListCustomVerificationEmailTemplatesResponse' :: ListCustomVerificationEmailTemplatesResponse -> Int
$sel:nextToken:ListCustomVerificationEmailTemplatesResponse' :: ListCustomVerificationEmailTemplatesResponse -> Maybe Text
$sel:customVerificationEmailTemplates:ListCustomVerificationEmailTemplatesResponse' :: ListCustomVerificationEmailTemplatesResponse
-> Maybe [CustomVerificationEmailTemplateMetadata]
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe [CustomVerificationEmailTemplateMetadata]
customVerificationEmailTemplates
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus