{-# 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.UpdateRoutingProfileConcurrency
(
UpdateRoutingProfileConcurrency (..),
newUpdateRoutingProfileConcurrency,
updateRoutingProfileConcurrency_instanceId,
updateRoutingProfileConcurrency_routingProfileId,
updateRoutingProfileConcurrency_mediaConcurrencies,
UpdateRoutingProfileConcurrencyResponse (..),
newUpdateRoutingProfileConcurrencyResponse,
)
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 UpdateRoutingProfileConcurrency = UpdateRoutingProfileConcurrency'
{
UpdateRoutingProfileConcurrency -> Text
instanceId :: Prelude.Text,
UpdateRoutingProfileConcurrency -> Text
routingProfileId :: Prelude.Text,
UpdateRoutingProfileConcurrency -> [MediaConcurrency]
mediaConcurrencies :: [MediaConcurrency]
}
deriving (UpdateRoutingProfileConcurrency
-> UpdateRoutingProfileConcurrency -> Bool
(UpdateRoutingProfileConcurrency
-> UpdateRoutingProfileConcurrency -> Bool)
-> (UpdateRoutingProfileConcurrency
-> UpdateRoutingProfileConcurrency -> Bool)
-> Eq UpdateRoutingProfileConcurrency
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateRoutingProfileConcurrency
-> UpdateRoutingProfileConcurrency -> Bool
$c/= :: UpdateRoutingProfileConcurrency
-> UpdateRoutingProfileConcurrency -> Bool
== :: UpdateRoutingProfileConcurrency
-> UpdateRoutingProfileConcurrency -> Bool
$c== :: UpdateRoutingProfileConcurrency
-> UpdateRoutingProfileConcurrency -> Bool
Prelude.Eq, ReadPrec [UpdateRoutingProfileConcurrency]
ReadPrec UpdateRoutingProfileConcurrency
Int -> ReadS UpdateRoutingProfileConcurrency
ReadS [UpdateRoutingProfileConcurrency]
(Int -> ReadS UpdateRoutingProfileConcurrency)
-> ReadS [UpdateRoutingProfileConcurrency]
-> ReadPrec UpdateRoutingProfileConcurrency
-> ReadPrec [UpdateRoutingProfileConcurrency]
-> Read UpdateRoutingProfileConcurrency
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateRoutingProfileConcurrency]
$creadListPrec :: ReadPrec [UpdateRoutingProfileConcurrency]
readPrec :: ReadPrec UpdateRoutingProfileConcurrency
$creadPrec :: ReadPrec UpdateRoutingProfileConcurrency
readList :: ReadS [UpdateRoutingProfileConcurrency]
$creadList :: ReadS [UpdateRoutingProfileConcurrency]
readsPrec :: Int -> ReadS UpdateRoutingProfileConcurrency
$creadsPrec :: Int -> ReadS UpdateRoutingProfileConcurrency
Prelude.Read, Int -> UpdateRoutingProfileConcurrency -> ShowS
[UpdateRoutingProfileConcurrency] -> ShowS
UpdateRoutingProfileConcurrency -> String
(Int -> UpdateRoutingProfileConcurrency -> ShowS)
-> (UpdateRoutingProfileConcurrency -> String)
-> ([UpdateRoutingProfileConcurrency] -> ShowS)
-> Show UpdateRoutingProfileConcurrency
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateRoutingProfileConcurrency] -> ShowS
$cshowList :: [UpdateRoutingProfileConcurrency] -> ShowS
show :: UpdateRoutingProfileConcurrency -> String
$cshow :: UpdateRoutingProfileConcurrency -> String
showsPrec :: Int -> UpdateRoutingProfileConcurrency -> ShowS
$cshowsPrec :: Int -> UpdateRoutingProfileConcurrency -> ShowS
Prelude.Show, (forall x.
UpdateRoutingProfileConcurrency
-> Rep UpdateRoutingProfileConcurrency x)
-> (forall x.
Rep UpdateRoutingProfileConcurrency x
-> UpdateRoutingProfileConcurrency)
-> Generic UpdateRoutingProfileConcurrency
forall x.
Rep UpdateRoutingProfileConcurrency x
-> UpdateRoutingProfileConcurrency
forall x.
UpdateRoutingProfileConcurrency
-> Rep UpdateRoutingProfileConcurrency x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateRoutingProfileConcurrency x
-> UpdateRoutingProfileConcurrency
$cfrom :: forall x.
UpdateRoutingProfileConcurrency
-> Rep UpdateRoutingProfileConcurrency x
Prelude.Generic)
newUpdateRoutingProfileConcurrency ::
Prelude.Text ->
Prelude.Text ->
UpdateRoutingProfileConcurrency
newUpdateRoutingProfileConcurrency :: Text -> Text -> UpdateRoutingProfileConcurrency
newUpdateRoutingProfileConcurrency
Text
pInstanceId_
Text
pRoutingProfileId_ =
UpdateRoutingProfileConcurrency' :: Text
-> Text -> [MediaConcurrency] -> UpdateRoutingProfileConcurrency
UpdateRoutingProfileConcurrency'
{ $sel:instanceId:UpdateRoutingProfileConcurrency' :: Text
instanceId =
Text
pInstanceId_,
$sel:routingProfileId:UpdateRoutingProfileConcurrency' :: Text
routingProfileId = Text
pRoutingProfileId_,
$sel:mediaConcurrencies:UpdateRoutingProfileConcurrency' :: [MediaConcurrency]
mediaConcurrencies = [MediaConcurrency]
forall a. Monoid a => a
Prelude.mempty
}
updateRoutingProfileConcurrency_instanceId :: Lens.Lens' UpdateRoutingProfileConcurrency Prelude.Text
updateRoutingProfileConcurrency_instanceId :: (Text -> f Text)
-> UpdateRoutingProfileConcurrency
-> f UpdateRoutingProfileConcurrency
updateRoutingProfileConcurrency_instanceId = (UpdateRoutingProfileConcurrency -> Text)
-> (UpdateRoutingProfileConcurrency
-> Text -> UpdateRoutingProfileConcurrency)
-> Lens
UpdateRoutingProfileConcurrency
UpdateRoutingProfileConcurrency
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateRoutingProfileConcurrency' {Text
instanceId :: Text
$sel:instanceId:UpdateRoutingProfileConcurrency' :: UpdateRoutingProfileConcurrency -> Text
instanceId} -> Text
instanceId) (\s :: UpdateRoutingProfileConcurrency
s@UpdateRoutingProfileConcurrency' {} Text
a -> UpdateRoutingProfileConcurrency
s {$sel:instanceId:UpdateRoutingProfileConcurrency' :: Text
instanceId = Text
a} :: UpdateRoutingProfileConcurrency)
updateRoutingProfileConcurrency_routingProfileId :: Lens.Lens' UpdateRoutingProfileConcurrency Prelude.Text
updateRoutingProfileConcurrency_routingProfileId :: (Text -> f Text)
-> UpdateRoutingProfileConcurrency
-> f UpdateRoutingProfileConcurrency
updateRoutingProfileConcurrency_routingProfileId = (UpdateRoutingProfileConcurrency -> Text)
-> (UpdateRoutingProfileConcurrency
-> Text -> UpdateRoutingProfileConcurrency)
-> Lens
UpdateRoutingProfileConcurrency
UpdateRoutingProfileConcurrency
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateRoutingProfileConcurrency' {Text
routingProfileId :: Text
$sel:routingProfileId:UpdateRoutingProfileConcurrency' :: UpdateRoutingProfileConcurrency -> Text
routingProfileId} -> Text
routingProfileId) (\s :: UpdateRoutingProfileConcurrency
s@UpdateRoutingProfileConcurrency' {} Text
a -> UpdateRoutingProfileConcurrency
s {$sel:routingProfileId:UpdateRoutingProfileConcurrency' :: Text
routingProfileId = Text
a} :: UpdateRoutingProfileConcurrency)
updateRoutingProfileConcurrency_mediaConcurrencies :: Lens.Lens' UpdateRoutingProfileConcurrency [MediaConcurrency]
updateRoutingProfileConcurrency_mediaConcurrencies :: ([MediaConcurrency] -> f [MediaConcurrency])
-> UpdateRoutingProfileConcurrency
-> f UpdateRoutingProfileConcurrency
updateRoutingProfileConcurrency_mediaConcurrencies = (UpdateRoutingProfileConcurrency -> [MediaConcurrency])
-> (UpdateRoutingProfileConcurrency
-> [MediaConcurrency] -> UpdateRoutingProfileConcurrency)
-> Lens
UpdateRoutingProfileConcurrency
UpdateRoutingProfileConcurrency
[MediaConcurrency]
[MediaConcurrency]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateRoutingProfileConcurrency' {[MediaConcurrency]
mediaConcurrencies :: [MediaConcurrency]
$sel:mediaConcurrencies:UpdateRoutingProfileConcurrency' :: UpdateRoutingProfileConcurrency -> [MediaConcurrency]
mediaConcurrencies} -> [MediaConcurrency]
mediaConcurrencies) (\s :: UpdateRoutingProfileConcurrency
s@UpdateRoutingProfileConcurrency' {} [MediaConcurrency]
a -> UpdateRoutingProfileConcurrency
s {$sel:mediaConcurrencies:UpdateRoutingProfileConcurrency' :: [MediaConcurrency]
mediaConcurrencies = [MediaConcurrency]
a} :: UpdateRoutingProfileConcurrency) (([MediaConcurrency] -> f [MediaConcurrency])
-> UpdateRoutingProfileConcurrency
-> f UpdateRoutingProfileConcurrency)
-> (([MediaConcurrency] -> f [MediaConcurrency])
-> [MediaConcurrency] -> f [MediaConcurrency])
-> ([MediaConcurrency] -> f [MediaConcurrency])
-> UpdateRoutingProfileConcurrency
-> f UpdateRoutingProfileConcurrency
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([MediaConcurrency] -> f [MediaConcurrency])
-> [MediaConcurrency] -> f [MediaConcurrency]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance
Core.AWSRequest
UpdateRoutingProfileConcurrency
where
type
AWSResponse UpdateRoutingProfileConcurrency =
UpdateRoutingProfileConcurrencyResponse
request :: UpdateRoutingProfileConcurrency
-> Request UpdateRoutingProfileConcurrency
request = Service
-> UpdateRoutingProfileConcurrency
-> Request UpdateRoutingProfileConcurrency
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy UpdateRoutingProfileConcurrency
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse (AWSResponse UpdateRoutingProfileConcurrency)))
response =
AWSResponse UpdateRoutingProfileConcurrency
-> Logger
-> Service
-> Proxy UpdateRoutingProfileConcurrency
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse (AWSResponse UpdateRoutingProfileConcurrency)))
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull
AWSResponse UpdateRoutingProfileConcurrency
UpdateRoutingProfileConcurrencyResponse
UpdateRoutingProfileConcurrencyResponse'
instance
Prelude.Hashable
UpdateRoutingProfileConcurrency
instance
Prelude.NFData
UpdateRoutingProfileConcurrency
instance
Core.ToHeaders
UpdateRoutingProfileConcurrency
where
toHeaders :: UpdateRoutingProfileConcurrency -> [Header]
toHeaders =
[Header] -> UpdateRoutingProfileConcurrency -> [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 UpdateRoutingProfileConcurrency where
toJSON :: UpdateRoutingProfileConcurrency -> Value
toJSON UpdateRoutingProfileConcurrency' {[MediaConcurrency]
Text
mediaConcurrencies :: [MediaConcurrency]
routingProfileId :: Text
instanceId :: Text
$sel:mediaConcurrencies:UpdateRoutingProfileConcurrency' :: UpdateRoutingProfileConcurrency -> [MediaConcurrency]
$sel:routingProfileId:UpdateRoutingProfileConcurrency' :: UpdateRoutingProfileConcurrency -> Text
$sel:instanceId:UpdateRoutingProfileConcurrency' :: UpdateRoutingProfileConcurrency -> 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
"MediaConcurrencies" Text -> [MediaConcurrency] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= [MediaConcurrency]
mediaConcurrencies)
]
)
instance Core.ToPath UpdateRoutingProfileConcurrency where
toPath :: UpdateRoutingProfileConcurrency -> ByteString
toPath UpdateRoutingProfileConcurrency' {[MediaConcurrency]
Text
mediaConcurrencies :: [MediaConcurrency]
routingProfileId :: Text
instanceId :: Text
$sel:mediaConcurrencies:UpdateRoutingProfileConcurrency' :: UpdateRoutingProfileConcurrency -> [MediaConcurrency]
$sel:routingProfileId:UpdateRoutingProfileConcurrency' :: UpdateRoutingProfileConcurrency -> Text
$sel:instanceId:UpdateRoutingProfileConcurrency' :: UpdateRoutingProfileConcurrency -> 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
"/concurrency"
]
instance Core.ToQuery UpdateRoutingProfileConcurrency where
toQuery :: UpdateRoutingProfileConcurrency -> QueryString
toQuery = QueryString -> UpdateRoutingProfileConcurrency -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data UpdateRoutingProfileConcurrencyResponse = UpdateRoutingProfileConcurrencyResponse'
{
}
deriving (UpdateRoutingProfileConcurrencyResponse
-> UpdateRoutingProfileConcurrencyResponse -> Bool
(UpdateRoutingProfileConcurrencyResponse
-> UpdateRoutingProfileConcurrencyResponse -> Bool)
-> (UpdateRoutingProfileConcurrencyResponse
-> UpdateRoutingProfileConcurrencyResponse -> Bool)
-> Eq UpdateRoutingProfileConcurrencyResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateRoutingProfileConcurrencyResponse
-> UpdateRoutingProfileConcurrencyResponse -> Bool
$c/= :: UpdateRoutingProfileConcurrencyResponse
-> UpdateRoutingProfileConcurrencyResponse -> Bool
== :: UpdateRoutingProfileConcurrencyResponse
-> UpdateRoutingProfileConcurrencyResponse -> Bool
$c== :: UpdateRoutingProfileConcurrencyResponse
-> UpdateRoutingProfileConcurrencyResponse -> Bool
Prelude.Eq, ReadPrec [UpdateRoutingProfileConcurrencyResponse]
ReadPrec UpdateRoutingProfileConcurrencyResponse
Int -> ReadS UpdateRoutingProfileConcurrencyResponse
ReadS [UpdateRoutingProfileConcurrencyResponse]
(Int -> ReadS UpdateRoutingProfileConcurrencyResponse)
-> ReadS [UpdateRoutingProfileConcurrencyResponse]
-> ReadPrec UpdateRoutingProfileConcurrencyResponse
-> ReadPrec [UpdateRoutingProfileConcurrencyResponse]
-> Read UpdateRoutingProfileConcurrencyResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateRoutingProfileConcurrencyResponse]
$creadListPrec :: ReadPrec [UpdateRoutingProfileConcurrencyResponse]
readPrec :: ReadPrec UpdateRoutingProfileConcurrencyResponse
$creadPrec :: ReadPrec UpdateRoutingProfileConcurrencyResponse
readList :: ReadS [UpdateRoutingProfileConcurrencyResponse]
$creadList :: ReadS [UpdateRoutingProfileConcurrencyResponse]
readsPrec :: Int -> ReadS UpdateRoutingProfileConcurrencyResponse
$creadsPrec :: Int -> ReadS UpdateRoutingProfileConcurrencyResponse
Prelude.Read, Int -> UpdateRoutingProfileConcurrencyResponse -> ShowS
[UpdateRoutingProfileConcurrencyResponse] -> ShowS
UpdateRoutingProfileConcurrencyResponse -> String
(Int -> UpdateRoutingProfileConcurrencyResponse -> ShowS)
-> (UpdateRoutingProfileConcurrencyResponse -> String)
-> ([UpdateRoutingProfileConcurrencyResponse] -> ShowS)
-> Show UpdateRoutingProfileConcurrencyResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateRoutingProfileConcurrencyResponse] -> ShowS
$cshowList :: [UpdateRoutingProfileConcurrencyResponse] -> ShowS
show :: UpdateRoutingProfileConcurrencyResponse -> String
$cshow :: UpdateRoutingProfileConcurrencyResponse -> String
showsPrec :: Int -> UpdateRoutingProfileConcurrencyResponse -> ShowS
$cshowsPrec :: Int -> UpdateRoutingProfileConcurrencyResponse -> ShowS
Prelude.Show, (forall x.
UpdateRoutingProfileConcurrencyResponse
-> Rep UpdateRoutingProfileConcurrencyResponse x)
-> (forall x.
Rep UpdateRoutingProfileConcurrencyResponse x
-> UpdateRoutingProfileConcurrencyResponse)
-> Generic UpdateRoutingProfileConcurrencyResponse
forall x.
Rep UpdateRoutingProfileConcurrencyResponse x
-> UpdateRoutingProfileConcurrencyResponse
forall x.
UpdateRoutingProfileConcurrencyResponse
-> Rep UpdateRoutingProfileConcurrencyResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateRoutingProfileConcurrencyResponse x
-> UpdateRoutingProfileConcurrencyResponse
$cfrom :: forall x.
UpdateRoutingProfileConcurrencyResponse
-> Rep UpdateRoutingProfileConcurrencyResponse x
Prelude.Generic)
newUpdateRoutingProfileConcurrencyResponse ::
UpdateRoutingProfileConcurrencyResponse
newUpdateRoutingProfileConcurrencyResponse :: UpdateRoutingProfileConcurrencyResponse
newUpdateRoutingProfileConcurrencyResponse =
UpdateRoutingProfileConcurrencyResponse
UpdateRoutingProfileConcurrencyResponse'
instance
Prelude.NFData
UpdateRoutingProfileConcurrencyResponse