{-# 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.SWF.Types.ActivityTypeInfo 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
import Amazonka.SWF.Types.ActivityType
import Amazonka.SWF.Types.RegistrationStatus
data ActivityTypeInfo = ActivityTypeInfo'
{
ActivityTypeInfo -> Maybe POSIX
deprecationDate :: Prelude.Maybe Data.POSIX,
ActivityTypeInfo -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
ActivityTypeInfo -> ActivityType
activityType :: ActivityType,
ActivityTypeInfo -> RegistrationStatus
status :: RegistrationStatus,
ActivityTypeInfo -> POSIX
creationDate :: Data.POSIX
}
deriving (ActivityTypeInfo -> ActivityTypeInfo -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ActivityTypeInfo -> ActivityTypeInfo -> Bool
$c/= :: ActivityTypeInfo -> ActivityTypeInfo -> Bool
== :: ActivityTypeInfo -> ActivityTypeInfo -> Bool
$c== :: ActivityTypeInfo -> ActivityTypeInfo -> Bool
Prelude.Eq, ReadPrec [ActivityTypeInfo]
ReadPrec ActivityTypeInfo
Int -> ReadS ActivityTypeInfo
ReadS [ActivityTypeInfo]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ActivityTypeInfo]
$creadListPrec :: ReadPrec [ActivityTypeInfo]
readPrec :: ReadPrec ActivityTypeInfo
$creadPrec :: ReadPrec ActivityTypeInfo
readList :: ReadS [ActivityTypeInfo]
$creadList :: ReadS [ActivityTypeInfo]
readsPrec :: Int -> ReadS ActivityTypeInfo
$creadsPrec :: Int -> ReadS ActivityTypeInfo
Prelude.Read, Int -> ActivityTypeInfo -> ShowS
[ActivityTypeInfo] -> ShowS
ActivityTypeInfo -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ActivityTypeInfo] -> ShowS
$cshowList :: [ActivityTypeInfo] -> ShowS
show :: ActivityTypeInfo -> String
$cshow :: ActivityTypeInfo -> String
showsPrec :: Int -> ActivityTypeInfo -> ShowS
$cshowsPrec :: Int -> ActivityTypeInfo -> ShowS
Prelude.Show, forall x. Rep ActivityTypeInfo x -> ActivityTypeInfo
forall x. ActivityTypeInfo -> Rep ActivityTypeInfo x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ActivityTypeInfo x -> ActivityTypeInfo
$cfrom :: forall x. ActivityTypeInfo -> Rep ActivityTypeInfo x
Prelude.Generic)
newActivityTypeInfo ::
ActivityType ->
RegistrationStatus ->
Prelude.UTCTime ->
ActivityTypeInfo
newActivityTypeInfo :: ActivityType -> RegistrationStatus -> UTCTime -> ActivityTypeInfo
newActivityTypeInfo
ActivityType
pActivityType_
RegistrationStatus
pStatus_
UTCTime
pCreationDate_ =
ActivityTypeInfo'
{ $sel:deprecationDate:ActivityTypeInfo' :: Maybe POSIX
deprecationDate =
forall a. Maybe a
Prelude.Nothing,
$sel:description:ActivityTypeInfo' :: Maybe Text
description = forall a. Maybe a
Prelude.Nothing,
$sel:activityType:ActivityTypeInfo' :: ActivityType
activityType = ActivityType
pActivityType_,
$sel:status:ActivityTypeInfo' :: RegistrationStatus
status = RegistrationStatus
pStatus_,
$sel:creationDate:ActivityTypeInfo' :: POSIX
creationDate = forall (a :: Format). Iso' (Time a) UTCTime
Data._Time forall t b. AReview t b -> b -> t
Lens.# UTCTime
pCreationDate_
}
activityTypeInfo_deprecationDate :: Lens.Lens' ActivityTypeInfo (Prelude.Maybe Prelude.UTCTime)
activityTypeInfo_deprecationDate :: Lens' ActivityTypeInfo (Maybe UTCTime)
activityTypeInfo_deprecationDate = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ActivityTypeInfo' {Maybe POSIX
deprecationDate :: Maybe POSIX
$sel:deprecationDate:ActivityTypeInfo' :: ActivityTypeInfo -> Maybe POSIX
deprecationDate} -> Maybe POSIX
deprecationDate) (\s :: ActivityTypeInfo
s@ActivityTypeInfo' {} Maybe POSIX
a -> ActivityTypeInfo
s {$sel:deprecationDate:ActivityTypeInfo' :: Maybe POSIX
deprecationDate = Maybe POSIX
a} :: ActivityTypeInfo) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
activityTypeInfo_description :: Lens.Lens' ActivityTypeInfo (Prelude.Maybe Prelude.Text)
activityTypeInfo_description :: Lens' ActivityTypeInfo (Maybe Text)
activityTypeInfo_description = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ActivityTypeInfo' {Maybe Text
description :: Maybe Text
$sel:description:ActivityTypeInfo' :: ActivityTypeInfo -> Maybe Text
description} -> Maybe Text
description) (\s :: ActivityTypeInfo
s@ActivityTypeInfo' {} Maybe Text
a -> ActivityTypeInfo
s {$sel:description:ActivityTypeInfo' :: Maybe Text
description = Maybe Text
a} :: ActivityTypeInfo)
activityTypeInfo_activityType :: Lens.Lens' ActivityTypeInfo ActivityType
activityTypeInfo_activityType :: Lens' ActivityTypeInfo ActivityType
activityTypeInfo_activityType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ActivityTypeInfo' {ActivityType
activityType :: ActivityType
$sel:activityType:ActivityTypeInfo' :: ActivityTypeInfo -> ActivityType
activityType} -> ActivityType
activityType) (\s :: ActivityTypeInfo
s@ActivityTypeInfo' {} ActivityType
a -> ActivityTypeInfo
s {$sel:activityType:ActivityTypeInfo' :: ActivityType
activityType = ActivityType
a} :: ActivityTypeInfo)
activityTypeInfo_status :: Lens.Lens' ActivityTypeInfo RegistrationStatus
activityTypeInfo_status :: Lens' ActivityTypeInfo RegistrationStatus
activityTypeInfo_status = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ActivityTypeInfo' {RegistrationStatus
status :: RegistrationStatus
$sel:status:ActivityTypeInfo' :: ActivityTypeInfo -> RegistrationStatus
status} -> RegistrationStatus
status) (\s :: ActivityTypeInfo
s@ActivityTypeInfo' {} RegistrationStatus
a -> ActivityTypeInfo
s {$sel:status:ActivityTypeInfo' :: RegistrationStatus
status = RegistrationStatus
a} :: ActivityTypeInfo)
activityTypeInfo_creationDate :: Lens.Lens' ActivityTypeInfo Prelude.UTCTime
activityTypeInfo_creationDate :: Lens' ActivityTypeInfo UTCTime
activityTypeInfo_creationDate = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ActivityTypeInfo' {POSIX
creationDate :: POSIX
$sel:creationDate:ActivityTypeInfo' :: ActivityTypeInfo -> POSIX
creationDate} -> POSIX
creationDate) (\s :: ActivityTypeInfo
s@ActivityTypeInfo' {} POSIX
a -> ActivityTypeInfo
s {$sel:creationDate:ActivityTypeInfo' :: POSIX
creationDate = POSIX
a} :: ActivityTypeInfo) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
instance Data.FromJSON ActivityTypeInfo where
parseJSON :: Value -> Parser ActivityTypeInfo
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"ActivityTypeInfo"
( \Object
x ->
Maybe POSIX
-> Maybe Text
-> ActivityType
-> RegistrationStatus
-> POSIX
-> ActivityTypeInfo
ActivityTypeInfo'
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
"deprecationDate")
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
"description")
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
"activityType")
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
"creationDate")
)
instance Prelude.Hashable ActivityTypeInfo where
hashWithSalt :: Int -> ActivityTypeInfo -> Int
hashWithSalt Int
_salt ActivityTypeInfo' {Maybe Text
Maybe POSIX
POSIX
ActivityType
RegistrationStatus
creationDate :: POSIX
status :: RegistrationStatus
activityType :: ActivityType
description :: Maybe Text
deprecationDate :: Maybe POSIX
$sel:creationDate:ActivityTypeInfo' :: ActivityTypeInfo -> POSIX
$sel:status:ActivityTypeInfo' :: ActivityTypeInfo -> RegistrationStatus
$sel:activityType:ActivityTypeInfo' :: ActivityTypeInfo -> ActivityType
$sel:description:ActivityTypeInfo' :: ActivityTypeInfo -> Maybe Text
$sel:deprecationDate:ActivityTypeInfo' :: ActivityTypeInfo -> Maybe POSIX
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
deprecationDate
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
description
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` ActivityType
activityType
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` RegistrationStatus
status
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` POSIX
creationDate
instance Prelude.NFData ActivityTypeInfo where
rnf :: ActivityTypeInfo -> ()
rnf ActivityTypeInfo' {Maybe Text
Maybe POSIX
POSIX
ActivityType
RegistrationStatus
creationDate :: POSIX
status :: RegistrationStatus
activityType :: ActivityType
description :: Maybe Text
deprecationDate :: Maybe POSIX
$sel:creationDate:ActivityTypeInfo' :: ActivityTypeInfo -> POSIX
$sel:status:ActivityTypeInfo' :: ActivityTypeInfo -> RegistrationStatus
$sel:activityType:ActivityTypeInfo' :: ActivityTypeInfo -> ActivityType
$sel:description:ActivityTypeInfo' :: ActivityTypeInfo -> Maybe Text
$sel:deprecationDate:ActivityTypeInfo' :: ActivityTypeInfo -> Maybe POSIX
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
deprecationDate
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
description
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf ActivityType
activityType
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf RegistrationStatus
status
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf POSIX
creationDate