{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.FraudDetector.GetEventPrediction
(
GetEventPrediction (..),
newGetEventPrediction,
getEventPrediction_detectorVersionId,
getEventPrediction_externalModelEndpointDataBlobs,
getEventPrediction_detectorId,
getEventPrediction_eventId,
getEventPrediction_eventTypeName,
getEventPrediction_entities,
getEventPrediction_eventTimestamp,
getEventPrediction_eventVariables,
GetEventPredictionResponse (..),
newGetEventPredictionResponse,
getEventPredictionResponse_externalModelOutputs,
getEventPredictionResponse_modelScores,
getEventPredictionResponse_ruleResults,
getEventPredictionResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.FraudDetector.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data GetEventPrediction = GetEventPrediction'
{
GetEventPrediction -> Maybe Text
detectorVersionId :: Prelude.Maybe Prelude.Text,
GetEventPrediction
-> Maybe (Sensitive (HashMap Text ModelEndpointDataBlob))
externalModelEndpointDataBlobs :: Prelude.Maybe (Data.Sensitive (Prelude.HashMap Prelude.Text ModelEndpointDataBlob)),
GetEventPrediction -> Text
detectorId :: Prelude.Text,
GetEventPrediction -> Text
eventId :: Prelude.Text,
GetEventPrediction -> Text
eventTypeName :: Prelude.Text,
GetEventPrediction -> [Sensitive Entity]
entities :: [Data.Sensitive Entity],
GetEventPrediction -> Text
eventTimestamp :: Prelude.Text,
GetEventPrediction -> HashMap Text (Sensitive Text)
eventVariables :: Prelude.HashMap Prelude.Text (Data.Sensitive Prelude.Text)
}
deriving (GetEventPrediction -> GetEventPrediction -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetEventPrediction -> GetEventPrediction -> Bool
$c/= :: GetEventPrediction -> GetEventPrediction -> Bool
== :: GetEventPrediction -> GetEventPrediction -> Bool
$c== :: GetEventPrediction -> GetEventPrediction -> Bool
Prelude.Eq, Int -> GetEventPrediction -> ShowS
[GetEventPrediction] -> ShowS
GetEventPrediction -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetEventPrediction] -> ShowS
$cshowList :: [GetEventPrediction] -> ShowS
show :: GetEventPrediction -> String
$cshow :: GetEventPrediction -> String
showsPrec :: Int -> GetEventPrediction -> ShowS
$cshowsPrec :: Int -> GetEventPrediction -> ShowS
Prelude.Show, forall x. Rep GetEventPrediction x -> GetEventPrediction
forall x. GetEventPrediction -> Rep GetEventPrediction x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetEventPrediction x -> GetEventPrediction
$cfrom :: forall x. GetEventPrediction -> Rep GetEventPrediction x
Prelude.Generic)
newGetEventPrediction ::
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
GetEventPrediction
newGetEventPrediction :: Text -> Text -> Text -> Text -> GetEventPrediction
newGetEventPrediction
Text
pDetectorId_
Text
pEventId_
Text
pEventTypeName_
Text
pEventTimestamp_ =
GetEventPrediction'
{ $sel:detectorVersionId:GetEventPrediction' :: Maybe Text
detectorVersionId =
forall a. Maybe a
Prelude.Nothing,
$sel:externalModelEndpointDataBlobs:GetEventPrediction' :: Maybe (Sensitive (HashMap Text ModelEndpointDataBlob))
externalModelEndpointDataBlobs = forall a. Maybe a
Prelude.Nothing,
$sel:detectorId:GetEventPrediction' :: Text
detectorId = Text
pDetectorId_,
$sel:eventId:GetEventPrediction' :: Text
eventId = Text
pEventId_,
$sel:eventTypeName:GetEventPrediction' :: Text
eventTypeName = Text
pEventTypeName_,
$sel:entities:GetEventPrediction' :: [Sensitive Entity]
entities = forall a. Monoid a => a
Prelude.mempty,
$sel:eventTimestamp:GetEventPrediction' :: Text
eventTimestamp = Text
pEventTimestamp_,
$sel:eventVariables:GetEventPrediction' :: HashMap Text (Sensitive Text)
eventVariables = forall a. Monoid a => a
Prelude.mempty
}
getEventPrediction_detectorVersionId :: Lens.Lens' GetEventPrediction (Prelude.Maybe Prelude.Text)
getEventPrediction_detectorVersionId :: Lens' GetEventPrediction (Maybe Text)
getEventPrediction_detectorVersionId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetEventPrediction' {Maybe Text
detectorVersionId :: Maybe Text
$sel:detectorVersionId:GetEventPrediction' :: GetEventPrediction -> Maybe Text
detectorVersionId} -> Maybe Text
detectorVersionId) (\s :: GetEventPrediction
s@GetEventPrediction' {} Maybe Text
a -> GetEventPrediction
s {$sel:detectorVersionId:GetEventPrediction' :: Maybe Text
detectorVersionId = Maybe Text
a} :: GetEventPrediction)
getEventPrediction_externalModelEndpointDataBlobs :: Lens.Lens' GetEventPrediction (Prelude.Maybe (Prelude.HashMap Prelude.Text ModelEndpointDataBlob))
getEventPrediction_externalModelEndpointDataBlobs :: Lens'
GetEventPrediction (Maybe (HashMap Text ModelEndpointDataBlob))
getEventPrediction_externalModelEndpointDataBlobs = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetEventPrediction' {Maybe (Sensitive (HashMap Text ModelEndpointDataBlob))
externalModelEndpointDataBlobs :: Maybe (Sensitive (HashMap Text ModelEndpointDataBlob))
$sel:externalModelEndpointDataBlobs:GetEventPrediction' :: GetEventPrediction
-> Maybe (Sensitive (HashMap Text ModelEndpointDataBlob))
externalModelEndpointDataBlobs} -> Maybe (Sensitive (HashMap Text ModelEndpointDataBlob))
externalModelEndpointDataBlobs) (\s :: GetEventPrediction
s@GetEventPrediction' {} Maybe (Sensitive (HashMap Text ModelEndpointDataBlob))
a -> GetEventPrediction
s {$sel:externalModelEndpointDataBlobs:GetEventPrediction' :: Maybe (Sensitive (HashMap Text ModelEndpointDataBlob))
externalModelEndpointDataBlobs = Maybe (Sensitive (HashMap Text ModelEndpointDataBlob))
a} :: GetEventPrediction) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 (forall a. Iso' (Sensitive a) a
Data._Sensitive forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced)
getEventPrediction_detectorId :: Lens.Lens' GetEventPrediction Prelude.Text
getEventPrediction_detectorId :: Lens' GetEventPrediction Text
getEventPrediction_detectorId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetEventPrediction' {Text
detectorId :: Text
$sel:detectorId:GetEventPrediction' :: GetEventPrediction -> Text
detectorId} -> Text
detectorId) (\s :: GetEventPrediction
s@GetEventPrediction' {} Text
a -> GetEventPrediction
s {$sel:detectorId:GetEventPrediction' :: Text
detectorId = Text
a} :: GetEventPrediction)
getEventPrediction_eventId :: Lens.Lens' GetEventPrediction Prelude.Text
getEventPrediction_eventId :: Lens' GetEventPrediction Text
getEventPrediction_eventId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetEventPrediction' {Text
eventId :: Text
$sel:eventId:GetEventPrediction' :: GetEventPrediction -> Text
eventId} -> Text
eventId) (\s :: GetEventPrediction
s@GetEventPrediction' {} Text
a -> GetEventPrediction
s {$sel:eventId:GetEventPrediction' :: Text
eventId = Text
a} :: GetEventPrediction)
getEventPrediction_eventTypeName :: Lens.Lens' GetEventPrediction Prelude.Text
getEventPrediction_eventTypeName :: Lens' GetEventPrediction Text
getEventPrediction_eventTypeName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetEventPrediction' {Text
eventTypeName :: Text
$sel:eventTypeName:GetEventPrediction' :: GetEventPrediction -> Text
eventTypeName} -> Text
eventTypeName) (\s :: GetEventPrediction
s@GetEventPrediction' {} Text
a -> GetEventPrediction
s {$sel:eventTypeName:GetEventPrediction' :: Text
eventTypeName = Text
a} :: GetEventPrediction)
getEventPrediction_entities :: Lens.Lens' GetEventPrediction [Entity]
getEventPrediction_entities :: Lens' GetEventPrediction [Entity]
getEventPrediction_entities = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetEventPrediction' {[Sensitive Entity]
entities :: [Sensitive Entity]
$sel:entities:GetEventPrediction' :: GetEventPrediction -> [Sensitive Entity]
entities} -> [Sensitive Entity]
entities) (\s :: GetEventPrediction
s@GetEventPrediction' {} [Sensitive Entity]
a -> GetEventPrediction
s {$sel:entities:GetEventPrediction' :: [Sensitive Entity]
entities = [Sensitive Entity]
a} :: GetEventPrediction) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
getEventPrediction_eventTimestamp :: Lens.Lens' GetEventPrediction Prelude.Text
getEventPrediction_eventTimestamp :: Lens' GetEventPrediction Text
getEventPrediction_eventTimestamp = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetEventPrediction' {Text
eventTimestamp :: Text
$sel:eventTimestamp:GetEventPrediction' :: GetEventPrediction -> Text
eventTimestamp} -> Text
eventTimestamp) (\s :: GetEventPrediction
s@GetEventPrediction' {} Text
a -> GetEventPrediction
s {$sel:eventTimestamp:GetEventPrediction' :: Text
eventTimestamp = Text
a} :: GetEventPrediction)
getEventPrediction_eventVariables :: Lens.Lens' GetEventPrediction (Prelude.HashMap Prelude.Text Prelude.Text)
getEventPrediction_eventVariables :: Lens' GetEventPrediction (HashMap Text Text)
getEventPrediction_eventVariables = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetEventPrediction' {HashMap Text (Sensitive Text)
eventVariables :: HashMap Text (Sensitive Text)
$sel:eventVariables:GetEventPrediction' :: GetEventPrediction -> HashMap Text (Sensitive Text)
eventVariables} -> HashMap Text (Sensitive Text)
eventVariables) (\s :: GetEventPrediction
s@GetEventPrediction' {} HashMap Text (Sensitive Text)
a -> GetEventPrediction
s {$sel:eventVariables:GetEventPrediction' :: HashMap Text (Sensitive Text)
eventVariables = HashMap Text (Sensitive Text)
a} :: GetEventPrediction) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Core.AWSRequest GetEventPrediction where
type
AWSResponse GetEventPrediction =
GetEventPredictionResponse
request :: (Service -> Service)
-> GetEventPrediction -> Request GetEventPrediction
request Service -> Service
overrides =
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy GetEventPrediction
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse GetEventPrediction)))
response =
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
( \Int
s ResponseHeaders
h Object
x ->
Maybe [ExternalModelOutputs]
-> Maybe [ModelScores]
-> Maybe [RuleResult]
-> Int
-> GetEventPredictionResponse
GetEventPredictionResponse'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( Object
x
forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"externalModelOutputs"
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty
)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"modelScores" forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"ruleResults" forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance Prelude.Hashable GetEventPrediction where
hashWithSalt :: Int -> GetEventPrediction -> Int
hashWithSalt Int
_salt GetEventPrediction' {[Sensitive Entity]
Maybe Text
Maybe (Sensitive (HashMap Text ModelEndpointDataBlob))
Text
HashMap Text (Sensitive Text)
eventVariables :: HashMap Text (Sensitive Text)
eventTimestamp :: Text
entities :: [Sensitive Entity]
eventTypeName :: Text
eventId :: Text
detectorId :: Text
externalModelEndpointDataBlobs :: Maybe (Sensitive (HashMap Text ModelEndpointDataBlob))
detectorVersionId :: Maybe Text
$sel:eventVariables:GetEventPrediction' :: GetEventPrediction -> HashMap Text (Sensitive Text)
$sel:eventTimestamp:GetEventPrediction' :: GetEventPrediction -> Text
$sel:entities:GetEventPrediction' :: GetEventPrediction -> [Sensitive Entity]
$sel:eventTypeName:GetEventPrediction' :: GetEventPrediction -> Text
$sel:eventId:GetEventPrediction' :: GetEventPrediction -> Text
$sel:detectorId:GetEventPrediction' :: GetEventPrediction -> Text
$sel:externalModelEndpointDataBlobs:GetEventPrediction' :: GetEventPrediction
-> Maybe (Sensitive (HashMap Text ModelEndpointDataBlob))
$sel:detectorVersionId:GetEventPrediction' :: GetEventPrediction -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
detectorVersionId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (Sensitive (HashMap Text ModelEndpointDataBlob))
externalModelEndpointDataBlobs
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
detectorId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
eventId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
eventTypeName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` [Sensitive Entity]
entities
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
eventTimestamp
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` HashMap Text (Sensitive Text)
eventVariables
instance Prelude.NFData GetEventPrediction where
rnf :: GetEventPrediction -> ()
rnf GetEventPrediction' {[Sensitive Entity]
Maybe Text
Maybe (Sensitive (HashMap Text ModelEndpointDataBlob))
Text
HashMap Text (Sensitive Text)
eventVariables :: HashMap Text (Sensitive Text)
eventTimestamp :: Text
entities :: [Sensitive Entity]
eventTypeName :: Text
eventId :: Text
detectorId :: Text
externalModelEndpointDataBlobs :: Maybe (Sensitive (HashMap Text ModelEndpointDataBlob))
detectorVersionId :: Maybe Text
$sel:eventVariables:GetEventPrediction' :: GetEventPrediction -> HashMap Text (Sensitive Text)
$sel:eventTimestamp:GetEventPrediction' :: GetEventPrediction -> Text
$sel:entities:GetEventPrediction' :: GetEventPrediction -> [Sensitive Entity]
$sel:eventTypeName:GetEventPrediction' :: GetEventPrediction -> Text
$sel:eventId:GetEventPrediction' :: GetEventPrediction -> Text
$sel:detectorId:GetEventPrediction' :: GetEventPrediction -> Text
$sel:externalModelEndpointDataBlobs:GetEventPrediction' :: GetEventPrediction
-> Maybe (Sensitive (HashMap Text ModelEndpointDataBlob))
$sel:detectorVersionId:GetEventPrediction' :: GetEventPrediction -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
detectorVersionId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (Sensitive (HashMap Text ModelEndpointDataBlob))
externalModelEndpointDataBlobs
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
detectorId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
eventId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
eventTypeName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf [Sensitive Entity]
entities
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
eventTimestamp
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf HashMap Text (Sensitive Text)
eventVariables
instance Data.ToHeaders GetEventPrediction where
toHeaders :: GetEventPrediction -> ResponseHeaders
toHeaders =
forall a b. a -> b -> a
Prelude.const
( forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"AWSHawksNestServiceFacade.GetEventPrediction" ::
Prelude.ByteString
),
HeaderName
"Content-Type"
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Data.ToJSON GetEventPrediction where
toJSON :: GetEventPrediction -> Value
toJSON GetEventPrediction' {[Sensitive Entity]
Maybe Text
Maybe (Sensitive (HashMap Text ModelEndpointDataBlob))
Text
HashMap Text (Sensitive Text)
eventVariables :: HashMap Text (Sensitive Text)
eventTimestamp :: Text
entities :: [Sensitive Entity]
eventTypeName :: Text
eventId :: Text
detectorId :: Text
externalModelEndpointDataBlobs :: Maybe (Sensitive (HashMap Text ModelEndpointDataBlob))
detectorVersionId :: Maybe Text
$sel:eventVariables:GetEventPrediction' :: GetEventPrediction -> HashMap Text (Sensitive Text)
$sel:eventTimestamp:GetEventPrediction' :: GetEventPrediction -> Text
$sel:entities:GetEventPrediction' :: GetEventPrediction -> [Sensitive Entity]
$sel:eventTypeName:GetEventPrediction' :: GetEventPrediction -> Text
$sel:eventId:GetEventPrediction' :: GetEventPrediction -> Text
$sel:detectorId:GetEventPrediction' :: GetEventPrediction -> Text
$sel:externalModelEndpointDataBlobs:GetEventPrediction' :: GetEventPrediction
-> Maybe (Sensitive (HashMap Text ModelEndpointDataBlob))
$sel:detectorVersionId:GetEventPrediction' :: GetEventPrediction -> Maybe Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"detectorVersionId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
detectorVersionId,
(Key
"externalModelEndpointDataBlobs" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Sensitive (HashMap Text ModelEndpointDataBlob))
externalModelEndpointDataBlobs,
forall a. a -> Maybe a
Prelude.Just (Key
"detectorId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
detectorId),
forall a. a -> Maybe a
Prelude.Just (Key
"eventId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
eventId),
forall a. a -> Maybe a
Prelude.Just (Key
"eventTypeName" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
eventTypeName),
forall a. a -> Maybe a
Prelude.Just (Key
"entities" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= [Sensitive Entity]
entities),
forall a. a -> Maybe a
Prelude.Just
(Key
"eventTimestamp" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
eventTimestamp),
forall a. a -> Maybe a
Prelude.Just
(Key
"eventVariables" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= HashMap Text (Sensitive Text)
eventVariables)
]
)
instance Data.ToPath GetEventPrediction where
toPath :: GetEventPrediction -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Data.ToQuery GetEventPrediction where
toQuery :: GetEventPrediction -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data GetEventPredictionResponse = GetEventPredictionResponse'
{
GetEventPredictionResponse -> Maybe [ExternalModelOutputs]
externalModelOutputs :: Prelude.Maybe [ExternalModelOutputs],
GetEventPredictionResponse -> Maybe [ModelScores]
modelScores :: Prelude.Maybe [ModelScores],
GetEventPredictionResponse -> Maybe [RuleResult]
ruleResults :: Prelude.Maybe [RuleResult],
GetEventPredictionResponse -> Int
httpStatus :: Prelude.Int
}
deriving (GetEventPredictionResponse -> GetEventPredictionResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetEventPredictionResponse -> GetEventPredictionResponse -> Bool
$c/= :: GetEventPredictionResponse -> GetEventPredictionResponse -> Bool
== :: GetEventPredictionResponse -> GetEventPredictionResponse -> Bool
$c== :: GetEventPredictionResponse -> GetEventPredictionResponse -> Bool
Prelude.Eq, ReadPrec [GetEventPredictionResponse]
ReadPrec GetEventPredictionResponse
Int -> ReadS GetEventPredictionResponse
ReadS [GetEventPredictionResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetEventPredictionResponse]
$creadListPrec :: ReadPrec [GetEventPredictionResponse]
readPrec :: ReadPrec GetEventPredictionResponse
$creadPrec :: ReadPrec GetEventPredictionResponse
readList :: ReadS [GetEventPredictionResponse]
$creadList :: ReadS [GetEventPredictionResponse]
readsPrec :: Int -> ReadS GetEventPredictionResponse
$creadsPrec :: Int -> ReadS GetEventPredictionResponse
Prelude.Read, Int -> GetEventPredictionResponse -> ShowS
[GetEventPredictionResponse] -> ShowS
GetEventPredictionResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetEventPredictionResponse] -> ShowS
$cshowList :: [GetEventPredictionResponse] -> ShowS
show :: GetEventPredictionResponse -> String
$cshow :: GetEventPredictionResponse -> String
showsPrec :: Int -> GetEventPredictionResponse -> ShowS
$cshowsPrec :: Int -> GetEventPredictionResponse -> ShowS
Prelude.Show, forall x.
Rep GetEventPredictionResponse x -> GetEventPredictionResponse
forall x.
GetEventPredictionResponse -> Rep GetEventPredictionResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetEventPredictionResponse x -> GetEventPredictionResponse
$cfrom :: forall x.
GetEventPredictionResponse -> Rep GetEventPredictionResponse x
Prelude.Generic)
newGetEventPredictionResponse ::
Prelude.Int ->
GetEventPredictionResponse
newGetEventPredictionResponse :: Int -> GetEventPredictionResponse
newGetEventPredictionResponse Int
pHttpStatus_ =
GetEventPredictionResponse'
{ $sel:externalModelOutputs:GetEventPredictionResponse' :: Maybe [ExternalModelOutputs]
externalModelOutputs =
forall a. Maybe a
Prelude.Nothing,
$sel:modelScores:GetEventPredictionResponse' :: Maybe [ModelScores]
modelScores = forall a. Maybe a
Prelude.Nothing,
$sel:ruleResults:GetEventPredictionResponse' :: Maybe [RuleResult]
ruleResults = forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:GetEventPredictionResponse' :: Int
httpStatus = Int
pHttpStatus_
}
getEventPredictionResponse_externalModelOutputs :: Lens.Lens' GetEventPredictionResponse (Prelude.Maybe [ExternalModelOutputs])
getEventPredictionResponse_externalModelOutputs :: Lens' GetEventPredictionResponse (Maybe [ExternalModelOutputs])
getEventPredictionResponse_externalModelOutputs = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetEventPredictionResponse' {Maybe [ExternalModelOutputs]
externalModelOutputs :: Maybe [ExternalModelOutputs]
$sel:externalModelOutputs:GetEventPredictionResponse' :: GetEventPredictionResponse -> Maybe [ExternalModelOutputs]
externalModelOutputs} -> Maybe [ExternalModelOutputs]
externalModelOutputs) (\s :: GetEventPredictionResponse
s@GetEventPredictionResponse' {} Maybe [ExternalModelOutputs]
a -> GetEventPredictionResponse
s {$sel:externalModelOutputs:GetEventPredictionResponse' :: Maybe [ExternalModelOutputs]
externalModelOutputs = Maybe [ExternalModelOutputs]
a} :: GetEventPredictionResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
getEventPredictionResponse_modelScores :: Lens.Lens' GetEventPredictionResponse (Prelude.Maybe [ModelScores])
getEventPredictionResponse_modelScores :: Lens' GetEventPredictionResponse (Maybe [ModelScores])
getEventPredictionResponse_modelScores = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetEventPredictionResponse' {Maybe [ModelScores]
modelScores :: Maybe [ModelScores]
$sel:modelScores:GetEventPredictionResponse' :: GetEventPredictionResponse -> Maybe [ModelScores]
modelScores} -> Maybe [ModelScores]
modelScores) (\s :: GetEventPredictionResponse
s@GetEventPredictionResponse' {} Maybe [ModelScores]
a -> GetEventPredictionResponse
s {$sel:modelScores:GetEventPredictionResponse' :: Maybe [ModelScores]
modelScores = Maybe [ModelScores]
a} :: GetEventPredictionResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
getEventPredictionResponse_ruleResults :: Lens.Lens' GetEventPredictionResponse (Prelude.Maybe [RuleResult])
getEventPredictionResponse_ruleResults :: Lens' GetEventPredictionResponse (Maybe [RuleResult])
getEventPredictionResponse_ruleResults = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetEventPredictionResponse' {Maybe [RuleResult]
ruleResults :: Maybe [RuleResult]
$sel:ruleResults:GetEventPredictionResponse' :: GetEventPredictionResponse -> Maybe [RuleResult]
ruleResults} -> Maybe [RuleResult]
ruleResults) (\s :: GetEventPredictionResponse
s@GetEventPredictionResponse' {} Maybe [RuleResult]
a -> GetEventPredictionResponse
s {$sel:ruleResults:GetEventPredictionResponse' :: Maybe [RuleResult]
ruleResults = Maybe [RuleResult]
a} :: GetEventPredictionResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
getEventPredictionResponse_httpStatus :: Lens.Lens' GetEventPredictionResponse Prelude.Int
getEventPredictionResponse_httpStatus :: Lens' GetEventPredictionResponse Int
getEventPredictionResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetEventPredictionResponse' {Int
httpStatus :: Int
$sel:httpStatus:GetEventPredictionResponse' :: GetEventPredictionResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: GetEventPredictionResponse
s@GetEventPredictionResponse' {} Int
a -> GetEventPredictionResponse
s {$sel:httpStatus:GetEventPredictionResponse' :: Int
httpStatus = Int
a} :: GetEventPredictionResponse)
instance Prelude.NFData GetEventPredictionResponse where
rnf :: GetEventPredictionResponse -> ()
rnf GetEventPredictionResponse' {Int
Maybe [ExternalModelOutputs]
Maybe [ModelScores]
Maybe [RuleResult]
httpStatus :: Int
ruleResults :: Maybe [RuleResult]
modelScores :: Maybe [ModelScores]
externalModelOutputs :: Maybe [ExternalModelOutputs]
$sel:httpStatus:GetEventPredictionResponse' :: GetEventPredictionResponse -> Int
$sel:ruleResults:GetEventPredictionResponse' :: GetEventPredictionResponse -> Maybe [RuleResult]
$sel:modelScores:GetEventPredictionResponse' :: GetEventPredictionResponse -> Maybe [ModelScores]
$sel:externalModelOutputs:GetEventPredictionResponse' :: GetEventPredictionResponse -> Maybe [ExternalModelOutputs]
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe [ExternalModelOutputs]
externalModelOutputs
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [ModelScores]
modelScores
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [RuleResult]
ruleResults
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus