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