{-# 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.TemplateCreateMessageBody 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 TemplateCreateMessageBody = TemplateCreateMessageBody'
{
TemplateCreateMessageBody -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
TemplateCreateMessageBody -> Maybe Text
message :: Prelude.Maybe Prelude.Text,
TemplateCreateMessageBody -> Maybe Text
requestID :: Prelude.Maybe Prelude.Text
}
deriving (TemplateCreateMessageBody -> TemplateCreateMessageBody -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TemplateCreateMessageBody -> TemplateCreateMessageBody -> Bool
$c/= :: TemplateCreateMessageBody -> TemplateCreateMessageBody -> Bool
== :: TemplateCreateMessageBody -> TemplateCreateMessageBody -> Bool
$c== :: TemplateCreateMessageBody -> TemplateCreateMessageBody -> Bool
Prelude.Eq, ReadPrec [TemplateCreateMessageBody]
ReadPrec TemplateCreateMessageBody
Int -> ReadS TemplateCreateMessageBody
ReadS [TemplateCreateMessageBody]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [TemplateCreateMessageBody]
$creadListPrec :: ReadPrec [TemplateCreateMessageBody]
readPrec :: ReadPrec TemplateCreateMessageBody
$creadPrec :: ReadPrec TemplateCreateMessageBody
readList :: ReadS [TemplateCreateMessageBody]
$creadList :: ReadS [TemplateCreateMessageBody]
readsPrec :: Int -> ReadS TemplateCreateMessageBody
$creadsPrec :: Int -> ReadS TemplateCreateMessageBody
Prelude.Read, Int -> TemplateCreateMessageBody -> ShowS
[TemplateCreateMessageBody] -> ShowS
TemplateCreateMessageBody -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [TemplateCreateMessageBody] -> ShowS
$cshowList :: [TemplateCreateMessageBody] -> ShowS
show :: TemplateCreateMessageBody -> String
$cshow :: TemplateCreateMessageBody -> String
showsPrec :: Int -> TemplateCreateMessageBody -> ShowS
$cshowsPrec :: Int -> TemplateCreateMessageBody -> ShowS
Prelude.Show, forall x.
Rep TemplateCreateMessageBody x -> TemplateCreateMessageBody
forall x.
TemplateCreateMessageBody -> Rep TemplateCreateMessageBody x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep TemplateCreateMessageBody x -> TemplateCreateMessageBody
$cfrom :: forall x.
TemplateCreateMessageBody -> Rep TemplateCreateMessageBody x
Prelude.Generic)
newTemplateCreateMessageBody ::
TemplateCreateMessageBody
newTemplateCreateMessageBody :: TemplateCreateMessageBody
newTemplateCreateMessageBody =
TemplateCreateMessageBody'
{ $sel:arn:TemplateCreateMessageBody' :: Maybe Text
arn = forall a. Maybe a
Prelude.Nothing,
$sel:message:TemplateCreateMessageBody' :: Maybe Text
message = forall a. Maybe a
Prelude.Nothing,
$sel:requestID:TemplateCreateMessageBody' :: Maybe Text
requestID = forall a. Maybe a
Prelude.Nothing
}
templateCreateMessageBody_arn :: Lens.Lens' TemplateCreateMessageBody (Prelude.Maybe Prelude.Text)
templateCreateMessageBody_arn :: Lens' TemplateCreateMessageBody (Maybe Text)
templateCreateMessageBody_arn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TemplateCreateMessageBody' {Maybe Text
arn :: Maybe Text
$sel:arn:TemplateCreateMessageBody' :: TemplateCreateMessageBody -> Maybe Text
arn} -> Maybe Text
arn) (\s :: TemplateCreateMessageBody
s@TemplateCreateMessageBody' {} Maybe Text
a -> TemplateCreateMessageBody
s {$sel:arn:TemplateCreateMessageBody' :: Maybe Text
arn = Maybe Text
a} :: TemplateCreateMessageBody)
templateCreateMessageBody_message :: Lens.Lens' TemplateCreateMessageBody (Prelude.Maybe Prelude.Text)
templateCreateMessageBody_message :: Lens' TemplateCreateMessageBody (Maybe Text)
templateCreateMessageBody_message = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TemplateCreateMessageBody' {Maybe Text
message :: Maybe Text
$sel:message:TemplateCreateMessageBody' :: TemplateCreateMessageBody -> Maybe Text
message} -> Maybe Text
message) (\s :: TemplateCreateMessageBody
s@TemplateCreateMessageBody' {} Maybe Text
a -> TemplateCreateMessageBody
s {$sel:message:TemplateCreateMessageBody' :: Maybe Text
message = Maybe Text
a} :: TemplateCreateMessageBody)
templateCreateMessageBody_requestID :: Lens.Lens' TemplateCreateMessageBody (Prelude.Maybe Prelude.Text)
templateCreateMessageBody_requestID :: Lens' TemplateCreateMessageBody (Maybe Text)
templateCreateMessageBody_requestID = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TemplateCreateMessageBody' {Maybe Text
requestID :: Maybe Text
$sel:requestID:TemplateCreateMessageBody' :: TemplateCreateMessageBody -> Maybe Text
requestID} -> Maybe Text
requestID) (\s :: TemplateCreateMessageBody
s@TemplateCreateMessageBody' {} Maybe Text
a -> TemplateCreateMessageBody
s {$sel:requestID:TemplateCreateMessageBody' :: Maybe Text
requestID = Maybe Text
a} :: TemplateCreateMessageBody)
instance Data.FromJSON TemplateCreateMessageBody where
parseJSON :: Value -> Parser TemplateCreateMessageBody
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"TemplateCreateMessageBody"
( \Object
x ->
Maybe Text -> Maybe Text -> Maybe Text -> TemplateCreateMessageBody
TemplateCreateMessageBody'
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
"Arn")
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
"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
"RequestID")
)
instance Prelude.Hashable TemplateCreateMessageBody where
hashWithSalt :: Int -> TemplateCreateMessageBody -> Int
hashWithSalt Int
_salt TemplateCreateMessageBody' {Maybe Text
requestID :: Maybe Text
message :: Maybe Text
arn :: Maybe Text
$sel:requestID:TemplateCreateMessageBody' :: TemplateCreateMessageBody -> Maybe Text
$sel:message:TemplateCreateMessageBody' :: TemplateCreateMessageBody -> Maybe Text
$sel:arn:TemplateCreateMessageBody' :: TemplateCreateMessageBody -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
arn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
message
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
requestID
instance Prelude.NFData TemplateCreateMessageBody where
rnf :: TemplateCreateMessageBody -> ()
rnf TemplateCreateMessageBody' {Maybe Text
requestID :: Maybe Text
message :: Maybe Text
arn :: Maybe Text
$sel:requestID:TemplateCreateMessageBody' :: TemplateCreateMessageBody -> Maybe Text
$sel:message:TemplateCreateMessageBody' :: TemplateCreateMessageBody -> Maybe Text
$sel:arn:TemplateCreateMessageBody' :: TemplateCreateMessageBody -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
arn
seq :: forall a b. a -> b -> b
`Prelude.seq` 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
requestID