{-# 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.APNSMessage 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 APNSMessage = APNSMessage'
{
APNSMessage -> Maybe (HashMap Text [Text])
substitutions :: Prelude.Maybe (Prelude.HashMap Prelude.Text [Prelude.Text]),
APNSMessage -> Maybe Bool
silentPush :: Prelude.Maybe Prelude.Bool,
APNSMessage -> Maybe Text
aPNSPushType :: Prelude.Maybe Prelude.Text,
APNSMessage -> Maybe Text
priority :: Prelude.Maybe Prelude.Text,
APNSMessage -> Maybe Text
rawContent :: Prelude.Maybe Prelude.Text,
APNSMessage -> Maybe (HashMap Text Text)
data' :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
APNSMessage -> Maybe Text
body :: Prelude.Maybe Prelude.Text,
APNSMessage -> Maybe Text
category :: Prelude.Maybe Prelude.Text,
APNSMessage -> Maybe Int
timeToLive :: Prelude.Maybe Prelude.Int,
APNSMessage -> Maybe Text
url :: Prelude.Maybe Prelude.Text,
APNSMessage -> Maybe Text
sound :: Prelude.Maybe Prelude.Text,
APNSMessage -> Maybe Action
action :: Prelude.Maybe Action,
APNSMessage -> Maybe Text
mediaUrl :: Prelude.Maybe Prelude.Text,
APNSMessage -> Maybe Text
preferredAuthenticationMethod :: Prelude.Maybe Prelude.Text,
APNSMessage -> Maybe Int
badge :: Prelude.Maybe Prelude.Int,
APNSMessage -> Maybe Text
title :: Prelude.Maybe Prelude.Text,
APNSMessage -> Maybe Text
threadId :: Prelude.Maybe Prelude.Text,
APNSMessage -> Maybe Text
collapseId :: Prelude.Maybe Prelude.Text
}
deriving (APNSMessage -> APNSMessage -> Bool
(APNSMessage -> APNSMessage -> Bool)
-> (APNSMessage -> APNSMessage -> Bool) -> Eq APNSMessage
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: APNSMessage -> APNSMessage -> Bool
$c/= :: APNSMessage -> APNSMessage -> Bool
== :: APNSMessage -> APNSMessage -> Bool
$c== :: APNSMessage -> APNSMessage -> Bool
Prelude.Eq, ReadPrec [APNSMessage]
ReadPrec APNSMessage
Int -> ReadS APNSMessage
ReadS [APNSMessage]
(Int -> ReadS APNSMessage)
-> ReadS [APNSMessage]
-> ReadPrec APNSMessage
-> ReadPrec [APNSMessage]
-> Read APNSMessage
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [APNSMessage]
$creadListPrec :: ReadPrec [APNSMessage]
readPrec :: ReadPrec APNSMessage
$creadPrec :: ReadPrec APNSMessage
readList :: ReadS [APNSMessage]
$creadList :: ReadS [APNSMessage]
readsPrec :: Int -> ReadS APNSMessage
$creadsPrec :: Int -> ReadS APNSMessage
Prelude.Read, Int -> APNSMessage -> ShowS
[APNSMessage] -> ShowS
APNSMessage -> String
(Int -> APNSMessage -> ShowS)
-> (APNSMessage -> String)
-> ([APNSMessage] -> ShowS)
-> Show APNSMessage
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [APNSMessage] -> ShowS
$cshowList :: [APNSMessage] -> ShowS
show :: APNSMessage -> String
$cshow :: APNSMessage -> String
showsPrec :: Int -> APNSMessage -> ShowS
$cshowsPrec :: Int -> APNSMessage -> ShowS
Prelude.Show, (forall x. APNSMessage -> Rep APNSMessage x)
-> (forall x. Rep APNSMessage x -> APNSMessage)
-> Generic APNSMessage
forall x. Rep APNSMessage x -> APNSMessage
forall x. APNSMessage -> Rep APNSMessage x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep APNSMessage x -> APNSMessage
$cfrom :: forall x. APNSMessage -> Rep APNSMessage x
Prelude.Generic)
newAPNSMessage ::
APNSMessage
newAPNSMessage :: APNSMessage
newAPNSMessage =
APNSMessage' :: Maybe (HashMap Text [Text])
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Action
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> APNSMessage
APNSMessage'
{ $sel:substitutions:APNSMessage' :: Maybe (HashMap Text [Text])
substitutions = Maybe (HashMap Text [Text])
forall a. Maybe a
Prelude.Nothing,
$sel:silentPush:APNSMessage' :: Maybe Bool
silentPush = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:aPNSPushType:APNSMessage' :: Maybe Text
aPNSPushType = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:priority:APNSMessage' :: Maybe Text
priority = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:rawContent:APNSMessage' :: Maybe Text
rawContent = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:data':APNSMessage' :: Maybe (HashMap Text Text)
data' = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
$sel:body:APNSMessage' :: Maybe Text
body = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:category:APNSMessage' :: Maybe Text
category = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:timeToLive:APNSMessage' :: Maybe Int
timeToLive = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:url:APNSMessage' :: Maybe Text
url = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:sound:APNSMessage' :: Maybe Text
sound = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:action:APNSMessage' :: Maybe Action
action = Maybe Action
forall a. Maybe a
Prelude.Nothing,
$sel:mediaUrl:APNSMessage' :: Maybe Text
mediaUrl = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:preferredAuthenticationMethod:APNSMessage' :: Maybe Text
preferredAuthenticationMethod = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:badge:APNSMessage' :: Maybe Int
badge = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:title:APNSMessage' :: Maybe Text
title = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:threadId:APNSMessage' :: Maybe Text
threadId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:collapseId:APNSMessage' :: Maybe Text
collapseId = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
aPNSMessage_substitutions :: Lens.Lens' APNSMessage (Prelude.Maybe (Prelude.HashMap Prelude.Text [Prelude.Text]))
aPNSMessage_substitutions :: (Maybe (HashMap Text [Text]) -> f (Maybe (HashMap Text [Text])))
-> APNSMessage -> f APNSMessage
aPNSMessage_substitutions = (APNSMessage -> Maybe (HashMap Text [Text]))
-> (APNSMessage -> Maybe (HashMap Text [Text]) -> APNSMessage)
-> Lens
APNSMessage
APNSMessage
(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 (\APNSMessage' {Maybe (HashMap Text [Text])
substitutions :: Maybe (HashMap Text [Text])
$sel:substitutions:APNSMessage' :: APNSMessage -> Maybe (HashMap Text [Text])
substitutions} -> Maybe (HashMap Text [Text])
substitutions) (\s :: APNSMessage
s@APNSMessage' {} Maybe (HashMap Text [Text])
a -> APNSMessage
s {$sel:substitutions:APNSMessage' :: Maybe (HashMap Text [Text])
substitutions = Maybe (HashMap Text [Text])
a} :: APNSMessage) ((Maybe (HashMap Text [Text]) -> f (Maybe (HashMap Text [Text])))
-> APNSMessage -> f APNSMessage)
-> ((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])))
-> APNSMessage
-> f APNSMessage
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
aPNSMessage_silentPush :: Lens.Lens' APNSMessage (Prelude.Maybe Prelude.Bool)
aPNSMessage_silentPush :: (Maybe Bool -> f (Maybe Bool)) -> APNSMessage -> f APNSMessage
aPNSMessage_silentPush = (APNSMessage -> Maybe Bool)
-> (APNSMessage -> Maybe Bool -> APNSMessage)
-> Lens APNSMessage APNSMessage (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\APNSMessage' {Maybe Bool
silentPush :: Maybe Bool
$sel:silentPush:APNSMessage' :: APNSMessage -> Maybe Bool
silentPush} -> Maybe Bool
silentPush) (\s :: APNSMessage
s@APNSMessage' {} Maybe Bool
a -> APNSMessage
s {$sel:silentPush:APNSMessage' :: Maybe Bool
silentPush = Maybe Bool
a} :: APNSMessage)
aPNSMessage_aPNSPushType :: Lens.Lens' APNSMessage (Prelude.Maybe Prelude.Text)
aPNSMessage_aPNSPushType :: (Maybe Text -> f (Maybe Text)) -> APNSMessage -> f APNSMessage
aPNSMessage_aPNSPushType = (APNSMessage -> Maybe Text)
-> (APNSMessage -> Maybe Text -> APNSMessage)
-> Lens APNSMessage APNSMessage (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\APNSMessage' {Maybe Text
aPNSPushType :: Maybe Text
$sel:aPNSPushType:APNSMessage' :: APNSMessage -> Maybe Text
aPNSPushType} -> Maybe Text
aPNSPushType) (\s :: APNSMessage
s@APNSMessage' {} Maybe Text
a -> APNSMessage
s {$sel:aPNSPushType:APNSMessage' :: Maybe Text
aPNSPushType = Maybe Text
a} :: APNSMessage)
aPNSMessage_priority :: Lens.Lens' APNSMessage (Prelude.Maybe Prelude.Text)
aPNSMessage_priority :: (Maybe Text -> f (Maybe Text)) -> APNSMessage -> f APNSMessage
aPNSMessage_priority = (APNSMessage -> Maybe Text)
-> (APNSMessage -> Maybe Text -> APNSMessage)
-> Lens APNSMessage APNSMessage (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\APNSMessage' {Maybe Text
priority :: Maybe Text
$sel:priority:APNSMessage' :: APNSMessage -> Maybe Text
priority} -> Maybe Text
priority) (\s :: APNSMessage
s@APNSMessage' {} Maybe Text
a -> APNSMessage
s {$sel:priority:APNSMessage' :: Maybe Text
priority = Maybe Text
a} :: APNSMessage)
aPNSMessage_rawContent :: Lens.Lens' APNSMessage (Prelude.Maybe Prelude.Text)
aPNSMessage_rawContent :: (Maybe Text -> f (Maybe Text)) -> APNSMessage -> f APNSMessage
aPNSMessage_rawContent = (APNSMessage -> Maybe Text)
-> (APNSMessage -> Maybe Text -> APNSMessage)
-> Lens APNSMessage APNSMessage (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\APNSMessage' {Maybe Text
rawContent :: Maybe Text
$sel:rawContent:APNSMessage' :: APNSMessage -> Maybe Text
rawContent} -> Maybe Text
rawContent) (\s :: APNSMessage
s@APNSMessage' {} Maybe Text
a -> APNSMessage
s {$sel:rawContent:APNSMessage' :: Maybe Text
rawContent = Maybe Text
a} :: APNSMessage)
aPNSMessage_data :: Lens.Lens' APNSMessage (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
aPNSMessage_data :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> APNSMessage -> f APNSMessage
aPNSMessage_data = (APNSMessage -> Maybe (HashMap Text Text))
-> (APNSMessage -> Maybe (HashMap Text Text) -> APNSMessage)
-> Lens
APNSMessage
APNSMessage
(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 (\APNSMessage' {Maybe (HashMap Text Text)
data' :: Maybe (HashMap Text Text)
$sel:data':APNSMessage' :: APNSMessage -> Maybe (HashMap Text Text)
data'} -> Maybe (HashMap Text Text)
data') (\s :: APNSMessage
s@APNSMessage' {} Maybe (HashMap Text Text)
a -> APNSMessage
s {$sel:data':APNSMessage' :: Maybe (HashMap Text Text)
data' = Maybe (HashMap Text Text)
a} :: APNSMessage) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> APNSMessage -> f APNSMessage)
-> ((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)))
-> APNSMessage
-> f APNSMessage
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
aPNSMessage_body :: Lens.Lens' APNSMessage (Prelude.Maybe Prelude.Text)
aPNSMessage_body :: (Maybe Text -> f (Maybe Text)) -> APNSMessage -> f APNSMessage
aPNSMessage_body = (APNSMessage -> Maybe Text)
-> (APNSMessage -> Maybe Text -> APNSMessage)
-> Lens APNSMessage APNSMessage (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\APNSMessage' {Maybe Text
body :: Maybe Text
$sel:body:APNSMessage' :: APNSMessage -> Maybe Text
body} -> Maybe Text
body) (\s :: APNSMessage
s@APNSMessage' {} Maybe Text
a -> APNSMessage
s {$sel:body:APNSMessage' :: Maybe Text
body = Maybe Text
a} :: APNSMessage)
aPNSMessage_category :: Lens.Lens' APNSMessage (Prelude.Maybe Prelude.Text)
aPNSMessage_category :: (Maybe Text -> f (Maybe Text)) -> APNSMessage -> f APNSMessage
aPNSMessage_category = (APNSMessage -> Maybe Text)
-> (APNSMessage -> Maybe Text -> APNSMessage)
-> Lens APNSMessage APNSMessage (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\APNSMessage' {Maybe Text
category :: Maybe Text
$sel:category:APNSMessage' :: APNSMessage -> Maybe Text
category} -> Maybe Text
category) (\s :: APNSMessage
s@APNSMessage' {} Maybe Text
a -> APNSMessage
s {$sel:category:APNSMessage' :: Maybe Text
category = Maybe Text
a} :: APNSMessage)
aPNSMessage_timeToLive :: Lens.Lens' APNSMessage (Prelude.Maybe Prelude.Int)
aPNSMessage_timeToLive :: (Maybe Int -> f (Maybe Int)) -> APNSMessage -> f APNSMessage
aPNSMessage_timeToLive = (APNSMessage -> Maybe Int)
-> (APNSMessage -> Maybe Int -> APNSMessage)
-> Lens APNSMessage APNSMessage (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\APNSMessage' {Maybe Int
timeToLive :: Maybe Int
$sel:timeToLive:APNSMessage' :: APNSMessage -> Maybe Int
timeToLive} -> Maybe Int
timeToLive) (\s :: APNSMessage
s@APNSMessage' {} Maybe Int
a -> APNSMessage
s {$sel:timeToLive:APNSMessage' :: Maybe Int
timeToLive = Maybe Int
a} :: APNSMessage)
aPNSMessage_url :: Lens.Lens' APNSMessage (Prelude.Maybe Prelude.Text)
aPNSMessage_url :: (Maybe Text -> f (Maybe Text)) -> APNSMessage -> f APNSMessage
aPNSMessage_url = (APNSMessage -> Maybe Text)
-> (APNSMessage -> Maybe Text -> APNSMessage)
-> Lens APNSMessage APNSMessage (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\APNSMessage' {Maybe Text
url :: Maybe Text
$sel:url:APNSMessage' :: APNSMessage -> Maybe Text
url} -> Maybe Text
url) (\s :: APNSMessage
s@APNSMessage' {} Maybe Text
a -> APNSMessage
s {$sel:url:APNSMessage' :: Maybe Text
url = Maybe Text
a} :: APNSMessage)
aPNSMessage_sound :: Lens.Lens' APNSMessage (Prelude.Maybe Prelude.Text)
aPNSMessage_sound :: (Maybe Text -> f (Maybe Text)) -> APNSMessage -> f APNSMessage
aPNSMessage_sound = (APNSMessage -> Maybe Text)
-> (APNSMessage -> Maybe Text -> APNSMessage)
-> Lens APNSMessage APNSMessage (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\APNSMessage' {Maybe Text
sound :: Maybe Text
$sel:sound:APNSMessage' :: APNSMessage -> Maybe Text
sound} -> Maybe Text
sound) (\s :: APNSMessage
s@APNSMessage' {} Maybe Text
a -> APNSMessage
s {$sel:sound:APNSMessage' :: Maybe Text
sound = Maybe Text
a} :: APNSMessage)
aPNSMessage_action :: Lens.Lens' APNSMessage (Prelude.Maybe Action)
aPNSMessage_action :: (Maybe Action -> f (Maybe Action)) -> APNSMessage -> f APNSMessage
aPNSMessage_action = (APNSMessage -> Maybe Action)
-> (APNSMessage -> Maybe Action -> APNSMessage)
-> Lens APNSMessage APNSMessage (Maybe Action) (Maybe Action)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\APNSMessage' {Maybe Action
action :: Maybe Action
$sel:action:APNSMessage' :: APNSMessage -> Maybe Action
action} -> Maybe Action
action) (\s :: APNSMessage
s@APNSMessage' {} Maybe Action
a -> APNSMessage
s {$sel:action:APNSMessage' :: Maybe Action
action = Maybe Action
a} :: APNSMessage)
aPNSMessage_mediaUrl :: Lens.Lens' APNSMessage (Prelude.Maybe Prelude.Text)
aPNSMessage_mediaUrl :: (Maybe Text -> f (Maybe Text)) -> APNSMessage -> f APNSMessage
aPNSMessage_mediaUrl = (APNSMessage -> Maybe Text)
-> (APNSMessage -> Maybe Text -> APNSMessage)
-> Lens APNSMessage APNSMessage (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\APNSMessage' {Maybe Text
mediaUrl :: Maybe Text
$sel:mediaUrl:APNSMessage' :: APNSMessage -> Maybe Text
mediaUrl} -> Maybe Text
mediaUrl) (\s :: APNSMessage
s@APNSMessage' {} Maybe Text
a -> APNSMessage
s {$sel:mediaUrl:APNSMessage' :: Maybe Text
mediaUrl = Maybe Text
a} :: APNSMessage)
aPNSMessage_preferredAuthenticationMethod :: Lens.Lens' APNSMessage (Prelude.Maybe Prelude.Text)
aPNSMessage_preferredAuthenticationMethod :: (Maybe Text -> f (Maybe Text)) -> APNSMessage -> f APNSMessage
aPNSMessage_preferredAuthenticationMethod = (APNSMessage -> Maybe Text)
-> (APNSMessage -> Maybe Text -> APNSMessage)
-> Lens APNSMessage APNSMessage (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\APNSMessage' {Maybe Text
preferredAuthenticationMethod :: Maybe Text
$sel:preferredAuthenticationMethod:APNSMessage' :: APNSMessage -> Maybe Text
preferredAuthenticationMethod} -> Maybe Text
preferredAuthenticationMethod) (\s :: APNSMessage
s@APNSMessage' {} Maybe Text
a -> APNSMessage
s {$sel:preferredAuthenticationMethod:APNSMessage' :: Maybe Text
preferredAuthenticationMethod = Maybe Text
a} :: APNSMessage)
aPNSMessage_badge :: Lens.Lens' APNSMessage (Prelude.Maybe Prelude.Int)
aPNSMessage_badge :: (Maybe Int -> f (Maybe Int)) -> APNSMessage -> f APNSMessage
aPNSMessage_badge = (APNSMessage -> Maybe Int)
-> (APNSMessage -> Maybe Int -> APNSMessage)
-> Lens APNSMessage APNSMessage (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\APNSMessage' {Maybe Int
badge :: Maybe Int
$sel:badge:APNSMessage' :: APNSMessage -> Maybe Int
badge} -> Maybe Int
badge) (\s :: APNSMessage
s@APNSMessage' {} Maybe Int
a -> APNSMessage
s {$sel:badge:APNSMessage' :: Maybe Int
badge = Maybe Int
a} :: APNSMessage)
aPNSMessage_title :: Lens.Lens' APNSMessage (Prelude.Maybe Prelude.Text)
aPNSMessage_title :: (Maybe Text -> f (Maybe Text)) -> APNSMessage -> f APNSMessage
aPNSMessage_title = (APNSMessage -> Maybe Text)
-> (APNSMessage -> Maybe Text -> APNSMessage)
-> Lens APNSMessage APNSMessage (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\APNSMessage' {Maybe Text
title :: Maybe Text
$sel:title:APNSMessage' :: APNSMessage -> Maybe Text
title} -> Maybe Text
title) (\s :: APNSMessage
s@APNSMessage' {} Maybe Text
a -> APNSMessage
s {$sel:title:APNSMessage' :: Maybe Text
title = Maybe Text
a} :: APNSMessage)
aPNSMessage_threadId :: Lens.Lens' APNSMessage (Prelude.Maybe Prelude.Text)
aPNSMessage_threadId :: (Maybe Text -> f (Maybe Text)) -> APNSMessage -> f APNSMessage
aPNSMessage_threadId = (APNSMessage -> Maybe Text)
-> (APNSMessage -> Maybe Text -> APNSMessage)
-> Lens APNSMessage APNSMessage (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\APNSMessage' {Maybe Text
threadId :: Maybe Text
$sel:threadId:APNSMessage' :: APNSMessage -> Maybe Text
threadId} -> Maybe Text
threadId) (\s :: APNSMessage
s@APNSMessage' {} Maybe Text
a -> APNSMessage
s {$sel:threadId:APNSMessage' :: Maybe Text
threadId = Maybe Text
a} :: APNSMessage)
aPNSMessage_collapseId :: Lens.Lens' APNSMessage (Prelude.Maybe Prelude.Text)
aPNSMessage_collapseId :: (Maybe Text -> f (Maybe Text)) -> APNSMessage -> f APNSMessage
aPNSMessage_collapseId = (APNSMessage -> Maybe Text)
-> (APNSMessage -> Maybe Text -> APNSMessage)
-> Lens APNSMessage APNSMessage (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\APNSMessage' {Maybe Text
collapseId :: Maybe Text
$sel:collapseId:APNSMessage' :: APNSMessage -> Maybe Text
collapseId} -> Maybe Text
collapseId) (\s :: APNSMessage
s@APNSMessage' {} Maybe Text
a -> APNSMessage
s {$sel:collapseId:APNSMessage' :: Maybe Text
collapseId = Maybe Text
a} :: APNSMessage)
instance Prelude.Hashable APNSMessage
instance Prelude.NFData APNSMessage
instance Core.ToJSON APNSMessage where
toJSON :: APNSMessage -> Value
toJSON APNSMessage' {Maybe Bool
Maybe Int
Maybe Text
Maybe (HashMap Text [Text])
Maybe (HashMap Text Text)
Maybe Action
collapseId :: Maybe Text
threadId :: Maybe Text
title :: Maybe Text
badge :: Maybe Int
preferredAuthenticationMethod :: Maybe Text
mediaUrl :: Maybe Text
action :: Maybe Action
sound :: Maybe Text
url :: Maybe Text
timeToLive :: Maybe Int
category :: Maybe Text
body :: Maybe Text
data' :: Maybe (HashMap Text Text)
rawContent :: Maybe Text
priority :: Maybe Text
aPNSPushType :: Maybe Text
silentPush :: Maybe Bool
substitutions :: Maybe (HashMap Text [Text])
$sel:collapseId:APNSMessage' :: APNSMessage -> Maybe Text
$sel:threadId:APNSMessage' :: APNSMessage -> Maybe Text
$sel:title:APNSMessage' :: APNSMessage -> Maybe Text
$sel:badge:APNSMessage' :: APNSMessage -> Maybe Int
$sel:preferredAuthenticationMethod:APNSMessage' :: APNSMessage -> Maybe Text
$sel:mediaUrl:APNSMessage' :: APNSMessage -> Maybe Text
$sel:action:APNSMessage' :: APNSMessage -> Maybe Action
$sel:sound:APNSMessage' :: APNSMessage -> Maybe Text
$sel:url:APNSMessage' :: APNSMessage -> Maybe Text
$sel:timeToLive:APNSMessage' :: APNSMessage -> Maybe Int
$sel:category:APNSMessage' :: APNSMessage -> Maybe Text
$sel:body:APNSMessage' :: APNSMessage -> Maybe Text
$sel:data':APNSMessage' :: APNSMessage -> Maybe (HashMap Text Text)
$sel:rawContent:APNSMessage' :: APNSMessage -> Maybe Text
$sel:priority:APNSMessage' :: APNSMessage -> Maybe Text
$sel:aPNSPushType:APNSMessage' :: APNSMessage -> Maybe Text
$sel:silentPush:APNSMessage' :: APNSMessage -> Maybe Bool
$sel:substitutions:APNSMessage' :: APNSMessage -> 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
"APNSPushType" 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
aPNSPushType,
(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
"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
"Category" 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
category,
(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
"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
"PreferredAuthenticationMethod" 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
preferredAuthenticationMethod,
(Text
"Badge" 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
badge,
(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
"ThreadId" 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
threadId,
(Text
"CollapseId" 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
collapseId
]
)