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