{-# 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.RoutingProfileSummary where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data RoutingProfileSummary = RoutingProfileSummary'
{
RoutingProfileSummary -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
RoutingProfileSummary -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
RoutingProfileSummary -> Maybe Text
id :: Prelude.Maybe Prelude.Text
}
deriving (RoutingProfileSummary -> RoutingProfileSummary -> Bool
(RoutingProfileSummary -> RoutingProfileSummary -> Bool)
-> (RoutingProfileSummary -> RoutingProfileSummary -> Bool)
-> Eq RoutingProfileSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RoutingProfileSummary -> RoutingProfileSummary -> Bool
$c/= :: RoutingProfileSummary -> RoutingProfileSummary -> Bool
== :: RoutingProfileSummary -> RoutingProfileSummary -> Bool
$c== :: RoutingProfileSummary -> RoutingProfileSummary -> Bool
Prelude.Eq, ReadPrec [RoutingProfileSummary]
ReadPrec RoutingProfileSummary
Int -> ReadS RoutingProfileSummary
ReadS [RoutingProfileSummary]
(Int -> ReadS RoutingProfileSummary)
-> ReadS [RoutingProfileSummary]
-> ReadPrec RoutingProfileSummary
-> ReadPrec [RoutingProfileSummary]
-> Read RoutingProfileSummary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RoutingProfileSummary]
$creadListPrec :: ReadPrec [RoutingProfileSummary]
readPrec :: ReadPrec RoutingProfileSummary
$creadPrec :: ReadPrec RoutingProfileSummary
readList :: ReadS [RoutingProfileSummary]
$creadList :: ReadS [RoutingProfileSummary]
readsPrec :: Int -> ReadS RoutingProfileSummary
$creadsPrec :: Int -> ReadS RoutingProfileSummary
Prelude.Read, Int -> RoutingProfileSummary -> ShowS
[RoutingProfileSummary] -> ShowS
RoutingProfileSummary -> String
(Int -> RoutingProfileSummary -> ShowS)
-> (RoutingProfileSummary -> String)
-> ([RoutingProfileSummary] -> ShowS)
-> Show RoutingProfileSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RoutingProfileSummary] -> ShowS
$cshowList :: [RoutingProfileSummary] -> ShowS
show :: RoutingProfileSummary -> String
$cshow :: RoutingProfileSummary -> String
showsPrec :: Int -> RoutingProfileSummary -> ShowS
$cshowsPrec :: Int -> RoutingProfileSummary -> ShowS
Prelude.Show, (forall x. RoutingProfileSummary -> Rep RoutingProfileSummary x)
-> (forall x. Rep RoutingProfileSummary x -> RoutingProfileSummary)
-> Generic RoutingProfileSummary
forall x. Rep RoutingProfileSummary x -> RoutingProfileSummary
forall x. RoutingProfileSummary -> Rep RoutingProfileSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep RoutingProfileSummary x -> RoutingProfileSummary
$cfrom :: forall x. RoutingProfileSummary -> Rep RoutingProfileSummary x
Prelude.Generic)
newRoutingProfileSummary ::
RoutingProfileSummary
newRoutingProfileSummary :: RoutingProfileSummary
newRoutingProfileSummary =
RoutingProfileSummary' :: Maybe Text -> Maybe Text -> Maybe Text -> RoutingProfileSummary
RoutingProfileSummary'
{ $sel:arn:RoutingProfileSummary' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:name:RoutingProfileSummary' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:id:RoutingProfileSummary' :: Maybe Text
id = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
routingProfileSummary_arn :: Lens.Lens' RoutingProfileSummary (Prelude.Maybe Prelude.Text)
routingProfileSummary_arn :: (Maybe Text -> f (Maybe Text))
-> RoutingProfileSummary -> f RoutingProfileSummary
routingProfileSummary_arn = (RoutingProfileSummary -> Maybe Text)
-> (RoutingProfileSummary -> Maybe Text -> RoutingProfileSummary)
-> Lens
RoutingProfileSummary
RoutingProfileSummary
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RoutingProfileSummary' {Maybe Text
arn :: Maybe Text
$sel:arn:RoutingProfileSummary' :: RoutingProfileSummary -> Maybe Text
arn} -> Maybe Text
arn) (\s :: RoutingProfileSummary
s@RoutingProfileSummary' {} Maybe Text
a -> RoutingProfileSummary
s {$sel:arn:RoutingProfileSummary' :: Maybe Text
arn = Maybe Text
a} :: RoutingProfileSummary)
routingProfileSummary_name :: Lens.Lens' RoutingProfileSummary (Prelude.Maybe Prelude.Text)
routingProfileSummary_name :: (Maybe Text -> f (Maybe Text))
-> RoutingProfileSummary -> f RoutingProfileSummary
routingProfileSummary_name = (RoutingProfileSummary -> Maybe Text)
-> (RoutingProfileSummary -> Maybe Text -> RoutingProfileSummary)
-> Lens
RoutingProfileSummary
RoutingProfileSummary
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RoutingProfileSummary' {Maybe Text
name :: Maybe Text
$sel:name:RoutingProfileSummary' :: RoutingProfileSummary -> Maybe Text
name} -> Maybe Text
name) (\s :: RoutingProfileSummary
s@RoutingProfileSummary' {} Maybe Text
a -> RoutingProfileSummary
s {$sel:name:RoutingProfileSummary' :: Maybe Text
name = Maybe Text
a} :: RoutingProfileSummary)
routingProfileSummary_id :: Lens.Lens' RoutingProfileSummary (Prelude.Maybe Prelude.Text)
routingProfileSummary_id :: (Maybe Text -> f (Maybe Text))
-> RoutingProfileSummary -> f RoutingProfileSummary
routingProfileSummary_id = (RoutingProfileSummary -> Maybe Text)
-> (RoutingProfileSummary -> Maybe Text -> RoutingProfileSummary)
-> Lens
RoutingProfileSummary
RoutingProfileSummary
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RoutingProfileSummary' {Maybe Text
id :: Maybe Text
$sel:id:RoutingProfileSummary' :: RoutingProfileSummary -> Maybe Text
id} -> Maybe Text
id) (\s :: RoutingProfileSummary
s@RoutingProfileSummary' {} Maybe Text
a -> RoutingProfileSummary
s {$sel:id:RoutingProfileSummary' :: Maybe Text
id = Maybe Text
a} :: RoutingProfileSummary)
instance Core.FromJSON RoutingProfileSummary where
parseJSON :: Value -> Parser RoutingProfileSummary
parseJSON =
String
-> (Object -> Parser RoutingProfileSummary)
-> Value
-> Parser RoutingProfileSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"RoutingProfileSummary"
( \Object
x ->
Maybe Text -> Maybe Text -> Maybe Text -> RoutingProfileSummary
RoutingProfileSummary'
(Maybe Text -> Maybe Text -> Maybe Text -> RoutingProfileSummary)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> RoutingProfileSummary)
forall (f :: * -> *) a b. Functor 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
"Arn")
Parser (Maybe Text -> Maybe Text -> RoutingProfileSummary)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> RoutingProfileSummary)
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 -> RoutingProfileSummary)
-> Parser (Maybe Text) -> Parser RoutingProfileSummary
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
"Id")
)
instance Prelude.Hashable RoutingProfileSummary
instance Prelude.NFData RoutingProfileSummary