{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
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
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]
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
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.
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'
{ $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 :: Lens' RoutingProfileQueueConfig RoutingProfileQueueReference
routingProfileQueueConfig_queueReference = 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 :: Lens' RoutingProfileQueueConfig Natural
routingProfileQueueConfig_priority = 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 :: Lens' RoutingProfileQueueConfig Natural
routingProfileQueueConfig_delay = 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 where
hashWithSalt :: Int -> RoutingProfileQueueConfig -> Int
hashWithSalt Int
_salt RoutingProfileQueueConfig' {Natural
RoutingProfileQueueReference
delay :: Natural
priority :: Natural
queueReference :: RoutingProfileQueueReference
$sel:delay:RoutingProfileQueueConfig' :: RoutingProfileQueueConfig -> Natural
$sel:priority:RoutingProfileQueueConfig' :: RoutingProfileQueueConfig -> Natural
$sel:queueReference:RoutingProfileQueueConfig' :: RoutingProfileQueueConfig -> RoutingProfileQueueReference
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` RoutingProfileQueueReference
queueReference
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Natural
priority
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Natural
delay
instance Prelude.NFData RoutingProfileQueueConfig where
rnf :: RoutingProfileQueueConfig -> ()
rnf RoutingProfileQueueConfig' {Natural
RoutingProfileQueueReference
delay :: Natural
priority :: Natural
queueReference :: RoutingProfileQueueReference
$sel:delay:RoutingProfileQueueConfig' :: RoutingProfileQueueConfig -> Natural
$sel:priority:RoutingProfileQueueConfig' :: RoutingProfileQueueConfig -> Natural
$sel:queueReference:RoutingProfileQueueConfig' :: RoutingProfileQueueConfig -> RoutingProfileQueueReference
..} =
forall a. NFData a => a -> ()
Prelude.rnf RoutingProfileQueueReference
queueReference
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Natural
priority
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Natural
delay
instance Data.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
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ forall a. a -> Maybe a
Prelude.Just
(Key
"QueueReference" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= RoutingProfileQueueReference
queueReference),
forall a. a -> Maybe a
Prelude.Just (Key
"Priority" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Natural
priority),
forall a. a -> Maybe a
Prelude.Just (Key
"Delay" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Natural
delay)
]
)