{-# 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.ListEmailTemplates
-- 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)
--
-- Lists the email templates present in your Amazon SES account in the
-- current Amazon Web Services Region.
--
-- You can execute this operation no more than once per second.
module Amazonka.SESV2.ListEmailTemplates
  ( -- * Creating a Request
    ListEmailTemplates (..),
    newListEmailTemplates,

    -- * Request Lenses
    listEmailTemplates_nextToken,
    listEmailTemplates_pageSize,

    -- * Destructuring the Response
    ListEmailTemplatesResponse (..),
    newListEmailTemplatesResponse,

    -- * Response Lenses
    listEmailTemplatesResponse_templatesMetadata,
    listEmailTemplatesResponse_nextToken,
    listEmailTemplatesResponse_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 list the email templates present in your Amazon
-- SES account in the current Amazon Web Services Region. For more
-- information, see the
-- <https://docs.aws.amazon.com/ses/latest/DeveloperGuide/send-personalized-email-api.html Amazon SES Developer Guide>.
--
-- /See:/ 'newListEmailTemplates' smart constructor.
data ListEmailTemplates = ListEmailTemplates'
  { -- | A token returned from a previous call to @ListEmailTemplates@ to
    -- indicate the position in the list of email templates.
    ListEmailTemplates -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The number of results to show in a single call to @ListEmailTemplates@.
    -- If the number of results is larger than the number you specified in this
    -- parameter, then the response includes a @NextToken@ element, which you
    -- can use to obtain additional results.
    --
    -- The value you specify has to be at least 1, and can be no more than 10.
    ListEmailTemplates -> Maybe Int
pageSize :: Prelude.Maybe Prelude.Int
  }
  deriving (ListEmailTemplates -> ListEmailTemplates -> Bool
(ListEmailTemplates -> ListEmailTemplates -> Bool)
-> (ListEmailTemplates -> ListEmailTemplates -> Bool)
-> Eq ListEmailTemplates
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListEmailTemplates -> ListEmailTemplates -> Bool
$c/= :: ListEmailTemplates -> ListEmailTemplates -> Bool
== :: ListEmailTemplates -> ListEmailTemplates -> Bool
$c== :: ListEmailTemplates -> ListEmailTemplates -> Bool
Prelude.Eq, ReadPrec [ListEmailTemplates]
ReadPrec ListEmailTemplates
Int -> ReadS ListEmailTemplates
ReadS [ListEmailTemplates]
(Int -> ReadS ListEmailTemplates)
-> ReadS [ListEmailTemplates]
-> ReadPrec ListEmailTemplates
-> ReadPrec [ListEmailTemplates]
-> Read ListEmailTemplates
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListEmailTemplates]
$creadListPrec :: ReadPrec [ListEmailTemplates]
readPrec :: ReadPrec ListEmailTemplates
$creadPrec :: ReadPrec ListEmailTemplates
readList :: ReadS [ListEmailTemplates]
$creadList :: ReadS [ListEmailTemplates]
readsPrec :: Int -> ReadS ListEmailTemplates
$creadsPrec :: Int -> ReadS ListEmailTemplates
Prelude.Read, Int -> ListEmailTemplates -> ShowS
[ListEmailTemplates] -> ShowS
ListEmailTemplates -> String
(Int -> ListEmailTemplates -> ShowS)
-> (ListEmailTemplates -> String)
-> ([ListEmailTemplates] -> ShowS)
-> Show ListEmailTemplates
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListEmailTemplates] -> ShowS
$cshowList :: [ListEmailTemplates] -> ShowS
show :: ListEmailTemplates -> String
$cshow :: ListEmailTemplates -> String
showsPrec :: Int -> ListEmailTemplates -> ShowS
$cshowsPrec :: Int -> ListEmailTemplates -> ShowS
Prelude.Show, (forall x. ListEmailTemplates -> Rep ListEmailTemplates x)
-> (forall x. Rep ListEmailTemplates x -> ListEmailTemplates)
-> Generic ListEmailTemplates
forall x. Rep ListEmailTemplates x -> ListEmailTemplates
forall x. ListEmailTemplates -> Rep ListEmailTemplates x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListEmailTemplates x -> ListEmailTemplates
$cfrom :: forall x. ListEmailTemplates -> Rep ListEmailTemplates x
Prelude.Generic)

-- |
-- Create a value of 'ListEmailTemplates' 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:
--
-- 'nextToken', 'listEmailTemplates_nextToken' - A token returned from a previous call to @ListEmailTemplates@ to
-- indicate the position in the list of email templates.
--
-- 'pageSize', 'listEmailTemplates_pageSize' - The number of results to show in a single call to @ListEmailTemplates@.
-- If the number of results is larger than the number you specified in this
-- parameter, then the response includes a @NextToken@ element, which you
-- can use to obtain additional results.
--
-- The value you specify has to be at least 1, and can be no more than 10.
newListEmailTemplates ::
  ListEmailTemplates
newListEmailTemplates :: ListEmailTemplates
newListEmailTemplates =
  ListEmailTemplates' :: Maybe Text -> Maybe Int -> ListEmailTemplates
ListEmailTemplates'
    { $sel:nextToken:ListEmailTemplates' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:pageSize:ListEmailTemplates' :: Maybe Int
pageSize = Maybe Int
forall a. Maybe a
Prelude.Nothing
    }

-- | A token returned from a previous call to @ListEmailTemplates@ to
-- indicate the position in the list of email templates.
listEmailTemplates_nextToken :: Lens.Lens' ListEmailTemplates (Prelude.Maybe Prelude.Text)
listEmailTemplates_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListEmailTemplates -> f ListEmailTemplates
listEmailTemplates_nextToken = (ListEmailTemplates -> Maybe Text)
-> (ListEmailTemplates -> Maybe Text -> ListEmailTemplates)
-> Lens
     ListEmailTemplates ListEmailTemplates (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListEmailTemplates' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListEmailTemplates' :: ListEmailTemplates -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListEmailTemplates
s@ListEmailTemplates' {} Maybe Text
a -> ListEmailTemplates
s {$sel:nextToken:ListEmailTemplates' :: Maybe Text
nextToken = Maybe Text
a} :: ListEmailTemplates)

-- | The number of results to show in a single call to @ListEmailTemplates@.
-- If the number of results is larger than the number you specified in this
-- parameter, then the response includes a @NextToken@ element, which you
-- can use to obtain additional results.
--
-- The value you specify has to be at least 1, and can be no more than 10.
listEmailTemplates_pageSize :: Lens.Lens' ListEmailTemplates (Prelude.Maybe Prelude.Int)
listEmailTemplates_pageSize :: (Maybe Int -> f (Maybe Int))
-> ListEmailTemplates -> f ListEmailTemplates
listEmailTemplates_pageSize = (ListEmailTemplates -> Maybe Int)
-> (ListEmailTemplates -> Maybe Int -> ListEmailTemplates)
-> Lens
     ListEmailTemplates ListEmailTemplates (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListEmailTemplates' {Maybe Int
pageSize :: Maybe Int
$sel:pageSize:ListEmailTemplates' :: ListEmailTemplates -> Maybe Int
pageSize} -> Maybe Int
pageSize) (\s :: ListEmailTemplates
s@ListEmailTemplates' {} Maybe Int
a -> ListEmailTemplates
s {$sel:pageSize:ListEmailTemplates' :: Maybe Int
pageSize = Maybe Int
a} :: ListEmailTemplates)

instance Core.AWSRequest ListEmailTemplates where
  type
    AWSResponse ListEmailTemplates =
      ListEmailTemplatesResponse
  request :: ListEmailTemplates -> Request ListEmailTemplates
request = Service -> ListEmailTemplates -> Request ListEmailTemplates
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
  response :: Logger
-> Service
-> Proxy ListEmailTemplates
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListEmailTemplates)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse ListEmailTemplates))
-> Logger
-> Service
-> Proxy ListEmailTemplates
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListEmailTemplates)))
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 [EmailTemplateMetadata]
-> Maybe Text -> Int -> ListEmailTemplatesResponse
ListEmailTemplatesResponse'
            (Maybe [EmailTemplateMetadata]
 -> Maybe Text -> Int -> ListEmailTemplatesResponse)
-> Either String (Maybe [EmailTemplateMetadata])
-> Either String (Maybe Text -> Int -> ListEmailTemplatesResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( Object
x Object
-> Text -> Either String (Maybe (Maybe [EmailTemplateMetadata]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"TemplatesMetadata"
                            Either String (Maybe (Maybe [EmailTemplateMetadata]))
-> Maybe [EmailTemplateMetadata]
-> Either String (Maybe [EmailTemplateMetadata])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [EmailTemplateMetadata]
forall a. Monoid a => a
Prelude.mempty
                        )
            Either String (Maybe Text -> Int -> ListEmailTemplatesResponse)
-> Either String (Maybe Text)
-> Either String (Int -> ListEmailTemplatesResponse)
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
"NextToken")
            Either String (Int -> ListEmailTemplatesResponse)
-> Either String Int -> Either String ListEmailTemplatesResponse
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 ListEmailTemplates

instance Prelude.NFData ListEmailTemplates

instance Core.ToHeaders ListEmailTemplates where
  toHeaders :: ListEmailTemplates -> ResponseHeaders
toHeaders =
    ResponseHeaders -> ListEmailTemplates -> 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 ListEmailTemplates where
  toPath :: ListEmailTemplates -> ByteString
toPath = ByteString -> ListEmailTemplates -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/v2/email/templates"

instance Core.ToQuery ListEmailTemplates where
  toQuery :: ListEmailTemplates -> QueryString
toQuery ListEmailTemplates' {Maybe Int
Maybe Text
pageSize :: Maybe Int
nextToken :: Maybe Text
$sel:pageSize:ListEmailTemplates' :: ListEmailTemplates -> Maybe Int
$sel:nextToken:ListEmailTemplates' :: ListEmailTemplates -> Maybe Text
..} =
    [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"NextToken" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
nextToken,
        ByteString
"PageSize" ByteString -> Maybe Int -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Int
pageSize
      ]

-- | The following elements are returned by the service.
--
-- /See:/ 'newListEmailTemplatesResponse' smart constructor.
data ListEmailTemplatesResponse = ListEmailTemplatesResponse'
  { -- | An array the contains the name and creation time stamp for each template
    -- in your Amazon SES account.
    ListEmailTemplatesResponse -> Maybe [EmailTemplateMetadata]
templatesMetadata :: Prelude.Maybe [EmailTemplateMetadata],
    -- | A token indicating that there are additional email templates available
    -- to be listed. Pass this token to a subsequent @ListEmailTemplates@ call
    -- to retrieve the next 10 email templates.
    ListEmailTemplatesResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListEmailTemplatesResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListEmailTemplatesResponse -> ListEmailTemplatesResponse -> Bool
(ListEmailTemplatesResponse -> ListEmailTemplatesResponse -> Bool)
-> (ListEmailTemplatesResponse
    -> ListEmailTemplatesResponse -> Bool)
-> Eq ListEmailTemplatesResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListEmailTemplatesResponse -> ListEmailTemplatesResponse -> Bool
$c/= :: ListEmailTemplatesResponse -> ListEmailTemplatesResponse -> Bool
== :: ListEmailTemplatesResponse -> ListEmailTemplatesResponse -> Bool
$c== :: ListEmailTemplatesResponse -> ListEmailTemplatesResponse -> Bool
Prelude.Eq, ReadPrec [ListEmailTemplatesResponse]
ReadPrec ListEmailTemplatesResponse
Int -> ReadS ListEmailTemplatesResponse
ReadS [ListEmailTemplatesResponse]
(Int -> ReadS ListEmailTemplatesResponse)
-> ReadS [ListEmailTemplatesResponse]
-> ReadPrec ListEmailTemplatesResponse
-> ReadPrec [ListEmailTemplatesResponse]
-> Read ListEmailTemplatesResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListEmailTemplatesResponse]
$creadListPrec :: ReadPrec [ListEmailTemplatesResponse]
readPrec :: ReadPrec ListEmailTemplatesResponse
$creadPrec :: ReadPrec ListEmailTemplatesResponse
readList :: ReadS [ListEmailTemplatesResponse]
$creadList :: ReadS [ListEmailTemplatesResponse]
readsPrec :: Int -> ReadS ListEmailTemplatesResponse
$creadsPrec :: Int -> ReadS ListEmailTemplatesResponse
Prelude.Read, Int -> ListEmailTemplatesResponse -> ShowS
[ListEmailTemplatesResponse] -> ShowS
ListEmailTemplatesResponse -> String
(Int -> ListEmailTemplatesResponse -> ShowS)
-> (ListEmailTemplatesResponse -> String)
-> ([ListEmailTemplatesResponse] -> ShowS)
-> Show ListEmailTemplatesResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListEmailTemplatesResponse] -> ShowS
$cshowList :: [ListEmailTemplatesResponse] -> ShowS
show :: ListEmailTemplatesResponse -> String
$cshow :: ListEmailTemplatesResponse -> String
showsPrec :: Int -> ListEmailTemplatesResponse -> ShowS
$cshowsPrec :: Int -> ListEmailTemplatesResponse -> ShowS
Prelude.Show, (forall x.
 ListEmailTemplatesResponse -> Rep ListEmailTemplatesResponse x)
-> (forall x.
    Rep ListEmailTemplatesResponse x -> ListEmailTemplatesResponse)
-> Generic ListEmailTemplatesResponse
forall x.
Rep ListEmailTemplatesResponse x -> ListEmailTemplatesResponse
forall x.
ListEmailTemplatesResponse -> Rep ListEmailTemplatesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListEmailTemplatesResponse x -> ListEmailTemplatesResponse
$cfrom :: forall x.
ListEmailTemplatesResponse -> Rep ListEmailTemplatesResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListEmailTemplatesResponse' 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:
--
-- 'templatesMetadata', 'listEmailTemplatesResponse_templatesMetadata' - An array the contains the name and creation time stamp for each template
-- in your Amazon SES account.
--
-- 'nextToken', 'listEmailTemplatesResponse_nextToken' - A token indicating that there are additional email templates available
-- to be listed. Pass this token to a subsequent @ListEmailTemplates@ call
-- to retrieve the next 10 email templates.
--
-- 'httpStatus', 'listEmailTemplatesResponse_httpStatus' - The response's http status code.
newListEmailTemplatesResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListEmailTemplatesResponse
newListEmailTemplatesResponse :: Int -> ListEmailTemplatesResponse
newListEmailTemplatesResponse Int
pHttpStatus_ =
  ListEmailTemplatesResponse' :: Maybe [EmailTemplateMetadata]
-> Maybe Text -> Int -> ListEmailTemplatesResponse
ListEmailTemplatesResponse'
    { $sel:templatesMetadata:ListEmailTemplatesResponse' :: Maybe [EmailTemplateMetadata]
templatesMetadata =
        Maybe [EmailTemplateMetadata]
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListEmailTemplatesResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListEmailTemplatesResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | An array the contains the name and creation time stamp for each template
-- in your Amazon SES account.
listEmailTemplatesResponse_templatesMetadata :: Lens.Lens' ListEmailTemplatesResponse (Prelude.Maybe [EmailTemplateMetadata])
listEmailTemplatesResponse_templatesMetadata :: (Maybe [EmailTemplateMetadata]
 -> f (Maybe [EmailTemplateMetadata]))
-> ListEmailTemplatesResponse -> f ListEmailTemplatesResponse
listEmailTemplatesResponse_templatesMetadata = (ListEmailTemplatesResponse -> Maybe [EmailTemplateMetadata])
-> (ListEmailTemplatesResponse
    -> Maybe [EmailTemplateMetadata] -> ListEmailTemplatesResponse)
-> Lens
     ListEmailTemplatesResponse
     ListEmailTemplatesResponse
     (Maybe [EmailTemplateMetadata])
     (Maybe [EmailTemplateMetadata])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListEmailTemplatesResponse' {Maybe [EmailTemplateMetadata]
templatesMetadata :: Maybe [EmailTemplateMetadata]
$sel:templatesMetadata:ListEmailTemplatesResponse' :: ListEmailTemplatesResponse -> Maybe [EmailTemplateMetadata]
templatesMetadata} -> Maybe [EmailTemplateMetadata]
templatesMetadata) (\s :: ListEmailTemplatesResponse
s@ListEmailTemplatesResponse' {} Maybe [EmailTemplateMetadata]
a -> ListEmailTemplatesResponse
s {$sel:templatesMetadata:ListEmailTemplatesResponse' :: Maybe [EmailTemplateMetadata]
templatesMetadata = Maybe [EmailTemplateMetadata]
a} :: ListEmailTemplatesResponse) ((Maybe [EmailTemplateMetadata]
  -> f (Maybe [EmailTemplateMetadata]))
 -> ListEmailTemplatesResponse -> f ListEmailTemplatesResponse)
-> ((Maybe [EmailTemplateMetadata]
     -> f (Maybe [EmailTemplateMetadata]))
    -> Maybe [EmailTemplateMetadata]
    -> f (Maybe [EmailTemplateMetadata]))
-> (Maybe [EmailTemplateMetadata]
    -> f (Maybe [EmailTemplateMetadata]))
-> ListEmailTemplatesResponse
-> f ListEmailTemplatesResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [EmailTemplateMetadata]
  [EmailTemplateMetadata]
  [EmailTemplateMetadata]
  [EmailTemplateMetadata]
-> Iso
     (Maybe [EmailTemplateMetadata])
     (Maybe [EmailTemplateMetadata])
     (Maybe [EmailTemplateMetadata])
     (Maybe [EmailTemplateMetadata])
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 AnIso
  [EmailTemplateMetadata]
  [EmailTemplateMetadata]
  [EmailTemplateMetadata]
  [EmailTemplateMetadata]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | A token indicating that there are additional email templates available
-- to be listed. Pass this token to a subsequent @ListEmailTemplates@ call
-- to retrieve the next 10 email templates.
listEmailTemplatesResponse_nextToken :: Lens.Lens' ListEmailTemplatesResponse (Prelude.Maybe Prelude.Text)
listEmailTemplatesResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListEmailTemplatesResponse -> f ListEmailTemplatesResponse
listEmailTemplatesResponse_nextToken = (ListEmailTemplatesResponse -> Maybe Text)
-> (ListEmailTemplatesResponse
    -> Maybe Text -> ListEmailTemplatesResponse)
-> Lens
     ListEmailTemplatesResponse
     ListEmailTemplatesResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListEmailTemplatesResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListEmailTemplatesResponse' :: ListEmailTemplatesResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListEmailTemplatesResponse
s@ListEmailTemplatesResponse' {} Maybe Text
a -> ListEmailTemplatesResponse
s {$sel:nextToken:ListEmailTemplatesResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListEmailTemplatesResponse)

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

instance Prelude.NFData ListEmailTemplatesResponse