{-# 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.QueueReference where
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 QueueReference = QueueReference'
{
QueueReference -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
QueueReference -> Maybe Text
id :: Prelude.Maybe Prelude.Text
}
deriving (QueueReference -> QueueReference -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: QueueReference -> QueueReference -> Bool
$c/= :: QueueReference -> QueueReference -> Bool
== :: QueueReference -> QueueReference -> Bool
$c== :: QueueReference -> QueueReference -> Bool
Prelude.Eq, ReadPrec [QueueReference]
ReadPrec QueueReference
Int -> ReadS QueueReference
ReadS [QueueReference]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [QueueReference]
$creadListPrec :: ReadPrec [QueueReference]
readPrec :: ReadPrec QueueReference
$creadPrec :: ReadPrec QueueReference
readList :: ReadS [QueueReference]
$creadList :: ReadS [QueueReference]
readsPrec :: Int -> ReadS QueueReference
$creadsPrec :: Int -> ReadS QueueReference
Prelude.Read, Int -> QueueReference -> ShowS
[QueueReference] -> ShowS
QueueReference -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [QueueReference] -> ShowS
$cshowList :: [QueueReference] -> ShowS
show :: QueueReference -> String
$cshow :: QueueReference -> String
showsPrec :: Int -> QueueReference -> ShowS
$cshowsPrec :: Int -> QueueReference -> ShowS
Prelude.Show, forall x. Rep QueueReference x -> QueueReference
forall x. QueueReference -> Rep QueueReference x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep QueueReference x -> QueueReference
$cfrom :: forall x. QueueReference -> Rep QueueReference x
Prelude.Generic)
newQueueReference ::
QueueReference
newQueueReference :: QueueReference
newQueueReference =
QueueReference'
{ $sel:arn:QueueReference' :: Maybe Text
arn = forall a. Maybe a
Prelude.Nothing,
$sel:id:QueueReference' :: Maybe Text
id = forall a. Maybe a
Prelude.Nothing
}
queueReference_arn :: Lens.Lens' QueueReference (Prelude.Maybe Prelude.Text)
queueReference_arn :: Lens' QueueReference (Maybe Text)
queueReference_arn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\QueueReference' {Maybe Text
arn :: Maybe Text
$sel:arn:QueueReference' :: QueueReference -> Maybe Text
arn} -> Maybe Text
arn) (\s :: QueueReference
s@QueueReference' {} Maybe Text
a -> QueueReference
s {$sel:arn:QueueReference' :: Maybe Text
arn = Maybe Text
a} :: QueueReference)
queueReference_id :: Lens.Lens' QueueReference (Prelude.Maybe Prelude.Text)
queueReference_id :: Lens' QueueReference (Maybe Text)
queueReference_id = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\QueueReference' {Maybe Text
id :: Maybe Text
$sel:id:QueueReference' :: QueueReference -> Maybe Text
id} -> Maybe Text
id) (\s :: QueueReference
s@QueueReference' {} Maybe Text
a -> QueueReference
s {$sel:id:QueueReference' :: Maybe Text
id = Maybe Text
a} :: QueueReference)
instance Data.FromJSON QueueReference where
parseJSON :: Value -> Parser QueueReference
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"QueueReference"
( \Object
x ->
Maybe Text -> Maybe Text -> QueueReference
QueueReference'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Arn")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Id")
)
instance Prelude.Hashable QueueReference where
hashWithSalt :: Int -> QueueReference -> Int
hashWithSalt Int
_salt QueueReference' {Maybe Text
id :: Maybe Text
arn :: Maybe Text
$sel:id:QueueReference' :: QueueReference -> Maybe Text
$sel:arn:QueueReference' :: QueueReference -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
arn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
id
instance Prelude.NFData QueueReference where
rnf :: QueueReference -> ()
rnf QueueReference' {Maybe Text
id :: Maybe Text
arn :: Maybe Text
$sel:id:QueueReference' :: QueueReference -> Maybe Text
$sel:arn:QueueReference' :: QueueReference -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
arn seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
id