{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.Pinpoint.Types.TemplatesResponse where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.Pinpoint.Types.TemplateResponse
import qualified Amazonka.Prelude as Prelude
data TemplatesResponse = TemplatesResponse'
{
TemplatesResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
TemplatesResponse -> [TemplateResponse]
item :: [TemplateResponse]
}
deriving (TemplatesResponse -> TemplatesResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TemplatesResponse -> TemplatesResponse -> Bool
$c/= :: TemplatesResponse -> TemplatesResponse -> Bool
== :: TemplatesResponse -> TemplatesResponse -> Bool
$c== :: TemplatesResponse -> TemplatesResponse -> Bool
Prelude.Eq, ReadPrec [TemplatesResponse]
ReadPrec TemplatesResponse
Int -> ReadS TemplatesResponse
ReadS [TemplatesResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [TemplatesResponse]
$creadListPrec :: ReadPrec [TemplatesResponse]
readPrec :: ReadPrec TemplatesResponse
$creadPrec :: ReadPrec TemplatesResponse
readList :: ReadS [TemplatesResponse]
$creadList :: ReadS [TemplatesResponse]
readsPrec :: Int -> ReadS TemplatesResponse
$creadsPrec :: Int -> ReadS TemplatesResponse
Prelude.Read, Int -> TemplatesResponse -> ShowS
[TemplatesResponse] -> ShowS
TemplatesResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [TemplatesResponse] -> ShowS
$cshowList :: [TemplatesResponse] -> ShowS
show :: TemplatesResponse -> String
$cshow :: TemplatesResponse -> String
showsPrec :: Int -> TemplatesResponse -> ShowS
$cshowsPrec :: Int -> TemplatesResponse -> ShowS
Prelude.Show, forall x. Rep TemplatesResponse x -> TemplatesResponse
forall x. TemplatesResponse -> Rep TemplatesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep TemplatesResponse x -> TemplatesResponse
$cfrom :: forall x. TemplatesResponse -> Rep TemplatesResponse x
Prelude.Generic)
newTemplatesResponse ::
TemplatesResponse
newTemplatesResponse :: TemplatesResponse
newTemplatesResponse =
TemplatesResponse'
{ $sel:nextToken:TemplatesResponse' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
$sel:item:TemplatesResponse' :: [TemplateResponse]
item = forall a. Monoid a => a
Prelude.mempty
}
templatesResponse_nextToken :: Lens.Lens' TemplatesResponse (Prelude.Maybe Prelude.Text)
templatesResponse_nextToken :: Lens' TemplatesResponse (Maybe Text)
templatesResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TemplatesResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:TemplatesResponse' :: TemplatesResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: TemplatesResponse
s@TemplatesResponse' {} Maybe Text
a -> TemplatesResponse
s {$sel:nextToken:TemplatesResponse' :: Maybe Text
nextToken = Maybe Text
a} :: TemplatesResponse)
templatesResponse_item :: Lens.Lens' TemplatesResponse [TemplateResponse]
templatesResponse_item :: Lens' TemplatesResponse [TemplateResponse]
templatesResponse_item = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TemplatesResponse' {[TemplateResponse]
item :: [TemplateResponse]
$sel:item:TemplatesResponse' :: TemplatesResponse -> [TemplateResponse]
item} -> [TemplateResponse]
item) (\s :: TemplatesResponse
s@TemplatesResponse' {} [TemplateResponse]
a -> TemplatesResponse
s {$sel:item:TemplatesResponse' :: [TemplateResponse]
item = [TemplateResponse]
a} :: TemplatesResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Data.FromJSON TemplatesResponse where
parseJSON :: Value -> Parser TemplatesResponse
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"TemplatesResponse"
( \Object
x ->
Maybe Text -> [TemplateResponse] -> TemplatesResponse
TemplatesResponse'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"NextToken")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Item" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
)
instance Prelude.Hashable TemplatesResponse where
hashWithSalt :: Int -> TemplatesResponse -> Int
hashWithSalt Int
_salt TemplatesResponse' {[TemplateResponse]
Maybe Text
item :: [TemplateResponse]
nextToken :: Maybe Text
$sel:item:TemplatesResponse' :: TemplatesResponse -> [TemplateResponse]
$sel:nextToken:TemplatesResponse' :: TemplatesResponse -> 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` [TemplateResponse]
item
instance Prelude.NFData TemplatesResponse where
rnf :: TemplatesResponse -> ()
rnf TemplatesResponse' {[TemplateResponse]
Maybe Text
item :: [TemplateResponse]
nextToken :: Maybe Text
$sel:item:TemplatesResponse' :: TemplatesResponse -> [TemplateResponse]
$sel:nextToken:TemplatesResponse' :: TemplatesResponse -> 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 [TemplateResponse]
item