{-# 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.AlexaBusiness.Types.Ssml where
import Amazonka.AlexaBusiness.Types.Locale
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data Ssml = Ssml'
{
Ssml -> Locale
locale :: Locale,
Ssml -> Text
value :: Prelude.Text
}
deriving (Ssml -> Ssml -> Bool
(Ssml -> Ssml -> Bool) -> (Ssml -> Ssml -> Bool) -> Eq Ssml
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Ssml -> Ssml -> Bool
$c/= :: Ssml -> Ssml -> Bool
== :: Ssml -> Ssml -> Bool
$c== :: Ssml -> Ssml -> Bool
Prelude.Eq, ReadPrec [Ssml]
ReadPrec Ssml
Int -> ReadS Ssml
ReadS [Ssml]
(Int -> ReadS Ssml)
-> ReadS [Ssml] -> ReadPrec Ssml -> ReadPrec [Ssml] -> Read Ssml
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Ssml]
$creadListPrec :: ReadPrec [Ssml]
readPrec :: ReadPrec Ssml
$creadPrec :: ReadPrec Ssml
readList :: ReadS [Ssml]
$creadList :: ReadS [Ssml]
readsPrec :: Int -> ReadS Ssml
$creadsPrec :: Int -> ReadS Ssml
Prelude.Read, Int -> Ssml -> ShowS
[Ssml] -> ShowS
Ssml -> String
(Int -> Ssml -> ShowS)
-> (Ssml -> String) -> ([Ssml] -> ShowS) -> Show Ssml
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Ssml] -> ShowS
$cshowList :: [Ssml] -> ShowS
show :: Ssml -> String
$cshow :: Ssml -> String
showsPrec :: Int -> Ssml -> ShowS
$cshowsPrec :: Int -> Ssml -> ShowS
Prelude.Show, (forall x. Ssml -> Rep Ssml x)
-> (forall x. Rep Ssml x -> Ssml) -> Generic Ssml
forall x. Rep Ssml x -> Ssml
forall x. Ssml -> Rep Ssml x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Ssml x -> Ssml
$cfrom :: forall x. Ssml -> Rep Ssml x
Prelude.Generic)
newSsml ::
Locale ->
Prelude.Text ->
Ssml
newSsml :: Locale -> Text -> Ssml
newSsml Locale
pLocale_ Text
pValue_ =
Ssml' :: Locale -> Text -> Ssml
Ssml' {$sel:locale:Ssml' :: Locale
locale = Locale
pLocale_, $sel:value:Ssml' :: Text
value = Text
pValue_}
ssml_locale :: Lens.Lens' Ssml Locale
ssml_locale :: (Locale -> f Locale) -> Ssml -> f Ssml
ssml_locale = (Ssml -> Locale)
-> (Ssml -> Locale -> Ssml) -> Lens Ssml Ssml Locale Locale
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Ssml' {Locale
locale :: Locale
$sel:locale:Ssml' :: Ssml -> Locale
locale} -> Locale
locale) (\s :: Ssml
s@Ssml' {} Locale
a -> Ssml
s {$sel:locale:Ssml' :: Locale
locale = Locale
a} :: Ssml)
ssml_value :: Lens.Lens' Ssml Prelude.Text
ssml_value :: (Text -> f Text) -> Ssml -> f Ssml
ssml_value = (Ssml -> Text)
-> (Ssml -> Text -> Ssml) -> Lens Ssml Ssml Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Ssml' {Text
value :: Text
$sel:value:Ssml' :: Ssml -> Text
value} -> Text
value) (\s :: Ssml
s@Ssml' {} Text
a -> Ssml
s {$sel:value:Ssml' :: Text
value = Text
a} :: Ssml)
instance Prelude.Hashable Ssml
instance Prelude.NFData Ssml
instance Core.ToJSON Ssml where
toJSON :: Ssml -> Value
toJSON Ssml' {Text
Locale
value :: Text
locale :: Locale
$sel:value:Ssml' :: Ssml -> Text
$sel:locale:Ssml' :: Ssml -> Locale
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Locale" Text -> Locale -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Locale
locale),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Value" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
value)
]
)