{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.Connect.Types.RoutingProfileQueueConfig where
import Amazonka.Connect.Types.RoutingProfileQueueReference
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data RoutingProfileQueueConfig = RoutingProfileQueueConfig'
{
RoutingProfileQueueConfig -> RoutingProfileQueueReference
queueReference :: RoutingProfileQueueReference,
RoutingProfileQueueConfig -> Natural
priority :: Prelude.Natural,
RoutingProfileQueueConfig -> Natural
delay :: Prelude.Natural
}
deriving (RoutingProfileQueueConfig -> RoutingProfileQueueConfig -> Bool
(RoutingProfileQueueConfig -> RoutingProfileQueueConfig -> Bool)
-> (RoutingProfileQueueConfig -> RoutingProfileQueueConfig -> Bool)
-> Eq RoutingProfileQueueConfig
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RoutingProfileQueueConfig -> RoutingProfileQueueConfig -> Bool
$c/= :: RoutingProfileQueueConfig -> RoutingProfileQueueConfig -> Bool
== :: RoutingProfileQueueConfig -> RoutingProfileQueueConfig -> Bool
$c== :: RoutingProfileQueueConfig -> RoutingProfileQueueConfig -> Bool
Prelude.Eq, ReadPrec [RoutingProfileQueueConfig]
ReadPrec RoutingProfileQueueConfig
Int -> ReadS RoutingProfileQueueConfig
ReadS [RoutingProfileQueueConfig]
(Int -> ReadS RoutingProfileQueueConfig)
-> ReadS [RoutingProfileQueueConfig]
-> ReadPrec RoutingProfileQueueConfig
-> ReadPrec [RoutingProfileQueueConfig]
-> Read RoutingProfileQueueConfig
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RoutingProfileQueueConfig]
$creadListPrec :: ReadPrec [RoutingProfileQueueConfig]
readPrec :: ReadPrec RoutingProfileQueueConfig
$creadPrec :: ReadPrec RoutingProfileQueueConfig
readList :: ReadS [RoutingProfileQueueConfig]
$creadList :: ReadS [RoutingProfileQueueConfig]
readsPrec :: Int -> ReadS RoutingProfileQueueConfig
$creadsPrec :: Int -> ReadS RoutingProfileQueueConfig
Prelude.Read, Int -> RoutingProfileQueueConfig -> ShowS
[RoutingProfileQueueConfig] -> ShowS
RoutingProfileQueueConfig -> String
(Int -> RoutingProfileQueueConfig -> ShowS)
-> (RoutingProfileQueueConfig -> String)
-> ([RoutingProfileQueueConfig] -> ShowS)
-> Show RoutingProfileQueueConfig
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RoutingProfileQueueConfig] -> ShowS
$cshowList :: [RoutingProfileQueueConfig] -> ShowS
show :: RoutingProfileQueueConfig -> String
$cshow :: RoutingProfileQueueConfig -> String
showsPrec :: Int -> RoutingProfileQueueConfig -> ShowS
$cshowsPrec :: Int -> RoutingProfileQueueConfig -> ShowS
Prelude.Show, (forall x.
RoutingProfileQueueConfig -> Rep RoutingProfileQueueConfig x)
-> (forall x.
Rep RoutingProfileQueueConfig x -> RoutingProfileQueueConfig)
-> Generic RoutingProfileQueueConfig
forall x.
Rep RoutingProfileQueueConfig x -> RoutingProfileQueueConfig
forall x.
RoutingProfileQueueConfig -> Rep RoutingProfileQueueConfig x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep RoutingProfileQueueConfig x -> RoutingProfileQueueConfig
$cfrom :: forall x.
RoutingProfileQueueConfig -> Rep RoutingProfileQueueConfig x
Prelude.Generic)
newRoutingProfileQueueConfig ::
RoutingProfileQueueReference ->
Prelude.Natural ->
Prelude.Natural ->
RoutingProfileQueueConfig
newRoutingProfileQueueConfig :: RoutingProfileQueueReference
-> Natural -> Natural -> RoutingProfileQueueConfig
newRoutingProfileQueueConfig
RoutingProfileQueueReference
pQueueReference_
Natural
pPriority_
Natural
pDelay_ =
RoutingProfileQueueConfig' :: RoutingProfileQueueReference
-> Natural -> Natural -> RoutingProfileQueueConfig
RoutingProfileQueueConfig'
{ $sel:queueReference:RoutingProfileQueueConfig' :: RoutingProfileQueueReference
queueReference =
RoutingProfileQueueReference
pQueueReference_,
$sel:priority:RoutingProfileQueueConfig' :: Natural
priority = Natural
pPriority_,
$sel:delay:RoutingProfileQueueConfig' :: Natural
delay = Natural
pDelay_
}
routingProfileQueueConfig_queueReference :: Lens.Lens' RoutingProfileQueueConfig RoutingProfileQueueReference
routingProfileQueueConfig_queueReference :: (RoutingProfileQueueReference -> f RoutingProfileQueueReference)
-> RoutingProfileQueueConfig -> f RoutingProfileQueueConfig
routingProfileQueueConfig_queueReference = (RoutingProfileQueueConfig -> RoutingProfileQueueReference)
-> (RoutingProfileQueueConfig
-> RoutingProfileQueueReference -> RoutingProfileQueueConfig)
-> Lens
RoutingProfileQueueConfig
RoutingProfileQueueConfig
RoutingProfileQueueReference
RoutingProfileQueueReference
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RoutingProfileQueueConfig' {RoutingProfileQueueReference
queueReference :: RoutingProfileQueueReference
$sel:queueReference:RoutingProfileQueueConfig' :: RoutingProfileQueueConfig -> RoutingProfileQueueReference
queueReference} -> RoutingProfileQueueReference
queueReference) (\s :: RoutingProfileQueueConfig
s@RoutingProfileQueueConfig' {} RoutingProfileQueueReference
a -> RoutingProfileQueueConfig
s {$sel:queueReference:RoutingProfileQueueConfig' :: RoutingProfileQueueReference
queueReference = RoutingProfileQueueReference
a} :: RoutingProfileQueueConfig)
routingProfileQueueConfig_priority :: Lens.Lens' RoutingProfileQueueConfig Prelude.Natural
routingProfileQueueConfig_priority :: (Natural -> f Natural)
-> RoutingProfileQueueConfig -> f RoutingProfileQueueConfig
routingProfileQueueConfig_priority = (RoutingProfileQueueConfig -> Natural)
-> (RoutingProfileQueueConfig
-> Natural -> RoutingProfileQueueConfig)
-> Lens
RoutingProfileQueueConfig RoutingProfileQueueConfig Natural Natural
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RoutingProfileQueueConfig' {Natural
priority :: Natural
$sel:priority:RoutingProfileQueueConfig' :: RoutingProfileQueueConfig -> Natural
priority} -> Natural
priority) (\s :: RoutingProfileQueueConfig
s@RoutingProfileQueueConfig' {} Natural
a -> RoutingProfileQueueConfig
s {$sel:priority:RoutingProfileQueueConfig' :: Natural
priority = Natural
a} :: RoutingProfileQueueConfig)
routingProfileQueueConfig_delay :: Lens.Lens' RoutingProfileQueueConfig Prelude.Natural
routingProfileQueueConfig_delay :: (Natural -> f Natural)
-> RoutingProfileQueueConfig -> f RoutingProfileQueueConfig
routingProfileQueueConfig_delay = (RoutingProfileQueueConfig -> Natural)
-> (RoutingProfileQueueConfig
-> Natural -> RoutingProfileQueueConfig)
-> Lens
RoutingProfileQueueConfig RoutingProfileQueueConfig Natural Natural
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RoutingProfileQueueConfig' {Natural
delay :: Natural
$sel:delay:RoutingProfileQueueConfig' :: RoutingProfileQueueConfig -> Natural
delay} -> Natural
delay) (\s :: RoutingProfileQueueConfig
s@RoutingProfileQueueConfig' {} Natural
a -> RoutingProfileQueueConfig
s {$sel:delay:RoutingProfileQueueConfig' :: Natural
delay = Natural
a} :: RoutingProfileQueueConfig)
instance Prelude.Hashable RoutingProfileQueueConfig
instance Prelude.NFData RoutingProfileQueueConfig
instance Core.ToJSON RoutingProfileQueueConfig where
toJSON :: RoutingProfileQueueConfig -> Value
toJSON RoutingProfileQueueConfig' {Natural
RoutingProfileQueueReference
delay :: Natural
priority :: Natural
queueReference :: RoutingProfileQueueReference
$sel:delay:RoutingProfileQueueConfig' :: RoutingProfileQueueConfig -> Natural
$sel:priority:RoutingProfileQueueConfig' :: RoutingProfileQueueConfig -> Natural
$sel:queueReference:RoutingProfileQueueConfig' :: RoutingProfileQueueConfig -> RoutingProfileQueueReference
..} =
[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
"QueueReference" Text -> RoutingProfileQueueReference -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= RoutingProfileQueueReference
queueReference),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Priority" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Natural
priority),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Delay" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Natural
delay)
]
)