{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.ConnectCampaigns.UpdateCampaignOutboundCallConfig
(
UpdateCampaignOutboundCallConfig (..),
newUpdateCampaignOutboundCallConfig,
updateCampaignOutboundCallConfig_answerMachineDetectionConfig,
updateCampaignOutboundCallConfig_connectContactFlowId,
updateCampaignOutboundCallConfig_connectSourcePhoneNumber,
updateCampaignOutboundCallConfig_id,
UpdateCampaignOutboundCallConfigResponse (..),
newUpdateCampaignOutboundCallConfigResponse,
)
where
import Amazonka.ConnectCampaigns.Types
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data UpdateCampaignOutboundCallConfig = UpdateCampaignOutboundCallConfig'
{ UpdateCampaignOutboundCallConfig
-> Maybe AnswerMachineDetectionConfig
answerMachineDetectionConfig :: Prelude.Maybe AnswerMachineDetectionConfig,
UpdateCampaignOutboundCallConfig -> Maybe Text
connectContactFlowId :: Prelude.Maybe Prelude.Text,
UpdateCampaignOutboundCallConfig -> Maybe Text
connectSourcePhoneNumber :: Prelude.Maybe Prelude.Text,
UpdateCampaignOutboundCallConfig -> Text
id :: Prelude.Text
}
deriving (UpdateCampaignOutboundCallConfig
-> UpdateCampaignOutboundCallConfig -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateCampaignOutboundCallConfig
-> UpdateCampaignOutboundCallConfig -> Bool
$c/= :: UpdateCampaignOutboundCallConfig
-> UpdateCampaignOutboundCallConfig -> Bool
== :: UpdateCampaignOutboundCallConfig
-> UpdateCampaignOutboundCallConfig -> Bool
$c== :: UpdateCampaignOutboundCallConfig
-> UpdateCampaignOutboundCallConfig -> Bool
Prelude.Eq, ReadPrec [UpdateCampaignOutboundCallConfig]
ReadPrec UpdateCampaignOutboundCallConfig
Int -> ReadS UpdateCampaignOutboundCallConfig
ReadS [UpdateCampaignOutboundCallConfig]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateCampaignOutboundCallConfig]
$creadListPrec :: ReadPrec [UpdateCampaignOutboundCallConfig]
readPrec :: ReadPrec UpdateCampaignOutboundCallConfig
$creadPrec :: ReadPrec UpdateCampaignOutboundCallConfig
readList :: ReadS [UpdateCampaignOutboundCallConfig]
$creadList :: ReadS [UpdateCampaignOutboundCallConfig]
readsPrec :: Int -> ReadS UpdateCampaignOutboundCallConfig
$creadsPrec :: Int -> ReadS UpdateCampaignOutboundCallConfig
Prelude.Read, Int -> UpdateCampaignOutboundCallConfig -> ShowS
[UpdateCampaignOutboundCallConfig] -> ShowS
UpdateCampaignOutboundCallConfig -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateCampaignOutboundCallConfig] -> ShowS
$cshowList :: [UpdateCampaignOutboundCallConfig] -> ShowS
show :: UpdateCampaignOutboundCallConfig -> String
$cshow :: UpdateCampaignOutboundCallConfig -> String
showsPrec :: Int -> UpdateCampaignOutboundCallConfig -> ShowS
$cshowsPrec :: Int -> UpdateCampaignOutboundCallConfig -> ShowS
Prelude.Show, forall x.
Rep UpdateCampaignOutboundCallConfig x
-> UpdateCampaignOutboundCallConfig
forall x.
UpdateCampaignOutboundCallConfig
-> Rep UpdateCampaignOutboundCallConfig x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateCampaignOutboundCallConfig x
-> UpdateCampaignOutboundCallConfig
$cfrom :: forall x.
UpdateCampaignOutboundCallConfig
-> Rep UpdateCampaignOutboundCallConfig x
Prelude.Generic)
newUpdateCampaignOutboundCallConfig ::
Prelude.Text ->
UpdateCampaignOutboundCallConfig
newUpdateCampaignOutboundCallConfig :: Text -> UpdateCampaignOutboundCallConfig
newUpdateCampaignOutboundCallConfig Text
pId_ =
UpdateCampaignOutboundCallConfig'
{ $sel:answerMachineDetectionConfig:UpdateCampaignOutboundCallConfig' :: Maybe AnswerMachineDetectionConfig
answerMachineDetectionConfig =
forall a. Maybe a
Prelude.Nothing,
$sel:connectContactFlowId:UpdateCampaignOutboundCallConfig' :: Maybe Text
connectContactFlowId = forall a. Maybe a
Prelude.Nothing,
$sel:connectSourcePhoneNumber:UpdateCampaignOutboundCallConfig' :: Maybe Text
connectSourcePhoneNumber =
forall a. Maybe a
Prelude.Nothing,
$sel:id:UpdateCampaignOutboundCallConfig' :: Text
id = Text
pId_
}
updateCampaignOutboundCallConfig_answerMachineDetectionConfig :: Lens.Lens' UpdateCampaignOutboundCallConfig (Prelude.Maybe AnswerMachineDetectionConfig)
updateCampaignOutboundCallConfig_answerMachineDetectionConfig :: Lens'
UpdateCampaignOutboundCallConfig
(Maybe AnswerMachineDetectionConfig)
updateCampaignOutboundCallConfig_answerMachineDetectionConfig = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateCampaignOutboundCallConfig' {Maybe AnswerMachineDetectionConfig
answerMachineDetectionConfig :: Maybe AnswerMachineDetectionConfig
$sel:answerMachineDetectionConfig:UpdateCampaignOutboundCallConfig' :: UpdateCampaignOutboundCallConfig
-> Maybe AnswerMachineDetectionConfig
answerMachineDetectionConfig} -> Maybe AnswerMachineDetectionConfig
answerMachineDetectionConfig) (\s :: UpdateCampaignOutboundCallConfig
s@UpdateCampaignOutboundCallConfig' {} Maybe AnswerMachineDetectionConfig
a -> UpdateCampaignOutboundCallConfig
s {$sel:answerMachineDetectionConfig:UpdateCampaignOutboundCallConfig' :: Maybe AnswerMachineDetectionConfig
answerMachineDetectionConfig = Maybe AnswerMachineDetectionConfig
a} :: UpdateCampaignOutboundCallConfig)
updateCampaignOutboundCallConfig_connectContactFlowId :: Lens.Lens' UpdateCampaignOutboundCallConfig (Prelude.Maybe Prelude.Text)
updateCampaignOutboundCallConfig_connectContactFlowId :: Lens' UpdateCampaignOutboundCallConfig (Maybe Text)
updateCampaignOutboundCallConfig_connectContactFlowId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateCampaignOutboundCallConfig' {Maybe Text
connectContactFlowId :: Maybe Text
$sel:connectContactFlowId:UpdateCampaignOutboundCallConfig' :: UpdateCampaignOutboundCallConfig -> Maybe Text
connectContactFlowId} -> Maybe Text
connectContactFlowId) (\s :: UpdateCampaignOutboundCallConfig
s@UpdateCampaignOutboundCallConfig' {} Maybe Text
a -> UpdateCampaignOutboundCallConfig
s {$sel:connectContactFlowId:UpdateCampaignOutboundCallConfig' :: Maybe Text
connectContactFlowId = Maybe Text
a} :: UpdateCampaignOutboundCallConfig)
updateCampaignOutboundCallConfig_connectSourcePhoneNumber :: Lens.Lens' UpdateCampaignOutboundCallConfig (Prelude.Maybe Prelude.Text)
updateCampaignOutboundCallConfig_connectSourcePhoneNumber :: Lens' UpdateCampaignOutboundCallConfig (Maybe Text)
updateCampaignOutboundCallConfig_connectSourcePhoneNumber = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateCampaignOutboundCallConfig' {Maybe Text
connectSourcePhoneNumber :: Maybe Text
$sel:connectSourcePhoneNumber:UpdateCampaignOutboundCallConfig' :: UpdateCampaignOutboundCallConfig -> Maybe Text
connectSourcePhoneNumber} -> Maybe Text
connectSourcePhoneNumber) (\s :: UpdateCampaignOutboundCallConfig
s@UpdateCampaignOutboundCallConfig' {} Maybe Text
a -> UpdateCampaignOutboundCallConfig
s {$sel:connectSourcePhoneNumber:UpdateCampaignOutboundCallConfig' :: Maybe Text
connectSourcePhoneNumber = Maybe Text
a} :: UpdateCampaignOutboundCallConfig)
updateCampaignOutboundCallConfig_id :: Lens.Lens' UpdateCampaignOutboundCallConfig Prelude.Text
updateCampaignOutboundCallConfig_id :: Lens' UpdateCampaignOutboundCallConfig Text
updateCampaignOutboundCallConfig_id = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateCampaignOutboundCallConfig' {Text
id :: Text
$sel:id:UpdateCampaignOutboundCallConfig' :: UpdateCampaignOutboundCallConfig -> Text
id} -> Text
id) (\s :: UpdateCampaignOutboundCallConfig
s@UpdateCampaignOutboundCallConfig' {} Text
a -> UpdateCampaignOutboundCallConfig
s {$sel:id:UpdateCampaignOutboundCallConfig' :: Text
id = Text
a} :: UpdateCampaignOutboundCallConfig)
instance
Core.AWSRequest
UpdateCampaignOutboundCallConfig
where
type
AWSResponse UpdateCampaignOutboundCallConfig =
UpdateCampaignOutboundCallConfigResponse
request :: (Service -> Service)
-> UpdateCampaignOutboundCallConfig
-> Request UpdateCampaignOutboundCallConfig
request Service -> Service
overrides =
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy UpdateCampaignOutboundCallConfig
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse (AWSResponse UpdateCampaignOutboundCallConfig)))
response =
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull
UpdateCampaignOutboundCallConfigResponse
UpdateCampaignOutboundCallConfigResponse'
instance
Prelude.Hashable
UpdateCampaignOutboundCallConfig
where
hashWithSalt :: Int -> UpdateCampaignOutboundCallConfig -> Int
hashWithSalt
Int
_salt
UpdateCampaignOutboundCallConfig' {Maybe Text
Maybe AnswerMachineDetectionConfig
Text
id :: Text
connectSourcePhoneNumber :: Maybe Text
connectContactFlowId :: Maybe Text
answerMachineDetectionConfig :: Maybe AnswerMachineDetectionConfig
$sel:id:UpdateCampaignOutboundCallConfig' :: UpdateCampaignOutboundCallConfig -> Text
$sel:connectSourcePhoneNumber:UpdateCampaignOutboundCallConfig' :: UpdateCampaignOutboundCallConfig -> Maybe Text
$sel:connectContactFlowId:UpdateCampaignOutboundCallConfig' :: UpdateCampaignOutboundCallConfig -> Maybe Text
$sel:answerMachineDetectionConfig:UpdateCampaignOutboundCallConfig' :: UpdateCampaignOutboundCallConfig
-> Maybe AnswerMachineDetectionConfig
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe AnswerMachineDetectionConfig
answerMachineDetectionConfig
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
connectContactFlowId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
connectSourcePhoneNumber
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
id
instance
Prelude.NFData
UpdateCampaignOutboundCallConfig
where
rnf :: UpdateCampaignOutboundCallConfig -> ()
rnf UpdateCampaignOutboundCallConfig' {Maybe Text
Maybe AnswerMachineDetectionConfig
Text
id :: Text
connectSourcePhoneNumber :: Maybe Text
connectContactFlowId :: Maybe Text
answerMachineDetectionConfig :: Maybe AnswerMachineDetectionConfig
$sel:id:UpdateCampaignOutboundCallConfig' :: UpdateCampaignOutboundCallConfig -> Text
$sel:connectSourcePhoneNumber:UpdateCampaignOutboundCallConfig' :: UpdateCampaignOutboundCallConfig -> Maybe Text
$sel:connectContactFlowId:UpdateCampaignOutboundCallConfig' :: UpdateCampaignOutboundCallConfig -> Maybe Text
$sel:answerMachineDetectionConfig:UpdateCampaignOutboundCallConfig' :: UpdateCampaignOutboundCallConfig
-> Maybe AnswerMachineDetectionConfig
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe AnswerMachineDetectionConfig
answerMachineDetectionConfig
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
connectContactFlowId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
connectSourcePhoneNumber
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
id
instance
Data.ToHeaders
UpdateCampaignOutboundCallConfig
where
toHeaders :: UpdateCampaignOutboundCallConfig -> [Header]
toHeaders =
forall a b. a -> b -> a
Prelude.const
( forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"Content-Type"
forall a. ToHeader a => HeaderName -> a -> [Header]
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Data.ToJSON UpdateCampaignOutboundCallConfig where
toJSON :: UpdateCampaignOutboundCallConfig -> Value
toJSON UpdateCampaignOutboundCallConfig' {Maybe Text
Maybe AnswerMachineDetectionConfig
Text
id :: Text
connectSourcePhoneNumber :: Maybe Text
connectContactFlowId :: Maybe Text
answerMachineDetectionConfig :: Maybe AnswerMachineDetectionConfig
$sel:id:UpdateCampaignOutboundCallConfig' :: UpdateCampaignOutboundCallConfig -> Text
$sel:connectSourcePhoneNumber:UpdateCampaignOutboundCallConfig' :: UpdateCampaignOutboundCallConfig -> Maybe Text
$sel:connectContactFlowId:UpdateCampaignOutboundCallConfig' :: UpdateCampaignOutboundCallConfig -> Maybe Text
$sel:answerMachineDetectionConfig:UpdateCampaignOutboundCallConfig' :: UpdateCampaignOutboundCallConfig
-> Maybe AnswerMachineDetectionConfig
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"answerMachineDetectionConfig" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AnswerMachineDetectionConfig
answerMachineDetectionConfig,
(Key
"connectContactFlowId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
connectContactFlowId,
(Key
"connectSourcePhoneNumber" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
connectSourcePhoneNumber
]
)
instance Data.ToPath UpdateCampaignOutboundCallConfig where
toPath :: UpdateCampaignOutboundCallConfig -> ByteString
toPath UpdateCampaignOutboundCallConfig' {Maybe Text
Maybe AnswerMachineDetectionConfig
Text
id :: Text
connectSourcePhoneNumber :: Maybe Text
connectContactFlowId :: Maybe Text
answerMachineDetectionConfig :: Maybe AnswerMachineDetectionConfig
$sel:id:UpdateCampaignOutboundCallConfig' :: UpdateCampaignOutboundCallConfig -> Text
$sel:connectSourcePhoneNumber:UpdateCampaignOutboundCallConfig' :: UpdateCampaignOutboundCallConfig -> Maybe Text
$sel:connectContactFlowId:UpdateCampaignOutboundCallConfig' :: UpdateCampaignOutboundCallConfig -> Maybe Text
$sel:answerMachineDetectionConfig:UpdateCampaignOutboundCallConfig' :: UpdateCampaignOutboundCallConfig
-> Maybe AnswerMachineDetectionConfig
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"/campaigns/",
forall a. ToByteString a => a -> ByteString
Data.toBS Text
id,
ByteString
"/outbound-call-config"
]
instance
Data.ToQuery
UpdateCampaignOutboundCallConfig
where
toQuery :: UpdateCampaignOutboundCallConfig -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data UpdateCampaignOutboundCallConfigResponse = UpdateCampaignOutboundCallConfigResponse'
{
}
deriving (UpdateCampaignOutboundCallConfigResponse
-> UpdateCampaignOutboundCallConfigResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateCampaignOutboundCallConfigResponse
-> UpdateCampaignOutboundCallConfigResponse -> Bool
$c/= :: UpdateCampaignOutboundCallConfigResponse
-> UpdateCampaignOutboundCallConfigResponse -> Bool
== :: UpdateCampaignOutboundCallConfigResponse
-> UpdateCampaignOutboundCallConfigResponse -> Bool
$c== :: UpdateCampaignOutboundCallConfigResponse
-> UpdateCampaignOutboundCallConfigResponse -> Bool
Prelude.Eq, ReadPrec [UpdateCampaignOutboundCallConfigResponse]
ReadPrec UpdateCampaignOutboundCallConfigResponse
Int -> ReadS UpdateCampaignOutboundCallConfigResponse
ReadS [UpdateCampaignOutboundCallConfigResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateCampaignOutboundCallConfigResponse]
$creadListPrec :: ReadPrec [UpdateCampaignOutboundCallConfigResponse]
readPrec :: ReadPrec UpdateCampaignOutboundCallConfigResponse
$creadPrec :: ReadPrec UpdateCampaignOutboundCallConfigResponse
readList :: ReadS [UpdateCampaignOutboundCallConfigResponse]
$creadList :: ReadS [UpdateCampaignOutboundCallConfigResponse]
readsPrec :: Int -> ReadS UpdateCampaignOutboundCallConfigResponse
$creadsPrec :: Int -> ReadS UpdateCampaignOutboundCallConfigResponse
Prelude.Read, Int -> UpdateCampaignOutboundCallConfigResponse -> ShowS
[UpdateCampaignOutboundCallConfigResponse] -> ShowS
UpdateCampaignOutboundCallConfigResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateCampaignOutboundCallConfigResponse] -> ShowS
$cshowList :: [UpdateCampaignOutboundCallConfigResponse] -> ShowS
show :: UpdateCampaignOutboundCallConfigResponse -> String
$cshow :: UpdateCampaignOutboundCallConfigResponse -> String
showsPrec :: Int -> UpdateCampaignOutboundCallConfigResponse -> ShowS
$cshowsPrec :: Int -> UpdateCampaignOutboundCallConfigResponse -> ShowS
Prelude.Show, forall x.
Rep UpdateCampaignOutboundCallConfigResponse x
-> UpdateCampaignOutboundCallConfigResponse
forall x.
UpdateCampaignOutboundCallConfigResponse
-> Rep UpdateCampaignOutboundCallConfigResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateCampaignOutboundCallConfigResponse x
-> UpdateCampaignOutboundCallConfigResponse
$cfrom :: forall x.
UpdateCampaignOutboundCallConfigResponse
-> Rep UpdateCampaignOutboundCallConfigResponse x
Prelude.Generic)
newUpdateCampaignOutboundCallConfigResponse ::
UpdateCampaignOutboundCallConfigResponse
newUpdateCampaignOutboundCallConfigResponse :: UpdateCampaignOutboundCallConfigResponse
newUpdateCampaignOutboundCallConfigResponse =
UpdateCampaignOutboundCallConfigResponse
UpdateCampaignOutboundCallConfigResponse'
instance
Prelude.NFData
UpdateCampaignOutboundCallConfigResponse
where
rnf :: UpdateCampaignOutboundCallConfigResponse -> ()
rnf UpdateCampaignOutboundCallConfigResponse
_ = ()