{-# 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.SecurityHub.Types.AwsApiCallAction where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.SecurityHub.Types.ActionRemoteIpDetails
import Amazonka.SecurityHub.Types.AwsApiCallActionDomainDetails
data AwsApiCallAction = AwsApiCallAction'
{
AwsApiCallAction -> Maybe ActionRemoteIpDetails
remoteIpDetails :: Prelude.Maybe ActionRemoteIpDetails,
AwsApiCallAction -> Maybe Text
firstSeen :: Prelude.Maybe Prelude.Text,
AwsApiCallAction -> Maybe Text
callerType :: Prelude.Maybe Prelude.Text,
AwsApiCallAction -> Maybe (HashMap Text Text)
affectedResources :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
AwsApiCallAction -> Maybe Text
lastSeen :: Prelude.Maybe Prelude.Text,
AwsApiCallAction -> Maybe AwsApiCallActionDomainDetails
domainDetails :: Prelude.Maybe AwsApiCallActionDomainDetails,
AwsApiCallAction -> Maybe Text
serviceName :: Prelude.Maybe Prelude.Text,
AwsApiCallAction -> Maybe Text
api :: Prelude.Maybe Prelude.Text
}
deriving (AwsApiCallAction -> AwsApiCallAction -> Bool
(AwsApiCallAction -> AwsApiCallAction -> Bool)
-> (AwsApiCallAction -> AwsApiCallAction -> Bool)
-> Eq AwsApiCallAction
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AwsApiCallAction -> AwsApiCallAction -> Bool
$c/= :: AwsApiCallAction -> AwsApiCallAction -> Bool
== :: AwsApiCallAction -> AwsApiCallAction -> Bool
$c== :: AwsApiCallAction -> AwsApiCallAction -> Bool
Prelude.Eq, ReadPrec [AwsApiCallAction]
ReadPrec AwsApiCallAction
Int -> ReadS AwsApiCallAction
ReadS [AwsApiCallAction]
(Int -> ReadS AwsApiCallAction)
-> ReadS [AwsApiCallAction]
-> ReadPrec AwsApiCallAction
-> ReadPrec [AwsApiCallAction]
-> Read AwsApiCallAction
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AwsApiCallAction]
$creadListPrec :: ReadPrec [AwsApiCallAction]
readPrec :: ReadPrec AwsApiCallAction
$creadPrec :: ReadPrec AwsApiCallAction
readList :: ReadS [AwsApiCallAction]
$creadList :: ReadS [AwsApiCallAction]
readsPrec :: Int -> ReadS AwsApiCallAction
$creadsPrec :: Int -> ReadS AwsApiCallAction
Prelude.Read, Int -> AwsApiCallAction -> ShowS
[AwsApiCallAction] -> ShowS
AwsApiCallAction -> String
(Int -> AwsApiCallAction -> ShowS)
-> (AwsApiCallAction -> String)
-> ([AwsApiCallAction] -> ShowS)
-> Show AwsApiCallAction
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AwsApiCallAction] -> ShowS
$cshowList :: [AwsApiCallAction] -> ShowS
show :: AwsApiCallAction -> String
$cshow :: AwsApiCallAction -> String
showsPrec :: Int -> AwsApiCallAction -> ShowS
$cshowsPrec :: Int -> AwsApiCallAction -> ShowS
Prelude.Show, (forall x. AwsApiCallAction -> Rep AwsApiCallAction x)
-> (forall x. Rep AwsApiCallAction x -> AwsApiCallAction)
-> Generic AwsApiCallAction
forall x. Rep AwsApiCallAction x -> AwsApiCallAction
forall x. AwsApiCallAction -> Rep AwsApiCallAction x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep AwsApiCallAction x -> AwsApiCallAction
$cfrom :: forall x. AwsApiCallAction -> Rep AwsApiCallAction x
Prelude.Generic)
newAwsApiCallAction ::
AwsApiCallAction
newAwsApiCallAction :: AwsApiCallAction
newAwsApiCallAction =
AwsApiCallAction' :: Maybe ActionRemoteIpDetails
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Maybe AwsApiCallActionDomainDetails
-> Maybe Text
-> Maybe Text
-> AwsApiCallAction
AwsApiCallAction'
{ $sel:remoteIpDetails:AwsApiCallAction' :: Maybe ActionRemoteIpDetails
remoteIpDetails =
Maybe ActionRemoteIpDetails
forall a. Maybe a
Prelude.Nothing,
$sel:firstSeen:AwsApiCallAction' :: Maybe Text
firstSeen = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:callerType:AwsApiCallAction' :: Maybe Text
callerType = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:affectedResources:AwsApiCallAction' :: Maybe (HashMap Text Text)
affectedResources = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
$sel:lastSeen:AwsApiCallAction' :: Maybe Text
lastSeen = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:domainDetails:AwsApiCallAction' :: Maybe AwsApiCallActionDomainDetails
domainDetails = Maybe AwsApiCallActionDomainDetails
forall a. Maybe a
Prelude.Nothing,
$sel:serviceName:AwsApiCallAction' :: Maybe Text
serviceName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:api:AwsApiCallAction' :: Maybe Text
api = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
awsApiCallAction_remoteIpDetails :: Lens.Lens' AwsApiCallAction (Prelude.Maybe ActionRemoteIpDetails)
awsApiCallAction_remoteIpDetails :: (Maybe ActionRemoteIpDetails -> f (Maybe ActionRemoteIpDetails))
-> AwsApiCallAction -> f AwsApiCallAction
awsApiCallAction_remoteIpDetails = (AwsApiCallAction -> Maybe ActionRemoteIpDetails)
-> (AwsApiCallAction
-> Maybe ActionRemoteIpDetails -> AwsApiCallAction)
-> Lens
AwsApiCallAction
AwsApiCallAction
(Maybe ActionRemoteIpDetails)
(Maybe ActionRemoteIpDetails)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsApiCallAction' {Maybe ActionRemoteIpDetails
remoteIpDetails :: Maybe ActionRemoteIpDetails
$sel:remoteIpDetails:AwsApiCallAction' :: AwsApiCallAction -> Maybe ActionRemoteIpDetails
remoteIpDetails} -> Maybe ActionRemoteIpDetails
remoteIpDetails) (\s :: AwsApiCallAction
s@AwsApiCallAction' {} Maybe ActionRemoteIpDetails
a -> AwsApiCallAction
s {$sel:remoteIpDetails:AwsApiCallAction' :: Maybe ActionRemoteIpDetails
remoteIpDetails = Maybe ActionRemoteIpDetails
a} :: AwsApiCallAction)
awsApiCallAction_firstSeen :: Lens.Lens' AwsApiCallAction (Prelude.Maybe Prelude.Text)
awsApiCallAction_firstSeen :: (Maybe Text -> f (Maybe Text))
-> AwsApiCallAction -> f AwsApiCallAction
awsApiCallAction_firstSeen = (AwsApiCallAction -> Maybe Text)
-> (AwsApiCallAction -> Maybe Text -> AwsApiCallAction)
-> Lens AwsApiCallAction AwsApiCallAction (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsApiCallAction' {Maybe Text
firstSeen :: Maybe Text
$sel:firstSeen:AwsApiCallAction' :: AwsApiCallAction -> Maybe Text
firstSeen} -> Maybe Text
firstSeen) (\s :: AwsApiCallAction
s@AwsApiCallAction' {} Maybe Text
a -> AwsApiCallAction
s {$sel:firstSeen:AwsApiCallAction' :: Maybe Text
firstSeen = Maybe Text
a} :: AwsApiCallAction)
awsApiCallAction_callerType :: Lens.Lens' AwsApiCallAction (Prelude.Maybe Prelude.Text)
awsApiCallAction_callerType :: (Maybe Text -> f (Maybe Text))
-> AwsApiCallAction -> f AwsApiCallAction
awsApiCallAction_callerType = (AwsApiCallAction -> Maybe Text)
-> (AwsApiCallAction -> Maybe Text -> AwsApiCallAction)
-> Lens AwsApiCallAction AwsApiCallAction (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsApiCallAction' {Maybe Text
callerType :: Maybe Text
$sel:callerType:AwsApiCallAction' :: AwsApiCallAction -> Maybe Text
callerType} -> Maybe Text
callerType) (\s :: AwsApiCallAction
s@AwsApiCallAction' {} Maybe Text
a -> AwsApiCallAction
s {$sel:callerType:AwsApiCallAction' :: Maybe Text
callerType = Maybe Text
a} :: AwsApiCallAction)
awsApiCallAction_affectedResources :: Lens.Lens' AwsApiCallAction (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
awsApiCallAction_affectedResources :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> AwsApiCallAction -> f AwsApiCallAction
awsApiCallAction_affectedResources = (AwsApiCallAction -> Maybe (HashMap Text Text))
-> (AwsApiCallAction
-> Maybe (HashMap Text Text) -> AwsApiCallAction)
-> Lens
AwsApiCallAction
AwsApiCallAction
(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 (\AwsApiCallAction' {Maybe (HashMap Text Text)
affectedResources :: Maybe (HashMap Text Text)
$sel:affectedResources:AwsApiCallAction' :: AwsApiCallAction -> Maybe (HashMap Text Text)
affectedResources} -> Maybe (HashMap Text Text)
affectedResources) (\s :: AwsApiCallAction
s@AwsApiCallAction' {} Maybe (HashMap Text Text)
a -> AwsApiCallAction
s {$sel:affectedResources:AwsApiCallAction' :: Maybe (HashMap Text Text)
affectedResources = Maybe (HashMap Text Text)
a} :: AwsApiCallAction) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> AwsApiCallAction -> f AwsApiCallAction)
-> ((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)))
-> AwsApiCallAction
-> f AwsApiCallAction
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
awsApiCallAction_lastSeen :: Lens.Lens' AwsApiCallAction (Prelude.Maybe Prelude.Text)
awsApiCallAction_lastSeen :: (Maybe Text -> f (Maybe Text))
-> AwsApiCallAction -> f AwsApiCallAction
awsApiCallAction_lastSeen = (AwsApiCallAction -> Maybe Text)
-> (AwsApiCallAction -> Maybe Text -> AwsApiCallAction)
-> Lens AwsApiCallAction AwsApiCallAction (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsApiCallAction' {Maybe Text
lastSeen :: Maybe Text
$sel:lastSeen:AwsApiCallAction' :: AwsApiCallAction -> Maybe Text
lastSeen} -> Maybe Text
lastSeen) (\s :: AwsApiCallAction
s@AwsApiCallAction' {} Maybe Text
a -> AwsApiCallAction
s {$sel:lastSeen:AwsApiCallAction' :: Maybe Text
lastSeen = Maybe Text
a} :: AwsApiCallAction)
awsApiCallAction_domainDetails :: Lens.Lens' AwsApiCallAction (Prelude.Maybe AwsApiCallActionDomainDetails)
awsApiCallAction_domainDetails :: (Maybe AwsApiCallActionDomainDetails
-> f (Maybe AwsApiCallActionDomainDetails))
-> AwsApiCallAction -> f AwsApiCallAction
awsApiCallAction_domainDetails = (AwsApiCallAction -> Maybe AwsApiCallActionDomainDetails)
-> (AwsApiCallAction
-> Maybe AwsApiCallActionDomainDetails -> AwsApiCallAction)
-> Lens
AwsApiCallAction
AwsApiCallAction
(Maybe AwsApiCallActionDomainDetails)
(Maybe AwsApiCallActionDomainDetails)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsApiCallAction' {Maybe AwsApiCallActionDomainDetails
domainDetails :: Maybe AwsApiCallActionDomainDetails
$sel:domainDetails:AwsApiCallAction' :: AwsApiCallAction -> Maybe AwsApiCallActionDomainDetails
domainDetails} -> Maybe AwsApiCallActionDomainDetails
domainDetails) (\s :: AwsApiCallAction
s@AwsApiCallAction' {} Maybe AwsApiCallActionDomainDetails
a -> AwsApiCallAction
s {$sel:domainDetails:AwsApiCallAction' :: Maybe AwsApiCallActionDomainDetails
domainDetails = Maybe AwsApiCallActionDomainDetails
a} :: AwsApiCallAction)
awsApiCallAction_serviceName :: Lens.Lens' AwsApiCallAction (Prelude.Maybe Prelude.Text)
awsApiCallAction_serviceName :: (Maybe Text -> f (Maybe Text))
-> AwsApiCallAction -> f AwsApiCallAction
awsApiCallAction_serviceName = (AwsApiCallAction -> Maybe Text)
-> (AwsApiCallAction -> Maybe Text -> AwsApiCallAction)
-> Lens AwsApiCallAction AwsApiCallAction (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsApiCallAction' {Maybe Text
serviceName :: Maybe Text
$sel:serviceName:AwsApiCallAction' :: AwsApiCallAction -> Maybe Text
serviceName} -> Maybe Text
serviceName) (\s :: AwsApiCallAction
s@AwsApiCallAction' {} Maybe Text
a -> AwsApiCallAction
s {$sel:serviceName:AwsApiCallAction' :: Maybe Text
serviceName = Maybe Text
a} :: AwsApiCallAction)
awsApiCallAction_api :: Lens.Lens' AwsApiCallAction (Prelude.Maybe Prelude.Text)
awsApiCallAction_api :: (Maybe Text -> f (Maybe Text))
-> AwsApiCallAction -> f AwsApiCallAction
awsApiCallAction_api = (AwsApiCallAction -> Maybe Text)
-> (AwsApiCallAction -> Maybe Text -> AwsApiCallAction)
-> Lens AwsApiCallAction AwsApiCallAction (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsApiCallAction' {Maybe Text
api :: Maybe Text
$sel:api:AwsApiCallAction' :: AwsApiCallAction -> Maybe Text
api} -> Maybe Text
api) (\s :: AwsApiCallAction
s@AwsApiCallAction' {} Maybe Text
a -> AwsApiCallAction
s {$sel:api:AwsApiCallAction' :: Maybe Text
api = Maybe Text
a} :: AwsApiCallAction)
instance Core.FromJSON AwsApiCallAction where
parseJSON :: Value -> Parser AwsApiCallAction
parseJSON =
String
-> (Object -> Parser AwsApiCallAction)
-> Value
-> Parser AwsApiCallAction
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"AwsApiCallAction"
( \Object
x ->
Maybe ActionRemoteIpDetails
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Maybe AwsApiCallActionDomainDetails
-> Maybe Text
-> Maybe Text
-> AwsApiCallAction
AwsApiCallAction'
(Maybe ActionRemoteIpDetails
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Maybe AwsApiCallActionDomainDetails
-> Maybe Text
-> Maybe Text
-> AwsApiCallAction)
-> Parser (Maybe ActionRemoteIpDetails)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Maybe AwsApiCallActionDomainDetails
-> Maybe Text
-> Maybe Text
-> AwsApiCallAction)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe ActionRemoteIpDetails)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"RemoteIpDetails")
Parser
(Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Maybe AwsApiCallActionDomainDetails
-> Maybe Text
-> Maybe Text
-> AwsApiCallAction)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Maybe AwsApiCallActionDomainDetails
-> Maybe Text
-> Maybe Text
-> AwsApiCallAction)
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
"FirstSeen")
Parser
(Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Maybe AwsApiCallActionDomainDetails
-> Maybe Text
-> Maybe Text
-> AwsApiCallAction)
-> Parser (Maybe Text)
-> Parser
(Maybe (HashMap Text Text)
-> Maybe Text
-> Maybe AwsApiCallActionDomainDetails
-> Maybe Text
-> Maybe Text
-> AwsApiCallAction)
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
"CallerType")
Parser
(Maybe (HashMap Text Text)
-> Maybe Text
-> Maybe AwsApiCallActionDomainDetails
-> Maybe Text
-> Maybe Text
-> AwsApiCallAction)
-> Parser (Maybe (HashMap Text Text))
-> Parser
(Maybe Text
-> Maybe AwsApiCallActionDomainDetails
-> Maybe Text
-> Maybe Text
-> AwsApiCallAction)
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
"AffectedResources"
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 AwsApiCallActionDomainDetails
-> Maybe Text
-> Maybe Text
-> AwsApiCallAction)
-> Parser (Maybe Text)
-> Parser
(Maybe AwsApiCallActionDomainDetails
-> Maybe Text -> Maybe Text -> AwsApiCallAction)
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
"LastSeen")
Parser
(Maybe AwsApiCallActionDomainDetails
-> Maybe Text -> Maybe Text -> AwsApiCallAction)
-> Parser (Maybe AwsApiCallActionDomainDetails)
-> Parser (Maybe Text -> Maybe Text -> AwsApiCallAction)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe AwsApiCallActionDomainDetails)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"DomainDetails")
Parser (Maybe Text -> Maybe Text -> AwsApiCallAction)
-> Parser (Maybe Text) -> Parser (Maybe Text -> AwsApiCallAction)
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
"ServiceName")
Parser (Maybe Text -> AwsApiCallAction)
-> Parser (Maybe Text) -> Parser AwsApiCallAction
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
"Api")
)
instance Prelude.Hashable AwsApiCallAction
instance Prelude.NFData AwsApiCallAction
instance Core.ToJSON AwsApiCallAction where
toJSON :: AwsApiCallAction -> Value
toJSON AwsApiCallAction' {Maybe Text
Maybe (HashMap Text Text)
Maybe AwsApiCallActionDomainDetails
Maybe ActionRemoteIpDetails
api :: Maybe Text
serviceName :: Maybe Text
domainDetails :: Maybe AwsApiCallActionDomainDetails
lastSeen :: Maybe Text
affectedResources :: Maybe (HashMap Text Text)
callerType :: Maybe Text
firstSeen :: Maybe Text
remoteIpDetails :: Maybe ActionRemoteIpDetails
$sel:api:AwsApiCallAction' :: AwsApiCallAction -> Maybe Text
$sel:serviceName:AwsApiCallAction' :: AwsApiCallAction -> Maybe Text
$sel:domainDetails:AwsApiCallAction' :: AwsApiCallAction -> Maybe AwsApiCallActionDomainDetails
$sel:lastSeen:AwsApiCallAction' :: AwsApiCallAction -> Maybe Text
$sel:affectedResources:AwsApiCallAction' :: AwsApiCallAction -> Maybe (HashMap Text Text)
$sel:callerType:AwsApiCallAction' :: AwsApiCallAction -> Maybe Text
$sel:firstSeen:AwsApiCallAction' :: AwsApiCallAction -> Maybe Text
$sel:remoteIpDetails:AwsApiCallAction' :: AwsApiCallAction -> Maybe ActionRemoteIpDetails
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"RemoteIpDetails" Text -> ActionRemoteIpDetails -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(ActionRemoteIpDetails -> Pair)
-> Maybe ActionRemoteIpDetails -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ActionRemoteIpDetails
remoteIpDetails,
(Text
"FirstSeen" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
firstSeen,
(Text
"CallerType" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
callerType,
(Text
"AffectedResources" Text -> HashMap Text Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(HashMap Text Text -> Pair)
-> Maybe (HashMap Text Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text Text)
affectedResources,
(Text
"LastSeen" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
lastSeen,
(Text
"DomainDetails" Text -> AwsApiCallActionDomainDetails -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (AwsApiCallActionDomainDetails -> Pair)
-> Maybe AwsApiCallActionDomainDetails -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AwsApiCallActionDomainDetails
domainDetails,
(Text
"ServiceName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
serviceName,
(Text
"Api" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
api
]
)