{-# 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.AccessPreviewFinding where
import Amazonka.AccessAnalyzer.Types.FindingChangeType
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 AccessPreviewFinding = AccessPreviewFinding'
{
AccessPreviewFinding -> Maybe FindingStatus
existingFindingStatus :: Prelude.Maybe FindingStatus,
AccessPreviewFinding -> Maybe Text
error :: Prelude.Maybe Prelude.Text,
AccessPreviewFinding -> Maybe Bool
isPublic :: Prelude.Maybe Prelude.Bool,
AccessPreviewFinding -> Maybe [Text]
action :: Prelude.Maybe [Prelude.Text],
AccessPreviewFinding -> Maybe [FindingSource]
sources :: Prelude.Maybe [FindingSource],
AccessPreviewFinding -> Maybe Text
resource :: Prelude.Maybe Prelude.Text,
AccessPreviewFinding -> Maybe (HashMap Text Text)
principal :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
AccessPreviewFinding -> Maybe Text
existingFindingId :: Prelude.Maybe Prelude.Text,
AccessPreviewFinding -> Maybe (HashMap Text Text)
condition :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
AccessPreviewFinding -> FindingChangeType
changeType :: FindingChangeType,
AccessPreviewFinding -> POSIX
createdAt :: Core.POSIX,
AccessPreviewFinding -> Text
id :: Prelude.Text,
AccessPreviewFinding -> Text
resourceOwnerAccount :: Prelude.Text,
AccessPreviewFinding -> ResourceType
resourceType :: ResourceType,
AccessPreviewFinding -> FindingStatus
status :: FindingStatus
}
deriving (AccessPreviewFinding -> AccessPreviewFinding -> Bool
(AccessPreviewFinding -> AccessPreviewFinding -> Bool)
-> (AccessPreviewFinding -> AccessPreviewFinding -> Bool)
-> Eq AccessPreviewFinding
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AccessPreviewFinding -> AccessPreviewFinding -> Bool
$c/= :: AccessPreviewFinding -> AccessPreviewFinding -> Bool
== :: AccessPreviewFinding -> AccessPreviewFinding -> Bool
$c== :: AccessPreviewFinding -> AccessPreviewFinding -> Bool
Prelude.Eq, ReadPrec [AccessPreviewFinding]
ReadPrec AccessPreviewFinding
Int -> ReadS AccessPreviewFinding
ReadS [AccessPreviewFinding]
(Int -> ReadS AccessPreviewFinding)
-> ReadS [AccessPreviewFinding]
-> ReadPrec AccessPreviewFinding
-> ReadPrec [AccessPreviewFinding]
-> Read AccessPreviewFinding
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AccessPreviewFinding]
$creadListPrec :: ReadPrec [AccessPreviewFinding]
readPrec :: ReadPrec AccessPreviewFinding
$creadPrec :: ReadPrec AccessPreviewFinding
readList :: ReadS [AccessPreviewFinding]
$creadList :: ReadS [AccessPreviewFinding]
readsPrec :: Int -> ReadS AccessPreviewFinding
$creadsPrec :: Int -> ReadS AccessPreviewFinding
Prelude.Read, Int -> AccessPreviewFinding -> ShowS
[AccessPreviewFinding] -> ShowS
AccessPreviewFinding -> String
(Int -> AccessPreviewFinding -> ShowS)
-> (AccessPreviewFinding -> String)
-> ([AccessPreviewFinding] -> ShowS)
-> Show AccessPreviewFinding
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AccessPreviewFinding] -> ShowS
$cshowList :: [AccessPreviewFinding] -> ShowS
show :: AccessPreviewFinding -> String
$cshow :: AccessPreviewFinding -> String
showsPrec :: Int -> AccessPreviewFinding -> ShowS
$cshowsPrec :: Int -> AccessPreviewFinding -> ShowS
Prelude.Show, (forall x. AccessPreviewFinding -> Rep AccessPreviewFinding x)
-> (forall x. Rep AccessPreviewFinding x -> AccessPreviewFinding)
-> Generic AccessPreviewFinding
forall x. Rep AccessPreviewFinding x -> AccessPreviewFinding
forall x. AccessPreviewFinding -> Rep AccessPreviewFinding x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep AccessPreviewFinding x -> AccessPreviewFinding
$cfrom :: forall x. AccessPreviewFinding -> Rep AccessPreviewFinding x
Prelude.Generic)
newAccessPreviewFinding ::
FindingChangeType ->
Prelude.UTCTime ->
Prelude.Text ->
Prelude.Text ->
ResourceType ->
FindingStatus ->
AccessPreviewFinding
newAccessPreviewFinding :: FindingChangeType
-> UTCTime
-> Text
-> Text
-> ResourceType
-> FindingStatus
-> AccessPreviewFinding
newAccessPreviewFinding
FindingChangeType
pChangeType_
UTCTime
pCreatedAt_
Text
pId_
Text
pResourceOwnerAccount_
ResourceType
pResourceType_
FindingStatus
pStatus_ =
AccessPreviewFinding' :: Maybe FindingStatus
-> Maybe Text
-> Maybe Bool
-> Maybe [Text]
-> Maybe [FindingSource]
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Maybe (HashMap Text Text)
-> FindingChangeType
-> POSIX
-> Text
-> Text
-> ResourceType
-> FindingStatus
-> AccessPreviewFinding
AccessPreviewFinding'
{ $sel:existingFindingStatus:AccessPreviewFinding' :: Maybe FindingStatus
existingFindingStatus =
Maybe FindingStatus
forall a. Maybe a
Prelude.Nothing,
$sel:error:AccessPreviewFinding' :: Maybe Text
error = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:isPublic:AccessPreviewFinding' :: Maybe Bool
isPublic = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:action:AccessPreviewFinding' :: Maybe [Text]
action = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:sources:AccessPreviewFinding' :: Maybe [FindingSource]
sources = Maybe [FindingSource]
forall a. Maybe a
Prelude.Nothing,
$sel:resource:AccessPreviewFinding' :: Maybe Text
resource = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:principal:AccessPreviewFinding' :: Maybe (HashMap Text Text)
principal = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
$sel:existingFindingId:AccessPreviewFinding' :: Maybe Text
existingFindingId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:condition:AccessPreviewFinding' :: Maybe (HashMap Text Text)
condition = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
$sel:changeType:AccessPreviewFinding' :: FindingChangeType
changeType = FindingChangeType
pChangeType_,
$sel:createdAt:AccessPreviewFinding' :: 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:AccessPreviewFinding' :: Text
id = Text
pId_,
$sel:resourceOwnerAccount:AccessPreviewFinding' :: Text
resourceOwnerAccount = Text
pResourceOwnerAccount_,
$sel:resourceType:AccessPreviewFinding' :: ResourceType
resourceType = ResourceType
pResourceType_,
$sel:status:AccessPreviewFinding' :: FindingStatus
status = FindingStatus
pStatus_
}
accessPreviewFinding_existingFindingStatus :: Lens.Lens' AccessPreviewFinding (Prelude.Maybe FindingStatus)
accessPreviewFinding_existingFindingStatus :: (Maybe FindingStatus -> f (Maybe FindingStatus))
-> AccessPreviewFinding -> f AccessPreviewFinding
accessPreviewFinding_existingFindingStatus = (AccessPreviewFinding -> Maybe FindingStatus)
-> (AccessPreviewFinding
-> Maybe FindingStatus -> AccessPreviewFinding)
-> Lens
AccessPreviewFinding
AccessPreviewFinding
(Maybe FindingStatus)
(Maybe FindingStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AccessPreviewFinding' {Maybe FindingStatus
existingFindingStatus :: Maybe FindingStatus
$sel:existingFindingStatus:AccessPreviewFinding' :: AccessPreviewFinding -> Maybe FindingStatus
existingFindingStatus} -> Maybe FindingStatus
existingFindingStatus) (\s :: AccessPreviewFinding
s@AccessPreviewFinding' {} Maybe FindingStatus
a -> AccessPreviewFinding
s {$sel:existingFindingStatus:AccessPreviewFinding' :: Maybe FindingStatus
existingFindingStatus = Maybe FindingStatus
a} :: AccessPreviewFinding)
accessPreviewFinding_error :: Lens.Lens' AccessPreviewFinding (Prelude.Maybe Prelude.Text)
accessPreviewFinding_error :: (Maybe Text -> f (Maybe Text))
-> AccessPreviewFinding -> f AccessPreviewFinding
accessPreviewFinding_error = (AccessPreviewFinding -> Maybe Text)
-> (AccessPreviewFinding -> Maybe Text -> AccessPreviewFinding)
-> Lens
AccessPreviewFinding AccessPreviewFinding (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AccessPreviewFinding' {Maybe Text
error :: Maybe Text
$sel:error:AccessPreviewFinding' :: AccessPreviewFinding -> Maybe Text
error} -> Maybe Text
error) (\s :: AccessPreviewFinding
s@AccessPreviewFinding' {} Maybe Text
a -> AccessPreviewFinding
s {$sel:error:AccessPreviewFinding' :: Maybe Text
error = Maybe Text
a} :: AccessPreviewFinding)
accessPreviewFinding_isPublic :: Lens.Lens' AccessPreviewFinding (Prelude.Maybe Prelude.Bool)
accessPreviewFinding_isPublic :: (Maybe Bool -> f (Maybe Bool))
-> AccessPreviewFinding -> f AccessPreviewFinding
accessPreviewFinding_isPublic = (AccessPreviewFinding -> Maybe Bool)
-> (AccessPreviewFinding -> Maybe Bool -> AccessPreviewFinding)
-> Lens
AccessPreviewFinding AccessPreviewFinding (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AccessPreviewFinding' {Maybe Bool
isPublic :: Maybe Bool
$sel:isPublic:AccessPreviewFinding' :: AccessPreviewFinding -> Maybe Bool
isPublic} -> Maybe Bool
isPublic) (\s :: AccessPreviewFinding
s@AccessPreviewFinding' {} Maybe Bool
a -> AccessPreviewFinding
s {$sel:isPublic:AccessPreviewFinding' :: Maybe Bool
isPublic = Maybe Bool
a} :: AccessPreviewFinding)
accessPreviewFinding_action :: Lens.Lens' AccessPreviewFinding (Prelude.Maybe [Prelude.Text])
accessPreviewFinding_action :: (Maybe [Text] -> f (Maybe [Text]))
-> AccessPreviewFinding -> f AccessPreviewFinding
accessPreviewFinding_action = (AccessPreviewFinding -> Maybe [Text])
-> (AccessPreviewFinding -> Maybe [Text] -> AccessPreviewFinding)
-> Lens
AccessPreviewFinding
AccessPreviewFinding
(Maybe [Text])
(Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AccessPreviewFinding' {Maybe [Text]
action :: Maybe [Text]
$sel:action:AccessPreviewFinding' :: AccessPreviewFinding -> Maybe [Text]
action} -> Maybe [Text]
action) (\s :: AccessPreviewFinding
s@AccessPreviewFinding' {} Maybe [Text]
a -> AccessPreviewFinding
s {$sel:action:AccessPreviewFinding' :: Maybe [Text]
action = Maybe [Text]
a} :: AccessPreviewFinding) ((Maybe [Text] -> f (Maybe [Text]))
-> AccessPreviewFinding -> f AccessPreviewFinding)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> AccessPreviewFinding
-> f AccessPreviewFinding
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
accessPreviewFinding_sources :: Lens.Lens' AccessPreviewFinding (Prelude.Maybe [FindingSource])
accessPreviewFinding_sources :: (Maybe [FindingSource] -> f (Maybe [FindingSource]))
-> AccessPreviewFinding -> f AccessPreviewFinding
accessPreviewFinding_sources = (AccessPreviewFinding -> Maybe [FindingSource])
-> (AccessPreviewFinding
-> Maybe [FindingSource] -> AccessPreviewFinding)
-> Lens
AccessPreviewFinding
AccessPreviewFinding
(Maybe [FindingSource])
(Maybe [FindingSource])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AccessPreviewFinding' {Maybe [FindingSource]
sources :: Maybe [FindingSource]
$sel:sources:AccessPreviewFinding' :: AccessPreviewFinding -> Maybe [FindingSource]
sources} -> Maybe [FindingSource]
sources) (\s :: AccessPreviewFinding
s@AccessPreviewFinding' {} Maybe [FindingSource]
a -> AccessPreviewFinding
s {$sel:sources:AccessPreviewFinding' :: Maybe [FindingSource]
sources = Maybe [FindingSource]
a} :: AccessPreviewFinding) ((Maybe [FindingSource] -> f (Maybe [FindingSource]))
-> AccessPreviewFinding -> f AccessPreviewFinding)
-> ((Maybe [FindingSource] -> f (Maybe [FindingSource]))
-> Maybe [FindingSource] -> f (Maybe [FindingSource]))
-> (Maybe [FindingSource] -> f (Maybe [FindingSource]))
-> AccessPreviewFinding
-> f AccessPreviewFinding
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
accessPreviewFinding_resource :: Lens.Lens' AccessPreviewFinding (Prelude.Maybe Prelude.Text)
accessPreviewFinding_resource :: (Maybe Text -> f (Maybe Text))
-> AccessPreviewFinding -> f AccessPreviewFinding
accessPreviewFinding_resource = (AccessPreviewFinding -> Maybe Text)
-> (AccessPreviewFinding -> Maybe Text -> AccessPreviewFinding)
-> Lens
AccessPreviewFinding AccessPreviewFinding (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AccessPreviewFinding' {Maybe Text
resource :: Maybe Text
$sel:resource:AccessPreviewFinding' :: AccessPreviewFinding -> Maybe Text
resource} -> Maybe Text
resource) (\s :: AccessPreviewFinding
s@AccessPreviewFinding' {} Maybe Text
a -> AccessPreviewFinding
s {$sel:resource:AccessPreviewFinding' :: Maybe Text
resource = Maybe Text
a} :: AccessPreviewFinding)
accessPreviewFinding_principal :: Lens.Lens' AccessPreviewFinding (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
accessPreviewFinding_principal :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> AccessPreviewFinding -> f AccessPreviewFinding
accessPreviewFinding_principal = (AccessPreviewFinding -> Maybe (HashMap Text Text))
-> (AccessPreviewFinding
-> Maybe (HashMap Text Text) -> AccessPreviewFinding)
-> Lens
AccessPreviewFinding
AccessPreviewFinding
(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 (\AccessPreviewFinding' {Maybe (HashMap Text Text)
principal :: Maybe (HashMap Text Text)
$sel:principal:AccessPreviewFinding' :: AccessPreviewFinding -> Maybe (HashMap Text Text)
principal} -> Maybe (HashMap Text Text)
principal) (\s :: AccessPreviewFinding
s@AccessPreviewFinding' {} Maybe (HashMap Text Text)
a -> AccessPreviewFinding
s {$sel:principal:AccessPreviewFinding' :: Maybe (HashMap Text Text)
principal = Maybe (HashMap Text Text)
a} :: AccessPreviewFinding) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> AccessPreviewFinding -> f AccessPreviewFinding)
-> ((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)))
-> AccessPreviewFinding
-> f AccessPreviewFinding
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
accessPreviewFinding_existingFindingId :: Lens.Lens' AccessPreviewFinding (Prelude.Maybe Prelude.Text)
accessPreviewFinding_existingFindingId :: (Maybe Text -> f (Maybe Text))
-> AccessPreviewFinding -> f AccessPreviewFinding
accessPreviewFinding_existingFindingId = (AccessPreviewFinding -> Maybe Text)
-> (AccessPreviewFinding -> Maybe Text -> AccessPreviewFinding)
-> Lens
AccessPreviewFinding AccessPreviewFinding (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AccessPreviewFinding' {Maybe Text
existingFindingId :: Maybe Text
$sel:existingFindingId:AccessPreviewFinding' :: AccessPreviewFinding -> Maybe Text
existingFindingId} -> Maybe Text
existingFindingId) (\s :: AccessPreviewFinding
s@AccessPreviewFinding' {} Maybe Text
a -> AccessPreviewFinding
s {$sel:existingFindingId:AccessPreviewFinding' :: Maybe Text
existingFindingId = Maybe Text
a} :: AccessPreviewFinding)
accessPreviewFinding_condition :: Lens.Lens' AccessPreviewFinding (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
accessPreviewFinding_condition :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> AccessPreviewFinding -> f AccessPreviewFinding
accessPreviewFinding_condition = (AccessPreviewFinding -> Maybe (HashMap Text Text))
-> (AccessPreviewFinding
-> Maybe (HashMap Text Text) -> AccessPreviewFinding)
-> Lens
AccessPreviewFinding
AccessPreviewFinding
(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 (\AccessPreviewFinding' {Maybe (HashMap Text Text)
condition :: Maybe (HashMap Text Text)
$sel:condition:AccessPreviewFinding' :: AccessPreviewFinding -> Maybe (HashMap Text Text)
condition} -> Maybe (HashMap Text Text)
condition) (\s :: AccessPreviewFinding
s@AccessPreviewFinding' {} Maybe (HashMap Text Text)
a -> AccessPreviewFinding
s {$sel:condition:AccessPreviewFinding' :: Maybe (HashMap Text Text)
condition = Maybe (HashMap Text Text)
a} :: AccessPreviewFinding) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> AccessPreviewFinding -> f AccessPreviewFinding)
-> ((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)))
-> AccessPreviewFinding
-> f AccessPreviewFinding
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
accessPreviewFinding_changeType :: Lens.Lens' AccessPreviewFinding FindingChangeType
accessPreviewFinding_changeType :: (FindingChangeType -> f FindingChangeType)
-> AccessPreviewFinding -> f AccessPreviewFinding
accessPreviewFinding_changeType = (AccessPreviewFinding -> FindingChangeType)
-> (AccessPreviewFinding
-> FindingChangeType -> AccessPreviewFinding)
-> Lens
AccessPreviewFinding
AccessPreviewFinding
FindingChangeType
FindingChangeType
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AccessPreviewFinding' {FindingChangeType
changeType :: FindingChangeType
$sel:changeType:AccessPreviewFinding' :: AccessPreviewFinding -> FindingChangeType
changeType} -> FindingChangeType
changeType) (\s :: AccessPreviewFinding
s@AccessPreviewFinding' {} FindingChangeType
a -> AccessPreviewFinding
s {$sel:changeType:AccessPreviewFinding' :: FindingChangeType
changeType = FindingChangeType
a} :: AccessPreviewFinding)
accessPreviewFinding_createdAt :: Lens.Lens' AccessPreviewFinding Prelude.UTCTime
accessPreviewFinding_createdAt :: (UTCTime -> f UTCTime)
-> AccessPreviewFinding -> f AccessPreviewFinding
accessPreviewFinding_createdAt = (AccessPreviewFinding -> POSIX)
-> (AccessPreviewFinding -> POSIX -> AccessPreviewFinding)
-> Lens AccessPreviewFinding AccessPreviewFinding POSIX POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AccessPreviewFinding' {POSIX
createdAt :: POSIX
$sel:createdAt:AccessPreviewFinding' :: AccessPreviewFinding -> POSIX
createdAt} -> POSIX
createdAt) (\s :: AccessPreviewFinding
s@AccessPreviewFinding' {} POSIX
a -> AccessPreviewFinding
s {$sel:createdAt:AccessPreviewFinding' :: POSIX
createdAt = POSIX
a} :: AccessPreviewFinding) ((POSIX -> f POSIX)
-> AccessPreviewFinding -> f AccessPreviewFinding)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> AccessPreviewFinding
-> f AccessPreviewFinding
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
accessPreviewFinding_id :: Lens.Lens' AccessPreviewFinding Prelude.Text
accessPreviewFinding_id :: (Text -> f Text) -> AccessPreviewFinding -> f AccessPreviewFinding
accessPreviewFinding_id = (AccessPreviewFinding -> Text)
-> (AccessPreviewFinding -> Text -> AccessPreviewFinding)
-> Lens AccessPreviewFinding AccessPreviewFinding Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AccessPreviewFinding' {Text
id :: Text
$sel:id:AccessPreviewFinding' :: AccessPreviewFinding -> Text
id} -> Text
id) (\s :: AccessPreviewFinding
s@AccessPreviewFinding' {} Text
a -> AccessPreviewFinding
s {$sel:id:AccessPreviewFinding' :: Text
id = Text
a} :: AccessPreviewFinding)
accessPreviewFinding_resourceOwnerAccount :: Lens.Lens' AccessPreviewFinding Prelude.Text
accessPreviewFinding_resourceOwnerAccount :: (Text -> f Text) -> AccessPreviewFinding -> f AccessPreviewFinding
accessPreviewFinding_resourceOwnerAccount = (AccessPreviewFinding -> Text)
-> (AccessPreviewFinding -> Text -> AccessPreviewFinding)
-> Lens AccessPreviewFinding AccessPreviewFinding Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AccessPreviewFinding' {Text
resourceOwnerAccount :: Text
$sel:resourceOwnerAccount:AccessPreviewFinding' :: AccessPreviewFinding -> Text
resourceOwnerAccount} -> Text
resourceOwnerAccount) (\s :: AccessPreviewFinding
s@AccessPreviewFinding' {} Text
a -> AccessPreviewFinding
s {$sel:resourceOwnerAccount:AccessPreviewFinding' :: Text
resourceOwnerAccount = Text
a} :: AccessPreviewFinding)
accessPreviewFinding_resourceType :: Lens.Lens' AccessPreviewFinding ResourceType
accessPreviewFinding_resourceType :: (ResourceType -> f ResourceType)
-> AccessPreviewFinding -> f AccessPreviewFinding
accessPreviewFinding_resourceType = (AccessPreviewFinding -> ResourceType)
-> (AccessPreviewFinding -> ResourceType -> AccessPreviewFinding)
-> Lens
AccessPreviewFinding AccessPreviewFinding ResourceType ResourceType
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AccessPreviewFinding' {ResourceType
resourceType :: ResourceType
$sel:resourceType:AccessPreviewFinding' :: AccessPreviewFinding -> ResourceType
resourceType} -> ResourceType
resourceType) (\s :: AccessPreviewFinding
s@AccessPreviewFinding' {} ResourceType
a -> AccessPreviewFinding
s {$sel:resourceType:AccessPreviewFinding' :: ResourceType
resourceType = ResourceType
a} :: AccessPreviewFinding)
accessPreviewFinding_status :: Lens.Lens' AccessPreviewFinding FindingStatus
accessPreviewFinding_status :: (FindingStatus -> f FindingStatus)
-> AccessPreviewFinding -> f AccessPreviewFinding
accessPreviewFinding_status = (AccessPreviewFinding -> FindingStatus)
-> (AccessPreviewFinding -> FindingStatus -> AccessPreviewFinding)
-> Lens
AccessPreviewFinding
AccessPreviewFinding
FindingStatus
FindingStatus
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AccessPreviewFinding' {FindingStatus
status :: FindingStatus
$sel:status:AccessPreviewFinding' :: AccessPreviewFinding -> FindingStatus
status} -> FindingStatus
status) (\s :: AccessPreviewFinding
s@AccessPreviewFinding' {} FindingStatus
a -> AccessPreviewFinding
s {$sel:status:AccessPreviewFinding' :: FindingStatus
status = FindingStatus
a} :: AccessPreviewFinding)
instance Core.FromJSON AccessPreviewFinding where
parseJSON :: Value -> Parser AccessPreviewFinding
parseJSON =
String
-> (Object -> Parser AccessPreviewFinding)
-> Value
-> Parser AccessPreviewFinding
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"AccessPreviewFinding"
( \Object
x ->
Maybe FindingStatus
-> Maybe Text
-> Maybe Bool
-> Maybe [Text]
-> Maybe [FindingSource]
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Maybe (HashMap Text Text)
-> FindingChangeType
-> POSIX
-> Text
-> Text
-> ResourceType
-> FindingStatus
-> AccessPreviewFinding
AccessPreviewFinding'
(Maybe FindingStatus
-> Maybe Text
-> Maybe Bool
-> Maybe [Text]
-> Maybe [FindingSource]
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Maybe (HashMap Text Text)
-> FindingChangeType
-> POSIX
-> Text
-> Text
-> ResourceType
-> FindingStatus
-> AccessPreviewFinding)
-> Parser (Maybe FindingStatus)
-> Parser
(Maybe Text
-> Maybe Bool
-> Maybe [Text]
-> Maybe [FindingSource]
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Maybe (HashMap Text Text)
-> FindingChangeType
-> POSIX
-> Text
-> Text
-> ResourceType
-> FindingStatus
-> AccessPreviewFinding)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe FindingStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"existingFindingStatus")
Parser
(Maybe Text
-> Maybe Bool
-> Maybe [Text]
-> Maybe [FindingSource]
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Maybe (HashMap Text Text)
-> FindingChangeType
-> POSIX
-> Text
-> Text
-> ResourceType
-> FindingStatus
-> AccessPreviewFinding)
-> Parser (Maybe Text)
-> Parser
(Maybe Bool
-> Maybe [Text]
-> Maybe [FindingSource]
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Maybe (HashMap Text Text)
-> FindingChangeType
-> POSIX
-> Text
-> Text
-> ResourceType
-> FindingStatus
-> AccessPreviewFinding)
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
"error")
Parser
(Maybe Bool
-> Maybe [Text]
-> Maybe [FindingSource]
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Maybe (HashMap Text Text)
-> FindingChangeType
-> POSIX
-> Text
-> Text
-> ResourceType
-> FindingStatus
-> AccessPreviewFinding)
-> Parser (Maybe Bool)
-> Parser
(Maybe [Text]
-> Maybe [FindingSource]
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Maybe (HashMap Text Text)
-> FindingChangeType
-> POSIX
-> Text
-> Text
-> ResourceType
-> FindingStatus
-> AccessPreviewFinding)
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)
-> Maybe Text
-> Maybe (HashMap Text Text)
-> FindingChangeType
-> POSIX
-> Text
-> Text
-> ResourceType
-> FindingStatus
-> AccessPreviewFinding)
-> Parser (Maybe [Text])
-> Parser
(Maybe [FindingSource]
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Maybe (HashMap Text Text)
-> FindingChangeType
-> POSIX
-> Text
-> Text
-> ResourceType
-> FindingStatus
-> AccessPreviewFinding)
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)
-> Maybe Text
-> Maybe (HashMap Text Text)
-> FindingChangeType
-> POSIX
-> Text
-> Text
-> ResourceType
-> FindingStatus
-> AccessPreviewFinding)
-> Parser (Maybe [FindingSource])
-> Parser
(Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Maybe (HashMap Text Text)
-> FindingChangeType
-> POSIX
-> Text
-> Text
-> ResourceType
-> FindingStatus
-> AccessPreviewFinding)
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)
-> Maybe Text
-> Maybe (HashMap Text Text)
-> FindingChangeType
-> POSIX
-> Text
-> Text
-> ResourceType
-> FindingStatus
-> AccessPreviewFinding)
-> Parser (Maybe Text)
-> Parser
(Maybe (HashMap Text Text)
-> Maybe Text
-> Maybe (HashMap Text Text)
-> FindingChangeType
-> POSIX
-> Text
-> Text
-> ResourceType
-> FindingStatus
-> AccessPreviewFinding)
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)
-> Maybe Text
-> Maybe (HashMap Text Text)
-> FindingChangeType
-> POSIX
-> Text
-> Text
-> ResourceType
-> FindingStatus
-> AccessPreviewFinding)
-> Parser (Maybe (HashMap Text Text))
-> Parser
(Maybe Text
-> Maybe (HashMap Text Text)
-> FindingChangeType
-> POSIX
-> Text
-> Text
-> ResourceType
-> FindingStatus
-> AccessPreviewFinding)
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
(Maybe Text
-> Maybe (HashMap Text Text)
-> FindingChangeType
-> POSIX
-> Text
-> Text
-> ResourceType
-> FindingStatus
-> AccessPreviewFinding)
-> Parser (Maybe Text)
-> Parser
(Maybe (HashMap Text Text)
-> FindingChangeType
-> POSIX
-> Text
-> Text
-> ResourceType
-> FindingStatus
-> AccessPreviewFinding)
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
"existingFindingId")
Parser
(Maybe (HashMap Text Text)
-> FindingChangeType
-> POSIX
-> Text
-> Text
-> ResourceType
-> FindingStatus
-> AccessPreviewFinding)
-> Parser (Maybe (HashMap Text Text))
-> Parser
(FindingChangeType
-> POSIX
-> Text
-> Text
-> ResourceType
-> FindingStatus
-> AccessPreviewFinding)
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
"condition" 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
(FindingChangeType
-> POSIX
-> Text
-> Text
-> ResourceType
-> FindingStatus
-> AccessPreviewFinding)
-> Parser FindingChangeType
-> Parser
(POSIX
-> Text
-> Text
-> ResourceType
-> FindingStatus
-> AccessPreviewFinding)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser FindingChangeType
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"changeType")
Parser
(POSIX
-> Text
-> Text
-> ResourceType
-> FindingStatus
-> AccessPreviewFinding)
-> Parser POSIX
-> Parser
(Text
-> Text -> ResourceType -> FindingStatus -> AccessPreviewFinding)
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 -> AccessPreviewFinding)
-> Parser Text
-> Parser
(Text -> ResourceType -> FindingStatus -> AccessPreviewFinding)
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 -> AccessPreviewFinding)
-> Parser Text
-> Parser (ResourceType -> FindingStatus -> AccessPreviewFinding)
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 -> AccessPreviewFinding)
-> Parser ResourceType
-> Parser (FindingStatus -> AccessPreviewFinding)
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 -> AccessPreviewFinding)
-> Parser FindingStatus -> Parser AccessPreviewFinding
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")
)
instance Prelude.Hashable AccessPreviewFinding
instance Prelude.NFData AccessPreviewFinding