{-# 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.TemplateVersionResponse where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data TemplateVersionResponse = TemplateVersionResponse'
{
TemplateVersionResponse -> Maybe Text
templateDescription :: Prelude.Maybe Prelude.Text,
TemplateVersionResponse -> Maybe Text
defaultSubstitutions :: Prelude.Maybe Prelude.Text,
TemplateVersionResponse -> Maybe Text
version :: Prelude.Maybe Prelude.Text,
TemplateVersionResponse -> Text
lastModifiedDate :: Prelude.Text,
TemplateVersionResponse -> Text
creationDate :: Prelude.Text,
TemplateVersionResponse -> Text
templateName :: Prelude.Text,
TemplateVersionResponse -> Text
templateType :: Prelude.Text
}
deriving (TemplateVersionResponse -> TemplateVersionResponse -> Bool
(TemplateVersionResponse -> TemplateVersionResponse -> Bool)
-> (TemplateVersionResponse -> TemplateVersionResponse -> Bool)
-> Eq TemplateVersionResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TemplateVersionResponse -> TemplateVersionResponse -> Bool
$c/= :: TemplateVersionResponse -> TemplateVersionResponse -> Bool
== :: TemplateVersionResponse -> TemplateVersionResponse -> Bool
$c== :: TemplateVersionResponse -> TemplateVersionResponse -> Bool
Prelude.Eq, ReadPrec [TemplateVersionResponse]
ReadPrec TemplateVersionResponse
Int -> ReadS TemplateVersionResponse
ReadS [TemplateVersionResponse]
(Int -> ReadS TemplateVersionResponse)
-> ReadS [TemplateVersionResponse]
-> ReadPrec TemplateVersionResponse
-> ReadPrec [TemplateVersionResponse]
-> Read TemplateVersionResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [TemplateVersionResponse]
$creadListPrec :: ReadPrec [TemplateVersionResponse]
readPrec :: ReadPrec TemplateVersionResponse
$creadPrec :: ReadPrec TemplateVersionResponse
readList :: ReadS [TemplateVersionResponse]
$creadList :: ReadS [TemplateVersionResponse]
readsPrec :: Int -> ReadS TemplateVersionResponse
$creadsPrec :: Int -> ReadS TemplateVersionResponse
Prelude.Read, Int -> TemplateVersionResponse -> ShowS
[TemplateVersionResponse] -> ShowS
TemplateVersionResponse -> String
(Int -> TemplateVersionResponse -> ShowS)
-> (TemplateVersionResponse -> String)
-> ([TemplateVersionResponse] -> ShowS)
-> Show TemplateVersionResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [TemplateVersionResponse] -> ShowS
$cshowList :: [TemplateVersionResponse] -> ShowS
show :: TemplateVersionResponse -> String
$cshow :: TemplateVersionResponse -> String
showsPrec :: Int -> TemplateVersionResponse -> ShowS
$cshowsPrec :: Int -> TemplateVersionResponse -> ShowS
Prelude.Show, (forall x.
TemplateVersionResponse -> Rep TemplateVersionResponse x)
-> (forall x.
Rep TemplateVersionResponse x -> TemplateVersionResponse)
-> Generic TemplateVersionResponse
forall x. Rep TemplateVersionResponse x -> TemplateVersionResponse
forall x. TemplateVersionResponse -> Rep TemplateVersionResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep TemplateVersionResponse x -> TemplateVersionResponse
$cfrom :: forall x. TemplateVersionResponse -> Rep TemplateVersionResponse x
Prelude.Generic)
newTemplateVersionResponse ::
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
TemplateVersionResponse
newTemplateVersionResponse :: Text -> Text -> Text -> Text -> TemplateVersionResponse
newTemplateVersionResponse
Text
pLastModifiedDate_
Text
pCreationDate_
Text
pTemplateName_
Text
pTemplateType_ =
TemplateVersionResponse' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Text
-> Text
-> Text
-> Text
-> TemplateVersionResponse
TemplateVersionResponse'
{ $sel:templateDescription:TemplateVersionResponse' :: Maybe Text
templateDescription =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:defaultSubstitutions:TemplateVersionResponse' :: Maybe Text
defaultSubstitutions = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:version:TemplateVersionResponse' :: Maybe Text
version = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:lastModifiedDate:TemplateVersionResponse' :: Text
lastModifiedDate = Text
pLastModifiedDate_,
$sel:creationDate:TemplateVersionResponse' :: Text
creationDate = Text
pCreationDate_,
$sel:templateName:TemplateVersionResponse' :: Text
templateName = Text
pTemplateName_,
$sel:templateType:TemplateVersionResponse' :: Text
templateType = Text
pTemplateType_
}
templateVersionResponse_templateDescription :: Lens.Lens' TemplateVersionResponse (Prelude.Maybe Prelude.Text)
templateVersionResponse_templateDescription :: (Maybe Text -> f (Maybe Text))
-> TemplateVersionResponse -> f TemplateVersionResponse
templateVersionResponse_templateDescription = (TemplateVersionResponse -> Maybe Text)
-> (TemplateVersionResponse
-> Maybe Text -> TemplateVersionResponse)
-> Lens
TemplateVersionResponse
TemplateVersionResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TemplateVersionResponse' {Maybe Text
templateDescription :: Maybe Text
$sel:templateDescription:TemplateVersionResponse' :: TemplateVersionResponse -> Maybe Text
templateDescription} -> Maybe Text
templateDescription) (\s :: TemplateVersionResponse
s@TemplateVersionResponse' {} Maybe Text
a -> TemplateVersionResponse
s {$sel:templateDescription:TemplateVersionResponse' :: Maybe Text
templateDescription = Maybe Text
a} :: TemplateVersionResponse)
templateVersionResponse_defaultSubstitutions :: Lens.Lens' TemplateVersionResponse (Prelude.Maybe Prelude.Text)
templateVersionResponse_defaultSubstitutions :: (Maybe Text -> f (Maybe Text))
-> TemplateVersionResponse -> f TemplateVersionResponse
templateVersionResponse_defaultSubstitutions = (TemplateVersionResponse -> Maybe Text)
-> (TemplateVersionResponse
-> Maybe Text -> TemplateVersionResponse)
-> Lens
TemplateVersionResponse
TemplateVersionResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TemplateVersionResponse' {Maybe Text
defaultSubstitutions :: Maybe Text
$sel:defaultSubstitutions:TemplateVersionResponse' :: TemplateVersionResponse -> Maybe Text
defaultSubstitutions} -> Maybe Text
defaultSubstitutions) (\s :: TemplateVersionResponse
s@TemplateVersionResponse' {} Maybe Text
a -> TemplateVersionResponse
s {$sel:defaultSubstitutions:TemplateVersionResponse' :: Maybe Text
defaultSubstitutions = Maybe Text
a} :: TemplateVersionResponse)
templateVersionResponse_version :: Lens.Lens' TemplateVersionResponse (Prelude.Maybe Prelude.Text)
templateVersionResponse_version :: (Maybe Text -> f (Maybe Text))
-> TemplateVersionResponse -> f TemplateVersionResponse
templateVersionResponse_version = (TemplateVersionResponse -> Maybe Text)
-> (TemplateVersionResponse
-> Maybe Text -> TemplateVersionResponse)
-> Lens
TemplateVersionResponse
TemplateVersionResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TemplateVersionResponse' {Maybe Text
version :: Maybe Text
$sel:version:TemplateVersionResponse' :: TemplateVersionResponse -> Maybe Text
version} -> Maybe Text
version) (\s :: TemplateVersionResponse
s@TemplateVersionResponse' {} Maybe Text
a -> TemplateVersionResponse
s {$sel:version:TemplateVersionResponse' :: Maybe Text
version = Maybe Text
a} :: TemplateVersionResponse)
templateVersionResponse_lastModifiedDate :: Lens.Lens' TemplateVersionResponse Prelude.Text
templateVersionResponse_lastModifiedDate :: (Text -> f Text)
-> TemplateVersionResponse -> f TemplateVersionResponse
templateVersionResponse_lastModifiedDate = (TemplateVersionResponse -> Text)
-> (TemplateVersionResponse -> Text -> TemplateVersionResponse)
-> Lens TemplateVersionResponse TemplateVersionResponse Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TemplateVersionResponse' {Text
lastModifiedDate :: Text
$sel:lastModifiedDate:TemplateVersionResponse' :: TemplateVersionResponse -> Text
lastModifiedDate} -> Text
lastModifiedDate) (\s :: TemplateVersionResponse
s@TemplateVersionResponse' {} Text
a -> TemplateVersionResponse
s {$sel:lastModifiedDate:TemplateVersionResponse' :: Text
lastModifiedDate = Text
a} :: TemplateVersionResponse)
templateVersionResponse_creationDate :: Lens.Lens' TemplateVersionResponse Prelude.Text
templateVersionResponse_creationDate :: (Text -> f Text)
-> TemplateVersionResponse -> f TemplateVersionResponse
templateVersionResponse_creationDate = (TemplateVersionResponse -> Text)
-> (TemplateVersionResponse -> Text -> TemplateVersionResponse)
-> Lens TemplateVersionResponse TemplateVersionResponse Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TemplateVersionResponse' {Text
creationDate :: Text
$sel:creationDate:TemplateVersionResponse' :: TemplateVersionResponse -> Text
creationDate} -> Text
creationDate) (\s :: TemplateVersionResponse
s@TemplateVersionResponse' {} Text
a -> TemplateVersionResponse
s {$sel:creationDate:TemplateVersionResponse' :: Text
creationDate = Text
a} :: TemplateVersionResponse)
templateVersionResponse_templateName :: Lens.Lens' TemplateVersionResponse Prelude.Text
templateVersionResponse_templateName :: (Text -> f Text)
-> TemplateVersionResponse -> f TemplateVersionResponse
templateVersionResponse_templateName = (TemplateVersionResponse -> Text)
-> (TemplateVersionResponse -> Text -> TemplateVersionResponse)
-> Lens TemplateVersionResponse TemplateVersionResponse Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TemplateVersionResponse' {Text
templateName :: Text
$sel:templateName:TemplateVersionResponse' :: TemplateVersionResponse -> Text
templateName} -> Text
templateName) (\s :: TemplateVersionResponse
s@TemplateVersionResponse' {} Text
a -> TemplateVersionResponse
s {$sel:templateName:TemplateVersionResponse' :: Text
templateName = Text
a} :: TemplateVersionResponse)
templateVersionResponse_templateType :: Lens.Lens' TemplateVersionResponse Prelude.Text
templateVersionResponse_templateType :: (Text -> f Text)
-> TemplateVersionResponse -> f TemplateVersionResponse
templateVersionResponse_templateType = (TemplateVersionResponse -> Text)
-> (TemplateVersionResponse -> Text -> TemplateVersionResponse)
-> Lens TemplateVersionResponse TemplateVersionResponse Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TemplateVersionResponse' {Text
templateType :: Text
$sel:templateType:TemplateVersionResponse' :: TemplateVersionResponse -> Text
templateType} -> Text
templateType) (\s :: TemplateVersionResponse
s@TemplateVersionResponse' {} Text
a -> TemplateVersionResponse
s {$sel:templateType:TemplateVersionResponse' :: Text
templateType = Text
a} :: TemplateVersionResponse)
instance Core.FromJSON TemplateVersionResponse where
parseJSON :: Value -> Parser TemplateVersionResponse
parseJSON =
String
-> (Object -> Parser TemplateVersionResponse)
-> Value
-> Parser TemplateVersionResponse
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"TemplateVersionResponse"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Maybe Text
-> Text
-> Text
-> Text
-> Text
-> TemplateVersionResponse
TemplateVersionResponse'
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Text
-> Text
-> Text
-> Text
-> TemplateVersionResponse)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Text
-> Text
-> Text
-> Text
-> TemplateVersionResponse)
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
"TemplateDescription")
Parser
(Maybe Text
-> Maybe Text
-> Text
-> Text
-> Text
-> Text
-> TemplateVersionResponse)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Text -> Text -> Text -> Text -> TemplateVersionResponse)
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
"DefaultSubstitutions")
Parser
(Maybe Text
-> Text -> Text -> Text -> Text -> TemplateVersionResponse)
-> Parser (Maybe Text)
-> Parser (Text -> Text -> Text -> Text -> TemplateVersionResponse)
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
"Version")
Parser (Text -> Text -> Text -> Text -> TemplateVersionResponse)
-> Parser Text
-> Parser (Text -> Text -> Text -> TemplateVersionResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"LastModifiedDate")
Parser (Text -> Text -> Text -> TemplateVersionResponse)
-> Parser Text -> Parser (Text -> Text -> TemplateVersionResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"CreationDate")
Parser (Text -> Text -> TemplateVersionResponse)
-> Parser Text -> Parser (Text -> TemplateVersionResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"TemplateName")
Parser (Text -> TemplateVersionResponse)
-> Parser Text -> Parser TemplateVersionResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"TemplateType")
)
instance Prelude.Hashable TemplateVersionResponse
instance Prelude.NFData TemplateVersionResponse