{-# 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.TemplateVersionsResponse where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.Pinpoint.Types.TemplateVersionResponse
import qualified Amazonka.Prelude as Prelude
data TemplateVersionsResponse = TemplateVersionsResponse'
{
TemplateVersionsResponse -> Maybe Text
requestID :: Prelude.Maybe Prelude.Text,
TemplateVersionsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
TemplateVersionsResponse -> Maybe Text
message :: Prelude.Maybe Prelude.Text,
TemplateVersionsResponse -> [TemplateVersionResponse]
item :: [TemplateVersionResponse]
}
deriving (TemplateVersionsResponse -> TemplateVersionsResponse -> Bool
(TemplateVersionsResponse -> TemplateVersionsResponse -> Bool)
-> (TemplateVersionsResponse -> TemplateVersionsResponse -> Bool)
-> Eq TemplateVersionsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TemplateVersionsResponse -> TemplateVersionsResponse -> Bool
$c/= :: TemplateVersionsResponse -> TemplateVersionsResponse -> Bool
== :: TemplateVersionsResponse -> TemplateVersionsResponse -> Bool
$c== :: TemplateVersionsResponse -> TemplateVersionsResponse -> Bool
Prelude.Eq, ReadPrec [TemplateVersionsResponse]
ReadPrec TemplateVersionsResponse
Int -> ReadS TemplateVersionsResponse
ReadS [TemplateVersionsResponse]
(Int -> ReadS TemplateVersionsResponse)
-> ReadS [TemplateVersionsResponse]
-> ReadPrec TemplateVersionsResponse
-> ReadPrec [TemplateVersionsResponse]
-> Read TemplateVersionsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [TemplateVersionsResponse]
$creadListPrec :: ReadPrec [TemplateVersionsResponse]
readPrec :: ReadPrec TemplateVersionsResponse
$creadPrec :: ReadPrec TemplateVersionsResponse
readList :: ReadS [TemplateVersionsResponse]
$creadList :: ReadS [TemplateVersionsResponse]
readsPrec :: Int -> ReadS TemplateVersionsResponse
$creadsPrec :: Int -> ReadS TemplateVersionsResponse
Prelude.Read, Int -> TemplateVersionsResponse -> ShowS
[TemplateVersionsResponse] -> ShowS
TemplateVersionsResponse -> String
(Int -> TemplateVersionsResponse -> ShowS)
-> (TemplateVersionsResponse -> String)
-> ([TemplateVersionsResponse] -> ShowS)
-> Show TemplateVersionsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [TemplateVersionsResponse] -> ShowS
$cshowList :: [TemplateVersionsResponse] -> ShowS
show :: TemplateVersionsResponse -> String
$cshow :: TemplateVersionsResponse -> String
showsPrec :: Int -> TemplateVersionsResponse -> ShowS
$cshowsPrec :: Int -> TemplateVersionsResponse -> ShowS
Prelude.Show, (forall x.
TemplateVersionsResponse -> Rep TemplateVersionsResponse x)
-> (forall x.
Rep TemplateVersionsResponse x -> TemplateVersionsResponse)
-> Generic TemplateVersionsResponse
forall x.
Rep TemplateVersionsResponse x -> TemplateVersionsResponse
forall x.
TemplateVersionsResponse -> Rep TemplateVersionsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep TemplateVersionsResponse x -> TemplateVersionsResponse
$cfrom :: forall x.
TemplateVersionsResponse -> Rep TemplateVersionsResponse x
Prelude.Generic)
newTemplateVersionsResponse ::
TemplateVersionsResponse
newTemplateVersionsResponse :: TemplateVersionsResponse
newTemplateVersionsResponse =
TemplateVersionsResponse' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> [TemplateVersionResponse]
-> TemplateVersionsResponse
TemplateVersionsResponse'
{ $sel:requestID:TemplateVersionsResponse' :: Maybe Text
requestID =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:TemplateVersionsResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:message:TemplateVersionsResponse' :: Maybe Text
message = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:item:TemplateVersionsResponse' :: [TemplateVersionResponse]
item = [TemplateVersionResponse]
forall a. Monoid a => a
Prelude.mempty
}
templateVersionsResponse_requestID :: Lens.Lens' TemplateVersionsResponse (Prelude.Maybe Prelude.Text)
templateVersionsResponse_requestID :: (Maybe Text -> f (Maybe Text))
-> TemplateVersionsResponse -> f TemplateVersionsResponse
templateVersionsResponse_requestID = (TemplateVersionsResponse -> Maybe Text)
-> (TemplateVersionsResponse
-> Maybe Text -> TemplateVersionsResponse)
-> Lens
TemplateVersionsResponse
TemplateVersionsResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TemplateVersionsResponse' {Maybe Text
requestID :: Maybe Text
$sel:requestID:TemplateVersionsResponse' :: TemplateVersionsResponse -> Maybe Text
requestID} -> Maybe Text
requestID) (\s :: TemplateVersionsResponse
s@TemplateVersionsResponse' {} Maybe Text
a -> TemplateVersionsResponse
s {$sel:requestID:TemplateVersionsResponse' :: Maybe Text
requestID = Maybe Text
a} :: TemplateVersionsResponse)
templateVersionsResponse_nextToken :: Lens.Lens' TemplateVersionsResponse (Prelude.Maybe Prelude.Text)
templateVersionsResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> TemplateVersionsResponse -> f TemplateVersionsResponse
templateVersionsResponse_nextToken = (TemplateVersionsResponse -> Maybe Text)
-> (TemplateVersionsResponse
-> Maybe Text -> TemplateVersionsResponse)
-> Lens
TemplateVersionsResponse
TemplateVersionsResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TemplateVersionsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:TemplateVersionsResponse' :: TemplateVersionsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: TemplateVersionsResponse
s@TemplateVersionsResponse' {} Maybe Text
a -> TemplateVersionsResponse
s {$sel:nextToken:TemplateVersionsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: TemplateVersionsResponse)
templateVersionsResponse_message :: Lens.Lens' TemplateVersionsResponse (Prelude.Maybe Prelude.Text)
templateVersionsResponse_message :: (Maybe Text -> f (Maybe Text))
-> TemplateVersionsResponse -> f TemplateVersionsResponse
templateVersionsResponse_message = (TemplateVersionsResponse -> Maybe Text)
-> (TemplateVersionsResponse
-> Maybe Text -> TemplateVersionsResponse)
-> Lens
TemplateVersionsResponse
TemplateVersionsResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TemplateVersionsResponse' {Maybe Text
message :: Maybe Text
$sel:message:TemplateVersionsResponse' :: TemplateVersionsResponse -> Maybe Text
message} -> Maybe Text
message) (\s :: TemplateVersionsResponse
s@TemplateVersionsResponse' {} Maybe Text
a -> TemplateVersionsResponse
s {$sel:message:TemplateVersionsResponse' :: Maybe Text
message = Maybe Text
a} :: TemplateVersionsResponse)
templateVersionsResponse_item :: Lens.Lens' TemplateVersionsResponse [TemplateVersionResponse]
templateVersionsResponse_item :: ([TemplateVersionResponse] -> f [TemplateVersionResponse])
-> TemplateVersionsResponse -> f TemplateVersionsResponse
templateVersionsResponse_item = (TemplateVersionsResponse -> [TemplateVersionResponse])
-> (TemplateVersionsResponse
-> [TemplateVersionResponse] -> TemplateVersionsResponse)
-> Lens
TemplateVersionsResponse
TemplateVersionsResponse
[TemplateVersionResponse]
[TemplateVersionResponse]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TemplateVersionsResponse' {[TemplateVersionResponse]
item :: [TemplateVersionResponse]
$sel:item:TemplateVersionsResponse' :: TemplateVersionsResponse -> [TemplateVersionResponse]
item} -> [TemplateVersionResponse]
item) (\s :: TemplateVersionsResponse
s@TemplateVersionsResponse' {} [TemplateVersionResponse]
a -> TemplateVersionsResponse
s {$sel:item:TemplateVersionsResponse' :: [TemplateVersionResponse]
item = [TemplateVersionResponse]
a} :: TemplateVersionsResponse) (([TemplateVersionResponse] -> f [TemplateVersionResponse])
-> TemplateVersionsResponse -> f TemplateVersionsResponse)
-> (([TemplateVersionResponse] -> f [TemplateVersionResponse])
-> [TemplateVersionResponse] -> f [TemplateVersionResponse])
-> ([TemplateVersionResponse] -> f [TemplateVersionResponse])
-> TemplateVersionsResponse
-> f TemplateVersionsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([TemplateVersionResponse] -> f [TemplateVersionResponse])
-> [TemplateVersionResponse] -> f [TemplateVersionResponse]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Core.FromJSON TemplateVersionsResponse where
parseJSON :: Value -> Parser TemplateVersionsResponse
parseJSON =
String
-> (Object -> Parser TemplateVersionsResponse)
-> Value
-> Parser TemplateVersionsResponse
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"TemplateVersionsResponse"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Maybe Text
-> [TemplateVersionResponse]
-> TemplateVersionsResponse
TemplateVersionsResponse'
(Maybe Text
-> Maybe Text
-> Maybe Text
-> [TemplateVersionResponse]
-> TemplateVersionsResponse)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> [TemplateVersionResponse]
-> TemplateVersionsResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"RequestID")
Parser
(Maybe Text
-> Maybe Text
-> [TemplateVersionResponse]
-> TemplateVersionsResponse)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> [TemplateVersionResponse] -> TemplateVersionsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"NextToken")
Parser
(Maybe Text
-> [TemplateVersionResponse] -> TemplateVersionsResponse)
-> Parser (Maybe Text)
-> Parser ([TemplateVersionResponse] -> TemplateVersionsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Message")
Parser ([TemplateVersionResponse] -> TemplateVersionsResponse)
-> Parser [TemplateVersionResponse]
-> Parser TemplateVersionsResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe [TemplateVersionResponse])
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Item" Parser (Maybe [TemplateVersionResponse])
-> [TemplateVersionResponse] -> Parser [TemplateVersionResponse]
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= [TemplateVersionResponse]
forall a. Monoid a => a
Prelude.mempty)
)
instance Prelude.Hashable TemplateVersionsResponse
instance Prelude.NFData TemplateVersionsResponse