{-# 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-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- 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.Lens as Lens
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
(RoutingProfileQueueConfigSummary
 -> RoutingProfileQueueConfigSummary -> Bool)
-> (RoutingProfileQueueConfigSummary
    -> RoutingProfileQueueConfigSummary -> Bool)
-> Eq RoutingProfileQueueConfigSummary
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]
(Int -> ReadS RoutingProfileQueueConfigSummary)
-> ReadS [RoutingProfileQueueConfigSummary]
-> ReadPrec RoutingProfileQueueConfigSummary
-> ReadPrec [RoutingProfileQueueConfigSummary]
-> Read 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
(Int -> RoutingProfileQueueConfigSummary -> ShowS)
-> (RoutingProfileQueueConfigSummary -> String)
-> ([RoutingProfileQueueConfigSummary] -> ShowS)
-> Show RoutingProfileQueueConfigSummary
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.
 RoutingProfileQueueConfigSummary
 -> Rep RoutingProfileQueueConfigSummary x)
-> (forall x.
    Rep RoutingProfileQueueConfigSummary x
    -> RoutingProfileQueueConfigSummary)
-> Generic RoutingProfileQueueConfigSummary
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' :: Text
-> Text
-> Text
-> Natural
-> Natural
-> Channel
-> RoutingProfileQueueConfigSummary
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 :: (Text -> f Text)
-> RoutingProfileQueueConfigSummary
-> f RoutingProfileQueueConfigSummary
routingProfileQueueConfigSummary_queueId = (RoutingProfileQueueConfigSummary -> Text)
-> (RoutingProfileQueueConfigSummary
    -> Text -> RoutingProfileQueueConfigSummary)
-> Lens
     RoutingProfileQueueConfigSummary
     RoutingProfileQueueConfigSummary
     Text
     Text
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 :: (Text -> f Text)
-> RoutingProfileQueueConfigSummary
-> f RoutingProfileQueueConfigSummary
routingProfileQueueConfigSummary_queueArn = (RoutingProfileQueueConfigSummary -> Text)
-> (RoutingProfileQueueConfigSummary
    -> Text -> RoutingProfileQueueConfigSummary)
-> Lens
     RoutingProfileQueueConfigSummary
     RoutingProfileQueueConfigSummary
     Text
     Text
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 :: (Text -> f Text)
-> RoutingProfileQueueConfigSummary
-> f RoutingProfileQueueConfigSummary
routingProfileQueueConfigSummary_queueName = (RoutingProfileQueueConfigSummary -> Text)
-> (RoutingProfileQueueConfigSummary
    -> Text -> RoutingProfileQueueConfigSummary)
-> Lens
     RoutingProfileQueueConfigSummary
     RoutingProfileQueueConfigSummary
     Text
     Text
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 :: (Natural -> f Natural)
-> RoutingProfileQueueConfigSummary
-> f RoutingProfileQueueConfigSummary
routingProfileQueueConfigSummary_priority = (RoutingProfileQueueConfigSummary -> Natural)
-> (RoutingProfileQueueConfigSummary
    -> Natural -> RoutingProfileQueueConfigSummary)
-> Lens
     RoutingProfileQueueConfigSummary
     RoutingProfileQueueConfigSummary
     Natural
     Natural
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 :: (Natural -> f Natural)
-> RoutingProfileQueueConfigSummary
-> f RoutingProfileQueueConfigSummary
routingProfileQueueConfigSummary_delay = (RoutingProfileQueueConfigSummary -> Natural)
-> (RoutingProfileQueueConfigSummary
    -> Natural -> RoutingProfileQueueConfigSummary)
-> Lens
     RoutingProfileQueueConfigSummary
     RoutingProfileQueueConfigSummary
     Natural
     Natural
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 :: (Channel -> f Channel)
-> RoutingProfileQueueConfigSummary
-> f RoutingProfileQueueConfigSummary
routingProfileQueueConfigSummary_channel = (RoutingProfileQueueConfigSummary -> Channel)
-> (RoutingProfileQueueConfigSummary
    -> Channel -> RoutingProfileQueueConfigSummary)
-> Lens
     RoutingProfileQueueConfigSummary
     RoutingProfileQueueConfigSummary
     Channel
     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
  Core.FromJSON
    RoutingProfileQueueConfigSummary
  where
  parseJSON :: Value -> Parser RoutingProfileQueueConfigSummary
parseJSON =
    String
-> (Object -> Parser RoutingProfileQueueConfigSummary)
-> Value
-> Parser RoutingProfileQueueConfigSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"RoutingProfileQueueConfigSummary"
      ( \Object
x ->
          Text
-> Text
-> Text
-> Natural
-> Natural
-> Channel
-> RoutingProfileQueueConfigSummary
RoutingProfileQueueConfigSummary'
            (Text
 -> Text
 -> Text
 -> Natural
 -> Natural
 -> Channel
 -> RoutingProfileQueueConfigSummary)
-> Parser Text
-> Parser
     (Text
      -> Text
      -> Natural
      -> Natural
      -> Channel
      -> RoutingProfileQueueConfigSummary)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"QueueId")
            Parser
  (Text
   -> Text
   -> Natural
   -> Natural
   -> Channel
   -> RoutingProfileQueueConfigSummary)
-> Parser Text
-> Parser
     (Text
      -> Natural
      -> Natural
      -> Channel
      -> RoutingProfileQueueConfigSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"QueueArn")
            Parser
  (Text
   -> Natural
   -> Natural
   -> Channel
   -> RoutingProfileQueueConfigSummary)
-> Parser Text
-> Parser
     (Natural -> Natural -> Channel -> RoutingProfileQueueConfigSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"QueueName")
            Parser
  (Natural -> Natural -> Channel -> RoutingProfileQueueConfigSummary)
-> Parser Natural
-> Parser (Natural -> Channel -> RoutingProfileQueueConfigSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Natural
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"Priority")
            Parser (Natural -> Channel -> RoutingProfileQueueConfigSummary)
-> Parser Natural
-> Parser (Channel -> RoutingProfileQueueConfigSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Natural
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"Delay")
            Parser (Channel -> RoutingProfileQueueConfigSummary)
-> Parser Channel -> Parser RoutingProfileQueueConfigSummary
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Channel
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"Channel")
      )

instance
  Prelude.Hashable
    RoutingProfileQueueConfigSummary

instance
  Prelude.NFData
    RoutingProfileQueueConfigSummary