{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.Pinpoint.Types.SMSMessage
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.Pinpoint.Types.SMSMessage where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.Pinpoint.Types.MessageType
import qualified Amazonka.Prelude as Prelude

-- | Specifies the default settings for a one-time SMS message that\'s sent
-- directly to an endpoint.
--
-- /See:/ 'newSMSMessage' smart constructor.
data SMSMessage = SMSMessage'
  { -- | The message variables to use in the SMS message. You can override the
    -- default variables with individual address variables.
    SMSMessage -> Maybe (HashMap Text [Text])
substitutions :: Prelude.Maybe (Prelude.HashMap Prelude.Text [Prelude.Text]),
    -- | The number to send the SMS message from. This value should be one of the
    -- dedicated long or short codes that\'s assigned to your AWS account. If
    -- you don\'t specify a long or short code, Amazon Pinpoint assigns a
    -- random long code to the SMS message and sends the message from that
    -- code.
    SMSMessage -> Maybe Text
originationNumber :: Prelude.Maybe Prelude.Text,
    -- | The template ID received from the regulatory body for sending SMS in
    -- your country.
    SMSMessage -> Maybe Text
templateId :: Prelude.Maybe Prelude.Text,
    -- | The body of the SMS message.
    SMSMessage -> Maybe Text
body :: Prelude.Maybe Prelude.Text,
    -- | The SMS message type. Valid values are TRANSACTIONAL (for messages that
    -- are critical or time-sensitive, such as a one-time passwords) and
    -- PROMOTIONAL (for messsages that aren\'t critical or time-sensitive, such
    -- as marketing messages).
    SMSMessage -> Maybe MessageType
messageType :: Prelude.Maybe MessageType,
    -- | The sender ID to display as the sender of the message on a recipient\'s
    -- device. Support for sender IDs varies by country or region.
    SMSMessage -> Maybe Text
senderId :: Prelude.Maybe Prelude.Text,
    -- | This field is reserved for future use.
    SMSMessage -> Maybe Text
mediaUrl :: Prelude.Maybe Prelude.Text,
    -- | The entity ID or Principal Entity (PE) id received from the regulatory
    -- body for sending SMS in your country.
    SMSMessage -> Maybe Text
entityId :: Prelude.Maybe Prelude.Text,
    -- | The SMS program name that you provided to AWS Support when you requested
    -- your dedicated number.
    SMSMessage -> Maybe Text
keyword :: Prelude.Maybe Prelude.Text
  }
  deriving (SMSMessage -> SMSMessage -> Bool
(SMSMessage -> SMSMessage -> Bool)
-> (SMSMessage -> SMSMessage -> Bool) -> Eq SMSMessage
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SMSMessage -> SMSMessage -> Bool
$c/= :: SMSMessage -> SMSMessage -> Bool
== :: SMSMessage -> SMSMessage -> Bool
$c== :: SMSMessage -> SMSMessage -> Bool
Prelude.Eq, ReadPrec [SMSMessage]
ReadPrec SMSMessage
Int -> ReadS SMSMessage
ReadS [SMSMessage]
(Int -> ReadS SMSMessage)
-> ReadS [SMSMessage]
-> ReadPrec SMSMessage
-> ReadPrec [SMSMessage]
-> Read SMSMessage
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SMSMessage]
$creadListPrec :: ReadPrec [SMSMessage]
readPrec :: ReadPrec SMSMessage
$creadPrec :: ReadPrec SMSMessage
readList :: ReadS [SMSMessage]
$creadList :: ReadS [SMSMessage]
readsPrec :: Int -> ReadS SMSMessage
$creadsPrec :: Int -> ReadS SMSMessage
Prelude.Read, Int -> SMSMessage -> ShowS
[SMSMessage] -> ShowS
SMSMessage -> String
(Int -> SMSMessage -> ShowS)
-> (SMSMessage -> String)
-> ([SMSMessage] -> ShowS)
-> Show SMSMessage
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SMSMessage] -> ShowS
$cshowList :: [SMSMessage] -> ShowS
show :: SMSMessage -> String
$cshow :: SMSMessage -> String
showsPrec :: Int -> SMSMessage -> ShowS
$cshowsPrec :: Int -> SMSMessage -> ShowS
Prelude.Show, (forall x. SMSMessage -> Rep SMSMessage x)
-> (forall x. Rep SMSMessage x -> SMSMessage) -> Generic SMSMessage
forall x. Rep SMSMessage x -> SMSMessage
forall x. SMSMessage -> Rep SMSMessage x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SMSMessage x -> SMSMessage
$cfrom :: forall x. SMSMessage -> Rep SMSMessage x
Prelude.Generic)

-- |
-- Create a value of 'SMSMessage' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'substitutions', 'sMSMessage_substitutions' - The message variables to use in the SMS message. You can override the
-- default variables with individual address variables.
--
-- 'originationNumber', 'sMSMessage_originationNumber' - The number to send the SMS message from. This value should be one of the
-- dedicated long or short codes that\'s assigned to your AWS account. If
-- you don\'t specify a long or short code, Amazon Pinpoint assigns a
-- random long code to the SMS message and sends the message from that
-- code.
--
-- 'templateId', 'sMSMessage_templateId' - The template ID received from the regulatory body for sending SMS in
-- your country.
--
-- 'body', 'sMSMessage_body' - The body of the SMS message.
--
-- 'messageType', 'sMSMessage_messageType' - The SMS message type. Valid values are TRANSACTIONAL (for messages that
-- are critical or time-sensitive, such as a one-time passwords) and
-- PROMOTIONAL (for messsages that aren\'t critical or time-sensitive, such
-- as marketing messages).
--
-- 'senderId', 'sMSMessage_senderId' - The sender ID to display as the sender of the message on a recipient\'s
-- device. Support for sender IDs varies by country or region.
--
-- 'mediaUrl', 'sMSMessage_mediaUrl' - This field is reserved for future use.
--
-- 'entityId', 'sMSMessage_entityId' - The entity ID or Principal Entity (PE) id received from the regulatory
-- body for sending SMS in your country.
--
-- 'keyword', 'sMSMessage_keyword' - The SMS program name that you provided to AWS Support when you requested
-- your dedicated number.
newSMSMessage ::
  SMSMessage
newSMSMessage :: SMSMessage
newSMSMessage =
  SMSMessage' :: Maybe (HashMap Text [Text])
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe MessageType
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> SMSMessage
SMSMessage'
    { $sel:substitutions:SMSMessage' :: Maybe (HashMap Text [Text])
substitutions = Maybe (HashMap Text [Text])
forall a. Maybe a
Prelude.Nothing,
      $sel:originationNumber:SMSMessage' :: Maybe Text
originationNumber = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:templateId:SMSMessage' :: Maybe Text
templateId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:body:SMSMessage' :: Maybe Text
body = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:messageType:SMSMessage' :: Maybe MessageType
messageType = Maybe MessageType
forall a. Maybe a
Prelude.Nothing,
      $sel:senderId:SMSMessage' :: Maybe Text
senderId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:mediaUrl:SMSMessage' :: Maybe Text
mediaUrl = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:entityId:SMSMessage' :: Maybe Text
entityId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:keyword:SMSMessage' :: Maybe Text
keyword = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | The message variables to use in the SMS message. You can override the
-- default variables with individual address variables.
sMSMessage_substitutions :: Lens.Lens' SMSMessage (Prelude.Maybe (Prelude.HashMap Prelude.Text [Prelude.Text]))
sMSMessage_substitutions :: (Maybe (HashMap Text [Text]) -> f (Maybe (HashMap Text [Text])))
-> SMSMessage -> f SMSMessage
sMSMessage_substitutions = (SMSMessage -> Maybe (HashMap Text [Text]))
-> (SMSMessage -> Maybe (HashMap Text [Text]) -> SMSMessage)
-> Lens
     SMSMessage
     SMSMessage
     (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 (\SMSMessage' {Maybe (HashMap Text [Text])
substitutions :: Maybe (HashMap Text [Text])
$sel:substitutions:SMSMessage' :: SMSMessage -> Maybe (HashMap Text [Text])
substitutions} -> Maybe (HashMap Text [Text])
substitutions) (\s :: SMSMessage
s@SMSMessage' {} Maybe (HashMap Text [Text])
a -> SMSMessage
s {$sel:substitutions:SMSMessage' :: Maybe (HashMap Text [Text])
substitutions = Maybe (HashMap Text [Text])
a} :: SMSMessage) ((Maybe (HashMap Text [Text]) -> f (Maybe (HashMap Text [Text])))
 -> SMSMessage -> f SMSMessage)
-> ((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])))
-> SMSMessage
-> f SMSMessage
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

-- | The number to send the SMS message from. This value should be one of the
-- dedicated long or short codes that\'s assigned to your AWS account. If
-- you don\'t specify a long or short code, Amazon Pinpoint assigns a
-- random long code to the SMS message and sends the message from that
-- code.
sMSMessage_originationNumber :: Lens.Lens' SMSMessage (Prelude.Maybe Prelude.Text)
sMSMessage_originationNumber :: (Maybe Text -> f (Maybe Text)) -> SMSMessage -> f SMSMessage
sMSMessage_originationNumber = (SMSMessage -> Maybe Text)
-> (SMSMessage -> Maybe Text -> SMSMessage)
-> Lens SMSMessage SMSMessage (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SMSMessage' {Maybe Text
originationNumber :: Maybe Text
$sel:originationNumber:SMSMessage' :: SMSMessage -> Maybe Text
originationNumber} -> Maybe Text
originationNumber) (\s :: SMSMessage
s@SMSMessage' {} Maybe Text
a -> SMSMessage
s {$sel:originationNumber:SMSMessage' :: Maybe Text
originationNumber = Maybe Text
a} :: SMSMessage)

-- | The template ID received from the regulatory body for sending SMS in
-- your country.
sMSMessage_templateId :: Lens.Lens' SMSMessage (Prelude.Maybe Prelude.Text)
sMSMessage_templateId :: (Maybe Text -> f (Maybe Text)) -> SMSMessage -> f SMSMessage
sMSMessage_templateId = (SMSMessage -> Maybe Text)
-> (SMSMessage -> Maybe Text -> SMSMessage)
-> Lens SMSMessage SMSMessage (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SMSMessage' {Maybe Text
templateId :: Maybe Text
$sel:templateId:SMSMessage' :: SMSMessage -> Maybe Text
templateId} -> Maybe Text
templateId) (\s :: SMSMessage
s@SMSMessage' {} Maybe Text
a -> SMSMessage
s {$sel:templateId:SMSMessage' :: Maybe Text
templateId = Maybe Text
a} :: SMSMessage)

-- | The body of the SMS message.
sMSMessage_body :: Lens.Lens' SMSMessage (Prelude.Maybe Prelude.Text)
sMSMessage_body :: (Maybe Text -> f (Maybe Text)) -> SMSMessage -> f SMSMessage
sMSMessage_body = (SMSMessage -> Maybe Text)
-> (SMSMessage -> Maybe Text -> SMSMessage)
-> Lens SMSMessage SMSMessage (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SMSMessage' {Maybe Text
body :: Maybe Text
$sel:body:SMSMessage' :: SMSMessage -> Maybe Text
body} -> Maybe Text
body) (\s :: SMSMessage
s@SMSMessage' {} Maybe Text
a -> SMSMessage
s {$sel:body:SMSMessage' :: Maybe Text
body = Maybe Text
a} :: SMSMessage)

-- | The SMS message type. Valid values are TRANSACTIONAL (for messages that
-- are critical or time-sensitive, such as a one-time passwords) and
-- PROMOTIONAL (for messsages that aren\'t critical or time-sensitive, such
-- as marketing messages).
sMSMessage_messageType :: Lens.Lens' SMSMessage (Prelude.Maybe MessageType)
sMSMessage_messageType :: (Maybe MessageType -> f (Maybe MessageType))
-> SMSMessage -> f SMSMessage
sMSMessage_messageType = (SMSMessage -> Maybe MessageType)
-> (SMSMessage -> Maybe MessageType -> SMSMessage)
-> Lens
     SMSMessage SMSMessage (Maybe MessageType) (Maybe MessageType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SMSMessage' {Maybe MessageType
messageType :: Maybe MessageType
$sel:messageType:SMSMessage' :: SMSMessage -> Maybe MessageType
messageType} -> Maybe MessageType
messageType) (\s :: SMSMessage
s@SMSMessage' {} Maybe MessageType
a -> SMSMessage
s {$sel:messageType:SMSMessage' :: Maybe MessageType
messageType = Maybe MessageType
a} :: SMSMessage)

-- | The sender ID to display as the sender of the message on a recipient\'s
-- device. Support for sender IDs varies by country or region.
sMSMessage_senderId :: Lens.Lens' SMSMessage (Prelude.Maybe Prelude.Text)
sMSMessage_senderId :: (Maybe Text -> f (Maybe Text)) -> SMSMessage -> f SMSMessage
sMSMessage_senderId = (SMSMessage -> Maybe Text)
-> (SMSMessage -> Maybe Text -> SMSMessage)
-> Lens SMSMessage SMSMessage (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SMSMessage' {Maybe Text
senderId :: Maybe Text
$sel:senderId:SMSMessage' :: SMSMessage -> Maybe Text
senderId} -> Maybe Text
senderId) (\s :: SMSMessage
s@SMSMessage' {} Maybe Text
a -> SMSMessage
s {$sel:senderId:SMSMessage' :: Maybe Text
senderId = Maybe Text
a} :: SMSMessage)

-- | This field is reserved for future use.
sMSMessage_mediaUrl :: Lens.Lens' SMSMessage (Prelude.Maybe Prelude.Text)
sMSMessage_mediaUrl :: (Maybe Text -> f (Maybe Text)) -> SMSMessage -> f SMSMessage
sMSMessage_mediaUrl = (SMSMessage -> Maybe Text)
-> (SMSMessage -> Maybe Text -> SMSMessage)
-> Lens SMSMessage SMSMessage (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SMSMessage' {Maybe Text
mediaUrl :: Maybe Text
$sel:mediaUrl:SMSMessage' :: SMSMessage -> Maybe Text
mediaUrl} -> Maybe Text
mediaUrl) (\s :: SMSMessage
s@SMSMessage' {} Maybe Text
a -> SMSMessage
s {$sel:mediaUrl:SMSMessage' :: Maybe Text
mediaUrl = Maybe Text
a} :: SMSMessage)

-- | The entity ID or Principal Entity (PE) id received from the regulatory
-- body for sending SMS in your country.
sMSMessage_entityId :: Lens.Lens' SMSMessage (Prelude.Maybe Prelude.Text)
sMSMessage_entityId :: (Maybe Text -> f (Maybe Text)) -> SMSMessage -> f SMSMessage
sMSMessage_entityId = (SMSMessage -> Maybe Text)
-> (SMSMessage -> Maybe Text -> SMSMessage)
-> Lens SMSMessage SMSMessage (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SMSMessage' {Maybe Text
entityId :: Maybe Text
$sel:entityId:SMSMessage' :: SMSMessage -> Maybe Text
entityId} -> Maybe Text
entityId) (\s :: SMSMessage
s@SMSMessage' {} Maybe Text
a -> SMSMessage
s {$sel:entityId:SMSMessage' :: Maybe Text
entityId = Maybe Text
a} :: SMSMessage)

-- | The SMS program name that you provided to AWS Support when you requested
-- your dedicated number.
sMSMessage_keyword :: Lens.Lens' SMSMessage (Prelude.Maybe Prelude.Text)
sMSMessage_keyword :: (Maybe Text -> f (Maybe Text)) -> SMSMessage -> f SMSMessage
sMSMessage_keyword = (SMSMessage -> Maybe Text)
-> (SMSMessage -> Maybe Text -> SMSMessage)
-> Lens SMSMessage SMSMessage (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SMSMessage' {Maybe Text
keyword :: Maybe Text
$sel:keyword:SMSMessage' :: SMSMessage -> Maybe Text
keyword} -> Maybe Text
keyword) (\s :: SMSMessage
s@SMSMessage' {} Maybe Text
a -> SMSMessage
s {$sel:keyword:SMSMessage' :: Maybe Text
keyword = Maybe Text
a} :: SMSMessage)

instance Prelude.Hashable SMSMessage

instance Prelude.NFData SMSMessage

instance Core.ToJSON SMSMessage where
  toJSON :: SMSMessage -> Value
toJSON SMSMessage' {Maybe Text
Maybe (HashMap Text [Text])
Maybe MessageType
keyword :: Maybe Text
entityId :: Maybe Text
mediaUrl :: Maybe Text
senderId :: Maybe Text
messageType :: Maybe MessageType
body :: Maybe Text
templateId :: Maybe Text
originationNumber :: Maybe Text
substitutions :: Maybe (HashMap Text [Text])
$sel:keyword:SMSMessage' :: SMSMessage -> Maybe Text
$sel:entityId:SMSMessage' :: SMSMessage -> Maybe Text
$sel:mediaUrl:SMSMessage' :: SMSMessage -> Maybe Text
$sel:senderId:SMSMessage' :: SMSMessage -> Maybe Text
$sel:messageType:SMSMessage' :: SMSMessage -> Maybe MessageType
$sel:body:SMSMessage' :: SMSMessage -> Maybe Text
$sel:templateId:SMSMessage' :: SMSMessage -> Maybe Text
$sel:originationNumber:SMSMessage' :: SMSMessage -> Maybe Text
$sel:substitutions:SMSMessage' :: SMSMessage -> 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
"OriginationNumber" 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
originationNumber,
            (Text
"TemplateId" 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
templateId,
            (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
"MessageType" Text -> MessageType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (MessageType -> Pair) -> Maybe MessageType -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe MessageType
messageType,
            (Text
"SenderId" 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
senderId,
            (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
"EntityId" 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
entityId,
            (Text
"Keyword" 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
keyword
          ]
      )