{-# 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.ADMMessage 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 ADMMessage = ADMMessage'
{
ADMMessage -> Maybe (HashMap Text [Text])
substitutions :: Prelude.Maybe (Prelude.HashMap Prelude.Text [Prelude.Text]),
ADMMessage -> Maybe Text
expiresAfter :: Prelude.Maybe Prelude.Text,
ADMMessage -> Maybe Text
md5 :: Prelude.Maybe Prelude.Text,
ADMMessage -> Maybe Bool
silentPush :: Prelude.Maybe Prelude.Bool,
ADMMessage -> Maybe Text
imageIconUrl :: Prelude.Maybe Prelude.Text,
ADMMessage -> Maybe Text
rawContent :: Prelude.Maybe Prelude.Text,
ADMMessage -> Maybe (HashMap Text Text)
data' :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
ADMMessage -> Maybe Text
smallImageIconUrl :: Prelude.Maybe Prelude.Text,
ADMMessage -> Maybe Text
body :: Prelude.Maybe Prelude.Text,
ADMMessage -> Maybe Text
url :: Prelude.Maybe Prelude.Text,
ADMMessage -> Maybe Text
sound :: Prelude.Maybe Prelude.Text,
ADMMessage -> Maybe Action
action :: Prelude.Maybe Action,
ADMMessage -> Maybe Text
imageUrl :: Prelude.Maybe Prelude.Text,
ADMMessage -> Maybe Text
consolidationKey :: Prelude.Maybe Prelude.Text,
ADMMessage -> Maybe Text
title :: Prelude.Maybe Prelude.Text,
ADMMessage -> Maybe Text
iconReference :: Prelude.Maybe Prelude.Text
}
deriving (ADMMessage -> ADMMessage -> Bool
(ADMMessage -> ADMMessage -> Bool)
-> (ADMMessage -> ADMMessage -> Bool) -> Eq ADMMessage
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ADMMessage -> ADMMessage -> Bool
$c/= :: ADMMessage -> ADMMessage -> Bool
== :: ADMMessage -> ADMMessage -> Bool
$c== :: ADMMessage -> ADMMessage -> Bool
Prelude.Eq, ReadPrec [ADMMessage]
ReadPrec ADMMessage
Int -> ReadS ADMMessage
ReadS [ADMMessage]
(Int -> ReadS ADMMessage)
-> ReadS [ADMMessage]
-> ReadPrec ADMMessage
-> ReadPrec [ADMMessage]
-> Read ADMMessage
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ADMMessage]
$creadListPrec :: ReadPrec [ADMMessage]
readPrec :: ReadPrec ADMMessage
$creadPrec :: ReadPrec ADMMessage
readList :: ReadS [ADMMessage]
$creadList :: ReadS [ADMMessage]
readsPrec :: Int -> ReadS ADMMessage
$creadsPrec :: Int -> ReadS ADMMessage
Prelude.Read, Int -> ADMMessage -> ShowS
[ADMMessage] -> ShowS
ADMMessage -> String
(Int -> ADMMessage -> ShowS)
-> (ADMMessage -> String)
-> ([ADMMessage] -> ShowS)
-> Show ADMMessage
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ADMMessage] -> ShowS
$cshowList :: [ADMMessage] -> ShowS
show :: ADMMessage -> String
$cshow :: ADMMessage -> String
showsPrec :: Int -> ADMMessage -> ShowS
$cshowsPrec :: Int -> ADMMessage -> ShowS
Prelude.Show, (forall x. ADMMessage -> Rep ADMMessage x)
-> (forall x. Rep ADMMessage x -> ADMMessage) -> Generic ADMMessage
forall x. Rep ADMMessage x -> ADMMessage
forall x. ADMMessage -> Rep ADMMessage x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ADMMessage x -> ADMMessage
$cfrom :: forall x. ADMMessage -> Rep ADMMessage x
Prelude.Generic)
newADMMessage ::
ADMMessage
newADMMessage :: ADMMessage
newADMMessage =
ADMMessage' :: Maybe (HashMap Text [Text])
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Action
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ADMMessage
ADMMessage'
{ $sel:substitutions:ADMMessage' :: Maybe (HashMap Text [Text])
substitutions = Maybe (HashMap Text [Text])
forall a. Maybe a
Prelude.Nothing,
$sel:expiresAfter:ADMMessage' :: Maybe Text
expiresAfter = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:md5:ADMMessage' :: Maybe Text
md5 = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:silentPush:ADMMessage' :: Maybe Bool
silentPush = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:imageIconUrl:ADMMessage' :: Maybe Text
imageIconUrl = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:rawContent:ADMMessage' :: Maybe Text
rawContent = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:data':ADMMessage' :: Maybe (HashMap Text Text)
data' = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
$sel:smallImageIconUrl:ADMMessage' :: Maybe Text
smallImageIconUrl = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:body:ADMMessage' :: Maybe Text
body = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:url:ADMMessage' :: Maybe Text
url = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:sound:ADMMessage' :: Maybe Text
sound = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:action:ADMMessage' :: Maybe Action
action = Maybe Action
forall a. Maybe a
Prelude.Nothing,
$sel:imageUrl:ADMMessage' :: Maybe Text
imageUrl = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:consolidationKey:ADMMessage' :: Maybe Text
consolidationKey = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:title:ADMMessage' :: Maybe Text
title = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:iconReference:ADMMessage' :: Maybe Text
iconReference = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
aDMMessage_substitutions :: Lens.Lens' ADMMessage (Prelude.Maybe (Prelude.HashMap Prelude.Text [Prelude.Text]))
aDMMessage_substitutions :: (Maybe (HashMap Text [Text]) -> f (Maybe (HashMap Text [Text])))
-> ADMMessage -> f ADMMessage
aDMMessage_substitutions = (ADMMessage -> Maybe (HashMap Text [Text]))
-> (ADMMessage -> Maybe (HashMap Text [Text]) -> ADMMessage)
-> Lens
ADMMessage
ADMMessage
(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 (\ADMMessage' {Maybe (HashMap Text [Text])
substitutions :: Maybe (HashMap Text [Text])
$sel:substitutions:ADMMessage' :: ADMMessage -> Maybe (HashMap Text [Text])
substitutions} -> Maybe (HashMap Text [Text])
substitutions) (\s :: ADMMessage
s@ADMMessage' {} Maybe (HashMap Text [Text])
a -> ADMMessage
s {$sel:substitutions:ADMMessage' :: Maybe (HashMap Text [Text])
substitutions = Maybe (HashMap Text [Text])
a} :: ADMMessage) ((Maybe (HashMap Text [Text]) -> f (Maybe (HashMap Text [Text])))
-> ADMMessage -> f ADMMessage)
-> ((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])))
-> ADMMessage
-> f ADMMessage
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
aDMMessage_expiresAfter :: Lens.Lens' ADMMessage (Prelude.Maybe Prelude.Text)
aDMMessage_expiresAfter :: (Maybe Text -> f (Maybe Text)) -> ADMMessage -> f ADMMessage
aDMMessage_expiresAfter = (ADMMessage -> Maybe Text)
-> (ADMMessage -> Maybe Text -> ADMMessage)
-> Lens ADMMessage ADMMessage (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ADMMessage' {Maybe Text
expiresAfter :: Maybe Text
$sel:expiresAfter:ADMMessage' :: ADMMessage -> Maybe Text
expiresAfter} -> Maybe Text
expiresAfter) (\s :: ADMMessage
s@ADMMessage' {} Maybe Text
a -> ADMMessage
s {$sel:expiresAfter:ADMMessage' :: Maybe Text
expiresAfter = Maybe Text
a} :: ADMMessage)
aDMMessage_md5 :: Lens.Lens' ADMMessage (Prelude.Maybe Prelude.Text)
aDMMessage_md5 :: (Maybe Text -> f (Maybe Text)) -> ADMMessage -> f ADMMessage
aDMMessage_md5 = (ADMMessage -> Maybe Text)
-> (ADMMessage -> Maybe Text -> ADMMessage)
-> Lens ADMMessage ADMMessage (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ADMMessage' {Maybe Text
md5 :: Maybe Text
$sel:md5:ADMMessage' :: ADMMessage -> Maybe Text
md5} -> Maybe Text
md5) (\s :: ADMMessage
s@ADMMessage' {} Maybe Text
a -> ADMMessage
s {$sel:md5:ADMMessage' :: Maybe Text
md5 = Maybe Text
a} :: ADMMessage)
aDMMessage_silentPush :: Lens.Lens' ADMMessage (Prelude.Maybe Prelude.Bool)
aDMMessage_silentPush :: (Maybe Bool -> f (Maybe Bool)) -> ADMMessage -> f ADMMessage
aDMMessage_silentPush = (ADMMessage -> Maybe Bool)
-> (ADMMessage -> Maybe Bool -> ADMMessage)
-> Lens ADMMessage ADMMessage (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ADMMessage' {Maybe Bool
silentPush :: Maybe Bool
$sel:silentPush:ADMMessage' :: ADMMessage -> Maybe Bool
silentPush} -> Maybe Bool
silentPush) (\s :: ADMMessage
s@ADMMessage' {} Maybe Bool
a -> ADMMessage
s {$sel:silentPush:ADMMessage' :: Maybe Bool
silentPush = Maybe Bool
a} :: ADMMessage)
aDMMessage_imageIconUrl :: Lens.Lens' ADMMessage (Prelude.Maybe Prelude.Text)
aDMMessage_imageIconUrl :: (Maybe Text -> f (Maybe Text)) -> ADMMessage -> f ADMMessage
aDMMessage_imageIconUrl = (ADMMessage -> Maybe Text)
-> (ADMMessage -> Maybe Text -> ADMMessage)
-> Lens ADMMessage ADMMessage (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ADMMessage' {Maybe Text
imageIconUrl :: Maybe Text
$sel:imageIconUrl:ADMMessage' :: ADMMessage -> Maybe Text
imageIconUrl} -> Maybe Text
imageIconUrl) (\s :: ADMMessage
s@ADMMessage' {} Maybe Text
a -> ADMMessage
s {$sel:imageIconUrl:ADMMessage' :: Maybe Text
imageIconUrl = Maybe Text
a} :: ADMMessage)
aDMMessage_rawContent :: Lens.Lens' ADMMessage (Prelude.Maybe Prelude.Text)
aDMMessage_rawContent :: (Maybe Text -> f (Maybe Text)) -> ADMMessage -> f ADMMessage
aDMMessage_rawContent = (ADMMessage -> Maybe Text)
-> (ADMMessage -> Maybe Text -> ADMMessage)
-> Lens ADMMessage ADMMessage (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ADMMessage' {Maybe Text
rawContent :: Maybe Text
$sel:rawContent:ADMMessage' :: ADMMessage -> Maybe Text
rawContent} -> Maybe Text
rawContent) (\s :: ADMMessage
s@ADMMessage' {} Maybe Text
a -> ADMMessage
s {$sel:rawContent:ADMMessage' :: Maybe Text
rawContent = Maybe Text
a} :: ADMMessage)
aDMMessage_data :: Lens.Lens' ADMMessage (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
aDMMessage_data :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> ADMMessage -> f ADMMessage
aDMMessage_data = (ADMMessage -> Maybe (HashMap Text Text))
-> (ADMMessage -> Maybe (HashMap Text Text) -> ADMMessage)
-> Lens
ADMMessage
ADMMessage
(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 (\ADMMessage' {Maybe (HashMap Text Text)
data' :: Maybe (HashMap Text Text)
$sel:data':ADMMessage' :: ADMMessage -> Maybe (HashMap Text Text)
data'} -> Maybe (HashMap Text Text)
data') (\s :: ADMMessage
s@ADMMessage' {} Maybe (HashMap Text Text)
a -> ADMMessage
s {$sel:data':ADMMessage' :: Maybe (HashMap Text Text)
data' = Maybe (HashMap Text Text)
a} :: ADMMessage) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> ADMMessage -> f ADMMessage)
-> ((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)))
-> ADMMessage
-> f ADMMessage
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
aDMMessage_smallImageIconUrl :: Lens.Lens' ADMMessage (Prelude.Maybe Prelude.Text)
aDMMessage_smallImageIconUrl :: (Maybe Text -> f (Maybe Text)) -> ADMMessage -> f ADMMessage
aDMMessage_smallImageIconUrl = (ADMMessage -> Maybe Text)
-> (ADMMessage -> Maybe Text -> ADMMessage)
-> Lens ADMMessage ADMMessage (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ADMMessage' {Maybe Text
smallImageIconUrl :: Maybe Text
$sel:smallImageIconUrl:ADMMessage' :: ADMMessage -> Maybe Text
smallImageIconUrl} -> Maybe Text
smallImageIconUrl) (\s :: ADMMessage
s@ADMMessage' {} Maybe Text
a -> ADMMessage
s {$sel:smallImageIconUrl:ADMMessage' :: Maybe Text
smallImageIconUrl = Maybe Text
a} :: ADMMessage)
aDMMessage_body :: Lens.Lens' ADMMessage (Prelude.Maybe Prelude.Text)
aDMMessage_body :: (Maybe Text -> f (Maybe Text)) -> ADMMessage -> f ADMMessage
aDMMessage_body = (ADMMessage -> Maybe Text)
-> (ADMMessage -> Maybe Text -> ADMMessage)
-> Lens ADMMessage ADMMessage (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ADMMessage' {Maybe Text
body :: Maybe Text
$sel:body:ADMMessage' :: ADMMessage -> Maybe Text
body} -> Maybe Text
body) (\s :: ADMMessage
s@ADMMessage' {} Maybe Text
a -> ADMMessage
s {$sel:body:ADMMessage' :: Maybe Text
body = Maybe Text
a} :: ADMMessage)
aDMMessage_url :: Lens.Lens' ADMMessage (Prelude.Maybe Prelude.Text)
aDMMessage_url :: (Maybe Text -> f (Maybe Text)) -> ADMMessage -> f ADMMessage
aDMMessage_url = (ADMMessage -> Maybe Text)
-> (ADMMessage -> Maybe Text -> ADMMessage)
-> Lens ADMMessage ADMMessage (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ADMMessage' {Maybe Text
url :: Maybe Text
$sel:url:ADMMessage' :: ADMMessage -> Maybe Text
url} -> Maybe Text
url) (\s :: ADMMessage
s@ADMMessage' {} Maybe Text
a -> ADMMessage
s {$sel:url:ADMMessage' :: Maybe Text
url = Maybe Text
a} :: ADMMessage)
aDMMessage_sound :: Lens.Lens' ADMMessage (Prelude.Maybe Prelude.Text)
aDMMessage_sound :: (Maybe Text -> f (Maybe Text)) -> ADMMessage -> f ADMMessage
aDMMessage_sound = (ADMMessage -> Maybe Text)
-> (ADMMessage -> Maybe Text -> ADMMessage)
-> Lens ADMMessage ADMMessage (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ADMMessage' {Maybe Text
sound :: Maybe Text
$sel:sound:ADMMessage' :: ADMMessage -> Maybe Text
sound} -> Maybe Text
sound) (\s :: ADMMessage
s@ADMMessage' {} Maybe Text
a -> ADMMessage
s {$sel:sound:ADMMessage' :: Maybe Text
sound = Maybe Text
a} :: ADMMessage)
aDMMessage_action :: Lens.Lens' ADMMessage (Prelude.Maybe Action)
aDMMessage_action :: (Maybe Action -> f (Maybe Action)) -> ADMMessage -> f ADMMessage
aDMMessage_action = (ADMMessage -> Maybe Action)
-> (ADMMessage -> Maybe Action -> ADMMessage)
-> Lens ADMMessage ADMMessage (Maybe Action) (Maybe Action)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ADMMessage' {Maybe Action
action :: Maybe Action
$sel:action:ADMMessage' :: ADMMessage -> Maybe Action
action} -> Maybe Action
action) (\s :: ADMMessage
s@ADMMessage' {} Maybe Action
a -> ADMMessage
s {$sel:action:ADMMessage' :: Maybe Action
action = Maybe Action
a} :: ADMMessage)
aDMMessage_imageUrl :: Lens.Lens' ADMMessage (Prelude.Maybe Prelude.Text)
aDMMessage_imageUrl :: (Maybe Text -> f (Maybe Text)) -> ADMMessage -> f ADMMessage
aDMMessage_imageUrl = (ADMMessage -> Maybe Text)
-> (ADMMessage -> Maybe Text -> ADMMessage)
-> Lens ADMMessage ADMMessage (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ADMMessage' {Maybe Text
imageUrl :: Maybe Text
$sel:imageUrl:ADMMessage' :: ADMMessage -> Maybe Text
imageUrl} -> Maybe Text
imageUrl) (\s :: ADMMessage
s@ADMMessage' {} Maybe Text
a -> ADMMessage
s {$sel:imageUrl:ADMMessage' :: Maybe Text
imageUrl = Maybe Text
a} :: ADMMessage)
aDMMessage_consolidationKey :: Lens.Lens' ADMMessage (Prelude.Maybe Prelude.Text)
aDMMessage_consolidationKey :: (Maybe Text -> f (Maybe Text)) -> ADMMessage -> f ADMMessage
aDMMessage_consolidationKey = (ADMMessage -> Maybe Text)
-> (ADMMessage -> Maybe Text -> ADMMessage)
-> Lens ADMMessage ADMMessage (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ADMMessage' {Maybe Text
consolidationKey :: Maybe Text
$sel:consolidationKey:ADMMessage' :: ADMMessage -> Maybe Text
consolidationKey} -> Maybe Text
consolidationKey) (\s :: ADMMessage
s@ADMMessage' {} Maybe Text
a -> ADMMessage
s {$sel:consolidationKey:ADMMessage' :: Maybe Text
consolidationKey = Maybe Text
a} :: ADMMessage)
aDMMessage_title :: Lens.Lens' ADMMessage (Prelude.Maybe Prelude.Text)
aDMMessage_title :: (Maybe Text -> f (Maybe Text)) -> ADMMessage -> f ADMMessage
aDMMessage_title = (ADMMessage -> Maybe Text)
-> (ADMMessage -> Maybe Text -> ADMMessage)
-> Lens ADMMessage ADMMessage (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ADMMessage' {Maybe Text
title :: Maybe Text
$sel:title:ADMMessage' :: ADMMessage -> Maybe Text
title} -> Maybe Text
title) (\s :: ADMMessage
s@ADMMessage' {} Maybe Text
a -> ADMMessage
s {$sel:title:ADMMessage' :: Maybe Text
title = Maybe Text
a} :: ADMMessage)
aDMMessage_iconReference :: Lens.Lens' ADMMessage (Prelude.Maybe Prelude.Text)
aDMMessage_iconReference :: (Maybe Text -> f (Maybe Text)) -> ADMMessage -> f ADMMessage
aDMMessage_iconReference = (ADMMessage -> Maybe Text)
-> (ADMMessage -> Maybe Text -> ADMMessage)
-> Lens ADMMessage ADMMessage (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ADMMessage' {Maybe Text
iconReference :: Maybe Text
$sel:iconReference:ADMMessage' :: ADMMessage -> Maybe Text
iconReference} -> Maybe Text
iconReference) (\s :: ADMMessage
s@ADMMessage' {} Maybe Text
a -> ADMMessage
s {$sel:iconReference:ADMMessage' :: Maybe Text
iconReference = Maybe Text
a} :: ADMMessage)
instance Prelude.Hashable ADMMessage
instance Prelude.NFData ADMMessage
instance Core.ToJSON ADMMessage where
toJSON :: ADMMessage -> Value
toJSON ADMMessage' {Maybe Bool
Maybe Text
Maybe (HashMap Text [Text])
Maybe (HashMap Text Text)
Maybe Action
iconReference :: Maybe Text
title :: Maybe Text
consolidationKey :: Maybe Text
imageUrl :: Maybe Text
action :: Maybe Action
sound :: Maybe Text
url :: Maybe Text
body :: Maybe Text
smallImageIconUrl :: Maybe Text
data' :: Maybe (HashMap Text Text)
rawContent :: Maybe Text
imageIconUrl :: Maybe Text
silentPush :: Maybe Bool
md5 :: Maybe Text
expiresAfter :: Maybe Text
substitutions :: Maybe (HashMap Text [Text])
$sel:iconReference:ADMMessage' :: ADMMessage -> Maybe Text
$sel:title:ADMMessage' :: ADMMessage -> Maybe Text
$sel:consolidationKey:ADMMessage' :: ADMMessage -> Maybe Text
$sel:imageUrl:ADMMessage' :: ADMMessage -> Maybe Text
$sel:action:ADMMessage' :: ADMMessage -> Maybe Action
$sel:sound:ADMMessage' :: ADMMessage -> Maybe Text
$sel:url:ADMMessage' :: ADMMessage -> Maybe Text
$sel:body:ADMMessage' :: ADMMessage -> Maybe Text
$sel:smallImageIconUrl:ADMMessage' :: ADMMessage -> Maybe Text
$sel:data':ADMMessage' :: ADMMessage -> Maybe (HashMap Text Text)
$sel:rawContent:ADMMessage' :: ADMMessage -> Maybe Text
$sel:imageIconUrl:ADMMessage' :: ADMMessage -> Maybe Text
$sel:silentPush:ADMMessage' :: ADMMessage -> Maybe Bool
$sel:md5:ADMMessage' :: ADMMessage -> Maybe Text
$sel:expiresAfter:ADMMessage' :: ADMMessage -> Maybe Text
$sel:substitutions:ADMMessage' :: ADMMessage -> 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
"ExpiresAfter" 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
expiresAfter,
(Text
"MD5" 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
md5,
(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
"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
"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
"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
"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
"ConsolidationKey" 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
consolidationKey,
(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
]
)