{-# 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.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 UpdateQueueOutboundCallerConfig = UpdateQueueOutboundCallerConfig'
{
UpdateQueueOutboundCallerConfig -> Text
instanceId :: Prelude.Text,
UpdateQueueOutboundCallerConfig -> Text
queueId :: Prelude.Text,
UpdateQueueOutboundCallerConfig -> OutboundCallerConfig
outboundCallerConfig :: OutboundCallerConfig
}
deriving (UpdateQueueOutboundCallerConfig
-> UpdateQueueOutboundCallerConfig -> Bool
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]
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
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.
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'
{ $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 :: Lens' UpdateQueueOutboundCallerConfig Text
updateQueueOutboundCallerConfig_instanceId = 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 :: Lens' UpdateQueueOutboundCallerConfig Text
updateQueueOutboundCallerConfig_queueId = 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 :: Lens' UpdateQueueOutboundCallerConfig OutboundCallerConfig
updateQueueOutboundCallerConfig_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 :: (Service -> Service)
-> UpdateQueueOutboundCallerConfig
-> Request UpdateQueueOutboundCallerConfig
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 UpdateQueueOutboundCallerConfig
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse (AWSResponse UpdateQueueOutboundCallerConfig)))
response =
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull
UpdateQueueOutboundCallerConfigResponse
UpdateQueueOutboundCallerConfigResponse'
instance
Prelude.Hashable
UpdateQueueOutboundCallerConfig
where
hashWithSalt :: Int -> UpdateQueueOutboundCallerConfig -> Int
hashWithSalt
Int
_salt
UpdateQueueOutboundCallerConfig' {Text
OutboundCallerConfig
outboundCallerConfig :: OutboundCallerConfig
queueId :: Text
instanceId :: Text
$sel:outboundCallerConfig:UpdateQueueOutboundCallerConfig' :: UpdateQueueOutboundCallerConfig -> OutboundCallerConfig
$sel:queueId:UpdateQueueOutboundCallerConfig' :: UpdateQueueOutboundCallerConfig -> Text
$sel:instanceId:UpdateQueueOutboundCallerConfig' :: UpdateQueueOutboundCallerConfig -> Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
instanceId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
queueId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` OutboundCallerConfig
outboundCallerConfig
instance
Prelude.NFData
UpdateQueueOutboundCallerConfig
where
rnf :: UpdateQueueOutboundCallerConfig -> ()
rnf UpdateQueueOutboundCallerConfig' {Text
OutboundCallerConfig
outboundCallerConfig :: OutboundCallerConfig
queueId :: Text
instanceId :: Text
$sel:outboundCallerConfig:UpdateQueueOutboundCallerConfig' :: UpdateQueueOutboundCallerConfig -> OutboundCallerConfig
$sel:queueId:UpdateQueueOutboundCallerConfig' :: UpdateQueueOutboundCallerConfig -> Text
$sel:instanceId:UpdateQueueOutboundCallerConfig' :: UpdateQueueOutboundCallerConfig -> Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Text
instanceId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
queueId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf OutboundCallerConfig
outboundCallerConfig
instance
Data.ToHeaders
UpdateQueueOutboundCallerConfig
where
toHeaders :: UpdateQueueOutboundCallerConfig -> [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 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
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ forall a. a -> Maybe a
Prelude.Just
( Key
"OutboundCallerConfig"
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= OutboundCallerConfig
outboundCallerConfig
)
]
)
instance Data.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
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"/queues/",
forall a. ToByteString a => a -> ByteString
Data.toBS Text
instanceId,
ByteString
"/",
forall a. ToByteString a => a -> ByteString
Data.toBS Text
queueId,
ByteString
"/outbound-caller-config"
]
instance Data.ToQuery UpdateQueueOutboundCallerConfig where
toQuery :: UpdateQueueOutboundCallerConfig -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data UpdateQueueOutboundCallerConfigResponse = UpdateQueueOutboundCallerConfigResponse'
{
}
deriving (UpdateQueueOutboundCallerConfigResponse
-> UpdateQueueOutboundCallerConfigResponse -> Bool
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]
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
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.
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
where
rnf :: UpdateQueueOutboundCallerConfigResponse -> ()
rnf UpdateQueueOutboundCallerConfigResponse
_ = ()