{-# 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.FraudDetector.Types.ExternalModelOutputs where
import qualified Amazonka.Core as Core
import Amazonka.FraudDetector.Types.ExternalModelSummary
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data ExternalModelOutputs = ExternalModelOutputs'
{
ExternalModelOutputs -> Maybe ExternalModelSummary
externalModel :: Prelude.Maybe ExternalModelSummary,
ExternalModelOutputs -> Maybe (HashMap Text Text)
outputs :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text)
}
deriving (ExternalModelOutputs -> ExternalModelOutputs -> Bool
(ExternalModelOutputs -> ExternalModelOutputs -> Bool)
-> (ExternalModelOutputs -> ExternalModelOutputs -> Bool)
-> Eq ExternalModelOutputs
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ExternalModelOutputs -> ExternalModelOutputs -> Bool
$c/= :: ExternalModelOutputs -> ExternalModelOutputs -> Bool
== :: ExternalModelOutputs -> ExternalModelOutputs -> Bool
$c== :: ExternalModelOutputs -> ExternalModelOutputs -> Bool
Prelude.Eq, ReadPrec [ExternalModelOutputs]
ReadPrec ExternalModelOutputs
Int -> ReadS ExternalModelOutputs
ReadS [ExternalModelOutputs]
(Int -> ReadS ExternalModelOutputs)
-> ReadS [ExternalModelOutputs]
-> ReadPrec ExternalModelOutputs
-> ReadPrec [ExternalModelOutputs]
-> Read ExternalModelOutputs
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ExternalModelOutputs]
$creadListPrec :: ReadPrec [ExternalModelOutputs]
readPrec :: ReadPrec ExternalModelOutputs
$creadPrec :: ReadPrec ExternalModelOutputs
readList :: ReadS [ExternalModelOutputs]
$creadList :: ReadS [ExternalModelOutputs]
readsPrec :: Int -> ReadS ExternalModelOutputs
$creadsPrec :: Int -> ReadS ExternalModelOutputs
Prelude.Read, Int -> ExternalModelOutputs -> ShowS
[ExternalModelOutputs] -> ShowS
ExternalModelOutputs -> String
(Int -> ExternalModelOutputs -> ShowS)
-> (ExternalModelOutputs -> String)
-> ([ExternalModelOutputs] -> ShowS)
-> Show ExternalModelOutputs
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ExternalModelOutputs] -> ShowS
$cshowList :: [ExternalModelOutputs] -> ShowS
show :: ExternalModelOutputs -> String
$cshow :: ExternalModelOutputs -> String
showsPrec :: Int -> ExternalModelOutputs -> ShowS
$cshowsPrec :: Int -> ExternalModelOutputs -> ShowS
Prelude.Show, (forall x. ExternalModelOutputs -> Rep ExternalModelOutputs x)
-> (forall x. Rep ExternalModelOutputs x -> ExternalModelOutputs)
-> Generic ExternalModelOutputs
forall x. Rep ExternalModelOutputs x -> ExternalModelOutputs
forall x. ExternalModelOutputs -> Rep ExternalModelOutputs x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ExternalModelOutputs x -> ExternalModelOutputs
$cfrom :: forall x. ExternalModelOutputs -> Rep ExternalModelOutputs x
Prelude.Generic)
newExternalModelOutputs ::
ExternalModelOutputs
newExternalModelOutputs :: ExternalModelOutputs
newExternalModelOutputs =
ExternalModelOutputs' :: Maybe ExternalModelSummary
-> Maybe (HashMap Text Text) -> ExternalModelOutputs
ExternalModelOutputs'
{ $sel:externalModel:ExternalModelOutputs' :: Maybe ExternalModelSummary
externalModel =
Maybe ExternalModelSummary
forall a. Maybe a
Prelude.Nothing,
$sel:outputs:ExternalModelOutputs' :: Maybe (HashMap Text Text)
outputs = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing
}
externalModelOutputs_externalModel :: Lens.Lens' ExternalModelOutputs (Prelude.Maybe ExternalModelSummary)
externalModelOutputs_externalModel :: (Maybe ExternalModelSummary -> f (Maybe ExternalModelSummary))
-> ExternalModelOutputs -> f ExternalModelOutputs
externalModelOutputs_externalModel = (ExternalModelOutputs -> Maybe ExternalModelSummary)
-> (ExternalModelOutputs
-> Maybe ExternalModelSummary -> ExternalModelOutputs)
-> Lens
ExternalModelOutputs
ExternalModelOutputs
(Maybe ExternalModelSummary)
(Maybe ExternalModelSummary)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExternalModelOutputs' {Maybe ExternalModelSummary
externalModel :: Maybe ExternalModelSummary
$sel:externalModel:ExternalModelOutputs' :: ExternalModelOutputs -> Maybe ExternalModelSummary
externalModel} -> Maybe ExternalModelSummary
externalModel) (\s :: ExternalModelOutputs
s@ExternalModelOutputs' {} Maybe ExternalModelSummary
a -> ExternalModelOutputs
s {$sel:externalModel:ExternalModelOutputs' :: Maybe ExternalModelSummary
externalModel = Maybe ExternalModelSummary
a} :: ExternalModelOutputs)
externalModelOutputs_outputs :: Lens.Lens' ExternalModelOutputs (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
externalModelOutputs_outputs :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> ExternalModelOutputs -> f ExternalModelOutputs
externalModelOutputs_outputs = (ExternalModelOutputs -> Maybe (HashMap Text Text))
-> (ExternalModelOutputs
-> Maybe (HashMap Text Text) -> ExternalModelOutputs)
-> Lens
ExternalModelOutputs
ExternalModelOutputs
(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 (\ExternalModelOutputs' {Maybe (HashMap Text Text)
outputs :: Maybe (HashMap Text Text)
$sel:outputs:ExternalModelOutputs' :: ExternalModelOutputs -> Maybe (HashMap Text Text)
outputs} -> Maybe (HashMap Text Text)
outputs) (\s :: ExternalModelOutputs
s@ExternalModelOutputs' {} Maybe (HashMap Text Text)
a -> ExternalModelOutputs
s {$sel:outputs:ExternalModelOutputs' :: Maybe (HashMap Text Text)
outputs = Maybe (HashMap Text Text)
a} :: ExternalModelOutputs) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> ExternalModelOutputs -> f ExternalModelOutputs)
-> ((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)))
-> ExternalModelOutputs
-> f ExternalModelOutputs
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
instance Core.FromJSON ExternalModelOutputs where
parseJSON :: Value -> Parser ExternalModelOutputs
parseJSON =
String
-> (Object -> Parser ExternalModelOutputs)
-> Value
-> Parser ExternalModelOutputs
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ExternalModelOutputs"
( \Object
x ->
Maybe ExternalModelSummary
-> Maybe (HashMap Text Text) -> ExternalModelOutputs
ExternalModelOutputs'
(Maybe ExternalModelSummary
-> Maybe (HashMap Text Text) -> ExternalModelOutputs)
-> Parser (Maybe ExternalModelSummary)
-> Parser (Maybe (HashMap Text Text) -> ExternalModelOutputs)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe ExternalModelSummary)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"externalModel")
Parser (Maybe (HashMap Text Text) -> ExternalModelOutputs)
-> Parser (Maybe (HashMap Text Text))
-> Parser ExternalModelOutputs
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
"outputs" 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)
)
instance Prelude.Hashable ExternalModelOutputs
instance Prelude.NFData ExternalModelOutputs