{-# 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.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data TemplateCreateMessageBody = TemplateCreateMessageBody'
{
TemplateCreateMessageBody -> Maybe Text
requestID :: Prelude.Maybe Prelude.Text,
TemplateCreateMessageBody -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
TemplateCreateMessageBody -> Maybe Text
message :: Prelude.Maybe Prelude.Text
}
deriving (TemplateCreateMessageBody -> TemplateCreateMessageBody -> Bool
(TemplateCreateMessageBody -> TemplateCreateMessageBody -> Bool)
-> (TemplateCreateMessageBody -> TemplateCreateMessageBody -> Bool)
-> Eq TemplateCreateMessageBody
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]
(Int -> ReadS TemplateCreateMessageBody)
-> ReadS [TemplateCreateMessageBody]
-> ReadPrec TemplateCreateMessageBody
-> ReadPrec [TemplateCreateMessageBody]
-> Read 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
(Int -> TemplateCreateMessageBody -> ShowS)
-> (TemplateCreateMessageBody -> String)
-> ([TemplateCreateMessageBody] -> ShowS)
-> Show TemplateCreateMessageBody
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.
TemplateCreateMessageBody -> Rep TemplateCreateMessageBody x)
-> (forall x.
Rep TemplateCreateMessageBody x -> TemplateCreateMessageBody)
-> Generic TemplateCreateMessageBody
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' :: Maybe Text -> Maybe Text -> Maybe Text -> TemplateCreateMessageBody
TemplateCreateMessageBody'
{ $sel:requestID:TemplateCreateMessageBody' :: Maybe Text
requestID =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:arn:TemplateCreateMessageBody' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:message:TemplateCreateMessageBody' :: Maybe Text
message = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
templateCreateMessageBody_requestID :: Lens.Lens' TemplateCreateMessageBody (Prelude.Maybe Prelude.Text)
templateCreateMessageBody_requestID :: (Maybe Text -> f (Maybe Text))
-> TemplateCreateMessageBody -> f TemplateCreateMessageBody
templateCreateMessageBody_requestID = (TemplateCreateMessageBody -> Maybe Text)
-> (TemplateCreateMessageBody
-> Maybe Text -> TemplateCreateMessageBody)
-> Lens
TemplateCreateMessageBody
TemplateCreateMessageBody
(Maybe Text)
(Maybe Text)
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)
templateCreateMessageBody_arn :: Lens.Lens' TemplateCreateMessageBody (Prelude.Maybe Prelude.Text)
templateCreateMessageBody_arn :: (Maybe Text -> f (Maybe Text))
-> TemplateCreateMessageBody -> f TemplateCreateMessageBody
templateCreateMessageBody_arn = (TemplateCreateMessageBody -> Maybe Text)
-> (TemplateCreateMessageBody
-> Maybe Text -> TemplateCreateMessageBody)
-> Lens
TemplateCreateMessageBody
TemplateCreateMessageBody
(Maybe Text)
(Maybe Text)
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 :: (Maybe Text -> f (Maybe Text))
-> TemplateCreateMessageBody -> f TemplateCreateMessageBody
templateCreateMessageBody_message = (TemplateCreateMessageBody -> Maybe Text)
-> (TemplateCreateMessageBody
-> Maybe Text -> TemplateCreateMessageBody)
-> Lens
TemplateCreateMessageBody
TemplateCreateMessageBody
(Maybe Text)
(Maybe Text)
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)
instance Core.FromJSON TemplateCreateMessageBody where
parseJSON :: Value -> Parser TemplateCreateMessageBody
parseJSON =
String
-> (Object -> Parser TemplateCreateMessageBody)
-> Value
-> Parser TemplateCreateMessageBody
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"TemplateCreateMessageBody"
( \Object
x ->
Maybe Text -> Maybe Text -> Maybe Text -> TemplateCreateMessageBody
TemplateCreateMessageBody'
(Maybe Text
-> Maybe Text -> Maybe Text -> TemplateCreateMessageBody)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> TemplateCreateMessageBody)
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 -> TemplateCreateMessageBody)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> TemplateCreateMessageBody)
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
"Arn")
Parser (Maybe Text -> TemplateCreateMessageBody)
-> Parser (Maybe Text) -> Parser TemplateCreateMessageBody
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")
)
instance Prelude.Hashable TemplateCreateMessageBody
instance Prelude.NFData TemplateCreateMessageBody