{-# 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.CustomerProfiles.Types.ListWorkflowsItem where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import Amazonka.CustomerProfiles.Types.Status
import Amazonka.CustomerProfiles.Types.WorkflowType
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data ListWorkflowsItem = ListWorkflowsItem'
{
ListWorkflowsItem -> WorkflowType
workflowType :: WorkflowType,
ListWorkflowsItem -> Text
workflowId :: Prelude.Text,
ListWorkflowsItem -> Status
status :: Status,
ListWorkflowsItem -> Text
statusDescription :: Prelude.Text,
ListWorkflowsItem -> POSIX
createdAt :: Data.POSIX,
ListWorkflowsItem -> POSIX
lastUpdatedAt :: Data.POSIX
}
deriving (ListWorkflowsItem -> ListWorkflowsItem -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListWorkflowsItem -> ListWorkflowsItem -> Bool
$c/= :: ListWorkflowsItem -> ListWorkflowsItem -> Bool
== :: ListWorkflowsItem -> ListWorkflowsItem -> Bool
$c== :: ListWorkflowsItem -> ListWorkflowsItem -> Bool
Prelude.Eq, ReadPrec [ListWorkflowsItem]
ReadPrec ListWorkflowsItem
Int -> ReadS ListWorkflowsItem
ReadS [ListWorkflowsItem]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListWorkflowsItem]
$creadListPrec :: ReadPrec [ListWorkflowsItem]
readPrec :: ReadPrec ListWorkflowsItem
$creadPrec :: ReadPrec ListWorkflowsItem
readList :: ReadS [ListWorkflowsItem]
$creadList :: ReadS [ListWorkflowsItem]
readsPrec :: Int -> ReadS ListWorkflowsItem
$creadsPrec :: Int -> ReadS ListWorkflowsItem
Prelude.Read, Int -> ListWorkflowsItem -> ShowS
[ListWorkflowsItem] -> ShowS
ListWorkflowsItem -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListWorkflowsItem] -> ShowS
$cshowList :: [ListWorkflowsItem] -> ShowS
show :: ListWorkflowsItem -> String
$cshow :: ListWorkflowsItem -> String
showsPrec :: Int -> ListWorkflowsItem -> ShowS
$cshowsPrec :: Int -> ListWorkflowsItem -> ShowS
Prelude.Show, forall x. Rep ListWorkflowsItem x -> ListWorkflowsItem
forall x. ListWorkflowsItem -> Rep ListWorkflowsItem x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListWorkflowsItem x -> ListWorkflowsItem
$cfrom :: forall x. ListWorkflowsItem -> Rep ListWorkflowsItem x
Prelude.Generic)
newListWorkflowsItem ::
WorkflowType ->
Prelude.Text ->
Status ->
Prelude.Text ->
Prelude.UTCTime ->
Prelude.UTCTime ->
ListWorkflowsItem
newListWorkflowsItem :: WorkflowType
-> Text
-> Status
-> Text
-> UTCTime
-> UTCTime
-> ListWorkflowsItem
newListWorkflowsItem
WorkflowType
pWorkflowType_
Text
pWorkflowId_
Status
pStatus_
Text
pStatusDescription_
UTCTime
pCreatedAt_
UTCTime
pLastUpdatedAt_ =
ListWorkflowsItem'
{ $sel:workflowType:ListWorkflowsItem' :: WorkflowType
workflowType = WorkflowType
pWorkflowType_,
$sel:workflowId:ListWorkflowsItem' :: Text
workflowId = Text
pWorkflowId_,
$sel:status:ListWorkflowsItem' :: Status
status = Status
pStatus_,
$sel:statusDescription:ListWorkflowsItem' :: Text
statusDescription = Text
pStatusDescription_,
$sel:createdAt:ListWorkflowsItem' :: POSIX
createdAt = forall (a :: Format). Iso' (Time a) UTCTime
Data._Time forall t b. AReview t b -> b -> t
Lens.# UTCTime
pCreatedAt_,
$sel:lastUpdatedAt:ListWorkflowsItem' :: POSIX
lastUpdatedAt = forall (a :: Format). Iso' (Time a) UTCTime
Data._Time forall t b. AReview t b -> b -> t
Lens.# UTCTime
pLastUpdatedAt_
}
listWorkflowsItem_workflowType :: Lens.Lens' ListWorkflowsItem WorkflowType
listWorkflowsItem_workflowType :: Lens' ListWorkflowsItem WorkflowType
listWorkflowsItem_workflowType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListWorkflowsItem' {WorkflowType
workflowType :: WorkflowType
$sel:workflowType:ListWorkflowsItem' :: ListWorkflowsItem -> WorkflowType
workflowType} -> WorkflowType
workflowType) (\s :: ListWorkflowsItem
s@ListWorkflowsItem' {} WorkflowType
a -> ListWorkflowsItem
s {$sel:workflowType:ListWorkflowsItem' :: WorkflowType
workflowType = WorkflowType
a} :: ListWorkflowsItem)
listWorkflowsItem_workflowId :: Lens.Lens' ListWorkflowsItem Prelude.Text
listWorkflowsItem_workflowId :: Lens' ListWorkflowsItem Text
listWorkflowsItem_workflowId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListWorkflowsItem' {Text
workflowId :: Text
$sel:workflowId:ListWorkflowsItem' :: ListWorkflowsItem -> Text
workflowId} -> Text
workflowId) (\s :: ListWorkflowsItem
s@ListWorkflowsItem' {} Text
a -> ListWorkflowsItem
s {$sel:workflowId:ListWorkflowsItem' :: Text
workflowId = Text
a} :: ListWorkflowsItem)
listWorkflowsItem_status :: Lens.Lens' ListWorkflowsItem Status
listWorkflowsItem_status :: Lens' ListWorkflowsItem Status
listWorkflowsItem_status = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListWorkflowsItem' {Status
status :: Status
$sel:status:ListWorkflowsItem' :: ListWorkflowsItem -> Status
status} -> Status
status) (\s :: ListWorkflowsItem
s@ListWorkflowsItem' {} Status
a -> ListWorkflowsItem
s {$sel:status:ListWorkflowsItem' :: Status
status = Status
a} :: ListWorkflowsItem)
listWorkflowsItem_statusDescription :: Lens.Lens' ListWorkflowsItem Prelude.Text
listWorkflowsItem_statusDescription :: Lens' ListWorkflowsItem Text
listWorkflowsItem_statusDescription = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListWorkflowsItem' {Text
statusDescription :: Text
$sel:statusDescription:ListWorkflowsItem' :: ListWorkflowsItem -> Text
statusDescription} -> Text
statusDescription) (\s :: ListWorkflowsItem
s@ListWorkflowsItem' {} Text
a -> ListWorkflowsItem
s {$sel:statusDescription:ListWorkflowsItem' :: Text
statusDescription = Text
a} :: ListWorkflowsItem)
listWorkflowsItem_createdAt :: Lens.Lens' ListWorkflowsItem Prelude.UTCTime
listWorkflowsItem_createdAt :: Lens' ListWorkflowsItem UTCTime
listWorkflowsItem_createdAt = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListWorkflowsItem' {POSIX
createdAt :: POSIX
$sel:createdAt:ListWorkflowsItem' :: ListWorkflowsItem -> POSIX
createdAt} -> POSIX
createdAt) (\s :: ListWorkflowsItem
s@ListWorkflowsItem' {} POSIX
a -> ListWorkflowsItem
s {$sel:createdAt:ListWorkflowsItem' :: POSIX
createdAt = POSIX
a} :: ListWorkflowsItem) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
listWorkflowsItem_lastUpdatedAt :: Lens.Lens' ListWorkflowsItem Prelude.UTCTime
listWorkflowsItem_lastUpdatedAt :: Lens' ListWorkflowsItem UTCTime
listWorkflowsItem_lastUpdatedAt = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListWorkflowsItem' {POSIX
lastUpdatedAt :: POSIX
$sel:lastUpdatedAt:ListWorkflowsItem' :: ListWorkflowsItem -> POSIX
lastUpdatedAt} -> POSIX
lastUpdatedAt) (\s :: ListWorkflowsItem
s@ListWorkflowsItem' {} POSIX
a -> ListWorkflowsItem
s {$sel:lastUpdatedAt:ListWorkflowsItem' :: POSIX
lastUpdatedAt = POSIX
a} :: ListWorkflowsItem) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
instance Data.FromJSON ListWorkflowsItem where
parseJSON :: Value -> Parser ListWorkflowsItem
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"ListWorkflowsItem"
( \Object
x ->
WorkflowType
-> Text -> Status -> Text -> POSIX -> POSIX -> ListWorkflowsItem
ListWorkflowsItem'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"WorkflowType")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"WorkflowId")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"Status")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"StatusDescription")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"CreatedAt")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"LastUpdatedAt")
)
instance Prelude.Hashable ListWorkflowsItem where
hashWithSalt :: Int -> ListWorkflowsItem -> Int
hashWithSalt Int
_salt ListWorkflowsItem' {Text
POSIX
Status
WorkflowType
lastUpdatedAt :: POSIX
createdAt :: POSIX
statusDescription :: Text
status :: Status
workflowId :: Text
workflowType :: WorkflowType
$sel:lastUpdatedAt:ListWorkflowsItem' :: ListWorkflowsItem -> POSIX
$sel:createdAt:ListWorkflowsItem' :: ListWorkflowsItem -> POSIX
$sel:statusDescription:ListWorkflowsItem' :: ListWorkflowsItem -> Text
$sel:status:ListWorkflowsItem' :: ListWorkflowsItem -> Status
$sel:workflowId:ListWorkflowsItem' :: ListWorkflowsItem -> Text
$sel:workflowType:ListWorkflowsItem' :: ListWorkflowsItem -> WorkflowType
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` WorkflowType
workflowType
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
workflowId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Status
status
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
statusDescription
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` POSIX
createdAt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` POSIX
lastUpdatedAt
instance Prelude.NFData ListWorkflowsItem where
rnf :: ListWorkflowsItem -> ()
rnf ListWorkflowsItem' {Text
POSIX
Status
WorkflowType
lastUpdatedAt :: POSIX
createdAt :: POSIX
statusDescription :: Text
status :: Status
workflowId :: Text
workflowType :: WorkflowType
$sel:lastUpdatedAt:ListWorkflowsItem' :: ListWorkflowsItem -> POSIX
$sel:createdAt:ListWorkflowsItem' :: ListWorkflowsItem -> POSIX
$sel:statusDescription:ListWorkflowsItem' :: ListWorkflowsItem -> Text
$sel:status:ListWorkflowsItem' :: ListWorkflowsItem -> Status
$sel:workflowId:ListWorkflowsItem' :: ListWorkflowsItem -> Text
$sel:workflowType:ListWorkflowsItem' :: ListWorkflowsItem -> WorkflowType
..} =
forall a. NFData a => a -> ()
Prelude.rnf WorkflowType
workflowType
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
workflowId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Status
status
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
statusDescription
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf POSIX
createdAt
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf POSIX
lastUpdatedAt