{-# 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.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data RoutingProfileQueueReference = RoutingProfileQueueReference'
{
RoutingProfileQueueReference -> Text
queueId :: Prelude.Text,
RoutingProfileQueueReference -> Channel
channel :: Channel
}
deriving (RoutingProfileQueueReference
-> RoutingProfileQueueReference -> Bool
(RoutingProfileQueueReference
-> RoutingProfileQueueReference -> Bool)
-> (RoutingProfileQueueReference
-> RoutingProfileQueueReference -> Bool)
-> Eq RoutingProfileQueueReference
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]
(Int -> ReadS RoutingProfileQueueReference)
-> ReadS [RoutingProfileQueueReference]
-> ReadPrec RoutingProfileQueueReference
-> ReadPrec [RoutingProfileQueueReference]
-> Read 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
(Int -> RoutingProfileQueueReference -> ShowS)
-> (RoutingProfileQueueReference -> String)
-> ([RoutingProfileQueueReference] -> ShowS)
-> Show RoutingProfileQueueReference
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.
RoutingProfileQueueReference -> Rep RoutingProfileQueueReference x)
-> (forall x.
Rep RoutingProfileQueueReference x -> RoutingProfileQueueReference)
-> Generic RoutingProfileQueueReference
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' :: Text -> Channel -> RoutingProfileQueueReference
RoutingProfileQueueReference'
{ $sel:queueId:RoutingProfileQueueReference' :: Text
queueId = Text
pQueueId_,
$sel:channel:RoutingProfileQueueReference' :: Channel
channel = Channel
pChannel_
}
routingProfileQueueReference_queueId :: Lens.Lens' RoutingProfileQueueReference Prelude.Text
routingProfileQueueReference_queueId :: (Text -> f Text)
-> RoutingProfileQueueReference -> f RoutingProfileQueueReference
routingProfileQueueReference_queueId = (RoutingProfileQueueReference -> Text)
-> (RoutingProfileQueueReference
-> Text -> RoutingProfileQueueReference)
-> Lens
RoutingProfileQueueReference RoutingProfileQueueReference Text Text
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 :: (Channel -> f Channel)
-> RoutingProfileQueueReference -> f RoutingProfileQueueReference
routingProfileQueueReference_channel = (RoutingProfileQueueReference -> Channel)
-> (RoutingProfileQueueReference
-> Channel -> RoutingProfileQueueReference)
-> Lens
RoutingProfileQueueReference
RoutingProfileQueueReference
Channel
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
instance Prelude.NFData RoutingProfileQueueReference
instance Core.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
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"QueueId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
queueId),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Channel" Text -> Channel -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Channel
channel)
]
)