{-# 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.AccessAnalyzer.Types.Finding where
import Amazonka.AccessAnalyzer.Types.FindingSource
import Amazonka.AccessAnalyzer.Types.FindingStatus
import Amazonka.AccessAnalyzer.Types.ResourceType
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data Finding = Finding'
{
Finding -> Maybe Text
error :: Prelude.Maybe Prelude.Text,
Finding -> Maybe Bool
isPublic :: Prelude.Maybe Prelude.Bool,
Finding -> Maybe [Text]
action :: Prelude.Maybe [Prelude.Text],
Finding -> Maybe [FindingSource]
sources :: Prelude.Maybe [FindingSource],
Finding -> Maybe Text
resource :: Prelude.Maybe Prelude.Text,
Finding -> Maybe (HashMap Text Text)
principal :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
Finding -> POSIX
analyzedAt :: Core.POSIX,
Finding -> HashMap Text Text
condition :: Prelude.HashMap Prelude.Text Prelude.Text,
Finding -> POSIX
createdAt :: Core.POSIX,
Finding -> Text
id :: Prelude.Text,
Finding -> Text
resourceOwnerAccount :: Prelude.Text,
Finding -> ResourceType
resourceType :: ResourceType,
Finding -> FindingStatus
status :: FindingStatus,
Finding -> POSIX
updatedAt :: Core.POSIX
}
deriving (Finding -> Finding -> Bool
(Finding -> Finding -> Bool)
-> (Finding -> Finding -> Bool) -> Eq Finding
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Finding -> Finding -> Bool
$c/= :: Finding -> Finding -> Bool
== :: Finding -> Finding -> Bool
$c== :: Finding -> Finding -> Bool
Prelude.Eq, ReadPrec [Finding]
ReadPrec Finding
Int -> ReadS Finding
ReadS [Finding]
(Int -> ReadS Finding)
-> ReadS [Finding]
-> ReadPrec Finding
-> ReadPrec [Finding]
-> Read Finding
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Finding]
$creadListPrec :: ReadPrec [Finding]
readPrec :: ReadPrec Finding
$creadPrec :: ReadPrec Finding
readList :: ReadS [Finding]
$creadList :: ReadS [Finding]
readsPrec :: Int -> ReadS Finding
$creadsPrec :: Int -> ReadS Finding
Prelude.Read, Int -> Finding -> ShowS
[Finding] -> ShowS
Finding -> String
(Int -> Finding -> ShowS)
-> (Finding -> String) -> ([Finding] -> ShowS) -> Show Finding
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Finding] -> ShowS
$cshowList :: [Finding] -> ShowS
show :: Finding -> String
$cshow :: Finding -> String
showsPrec :: Int -> Finding -> ShowS
$cshowsPrec :: Int -> Finding -> ShowS
Prelude.Show, (forall x. Finding -> Rep Finding x)
-> (forall x. Rep Finding x -> Finding) -> Generic Finding
forall x. Rep Finding x -> Finding
forall x. Finding -> Rep Finding x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Finding x -> Finding
$cfrom :: forall x. Finding -> Rep Finding x
Prelude.Generic)
newFinding ::
Prelude.UTCTime ->
Prelude.UTCTime ->
Prelude.Text ->
Prelude.Text ->
ResourceType ->
FindingStatus ->
Prelude.UTCTime ->
Finding
newFinding :: UTCTime
-> UTCTime
-> Text
-> Text
-> ResourceType
-> FindingStatus
-> UTCTime
-> Finding
newFinding
UTCTime
pAnalyzedAt_
UTCTime
pCreatedAt_
Text
pId_
Text
pResourceOwnerAccount_
ResourceType
pResourceType_
FindingStatus
pStatus_
UTCTime
pUpdatedAt_ =
Finding' :: Maybe Text
-> Maybe Bool
-> Maybe [Text]
-> Maybe [FindingSource]
-> Maybe Text
-> Maybe (HashMap Text Text)
-> POSIX
-> HashMap Text Text
-> POSIX
-> Text
-> Text
-> ResourceType
-> FindingStatus
-> POSIX
-> Finding
Finding'
{ $sel:error:Finding' :: Maybe Text
error = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:isPublic:Finding' :: Maybe Bool
isPublic = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:action:Finding' :: Maybe [Text]
action = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:sources:Finding' :: Maybe [FindingSource]
sources = Maybe [FindingSource]
forall a. Maybe a
Prelude.Nothing,
$sel:resource:Finding' :: Maybe Text
resource = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:principal:Finding' :: Maybe (HashMap Text Text)
principal = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
$sel:analyzedAt:Finding' :: POSIX
analyzedAt = Tagged UTCTime (Identity UTCTime) -> Tagged POSIX (Identity POSIX)
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time (Tagged UTCTime (Identity UTCTime)
-> Tagged POSIX (Identity POSIX))
-> UTCTime -> POSIX
forall t b. AReview t b -> b -> t
Lens.# UTCTime
pAnalyzedAt_,
$sel:condition:Finding' :: HashMap Text Text
condition = HashMap Text Text
forall a. Monoid a => a
Prelude.mempty,
$sel:createdAt:Finding' :: POSIX
createdAt = Tagged UTCTime (Identity UTCTime) -> Tagged POSIX (Identity POSIX)
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time (Tagged UTCTime (Identity UTCTime)
-> Tagged POSIX (Identity POSIX))
-> UTCTime -> POSIX
forall t b. AReview t b -> b -> t
Lens.# UTCTime
pCreatedAt_,
$sel:id:Finding' :: Text
id = Text
pId_,
$sel:resourceOwnerAccount:Finding' :: Text
resourceOwnerAccount = Text
pResourceOwnerAccount_,
$sel:resourceType:Finding' :: ResourceType
resourceType = ResourceType
pResourceType_,
$sel:status:Finding' :: FindingStatus
status = FindingStatus
pStatus_,
$sel:updatedAt:Finding' :: POSIX
updatedAt = Tagged UTCTime (Identity UTCTime) -> Tagged POSIX (Identity POSIX)
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time (Tagged UTCTime (Identity UTCTime)
-> Tagged POSIX (Identity POSIX))
-> UTCTime -> POSIX
forall t b. AReview t b -> b -> t
Lens.# UTCTime
pUpdatedAt_
}
finding_error :: Lens.Lens' Finding (Prelude.Maybe Prelude.Text)
finding_error :: (Maybe Text -> f (Maybe Text)) -> Finding -> f Finding
finding_error = (Finding -> Maybe Text)
-> (Finding -> Maybe Text -> Finding)
-> Lens Finding Finding (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Finding' {Maybe Text
error :: Maybe Text
$sel:error:Finding' :: Finding -> Maybe Text
error} -> Maybe Text
error) (\s :: Finding
s@Finding' {} Maybe Text
a -> Finding
s {$sel:error:Finding' :: Maybe Text
error = Maybe Text
a} :: Finding)
finding_isPublic :: Lens.Lens' Finding (Prelude.Maybe Prelude.Bool)
finding_isPublic :: (Maybe Bool -> f (Maybe Bool)) -> Finding -> f Finding
finding_isPublic = (Finding -> Maybe Bool)
-> (Finding -> Maybe Bool -> Finding)
-> Lens Finding Finding (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Finding' {Maybe Bool
isPublic :: Maybe Bool
$sel:isPublic:Finding' :: Finding -> Maybe Bool
isPublic} -> Maybe Bool
isPublic) (\s :: Finding
s@Finding' {} Maybe Bool
a -> Finding
s {$sel:isPublic:Finding' :: Maybe Bool
isPublic = Maybe Bool
a} :: Finding)
finding_action :: Lens.Lens' Finding (Prelude.Maybe [Prelude.Text])
finding_action :: (Maybe [Text] -> f (Maybe [Text])) -> Finding -> f Finding
finding_action = (Finding -> Maybe [Text])
-> (Finding -> Maybe [Text] -> Finding)
-> Lens Finding Finding (Maybe [Text]) (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Finding' {Maybe [Text]
action :: Maybe [Text]
$sel:action:Finding' :: Finding -> Maybe [Text]
action} -> Maybe [Text]
action) (\s :: Finding
s@Finding' {} Maybe [Text]
a -> Finding
s {$sel:action:Finding' :: Maybe [Text]
action = Maybe [Text]
a} :: Finding) ((Maybe [Text] -> f (Maybe [Text])) -> Finding -> f Finding)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> Finding
-> f Finding
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
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 [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
finding_sources :: Lens.Lens' Finding (Prelude.Maybe [FindingSource])
finding_sources :: (Maybe [FindingSource] -> f (Maybe [FindingSource]))
-> Finding -> f Finding
finding_sources = (Finding -> Maybe [FindingSource])
-> (Finding -> Maybe [FindingSource] -> Finding)
-> Lens
Finding Finding (Maybe [FindingSource]) (Maybe [FindingSource])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Finding' {Maybe [FindingSource]
sources :: Maybe [FindingSource]
$sel:sources:Finding' :: Finding -> Maybe [FindingSource]
sources} -> Maybe [FindingSource]
sources) (\s :: Finding
s@Finding' {} Maybe [FindingSource]
a -> Finding
s {$sel:sources:Finding' :: Maybe [FindingSource]
sources = Maybe [FindingSource]
a} :: Finding) ((Maybe [FindingSource] -> f (Maybe [FindingSource]))
-> Finding -> f Finding)
-> ((Maybe [FindingSource] -> f (Maybe [FindingSource]))
-> Maybe [FindingSource] -> f (Maybe [FindingSource]))
-> (Maybe [FindingSource] -> f (Maybe [FindingSource]))
-> Finding
-> f Finding
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[FindingSource] [FindingSource] [FindingSource] [FindingSource]
-> Iso
(Maybe [FindingSource])
(Maybe [FindingSource])
(Maybe [FindingSource])
(Maybe [FindingSource])
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
[FindingSource] [FindingSource] [FindingSource] [FindingSource]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
finding_resource :: Lens.Lens' Finding (Prelude.Maybe Prelude.Text)
finding_resource :: (Maybe Text -> f (Maybe Text)) -> Finding -> f Finding
finding_resource = (Finding -> Maybe Text)
-> (Finding -> Maybe Text -> Finding)
-> Lens Finding Finding (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Finding' {Maybe Text
resource :: Maybe Text
$sel:resource:Finding' :: Finding -> Maybe Text
resource} -> Maybe Text
resource) (\s :: Finding
s@Finding' {} Maybe Text
a -> Finding
s {$sel:resource:Finding' :: Maybe Text
resource = Maybe Text
a} :: Finding)
finding_principal :: Lens.Lens' Finding (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
finding_principal :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> Finding -> f Finding
finding_principal = (Finding -> Maybe (HashMap Text Text))
-> (Finding -> Maybe (HashMap Text Text) -> Finding)
-> Lens
Finding
Finding
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Finding' {Maybe (HashMap Text Text)
principal :: Maybe (HashMap Text Text)
$sel:principal:Finding' :: Finding -> Maybe (HashMap Text Text)
principal} -> Maybe (HashMap Text Text)
principal) (\s :: Finding
s@Finding' {} Maybe (HashMap Text Text)
a -> Finding
s {$sel:principal:Finding' :: Maybe (HashMap Text Text)
principal = Maybe (HashMap Text Text)
a} :: Finding) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> Finding -> f Finding)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> Finding
-> f Finding
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
-> Iso
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
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
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
finding_analyzedAt :: Lens.Lens' Finding Prelude.UTCTime
finding_analyzedAt :: (UTCTime -> f UTCTime) -> Finding -> f Finding
finding_analyzedAt = (Finding -> POSIX)
-> (Finding -> POSIX -> Finding)
-> Lens Finding Finding POSIX POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Finding' {POSIX
analyzedAt :: POSIX
$sel:analyzedAt:Finding' :: Finding -> POSIX
analyzedAt} -> POSIX
analyzedAt) (\s :: Finding
s@Finding' {} POSIX
a -> Finding
s {$sel:analyzedAt:Finding' :: POSIX
analyzedAt = POSIX
a} :: Finding) ((POSIX -> f POSIX) -> Finding -> f Finding)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> Finding
-> f Finding
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (UTCTime -> f UTCTime) -> POSIX -> f POSIX
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
finding_condition :: Lens.Lens' Finding (Prelude.HashMap Prelude.Text Prelude.Text)
finding_condition :: (HashMap Text Text -> f (HashMap Text Text))
-> Finding -> f Finding
finding_condition = (Finding -> HashMap Text Text)
-> (Finding -> HashMap Text Text -> Finding)
-> Lens Finding Finding (HashMap Text Text) (HashMap Text Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Finding' {HashMap Text Text
condition :: HashMap Text Text
$sel:condition:Finding' :: Finding -> HashMap Text Text
condition} -> HashMap Text Text
condition) (\s :: Finding
s@Finding' {} HashMap Text Text
a -> Finding
s {$sel:condition:Finding' :: HashMap Text Text
condition = HashMap Text Text
a} :: Finding) ((HashMap Text Text -> f (HashMap Text Text))
-> Finding -> f Finding)
-> ((HashMap Text Text -> f (HashMap Text Text))
-> HashMap Text Text -> f (HashMap Text Text))
-> (HashMap Text Text -> f (HashMap Text Text))
-> Finding
-> f Finding
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (HashMap Text Text -> f (HashMap Text Text))
-> HashMap Text Text -> f (HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
finding_createdAt :: Lens.Lens' Finding Prelude.UTCTime
finding_createdAt :: (UTCTime -> f UTCTime) -> Finding -> f Finding
finding_createdAt = (Finding -> POSIX)
-> (Finding -> POSIX -> Finding)
-> Lens Finding Finding POSIX POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Finding' {POSIX
createdAt :: POSIX
$sel:createdAt:Finding' :: Finding -> POSIX
createdAt} -> POSIX
createdAt) (\s :: Finding
s@Finding' {} POSIX
a -> Finding
s {$sel:createdAt:Finding' :: POSIX
createdAt = POSIX
a} :: Finding) ((POSIX -> f POSIX) -> Finding -> f Finding)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> Finding
-> f Finding
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (UTCTime -> f UTCTime) -> POSIX -> f POSIX
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
finding_id :: Lens.Lens' Finding Prelude.Text
finding_id :: (Text -> f Text) -> Finding -> f Finding
finding_id = (Finding -> Text)
-> (Finding -> Text -> Finding) -> Lens Finding Finding Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Finding' {Text
id :: Text
$sel:id:Finding' :: Finding -> Text
id} -> Text
id) (\s :: Finding
s@Finding' {} Text
a -> Finding
s {$sel:id:Finding' :: Text
id = Text
a} :: Finding)
finding_resourceOwnerAccount :: Lens.Lens' Finding Prelude.Text
finding_resourceOwnerAccount :: (Text -> f Text) -> Finding -> f Finding
finding_resourceOwnerAccount = (Finding -> Text)
-> (Finding -> Text -> Finding) -> Lens Finding Finding Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Finding' {Text
resourceOwnerAccount :: Text
$sel:resourceOwnerAccount:Finding' :: Finding -> Text
resourceOwnerAccount} -> Text
resourceOwnerAccount) (\s :: Finding
s@Finding' {} Text
a -> Finding
s {$sel:resourceOwnerAccount:Finding' :: Text
resourceOwnerAccount = Text
a} :: Finding)
finding_resourceType :: Lens.Lens' Finding ResourceType
finding_resourceType :: (ResourceType -> f ResourceType) -> Finding -> f Finding
finding_resourceType = (Finding -> ResourceType)
-> (Finding -> ResourceType -> Finding)
-> Lens Finding Finding ResourceType ResourceType
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Finding' {ResourceType
resourceType :: ResourceType
$sel:resourceType:Finding' :: Finding -> ResourceType
resourceType} -> ResourceType
resourceType) (\s :: Finding
s@Finding' {} ResourceType
a -> Finding
s {$sel:resourceType:Finding' :: ResourceType
resourceType = ResourceType
a} :: Finding)
finding_status :: Lens.Lens' Finding FindingStatus
finding_status :: (FindingStatus -> f FindingStatus) -> Finding -> f Finding
finding_status = (Finding -> FindingStatus)
-> (Finding -> FindingStatus -> Finding)
-> Lens Finding Finding FindingStatus FindingStatus
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Finding' {FindingStatus
status :: FindingStatus
$sel:status:Finding' :: Finding -> FindingStatus
status} -> FindingStatus
status) (\s :: Finding
s@Finding' {} FindingStatus
a -> Finding
s {$sel:status:Finding' :: FindingStatus
status = FindingStatus
a} :: Finding)
finding_updatedAt :: Lens.Lens' Finding Prelude.UTCTime
finding_updatedAt :: (UTCTime -> f UTCTime) -> Finding -> f Finding
finding_updatedAt = (Finding -> POSIX)
-> (Finding -> POSIX -> Finding)
-> Lens Finding Finding POSIX POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Finding' {POSIX
updatedAt :: POSIX
$sel:updatedAt:Finding' :: Finding -> POSIX
updatedAt} -> POSIX
updatedAt) (\s :: Finding
s@Finding' {} POSIX
a -> Finding
s {$sel:updatedAt:Finding' :: POSIX
updatedAt = POSIX
a} :: Finding) ((POSIX -> f POSIX) -> Finding -> f Finding)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> Finding
-> f Finding
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (UTCTime -> f UTCTime) -> POSIX -> f POSIX
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
instance Core.FromJSON Finding where
parseJSON :: Value -> Parser Finding
parseJSON =
String -> (Object -> Parser Finding) -> Value -> Parser Finding
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"Finding"
( \Object
x ->
Maybe Text
-> Maybe Bool
-> Maybe [Text]
-> Maybe [FindingSource]
-> Maybe Text
-> Maybe (HashMap Text Text)
-> POSIX
-> HashMap Text Text
-> POSIX
-> Text
-> Text
-> ResourceType
-> FindingStatus
-> POSIX
-> Finding
Finding'
(Maybe Text
-> Maybe Bool
-> Maybe [Text]
-> Maybe [FindingSource]
-> Maybe Text
-> Maybe (HashMap Text Text)
-> POSIX
-> HashMap Text Text
-> POSIX
-> Text
-> Text
-> ResourceType
-> FindingStatus
-> POSIX
-> Finding)
-> Parser (Maybe Text)
-> Parser
(Maybe Bool
-> Maybe [Text]
-> Maybe [FindingSource]
-> Maybe Text
-> Maybe (HashMap Text Text)
-> POSIX
-> HashMap Text Text
-> POSIX
-> Text
-> Text
-> ResourceType
-> FindingStatus
-> POSIX
-> Finding)
forall (f :: * -> *) a b. Functor 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
"error")
Parser
(Maybe Bool
-> Maybe [Text]
-> Maybe [FindingSource]
-> Maybe Text
-> Maybe (HashMap Text Text)
-> POSIX
-> HashMap Text Text
-> POSIX
-> Text
-> Text
-> ResourceType
-> FindingStatus
-> POSIX
-> Finding)
-> Parser (Maybe Bool)
-> Parser
(Maybe [Text]
-> Maybe [FindingSource]
-> Maybe Text
-> Maybe (HashMap Text Text)
-> POSIX
-> HashMap Text Text
-> POSIX
-> Text
-> Text
-> ResourceType
-> FindingStatus
-> POSIX
-> Finding)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"isPublic")
Parser
(Maybe [Text]
-> Maybe [FindingSource]
-> Maybe Text
-> Maybe (HashMap Text Text)
-> POSIX
-> HashMap Text Text
-> POSIX
-> Text
-> Text
-> ResourceType
-> FindingStatus
-> POSIX
-> Finding)
-> Parser (Maybe [Text])
-> Parser
(Maybe [FindingSource]
-> Maybe Text
-> Maybe (HashMap Text Text)
-> POSIX
-> HashMap Text Text
-> POSIX
-> Text
-> Text
-> ResourceType
-> FindingStatus
-> POSIX
-> Finding)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"action" Parser (Maybe (Maybe [Text]))
-> Maybe [Text] -> Parser (Maybe [Text])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Text]
forall a. Monoid a => a
Prelude.mempty)
Parser
(Maybe [FindingSource]
-> Maybe Text
-> Maybe (HashMap Text Text)
-> POSIX
-> HashMap Text Text
-> POSIX
-> Text
-> Text
-> ResourceType
-> FindingStatus
-> POSIX
-> Finding)
-> Parser (Maybe [FindingSource])
-> Parser
(Maybe Text
-> Maybe (HashMap Text Text)
-> POSIX
-> HashMap Text Text
-> POSIX
-> Text
-> Text
-> ResourceType
-> FindingStatus
-> POSIX
-> Finding)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [FindingSource]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"sources" Parser (Maybe (Maybe [FindingSource]))
-> Maybe [FindingSource] -> Parser (Maybe [FindingSource])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [FindingSource]
forall a. Monoid a => a
Prelude.mempty)
Parser
(Maybe Text
-> Maybe (HashMap Text Text)
-> POSIX
-> HashMap Text Text
-> POSIX
-> Text
-> Text
-> ResourceType
-> FindingStatus
-> POSIX
-> Finding)
-> Parser (Maybe Text)
-> Parser
(Maybe (HashMap Text Text)
-> POSIX
-> HashMap Text Text
-> POSIX
-> Text
-> Text
-> ResourceType
-> FindingStatus
-> POSIX
-> Finding)
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
"resource")
Parser
(Maybe (HashMap Text Text)
-> POSIX
-> HashMap Text Text
-> POSIX
-> Text
-> Text
-> ResourceType
-> FindingStatus
-> POSIX
-> Finding)
-> Parser (Maybe (HashMap Text Text))
-> Parser
(POSIX
-> HashMap Text Text
-> POSIX
-> Text
-> Text
-> ResourceType
-> FindingStatus
-> POSIX
-> Finding)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe (HashMap Text Text)))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"principal" Parser (Maybe (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> Parser (Maybe (HashMap Text Text))
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe (HashMap Text Text)
forall a. Monoid a => a
Prelude.mempty)
Parser
(POSIX
-> HashMap Text Text
-> POSIX
-> Text
-> Text
-> ResourceType
-> FindingStatus
-> POSIX
-> Finding)
-> Parser POSIX
-> Parser
(HashMap Text Text
-> POSIX
-> Text
-> Text
-> ResourceType
-> FindingStatus
-> POSIX
-> Finding)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser POSIX
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"analyzedAt")
Parser
(HashMap Text Text
-> POSIX
-> Text
-> Text
-> ResourceType
-> FindingStatus
-> POSIX
-> Finding)
-> Parser (HashMap Text Text)
-> Parser
(POSIX
-> Text
-> Text
-> ResourceType
-> FindingStatus
-> POSIX
-> Finding)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (HashMap Text Text))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"condition" Parser (Maybe (HashMap Text Text))
-> HashMap Text Text -> Parser (HashMap Text Text)
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= HashMap Text Text
forall a. Monoid a => a
Prelude.mempty)
Parser
(POSIX
-> Text
-> Text
-> ResourceType
-> FindingStatus
-> POSIX
-> Finding)
-> Parser POSIX
-> Parser
(Text -> Text -> ResourceType -> FindingStatus -> POSIX -> Finding)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser POSIX
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"createdAt")
Parser
(Text -> Text -> ResourceType -> FindingStatus -> POSIX -> Finding)
-> Parser Text
-> Parser
(Text -> ResourceType -> FindingStatus -> POSIX -> Finding)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"id")
Parser (Text -> ResourceType -> FindingStatus -> POSIX -> Finding)
-> Parser Text
-> Parser (ResourceType -> FindingStatus -> POSIX -> Finding)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"resourceOwnerAccount")
Parser (ResourceType -> FindingStatus -> POSIX -> Finding)
-> Parser ResourceType
-> Parser (FindingStatus -> POSIX -> Finding)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser ResourceType
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"resourceType")
Parser (FindingStatus -> POSIX -> Finding)
-> Parser FindingStatus -> Parser (POSIX -> Finding)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser FindingStatus
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"status")
Parser (POSIX -> Finding) -> Parser POSIX -> Parser Finding
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser POSIX
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"updatedAt")
)
instance Prelude.Hashable Finding
instance Prelude.NFData Finding