{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.Pinpoint.Types.TemplateVersionResponse
import qualified Amazonka.Prelude as Prelude
data TemplateVersionsResponse = TemplateVersionsResponse'
{
TemplateVersionsResponse -> Maybe Text
message :: Prelude.Maybe Prelude.Text,
TemplateVersionsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
TemplateVersionsResponse -> Maybe Text
requestID :: Prelude.Maybe Prelude.Text,
TemplateVersionsResponse -> [TemplateVersionResponse]
item :: [TemplateVersionResponse]
}
deriving (TemplateVersionsResponse -> TemplateVersionsResponse -> Bool
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]
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
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.
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'
{ $sel:message:TemplateVersionsResponse' :: Maybe Text
message =
forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:TemplateVersionsResponse' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
$sel:requestID:TemplateVersionsResponse' :: Maybe Text
requestID = forall a. Maybe a
Prelude.Nothing,
$sel:item:TemplateVersionsResponse' :: [TemplateVersionResponse]
item = forall a. Monoid a => a
Prelude.mempty
}
templateVersionsResponse_message :: Lens.Lens' TemplateVersionsResponse (Prelude.Maybe Prelude.Text)
templateVersionsResponse_message :: Lens' TemplateVersionsResponse (Maybe Text)
templateVersionsResponse_message = 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_nextToken :: Lens.Lens' TemplateVersionsResponse (Prelude.Maybe Prelude.Text)
templateVersionsResponse_nextToken :: Lens' TemplateVersionsResponse (Maybe Text)
templateVersionsResponse_nextToken = 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_requestID :: Lens.Lens' TemplateVersionsResponse (Prelude.Maybe Prelude.Text)
templateVersionsResponse_requestID :: Lens' TemplateVersionsResponse (Maybe Text)
templateVersionsResponse_requestID = 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_item :: Lens.Lens' TemplateVersionsResponse [TemplateVersionResponse]
templateVersionsResponse_item :: Lens' TemplateVersionsResponse [TemplateVersionResponse]
templateVersionsResponse_item = 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) 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 TemplateVersionsResponse where
parseJSON :: Value -> Parser TemplateVersionsResponse
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"TemplateVersionsResponse"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Maybe Text
-> [TemplateVersionResponse]
-> TemplateVersionsResponse
TemplateVersionsResponse'
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
"Message")
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
"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
"RequestID")
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 TemplateVersionsResponse where
hashWithSalt :: Int -> TemplateVersionsResponse -> Int
hashWithSalt Int
_salt TemplateVersionsResponse' {[TemplateVersionResponse]
Maybe Text
item :: [TemplateVersionResponse]
requestID :: Maybe Text
nextToken :: Maybe Text
message :: Maybe Text
$sel:item:TemplateVersionsResponse' :: TemplateVersionsResponse -> [TemplateVersionResponse]
$sel:requestID:TemplateVersionsResponse' :: TemplateVersionsResponse -> Maybe Text
$sel:nextToken:TemplateVersionsResponse' :: TemplateVersionsResponse -> Maybe Text
$sel:message:TemplateVersionsResponse' :: TemplateVersionsResponse -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
message
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
nextToken
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
requestID
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` [TemplateVersionResponse]
item
instance Prelude.NFData TemplateVersionsResponse where
rnf :: TemplateVersionsResponse -> ()
rnf TemplateVersionsResponse' {[TemplateVersionResponse]
Maybe Text
item :: [TemplateVersionResponse]
requestID :: Maybe Text
nextToken :: Maybe Text
message :: Maybe Text
$sel:item:TemplateVersionsResponse' :: TemplateVersionsResponse -> [TemplateVersionResponse]
$sel:requestID:TemplateVersionsResponse' :: TemplateVersionsResponse -> Maybe Text
$sel:nextToken:TemplateVersionsResponse' :: TemplateVersionsResponse -> Maybe Text
$sel:message:TemplateVersionsResponse' :: TemplateVersionsResponse -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
message
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 Maybe Text
requestID
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf [TemplateVersionResponse]
item