{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.MacieV2.Types.FindingActor where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.MacieV2.Types.DomainDetails
import Amazonka.MacieV2.Types.IpAddressDetails
import Amazonka.MacieV2.Types.UserIdentity
import qualified Amazonka.Prelude as Prelude
data FindingActor = FindingActor'
{
FindingActor -> Maybe DomainDetails
domainDetails :: Prelude.Maybe DomainDetails,
FindingActor -> Maybe IpAddressDetails
ipAddressDetails :: Prelude.Maybe IpAddressDetails,
FindingActor -> Maybe UserIdentity
userIdentity :: Prelude.Maybe UserIdentity
}
deriving (FindingActor -> FindingActor -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: FindingActor -> FindingActor -> Bool
$c/= :: FindingActor -> FindingActor -> Bool
== :: FindingActor -> FindingActor -> Bool
$c== :: FindingActor -> FindingActor -> Bool
Prelude.Eq, ReadPrec [FindingActor]
ReadPrec FindingActor
Int -> ReadS FindingActor
ReadS [FindingActor]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [FindingActor]
$creadListPrec :: ReadPrec [FindingActor]
readPrec :: ReadPrec FindingActor
$creadPrec :: ReadPrec FindingActor
readList :: ReadS [FindingActor]
$creadList :: ReadS [FindingActor]
readsPrec :: Int -> ReadS FindingActor
$creadsPrec :: Int -> ReadS FindingActor
Prelude.Read, Int -> FindingActor -> ShowS
[FindingActor] -> ShowS
FindingActor -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [FindingActor] -> ShowS
$cshowList :: [FindingActor] -> ShowS
show :: FindingActor -> String
$cshow :: FindingActor -> String
showsPrec :: Int -> FindingActor -> ShowS
$cshowsPrec :: Int -> FindingActor -> ShowS
Prelude.Show, forall x. Rep FindingActor x -> FindingActor
forall x. FindingActor -> Rep FindingActor x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep FindingActor x -> FindingActor
$cfrom :: forall x. FindingActor -> Rep FindingActor x
Prelude.Generic)
newFindingActor ::
FindingActor
newFindingActor :: FindingActor
newFindingActor =
FindingActor'
{ $sel:domainDetails:FindingActor' :: Maybe DomainDetails
domainDetails = forall a. Maybe a
Prelude.Nothing,
$sel:ipAddressDetails:FindingActor' :: Maybe IpAddressDetails
ipAddressDetails = forall a. Maybe a
Prelude.Nothing,
$sel:userIdentity:FindingActor' :: Maybe UserIdentity
userIdentity = forall a. Maybe a
Prelude.Nothing
}
findingActor_domainDetails :: Lens.Lens' FindingActor (Prelude.Maybe DomainDetails)
findingActor_domainDetails :: Lens' FindingActor (Maybe DomainDetails)
findingActor_domainDetails = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FindingActor' {Maybe DomainDetails
domainDetails :: Maybe DomainDetails
$sel:domainDetails:FindingActor' :: FindingActor -> Maybe DomainDetails
domainDetails} -> Maybe DomainDetails
domainDetails) (\s :: FindingActor
s@FindingActor' {} Maybe DomainDetails
a -> FindingActor
s {$sel:domainDetails:FindingActor' :: Maybe DomainDetails
domainDetails = Maybe DomainDetails
a} :: FindingActor)
findingActor_ipAddressDetails :: Lens.Lens' FindingActor (Prelude.Maybe IpAddressDetails)
findingActor_ipAddressDetails :: Lens' FindingActor (Maybe IpAddressDetails)
findingActor_ipAddressDetails = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FindingActor' {Maybe IpAddressDetails
ipAddressDetails :: Maybe IpAddressDetails
$sel:ipAddressDetails:FindingActor' :: FindingActor -> Maybe IpAddressDetails
ipAddressDetails} -> Maybe IpAddressDetails
ipAddressDetails) (\s :: FindingActor
s@FindingActor' {} Maybe IpAddressDetails
a -> FindingActor
s {$sel:ipAddressDetails:FindingActor' :: Maybe IpAddressDetails
ipAddressDetails = Maybe IpAddressDetails
a} :: FindingActor)
findingActor_userIdentity :: Lens.Lens' FindingActor (Prelude.Maybe UserIdentity)
findingActor_userIdentity :: Lens' FindingActor (Maybe UserIdentity)
findingActor_userIdentity = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FindingActor' {Maybe UserIdentity
userIdentity :: Maybe UserIdentity
$sel:userIdentity:FindingActor' :: FindingActor -> Maybe UserIdentity
userIdentity} -> Maybe UserIdentity
userIdentity) (\s :: FindingActor
s@FindingActor' {} Maybe UserIdentity
a -> FindingActor
s {$sel:userIdentity:FindingActor' :: Maybe UserIdentity
userIdentity = Maybe UserIdentity
a} :: FindingActor)
instance Data.FromJSON FindingActor where
parseJSON :: Value -> Parser FindingActor
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"FindingActor"
( \Object
x ->
Maybe DomainDetails
-> Maybe IpAddressDetails -> Maybe UserIdentity -> FindingActor
FindingActor'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"domainDetails")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"ipAddressDetails")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"userIdentity")
)
instance Prelude.Hashable FindingActor where
hashWithSalt :: Int -> FindingActor -> Int
hashWithSalt Int
_salt FindingActor' {Maybe DomainDetails
Maybe IpAddressDetails
Maybe UserIdentity
userIdentity :: Maybe UserIdentity
ipAddressDetails :: Maybe IpAddressDetails
domainDetails :: Maybe DomainDetails
$sel:userIdentity:FindingActor' :: FindingActor -> Maybe UserIdentity
$sel:ipAddressDetails:FindingActor' :: FindingActor -> Maybe IpAddressDetails
$sel:domainDetails:FindingActor' :: FindingActor -> Maybe DomainDetails
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe DomainDetails
domainDetails
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe IpAddressDetails
ipAddressDetails
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe UserIdentity
userIdentity
instance Prelude.NFData FindingActor where
rnf :: FindingActor -> ()
rnf FindingActor' {Maybe DomainDetails
Maybe IpAddressDetails
Maybe UserIdentity
userIdentity :: Maybe UserIdentity
ipAddressDetails :: Maybe IpAddressDetails
domainDetails :: Maybe DomainDetails
$sel:userIdentity:FindingActor' :: FindingActor -> Maybe UserIdentity
$sel:ipAddressDetails:FindingActor' :: FindingActor -> Maybe IpAddressDetails
$sel:domainDetails:FindingActor' :: FindingActor -> Maybe DomainDetails
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe DomainDetails
domainDetails
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe IpAddressDetails
ipAddressDetails
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe UserIdentity
userIdentity