{-# 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.Pinpoint.Types.ContactCenterActivity where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data ContactCenterActivity = ContactCenterActivity'
{
ContactCenterActivity -> Maybe Text
nextActivity :: Prelude.Maybe Prelude.Text
}
deriving (ContactCenterActivity -> ContactCenterActivity -> Bool
(ContactCenterActivity -> ContactCenterActivity -> Bool)
-> (ContactCenterActivity -> ContactCenterActivity -> Bool)
-> Eq ContactCenterActivity
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ContactCenterActivity -> ContactCenterActivity -> Bool
$c/= :: ContactCenterActivity -> ContactCenterActivity -> Bool
== :: ContactCenterActivity -> ContactCenterActivity -> Bool
$c== :: ContactCenterActivity -> ContactCenterActivity -> Bool
Prelude.Eq, ReadPrec [ContactCenterActivity]
ReadPrec ContactCenterActivity
Int -> ReadS ContactCenterActivity
ReadS [ContactCenterActivity]
(Int -> ReadS ContactCenterActivity)
-> ReadS [ContactCenterActivity]
-> ReadPrec ContactCenterActivity
-> ReadPrec [ContactCenterActivity]
-> Read ContactCenterActivity
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ContactCenterActivity]
$creadListPrec :: ReadPrec [ContactCenterActivity]
readPrec :: ReadPrec ContactCenterActivity
$creadPrec :: ReadPrec ContactCenterActivity
readList :: ReadS [ContactCenterActivity]
$creadList :: ReadS [ContactCenterActivity]
readsPrec :: Int -> ReadS ContactCenterActivity
$creadsPrec :: Int -> ReadS ContactCenterActivity
Prelude.Read, Int -> ContactCenterActivity -> ShowS
[ContactCenterActivity] -> ShowS
ContactCenterActivity -> String
(Int -> ContactCenterActivity -> ShowS)
-> (ContactCenterActivity -> String)
-> ([ContactCenterActivity] -> ShowS)
-> Show ContactCenterActivity
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ContactCenterActivity] -> ShowS
$cshowList :: [ContactCenterActivity] -> ShowS
show :: ContactCenterActivity -> String
$cshow :: ContactCenterActivity -> String
showsPrec :: Int -> ContactCenterActivity -> ShowS
$cshowsPrec :: Int -> ContactCenterActivity -> ShowS
Prelude.Show, (forall x. ContactCenterActivity -> Rep ContactCenterActivity x)
-> (forall x. Rep ContactCenterActivity x -> ContactCenterActivity)
-> Generic ContactCenterActivity
forall x. Rep ContactCenterActivity x -> ContactCenterActivity
forall x. ContactCenterActivity -> Rep ContactCenterActivity x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ContactCenterActivity x -> ContactCenterActivity
$cfrom :: forall x. ContactCenterActivity -> Rep ContactCenterActivity x
Prelude.Generic)
newContactCenterActivity ::
ContactCenterActivity
newContactCenterActivity :: ContactCenterActivity
newContactCenterActivity =
ContactCenterActivity' :: Maybe Text -> ContactCenterActivity
ContactCenterActivity'
{ $sel:nextActivity:ContactCenterActivity' :: Maybe Text
nextActivity =
Maybe Text
forall a. Maybe a
Prelude.Nothing
}
contactCenterActivity_nextActivity :: Lens.Lens' ContactCenterActivity (Prelude.Maybe Prelude.Text)
contactCenterActivity_nextActivity :: (Maybe Text -> f (Maybe Text))
-> ContactCenterActivity -> f ContactCenterActivity
contactCenterActivity_nextActivity = (ContactCenterActivity -> Maybe Text)
-> (ContactCenterActivity -> Maybe Text -> ContactCenterActivity)
-> Lens
ContactCenterActivity
ContactCenterActivity
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContactCenterActivity' {Maybe Text
nextActivity :: Maybe Text
$sel:nextActivity:ContactCenterActivity' :: ContactCenterActivity -> Maybe Text
nextActivity} -> Maybe Text
nextActivity) (\s :: ContactCenterActivity
s@ContactCenterActivity' {} Maybe Text
a -> ContactCenterActivity
s {$sel:nextActivity:ContactCenterActivity' :: Maybe Text
nextActivity = Maybe Text
a} :: ContactCenterActivity)
instance Core.FromJSON ContactCenterActivity where
parseJSON :: Value -> Parser ContactCenterActivity
parseJSON =
String
-> (Object -> Parser ContactCenterActivity)
-> Value
-> Parser ContactCenterActivity
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ContactCenterActivity"
( \Object
x ->
Maybe Text -> ContactCenterActivity
ContactCenterActivity'
(Maybe Text -> ContactCenterActivity)
-> Parser (Maybe Text) -> Parser ContactCenterActivity
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
"NextActivity")
)
instance Prelude.Hashable ContactCenterActivity
instance Prelude.NFData ContactCenterActivity
instance Core.ToJSON ContactCenterActivity where
toJSON :: ContactCenterActivity -> Value
toJSON ContactCenterActivity' {Maybe Text
nextActivity :: Maybe Text
$sel:nextActivity:ContactCenterActivity' :: ContactCenterActivity -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[(Text
"NextActivity" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
nextActivity]
)