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