{-# 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.FindingSummary 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 FindingSummary = FindingSummary'
{
FindingSummary -> Maybe Text
error :: Prelude.Maybe Prelude.Text,
FindingSummary -> Maybe Bool
isPublic :: Prelude.Maybe Prelude.Bool,
FindingSummary -> Maybe [Text]
action :: Prelude.Maybe [Prelude.Text],
FindingSummary -> Maybe [FindingSource]
sources :: Prelude.Maybe [FindingSource],
FindingSummary -> Maybe Text
resource :: Prelude.Maybe Prelude.Text,
FindingSummary -> Maybe (HashMap Text Text)
principal :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
FindingSummary -> POSIX
analyzedAt :: Core.POSIX,
FindingSummary -> HashMap Text Text
condition :: Prelude.HashMap Prelude.Text Prelude.Text,
FindingSummary -> POSIX
createdAt :: Core.POSIX,
FindingSummary -> Text
id :: Prelude.Text,
FindingSummary -> Text
resourceOwnerAccount :: Prelude.Text,
FindingSummary -> ResourceType
resourceType :: ResourceType,
FindingSummary -> FindingStatus
status :: FindingStatus,
FindingSummary -> POSIX
updatedAt :: Core.POSIX
}
deriving (FindingSummary -> FindingSummary -> Bool
(FindingSummary -> FindingSummary -> Bool)
-> (FindingSummary -> FindingSummary -> Bool) -> Eq FindingSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: FindingSummary -> FindingSummary -> Bool
$c/= :: FindingSummary -> FindingSummary -> Bool
== :: FindingSummary -> FindingSummary -> Bool
$c== :: FindingSummary -> FindingSummary -> Bool
Prelude.Eq, ReadPrec [FindingSummary]
ReadPrec FindingSummary
Int -> ReadS FindingSummary
ReadS [FindingSummary]
(Int -> ReadS FindingSummary)
-> ReadS [FindingSummary]
-> ReadPrec FindingSummary
-> ReadPrec [FindingSummary]
-> Read FindingSummary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [FindingSummary]
$creadListPrec :: ReadPrec [FindingSummary]
readPrec :: ReadPrec FindingSummary
$creadPrec :: ReadPrec FindingSummary
readList :: ReadS [FindingSummary]
$creadList :: ReadS [FindingSummary]
readsPrec :: Int -> ReadS FindingSummary
$creadsPrec :: Int -> ReadS FindingSummary
Prelude.Read, Int -> FindingSummary -> ShowS
[FindingSummary] -> ShowS
FindingSummary -> String
(Int -> FindingSummary -> ShowS)
-> (FindingSummary -> String)
-> ([FindingSummary] -> ShowS)
-> Show FindingSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [FindingSummary] -> ShowS
$cshowList :: [FindingSummary] -> ShowS
show :: FindingSummary -> String
$cshow :: FindingSummary -> String
showsPrec :: Int -> FindingSummary -> ShowS
$cshowsPrec :: Int -> FindingSummary -> ShowS
Prelude.Show, (forall x. FindingSummary -> Rep FindingSummary x)
-> (forall x. Rep FindingSummary x -> FindingSummary)
-> Generic FindingSummary
forall x. Rep FindingSummary x -> FindingSummary
forall x. FindingSummary -> Rep FindingSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep FindingSummary x -> FindingSummary
$cfrom :: forall x. FindingSummary -> Rep FindingSummary x
Prelude.Generic)
newFindingSummary ::
Prelude.UTCTime ->
Prelude.UTCTime ->
Prelude.Text ->
Prelude.Text ->
ResourceType ->
FindingStatus ->
Prelude.UTCTime ->
FindingSummary
newFindingSummary :: UTCTime
-> UTCTime
-> Text
-> Text
-> ResourceType
-> FindingStatus
-> UTCTime
-> FindingSummary
newFindingSummary
UTCTime
pAnalyzedAt_
UTCTime
pCreatedAt_
Text
pId_
Text
pResourceOwnerAccount_
ResourceType
pResourceType_
FindingStatus
pStatus_
UTCTime
pUpdatedAt_ =
FindingSummary' :: Maybe Text
-> Maybe Bool
-> Maybe [Text]
-> Maybe [FindingSource]
-> Maybe Text
-> Maybe (HashMap Text Text)
-> POSIX
-> HashMap Text Text
-> POSIX
-> Text
-> Text
-> ResourceType
-> FindingStatus
-> POSIX
-> FindingSummary
FindingSummary'
{ $sel:error:FindingSummary' :: Maybe Text
error = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:isPublic:FindingSummary' :: Maybe Bool
isPublic = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:action:FindingSummary' :: Maybe [Text]
action = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:sources:FindingSummary' :: Maybe [FindingSource]
sources = Maybe [FindingSource]
forall a. Maybe a
Prelude.Nothing,
$sel:resource:FindingSummary' :: Maybe Text
resource = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:principal:FindingSummary' :: Maybe (HashMap Text Text)
principal = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
$sel:analyzedAt:FindingSummary' :: 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:FindingSummary' :: HashMap Text Text
condition = HashMap Text Text
forall a. Monoid a => a
Prelude.mempty,
$sel:createdAt:FindingSummary' :: 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:FindingSummary' :: Text
id = Text
pId_,
$sel:resourceOwnerAccount:FindingSummary' :: Text
resourceOwnerAccount = Text
pResourceOwnerAccount_,
$sel:resourceType:FindingSummary' :: ResourceType
resourceType = ResourceType
pResourceType_,
$sel:status:FindingSummary' :: FindingStatus
status = FindingStatus
pStatus_,
$sel:updatedAt:FindingSummary' :: 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_
}
findingSummary_error :: Lens.Lens' FindingSummary (Prelude.Maybe Prelude.Text)
findingSummary_error :: (Maybe Text -> f (Maybe Text))
-> FindingSummary -> f FindingSummary
findingSummary_error = (FindingSummary -> Maybe Text)
-> (FindingSummary -> Maybe Text -> FindingSummary)
-> Lens FindingSummary FindingSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FindingSummary' {Maybe Text
error :: Maybe Text
$sel:error:FindingSummary' :: FindingSummary -> Maybe Text
error} -> Maybe Text
error) (\s :: FindingSummary
s@FindingSummary' {} Maybe Text
a -> FindingSummary
s {$sel:error:FindingSummary' :: Maybe Text
error = Maybe Text
a} :: FindingSummary)
findingSummary_isPublic :: Lens.Lens' FindingSummary (Prelude.Maybe Prelude.Bool)
findingSummary_isPublic :: (Maybe Bool -> f (Maybe Bool))
-> FindingSummary -> f FindingSummary
findingSummary_isPublic = (FindingSummary -> Maybe Bool)
-> (FindingSummary -> Maybe Bool -> FindingSummary)
-> Lens FindingSummary FindingSummary (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FindingSummary' {Maybe Bool
isPublic :: Maybe Bool
$sel:isPublic:FindingSummary' :: FindingSummary -> Maybe Bool
isPublic} -> Maybe Bool
isPublic) (\s :: FindingSummary
s@FindingSummary' {} Maybe Bool
a -> FindingSummary
s {$sel:isPublic:FindingSummary' :: Maybe Bool
isPublic = Maybe Bool
a} :: FindingSummary)
findingSummary_action :: Lens.Lens' FindingSummary (Prelude.Maybe [Prelude.Text])
findingSummary_action :: (Maybe [Text] -> f (Maybe [Text]))
-> FindingSummary -> f FindingSummary
findingSummary_action = (FindingSummary -> Maybe [Text])
-> (FindingSummary -> Maybe [Text] -> FindingSummary)
-> Lens FindingSummary FindingSummary (Maybe [Text]) (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FindingSummary' {Maybe [Text]
action :: Maybe [Text]
$sel:action:FindingSummary' :: FindingSummary -> Maybe [Text]
action} -> Maybe [Text]
action) (\s :: FindingSummary
s@FindingSummary' {} Maybe [Text]
a -> FindingSummary
s {$sel:action:FindingSummary' :: Maybe [Text]
action = Maybe [Text]
a} :: FindingSummary) ((Maybe [Text] -> f (Maybe [Text]))
-> FindingSummary -> f FindingSummary)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> FindingSummary
-> f FindingSummary
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
findingSummary_sources :: Lens.Lens' FindingSummary (Prelude.Maybe [FindingSource])
findingSummary_sources :: (Maybe [FindingSource] -> f (Maybe [FindingSource]))
-> FindingSummary -> f FindingSummary
findingSummary_sources = (FindingSummary -> Maybe [FindingSource])
-> (FindingSummary -> Maybe [FindingSource] -> FindingSummary)
-> Lens
FindingSummary
FindingSummary
(Maybe [FindingSource])
(Maybe [FindingSource])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FindingSummary' {Maybe [FindingSource]
sources :: Maybe [FindingSource]
$sel:sources:FindingSummary' :: FindingSummary -> Maybe [FindingSource]
sources} -> Maybe [FindingSource]
sources) (\s :: FindingSummary
s@FindingSummary' {} Maybe [FindingSource]
a -> FindingSummary
s {$sel:sources:FindingSummary' :: Maybe [FindingSource]
sources = Maybe [FindingSource]
a} :: FindingSummary) ((Maybe [FindingSource] -> f (Maybe [FindingSource]))
-> FindingSummary -> f FindingSummary)
-> ((Maybe [FindingSource] -> f (Maybe [FindingSource]))
-> Maybe [FindingSource] -> f (Maybe [FindingSource]))
-> (Maybe [FindingSource] -> f (Maybe [FindingSource]))
-> FindingSummary
-> f FindingSummary
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
findingSummary_resource :: Lens.Lens' FindingSummary (Prelude.Maybe Prelude.Text)
findingSummary_resource :: (Maybe Text -> f (Maybe Text))
-> FindingSummary -> f FindingSummary
findingSummary_resource = (FindingSummary -> Maybe Text)
-> (FindingSummary -> Maybe Text -> FindingSummary)
-> Lens FindingSummary FindingSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FindingSummary' {Maybe Text
resource :: Maybe Text
$sel:resource:FindingSummary' :: FindingSummary -> Maybe Text
resource} -> Maybe Text
resource) (\s :: FindingSummary
s@FindingSummary' {} Maybe Text
a -> FindingSummary
s {$sel:resource:FindingSummary' :: Maybe Text
resource = Maybe Text
a} :: FindingSummary)
findingSummary_principal :: Lens.Lens' FindingSummary (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
findingSummary_principal :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> FindingSummary -> f FindingSummary
findingSummary_principal = (FindingSummary -> Maybe (HashMap Text Text))
-> (FindingSummary -> Maybe (HashMap Text Text) -> FindingSummary)
-> Lens
FindingSummary
FindingSummary
(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 (\FindingSummary' {Maybe (HashMap Text Text)
principal :: Maybe (HashMap Text Text)
$sel:principal:FindingSummary' :: FindingSummary -> Maybe (HashMap Text Text)
principal} -> Maybe (HashMap Text Text)
principal) (\s :: FindingSummary
s@FindingSummary' {} Maybe (HashMap Text Text)
a -> FindingSummary
s {$sel:principal:FindingSummary' :: Maybe (HashMap Text Text)
principal = Maybe (HashMap Text Text)
a} :: FindingSummary) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> FindingSummary -> f FindingSummary)
-> ((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)))
-> FindingSummary
-> f FindingSummary
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
findingSummary_analyzedAt :: Lens.Lens' FindingSummary Prelude.UTCTime
findingSummary_analyzedAt :: (UTCTime -> f UTCTime) -> FindingSummary -> f FindingSummary
findingSummary_analyzedAt = (FindingSummary -> POSIX)
-> (FindingSummary -> POSIX -> FindingSummary)
-> Lens FindingSummary FindingSummary POSIX POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FindingSummary' {POSIX
analyzedAt :: POSIX
$sel:analyzedAt:FindingSummary' :: FindingSummary -> POSIX
analyzedAt} -> POSIX
analyzedAt) (\s :: FindingSummary
s@FindingSummary' {} POSIX
a -> FindingSummary
s {$sel:analyzedAt:FindingSummary' :: POSIX
analyzedAt = POSIX
a} :: FindingSummary) ((POSIX -> f POSIX) -> FindingSummary -> f FindingSummary)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> FindingSummary
-> f FindingSummary
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
findingSummary_condition :: Lens.Lens' FindingSummary (Prelude.HashMap Prelude.Text Prelude.Text)
findingSummary_condition :: (HashMap Text Text -> f (HashMap Text Text))
-> FindingSummary -> f FindingSummary
findingSummary_condition = (FindingSummary -> HashMap Text Text)
-> (FindingSummary -> HashMap Text Text -> FindingSummary)
-> Lens
FindingSummary
FindingSummary
(HashMap Text Text)
(HashMap Text Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FindingSummary' {HashMap Text Text
condition :: HashMap Text Text
$sel:condition:FindingSummary' :: FindingSummary -> HashMap Text Text
condition} -> HashMap Text Text
condition) (\s :: FindingSummary
s@FindingSummary' {} HashMap Text Text
a -> FindingSummary
s {$sel:condition:FindingSummary' :: HashMap Text Text
condition = HashMap Text Text
a} :: FindingSummary) ((HashMap Text Text -> f (HashMap Text Text))
-> FindingSummary -> f FindingSummary)
-> ((HashMap Text Text -> f (HashMap Text Text))
-> HashMap Text Text -> f (HashMap Text Text))
-> (HashMap Text Text -> f (HashMap Text Text))
-> FindingSummary
-> f FindingSummary
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
findingSummary_createdAt :: Lens.Lens' FindingSummary Prelude.UTCTime
findingSummary_createdAt :: (UTCTime -> f UTCTime) -> FindingSummary -> f FindingSummary
findingSummary_createdAt = (FindingSummary -> POSIX)
-> (FindingSummary -> POSIX -> FindingSummary)
-> Lens FindingSummary FindingSummary POSIX POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FindingSummary' {POSIX
createdAt :: POSIX
$sel:createdAt:FindingSummary' :: FindingSummary -> POSIX
createdAt} -> POSIX
createdAt) (\s :: FindingSummary
s@FindingSummary' {} POSIX
a -> FindingSummary
s {$sel:createdAt:FindingSummary' :: POSIX
createdAt = POSIX
a} :: FindingSummary) ((POSIX -> f POSIX) -> FindingSummary -> f FindingSummary)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> FindingSummary
-> f FindingSummary
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
findingSummary_id :: Lens.Lens' FindingSummary Prelude.Text
findingSummary_id :: (Text -> f Text) -> FindingSummary -> f FindingSummary
findingSummary_id = (FindingSummary -> Text)
-> (FindingSummary -> Text -> FindingSummary)
-> Lens FindingSummary FindingSummary Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FindingSummary' {Text
id :: Text
$sel:id:FindingSummary' :: FindingSummary -> Text
id} -> Text
id) (\s :: FindingSummary
s@FindingSummary' {} Text
a -> FindingSummary
s {$sel:id:FindingSummary' :: Text
id = Text
a} :: FindingSummary)
findingSummary_resourceOwnerAccount :: Lens.Lens' FindingSummary Prelude.Text
findingSummary_resourceOwnerAccount :: (Text -> f Text) -> FindingSummary -> f FindingSummary
findingSummary_resourceOwnerAccount = (FindingSummary -> Text)
-> (FindingSummary -> Text -> FindingSummary)
-> Lens FindingSummary FindingSummary Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FindingSummary' {Text
resourceOwnerAccount :: Text
$sel:resourceOwnerAccount:FindingSummary' :: FindingSummary -> Text
resourceOwnerAccount} -> Text
resourceOwnerAccount) (\s :: FindingSummary
s@FindingSummary' {} Text
a -> FindingSummary
s {$sel:resourceOwnerAccount:FindingSummary' :: Text
resourceOwnerAccount = Text
a} :: FindingSummary)
findingSummary_resourceType :: Lens.Lens' FindingSummary ResourceType
findingSummary_resourceType :: (ResourceType -> f ResourceType)
-> FindingSummary -> f FindingSummary
findingSummary_resourceType = (FindingSummary -> ResourceType)
-> (FindingSummary -> ResourceType -> FindingSummary)
-> Lens FindingSummary FindingSummary ResourceType ResourceType
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FindingSummary' {ResourceType
resourceType :: ResourceType
$sel:resourceType:FindingSummary' :: FindingSummary -> ResourceType
resourceType} -> ResourceType
resourceType) (\s :: FindingSummary
s@FindingSummary' {} ResourceType
a -> FindingSummary
s {$sel:resourceType:FindingSummary' :: ResourceType
resourceType = ResourceType
a} :: FindingSummary)
findingSummary_status :: Lens.Lens' FindingSummary FindingStatus
findingSummary_status :: (FindingStatus -> f FindingStatus)
-> FindingSummary -> f FindingSummary
findingSummary_status = (FindingSummary -> FindingStatus)
-> (FindingSummary -> FindingStatus -> FindingSummary)
-> Lens FindingSummary FindingSummary FindingStatus FindingStatus
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FindingSummary' {FindingStatus
status :: FindingStatus
$sel:status:FindingSummary' :: FindingSummary -> FindingStatus
status} -> FindingStatus
status) (\s :: FindingSummary
s@FindingSummary' {} FindingStatus
a -> FindingSummary
s {$sel:status:FindingSummary' :: FindingStatus
status = FindingStatus
a} :: FindingSummary)
findingSummary_updatedAt :: Lens.Lens' FindingSummary Prelude.UTCTime
findingSummary_updatedAt :: (UTCTime -> f UTCTime) -> FindingSummary -> f FindingSummary
findingSummary_updatedAt = (FindingSummary -> POSIX)
-> (FindingSummary -> POSIX -> FindingSummary)
-> Lens FindingSummary FindingSummary POSIX POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FindingSummary' {POSIX
updatedAt :: POSIX
$sel:updatedAt:FindingSummary' :: FindingSummary -> POSIX
updatedAt} -> POSIX
updatedAt) (\s :: FindingSummary
s@FindingSummary' {} POSIX
a -> FindingSummary
s {$sel:updatedAt:FindingSummary' :: POSIX
updatedAt = POSIX
a} :: FindingSummary) ((POSIX -> f POSIX) -> FindingSummary -> f FindingSummary)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> FindingSummary
-> f FindingSummary
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 FindingSummary where
parseJSON :: Value -> Parser FindingSummary
parseJSON =
String
-> (Object -> Parser FindingSummary)
-> Value
-> Parser FindingSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"FindingSummary"
( \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
-> FindingSummary
FindingSummary'
(Maybe Text
-> Maybe Bool
-> Maybe [Text]
-> Maybe [FindingSource]
-> Maybe Text
-> Maybe (HashMap Text Text)
-> POSIX
-> HashMap Text Text
-> POSIX
-> Text
-> Text
-> ResourceType
-> FindingStatus
-> POSIX
-> FindingSummary)
-> 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
-> FindingSummary)
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
-> FindingSummary)
-> Parser (Maybe Bool)
-> Parser
(Maybe [Text]
-> Maybe [FindingSource]
-> Maybe Text
-> Maybe (HashMap Text Text)
-> POSIX
-> HashMap Text Text
-> POSIX
-> Text
-> Text
-> ResourceType
-> FindingStatus
-> POSIX
-> FindingSummary)
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
-> FindingSummary)
-> Parser (Maybe [Text])
-> Parser
(Maybe [FindingSource]
-> Maybe Text
-> Maybe (HashMap Text Text)
-> POSIX
-> HashMap Text Text
-> POSIX
-> Text
-> Text
-> ResourceType
-> FindingStatus
-> POSIX
-> FindingSummary)
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
-> FindingSummary)
-> Parser (Maybe [FindingSource])
-> Parser
(Maybe Text
-> Maybe (HashMap Text Text)
-> POSIX
-> HashMap Text Text
-> POSIX
-> Text
-> Text
-> ResourceType
-> FindingStatus
-> POSIX
-> FindingSummary)
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
-> FindingSummary)
-> Parser (Maybe Text)
-> Parser
(Maybe (HashMap Text Text)
-> POSIX
-> HashMap Text Text
-> POSIX
-> Text
-> Text
-> ResourceType
-> FindingStatus
-> POSIX
-> FindingSummary)
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
-> FindingSummary)
-> Parser (Maybe (HashMap Text Text))
-> Parser
(POSIX
-> HashMap Text Text
-> POSIX
-> Text
-> Text
-> ResourceType
-> FindingStatus
-> POSIX
-> FindingSummary)
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
-> FindingSummary)
-> Parser POSIX
-> Parser
(HashMap Text Text
-> POSIX
-> Text
-> Text
-> ResourceType
-> FindingStatus
-> POSIX
-> FindingSummary)
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
-> FindingSummary)
-> Parser (HashMap Text Text)
-> Parser
(POSIX
-> Text
-> Text
-> ResourceType
-> FindingStatus
-> POSIX
-> FindingSummary)
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
-> FindingSummary)
-> Parser POSIX
-> Parser
(Text
-> Text
-> ResourceType
-> FindingStatus
-> POSIX
-> FindingSummary)
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
-> FindingSummary)
-> Parser Text
-> Parser
(Text -> ResourceType -> FindingStatus -> POSIX -> FindingSummary)
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 -> FindingSummary)
-> Parser Text
-> Parser
(ResourceType -> FindingStatus -> POSIX -> FindingSummary)
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 -> FindingSummary)
-> Parser ResourceType
-> Parser (FindingStatus -> POSIX -> FindingSummary)
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 -> FindingSummary)
-> Parser FindingStatus -> Parser (POSIX -> FindingSummary)
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 -> FindingSummary)
-> Parser POSIX -> Parser FindingSummary
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 FindingSummary
instance Prelude.NFData FindingSummary