{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data TemplateVersionResponse = TemplateVersionResponse'
{
TemplateVersionResponse -> Maybe Text
defaultSubstitutions :: Prelude.Maybe Prelude.Text,
TemplateVersionResponse -> Maybe Text
templateDescription :: 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
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]
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
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. 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'
{ $sel:defaultSubstitutions:TemplateVersionResponse' :: Maybe Text
defaultSubstitutions =
forall a. Maybe a
Prelude.Nothing,
$sel:templateDescription:TemplateVersionResponse' :: Maybe Text
templateDescription = forall a. Maybe a
Prelude.Nothing,
$sel:version:TemplateVersionResponse' :: Maybe Text
version = 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_defaultSubstitutions :: Lens.Lens' TemplateVersionResponse (Prelude.Maybe Prelude.Text)
templateVersionResponse_defaultSubstitutions :: Lens' TemplateVersionResponse (Maybe Text)
templateVersionResponse_defaultSubstitutions = 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_templateDescription :: Lens.Lens' TemplateVersionResponse (Prelude.Maybe Prelude.Text)
templateVersionResponse_templateDescription :: Lens' TemplateVersionResponse (Maybe Text)
templateVersionResponse_templateDescription = 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_version :: Lens.Lens' TemplateVersionResponse (Prelude.Maybe Prelude.Text)
templateVersionResponse_version :: Lens' TemplateVersionResponse (Maybe Text)
templateVersionResponse_version = 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 :: Lens' TemplateVersionResponse Text
templateVersionResponse_lastModifiedDate = 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 :: Lens' TemplateVersionResponse Text
templateVersionResponse_creationDate = 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 :: Lens' TemplateVersionResponse Text
templateVersionResponse_templateName = 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 :: Lens' TemplateVersionResponse Text
templateVersionResponse_templateType = 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 Data.FromJSON TemplateVersionResponse where
parseJSON :: Value -> Parser TemplateVersionResponse
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"TemplateVersionResponse"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Maybe Text
-> Text
-> Text
-> Text
-> Text
-> TemplateVersionResponse
TemplateVersionResponse'
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
"DefaultSubstitutions")
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
"TemplateDescription")
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
"Version")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"LastModifiedDate")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"CreationDate")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"TemplateName")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"TemplateType")
)
instance Prelude.Hashable TemplateVersionResponse where
hashWithSalt :: Int -> TemplateVersionResponse -> Int
hashWithSalt Int
_salt TemplateVersionResponse' {Maybe Text
Text
templateType :: Text
templateName :: Text
creationDate :: Text
lastModifiedDate :: Text
version :: Maybe Text
templateDescription :: Maybe Text
defaultSubstitutions :: Maybe Text
$sel:templateType:TemplateVersionResponse' :: TemplateVersionResponse -> Text
$sel:templateName:TemplateVersionResponse' :: TemplateVersionResponse -> Text
$sel:creationDate:TemplateVersionResponse' :: TemplateVersionResponse -> Text
$sel:lastModifiedDate:TemplateVersionResponse' :: TemplateVersionResponse -> Text
$sel:version:TemplateVersionResponse' :: TemplateVersionResponse -> Maybe Text
$sel:templateDescription:TemplateVersionResponse' :: TemplateVersionResponse -> Maybe Text
$sel:defaultSubstitutions:TemplateVersionResponse' :: TemplateVersionResponse -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
defaultSubstitutions
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
templateDescription
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
version
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
lastModifiedDate
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
creationDate
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
templateName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
templateType
instance Prelude.NFData TemplateVersionResponse where
rnf :: TemplateVersionResponse -> ()
rnf TemplateVersionResponse' {Maybe Text
Text
templateType :: Text
templateName :: Text
creationDate :: Text
lastModifiedDate :: Text
version :: Maybe Text
templateDescription :: Maybe Text
defaultSubstitutions :: Maybe Text
$sel:templateType:TemplateVersionResponse' :: TemplateVersionResponse -> Text
$sel:templateName:TemplateVersionResponse' :: TemplateVersionResponse -> Text
$sel:creationDate:TemplateVersionResponse' :: TemplateVersionResponse -> Text
$sel:lastModifiedDate:TemplateVersionResponse' :: TemplateVersionResponse -> Text
$sel:version:TemplateVersionResponse' :: TemplateVersionResponse -> Maybe Text
$sel:templateDescription:TemplateVersionResponse' :: TemplateVersionResponse -> Maybe Text
$sel:defaultSubstitutions:TemplateVersionResponse' :: TemplateVersionResponse -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
defaultSubstitutions
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
templateDescription
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
version
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
lastModifiedDate
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
creationDate
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
templateName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
templateType