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