{-# 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.SecurityLake.Types.Failures 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
data Failures = Failures'
{
Failures -> Text
exceptionMessage :: Prelude.Text,
Failures -> Text
remediation :: Prelude.Text,
Failures -> ISO8601
timestamp :: Data.ISO8601
}
deriving (Failures -> Failures -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Failures -> Failures -> Bool
$c/= :: Failures -> Failures -> Bool
== :: Failures -> Failures -> Bool
$c== :: Failures -> Failures -> Bool
Prelude.Eq, ReadPrec [Failures]
ReadPrec Failures
Int -> ReadS Failures
ReadS [Failures]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Failures]
$creadListPrec :: ReadPrec [Failures]
readPrec :: ReadPrec Failures
$creadPrec :: ReadPrec Failures
readList :: ReadS [Failures]
$creadList :: ReadS [Failures]
readsPrec :: Int -> ReadS Failures
$creadsPrec :: Int -> ReadS Failures
Prelude.Read, Int -> Failures -> ShowS
[Failures] -> ShowS
Failures -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Failures] -> ShowS
$cshowList :: [Failures] -> ShowS
show :: Failures -> String
$cshow :: Failures -> String
showsPrec :: Int -> Failures -> ShowS
$cshowsPrec :: Int -> Failures -> ShowS
Prelude.Show, forall x. Rep Failures x -> Failures
forall x. Failures -> Rep Failures x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Failures x -> Failures
$cfrom :: forall x. Failures -> Rep Failures x
Prelude.Generic)
newFailures ::
Prelude.Text ->
Prelude.Text ->
Prelude.UTCTime ->
Failures
newFailures :: Text -> Text -> UTCTime -> Failures
newFailures
Text
pExceptionMessage_
Text
pRemediation_
UTCTime
pTimestamp_ =
Failures'
{ $sel:exceptionMessage:Failures' :: Text
exceptionMessage = Text
pExceptionMessage_,
$sel:remediation:Failures' :: Text
remediation = Text
pRemediation_,
$sel:timestamp:Failures' :: ISO8601
timestamp = forall (a :: Format). Iso' (Time a) UTCTime
Data._Time forall t b. AReview t b -> b -> t
Lens.# UTCTime
pTimestamp_
}
failures_exceptionMessage :: Lens.Lens' Failures Prelude.Text
failures_exceptionMessage :: Lens' Failures Text
failures_exceptionMessage = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Failures' {Text
exceptionMessage :: Text
$sel:exceptionMessage:Failures' :: Failures -> Text
exceptionMessage} -> Text
exceptionMessage) (\s :: Failures
s@Failures' {} Text
a -> Failures
s {$sel:exceptionMessage:Failures' :: Text
exceptionMessage = Text
a} :: Failures)
failures_remediation :: Lens.Lens' Failures Prelude.Text
failures_remediation :: Lens' Failures Text
failures_remediation = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Failures' {Text
remediation :: Text
$sel:remediation:Failures' :: Failures -> Text
remediation} -> Text
remediation) (\s :: Failures
s@Failures' {} Text
a -> Failures
s {$sel:remediation:Failures' :: Text
remediation = Text
a} :: Failures)
failures_timestamp :: Lens.Lens' Failures Prelude.UTCTime
failures_timestamp :: Lens' Failures UTCTime
failures_timestamp = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Failures' {ISO8601
timestamp :: ISO8601
$sel:timestamp:Failures' :: Failures -> ISO8601
timestamp} -> ISO8601
timestamp) (\s :: Failures
s@Failures' {} ISO8601
a -> Failures
s {$sel:timestamp:Failures' :: ISO8601
timestamp = ISO8601
a} :: Failures) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
instance Data.FromJSON Failures where
parseJSON :: Value -> Parser Failures
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"Failures"
( \Object
x ->
Text -> Text -> ISO8601 -> Failures
Failures'
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
"exceptionMessage")
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
"remediation")
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
"timestamp")
)
instance Prelude.Hashable Failures where
hashWithSalt :: Int -> Failures -> Int
hashWithSalt Int
_salt Failures' {Text
ISO8601
timestamp :: ISO8601
remediation :: Text
exceptionMessage :: Text
$sel:timestamp:Failures' :: Failures -> ISO8601
$sel:remediation:Failures' :: Failures -> Text
$sel:exceptionMessage:Failures' :: Failures -> Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
exceptionMessage
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
remediation
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` ISO8601
timestamp
instance Prelude.NFData Failures where
rnf :: Failures -> ()
rnf Failures' {Text
ISO8601
timestamp :: ISO8601
remediation :: Text
exceptionMessage :: Text
$sel:timestamp:Failures' :: Failures -> ISO8601
$sel:remediation:Failures' :: Failures -> Text
$sel:exceptionMessage:Failures' :: Failures -> Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Text
exceptionMessage
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
remediation
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf ISO8601
timestamp