{-# 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.PinpointSMSVoice.Types.SSMLMessageType where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data SSMLMessageType = SSMLMessageType'
{
SSMLMessageType -> Maybe Text
languageCode :: Prelude.Maybe Prelude.Text,
SSMLMessageType -> Maybe Text
text :: Prelude.Maybe Prelude.Text,
SSMLMessageType -> Maybe Text
voiceId :: Prelude.Maybe Prelude.Text
}
deriving (SSMLMessageType -> SSMLMessageType -> Bool
(SSMLMessageType -> SSMLMessageType -> Bool)
-> (SSMLMessageType -> SSMLMessageType -> Bool)
-> Eq SSMLMessageType
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SSMLMessageType -> SSMLMessageType -> Bool
$c/= :: SSMLMessageType -> SSMLMessageType -> Bool
== :: SSMLMessageType -> SSMLMessageType -> Bool
$c== :: SSMLMessageType -> SSMLMessageType -> Bool
Prelude.Eq, ReadPrec [SSMLMessageType]
ReadPrec SSMLMessageType
Int -> ReadS SSMLMessageType
ReadS [SSMLMessageType]
(Int -> ReadS SSMLMessageType)
-> ReadS [SSMLMessageType]
-> ReadPrec SSMLMessageType
-> ReadPrec [SSMLMessageType]
-> Read SSMLMessageType
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SSMLMessageType]
$creadListPrec :: ReadPrec [SSMLMessageType]
readPrec :: ReadPrec SSMLMessageType
$creadPrec :: ReadPrec SSMLMessageType
readList :: ReadS [SSMLMessageType]
$creadList :: ReadS [SSMLMessageType]
readsPrec :: Int -> ReadS SSMLMessageType
$creadsPrec :: Int -> ReadS SSMLMessageType
Prelude.Read, Int -> SSMLMessageType -> ShowS
[SSMLMessageType] -> ShowS
SSMLMessageType -> String
(Int -> SSMLMessageType -> ShowS)
-> (SSMLMessageType -> String)
-> ([SSMLMessageType] -> ShowS)
-> Show SSMLMessageType
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SSMLMessageType] -> ShowS
$cshowList :: [SSMLMessageType] -> ShowS
show :: SSMLMessageType -> String
$cshow :: SSMLMessageType -> String
showsPrec :: Int -> SSMLMessageType -> ShowS
$cshowsPrec :: Int -> SSMLMessageType -> ShowS
Prelude.Show, (forall x. SSMLMessageType -> Rep SSMLMessageType x)
-> (forall x. Rep SSMLMessageType x -> SSMLMessageType)
-> Generic SSMLMessageType
forall x. Rep SSMLMessageType x -> SSMLMessageType
forall x. SSMLMessageType -> Rep SSMLMessageType x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SSMLMessageType x -> SSMLMessageType
$cfrom :: forall x. SSMLMessageType -> Rep SSMLMessageType x
Prelude.Generic)
newSSMLMessageType ::
SSMLMessageType
newSSMLMessageType :: SSMLMessageType
newSSMLMessageType =
SSMLMessageType' :: Maybe Text -> Maybe Text -> Maybe Text -> SSMLMessageType
SSMLMessageType'
{ $sel:languageCode:SSMLMessageType' :: Maybe Text
languageCode = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:text:SSMLMessageType' :: Maybe Text
text = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:voiceId:SSMLMessageType' :: Maybe Text
voiceId = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
sSMLMessageType_languageCode :: Lens.Lens' SSMLMessageType (Prelude.Maybe Prelude.Text)
sSMLMessageType_languageCode :: (Maybe Text -> f (Maybe Text))
-> SSMLMessageType -> f SSMLMessageType
sSMLMessageType_languageCode = (SSMLMessageType -> Maybe Text)
-> (SSMLMessageType -> Maybe Text -> SSMLMessageType)
-> Lens SSMLMessageType SSMLMessageType (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SSMLMessageType' {Maybe Text
languageCode :: Maybe Text
$sel:languageCode:SSMLMessageType' :: SSMLMessageType -> Maybe Text
languageCode} -> Maybe Text
languageCode) (\s :: SSMLMessageType
s@SSMLMessageType' {} Maybe Text
a -> SSMLMessageType
s {$sel:languageCode:SSMLMessageType' :: Maybe Text
languageCode = Maybe Text
a} :: SSMLMessageType)
sSMLMessageType_text :: Lens.Lens' SSMLMessageType (Prelude.Maybe Prelude.Text)
sSMLMessageType_text :: (Maybe Text -> f (Maybe Text))
-> SSMLMessageType -> f SSMLMessageType
sSMLMessageType_text = (SSMLMessageType -> Maybe Text)
-> (SSMLMessageType -> Maybe Text -> SSMLMessageType)
-> Lens SSMLMessageType SSMLMessageType (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SSMLMessageType' {Maybe Text
text :: Maybe Text
$sel:text:SSMLMessageType' :: SSMLMessageType -> Maybe Text
text} -> Maybe Text
text) (\s :: SSMLMessageType
s@SSMLMessageType' {} Maybe Text
a -> SSMLMessageType
s {$sel:text:SSMLMessageType' :: Maybe Text
text = Maybe Text
a} :: SSMLMessageType)
sSMLMessageType_voiceId :: Lens.Lens' SSMLMessageType (Prelude.Maybe Prelude.Text)
sSMLMessageType_voiceId :: (Maybe Text -> f (Maybe Text))
-> SSMLMessageType -> f SSMLMessageType
sSMLMessageType_voiceId = (SSMLMessageType -> Maybe Text)
-> (SSMLMessageType -> Maybe Text -> SSMLMessageType)
-> Lens SSMLMessageType SSMLMessageType (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SSMLMessageType' {Maybe Text
voiceId :: Maybe Text
$sel:voiceId:SSMLMessageType' :: SSMLMessageType -> Maybe Text
voiceId} -> Maybe Text
voiceId) (\s :: SSMLMessageType
s@SSMLMessageType' {} Maybe Text
a -> SSMLMessageType
s {$sel:voiceId:SSMLMessageType' :: Maybe Text
voiceId = Maybe Text
a} :: SSMLMessageType)
instance Prelude.Hashable SSMLMessageType
instance Prelude.NFData SSMLMessageType
instance Core.ToJSON SSMLMessageType where
toJSON :: SSMLMessageType -> Value
toJSON SSMLMessageType' {Maybe Text
voiceId :: Maybe Text
text :: Maybe Text
languageCode :: Maybe Text
$sel:voiceId:SSMLMessageType' :: SSMLMessageType -> Maybe Text
$sel:text:SSMLMessageType' :: SSMLMessageType -> Maybe Text
$sel:languageCode:SSMLMessageType' :: SSMLMessageType -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"LanguageCode" 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
languageCode,
(Text
"Text" 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
text,
(Text
"VoiceId" 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
voiceId
]
)