{-# 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.Message where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.Pinpoint.Types.Action
import qualified Amazonka.Prelude as Prelude
data Message = Message'
{
Message -> Maybe Bool
silentPush :: Prelude.Maybe Prelude.Bool,
Message -> Maybe Text
imageIconUrl :: Prelude.Maybe Prelude.Text,
Message -> Maybe Text
rawContent :: Prelude.Maybe Prelude.Text,
Message -> Maybe Text
body :: Prelude.Maybe Prelude.Text,
Message -> Maybe Int
timeToLive :: Prelude.Maybe Prelude.Int,
Message -> Maybe Text
imageSmallIconUrl :: Prelude.Maybe Prelude.Text,
Message -> Maybe Text
jsonBody :: Prelude.Maybe Prelude.Text,
Message -> Maybe Text
url :: Prelude.Maybe Prelude.Text,
Message -> Maybe Action
action :: Prelude.Maybe Action,
Message -> Maybe Text
imageUrl :: Prelude.Maybe Prelude.Text,
Message -> Maybe Text
mediaUrl :: Prelude.Maybe Prelude.Text,
Message -> Maybe Text
title :: Prelude.Maybe Prelude.Text
}
deriving (Message -> Message -> Bool
(Message -> Message -> Bool)
-> (Message -> Message -> Bool) -> Eq Message
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Message -> Message -> Bool
$c/= :: Message -> Message -> Bool
== :: Message -> Message -> Bool
$c== :: Message -> Message -> Bool
Prelude.Eq, ReadPrec [Message]
ReadPrec Message
Int -> ReadS Message
ReadS [Message]
(Int -> ReadS Message)
-> ReadS [Message]
-> ReadPrec Message
-> ReadPrec [Message]
-> Read Message
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Message]
$creadListPrec :: ReadPrec [Message]
readPrec :: ReadPrec Message
$creadPrec :: ReadPrec Message
readList :: ReadS [Message]
$creadList :: ReadS [Message]
readsPrec :: Int -> ReadS Message
$creadsPrec :: Int -> ReadS Message
Prelude.Read, Int -> Message -> ShowS
[Message] -> ShowS
Message -> String
(Int -> Message -> ShowS)
-> (Message -> String) -> ([Message] -> ShowS) -> Show Message
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Message] -> ShowS
$cshowList :: [Message] -> ShowS
show :: Message -> String
$cshow :: Message -> String
showsPrec :: Int -> Message -> ShowS
$cshowsPrec :: Int -> Message -> ShowS
Prelude.Show, (forall x. Message -> Rep Message x)
-> (forall x. Rep Message x -> Message) -> Generic Message
forall x. Rep Message x -> Message
forall x. Message -> Rep Message x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Message x -> Message
$cfrom :: forall x. Message -> Rep Message x
Prelude.Generic)
newMessage ::
Message
newMessage :: Message
newMessage =
Message' :: Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Action
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Message
Message'
{ $sel:silentPush:Message' :: Maybe Bool
silentPush = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:imageIconUrl:Message' :: Maybe Text
imageIconUrl = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:rawContent:Message' :: Maybe Text
rawContent = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:body:Message' :: Maybe Text
body = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:timeToLive:Message' :: Maybe Int
timeToLive = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:imageSmallIconUrl:Message' :: Maybe Text
imageSmallIconUrl = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:jsonBody:Message' :: Maybe Text
jsonBody = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:url:Message' :: Maybe Text
url = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:action:Message' :: Maybe Action
action = Maybe Action
forall a. Maybe a
Prelude.Nothing,
$sel:imageUrl:Message' :: Maybe Text
imageUrl = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:mediaUrl:Message' :: Maybe Text
mediaUrl = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:title:Message' :: Maybe Text
title = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
message_silentPush :: Lens.Lens' Message (Prelude.Maybe Prelude.Bool)
message_silentPush :: (Maybe Bool -> f (Maybe Bool)) -> Message -> f Message
message_silentPush = (Message -> Maybe Bool)
-> (Message -> Maybe Bool -> Message)
-> Lens Message Message (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Message' {Maybe Bool
silentPush :: Maybe Bool
$sel:silentPush:Message' :: Message -> Maybe Bool
silentPush} -> Maybe Bool
silentPush) (\s :: Message
s@Message' {} Maybe Bool
a -> Message
s {$sel:silentPush:Message' :: Maybe Bool
silentPush = Maybe Bool
a} :: Message)
message_imageIconUrl :: Lens.Lens' Message (Prelude.Maybe Prelude.Text)
message_imageIconUrl :: (Maybe Text -> f (Maybe Text)) -> Message -> f Message
message_imageIconUrl = (Message -> Maybe Text)
-> (Message -> Maybe Text -> Message)
-> Lens Message Message (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Message' {Maybe Text
imageIconUrl :: Maybe Text
$sel:imageIconUrl:Message' :: Message -> Maybe Text
imageIconUrl} -> Maybe Text
imageIconUrl) (\s :: Message
s@Message' {} Maybe Text
a -> Message
s {$sel:imageIconUrl:Message' :: Maybe Text
imageIconUrl = Maybe Text
a} :: Message)
message_rawContent :: Lens.Lens' Message (Prelude.Maybe Prelude.Text)
message_rawContent :: (Maybe Text -> f (Maybe Text)) -> Message -> f Message
message_rawContent = (Message -> Maybe Text)
-> (Message -> Maybe Text -> Message)
-> Lens Message Message (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Message' {Maybe Text
rawContent :: Maybe Text
$sel:rawContent:Message' :: Message -> Maybe Text
rawContent} -> Maybe Text
rawContent) (\s :: Message
s@Message' {} Maybe Text
a -> Message
s {$sel:rawContent:Message' :: Maybe Text
rawContent = Maybe Text
a} :: Message)
message_body :: Lens.Lens' Message (Prelude.Maybe Prelude.Text)
message_body :: (Maybe Text -> f (Maybe Text)) -> Message -> f Message
message_body = (Message -> Maybe Text)
-> (Message -> Maybe Text -> Message)
-> Lens Message Message (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Message' {Maybe Text
body :: Maybe Text
$sel:body:Message' :: Message -> Maybe Text
body} -> Maybe Text
body) (\s :: Message
s@Message' {} Maybe Text
a -> Message
s {$sel:body:Message' :: Maybe Text
body = Maybe Text
a} :: Message)
message_timeToLive :: Lens.Lens' Message (Prelude.Maybe Prelude.Int)
message_timeToLive :: (Maybe Int -> f (Maybe Int)) -> Message -> f Message
message_timeToLive = (Message -> Maybe Int)
-> (Message -> Maybe Int -> Message)
-> Lens Message Message (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Message' {Maybe Int
timeToLive :: Maybe Int
$sel:timeToLive:Message' :: Message -> Maybe Int
timeToLive} -> Maybe Int
timeToLive) (\s :: Message
s@Message' {} Maybe Int
a -> Message
s {$sel:timeToLive:Message' :: Maybe Int
timeToLive = Maybe Int
a} :: Message)
message_imageSmallIconUrl :: Lens.Lens' Message (Prelude.Maybe Prelude.Text)
message_imageSmallIconUrl :: (Maybe Text -> f (Maybe Text)) -> Message -> f Message
message_imageSmallIconUrl = (Message -> Maybe Text)
-> (Message -> Maybe Text -> Message)
-> Lens Message Message (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Message' {Maybe Text
imageSmallIconUrl :: Maybe Text
$sel:imageSmallIconUrl:Message' :: Message -> Maybe Text
imageSmallIconUrl} -> Maybe Text
imageSmallIconUrl) (\s :: Message
s@Message' {} Maybe Text
a -> Message
s {$sel:imageSmallIconUrl:Message' :: Maybe Text
imageSmallIconUrl = Maybe Text
a} :: Message)
message_jsonBody :: Lens.Lens' Message (Prelude.Maybe Prelude.Text)
message_jsonBody :: (Maybe Text -> f (Maybe Text)) -> Message -> f Message
message_jsonBody = (Message -> Maybe Text)
-> (Message -> Maybe Text -> Message)
-> Lens Message Message (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Message' {Maybe Text
jsonBody :: Maybe Text
$sel:jsonBody:Message' :: Message -> Maybe Text
jsonBody} -> Maybe Text
jsonBody) (\s :: Message
s@Message' {} Maybe Text
a -> Message
s {$sel:jsonBody:Message' :: Maybe Text
jsonBody = Maybe Text
a} :: Message)
message_url :: Lens.Lens' Message (Prelude.Maybe Prelude.Text)
message_url :: (Maybe Text -> f (Maybe Text)) -> Message -> f Message
message_url = (Message -> Maybe Text)
-> (Message -> Maybe Text -> Message)
-> Lens Message Message (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Message' {Maybe Text
url :: Maybe Text
$sel:url:Message' :: Message -> Maybe Text
url} -> Maybe Text
url) (\s :: Message
s@Message' {} Maybe Text
a -> Message
s {$sel:url:Message' :: Maybe Text
url = Maybe Text
a} :: Message)
message_action :: Lens.Lens' Message (Prelude.Maybe Action)
message_action :: (Maybe Action -> f (Maybe Action)) -> Message -> f Message
message_action = (Message -> Maybe Action)
-> (Message -> Maybe Action -> Message)
-> Lens Message Message (Maybe Action) (Maybe Action)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Message' {Maybe Action
action :: Maybe Action
$sel:action:Message' :: Message -> Maybe Action
action} -> Maybe Action
action) (\s :: Message
s@Message' {} Maybe Action
a -> Message
s {$sel:action:Message' :: Maybe Action
action = Maybe Action
a} :: Message)
message_imageUrl :: Lens.Lens' Message (Prelude.Maybe Prelude.Text)
message_imageUrl :: (Maybe Text -> f (Maybe Text)) -> Message -> f Message
message_imageUrl = (Message -> Maybe Text)
-> (Message -> Maybe Text -> Message)
-> Lens Message Message (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Message' {Maybe Text
imageUrl :: Maybe Text
$sel:imageUrl:Message' :: Message -> Maybe Text
imageUrl} -> Maybe Text
imageUrl) (\s :: Message
s@Message' {} Maybe Text
a -> Message
s {$sel:imageUrl:Message' :: Maybe Text
imageUrl = Maybe Text
a} :: Message)
message_mediaUrl :: Lens.Lens' Message (Prelude.Maybe Prelude.Text)
message_mediaUrl :: (Maybe Text -> f (Maybe Text)) -> Message -> f Message
message_mediaUrl = (Message -> Maybe Text)
-> (Message -> Maybe Text -> Message)
-> Lens Message Message (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Message' {Maybe Text
mediaUrl :: Maybe Text
$sel:mediaUrl:Message' :: Message -> Maybe Text
mediaUrl} -> Maybe Text
mediaUrl) (\s :: Message
s@Message' {} Maybe Text
a -> Message
s {$sel:mediaUrl:Message' :: Maybe Text
mediaUrl = Maybe Text
a} :: Message)
message_title :: Lens.Lens' Message (Prelude.Maybe Prelude.Text)
message_title :: (Maybe Text -> f (Maybe Text)) -> Message -> f Message
message_title = (Message -> Maybe Text)
-> (Message -> Maybe Text -> Message)
-> Lens Message Message (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Message' {Maybe Text
title :: Maybe Text
$sel:title:Message' :: Message -> Maybe Text
title} -> Maybe Text
title) (\s :: Message
s@Message' {} Maybe Text
a -> Message
s {$sel:title:Message' :: Maybe Text
title = Maybe Text
a} :: Message)
instance Core.FromJSON Message where
parseJSON :: Value -> Parser Message
parseJSON =
String -> (Object -> Parser Message) -> Value -> Parser Message
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"Message"
( \Object
x ->
Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Action
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Message
Message'
(Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Action
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Message)
-> Parser (Maybe Bool)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Action
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Message)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"SilentPush")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Action
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Message)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Action
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Message)
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
"ImageIconUrl")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Action
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Message)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Action
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Message)
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
"RawContent")
Parser
(Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Action
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Message)
-> Parser (Maybe Text)
-> Parser
(Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Action
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Message)
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
"Body")
Parser
(Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Action
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Message)
-> Parser (Maybe Int)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Action
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Message)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"TimeToLive")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Action
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Message)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Action
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Message)
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
"ImageSmallIconUrl")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Action
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Message)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Action
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Message)
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
"JsonBody")
Parser
(Maybe Text
-> Maybe Action
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Message)
-> Parser (Maybe Text)
-> Parser
(Maybe Action -> Maybe Text -> Maybe Text -> Maybe Text -> Message)
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
"Url")
Parser
(Maybe Action -> Maybe Text -> Maybe Text -> Maybe Text -> Message)
-> Parser (Maybe Action)
-> Parser (Maybe Text -> Maybe Text -> Maybe Text -> Message)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Action)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Action")
Parser (Maybe Text -> Maybe Text -> Maybe Text -> Message)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> Message)
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
"ImageUrl")
Parser (Maybe Text -> Maybe Text -> Message)
-> Parser (Maybe Text) -> Parser (Maybe Text -> Message)
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
"MediaUrl")
Parser (Maybe Text -> Message)
-> Parser (Maybe Text) -> Parser Message
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
"Title")
)
instance Prelude.Hashable Message
instance Prelude.NFData Message
instance Core.ToJSON Message where
toJSON :: Message -> Value
toJSON Message' {Maybe Bool
Maybe Int
Maybe Text
Maybe Action
title :: Maybe Text
mediaUrl :: Maybe Text
imageUrl :: Maybe Text
action :: Maybe Action
url :: Maybe Text
jsonBody :: Maybe Text
imageSmallIconUrl :: Maybe Text
timeToLive :: Maybe Int
body :: Maybe Text
rawContent :: Maybe Text
imageIconUrl :: Maybe Text
silentPush :: Maybe Bool
$sel:title:Message' :: Message -> Maybe Text
$sel:mediaUrl:Message' :: Message -> Maybe Text
$sel:imageUrl:Message' :: Message -> Maybe Text
$sel:action:Message' :: Message -> Maybe Action
$sel:url:Message' :: Message -> Maybe Text
$sel:jsonBody:Message' :: Message -> Maybe Text
$sel:imageSmallIconUrl:Message' :: Message -> Maybe Text
$sel:timeToLive:Message' :: Message -> Maybe Int
$sel:body:Message' :: Message -> Maybe Text
$sel:rawContent:Message' :: Message -> Maybe Text
$sel:imageIconUrl:Message' :: Message -> Maybe Text
$sel:silentPush:Message' :: Message -> Maybe Bool
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"SilentPush" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
silentPush,
(Text
"ImageIconUrl" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
imageIconUrl,
(Text
"RawContent" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
rawContent,
(Text
"Body" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
body,
(Text
"TimeToLive" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Int -> Pair) -> Maybe Int -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
timeToLive,
(Text
"ImageSmallIconUrl" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
imageSmallIconUrl,
(Text
"JsonBody" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
jsonBody,
(Text
"Url" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
url,
(Text
"Action" Text -> Action -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Action -> Pair) -> Maybe Action -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Action
action,
(Text
"ImageUrl" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
imageUrl,
(Text
"MediaUrl" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
mediaUrl,
(Text
"Title" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
title
]
)