{-# 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.AssociateRoutingProfileQueues
(
AssociateRoutingProfileQueues (..),
newAssociateRoutingProfileQueues,
associateRoutingProfileQueues_instanceId,
associateRoutingProfileQueues_routingProfileId,
associateRoutingProfileQueues_queueConfigs,
AssociateRoutingProfileQueuesResponse (..),
newAssociateRoutingProfileQueuesResponse,
)
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 AssociateRoutingProfileQueues = AssociateRoutingProfileQueues'
{
AssociateRoutingProfileQueues -> Text
instanceId :: Prelude.Text,
AssociateRoutingProfileQueues -> Text
routingProfileId :: Prelude.Text,
AssociateRoutingProfileQueues -> NonEmpty RoutingProfileQueueConfig
queueConfigs :: Prelude.NonEmpty RoutingProfileQueueConfig
}
deriving (AssociateRoutingProfileQueues
-> AssociateRoutingProfileQueues -> Bool
(AssociateRoutingProfileQueues
-> AssociateRoutingProfileQueues -> Bool)
-> (AssociateRoutingProfileQueues
-> AssociateRoutingProfileQueues -> Bool)
-> Eq AssociateRoutingProfileQueues
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AssociateRoutingProfileQueues
-> AssociateRoutingProfileQueues -> Bool
$c/= :: AssociateRoutingProfileQueues
-> AssociateRoutingProfileQueues -> Bool
== :: AssociateRoutingProfileQueues
-> AssociateRoutingProfileQueues -> Bool
$c== :: AssociateRoutingProfileQueues
-> AssociateRoutingProfileQueues -> Bool
Prelude.Eq, ReadPrec [AssociateRoutingProfileQueues]
ReadPrec AssociateRoutingProfileQueues
Int -> ReadS AssociateRoutingProfileQueues
ReadS [AssociateRoutingProfileQueues]
(Int -> ReadS AssociateRoutingProfileQueues)
-> ReadS [AssociateRoutingProfileQueues]
-> ReadPrec AssociateRoutingProfileQueues
-> ReadPrec [AssociateRoutingProfileQueues]
-> Read AssociateRoutingProfileQueues
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AssociateRoutingProfileQueues]
$creadListPrec :: ReadPrec [AssociateRoutingProfileQueues]
readPrec :: ReadPrec AssociateRoutingProfileQueues
$creadPrec :: ReadPrec AssociateRoutingProfileQueues
readList :: ReadS [AssociateRoutingProfileQueues]
$creadList :: ReadS [AssociateRoutingProfileQueues]
readsPrec :: Int -> ReadS AssociateRoutingProfileQueues
$creadsPrec :: Int -> ReadS AssociateRoutingProfileQueues
Prelude.Read, Int -> AssociateRoutingProfileQueues -> ShowS
[AssociateRoutingProfileQueues] -> ShowS
AssociateRoutingProfileQueues -> String
(Int -> AssociateRoutingProfileQueues -> ShowS)
-> (AssociateRoutingProfileQueues -> String)
-> ([AssociateRoutingProfileQueues] -> ShowS)
-> Show AssociateRoutingProfileQueues
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AssociateRoutingProfileQueues] -> ShowS
$cshowList :: [AssociateRoutingProfileQueues] -> ShowS
show :: AssociateRoutingProfileQueues -> String
$cshow :: AssociateRoutingProfileQueues -> String
showsPrec :: Int -> AssociateRoutingProfileQueues -> ShowS
$cshowsPrec :: Int -> AssociateRoutingProfileQueues -> ShowS
Prelude.Show, (forall x.
AssociateRoutingProfileQueues
-> Rep AssociateRoutingProfileQueues x)
-> (forall x.
Rep AssociateRoutingProfileQueues x
-> AssociateRoutingProfileQueues)
-> Generic AssociateRoutingProfileQueues
forall x.
Rep AssociateRoutingProfileQueues x
-> AssociateRoutingProfileQueues
forall x.
AssociateRoutingProfileQueues
-> Rep AssociateRoutingProfileQueues x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AssociateRoutingProfileQueues x
-> AssociateRoutingProfileQueues
$cfrom :: forall x.
AssociateRoutingProfileQueues
-> Rep AssociateRoutingProfileQueues x
Prelude.Generic)
newAssociateRoutingProfileQueues ::
Prelude.Text ->
Prelude.Text ->
Prelude.NonEmpty RoutingProfileQueueConfig ->
AssociateRoutingProfileQueues
newAssociateRoutingProfileQueues :: Text
-> Text
-> NonEmpty RoutingProfileQueueConfig
-> AssociateRoutingProfileQueues
newAssociateRoutingProfileQueues
Text
pInstanceId_
Text
pRoutingProfileId_
NonEmpty RoutingProfileQueueConfig
pQueueConfigs_ =
AssociateRoutingProfileQueues' :: Text
-> Text
-> NonEmpty RoutingProfileQueueConfig
-> AssociateRoutingProfileQueues
AssociateRoutingProfileQueues'
{ $sel:instanceId:AssociateRoutingProfileQueues' :: Text
instanceId =
Text
pInstanceId_,
$sel:routingProfileId:AssociateRoutingProfileQueues' :: Text
routingProfileId = Text
pRoutingProfileId_,
$sel:queueConfigs:AssociateRoutingProfileQueues' :: 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_
}
associateRoutingProfileQueues_instanceId :: Lens.Lens' AssociateRoutingProfileQueues Prelude.Text
associateRoutingProfileQueues_instanceId :: (Text -> f Text)
-> AssociateRoutingProfileQueues -> f AssociateRoutingProfileQueues
associateRoutingProfileQueues_instanceId = (AssociateRoutingProfileQueues -> Text)
-> (AssociateRoutingProfileQueues
-> Text -> AssociateRoutingProfileQueues)
-> Lens
AssociateRoutingProfileQueues
AssociateRoutingProfileQueues
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociateRoutingProfileQueues' {Text
instanceId :: Text
$sel:instanceId:AssociateRoutingProfileQueues' :: AssociateRoutingProfileQueues -> Text
instanceId} -> Text
instanceId) (\s :: AssociateRoutingProfileQueues
s@AssociateRoutingProfileQueues' {} Text
a -> AssociateRoutingProfileQueues
s {$sel:instanceId:AssociateRoutingProfileQueues' :: Text
instanceId = Text
a} :: AssociateRoutingProfileQueues)
associateRoutingProfileQueues_routingProfileId :: Lens.Lens' AssociateRoutingProfileQueues Prelude.Text
associateRoutingProfileQueues_routingProfileId :: (Text -> f Text)
-> AssociateRoutingProfileQueues -> f AssociateRoutingProfileQueues
associateRoutingProfileQueues_routingProfileId = (AssociateRoutingProfileQueues -> Text)
-> (AssociateRoutingProfileQueues
-> Text -> AssociateRoutingProfileQueues)
-> Lens
AssociateRoutingProfileQueues
AssociateRoutingProfileQueues
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociateRoutingProfileQueues' {Text
routingProfileId :: Text
$sel:routingProfileId:AssociateRoutingProfileQueues' :: AssociateRoutingProfileQueues -> Text
routingProfileId} -> Text
routingProfileId) (\s :: AssociateRoutingProfileQueues
s@AssociateRoutingProfileQueues' {} Text
a -> AssociateRoutingProfileQueues
s {$sel:routingProfileId:AssociateRoutingProfileQueues' :: Text
routingProfileId = Text
a} :: AssociateRoutingProfileQueues)
associateRoutingProfileQueues_queueConfigs :: Lens.Lens' AssociateRoutingProfileQueues (Prelude.NonEmpty RoutingProfileQueueConfig)
associateRoutingProfileQueues_queueConfigs :: (NonEmpty RoutingProfileQueueConfig
-> f (NonEmpty RoutingProfileQueueConfig))
-> AssociateRoutingProfileQueues -> f AssociateRoutingProfileQueues
associateRoutingProfileQueues_queueConfigs = (AssociateRoutingProfileQueues
-> NonEmpty RoutingProfileQueueConfig)
-> (AssociateRoutingProfileQueues
-> NonEmpty RoutingProfileQueueConfig
-> AssociateRoutingProfileQueues)
-> Lens
AssociateRoutingProfileQueues
AssociateRoutingProfileQueues
(NonEmpty RoutingProfileQueueConfig)
(NonEmpty RoutingProfileQueueConfig)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociateRoutingProfileQueues' {NonEmpty RoutingProfileQueueConfig
queueConfigs :: NonEmpty RoutingProfileQueueConfig
$sel:queueConfigs:AssociateRoutingProfileQueues' :: AssociateRoutingProfileQueues -> NonEmpty RoutingProfileQueueConfig
queueConfigs} -> NonEmpty RoutingProfileQueueConfig
queueConfigs) (\s :: AssociateRoutingProfileQueues
s@AssociateRoutingProfileQueues' {} NonEmpty RoutingProfileQueueConfig
a -> AssociateRoutingProfileQueues
s {$sel:queueConfigs:AssociateRoutingProfileQueues' :: NonEmpty RoutingProfileQueueConfig
queueConfigs = NonEmpty RoutingProfileQueueConfig
a} :: AssociateRoutingProfileQueues) ((NonEmpty RoutingProfileQueueConfig
-> f (NonEmpty RoutingProfileQueueConfig))
-> AssociateRoutingProfileQueues
-> f AssociateRoutingProfileQueues)
-> ((NonEmpty RoutingProfileQueueConfig
-> f (NonEmpty RoutingProfileQueueConfig))
-> NonEmpty RoutingProfileQueueConfig
-> f (NonEmpty RoutingProfileQueueConfig))
-> (NonEmpty RoutingProfileQueueConfig
-> f (NonEmpty RoutingProfileQueueConfig))
-> AssociateRoutingProfileQueues
-> f AssociateRoutingProfileQueues
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
AssociateRoutingProfileQueues
where
type
AWSResponse AssociateRoutingProfileQueues =
AssociateRoutingProfileQueuesResponse
request :: AssociateRoutingProfileQueues
-> Request AssociateRoutingProfileQueues
request = Service
-> AssociateRoutingProfileQueues
-> Request AssociateRoutingProfileQueues
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy AssociateRoutingProfileQueues
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse AssociateRoutingProfileQueues)))
response =
AWSResponse AssociateRoutingProfileQueues
-> Logger
-> Service
-> Proxy AssociateRoutingProfileQueues
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse AssociateRoutingProfileQueues)))
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull
AWSResponse AssociateRoutingProfileQueues
AssociateRoutingProfileQueuesResponse
AssociateRoutingProfileQueuesResponse'
instance
Prelude.Hashable
AssociateRoutingProfileQueues
instance Prelude.NFData AssociateRoutingProfileQueues
instance Core.ToHeaders AssociateRoutingProfileQueues where
toHeaders :: AssociateRoutingProfileQueues -> [Header]
toHeaders =
[Header] -> AssociateRoutingProfileQueues -> [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 AssociateRoutingProfileQueues where
toJSON :: AssociateRoutingProfileQueues -> Value
toJSON AssociateRoutingProfileQueues' {NonEmpty RoutingProfileQueueConfig
Text
queueConfigs :: NonEmpty RoutingProfileQueueConfig
routingProfileId :: Text
instanceId :: Text
$sel:queueConfigs:AssociateRoutingProfileQueues' :: AssociateRoutingProfileQueues -> NonEmpty RoutingProfileQueueConfig
$sel:routingProfileId:AssociateRoutingProfileQueues' :: AssociateRoutingProfileQueues -> Text
$sel:instanceId:AssociateRoutingProfileQueues' :: AssociateRoutingProfileQueues -> 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 AssociateRoutingProfileQueues where
toPath :: AssociateRoutingProfileQueues -> ByteString
toPath AssociateRoutingProfileQueues' {NonEmpty RoutingProfileQueueConfig
Text
queueConfigs :: NonEmpty RoutingProfileQueueConfig
routingProfileId :: Text
instanceId :: Text
$sel:queueConfigs:AssociateRoutingProfileQueues' :: AssociateRoutingProfileQueues -> NonEmpty RoutingProfileQueueConfig
$sel:routingProfileId:AssociateRoutingProfileQueues' :: AssociateRoutingProfileQueues -> Text
$sel:instanceId:AssociateRoutingProfileQueues' :: AssociateRoutingProfileQueues -> 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
"/associate-queues"
]
instance Core.ToQuery AssociateRoutingProfileQueues where
toQuery :: AssociateRoutingProfileQueues -> QueryString
toQuery = QueryString -> AssociateRoutingProfileQueues -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data AssociateRoutingProfileQueuesResponse = AssociateRoutingProfileQueuesResponse'
{
}
deriving (AssociateRoutingProfileQueuesResponse
-> AssociateRoutingProfileQueuesResponse -> Bool
(AssociateRoutingProfileQueuesResponse
-> AssociateRoutingProfileQueuesResponse -> Bool)
-> (AssociateRoutingProfileQueuesResponse
-> AssociateRoutingProfileQueuesResponse -> Bool)
-> Eq AssociateRoutingProfileQueuesResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AssociateRoutingProfileQueuesResponse
-> AssociateRoutingProfileQueuesResponse -> Bool
$c/= :: AssociateRoutingProfileQueuesResponse
-> AssociateRoutingProfileQueuesResponse -> Bool
== :: AssociateRoutingProfileQueuesResponse
-> AssociateRoutingProfileQueuesResponse -> Bool
$c== :: AssociateRoutingProfileQueuesResponse
-> AssociateRoutingProfileQueuesResponse -> Bool
Prelude.Eq, ReadPrec [AssociateRoutingProfileQueuesResponse]
ReadPrec AssociateRoutingProfileQueuesResponse
Int -> ReadS AssociateRoutingProfileQueuesResponse
ReadS [AssociateRoutingProfileQueuesResponse]
(Int -> ReadS AssociateRoutingProfileQueuesResponse)
-> ReadS [AssociateRoutingProfileQueuesResponse]
-> ReadPrec AssociateRoutingProfileQueuesResponse
-> ReadPrec [AssociateRoutingProfileQueuesResponse]
-> Read AssociateRoutingProfileQueuesResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AssociateRoutingProfileQueuesResponse]
$creadListPrec :: ReadPrec [AssociateRoutingProfileQueuesResponse]
readPrec :: ReadPrec AssociateRoutingProfileQueuesResponse
$creadPrec :: ReadPrec AssociateRoutingProfileQueuesResponse
readList :: ReadS [AssociateRoutingProfileQueuesResponse]
$creadList :: ReadS [AssociateRoutingProfileQueuesResponse]
readsPrec :: Int -> ReadS AssociateRoutingProfileQueuesResponse
$creadsPrec :: Int -> ReadS AssociateRoutingProfileQueuesResponse
Prelude.Read, Int -> AssociateRoutingProfileQueuesResponse -> ShowS
[AssociateRoutingProfileQueuesResponse] -> ShowS
AssociateRoutingProfileQueuesResponse -> String
(Int -> AssociateRoutingProfileQueuesResponse -> ShowS)
-> (AssociateRoutingProfileQueuesResponse -> String)
-> ([AssociateRoutingProfileQueuesResponse] -> ShowS)
-> Show AssociateRoutingProfileQueuesResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AssociateRoutingProfileQueuesResponse] -> ShowS
$cshowList :: [AssociateRoutingProfileQueuesResponse] -> ShowS
show :: AssociateRoutingProfileQueuesResponse -> String
$cshow :: AssociateRoutingProfileQueuesResponse -> String
showsPrec :: Int -> AssociateRoutingProfileQueuesResponse -> ShowS
$cshowsPrec :: Int -> AssociateRoutingProfileQueuesResponse -> ShowS
Prelude.Show, (forall x.
AssociateRoutingProfileQueuesResponse
-> Rep AssociateRoutingProfileQueuesResponse x)
-> (forall x.
Rep AssociateRoutingProfileQueuesResponse x
-> AssociateRoutingProfileQueuesResponse)
-> Generic AssociateRoutingProfileQueuesResponse
forall x.
Rep AssociateRoutingProfileQueuesResponse x
-> AssociateRoutingProfileQueuesResponse
forall x.
AssociateRoutingProfileQueuesResponse
-> Rep AssociateRoutingProfileQueuesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AssociateRoutingProfileQueuesResponse x
-> AssociateRoutingProfileQueuesResponse
$cfrom :: forall x.
AssociateRoutingProfileQueuesResponse
-> Rep AssociateRoutingProfileQueuesResponse x
Prelude.Generic)
newAssociateRoutingProfileQueuesResponse ::
AssociateRoutingProfileQueuesResponse
newAssociateRoutingProfileQueuesResponse :: AssociateRoutingProfileQueuesResponse
newAssociateRoutingProfileQueuesResponse =
AssociateRoutingProfileQueuesResponse
AssociateRoutingProfileQueuesResponse'
instance
Prelude.NFData
AssociateRoutingProfileQueuesResponse