{-# 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.MacieV2.Types.UserPausedDetails where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data UserPausedDetails = UserPausedDetails'
{
UserPausedDetails -> Maybe POSIX
jobExpiresAt :: Prelude.Maybe Core.POSIX,
UserPausedDetails -> Maybe Text
jobImminentExpirationHealthEventArn :: Prelude.Maybe Prelude.Text,
UserPausedDetails -> Maybe POSIX
jobPausedAt :: Prelude.Maybe Core.POSIX
}
deriving (UserPausedDetails -> UserPausedDetails -> Bool
(UserPausedDetails -> UserPausedDetails -> Bool)
-> (UserPausedDetails -> UserPausedDetails -> Bool)
-> Eq UserPausedDetails
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UserPausedDetails -> UserPausedDetails -> Bool
$c/= :: UserPausedDetails -> UserPausedDetails -> Bool
== :: UserPausedDetails -> UserPausedDetails -> Bool
$c== :: UserPausedDetails -> UserPausedDetails -> Bool
Prelude.Eq, ReadPrec [UserPausedDetails]
ReadPrec UserPausedDetails
Int -> ReadS UserPausedDetails
ReadS [UserPausedDetails]
(Int -> ReadS UserPausedDetails)
-> ReadS [UserPausedDetails]
-> ReadPrec UserPausedDetails
-> ReadPrec [UserPausedDetails]
-> Read UserPausedDetails
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UserPausedDetails]
$creadListPrec :: ReadPrec [UserPausedDetails]
readPrec :: ReadPrec UserPausedDetails
$creadPrec :: ReadPrec UserPausedDetails
readList :: ReadS [UserPausedDetails]
$creadList :: ReadS [UserPausedDetails]
readsPrec :: Int -> ReadS UserPausedDetails
$creadsPrec :: Int -> ReadS UserPausedDetails
Prelude.Read, Int -> UserPausedDetails -> ShowS
[UserPausedDetails] -> ShowS
UserPausedDetails -> String
(Int -> UserPausedDetails -> ShowS)
-> (UserPausedDetails -> String)
-> ([UserPausedDetails] -> ShowS)
-> Show UserPausedDetails
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UserPausedDetails] -> ShowS
$cshowList :: [UserPausedDetails] -> ShowS
show :: UserPausedDetails -> String
$cshow :: UserPausedDetails -> String
showsPrec :: Int -> UserPausedDetails -> ShowS
$cshowsPrec :: Int -> UserPausedDetails -> ShowS
Prelude.Show, (forall x. UserPausedDetails -> Rep UserPausedDetails x)
-> (forall x. Rep UserPausedDetails x -> UserPausedDetails)
-> Generic UserPausedDetails
forall x. Rep UserPausedDetails x -> UserPausedDetails
forall x. UserPausedDetails -> Rep UserPausedDetails x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UserPausedDetails x -> UserPausedDetails
$cfrom :: forall x. UserPausedDetails -> Rep UserPausedDetails x
Prelude.Generic)
newUserPausedDetails ::
UserPausedDetails
newUserPausedDetails :: UserPausedDetails
newUserPausedDetails =
UserPausedDetails' :: Maybe POSIX -> Maybe Text -> Maybe POSIX -> UserPausedDetails
UserPausedDetails'
{ $sel:jobExpiresAt:UserPausedDetails' :: Maybe POSIX
jobExpiresAt = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:jobImminentExpirationHealthEventArn:UserPausedDetails' :: Maybe Text
jobImminentExpirationHealthEventArn =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:jobPausedAt:UserPausedDetails' :: Maybe POSIX
jobPausedAt = Maybe POSIX
forall a. Maybe a
Prelude.Nothing
}
userPausedDetails_jobExpiresAt :: Lens.Lens' UserPausedDetails (Prelude.Maybe Prelude.UTCTime)
userPausedDetails_jobExpiresAt :: (Maybe UTCTime -> f (Maybe UTCTime))
-> UserPausedDetails -> f UserPausedDetails
userPausedDetails_jobExpiresAt = (UserPausedDetails -> Maybe POSIX)
-> (UserPausedDetails -> Maybe POSIX -> UserPausedDetails)
-> Lens
UserPausedDetails UserPausedDetails (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UserPausedDetails' {Maybe POSIX
jobExpiresAt :: Maybe POSIX
$sel:jobExpiresAt:UserPausedDetails' :: UserPausedDetails -> Maybe POSIX
jobExpiresAt} -> Maybe POSIX
jobExpiresAt) (\s :: UserPausedDetails
s@UserPausedDetails' {} Maybe POSIX
a -> UserPausedDetails
s {$sel:jobExpiresAt:UserPausedDetails' :: Maybe POSIX
jobExpiresAt = Maybe POSIX
a} :: UserPausedDetails) ((Maybe POSIX -> f (Maybe POSIX))
-> UserPausedDetails -> f UserPausedDetails)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> UserPausedDetails
-> f UserPausedDetails
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
userPausedDetails_jobImminentExpirationHealthEventArn :: Lens.Lens' UserPausedDetails (Prelude.Maybe Prelude.Text)
userPausedDetails_jobImminentExpirationHealthEventArn :: (Maybe Text -> f (Maybe Text))
-> UserPausedDetails -> f UserPausedDetails
userPausedDetails_jobImminentExpirationHealthEventArn = (UserPausedDetails -> Maybe Text)
-> (UserPausedDetails -> Maybe Text -> UserPausedDetails)
-> Lens
UserPausedDetails UserPausedDetails (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UserPausedDetails' {Maybe Text
jobImminentExpirationHealthEventArn :: Maybe Text
$sel:jobImminentExpirationHealthEventArn:UserPausedDetails' :: UserPausedDetails -> Maybe Text
jobImminentExpirationHealthEventArn} -> Maybe Text
jobImminentExpirationHealthEventArn) (\s :: UserPausedDetails
s@UserPausedDetails' {} Maybe Text
a -> UserPausedDetails
s {$sel:jobImminentExpirationHealthEventArn:UserPausedDetails' :: Maybe Text
jobImminentExpirationHealthEventArn = Maybe Text
a} :: UserPausedDetails)
userPausedDetails_jobPausedAt :: Lens.Lens' UserPausedDetails (Prelude.Maybe Prelude.UTCTime)
userPausedDetails_jobPausedAt :: (Maybe UTCTime -> f (Maybe UTCTime))
-> UserPausedDetails -> f UserPausedDetails
userPausedDetails_jobPausedAt = (UserPausedDetails -> Maybe POSIX)
-> (UserPausedDetails -> Maybe POSIX -> UserPausedDetails)
-> Lens
UserPausedDetails UserPausedDetails (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UserPausedDetails' {Maybe POSIX
jobPausedAt :: Maybe POSIX
$sel:jobPausedAt:UserPausedDetails' :: UserPausedDetails -> Maybe POSIX
jobPausedAt} -> Maybe POSIX
jobPausedAt) (\s :: UserPausedDetails
s@UserPausedDetails' {} Maybe POSIX
a -> UserPausedDetails
s {$sel:jobPausedAt:UserPausedDetails' :: Maybe POSIX
jobPausedAt = Maybe POSIX
a} :: UserPausedDetails) ((Maybe POSIX -> f (Maybe POSIX))
-> UserPausedDetails -> f UserPausedDetails)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> UserPausedDetails
-> f UserPausedDetails
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
instance Core.FromJSON UserPausedDetails where
parseJSON :: Value -> Parser UserPausedDetails
parseJSON =
String
-> (Object -> Parser UserPausedDetails)
-> Value
-> Parser UserPausedDetails
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"UserPausedDetails"
( \Object
x ->
Maybe POSIX -> Maybe Text -> Maybe POSIX -> UserPausedDetails
UserPausedDetails'
(Maybe POSIX -> Maybe Text -> Maybe POSIX -> UserPausedDetails)
-> Parser (Maybe POSIX)
-> Parser (Maybe Text -> Maybe POSIX -> UserPausedDetails)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"jobExpiresAt")
Parser (Maybe Text -> Maybe POSIX -> UserPausedDetails)
-> Parser (Maybe Text) -> Parser (Maybe POSIX -> UserPausedDetails)
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
"jobImminentExpirationHealthEventArn")
Parser (Maybe POSIX -> UserPausedDetails)
-> Parser (Maybe POSIX) -> Parser UserPausedDetails
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"jobPausedAt")
)
instance Prelude.Hashable UserPausedDetails
instance Prelude.NFData UserPausedDetails