{-# 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.Queue where
import Amazonka.Connect.Types.OutboundCallerConfig
import Amazonka.Connect.Types.QueueStatus
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data Queue = Queue'
{
Queue -> Maybe QueueStatus
status :: Prelude.Maybe QueueStatus,
Queue -> Maybe Text
queueArn :: Prelude.Maybe Prelude.Text,
Queue -> Maybe Text
queueId :: Prelude.Maybe Prelude.Text,
Queue -> Maybe Natural
maxContacts :: Prelude.Maybe Prelude.Natural,
Queue -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
Queue -> Maybe Text
hoursOfOperationId :: Prelude.Maybe Prelude.Text,
Queue -> Maybe OutboundCallerConfig
outboundCallerConfig :: Prelude.Maybe OutboundCallerConfig,
Queue -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
Queue -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text)
}
deriving (Queue -> Queue -> Bool
(Queue -> Queue -> Bool) -> (Queue -> Queue -> Bool) -> Eq Queue
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Queue -> Queue -> Bool
$c/= :: Queue -> Queue -> Bool
== :: Queue -> Queue -> Bool
$c== :: Queue -> Queue -> Bool
Prelude.Eq, ReadPrec [Queue]
ReadPrec Queue
Int -> ReadS Queue
ReadS [Queue]
(Int -> ReadS Queue)
-> ReadS [Queue]
-> ReadPrec Queue
-> ReadPrec [Queue]
-> Read Queue
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Queue]
$creadListPrec :: ReadPrec [Queue]
readPrec :: ReadPrec Queue
$creadPrec :: ReadPrec Queue
readList :: ReadS [Queue]
$creadList :: ReadS [Queue]
readsPrec :: Int -> ReadS Queue
$creadsPrec :: Int -> ReadS Queue
Prelude.Read, Int -> Queue -> ShowS
[Queue] -> ShowS
Queue -> String
(Int -> Queue -> ShowS)
-> (Queue -> String) -> ([Queue] -> ShowS) -> Show Queue
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Queue] -> ShowS
$cshowList :: [Queue] -> ShowS
show :: Queue -> String
$cshow :: Queue -> String
showsPrec :: Int -> Queue -> ShowS
$cshowsPrec :: Int -> Queue -> ShowS
Prelude.Show, (forall x. Queue -> Rep Queue x)
-> (forall x. Rep Queue x -> Queue) -> Generic Queue
forall x. Rep Queue x -> Queue
forall x. Queue -> Rep Queue x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Queue x -> Queue
$cfrom :: forall x. Queue -> Rep Queue x
Prelude.Generic)
newQueue ::
Queue
newQueue :: Queue
newQueue =
Queue' :: Maybe QueueStatus
-> Maybe Text
-> Maybe Text
-> Maybe Natural
-> Maybe Text
-> Maybe Text
-> Maybe OutboundCallerConfig
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Queue
Queue'
{ $sel:status:Queue' :: Maybe QueueStatus
status = Maybe QueueStatus
forall a. Maybe a
Prelude.Nothing,
$sel:queueArn:Queue' :: Maybe Text
queueArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:queueId:Queue' :: Maybe Text
queueId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:maxContacts:Queue' :: Maybe Natural
maxContacts = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:name:Queue' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:hoursOfOperationId:Queue' :: Maybe Text
hoursOfOperationId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:outboundCallerConfig:Queue' :: Maybe OutboundCallerConfig
outboundCallerConfig = Maybe OutboundCallerConfig
forall a. Maybe a
Prelude.Nothing,
$sel:description:Queue' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:tags:Queue' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing
}
queue_status :: Lens.Lens' Queue (Prelude.Maybe QueueStatus)
queue_status :: (Maybe QueueStatus -> f (Maybe QueueStatus)) -> Queue -> f Queue
queue_status = (Queue -> Maybe QueueStatus)
-> (Queue -> Maybe QueueStatus -> Queue)
-> Lens Queue Queue (Maybe QueueStatus) (Maybe QueueStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Queue' {Maybe QueueStatus
status :: Maybe QueueStatus
$sel:status:Queue' :: Queue -> Maybe QueueStatus
status} -> Maybe QueueStatus
status) (\s :: Queue
s@Queue' {} Maybe QueueStatus
a -> Queue
s {$sel:status:Queue' :: Maybe QueueStatus
status = Maybe QueueStatus
a} :: Queue)
queue_queueArn :: Lens.Lens' Queue (Prelude.Maybe Prelude.Text)
queue_queueArn :: (Maybe Text -> f (Maybe Text)) -> Queue -> f Queue
queue_queueArn = (Queue -> Maybe Text)
-> (Queue -> Maybe Text -> Queue)
-> Lens Queue Queue (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Queue' {Maybe Text
queueArn :: Maybe Text
$sel:queueArn:Queue' :: Queue -> Maybe Text
queueArn} -> Maybe Text
queueArn) (\s :: Queue
s@Queue' {} Maybe Text
a -> Queue
s {$sel:queueArn:Queue' :: Maybe Text
queueArn = Maybe Text
a} :: Queue)
queue_queueId :: Lens.Lens' Queue (Prelude.Maybe Prelude.Text)
queue_queueId :: (Maybe Text -> f (Maybe Text)) -> Queue -> f Queue
queue_queueId = (Queue -> Maybe Text)
-> (Queue -> Maybe Text -> Queue)
-> Lens Queue Queue (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Queue' {Maybe Text
queueId :: Maybe Text
$sel:queueId:Queue' :: Queue -> Maybe Text
queueId} -> Maybe Text
queueId) (\s :: Queue
s@Queue' {} Maybe Text
a -> Queue
s {$sel:queueId:Queue' :: Maybe Text
queueId = Maybe Text
a} :: Queue)
queue_maxContacts :: Lens.Lens' Queue (Prelude.Maybe Prelude.Natural)
queue_maxContacts :: (Maybe Natural -> f (Maybe Natural)) -> Queue -> f Queue
queue_maxContacts = (Queue -> Maybe Natural)
-> (Queue -> Maybe Natural -> Queue)
-> Lens Queue Queue (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Queue' {Maybe Natural
maxContacts :: Maybe Natural
$sel:maxContacts:Queue' :: Queue -> Maybe Natural
maxContacts} -> Maybe Natural
maxContacts) (\s :: Queue
s@Queue' {} Maybe Natural
a -> Queue
s {$sel:maxContacts:Queue' :: Maybe Natural
maxContacts = Maybe Natural
a} :: Queue)
queue_name :: Lens.Lens' Queue (Prelude.Maybe Prelude.Text)
queue_name :: (Maybe Text -> f (Maybe Text)) -> Queue -> f Queue
queue_name = (Queue -> Maybe Text)
-> (Queue -> Maybe Text -> Queue)
-> Lens Queue Queue (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Queue' {Maybe Text
name :: Maybe Text
$sel:name:Queue' :: Queue -> Maybe Text
name} -> Maybe Text
name) (\s :: Queue
s@Queue' {} Maybe Text
a -> Queue
s {$sel:name:Queue' :: Maybe Text
name = Maybe Text
a} :: Queue)
queue_hoursOfOperationId :: Lens.Lens' Queue (Prelude.Maybe Prelude.Text)
queue_hoursOfOperationId :: (Maybe Text -> f (Maybe Text)) -> Queue -> f Queue
queue_hoursOfOperationId = (Queue -> Maybe Text)
-> (Queue -> Maybe Text -> Queue)
-> Lens Queue Queue (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Queue' {Maybe Text
hoursOfOperationId :: Maybe Text
$sel:hoursOfOperationId:Queue' :: Queue -> Maybe Text
hoursOfOperationId} -> Maybe Text
hoursOfOperationId) (\s :: Queue
s@Queue' {} Maybe Text
a -> Queue
s {$sel:hoursOfOperationId:Queue' :: Maybe Text
hoursOfOperationId = Maybe Text
a} :: Queue)
queue_outboundCallerConfig :: Lens.Lens' Queue (Prelude.Maybe OutboundCallerConfig)
queue_outboundCallerConfig :: (Maybe OutboundCallerConfig -> f (Maybe OutboundCallerConfig))
-> Queue -> f Queue
queue_outboundCallerConfig = (Queue -> Maybe OutboundCallerConfig)
-> (Queue -> Maybe OutboundCallerConfig -> Queue)
-> Lens
Queue
Queue
(Maybe OutboundCallerConfig)
(Maybe OutboundCallerConfig)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Queue' {Maybe OutboundCallerConfig
outboundCallerConfig :: Maybe OutboundCallerConfig
$sel:outboundCallerConfig:Queue' :: Queue -> Maybe OutboundCallerConfig
outboundCallerConfig} -> Maybe OutboundCallerConfig
outboundCallerConfig) (\s :: Queue
s@Queue' {} Maybe OutboundCallerConfig
a -> Queue
s {$sel:outboundCallerConfig:Queue' :: Maybe OutboundCallerConfig
outboundCallerConfig = Maybe OutboundCallerConfig
a} :: Queue)
queue_description :: Lens.Lens' Queue (Prelude.Maybe Prelude.Text)
queue_description :: (Maybe Text -> f (Maybe Text)) -> Queue -> f Queue
queue_description = (Queue -> Maybe Text)
-> (Queue -> Maybe Text -> Queue)
-> Lens Queue Queue (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Queue' {Maybe Text
description :: Maybe Text
$sel:description:Queue' :: Queue -> Maybe Text
description} -> Maybe Text
description) (\s :: Queue
s@Queue' {} Maybe Text
a -> Queue
s {$sel:description:Queue' :: Maybe Text
description = Maybe Text
a} :: Queue)
queue_tags :: Lens.Lens' Queue (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
queue_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> Queue -> f Queue
queue_tags = (Queue -> Maybe (HashMap Text Text))
-> (Queue -> Maybe (HashMap Text Text) -> Queue)
-> Lens
Queue Queue (Maybe (HashMap Text Text)) (Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Queue' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:Queue' :: Queue -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: Queue
s@Queue' {} Maybe (HashMap Text Text)
a -> Queue
s {$sel:tags:Queue' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: Queue) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> Queue -> f Queue)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> Queue
-> f Queue
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
-> Iso
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Core.FromJSON Queue where
parseJSON :: Value -> Parser Queue
parseJSON =
String -> (Object -> Parser Queue) -> Value -> Parser Queue
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"Queue"
( \Object
x ->
Maybe QueueStatus
-> Maybe Text
-> Maybe Text
-> Maybe Natural
-> Maybe Text
-> Maybe Text
-> Maybe OutboundCallerConfig
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Queue
Queue'
(Maybe QueueStatus
-> Maybe Text
-> Maybe Text
-> Maybe Natural
-> Maybe Text
-> Maybe Text
-> Maybe OutboundCallerConfig
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Queue)
-> Parser (Maybe QueueStatus)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Natural
-> Maybe Text
-> Maybe Text
-> Maybe OutboundCallerConfig
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Queue)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe QueueStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Status")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Natural
-> Maybe Text
-> Maybe Text
-> Maybe OutboundCallerConfig
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Queue)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Natural
-> Maybe Text
-> Maybe Text
-> Maybe OutboundCallerConfig
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Queue)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"QueueArn")
Parser
(Maybe Text
-> Maybe Natural
-> Maybe Text
-> Maybe Text
-> Maybe OutboundCallerConfig
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Queue)
-> Parser (Maybe Text)
-> Parser
(Maybe Natural
-> Maybe Text
-> Maybe Text
-> Maybe OutboundCallerConfig
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Queue)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"QueueId")
Parser
(Maybe Natural
-> Maybe Text
-> Maybe Text
-> Maybe OutboundCallerConfig
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Queue)
-> Parser (Maybe Natural)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe OutboundCallerConfig
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Queue)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"MaxContacts")
Parser
(Maybe Text
-> Maybe Text
-> Maybe OutboundCallerConfig
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Queue)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe OutboundCallerConfig
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Queue)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Name")
Parser
(Maybe Text
-> Maybe OutboundCallerConfig
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Queue)
-> Parser (Maybe Text)
-> Parser
(Maybe OutboundCallerConfig
-> Maybe Text -> Maybe (HashMap Text Text) -> Queue)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"HoursOfOperationId")
Parser
(Maybe OutboundCallerConfig
-> Maybe Text -> Maybe (HashMap Text Text) -> Queue)
-> Parser (Maybe OutboundCallerConfig)
-> Parser (Maybe Text -> Maybe (HashMap Text Text) -> Queue)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe OutboundCallerConfig)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"OutboundCallerConfig")
Parser (Maybe Text -> Maybe (HashMap Text Text) -> Queue)
-> Parser (Maybe Text)
-> Parser (Maybe (HashMap Text Text) -> Queue)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Description")
Parser (Maybe (HashMap Text Text) -> Queue)
-> Parser (Maybe (HashMap Text Text)) -> Parser Queue
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe (HashMap Text Text)))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Tags" Parser (Maybe (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> Parser (Maybe (HashMap Text Text))
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe (HashMap Text Text)
forall a. Monoid a => a
Prelude.mempty)
)
instance Prelude.Hashable Queue
instance Prelude.NFData Queue