{-# 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.GCMMessage 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 GCMMessage = GCMMessage'
{
GCMMessage -> Maybe (HashMap Text [Text])
substitutions :: Prelude.Maybe (Prelude.HashMap Prelude.Text [Prelude.Text]),
GCMMessage -> Maybe Bool
silentPush :: Prelude.Maybe Prelude.Bool,
GCMMessage -> Maybe Text
imageIconUrl :: Prelude.Maybe Prelude.Text,
GCMMessage -> Maybe Text
priority :: Prelude.Maybe Prelude.Text,
GCMMessage -> Maybe Text
rawContent :: Prelude.Maybe Prelude.Text,
GCMMessage -> Maybe (HashMap Text Text)
data' :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
GCMMessage -> Maybe Text
restrictedPackageName :: Prelude.Maybe Prelude.Text,
GCMMessage -> Maybe Text
smallImageIconUrl :: Prelude.Maybe Prelude.Text,
GCMMessage -> Maybe Text
body :: Prelude.Maybe Prelude.Text,
GCMMessage -> Maybe Int
timeToLive :: Prelude.Maybe Prelude.Int,
GCMMessage -> Maybe Text
url :: Prelude.Maybe Prelude.Text,
GCMMessage -> Maybe Text
sound :: Prelude.Maybe Prelude.Text,
GCMMessage -> Maybe Action
action :: Prelude.Maybe Action,
GCMMessage -> Maybe Text
collapseKey :: Prelude.Maybe Prelude.Text,
GCMMessage -> Maybe Text
imageUrl :: Prelude.Maybe Prelude.Text,
GCMMessage -> Maybe Text
title :: Prelude.Maybe Prelude.Text,
GCMMessage -> Maybe Text
iconReference :: Prelude.Maybe Prelude.Text
}
deriving (GCMMessage -> GCMMessage -> Bool
(GCMMessage -> GCMMessage -> Bool)
-> (GCMMessage -> GCMMessage -> Bool) -> Eq GCMMessage
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GCMMessage -> GCMMessage -> Bool
$c/= :: GCMMessage -> GCMMessage -> Bool
== :: GCMMessage -> GCMMessage -> Bool
$c== :: GCMMessage -> GCMMessage -> Bool
Prelude.Eq, ReadPrec [GCMMessage]
ReadPrec GCMMessage
Int -> ReadS GCMMessage
ReadS [GCMMessage]
(Int -> ReadS GCMMessage)
-> ReadS [GCMMessage]
-> ReadPrec GCMMessage
-> ReadPrec [GCMMessage]
-> Read GCMMessage
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GCMMessage]
$creadListPrec :: ReadPrec [GCMMessage]
readPrec :: ReadPrec GCMMessage
$creadPrec :: ReadPrec GCMMessage
readList :: ReadS [GCMMessage]
$creadList :: ReadS [GCMMessage]
readsPrec :: Int -> ReadS GCMMessage
$creadsPrec :: Int -> ReadS GCMMessage
Prelude.Read, Int -> GCMMessage -> ShowS
[GCMMessage] -> ShowS
GCMMessage -> String
(Int -> GCMMessage -> ShowS)
-> (GCMMessage -> String)
-> ([GCMMessage] -> ShowS)
-> Show GCMMessage
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GCMMessage] -> ShowS
$cshowList :: [GCMMessage] -> ShowS
show :: GCMMessage -> String
$cshow :: GCMMessage -> String
showsPrec :: Int -> GCMMessage -> ShowS
$cshowsPrec :: Int -> GCMMessage -> ShowS
Prelude.Show, (forall x. GCMMessage -> Rep GCMMessage x)
-> (forall x. Rep GCMMessage x -> GCMMessage) -> Generic GCMMessage
forall x. Rep GCMMessage x -> GCMMessage
forall x. GCMMessage -> Rep GCMMessage x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GCMMessage x -> GCMMessage
$cfrom :: forall x. GCMMessage -> Rep GCMMessage x
Prelude.Generic)
newGCMMessage ::
GCMMessage
newGCMMessage :: GCMMessage
newGCMMessage =
GCMMessage' :: Maybe (HashMap Text [Text])
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Action
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> GCMMessage
GCMMessage'
{ $sel:substitutions:GCMMessage' :: Maybe (HashMap Text [Text])
substitutions = Maybe (HashMap Text [Text])
forall a. Maybe a
Prelude.Nothing,
$sel:silentPush:GCMMessage' :: Maybe Bool
silentPush = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:imageIconUrl:GCMMessage' :: Maybe Text
imageIconUrl = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:priority:GCMMessage' :: Maybe Text
priority = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:rawContent:GCMMessage' :: Maybe Text
rawContent = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:data':GCMMessage' :: Maybe (HashMap Text Text)
data' = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
$sel:restrictedPackageName:GCMMessage' :: Maybe Text
restrictedPackageName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:smallImageIconUrl:GCMMessage' :: Maybe Text
smallImageIconUrl = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:body:GCMMessage' :: Maybe Text
body = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:timeToLive:GCMMessage' :: Maybe Int
timeToLive = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:url:GCMMessage' :: Maybe Text
url = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:sound:GCMMessage' :: Maybe Text
sound = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:action:GCMMessage' :: Maybe Action
action = Maybe Action
forall a. Maybe a
Prelude.Nothing,
$sel:collapseKey:GCMMessage' :: Maybe Text
collapseKey = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:imageUrl:GCMMessage' :: Maybe Text
imageUrl = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:title:GCMMessage' :: Maybe Text
title = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:iconReference:GCMMessage' :: Maybe Text
iconReference = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
gCMMessage_substitutions :: Lens.Lens' GCMMessage (Prelude.Maybe (Prelude.HashMap Prelude.Text [Prelude.Text]))
gCMMessage_substitutions :: (Maybe (HashMap Text [Text]) -> f (Maybe (HashMap Text [Text])))
-> GCMMessage -> f GCMMessage
gCMMessage_substitutions = (GCMMessage -> Maybe (HashMap Text [Text]))
-> (GCMMessage -> Maybe (HashMap Text [Text]) -> GCMMessage)
-> Lens
GCMMessage
GCMMessage
(Maybe (HashMap Text [Text]))
(Maybe (HashMap Text [Text]))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GCMMessage' {Maybe (HashMap Text [Text])
substitutions :: Maybe (HashMap Text [Text])
$sel:substitutions:GCMMessage' :: GCMMessage -> Maybe (HashMap Text [Text])
substitutions} -> Maybe (HashMap Text [Text])
substitutions) (\s :: GCMMessage
s@GCMMessage' {} Maybe (HashMap Text [Text])
a -> GCMMessage
s {$sel:substitutions:GCMMessage' :: Maybe (HashMap Text [Text])
substitutions = Maybe (HashMap Text [Text])
a} :: GCMMessage) ((Maybe (HashMap Text [Text]) -> f (Maybe (HashMap Text [Text])))
-> GCMMessage -> f GCMMessage)
-> ((Maybe (HashMap Text [Text])
-> f (Maybe (HashMap Text [Text])))
-> Maybe (HashMap Text [Text]) -> f (Maybe (HashMap Text [Text])))
-> (Maybe (HashMap Text [Text]) -> f (Maybe (HashMap Text [Text])))
-> GCMMessage
-> f GCMMessage
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(HashMap Text [Text])
(HashMap Text [Text])
(HashMap Text [Text])
(HashMap Text [Text])
-> Iso
(Maybe (HashMap Text [Text]))
(Maybe (HashMap Text [Text]))
(Maybe (HashMap Text [Text]))
(Maybe (HashMap Text [Text]))
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 AnIso
(HashMap Text [Text])
(HashMap Text [Text])
(HashMap Text [Text])
(HashMap Text [Text])
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
gCMMessage_silentPush :: Lens.Lens' GCMMessage (Prelude.Maybe Prelude.Bool)
gCMMessage_silentPush :: (Maybe Bool -> f (Maybe Bool)) -> GCMMessage -> f GCMMessage
gCMMessage_silentPush = (GCMMessage -> Maybe Bool)
-> (GCMMessage -> Maybe Bool -> GCMMessage)
-> Lens GCMMessage GCMMessage (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GCMMessage' {Maybe Bool
silentPush :: Maybe Bool
$sel:silentPush:GCMMessage' :: GCMMessage -> Maybe Bool
silentPush} -> Maybe Bool
silentPush) (\s :: GCMMessage
s@GCMMessage' {} Maybe Bool
a -> GCMMessage
s {$sel:silentPush:GCMMessage' :: Maybe Bool
silentPush = Maybe Bool
a} :: GCMMessage)
gCMMessage_imageIconUrl :: Lens.Lens' GCMMessage (Prelude.Maybe Prelude.Text)
gCMMessage_imageIconUrl :: (Maybe Text -> f (Maybe Text)) -> GCMMessage -> f GCMMessage
gCMMessage_imageIconUrl = (GCMMessage -> Maybe Text)
-> (GCMMessage -> Maybe Text -> GCMMessage)
-> Lens GCMMessage GCMMessage (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GCMMessage' {Maybe Text
imageIconUrl :: Maybe Text
$sel:imageIconUrl:GCMMessage' :: GCMMessage -> Maybe Text
imageIconUrl} -> Maybe Text
imageIconUrl) (\s :: GCMMessage
s@GCMMessage' {} Maybe Text
a -> GCMMessage
s {$sel:imageIconUrl:GCMMessage' :: Maybe Text
imageIconUrl = Maybe Text
a} :: GCMMessage)
gCMMessage_priority :: Lens.Lens' GCMMessage (Prelude.Maybe Prelude.Text)
gCMMessage_priority :: (Maybe Text -> f (Maybe Text)) -> GCMMessage -> f GCMMessage
gCMMessage_priority = (GCMMessage -> Maybe Text)
-> (GCMMessage -> Maybe Text -> GCMMessage)
-> Lens GCMMessage GCMMessage (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GCMMessage' {Maybe Text
priority :: Maybe Text
$sel:priority:GCMMessage' :: GCMMessage -> Maybe Text
priority} -> Maybe Text
priority) (\s :: GCMMessage
s@GCMMessage' {} Maybe Text
a -> GCMMessage
s {$sel:priority:GCMMessage' :: Maybe Text
priority = Maybe Text
a} :: GCMMessage)
gCMMessage_rawContent :: Lens.Lens' GCMMessage (Prelude.Maybe Prelude.Text)
gCMMessage_rawContent :: (Maybe Text -> f (Maybe Text)) -> GCMMessage -> f GCMMessage
gCMMessage_rawContent = (GCMMessage -> Maybe Text)
-> (GCMMessage -> Maybe Text -> GCMMessage)
-> Lens GCMMessage GCMMessage (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GCMMessage' {Maybe Text
rawContent :: Maybe Text
$sel:rawContent:GCMMessage' :: GCMMessage -> Maybe Text
rawContent} -> Maybe Text
rawContent) (\s :: GCMMessage
s@GCMMessage' {} Maybe Text
a -> GCMMessage
s {$sel:rawContent:GCMMessage' :: Maybe Text
rawContent = Maybe Text
a} :: GCMMessage)
gCMMessage_data :: Lens.Lens' GCMMessage (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
gCMMessage_data :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> GCMMessage -> f GCMMessage
gCMMessage_data = (GCMMessage -> Maybe (HashMap Text Text))
-> (GCMMessage -> Maybe (HashMap Text Text) -> GCMMessage)
-> Lens
GCMMessage
GCMMessage
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GCMMessage' {Maybe (HashMap Text Text)
data' :: Maybe (HashMap Text Text)
$sel:data':GCMMessage' :: GCMMessage -> Maybe (HashMap Text Text)
data'} -> Maybe (HashMap Text Text)
data') (\s :: GCMMessage
s@GCMMessage' {} Maybe (HashMap Text Text)
a -> GCMMessage
s {$sel:data':GCMMessage' :: Maybe (HashMap Text Text)
data' = Maybe (HashMap Text Text)
a} :: GCMMessage) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> GCMMessage -> f GCMMessage)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> GCMMessage
-> f GCMMessage
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
-> Iso
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
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 AnIso
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
gCMMessage_restrictedPackageName :: Lens.Lens' GCMMessage (Prelude.Maybe Prelude.Text)
gCMMessage_restrictedPackageName :: (Maybe Text -> f (Maybe Text)) -> GCMMessage -> f GCMMessage
gCMMessage_restrictedPackageName = (GCMMessage -> Maybe Text)
-> (GCMMessage -> Maybe Text -> GCMMessage)
-> Lens GCMMessage GCMMessage (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GCMMessage' {Maybe Text
restrictedPackageName :: Maybe Text
$sel:restrictedPackageName:GCMMessage' :: GCMMessage -> Maybe Text
restrictedPackageName} -> Maybe Text
restrictedPackageName) (\s :: GCMMessage
s@GCMMessage' {} Maybe Text
a -> GCMMessage
s {$sel:restrictedPackageName:GCMMessage' :: Maybe Text
restrictedPackageName = Maybe Text
a} :: GCMMessage)
gCMMessage_smallImageIconUrl :: Lens.Lens' GCMMessage (Prelude.Maybe Prelude.Text)
gCMMessage_smallImageIconUrl :: (Maybe Text -> f (Maybe Text)) -> GCMMessage -> f GCMMessage
gCMMessage_smallImageIconUrl = (GCMMessage -> Maybe Text)
-> (GCMMessage -> Maybe Text -> GCMMessage)
-> Lens GCMMessage GCMMessage (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GCMMessage' {Maybe Text
smallImageIconUrl :: Maybe Text
$sel:smallImageIconUrl:GCMMessage' :: GCMMessage -> Maybe Text
smallImageIconUrl} -> Maybe Text
smallImageIconUrl) (\s :: GCMMessage
s@GCMMessage' {} Maybe Text
a -> GCMMessage
s {$sel:smallImageIconUrl:GCMMessage' :: Maybe Text
smallImageIconUrl = Maybe Text
a} :: GCMMessage)
gCMMessage_body :: Lens.Lens' GCMMessage (Prelude.Maybe Prelude.Text)
gCMMessage_body :: (Maybe Text -> f (Maybe Text)) -> GCMMessage -> f GCMMessage
gCMMessage_body = (GCMMessage -> Maybe Text)
-> (GCMMessage -> Maybe Text -> GCMMessage)
-> Lens GCMMessage GCMMessage (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GCMMessage' {Maybe Text
body :: Maybe Text
$sel:body:GCMMessage' :: GCMMessage -> Maybe Text
body} -> Maybe Text
body) (\s :: GCMMessage
s@GCMMessage' {} Maybe Text
a -> GCMMessage
s {$sel:body:GCMMessage' :: Maybe Text
body = Maybe Text
a} :: GCMMessage)
gCMMessage_timeToLive :: Lens.Lens' GCMMessage (Prelude.Maybe Prelude.Int)
gCMMessage_timeToLive :: (Maybe Int -> f (Maybe Int)) -> GCMMessage -> f GCMMessage
gCMMessage_timeToLive = (GCMMessage -> Maybe Int)
-> (GCMMessage -> Maybe Int -> GCMMessage)
-> Lens GCMMessage GCMMessage (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GCMMessage' {Maybe Int
timeToLive :: Maybe Int
$sel:timeToLive:GCMMessage' :: GCMMessage -> Maybe Int
timeToLive} -> Maybe Int
timeToLive) (\s :: GCMMessage
s@GCMMessage' {} Maybe Int
a -> GCMMessage
s {$sel:timeToLive:GCMMessage' :: Maybe Int
timeToLive = Maybe Int
a} :: GCMMessage)
gCMMessage_url :: Lens.Lens' GCMMessage (Prelude.Maybe Prelude.Text)
gCMMessage_url :: (Maybe Text -> f (Maybe Text)) -> GCMMessage -> f GCMMessage
gCMMessage_url = (GCMMessage -> Maybe Text)
-> (GCMMessage -> Maybe Text -> GCMMessage)
-> Lens GCMMessage GCMMessage (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GCMMessage' {Maybe Text
url :: Maybe Text
$sel:url:GCMMessage' :: GCMMessage -> Maybe Text
url} -> Maybe Text
url) (\s :: GCMMessage
s@GCMMessage' {} Maybe Text
a -> GCMMessage
s {$sel:url:GCMMessage' :: Maybe Text
url = Maybe Text
a} :: GCMMessage)
gCMMessage_sound :: Lens.Lens' GCMMessage (Prelude.Maybe Prelude.Text)
gCMMessage_sound :: (Maybe Text -> f (Maybe Text)) -> GCMMessage -> f GCMMessage
gCMMessage_sound = (GCMMessage -> Maybe Text)
-> (GCMMessage -> Maybe Text -> GCMMessage)
-> Lens GCMMessage GCMMessage (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GCMMessage' {Maybe Text
sound :: Maybe Text
$sel:sound:GCMMessage' :: GCMMessage -> Maybe Text
sound} -> Maybe Text
sound) (\s :: GCMMessage
s@GCMMessage' {} Maybe Text
a -> GCMMessage
s {$sel:sound:GCMMessage' :: Maybe Text
sound = Maybe Text
a} :: GCMMessage)
gCMMessage_action :: Lens.Lens' GCMMessage (Prelude.Maybe Action)
gCMMessage_action :: (Maybe Action -> f (Maybe Action)) -> GCMMessage -> f GCMMessage
gCMMessage_action = (GCMMessage -> Maybe Action)
-> (GCMMessage -> Maybe Action -> GCMMessage)
-> Lens GCMMessage GCMMessage (Maybe Action) (Maybe Action)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GCMMessage' {Maybe Action
action :: Maybe Action
$sel:action:GCMMessage' :: GCMMessage -> Maybe Action
action} -> Maybe Action
action) (\s :: GCMMessage
s@GCMMessage' {} Maybe Action
a -> GCMMessage
s {$sel:action:GCMMessage' :: Maybe Action
action = Maybe Action
a} :: GCMMessage)
gCMMessage_collapseKey :: Lens.Lens' GCMMessage (Prelude.Maybe Prelude.Text)
gCMMessage_collapseKey :: (Maybe Text -> f (Maybe Text)) -> GCMMessage -> f GCMMessage
gCMMessage_collapseKey = (GCMMessage -> Maybe Text)
-> (GCMMessage -> Maybe Text -> GCMMessage)
-> Lens GCMMessage GCMMessage (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GCMMessage' {Maybe Text
collapseKey :: Maybe Text
$sel:collapseKey:GCMMessage' :: GCMMessage -> Maybe Text
collapseKey} -> Maybe Text
collapseKey) (\s :: GCMMessage
s@GCMMessage' {} Maybe Text
a -> GCMMessage
s {$sel:collapseKey:GCMMessage' :: Maybe Text
collapseKey = Maybe Text
a} :: GCMMessage)
gCMMessage_imageUrl :: Lens.Lens' GCMMessage (Prelude.Maybe Prelude.Text)
gCMMessage_imageUrl :: (Maybe Text -> f (Maybe Text)) -> GCMMessage -> f GCMMessage
gCMMessage_imageUrl = (GCMMessage -> Maybe Text)
-> (GCMMessage -> Maybe Text -> GCMMessage)
-> Lens GCMMessage GCMMessage (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GCMMessage' {Maybe Text
imageUrl :: Maybe Text
$sel:imageUrl:GCMMessage' :: GCMMessage -> Maybe Text
imageUrl} -> Maybe Text
imageUrl) (\s :: GCMMessage
s@GCMMessage' {} Maybe Text
a -> GCMMessage
s {$sel:imageUrl:GCMMessage' :: Maybe Text
imageUrl = Maybe Text
a} :: GCMMessage)
gCMMessage_title :: Lens.Lens' GCMMessage (Prelude.Maybe Prelude.Text)
gCMMessage_title :: (Maybe Text -> f (Maybe Text)) -> GCMMessage -> f GCMMessage
gCMMessage_title = (GCMMessage -> Maybe Text)
-> (GCMMessage -> Maybe Text -> GCMMessage)
-> Lens GCMMessage GCMMessage (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GCMMessage' {Maybe Text
title :: Maybe Text
$sel:title:GCMMessage' :: GCMMessage -> Maybe Text
title} -> Maybe Text
title) (\s :: GCMMessage
s@GCMMessage' {} Maybe Text
a -> GCMMessage
s {$sel:title:GCMMessage' :: Maybe Text
title = Maybe Text
a} :: GCMMessage)
gCMMessage_iconReference :: Lens.Lens' GCMMessage (Prelude.Maybe Prelude.Text)
gCMMessage_iconReference :: (Maybe Text -> f (Maybe Text)) -> GCMMessage -> f GCMMessage
gCMMessage_iconReference = (GCMMessage -> Maybe Text)
-> (GCMMessage -> Maybe Text -> GCMMessage)
-> Lens GCMMessage GCMMessage (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GCMMessage' {Maybe Text
iconReference :: Maybe Text
$sel:iconReference:GCMMessage' :: GCMMessage -> Maybe Text
iconReference} -> Maybe Text
iconReference) (\s :: GCMMessage
s@GCMMessage' {} Maybe Text
a -> GCMMessage
s {$sel:iconReference:GCMMessage' :: Maybe Text
iconReference = Maybe Text
a} :: GCMMessage)
instance Prelude.Hashable GCMMessage
instance Prelude.NFData GCMMessage
instance Core.ToJSON GCMMessage where
toJSON :: GCMMessage -> Value
toJSON GCMMessage' {Maybe Bool
Maybe Int
Maybe Text
Maybe (HashMap Text [Text])
Maybe (HashMap Text Text)
Maybe Action
iconReference :: Maybe Text
title :: Maybe Text
imageUrl :: Maybe Text
collapseKey :: Maybe Text
action :: Maybe Action
sound :: Maybe Text
url :: Maybe Text
timeToLive :: Maybe Int
body :: Maybe Text
smallImageIconUrl :: Maybe Text
restrictedPackageName :: Maybe Text
data' :: Maybe (HashMap Text Text)
rawContent :: Maybe Text
priority :: Maybe Text
imageIconUrl :: Maybe Text
silentPush :: Maybe Bool
substitutions :: Maybe (HashMap Text [Text])
$sel:iconReference:GCMMessage' :: GCMMessage -> Maybe Text
$sel:title:GCMMessage' :: GCMMessage -> Maybe Text
$sel:imageUrl:GCMMessage' :: GCMMessage -> Maybe Text
$sel:collapseKey:GCMMessage' :: GCMMessage -> Maybe Text
$sel:action:GCMMessage' :: GCMMessage -> Maybe Action
$sel:sound:GCMMessage' :: GCMMessage -> Maybe Text
$sel:url:GCMMessage' :: GCMMessage -> Maybe Text
$sel:timeToLive:GCMMessage' :: GCMMessage -> Maybe Int
$sel:body:GCMMessage' :: GCMMessage -> Maybe Text
$sel:smallImageIconUrl:GCMMessage' :: GCMMessage -> Maybe Text
$sel:restrictedPackageName:GCMMessage' :: GCMMessage -> Maybe Text
$sel:data':GCMMessage' :: GCMMessage -> Maybe (HashMap Text Text)
$sel:rawContent:GCMMessage' :: GCMMessage -> Maybe Text
$sel:priority:GCMMessage' :: GCMMessage -> Maybe Text
$sel:imageIconUrl:GCMMessage' :: GCMMessage -> Maybe Text
$sel:silentPush:GCMMessage' :: GCMMessage -> Maybe Bool
$sel:substitutions:GCMMessage' :: GCMMessage -> Maybe (HashMap Text [Text])
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"Substitutions" Text -> HashMap Text [Text] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (HashMap Text [Text] -> Pair)
-> Maybe (HashMap Text [Text]) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text [Text])
substitutions,
(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
"Priority" 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
priority,
(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
"Data" Text -> HashMap Text Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (HashMap Text Text -> Pair)
-> Maybe (HashMap Text Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text Text)
data',
(Text
"RestrictedPackageName" 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
restrictedPackageName,
(Text
"SmallImageIconUrl" 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
smallImageIconUrl,
(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
"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
"Sound" 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
sound,
(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
"CollapseKey" 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
collapseKey,
(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
"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,
(Text
"IconReference" 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
iconReference
]
)