{-# 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.UpdateRoutingProfileQueues
(
UpdateRoutingProfileQueues (..),
newUpdateRoutingProfileQueues,
updateRoutingProfileQueues_instanceId,
updateRoutingProfileQueues_routingProfileId,
updateRoutingProfileQueues_queueConfigs,
UpdateRoutingProfileQueuesResponse (..),
newUpdateRoutingProfileQueuesResponse,
)
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 UpdateRoutingProfileQueues = UpdateRoutingProfileQueues'
{
UpdateRoutingProfileQueues -> Text
instanceId :: Prelude.Text,
UpdateRoutingProfileQueues -> Text
routingProfileId :: Prelude.Text,
UpdateRoutingProfileQueues -> NonEmpty RoutingProfileQueueConfig
queueConfigs :: Prelude.NonEmpty RoutingProfileQueueConfig
}
deriving (UpdateRoutingProfileQueues -> UpdateRoutingProfileQueues -> Bool
(UpdateRoutingProfileQueues -> UpdateRoutingProfileQueues -> Bool)
-> (UpdateRoutingProfileQueues
-> UpdateRoutingProfileQueues -> Bool)
-> Eq UpdateRoutingProfileQueues
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateRoutingProfileQueues -> UpdateRoutingProfileQueues -> Bool
$c/= :: UpdateRoutingProfileQueues -> UpdateRoutingProfileQueues -> Bool
== :: UpdateRoutingProfileQueues -> UpdateRoutingProfileQueues -> Bool
$c== :: UpdateRoutingProfileQueues -> UpdateRoutingProfileQueues -> Bool
Prelude.Eq, ReadPrec [UpdateRoutingProfileQueues]
ReadPrec UpdateRoutingProfileQueues
Int -> ReadS UpdateRoutingProfileQueues
ReadS [UpdateRoutingProfileQueues]
(Int -> ReadS UpdateRoutingProfileQueues)
-> ReadS [UpdateRoutingProfileQueues]
-> ReadPrec UpdateRoutingProfileQueues
-> ReadPrec [UpdateRoutingProfileQueues]
-> Read UpdateRoutingProfileQueues
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateRoutingProfileQueues]
$creadListPrec :: ReadPrec [UpdateRoutingProfileQueues]
readPrec :: ReadPrec UpdateRoutingProfileQueues
$creadPrec :: ReadPrec UpdateRoutingProfileQueues
readList :: ReadS [UpdateRoutingProfileQueues]
$creadList :: ReadS [UpdateRoutingProfileQueues]
readsPrec :: Int -> ReadS UpdateRoutingProfileQueues
$creadsPrec :: Int -> ReadS UpdateRoutingProfileQueues
Prelude.Read, Int -> UpdateRoutingProfileQueues -> ShowS
[UpdateRoutingProfileQueues] -> ShowS
UpdateRoutingProfileQueues -> String
(Int -> UpdateRoutingProfileQueues -> ShowS)
-> (UpdateRoutingProfileQueues -> String)
-> ([UpdateRoutingProfileQueues] -> ShowS)
-> Show UpdateRoutingProfileQueues
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateRoutingProfileQueues] -> ShowS
$cshowList :: [UpdateRoutingProfileQueues] -> ShowS
show :: UpdateRoutingProfileQueues -> String
$cshow :: UpdateRoutingProfileQueues -> String
showsPrec :: Int -> UpdateRoutingProfileQueues -> ShowS
$cshowsPrec :: Int -> UpdateRoutingProfileQueues -> ShowS
Prelude.Show, (forall x.
UpdateRoutingProfileQueues -> Rep UpdateRoutingProfileQueues x)
-> (forall x.
Rep UpdateRoutingProfileQueues x -> UpdateRoutingProfileQueues)
-> Generic UpdateRoutingProfileQueues
forall x.
Rep UpdateRoutingProfileQueues x -> UpdateRoutingProfileQueues
forall x.
UpdateRoutingProfileQueues -> Rep UpdateRoutingProfileQueues x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateRoutingProfileQueues x -> UpdateRoutingProfileQueues
$cfrom :: forall x.
UpdateRoutingProfileQueues -> Rep UpdateRoutingProfileQueues x
Prelude.Generic)
newUpdateRoutingProfileQueues ::
Prelude.Text ->
Prelude.Text ->
Prelude.NonEmpty RoutingProfileQueueConfig ->
UpdateRoutingProfileQueues
newUpdateRoutingProfileQueues :: Text
-> Text
-> NonEmpty RoutingProfileQueueConfig
-> UpdateRoutingProfileQueues
newUpdateRoutingProfileQueues
Text
pInstanceId_
Text
pRoutingProfileId_
NonEmpty RoutingProfileQueueConfig
pQueueConfigs_ =
UpdateRoutingProfileQueues' :: Text
-> Text
-> NonEmpty RoutingProfileQueueConfig
-> UpdateRoutingProfileQueues
UpdateRoutingProfileQueues'
{ $sel:instanceId:UpdateRoutingProfileQueues' :: Text
instanceId =
Text
pInstanceId_,
$sel:routingProfileId:UpdateRoutingProfileQueues' :: Text
routingProfileId = Text
pRoutingProfileId_,
$sel:queueConfigs:UpdateRoutingProfileQueues' :: NonEmpty RoutingProfileQueueConfig
queueConfigs =
Tagged
(NonEmpty RoutingProfileQueueConfig)
(Identity (NonEmpty RoutingProfileQueueConfig))
-> Tagged
(NonEmpty RoutingProfileQueueConfig)
(Identity (NonEmpty RoutingProfileQueueConfig))
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced (Tagged
(NonEmpty RoutingProfileQueueConfig)
(Identity (NonEmpty RoutingProfileQueueConfig))
-> Tagged
(NonEmpty RoutingProfileQueueConfig)
(Identity (NonEmpty RoutingProfileQueueConfig)))
-> NonEmpty RoutingProfileQueueConfig
-> NonEmpty RoutingProfileQueueConfig
forall t b. AReview t b -> b -> t
Lens.# NonEmpty RoutingProfileQueueConfig
pQueueConfigs_
}
updateRoutingProfileQueues_instanceId :: Lens.Lens' UpdateRoutingProfileQueues Prelude.Text
updateRoutingProfileQueues_instanceId :: (Text -> f Text)
-> UpdateRoutingProfileQueues -> f UpdateRoutingProfileQueues
updateRoutingProfileQueues_instanceId = (UpdateRoutingProfileQueues -> Text)
-> (UpdateRoutingProfileQueues
-> Text -> UpdateRoutingProfileQueues)
-> Lens
UpdateRoutingProfileQueues UpdateRoutingProfileQueues Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateRoutingProfileQueues' {Text
instanceId :: Text
$sel:instanceId:UpdateRoutingProfileQueues' :: UpdateRoutingProfileQueues -> Text
instanceId} -> Text
instanceId) (\s :: UpdateRoutingProfileQueues
s@UpdateRoutingProfileQueues' {} Text
a -> UpdateRoutingProfileQueues
s {$sel:instanceId:UpdateRoutingProfileQueues' :: Text
instanceId = Text
a} :: UpdateRoutingProfileQueues)
updateRoutingProfileQueues_routingProfileId :: Lens.Lens' UpdateRoutingProfileQueues Prelude.Text
updateRoutingProfileQueues_routingProfileId :: (Text -> f Text)
-> UpdateRoutingProfileQueues -> f UpdateRoutingProfileQueues
updateRoutingProfileQueues_routingProfileId = (UpdateRoutingProfileQueues -> Text)
-> (UpdateRoutingProfileQueues
-> Text -> UpdateRoutingProfileQueues)
-> Lens
UpdateRoutingProfileQueues UpdateRoutingProfileQueues Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateRoutingProfileQueues' {Text
routingProfileId :: Text
$sel:routingProfileId:UpdateRoutingProfileQueues' :: UpdateRoutingProfileQueues -> Text
routingProfileId} -> Text
routingProfileId) (\s :: UpdateRoutingProfileQueues
s@UpdateRoutingProfileQueues' {} Text
a -> UpdateRoutingProfileQueues
s {$sel:routingProfileId:UpdateRoutingProfileQueues' :: Text
routingProfileId = Text
a} :: UpdateRoutingProfileQueues)
updateRoutingProfileQueues_queueConfigs :: Lens.Lens' UpdateRoutingProfileQueues (Prelude.NonEmpty RoutingProfileQueueConfig)
updateRoutingProfileQueues_queueConfigs :: (NonEmpty RoutingProfileQueueConfig
-> f (NonEmpty RoutingProfileQueueConfig))
-> UpdateRoutingProfileQueues -> f UpdateRoutingProfileQueues
updateRoutingProfileQueues_queueConfigs = (UpdateRoutingProfileQueues -> NonEmpty RoutingProfileQueueConfig)
-> (UpdateRoutingProfileQueues
-> NonEmpty RoutingProfileQueueConfig
-> UpdateRoutingProfileQueues)
-> Lens
UpdateRoutingProfileQueues
UpdateRoutingProfileQueues
(NonEmpty RoutingProfileQueueConfig)
(NonEmpty RoutingProfileQueueConfig)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateRoutingProfileQueues' {NonEmpty RoutingProfileQueueConfig
queueConfigs :: NonEmpty RoutingProfileQueueConfig
$sel:queueConfigs:UpdateRoutingProfileQueues' :: UpdateRoutingProfileQueues -> NonEmpty RoutingProfileQueueConfig
queueConfigs} -> NonEmpty RoutingProfileQueueConfig
queueConfigs) (\s :: UpdateRoutingProfileQueues
s@UpdateRoutingProfileQueues' {} NonEmpty RoutingProfileQueueConfig
a -> UpdateRoutingProfileQueues
s {$sel:queueConfigs:UpdateRoutingProfileQueues' :: NonEmpty RoutingProfileQueueConfig
queueConfigs = NonEmpty RoutingProfileQueueConfig
a} :: UpdateRoutingProfileQueues) ((NonEmpty RoutingProfileQueueConfig
-> f (NonEmpty RoutingProfileQueueConfig))
-> UpdateRoutingProfileQueues -> f UpdateRoutingProfileQueues)
-> ((NonEmpty RoutingProfileQueueConfig
-> f (NonEmpty RoutingProfileQueueConfig))
-> NonEmpty RoutingProfileQueueConfig
-> f (NonEmpty RoutingProfileQueueConfig))
-> (NonEmpty RoutingProfileQueueConfig
-> f (NonEmpty RoutingProfileQueueConfig))
-> UpdateRoutingProfileQueues
-> f UpdateRoutingProfileQueues
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (NonEmpty RoutingProfileQueueConfig
-> f (NonEmpty RoutingProfileQueueConfig))
-> NonEmpty RoutingProfileQueueConfig
-> f (NonEmpty RoutingProfileQueueConfig)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Core.AWSRequest UpdateRoutingProfileQueues where
type
AWSResponse UpdateRoutingProfileQueues =
UpdateRoutingProfileQueuesResponse
request :: UpdateRoutingProfileQueues -> Request UpdateRoutingProfileQueues
request = Service
-> UpdateRoutingProfileQueues -> Request UpdateRoutingProfileQueues
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy UpdateRoutingProfileQueues
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse UpdateRoutingProfileQueues)))
response =
AWSResponse UpdateRoutingProfileQueues
-> Logger
-> Service
-> Proxy UpdateRoutingProfileQueues
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse UpdateRoutingProfileQueues)))
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull
AWSResponse UpdateRoutingProfileQueues
UpdateRoutingProfileQueuesResponse
UpdateRoutingProfileQueuesResponse'
instance Prelude.Hashable UpdateRoutingProfileQueues
instance Prelude.NFData UpdateRoutingProfileQueues
instance Core.ToHeaders UpdateRoutingProfileQueues where
toHeaders :: UpdateRoutingProfileQueues -> [Header]
toHeaders =
[Header] -> UpdateRoutingProfileQueues -> [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 UpdateRoutingProfileQueues where
toJSON :: UpdateRoutingProfileQueues -> Value
toJSON UpdateRoutingProfileQueues' {NonEmpty RoutingProfileQueueConfig
Text
queueConfigs :: NonEmpty RoutingProfileQueueConfig
routingProfileId :: Text
instanceId :: Text
$sel:queueConfigs:UpdateRoutingProfileQueues' :: UpdateRoutingProfileQueues -> NonEmpty RoutingProfileQueueConfig
$sel:routingProfileId:UpdateRoutingProfileQueues' :: UpdateRoutingProfileQueues -> Text
$sel:instanceId:UpdateRoutingProfileQueues' :: UpdateRoutingProfileQueues -> 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
"QueueConfigs" Text -> NonEmpty RoutingProfileQueueConfig -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= NonEmpty RoutingProfileQueueConfig
queueConfigs)]
)
instance Core.ToPath UpdateRoutingProfileQueues where
toPath :: UpdateRoutingProfileQueues -> ByteString
toPath UpdateRoutingProfileQueues' {NonEmpty RoutingProfileQueueConfig
Text
queueConfigs :: NonEmpty RoutingProfileQueueConfig
routingProfileId :: Text
instanceId :: Text
$sel:queueConfigs:UpdateRoutingProfileQueues' :: UpdateRoutingProfileQueues -> NonEmpty RoutingProfileQueueConfig
$sel:routingProfileId:UpdateRoutingProfileQueues' :: UpdateRoutingProfileQueues -> Text
$sel:instanceId:UpdateRoutingProfileQueues' :: UpdateRoutingProfileQueues -> Text
..} =
[ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"/routing-profiles/",
Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
instanceId,
ByteString
"/",
Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
routingProfileId,
ByteString
"/queues"
]
instance Core.ToQuery UpdateRoutingProfileQueues where
toQuery :: UpdateRoutingProfileQueues -> QueryString
toQuery = QueryString -> UpdateRoutingProfileQueues -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data UpdateRoutingProfileQueuesResponse = UpdateRoutingProfileQueuesResponse'
{
}
deriving (UpdateRoutingProfileQueuesResponse
-> UpdateRoutingProfileQueuesResponse -> Bool
(UpdateRoutingProfileQueuesResponse
-> UpdateRoutingProfileQueuesResponse -> Bool)
-> (UpdateRoutingProfileQueuesResponse
-> UpdateRoutingProfileQueuesResponse -> Bool)
-> Eq UpdateRoutingProfileQueuesResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateRoutingProfileQueuesResponse
-> UpdateRoutingProfileQueuesResponse -> Bool
$c/= :: UpdateRoutingProfileQueuesResponse
-> UpdateRoutingProfileQueuesResponse -> Bool
== :: UpdateRoutingProfileQueuesResponse
-> UpdateRoutingProfileQueuesResponse -> Bool
$c== :: UpdateRoutingProfileQueuesResponse
-> UpdateRoutingProfileQueuesResponse -> Bool
Prelude.Eq, ReadPrec [UpdateRoutingProfileQueuesResponse]
ReadPrec UpdateRoutingProfileQueuesResponse
Int -> ReadS UpdateRoutingProfileQueuesResponse
ReadS [UpdateRoutingProfileQueuesResponse]
(Int -> ReadS UpdateRoutingProfileQueuesResponse)
-> ReadS [UpdateRoutingProfileQueuesResponse]
-> ReadPrec UpdateRoutingProfileQueuesResponse
-> ReadPrec [UpdateRoutingProfileQueuesResponse]
-> Read UpdateRoutingProfileQueuesResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateRoutingProfileQueuesResponse]
$creadListPrec :: ReadPrec [UpdateRoutingProfileQueuesResponse]
readPrec :: ReadPrec UpdateRoutingProfileQueuesResponse
$creadPrec :: ReadPrec UpdateRoutingProfileQueuesResponse
readList :: ReadS [UpdateRoutingProfileQueuesResponse]
$creadList :: ReadS [UpdateRoutingProfileQueuesResponse]
readsPrec :: Int -> ReadS UpdateRoutingProfileQueuesResponse
$creadsPrec :: Int -> ReadS UpdateRoutingProfileQueuesResponse
Prelude.Read, Int -> UpdateRoutingProfileQueuesResponse -> ShowS
[UpdateRoutingProfileQueuesResponse] -> ShowS
UpdateRoutingProfileQueuesResponse -> String
(Int -> UpdateRoutingProfileQueuesResponse -> ShowS)
-> (UpdateRoutingProfileQueuesResponse -> String)
-> ([UpdateRoutingProfileQueuesResponse] -> ShowS)
-> Show UpdateRoutingProfileQueuesResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateRoutingProfileQueuesResponse] -> ShowS
$cshowList :: [UpdateRoutingProfileQueuesResponse] -> ShowS
show :: UpdateRoutingProfileQueuesResponse -> String
$cshow :: UpdateRoutingProfileQueuesResponse -> String
showsPrec :: Int -> UpdateRoutingProfileQueuesResponse -> ShowS
$cshowsPrec :: Int -> UpdateRoutingProfileQueuesResponse -> ShowS
Prelude.Show, (forall x.
UpdateRoutingProfileQueuesResponse
-> Rep UpdateRoutingProfileQueuesResponse x)
-> (forall x.
Rep UpdateRoutingProfileQueuesResponse x
-> UpdateRoutingProfileQueuesResponse)
-> Generic UpdateRoutingProfileQueuesResponse
forall x.
Rep UpdateRoutingProfileQueuesResponse x
-> UpdateRoutingProfileQueuesResponse
forall x.
UpdateRoutingProfileQueuesResponse
-> Rep UpdateRoutingProfileQueuesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateRoutingProfileQueuesResponse x
-> UpdateRoutingProfileQueuesResponse
$cfrom :: forall x.
UpdateRoutingProfileQueuesResponse
-> Rep UpdateRoutingProfileQueuesResponse x
Prelude.Generic)
newUpdateRoutingProfileQueuesResponse ::
UpdateRoutingProfileQueuesResponse
newUpdateRoutingProfileQueuesResponse :: UpdateRoutingProfileQueuesResponse
newUpdateRoutingProfileQueuesResponse =
UpdateRoutingProfileQueuesResponse
UpdateRoutingProfileQueuesResponse'
instance
Prelude.NFData
UpdateRoutingProfileQueuesResponse