{-# 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.RoutingProfileQueueReference where
import Amazonka.Connect.Types.Channel
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 RoutingProfileQueueReference = RoutingProfileQueueReference'
{
RoutingProfileQueueReference -> Text
queueId :: Prelude.Text,
RoutingProfileQueueReference -> Channel
channel :: Channel
}
deriving (RoutingProfileQueueReference
-> RoutingProfileQueueReference -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RoutingProfileQueueReference
-> RoutingProfileQueueReference -> Bool
$c/= :: RoutingProfileQueueReference
-> RoutingProfileQueueReference -> Bool
== :: RoutingProfileQueueReference
-> RoutingProfileQueueReference -> Bool
$c== :: RoutingProfileQueueReference
-> RoutingProfileQueueReference -> Bool
Prelude.Eq, ReadPrec [RoutingProfileQueueReference]
ReadPrec RoutingProfileQueueReference
Int -> ReadS RoutingProfileQueueReference
ReadS [RoutingProfileQueueReference]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RoutingProfileQueueReference]
$creadListPrec :: ReadPrec [RoutingProfileQueueReference]
readPrec :: ReadPrec RoutingProfileQueueReference
$creadPrec :: ReadPrec RoutingProfileQueueReference
readList :: ReadS [RoutingProfileQueueReference]
$creadList :: ReadS [RoutingProfileQueueReference]
readsPrec :: Int -> ReadS RoutingProfileQueueReference
$creadsPrec :: Int -> ReadS RoutingProfileQueueReference
Prelude.Read, Int -> RoutingProfileQueueReference -> ShowS
[RoutingProfileQueueReference] -> ShowS
RoutingProfileQueueReference -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RoutingProfileQueueReference] -> ShowS
$cshowList :: [RoutingProfileQueueReference] -> ShowS
show :: RoutingProfileQueueReference -> String
$cshow :: RoutingProfileQueueReference -> String
showsPrec :: Int -> RoutingProfileQueueReference -> ShowS
$cshowsPrec :: Int -> RoutingProfileQueueReference -> ShowS
Prelude.Show, forall x.
Rep RoutingProfileQueueReference x -> RoutingProfileQueueReference
forall x.
RoutingProfileQueueReference -> Rep RoutingProfileQueueReference x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep RoutingProfileQueueReference x -> RoutingProfileQueueReference
$cfrom :: forall x.
RoutingProfileQueueReference -> Rep RoutingProfileQueueReference x
Prelude.Generic)
newRoutingProfileQueueReference ::
Prelude.Text ->
Channel ->
RoutingProfileQueueReference
newRoutingProfileQueueReference :: Text -> Channel -> RoutingProfileQueueReference
newRoutingProfileQueueReference Text
pQueueId_ Channel
pChannel_ =
RoutingProfileQueueReference'
{ $sel:queueId:RoutingProfileQueueReference' :: Text
queueId = Text
pQueueId_,
$sel:channel:RoutingProfileQueueReference' :: Channel
channel = Channel
pChannel_
}
routingProfileQueueReference_queueId :: Lens.Lens' RoutingProfileQueueReference Prelude.Text
routingProfileQueueReference_queueId :: Lens' RoutingProfileQueueReference Text
routingProfileQueueReference_queueId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RoutingProfileQueueReference' {Text
queueId :: Text
$sel:queueId:RoutingProfileQueueReference' :: RoutingProfileQueueReference -> Text
queueId} -> Text
queueId) (\s :: RoutingProfileQueueReference
s@RoutingProfileQueueReference' {} Text
a -> RoutingProfileQueueReference
s {$sel:queueId:RoutingProfileQueueReference' :: Text
queueId = Text
a} :: RoutingProfileQueueReference)
routingProfileQueueReference_channel :: Lens.Lens' RoutingProfileQueueReference Channel
routingProfileQueueReference_channel :: Lens' RoutingProfileQueueReference Channel
routingProfileQueueReference_channel = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RoutingProfileQueueReference' {Channel
channel :: Channel
$sel:channel:RoutingProfileQueueReference' :: RoutingProfileQueueReference -> Channel
channel} -> Channel
channel) (\s :: RoutingProfileQueueReference
s@RoutingProfileQueueReference' {} Channel
a -> RoutingProfileQueueReference
s {$sel:channel:RoutingProfileQueueReference' :: Channel
channel = Channel
a} :: RoutingProfileQueueReference)
instance
Prelude.Hashable
RoutingProfileQueueReference
where
hashWithSalt :: Int -> RoutingProfileQueueReference -> Int
hashWithSalt Int
_salt RoutingProfileQueueReference' {Text
Channel
channel :: Channel
queueId :: Text
$sel:channel:RoutingProfileQueueReference' :: RoutingProfileQueueReference -> Channel
$sel:queueId:RoutingProfileQueueReference' :: RoutingProfileQueueReference -> Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
queueId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Channel
channel
instance Prelude.NFData RoutingProfileQueueReference where
rnf :: RoutingProfileQueueReference -> ()
rnf RoutingProfileQueueReference' {Text
Channel
channel :: Channel
queueId :: Text
$sel:channel:RoutingProfileQueueReference' :: RoutingProfileQueueReference -> Channel
$sel:queueId:RoutingProfileQueueReference' :: RoutingProfileQueueReference -> Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Text
queueId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Channel
channel
instance Data.ToJSON RoutingProfileQueueReference where
toJSON :: RoutingProfileQueueReference -> Value
toJSON RoutingProfileQueueReference' {Text
Channel
channel :: Channel
queueId :: Text
$sel:channel:RoutingProfileQueueReference' :: RoutingProfileQueueReference -> Channel
$sel:queueId:RoutingProfileQueueReference' :: RoutingProfileQueueReference -> Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ forall a. a -> Maybe a
Prelude.Just (Key
"QueueId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
queueId),
forall a. a -> Maybe a
Prelude.Just (Key
"Channel" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Channel
channel)
]
)