{-# 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.FindMatchesParameters where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data FindMatchesParameters = FindMatchesParameters'
{
FindMatchesParameters -> Maybe Bool
enforceProvidedLabels :: Prelude.Maybe Prelude.Bool,
FindMatchesParameters -> Maybe Double
accuracyCostTradeoff :: Prelude.Maybe Prelude.Double,
FindMatchesParameters -> Maybe Double
precisionRecallTradeoff :: Prelude.Maybe Prelude.Double,
FindMatchesParameters -> Maybe Text
primaryKeyColumnName :: Prelude.Maybe Prelude.Text
}
deriving (FindMatchesParameters -> FindMatchesParameters -> Bool
(FindMatchesParameters -> FindMatchesParameters -> Bool)
-> (FindMatchesParameters -> FindMatchesParameters -> Bool)
-> Eq FindMatchesParameters
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: FindMatchesParameters -> FindMatchesParameters -> Bool
$c/= :: FindMatchesParameters -> FindMatchesParameters -> Bool
== :: FindMatchesParameters -> FindMatchesParameters -> Bool
$c== :: FindMatchesParameters -> FindMatchesParameters -> Bool
Prelude.Eq, ReadPrec [FindMatchesParameters]
ReadPrec FindMatchesParameters
Int -> ReadS FindMatchesParameters
ReadS [FindMatchesParameters]
(Int -> ReadS FindMatchesParameters)
-> ReadS [FindMatchesParameters]
-> ReadPrec FindMatchesParameters
-> ReadPrec [FindMatchesParameters]
-> Read FindMatchesParameters
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [FindMatchesParameters]
$creadListPrec :: ReadPrec [FindMatchesParameters]
readPrec :: ReadPrec FindMatchesParameters
$creadPrec :: ReadPrec FindMatchesParameters
readList :: ReadS [FindMatchesParameters]
$creadList :: ReadS [FindMatchesParameters]
readsPrec :: Int -> ReadS FindMatchesParameters
$creadsPrec :: Int -> ReadS FindMatchesParameters
Prelude.Read, Int -> FindMatchesParameters -> ShowS
[FindMatchesParameters] -> ShowS
FindMatchesParameters -> String
(Int -> FindMatchesParameters -> ShowS)
-> (FindMatchesParameters -> String)
-> ([FindMatchesParameters] -> ShowS)
-> Show FindMatchesParameters
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [FindMatchesParameters] -> ShowS
$cshowList :: [FindMatchesParameters] -> ShowS
show :: FindMatchesParameters -> String
$cshow :: FindMatchesParameters -> String
showsPrec :: Int -> FindMatchesParameters -> ShowS
$cshowsPrec :: Int -> FindMatchesParameters -> ShowS
Prelude.Show, (forall x. FindMatchesParameters -> Rep FindMatchesParameters x)
-> (forall x. Rep FindMatchesParameters x -> FindMatchesParameters)
-> Generic FindMatchesParameters
forall x. Rep FindMatchesParameters x -> FindMatchesParameters
forall x. FindMatchesParameters -> Rep FindMatchesParameters x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep FindMatchesParameters x -> FindMatchesParameters
$cfrom :: forall x. FindMatchesParameters -> Rep FindMatchesParameters x
Prelude.Generic)
newFindMatchesParameters ::
FindMatchesParameters
newFindMatchesParameters :: FindMatchesParameters
newFindMatchesParameters =
FindMatchesParameters' :: Maybe Bool
-> Maybe Double
-> Maybe Double
-> Maybe Text
-> FindMatchesParameters
FindMatchesParameters'
{ $sel:enforceProvidedLabels:FindMatchesParameters' :: Maybe Bool
enforceProvidedLabels =
Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:accuracyCostTradeoff:FindMatchesParameters' :: Maybe Double
accuracyCostTradeoff = Maybe Double
forall a. Maybe a
Prelude.Nothing,
$sel:precisionRecallTradeoff:FindMatchesParameters' :: Maybe Double
precisionRecallTradeoff = Maybe Double
forall a. Maybe a
Prelude.Nothing,
$sel:primaryKeyColumnName:FindMatchesParameters' :: Maybe Text
primaryKeyColumnName = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
findMatchesParameters_enforceProvidedLabels :: Lens.Lens' FindMatchesParameters (Prelude.Maybe Prelude.Bool)
findMatchesParameters_enforceProvidedLabels :: (Maybe Bool -> f (Maybe Bool))
-> FindMatchesParameters -> f FindMatchesParameters
findMatchesParameters_enforceProvidedLabels = (FindMatchesParameters -> Maybe Bool)
-> (FindMatchesParameters -> Maybe Bool -> FindMatchesParameters)
-> Lens
FindMatchesParameters
FindMatchesParameters
(Maybe Bool)
(Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FindMatchesParameters' {Maybe Bool
enforceProvidedLabels :: Maybe Bool
$sel:enforceProvidedLabels:FindMatchesParameters' :: FindMatchesParameters -> Maybe Bool
enforceProvidedLabels} -> Maybe Bool
enforceProvidedLabels) (\s :: FindMatchesParameters
s@FindMatchesParameters' {} Maybe Bool
a -> FindMatchesParameters
s {$sel:enforceProvidedLabels:FindMatchesParameters' :: Maybe Bool
enforceProvidedLabels = Maybe Bool
a} :: FindMatchesParameters)
findMatchesParameters_accuracyCostTradeoff :: Lens.Lens' FindMatchesParameters (Prelude.Maybe Prelude.Double)
findMatchesParameters_accuracyCostTradeoff :: (Maybe Double -> f (Maybe Double))
-> FindMatchesParameters -> f FindMatchesParameters
findMatchesParameters_accuracyCostTradeoff = (FindMatchesParameters -> Maybe Double)
-> (FindMatchesParameters -> Maybe Double -> FindMatchesParameters)
-> Lens
FindMatchesParameters
FindMatchesParameters
(Maybe Double)
(Maybe Double)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FindMatchesParameters' {Maybe Double
accuracyCostTradeoff :: Maybe Double
$sel:accuracyCostTradeoff:FindMatchesParameters' :: FindMatchesParameters -> Maybe Double
accuracyCostTradeoff} -> Maybe Double
accuracyCostTradeoff) (\s :: FindMatchesParameters
s@FindMatchesParameters' {} Maybe Double
a -> FindMatchesParameters
s {$sel:accuracyCostTradeoff:FindMatchesParameters' :: Maybe Double
accuracyCostTradeoff = Maybe Double
a} :: FindMatchesParameters)
findMatchesParameters_precisionRecallTradeoff :: Lens.Lens' FindMatchesParameters (Prelude.Maybe Prelude.Double)
findMatchesParameters_precisionRecallTradeoff :: (Maybe Double -> f (Maybe Double))
-> FindMatchesParameters -> f FindMatchesParameters
findMatchesParameters_precisionRecallTradeoff = (FindMatchesParameters -> Maybe Double)
-> (FindMatchesParameters -> Maybe Double -> FindMatchesParameters)
-> Lens
FindMatchesParameters
FindMatchesParameters
(Maybe Double)
(Maybe Double)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FindMatchesParameters' {Maybe Double
precisionRecallTradeoff :: Maybe Double
$sel:precisionRecallTradeoff:FindMatchesParameters' :: FindMatchesParameters -> Maybe Double
precisionRecallTradeoff} -> Maybe Double
precisionRecallTradeoff) (\s :: FindMatchesParameters
s@FindMatchesParameters' {} Maybe Double
a -> FindMatchesParameters
s {$sel:precisionRecallTradeoff:FindMatchesParameters' :: Maybe Double
precisionRecallTradeoff = Maybe Double
a} :: FindMatchesParameters)
findMatchesParameters_primaryKeyColumnName :: Lens.Lens' FindMatchesParameters (Prelude.Maybe Prelude.Text)
findMatchesParameters_primaryKeyColumnName :: (Maybe Text -> f (Maybe Text))
-> FindMatchesParameters -> f FindMatchesParameters
findMatchesParameters_primaryKeyColumnName = (FindMatchesParameters -> Maybe Text)
-> (FindMatchesParameters -> Maybe Text -> FindMatchesParameters)
-> Lens
FindMatchesParameters
FindMatchesParameters
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FindMatchesParameters' {Maybe Text
primaryKeyColumnName :: Maybe Text
$sel:primaryKeyColumnName:FindMatchesParameters' :: FindMatchesParameters -> Maybe Text
primaryKeyColumnName} -> Maybe Text
primaryKeyColumnName) (\s :: FindMatchesParameters
s@FindMatchesParameters' {} Maybe Text
a -> FindMatchesParameters
s {$sel:primaryKeyColumnName:FindMatchesParameters' :: Maybe Text
primaryKeyColumnName = Maybe Text
a} :: FindMatchesParameters)
instance Core.FromJSON FindMatchesParameters where
parseJSON :: Value -> Parser FindMatchesParameters
parseJSON =
String
-> (Object -> Parser FindMatchesParameters)
-> Value
-> Parser FindMatchesParameters
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"FindMatchesParameters"
( \Object
x ->
Maybe Bool
-> Maybe Double
-> Maybe Double
-> Maybe Text
-> FindMatchesParameters
FindMatchesParameters'
(Maybe Bool
-> Maybe Double
-> Maybe Double
-> Maybe Text
-> FindMatchesParameters)
-> Parser (Maybe Bool)
-> Parser
(Maybe Double
-> Maybe Double -> Maybe Text -> FindMatchesParameters)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"EnforceProvidedLabels")
Parser
(Maybe Double
-> Maybe Double -> Maybe Text -> FindMatchesParameters)
-> Parser (Maybe Double)
-> Parser (Maybe Double -> Maybe Text -> FindMatchesParameters)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Double)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"AccuracyCostTradeoff")
Parser (Maybe Double -> Maybe Text -> FindMatchesParameters)
-> Parser (Maybe Double)
-> Parser (Maybe Text -> FindMatchesParameters)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Double)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"PrecisionRecallTradeoff")
Parser (Maybe Text -> FindMatchesParameters)
-> Parser (Maybe Text) -> Parser FindMatchesParameters
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
"PrimaryKeyColumnName")
)
instance Prelude.Hashable FindMatchesParameters
instance Prelude.NFData FindMatchesParameters
instance Core.ToJSON FindMatchesParameters where
toJSON :: FindMatchesParameters -> Value
toJSON FindMatchesParameters' {Maybe Bool
Maybe Double
Maybe Text
primaryKeyColumnName :: Maybe Text
precisionRecallTradeoff :: Maybe Double
accuracyCostTradeoff :: Maybe Double
enforceProvidedLabels :: Maybe Bool
$sel:primaryKeyColumnName:FindMatchesParameters' :: FindMatchesParameters -> Maybe Text
$sel:precisionRecallTradeoff:FindMatchesParameters' :: FindMatchesParameters -> Maybe Double
$sel:accuracyCostTradeoff:FindMatchesParameters' :: FindMatchesParameters -> Maybe Double
$sel:enforceProvidedLabels:FindMatchesParameters' :: FindMatchesParameters -> Maybe Bool
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"EnforceProvidedLabels" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
enforceProvidedLabels,
(Text
"AccuracyCostTradeoff" Text -> Double -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Double -> Pair) -> Maybe Double -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Double
accuracyCostTradeoff,
(Text
"PrecisionRecallTradeoff" Text -> Double -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Double -> Pair) -> Maybe Double -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Double
precisionRecallTradeoff,
(Text
"PrimaryKeyColumnName" 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
primaryKeyColumnName
]
)