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