{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.Connect.Types.RoutingProfileQueueConfigSummary
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.Connect.Types.RoutingProfileQueueConfigSummary 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

-- | Contains summary information about a routing profile queue.
--
-- /See:/ 'newRoutingProfileQueueConfigSummary' smart constructor.
data RoutingProfileQueueConfigSummary = RoutingProfileQueueConfigSummary'
  { -- | The identifier for the queue.
    RoutingProfileQueueConfigSummary -> Text
queueId :: Prelude.Text,
    -- | The Amazon Resource Name (ARN) of the queue.
    RoutingProfileQueueConfigSummary -> Text
queueArn :: Prelude.Text,
    -- | The name of the queue.
    RoutingProfileQueueConfigSummary -> Text
queueName :: Prelude.Text,
    -- | The order in which contacts are to be handled for the queue. For more
    -- information, see
    -- <https://docs.aws.amazon.com/connect/latest/adminguide/concepts-routing-profiles-priority.html Queues: priority and delay>.
    RoutingProfileQueueConfigSummary -> Natural
priority :: Prelude.Natural,
    -- | The delay, in seconds, that a contact should be in the queue before they
    -- are routed to an available agent. For more information, see
    -- <https://docs.aws.amazon.com/connect/latest/adminguide/concepts-routing-profiles-priority.html Queues: priority and delay>
    -- in the /Amazon Connect Administrator Guide/.
    RoutingProfileQueueConfigSummary -> Natural
delay :: Prelude.Natural,
    -- | The channels this queue supports.
    RoutingProfileQueueConfigSummary -> Channel
channel :: Channel
  }
  deriving (RoutingProfileQueueConfigSummary
-> RoutingProfileQueueConfigSummary -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RoutingProfileQueueConfigSummary
-> RoutingProfileQueueConfigSummary -> Bool
$c/= :: RoutingProfileQueueConfigSummary
-> RoutingProfileQueueConfigSummary -> Bool
== :: RoutingProfileQueueConfigSummary
-> RoutingProfileQueueConfigSummary -> Bool
$c== :: RoutingProfileQueueConfigSummary
-> RoutingProfileQueueConfigSummary -> Bool
Prelude.Eq, ReadPrec [RoutingProfileQueueConfigSummary]
ReadPrec RoutingProfileQueueConfigSummary
Int -> ReadS RoutingProfileQueueConfigSummary
ReadS [RoutingProfileQueueConfigSummary]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RoutingProfileQueueConfigSummary]
$creadListPrec :: ReadPrec [RoutingProfileQueueConfigSummary]
readPrec :: ReadPrec RoutingProfileQueueConfigSummary
$creadPrec :: ReadPrec RoutingProfileQueueConfigSummary
readList :: ReadS [RoutingProfileQueueConfigSummary]
$creadList :: ReadS [RoutingProfileQueueConfigSummary]
readsPrec :: Int -> ReadS RoutingProfileQueueConfigSummary
$creadsPrec :: Int -> ReadS RoutingProfileQueueConfigSummary
Prelude.Read, Int -> RoutingProfileQueueConfigSummary -> ShowS
[RoutingProfileQueueConfigSummary] -> ShowS
RoutingProfileQueueConfigSummary -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RoutingProfileQueueConfigSummary] -> ShowS
$cshowList :: [RoutingProfileQueueConfigSummary] -> ShowS
show :: RoutingProfileQueueConfigSummary -> String
$cshow :: RoutingProfileQueueConfigSummary -> String
showsPrec :: Int -> RoutingProfileQueueConfigSummary -> ShowS
$cshowsPrec :: Int -> RoutingProfileQueueConfigSummary -> ShowS
Prelude.Show, forall x.
Rep RoutingProfileQueueConfigSummary x
-> RoutingProfileQueueConfigSummary
forall x.
RoutingProfileQueueConfigSummary
-> Rep RoutingProfileQueueConfigSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep RoutingProfileQueueConfigSummary x
-> RoutingProfileQueueConfigSummary
$cfrom :: forall x.
RoutingProfileQueueConfigSummary
-> Rep RoutingProfileQueueConfigSummary x
Prelude.Generic)

-- |
-- Create a value of 'RoutingProfileQueueConfigSummary' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'queueId', 'routingProfileQueueConfigSummary_queueId' - The identifier for the queue.
--
-- 'queueArn', 'routingProfileQueueConfigSummary_queueArn' - The Amazon Resource Name (ARN) of the queue.
--
-- 'queueName', 'routingProfileQueueConfigSummary_queueName' - The name of the queue.
--
-- 'priority', 'routingProfileQueueConfigSummary_priority' - The order in which contacts are to be handled for the queue. For more
-- information, see
-- <https://docs.aws.amazon.com/connect/latest/adminguide/concepts-routing-profiles-priority.html Queues: priority and delay>.
--
-- 'delay', 'routingProfileQueueConfigSummary_delay' - The delay, in seconds, that a contact should be in the queue before they
-- are routed to an available agent. For more information, see
-- <https://docs.aws.amazon.com/connect/latest/adminguide/concepts-routing-profiles-priority.html Queues: priority and delay>
-- in the /Amazon Connect Administrator Guide/.
--
-- 'channel', 'routingProfileQueueConfigSummary_channel' - The channels this queue supports.
newRoutingProfileQueueConfigSummary ::
  -- | 'queueId'
  Prelude.Text ->
  -- | 'queueArn'
  Prelude.Text ->
  -- | 'queueName'
  Prelude.Text ->
  -- | 'priority'
  Prelude.Natural ->
  -- | 'delay'
  Prelude.Natural ->
  -- | 'channel'
  Channel ->
  RoutingProfileQueueConfigSummary
newRoutingProfileQueueConfigSummary :: Text
-> Text
-> Text
-> Natural
-> Natural
-> Channel
-> RoutingProfileQueueConfigSummary
newRoutingProfileQueueConfigSummary
  Text
pQueueId_
  Text
pQueueArn_
  Text
pQueueName_
  Natural
pPriority_
  Natural
pDelay_
  Channel
pChannel_ =
    RoutingProfileQueueConfigSummary'
      { $sel:queueId:RoutingProfileQueueConfigSummary' :: Text
queueId =
          Text
pQueueId_,
        $sel:queueArn:RoutingProfileQueueConfigSummary' :: Text
queueArn = Text
pQueueArn_,
        $sel:queueName:RoutingProfileQueueConfigSummary' :: Text
queueName = Text
pQueueName_,
        $sel:priority:RoutingProfileQueueConfigSummary' :: Natural
priority = Natural
pPriority_,
        $sel:delay:RoutingProfileQueueConfigSummary' :: Natural
delay = Natural
pDelay_,
        $sel:channel:RoutingProfileQueueConfigSummary' :: Channel
channel = Channel
pChannel_
      }

-- | The identifier for the queue.
routingProfileQueueConfigSummary_queueId :: Lens.Lens' RoutingProfileQueueConfigSummary Prelude.Text
routingProfileQueueConfigSummary_queueId :: Lens' RoutingProfileQueueConfigSummary Text
routingProfileQueueConfigSummary_queueId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RoutingProfileQueueConfigSummary' {Text
queueId :: Text
$sel:queueId:RoutingProfileQueueConfigSummary' :: RoutingProfileQueueConfigSummary -> Text
queueId} -> Text
queueId) (\s :: RoutingProfileQueueConfigSummary
s@RoutingProfileQueueConfigSummary' {} Text
a -> RoutingProfileQueueConfigSummary
s {$sel:queueId:RoutingProfileQueueConfigSummary' :: Text
queueId = Text
a} :: RoutingProfileQueueConfigSummary)

-- | The Amazon Resource Name (ARN) of the queue.
routingProfileQueueConfigSummary_queueArn :: Lens.Lens' RoutingProfileQueueConfigSummary Prelude.Text
routingProfileQueueConfigSummary_queueArn :: Lens' RoutingProfileQueueConfigSummary Text
routingProfileQueueConfigSummary_queueArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RoutingProfileQueueConfigSummary' {Text
queueArn :: Text
$sel:queueArn:RoutingProfileQueueConfigSummary' :: RoutingProfileQueueConfigSummary -> Text
queueArn} -> Text
queueArn) (\s :: RoutingProfileQueueConfigSummary
s@RoutingProfileQueueConfigSummary' {} Text
a -> RoutingProfileQueueConfigSummary
s {$sel:queueArn:RoutingProfileQueueConfigSummary' :: Text
queueArn = Text
a} :: RoutingProfileQueueConfigSummary)

-- | The name of the queue.
routingProfileQueueConfigSummary_queueName :: Lens.Lens' RoutingProfileQueueConfigSummary Prelude.Text
routingProfileQueueConfigSummary_queueName :: Lens' RoutingProfileQueueConfigSummary Text
routingProfileQueueConfigSummary_queueName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RoutingProfileQueueConfigSummary' {Text
queueName :: Text
$sel:queueName:RoutingProfileQueueConfigSummary' :: RoutingProfileQueueConfigSummary -> Text
queueName} -> Text
queueName) (\s :: RoutingProfileQueueConfigSummary
s@RoutingProfileQueueConfigSummary' {} Text
a -> RoutingProfileQueueConfigSummary
s {$sel:queueName:RoutingProfileQueueConfigSummary' :: Text
queueName = Text
a} :: RoutingProfileQueueConfigSummary)

-- | The order in which contacts are to be handled for the queue. For more
-- information, see
-- <https://docs.aws.amazon.com/connect/latest/adminguide/concepts-routing-profiles-priority.html Queues: priority and delay>.
routingProfileQueueConfigSummary_priority :: Lens.Lens' RoutingProfileQueueConfigSummary Prelude.Natural
routingProfileQueueConfigSummary_priority :: Lens' RoutingProfileQueueConfigSummary Natural
routingProfileQueueConfigSummary_priority = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RoutingProfileQueueConfigSummary' {Natural
priority :: Natural
$sel:priority:RoutingProfileQueueConfigSummary' :: RoutingProfileQueueConfigSummary -> Natural
priority} -> Natural
priority) (\s :: RoutingProfileQueueConfigSummary
s@RoutingProfileQueueConfigSummary' {} Natural
a -> RoutingProfileQueueConfigSummary
s {$sel:priority:RoutingProfileQueueConfigSummary' :: Natural
priority = Natural
a} :: RoutingProfileQueueConfigSummary)

-- | The delay, in seconds, that a contact should be in the queue before they
-- are routed to an available agent. For more information, see
-- <https://docs.aws.amazon.com/connect/latest/adminguide/concepts-routing-profiles-priority.html Queues: priority and delay>
-- in the /Amazon Connect Administrator Guide/.
routingProfileQueueConfigSummary_delay :: Lens.Lens' RoutingProfileQueueConfigSummary Prelude.Natural
routingProfileQueueConfigSummary_delay :: Lens' RoutingProfileQueueConfigSummary Natural
routingProfileQueueConfigSummary_delay = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RoutingProfileQueueConfigSummary' {Natural
delay :: Natural
$sel:delay:RoutingProfileQueueConfigSummary' :: RoutingProfileQueueConfigSummary -> Natural
delay} -> Natural
delay) (\s :: RoutingProfileQueueConfigSummary
s@RoutingProfileQueueConfigSummary' {} Natural
a -> RoutingProfileQueueConfigSummary
s {$sel:delay:RoutingProfileQueueConfigSummary' :: Natural
delay = Natural
a} :: RoutingProfileQueueConfigSummary)

-- | The channels this queue supports.
routingProfileQueueConfigSummary_channel :: Lens.Lens' RoutingProfileQueueConfigSummary Channel
routingProfileQueueConfigSummary_channel :: Lens' RoutingProfileQueueConfigSummary Channel
routingProfileQueueConfigSummary_channel = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RoutingProfileQueueConfigSummary' {Channel
channel :: Channel
$sel:channel:RoutingProfileQueueConfigSummary' :: RoutingProfileQueueConfigSummary -> Channel
channel} -> Channel
channel) (\s :: RoutingProfileQueueConfigSummary
s@RoutingProfileQueueConfigSummary' {} Channel
a -> RoutingProfileQueueConfigSummary
s {$sel:channel:RoutingProfileQueueConfigSummary' :: Channel
channel = Channel
a} :: RoutingProfileQueueConfigSummary)

instance
  Data.FromJSON
    RoutingProfileQueueConfigSummary
  where
  parseJSON :: Value -> Parser RoutingProfileQueueConfigSummary
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"RoutingProfileQueueConfigSummary"
      ( \Object
x ->
          Text
-> Text
-> Text
-> Natural
-> Natural
-> Channel
-> RoutingProfileQueueConfigSummary
RoutingProfileQueueConfigSummary'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"QueueId")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"QueueArn")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"QueueName")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"Priority")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"Delay")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"Channel")
      )

instance
  Prelude.Hashable
    RoutingProfileQueueConfigSummary
  where
  hashWithSalt :: Int -> RoutingProfileQueueConfigSummary -> Int
hashWithSalt
    Int
_salt
    RoutingProfileQueueConfigSummary' {Natural
Text
Channel
channel :: Channel
delay :: Natural
priority :: Natural
queueName :: Text
queueArn :: Text
queueId :: Text
$sel:channel:RoutingProfileQueueConfigSummary' :: RoutingProfileQueueConfigSummary -> Channel
$sel:delay:RoutingProfileQueueConfigSummary' :: RoutingProfileQueueConfigSummary -> Natural
$sel:priority:RoutingProfileQueueConfigSummary' :: RoutingProfileQueueConfigSummary -> Natural
$sel:queueName:RoutingProfileQueueConfigSummary' :: RoutingProfileQueueConfigSummary -> Text
$sel:queueArn:RoutingProfileQueueConfigSummary' :: RoutingProfileQueueConfigSummary -> Text
$sel:queueId:RoutingProfileQueueConfigSummary' :: RoutingProfileQueueConfigSummary -> Text
..} =
      Int
_salt
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
queueId
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
queueArn
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
queueName
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Natural
priority
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Natural
delay
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Channel
channel

instance
  Prelude.NFData
    RoutingProfileQueueConfigSummary
  where
  rnf :: RoutingProfileQueueConfigSummary -> ()
rnf RoutingProfileQueueConfigSummary' {Natural
Text
Channel
channel :: Channel
delay :: Natural
priority :: Natural
queueName :: Text
queueArn :: Text
queueId :: Text
$sel:channel:RoutingProfileQueueConfigSummary' :: RoutingProfileQueueConfigSummary -> Channel
$sel:delay:RoutingProfileQueueConfigSummary' :: RoutingProfileQueueConfigSummary -> Natural
$sel:priority:RoutingProfileQueueConfigSummary' :: RoutingProfileQueueConfigSummary -> Natural
$sel:queueName:RoutingProfileQueueConfigSummary' :: RoutingProfileQueueConfigSummary -> Text
$sel:queueArn:RoutingProfileQueueConfigSummary' :: RoutingProfileQueueConfigSummary -> Text
$sel:queueId:RoutingProfileQueueConfigSummary' :: RoutingProfileQueueConfigSummary -> 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 Text
queueArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
queueName
      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
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Channel
channel