{-# 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.BaiduMessage where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.Pinpoint.Types.Action
import qualified Amazonka.Prelude as Prelude
data BaiduMessage = BaiduMessage'
{
BaiduMessage -> Maybe Action
action :: Prelude.Maybe Action,
BaiduMessage -> Maybe Text
body :: Prelude.Maybe Prelude.Text,
BaiduMessage -> Maybe (HashMap Text Text)
data' :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
BaiduMessage -> Maybe Text
iconReference :: Prelude.Maybe Prelude.Text,
BaiduMessage -> Maybe Text
imageIconUrl :: Prelude.Maybe Prelude.Text,
BaiduMessage -> Maybe Text
imageUrl :: Prelude.Maybe Prelude.Text,
BaiduMessage -> Maybe Text
rawContent :: Prelude.Maybe Prelude.Text,
BaiduMessage -> Maybe Bool
silentPush :: Prelude.Maybe Prelude.Bool,
BaiduMessage -> Maybe Text
smallImageIconUrl :: Prelude.Maybe Prelude.Text,
BaiduMessage -> Maybe Text
sound :: Prelude.Maybe Prelude.Text,
BaiduMessage -> Maybe (HashMap Text [Text])
substitutions :: Prelude.Maybe (Prelude.HashMap Prelude.Text [Prelude.Text]),
BaiduMessage -> Maybe Int
timeToLive :: Prelude.Maybe Prelude.Int,
BaiduMessage -> Maybe Text
title :: Prelude.Maybe Prelude.Text,
BaiduMessage -> Maybe Text
url :: Prelude.Maybe Prelude.Text
}
deriving (BaiduMessage -> BaiduMessage -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BaiduMessage -> BaiduMessage -> Bool
$c/= :: BaiduMessage -> BaiduMessage -> Bool
== :: BaiduMessage -> BaiduMessage -> Bool
$c== :: BaiduMessage -> BaiduMessage -> Bool
Prelude.Eq, ReadPrec [BaiduMessage]
ReadPrec BaiduMessage
Int -> ReadS BaiduMessage
ReadS [BaiduMessage]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [BaiduMessage]
$creadListPrec :: ReadPrec [BaiduMessage]
readPrec :: ReadPrec BaiduMessage
$creadPrec :: ReadPrec BaiduMessage
readList :: ReadS [BaiduMessage]
$creadList :: ReadS [BaiduMessage]
readsPrec :: Int -> ReadS BaiduMessage
$creadsPrec :: Int -> ReadS BaiduMessage
Prelude.Read, Int -> BaiduMessage -> ShowS
[BaiduMessage] -> ShowS
BaiduMessage -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BaiduMessage] -> ShowS
$cshowList :: [BaiduMessage] -> ShowS
show :: BaiduMessage -> String
$cshow :: BaiduMessage -> String
showsPrec :: Int -> BaiduMessage -> ShowS
$cshowsPrec :: Int -> BaiduMessage -> ShowS
Prelude.Show, forall x. Rep BaiduMessage x -> BaiduMessage
forall x. BaiduMessage -> Rep BaiduMessage x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep BaiduMessage x -> BaiduMessage
$cfrom :: forall x. BaiduMessage -> Rep BaiduMessage x
Prelude.Generic)
newBaiduMessage ::
BaiduMessage
newBaiduMessage :: BaiduMessage
newBaiduMessage =
BaiduMessage'
{ $sel:action:BaiduMessage' :: Maybe Action
action = forall a. Maybe a
Prelude.Nothing,
$sel:body:BaiduMessage' :: Maybe Text
body = forall a. Maybe a
Prelude.Nothing,
$sel:data':BaiduMessage' :: Maybe (HashMap Text Text)
data' = forall a. Maybe a
Prelude.Nothing,
$sel:iconReference:BaiduMessage' :: Maybe Text
iconReference = forall a. Maybe a
Prelude.Nothing,
$sel:imageIconUrl:BaiduMessage' :: Maybe Text
imageIconUrl = forall a. Maybe a
Prelude.Nothing,
$sel:imageUrl:BaiduMessage' :: Maybe Text
imageUrl = forall a. Maybe a
Prelude.Nothing,
$sel:rawContent:BaiduMessage' :: Maybe Text
rawContent = forall a. Maybe a
Prelude.Nothing,
$sel:silentPush:BaiduMessage' :: Maybe Bool
silentPush = forall a. Maybe a
Prelude.Nothing,
$sel:smallImageIconUrl:BaiduMessage' :: Maybe Text
smallImageIconUrl = forall a. Maybe a
Prelude.Nothing,
$sel:sound:BaiduMessage' :: Maybe Text
sound = forall a. Maybe a
Prelude.Nothing,
$sel:substitutions:BaiduMessage' :: Maybe (HashMap Text [Text])
substitutions = forall a. Maybe a
Prelude.Nothing,
$sel:timeToLive:BaiduMessage' :: Maybe Int
timeToLive = forall a. Maybe a
Prelude.Nothing,
$sel:title:BaiduMessage' :: Maybe Text
title = forall a. Maybe a
Prelude.Nothing,
$sel:url:BaiduMessage' :: Maybe Text
url = forall a. Maybe a
Prelude.Nothing
}
baiduMessage_action :: Lens.Lens' BaiduMessage (Prelude.Maybe Action)
baiduMessage_action :: Lens' BaiduMessage (Maybe Action)
baiduMessage_action = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BaiduMessage' {Maybe Action
action :: Maybe Action
$sel:action:BaiduMessage' :: BaiduMessage -> Maybe Action
action} -> Maybe Action
action) (\s :: BaiduMessage
s@BaiduMessage' {} Maybe Action
a -> BaiduMessage
s {$sel:action:BaiduMessage' :: Maybe Action
action = Maybe Action
a} :: BaiduMessage)
baiduMessage_body :: Lens.Lens' BaiduMessage (Prelude.Maybe Prelude.Text)
baiduMessage_body :: Lens' BaiduMessage (Maybe Text)
baiduMessage_body = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BaiduMessage' {Maybe Text
body :: Maybe Text
$sel:body:BaiduMessage' :: BaiduMessage -> Maybe Text
body} -> Maybe Text
body) (\s :: BaiduMessage
s@BaiduMessage' {} Maybe Text
a -> BaiduMessage
s {$sel:body:BaiduMessage' :: Maybe Text
body = Maybe Text
a} :: BaiduMessage)
baiduMessage_data :: Lens.Lens' BaiduMessage (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
baiduMessage_data :: Lens' BaiduMessage (Maybe (HashMap Text Text))
baiduMessage_data = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BaiduMessage' {Maybe (HashMap Text Text)
data' :: Maybe (HashMap Text Text)
$sel:data':BaiduMessage' :: BaiduMessage -> Maybe (HashMap Text Text)
data'} -> Maybe (HashMap Text Text)
data') (\s :: BaiduMessage
s@BaiduMessage' {} Maybe (HashMap Text Text)
a -> BaiduMessage
s {$sel:data':BaiduMessage' :: Maybe (HashMap Text Text)
data' = Maybe (HashMap Text Text)
a} :: BaiduMessage) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
baiduMessage_iconReference :: Lens.Lens' BaiduMessage (Prelude.Maybe Prelude.Text)
baiduMessage_iconReference :: Lens' BaiduMessage (Maybe Text)
baiduMessage_iconReference = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BaiduMessage' {Maybe Text
iconReference :: Maybe Text
$sel:iconReference:BaiduMessage' :: BaiduMessage -> Maybe Text
iconReference} -> Maybe Text
iconReference) (\s :: BaiduMessage
s@BaiduMessage' {} Maybe Text
a -> BaiduMessage
s {$sel:iconReference:BaiduMessage' :: Maybe Text
iconReference = Maybe Text
a} :: BaiduMessage)
baiduMessage_imageIconUrl :: Lens.Lens' BaiduMessage (Prelude.Maybe Prelude.Text)
baiduMessage_imageIconUrl :: Lens' BaiduMessage (Maybe Text)
baiduMessage_imageIconUrl = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BaiduMessage' {Maybe Text
imageIconUrl :: Maybe Text
$sel:imageIconUrl:BaiduMessage' :: BaiduMessage -> Maybe Text
imageIconUrl} -> Maybe Text
imageIconUrl) (\s :: BaiduMessage
s@BaiduMessage' {} Maybe Text
a -> BaiduMessage
s {$sel:imageIconUrl:BaiduMessage' :: Maybe Text
imageIconUrl = Maybe Text
a} :: BaiduMessage)
baiduMessage_imageUrl :: Lens.Lens' BaiduMessage (Prelude.Maybe Prelude.Text)
baiduMessage_imageUrl :: Lens' BaiduMessage (Maybe Text)
baiduMessage_imageUrl = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BaiduMessage' {Maybe Text
imageUrl :: Maybe Text
$sel:imageUrl:BaiduMessage' :: BaiduMessage -> Maybe Text
imageUrl} -> Maybe Text
imageUrl) (\s :: BaiduMessage
s@BaiduMessage' {} Maybe Text
a -> BaiduMessage
s {$sel:imageUrl:BaiduMessage' :: Maybe Text
imageUrl = Maybe Text
a} :: BaiduMessage)
baiduMessage_rawContent :: Lens.Lens' BaiduMessage (Prelude.Maybe Prelude.Text)
baiduMessage_rawContent :: Lens' BaiduMessage (Maybe Text)
baiduMessage_rawContent = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BaiduMessage' {Maybe Text
rawContent :: Maybe Text
$sel:rawContent:BaiduMessage' :: BaiduMessage -> Maybe Text
rawContent} -> Maybe Text
rawContent) (\s :: BaiduMessage
s@BaiduMessage' {} Maybe Text
a -> BaiduMessage
s {$sel:rawContent:BaiduMessage' :: Maybe Text
rawContent = Maybe Text
a} :: BaiduMessage)
baiduMessage_silentPush :: Lens.Lens' BaiduMessage (Prelude.Maybe Prelude.Bool)
baiduMessage_silentPush :: Lens' BaiduMessage (Maybe Bool)
baiduMessage_silentPush = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BaiduMessage' {Maybe Bool
silentPush :: Maybe Bool
$sel:silentPush:BaiduMessage' :: BaiduMessage -> Maybe Bool
silentPush} -> Maybe Bool
silentPush) (\s :: BaiduMessage
s@BaiduMessage' {} Maybe Bool
a -> BaiduMessage
s {$sel:silentPush:BaiduMessage' :: Maybe Bool
silentPush = Maybe Bool
a} :: BaiduMessage)
baiduMessage_smallImageIconUrl :: Lens.Lens' BaiduMessage (Prelude.Maybe Prelude.Text)
baiduMessage_smallImageIconUrl :: Lens' BaiduMessage (Maybe Text)
baiduMessage_smallImageIconUrl = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BaiduMessage' {Maybe Text
smallImageIconUrl :: Maybe Text
$sel:smallImageIconUrl:BaiduMessage' :: BaiduMessage -> Maybe Text
smallImageIconUrl} -> Maybe Text
smallImageIconUrl) (\s :: BaiduMessage
s@BaiduMessage' {} Maybe Text
a -> BaiduMessage
s {$sel:smallImageIconUrl:BaiduMessage' :: Maybe Text
smallImageIconUrl = Maybe Text
a} :: BaiduMessage)
baiduMessage_sound :: Lens.Lens' BaiduMessage (Prelude.Maybe Prelude.Text)
baiduMessage_sound :: Lens' BaiduMessage (Maybe Text)
baiduMessage_sound = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BaiduMessage' {Maybe Text
sound :: Maybe Text
$sel:sound:BaiduMessage' :: BaiduMessage -> Maybe Text
sound} -> Maybe Text
sound) (\s :: BaiduMessage
s@BaiduMessage' {} Maybe Text
a -> BaiduMessage
s {$sel:sound:BaiduMessage' :: Maybe Text
sound = Maybe Text
a} :: BaiduMessage)
baiduMessage_substitutions :: Lens.Lens' BaiduMessage (Prelude.Maybe (Prelude.HashMap Prelude.Text [Prelude.Text]))
baiduMessage_substitutions :: Lens' BaiduMessage (Maybe (HashMap Text [Text]))
baiduMessage_substitutions = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BaiduMessage' {Maybe (HashMap Text [Text])
substitutions :: Maybe (HashMap Text [Text])
$sel:substitutions:BaiduMessage' :: BaiduMessage -> Maybe (HashMap Text [Text])
substitutions} -> Maybe (HashMap Text [Text])
substitutions) (\s :: BaiduMessage
s@BaiduMessage' {} Maybe (HashMap Text [Text])
a -> BaiduMessage
s {$sel:substitutions:BaiduMessage' :: Maybe (HashMap Text [Text])
substitutions = Maybe (HashMap Text [Text])
a} :: BaiduMessage) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
baiduMessage_timeToLive :: Lens.Lens' BaiduMessage (Prelude.Maybe Prelude.Int)
baiduMessage_timeToLive :: Lens' BaiduMessage (Maybe Int)
baiduMessage_timeToLive = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BaiduMessage' {Maybe Int
timeToLive :: Maybe Int
$sel:timeToLive:BaiduMessage' :: BaiduMessage -> Maybe Int
timeToLive} -> Maybe Int
timeToLive) (\s :: BaiduMessage
s@BaiduMessage' {} Maybe Int
a -> BaiduMessage
s {$sel:timeToLive:BaiduMessage' :: Maybe Int
timeToLive = Maybe Int
a} :: BaiduMessage)
baiduMessage_title :: Lens.Lens' BaiduMessage (Prelude.Maybe Prelude.Text)
baiduMessage_title :: Lens' BaiduMessage (Maybe Text)
baiduMessage_title = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BaiduMessage' {Maybe Text
title :: Maybe Text
$sel:title:BaiduMessage' :: BaiduMessage -> Maybe Text
title} -> Maybe Text
title) (\s :: BaiduMessage
s@BaiduMessage' {} Maybe Text
a -> BaiduMessage
s {$sel:title:BaiduMessage' :: Maybe Text
title = Maybe Text
a} :: BaiduMessage)
baiduMessage_url :: Lens.Lens' BaiduMessage (Prelude.Maybe Prelude.Text)
baiduMessage_url :: Lens' BaiduMessage (Maybe Text)
baiduMessage_url = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BaiduMessage' {Maybe Text
url :: Maybe Text
$sel:url:BaiduMessage' :: BaiduMessage -> Maybe Text
url} -> Maybe Text
url) (\s :: BaiduMessage
s@BaiduMessage' {} Maybe Text
a -> BaiduMessage
s {$sel:url:BaiduMessage' :: Maybe Text
url = Maybe Text
a} :: BaiduMessage)
instance Prelude.Hashable BaiduMessage where
hashWithSalt :: Int -> BaiduMessage -> Int
hashWithSalt Int
_salt BaiduMessage' {Maybe Bool
Maybe Int
Maybe Text
Maybe (HashMap Text [Text])
Maybe (HashMap Text Text)
Maybe Action
url :: Maybe Text
title :: Maybe Text
timeToLive :: Maybe Int
substitutions :: Maybe (HashMap Text [Text])
sound :: Maybe Text
smallImageIconUrl :: Maybe Text
silentPush :: Maybe Bool
rawContent :: Maybe Text
imageUrl :: Maybe Text
imageIconUrl :: Maybe Text
iconReference :: Maybe Text
data' :: Maybe (HashMap Text Text)
body :: Maybe Text
action :: Maybe Action
$sel:url:BaiduMessage' :: BaiduMessage -> Maybe Text
$sel:title:BaiduMessage' :: BaiduMessage -> Maybe Text
$sel:timeToLive:BaiduMessage' :: BaiduMessage -> Maybe Int
$sel:substitutions:BaiduMessage' :: BaiduMessage -> Maybe (HashMap Text [Text])
$sel:sound:BaiduMessage' :: BaiduMessage -> Maybe Text
$sel:smallImageIconUrl:BaiduMessage' :: BaiduMessage -> Maybe Text
$sel:silentPush:BaiduMessage' :: BaiduMessage -> Maybe Bool
$sel:rawContent:BaiduMessage' :: BaiduMessage -> Maybe Text
$sel:imageUrl:BaiduMessage' :: BaiduMessage -> Maybe Text
$sel:imageIconUrl:BaiduMessage' :: BaiduMessage -> Maybe Text
$sel:iconReference:BaiduMessage' :: BaiduMessage -> Maybe Text
$sel:data':BaiduMessage' :: BaiduMessage -> Maybe (HashMap Text Text)
$sel:body:BaiduMessage' :: BaiduMessage -> Maybe Text
$sel:action:BaiduMessage' :: BaiduMessage -> Maybe Action
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Action
action
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
body
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (HashMap Text Text)
data'
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
iconReference
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
imageIconUrl
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
imageUrl
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
rawContent
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
silentPush
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
smallImageIconUrl
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
sound
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (HashMap Text [Text])
substitutions
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
timeToLive
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
title
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
url
instance Prelude.NFData BaiduMessage where
rnf :: BaiduMessage -> ()
rnf BaiduMessage' {Maybe Bool
Maybe Int
Maybe Text
Maybe (HashMap Text [Text])
Maybe (HashMap Text Text)
Maybe Action
url :: Maybe Text
title :: Maybe Text
timeToLive :: Maybe Int
substitutions :: Maybe (HashMap Text [Text])
sound :: Maybe Text
smallImageIconUrl :: Maybe Text
silentPush :: Maybe Bool
rawContent :: Maybe Text
imageUrl :: Maybe Text
imageIconUrl :: Maybe Text
iconReference :: Maybe Text
data' :: Maybe (HashMap Text Text)
body :: Maybe Text
action :: Maybe Action
$sel:url:BaiduMessage' :: BaiduMessage -> Maybe Text
$sel:title:BaiduMessage' :: BaiduMessage -> Maybe Text
$sel:timeToLive:BaiduMessage' :: BaiduMessage -> Maybe Int
$sel:substitutions:BaiduMessage' :: BaiduMessage -> Maybe (HashMap Text [Text])
$sel:sound:BaiduMessage' :: BaiduMessage -> Maybe Text
$sel:smallImageIconUrl:BaiduMessage' :: BaiduMessage -> Maybe Text
$sel:silentPush:BaiduMessage' :: BaiduMessage -> Maybe Bool
$sel:rawContent:BaiduMessage' :: BaiduMessage -> Maybe Text
$sel:imageUrl:BaiduMessage' :: BaiduMessage -> Maybe Text
$sel:imageIconUrl:BaiduMessage' :: BaiduMessage -> Maybe Text
$sel:iconReference:BaiduMessage' :: BaiduMessage -> Maybe Text
$sel:data':BaiduMessage' :: BaiduMessage -> Maybe (HashMap Text Text)
$sel:body:BaiduMessage' :: BaiduMessage -> Maybe Text
$sel:action:BaiduMessage' :: BaiduMessage -> Maybe Action
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Action
action
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
body
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text Text)
data'
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
iconReference
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
imageIconUrl
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
imageUrl
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
rawContent
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
silentPush
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
smallImageIconUrl
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
sound
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text [Text])
substitutions
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
timeToLive
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
title
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
url
instance Data.ToJSON BaiduMessage where
toJSON :: BaiduMessage -> Value
toJSON BaiduMessage' {Maybe Bool
Maybe Int
Maybe Text
Maybe (HashMap Text [Text])
Maybe (HashMap Text Text)
Maybe Action
url :: Maybe Text
title :: Maybe Text
timeToLive :: Maybe Int
substitutions :: Maybe (HashMap Text [Text])
sound :: Maybe Text
smallImageIconUrl :: Maybe Text
silentPush :: Maybe Bool
rawContent :: Maybe Text
imageUrl :: Maybe Text
imageIconUrl :: Maybe Text
iconReference :: Maybe Text
data' :: Maybe (HashMap Text Text)
body :: Maybe Text
action :: Maybe Action
$sel:url:BaiduMessage' :: BaiduMessage -> Maybe Text
$sel:title:BaiduMessage' :: BaiduMessage -> Maybe Text
$sel:timeToLive:BaiduMessage' :: BaiduMessage -> Maybe Int
$sel:substitutions:BaiduMessage' :: BaiduMessage -> Maybe (HashMap Text [Text])
$sel:sound:BaiduMessage' :: BaiduMessage -> Maybe Text
$sel:smallImageIconUrl:BaiduMessage' :: BaiduMessage -> Maybe Text
$sel:silentPush:BaiduMessage' :: BaiduMessage -> Maybe Bool
$sel:rawContent:BaiduMessage' :: BaiduMessage -> Maybe Text
$sel:imageUrl:BaiduMessage' :: BaiduMessage -> Maybe Text
$sel:imageIconUrl:BaiduMessage' :: BaiduMessage -> Maybe Text
$sel:iconReference:BaiduMessage' :: BaiduMessage -> Maybe Text
$sel:data':BaiduMessage' :: BaiduMessage -> Maybe (HashMap Text Text)
$sel:body:BaiduMessage' :: BaiduMessage -> Maybe Text
$sel:action:BaiduMessage' :: BaiduMessage -> Maybe Action
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"Action" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Action
action,
(Key
"Body" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
body,
(Key
"Data" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text Text)
data',
(Key
"IconReference" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
iconReference,
(Key
"ImageIconUrl" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
imageIconUrl,
(Key
"ImageUrl" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
imageUrl,
(Key
"RawContent" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
rawContent,
(Key
"SilentPush" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
silentPush,
(Key
"SmallImageIconUrl" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
smallImageIconUrl,
(Key
"Sound" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
sound,
(Key
"Substitutions" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text [Text])
substitutions,
(Key
"TimeToLive" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
timeToLive,
(Key
"Title" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
title,
(Key
"Url" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
url
]
)