{-# 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.Connect.UpdateQueueOutboundCallerConfig
(
UpdateQueueOutboundCallerConfig (..),
newUpdateQueueOutboundCallerConfig,
updateQueueOutboundCallerConfig_instanceId,
updateQueueOutboundCallerConfig_queueId,
updateQueueOutboundCallerConfig_outboundCallerConfig,
UpdateQueueOutboundCallerConfigResponse (..),
newUpdateQueueOutboundCallerConfigResponse,
)
where
import Amazonka.Connect.Types
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data UpdateQueueOutboundCallerConfig = UpdateQueueOutboundCallerConfig'
{
UpdateQueueOutboundCallerConfig -> Text
instanceId :: Prelude.Text,
UpdateQueueOutboundCallerConfig -> Text
queueId :: Prelude.Text,
UpdateQueueOutboundCallerConfig -> OutboundCallerConfig
outboundCallerConfig :: OutboundCallerConfig
}
deriving (UpdateQueueOutboundCallerConfig
-> UpdateQueueOutboundCallerConfig -> Bool
(UpdateQueueOutboundCallerConfig
-> UpdateQueueOutboundCallerConfig -> Bool)
-> (UpdateQueueOutboundCallerConfig
-> UpdateQueueOutboundCallerConfig -> Bool)
-> Eq UpdateQueueOutboundCallerConfig
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateQueueOutboundCallerConfig
-> UpdateQueueOutboundCallerConfig -> Bool
$c/= :: UpdateQueueOutboundCallerConfig
-> UpdateQueueOutboundCallerConfig -> Bool
== :: UpdateQueueOutboundCallerConfig
-> UpdateQueueOutboundCallerConfig -> Bool
$c== :: UpdateQueueOutboundCallerConfig
-> UpdateQueueOutboundCallerConfig -> Bool
Prelude.Eq, ReadPrec [UpdateQueueOutboundCallerConfig]
ReadPrec UpdateQueueOutboundCallerConfig
Int -> ReadS UpdateQueueOutboundCallerConfig
ReadS [UpdateQueueOutboundCallerConfig]
(Int -> ReadS UpdateQueueOutboundCallerConfig)
-> ReadS [UpdateQueueOutboundCallerConfig]
-> ReadPrec UpdateQueueOutboundCallerConfig
-> ReadPrec [UpdateQueueOutboundCallerConfig]
-> Read UpdateQueueOutboundCallerConfig
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateQueueOutboundCallerConfig]
$creadListPrec :: ReadPrec [UpdateQueueOutboundCallerConfig]
readPrec :: ReadPrec UpdateQueueOutboundCallerConfig
$creadPrec :: ReadPrec UpdateQueueOutboundCallerConfig
readList :: ReadS [UpdateQueueOutboundCallerConfig]
$creadList :: ReadS [UpdateQueueOutboundCallerConfig]
readsPrec :: Int -> ReadS UpdateQueueOutboundCallerConfig
$creadsPrec :: Int -> ReadS UpdateQueueOutboundCallerConfig
Prelude.Read, Int -> UpdateQueueOutboundCallerConfig -> ShowS
[UpdateQueueOutboundCallerConfig] -> ShowS
UpdateQueueOutboundCallerConfig -> String
(Int -> UpdateQueueOutboundCallerConfig -> ShowS)
-> (UpdateQueueOutboundCallerConfig -> String)
-> ([UpdateQueueOutboundCallerConfig] -> ShowS)
-> Show UpdateQueueOutboundCallerConfig
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateQueueOutboundCallerConfig] -> ShowS
$cshowList :: [UpdateQueueOutboundCallerConfig] -> ShowS
show :: UpdateQueueOutboundCallerConfig -> String
$cshow :: UpdateQueueOutboundCallerConfig -> String
showsPrec :: Int -> UpdateQueueOutboundCallerConfig -> ShowS
$cshowsPrec :: Int -> UpdateQueueOutboundCallerConfig -> ShowS
Prelude.Show, (forall x.
UpdateQueueOutboundCallerConfig
-> Rep UpdateQueueOutboundCallerConfig x)
-> (forall x.
Rep UpdateQueueOutboundCallerConfig x
-> UpdateQueueOutboundCallerConfig)
-> Generic UpdateQueueOutboundCallerConfig
forall x.
Rep UpdateQueueOutboundCallerConfig x
-> UpdateQueueOutboundCallerConfig
forall x.
UpdateQueueOutboundCallerConfig
-> Rep UpdateQueueOutboundCallerConfig x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateQueueOutboundCallerConfig x
-> UpdateQueueOutboundCallerConfig
$cfrom :: forall x.
UpdateQueueOutboundCallerConfig
-> Rep UpdateQueueOutboundCallerConfig x
Prelude.Generic)
newUpdateQueueOutboundCallerConfig ::
Prelude.Text ->
Prelude.Text ->
OutboundCallerConfig ->
UpdateQueueOutboundCallerConfig
newUpdateQueueOutboundCallerConfig :: Text
-> Text -> OutboundCallerConfig -> UpdateQueueOutboundCallerConfig
newUpdateQueueOutboundCallerConfig
Text
pInstanceId_
Text
pQueueId_
OutboundCallerConfig
pOutboundCallerConfig_ =
UpdateQueueOutboundCallerConfig' :: Text
-> Text -> OutboundCallerConfig -> UpdateQueueOutboundCallerConfig
UpdateQueueOutboundCallerConfig'
{ $sel:instanceId:UpdateQueueOutboundCallerConfig' :: Text
instanceId =
Text
pInstanceId_,
$sel:queueId:UpdateQueueOutboundCallerConfig' :: Text
queueId = Text
pQueueId_,
$sel:outboundCallerConfig:UpdateQueueOutboundCallerConfig' :: OutboundCallerConfig
outboundCallerConfig =
OutboundCallerConfig
pOutboundCallerConfig_
}
updateQueueOutboundCallerConfig_instanceId :: Lens.Lens' UpdateQueueOutboundCallerConfig Prelude.Text
updateQueueOutboundCallerConfig_instanceId :: (Text -> f Text)
-> UpdateQueueOutboundCallerConfig
-> f UpdateQueueOutboundCallerConfig
updateQueueOutboundCallerConfig_instanceId = (UpdateQueueOutboundCallerConfig -> Text)
-> (UpdateQueueOutboundCallerConfig
-> Text -> UpdateQueueOutboundCallerConfig)
-> Lens
UpdateQueueOutboundCallerConfig
UpdateQueueOutboundCallerConfig
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateQueueOutboundCallerConfig' {Text
instanceId :: Text
$sel:instanceId:UpdateQueueOutboundCallerConfig' :: UpdateQueueOutboundCallerConfig -> Text
instanceId} -> Text
instanceId) (\s :: UpdateQueueOutboundCallerConfig
s@UpdateQueueOutboundCallerConfig' {} Text
a -> UpdateQueueOutboundCallerConfig
s {$sel:instanceId:UpdateQueueOutboundCallerConfig' :: Text
instanceId = Text
a} :: UpdateQueueOutboundCallerConfig)
updateQueueOutboundCallerConfig_queueId :: Lens.Lens' UpdateQueueOutboundCallerConfig Prelude.Text
updateQueueOutboundCallerConfig_queueId :: (Text -> f Text)
-> UpdateQueueOutboundCallerConfig
-> f UpdateQueueOutboundCallerConfig
updateQueueOutboundCallerConfig_queueId = (UpdateQueueOutboundCallerConfig -> Text)
-> (UpdateQueueOutboundCallerConfig
-> Text -> UpdateQueueOutboundCallerConfig)
-> Lens
UpdateQueueOutboundCallerConfig
UpdateQueueOutboundCallerConfig
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateQueueOutboundCallerConfig' {Text
queueId :: Text
$sel:queueId:UpdateQueueOutboundCallerConfig' :: UpdateQueueOutboundCallerConfig -> Text
queueId} -> Text
queueId) (\s :: UpdateQueueOutboundCallerConfig
s@UpdateQueueOutboundCallerConfig' {} Text
a -> UpdateQueueOutboundCallerConfig
s {$sel:queueId:UpdateQueueOutboundCallerConfig' :: Text
queueId = Text
a} :: UpdateQueueOutboundCallerConfig)
updateQueueOutboundCallerConfig_outboundCallerConfig :: Lens.Lens' UpdateQueueOutboundCallerConfig OutboundCallerConfig
updateQueueOutboundCallerConfig_outboundCallerConfig :: (OutboundCallerConfig -> f OutboundCallerConfig)
-> UpdateQueueOutboundCallerConfig
-> f UpdateQueueOutboundCallerConfig
updateQueueOutboundCallerConfig_outboundCallerConfig = (UpdateQueueOutboundCallerConfig -> OutboundCallerConfig)
-> (UpdateQueueOutboundCallerConfig
-> OutboundCallerConfig -> UpdateQueueOutboundCallerConfig)
-> Lens
UpdateQueueOutboundCallerConfig
UpdateQueueOutboundCallerConfig
OutboundCallerConfig
OutboundCallerConfig
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateQueueOutboundCallerConfig' {OutboundCallerConfig
outboundCallerConfig :: OutboundCallerConfig
$sel:outboundCallerConfig:UpdateQueueOutboundCallerConfig' :: UpdateQueueOutboundCallerConfig -> OutboundCallerConfig
outboundCallerConfig} -> OutboundCallerConfig
outboundCallerConfig) (\s :: UpdateQueueOutboundCallerConfig
s@UpdateQueueOutboundCallerConfig' {} OutboundCallerConfig
a -> UpdateQueueOutboundCallerConfig
s {$sel:outboundCallerConfig:UpdateQueueOutboundCallerConfig' :: OutboundCallerConfig
outboundCallerConfig = OutboundCallerConfig
a} :: UpdateQueueOutboundCallerConfig)
instance
Core.AWSRequest
UpdateQueueOutboundCallerConfig
where
type
AWSResponse UpdateQueueOutboundCallerConfig =
UpdateQueueOutboundCallerConfigResponse
request :: UpdateQueueOutboundCallerConfig
-> Request UpdateQueueOutboundCallerConfig
request = Service
-> UpdateQueueOutboundCallerConfig
-> Request UpdateQueueOutboundCallerConfig
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy UpdateQueueOutboundCallerConfig
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse (AWSResponse UpdateQueueOutboundCallerConfig)))
response =
AWSResponse UpdateQueueOutboundCallerConfig
-> Logger
-> Service
-> Proxy UpdateQueueOutboundCallerConfig
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse (AWSResponse UpdateQueueOutboundCallerConfig)))
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull
AWSResponse UpdateQueueOutboundCallerConfig
UpdateQueueOutboundCallerConfigResponse
UpdateQueueOutboundCallerConfigResponse'
instance
Prelude.Hashable
UpdateQueueOutboundCallerConfig
instance
Prelude.NFData
UpdateQueueOutboundCallerConfig
instance
Core.ToHeaders
UpdateQueueOutboundCallerConfig
where
toHeaders :: UpdateQueueOutboundCallerConfig -> [Header]
toHeaders =
[Header] -> UpdateQueueOutboundCallerConfig -> [Header]
forall a b. a -> b -> a
Prelude.const
( [[Header]] -> [Header]
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"Content-Type"
HeaderName -> ByteString -> [Header]
forall a. ToHeader a => HeaderName -> a -> [Header]
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Core.ToJSON UpdateQueueOutboundCallerConfig where
toJSON :: UpdateQueueOutboundCallerConfig -> Value
toJSON UpdateQueueOutboundCallerConfig' {Text
OutboundCallerConfig
outboundCallerConfig :: OutboundCallerConfig
queueId :: Text
instanceId :: Text
$sel:outboundCallerConfig:UpdateQueueOutboundCallerConfig' :: UpdateQueueOutboundCallerConfig -> OutboundCallerConfig
$sel:queueId:UpdateQueueOutboundCallerConfig' :: UpdateQueueOutboundCallerConfig -> Text
$sel:instanceId:UpdateQueueOutboundCallerConfig' :: UpdateQueueOutboundCallerConfig -> Text
..} =
[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
"OutboundCallerConfig"
Text -> OutboundCallerConfig -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= OutboundCallerConfig
outboundCallerConfig
)
]
)
instance Core.ToPath UpdateQueueOutboundCallerConfig where
toPath :: UpdateQueueOutboundCallerConfig -> ByteString
toPath UpdateQueueOutboundCallerConfig' {Text
OutboundCallerConfig
outboundCallerConfig :: OutboundCallerConfig
queueId :: Text
instanceId :: Text
$sel:outboundCallerConfig:UpdateQueueOutboundCallerConfig' :: UpdateQueueOutboundCallerConfig -> OutboundCallerConfig
$sel:queueId:UpdateQueueOutboundCallerConfig' :: UpdateQueueOutboundCallerConfig -> Text
$sel:instanceId:UpdateQueueOutboundCallerConfig' :: UpdateQueueOutboundCallerConfig -> Text
..} =
[ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"/queues/",
Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
instanceId,
ByteString
"/",
Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
queueId,
ByteString
"/outbound-caller-config"
]
instance Core.ToQuery UpdateQueueOutboundCallerConfig where
toQuery :: UpdateQueueOutboundCallerConfig -> QueryString
toQuery = QueryString -> UpdateQueueOutboundCallerConfig -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data UpdateQueueOutboundCallerConfigResponse = UpdateQueueOutboundCallerConfigResponse'
{
}
deriving (UpdateQueueOutboundCallerConfigResponse
-> UpdateQueueOutboundCallerConfigResponse -> Bool
(UpdateQueueOutboundCallerConfigResponse
-> UpdateQueueOutboundCallerConfigResponse -> Bool)
-> (UpdateQueueOutboundCallerConfigResponse
-> UpdateQueueOutboundCallerConfigResponse -> Bool)
-> Eq UpdateQueueOutboundCallerConfigResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateQueueOutboundCallerConfigResponse
-> UpdateQueueOutboundCallerConfigResponse -> Bool
$c/= :: UpdateQueueOutboundCallerConfigResponse
-> UpdateQueueOutboundCallerConfigResponse -> Bool
== :: UpdateQueueOutboundCallerConfigResponse
-> UpdateQueueOutboundCallerConfigResponse -> Bool
$c== :: UpdateQueueOutboundCallerConfigResponse
-> UpdateQueueOutboundCallerConfigResponse -> Bool
Prelude.Eq, ReadPrec [UpdateQueueOutboundCallerConfigResponse]
ReadPrec UpdateQueueOutboundCallerConfigResponse
Int -> ReadS UpdateQueueOutboundCallerConfigResponse
ReadS [UpdateQueueOutboundCallerConfigResponse]
(Int -> ReadS UpdateQueueOutboundCallerConfigResponse)
-> ReadS [UpdateQueueOutboundCallerConfigResponse]
-> ReadPrec UpdateQueueOutboundCallerConfigResponse
-> ReadPrec [UpdateQueueOutboundCallerConfigResponse]
-> Read UpdateQueueOutboundCallerConfigResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateQueueOutboundCallerConfigResponse]
$creadListPrec :: ReadPrec [UpdateQueueOutboundCallerConfigResponse]
readPrec :: ReadPrec UpdateQueueOutboundCallerConfigResponse
$creadPrec :: ReadPrec UpdateQueueOutboundCallerConfigResponse
readList :: ReadS [UpdateQueueOutboundCallerConfigResponse]
$creadList :: ReadS [UpdateQueueOutboundCallerConfigResponse]
readsPrec :: Int -> ReadS UpdateQueueOutboundCallerConfigResponse
$creadsPrec :: Int -> ReadS UpdateQueueOutboundCallerConfigResponse
Prelude.Read, Int -> UpdateQueueOutboundCallerConfigResponse -> ShowS
[UpdateQueueOutboundCallerConfigResponse] -> ShowS
UpdateQueueOutboundCallerConfigResponse -> String
(Int -> UpdateQueueOutboundCallerConfigResponse -> ShowS)
-> (UpdateQueueOutboundCallerConfigResponse -> String)
-> ([UpdateQueueOutboundCallerConfigResponse] -> ShowS)
-> Show UpdateQueueOutboundCallerConfigResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateQueueOutboundCallerConfigResponse] -> ShowS
$cshowList :: [UpdateQueueOutboundCallerConfigResponse] -> ShowS
show :: UpdateQueueOutboundCallerConfigResponse -> String
$cshow :: UpdateQueueOutboundCallerConfigResponse -> String
showsPrec :: Int -> UpdateQueueOutboundCallerConfigResponse -> ShowS
$cshowsPrec :: Int -> UpdateQueueOutboundCallerConfigResponse -> ShowS
Prelude.Show, (forall x.
UpdateQueueOutboundCallerConfigResponse
-> Rep UpdateQueueOutboundCallerConfigResponse x)
-> (forall x.
Rep UpdateQueueOutboundCallerConfigResponse x
-> UpdateQueueOutboundCallerConfigResponse)
-> Generic UpdateQueueOutboundCallerConfigResponse
forall x.
Rep UpdateQueueOutboundCallerConfigResponse x
-> UpdateQueueOutboundCallerConfigResponse
forall x.
UpdateQueueOutboundCallerConfigResponse
-> Rep UpdateQueueOutboundCallerConfigResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateQueueOutboundCallerConfigResponse x
-> UpdateQueueOutboundCallerConfigResponse
$cfrom :: forall x.
UpdateQueueOutboundCallerConfigResponse
-> Rep UpdateQueueOutboundCallerConfigResponse x
Prelude.Generic)
newUpdateQueueOutboundCallerConfigResponse ::
UpdateQueueOutboundCallerConfigResponse
newUpdateQueueOutboundCallerConfigResponse :: UpdateQueueOutboundCallerConfigResponse
newUpdateQueueOutboundCallerConfigResponse =
UpdateQueueOutboundCallerConfigResponse
UpdateQueueOutboundCallerConfigResponse'
instance
Prelude.NFData
UpdateQueueOutboundCallerConfigResponse