{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.Glue.Types.PIIDetection
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.Glue.Types.PIIDetection where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.Glue.Types.PiiType
import qualified Amazonka.Prelude as Prelude

-- | Specifies a transform that identifies, removes or masks PII data.
--
-- /See:/ 'newPIIDetection' smart constructor.
data PIIDetection = PIIDetection'
  { -- | Indicates the value that will replace the detected entity.
    PIIDetection -> Maybe Text
maskValue :: Prelude.Maybe Prelude.Text,
    -- | Indicates the output column name that will contain any entity type
    -- detected in that row.
    PIIDetection -> Maybe Text
outputColumnName :: Prelude.Maybe Prelude.Text,
    -- | Indicates the fraction of the data to sample when scanning for PII
    -- entities.
    PIIDetection -> Maybe Double
sampleFraction :: Prelude.Maybe Prelude.Double,
    -- | Indicates the fraction of the data that must be met in order for a
    -- column to be identified as PII data.
    PIIDetection -> Maybe Double
thresholdFraction :: Prelude.Maybe Prelude.Double,
    -- | The name of the transform node.
    PIIDetection -> Text
name :: Prelude.Text,
    -- | The node ID inputs to the transform.
    PIIDetection -> NonEmpty Text
inputs :: Prelude.NonEmpty Prelude.Text,
    -- | Indicates the type of PIIDetection transform.
    PIIDetection -> PiiType
piiType :: PiiType,
    -- | Indicates the types of entities the PIIDetection transform will identify
    -- as PII data.
    --
    -- PII type entities include: PERSON_NAME, DATE, USA_SNN, EMAIL, USA_ITIN,
    -- USA_PASSPORT_NUMBER, PHONE_NUMBER, BANK_ACCOUNT, IP_ADDRESS,
    -- MAC_ADDRESS, USA_CPT_CODE, USA_HCPCS_CODE, USA_NATIONAL_DRUG_CODE,
    -- USA_MEDICARE_BENEFICIARY_IDENTIFIER,
    -- USA_HEALTH_INSURANCE_CLAIM_NUMBER,CREDIT_CARD,USA_NATIONAL_PROVIDER_IDENTIFIER,USA_DEA_NUMBER,USA_DRIVING_LICENSE
    PIIDetection -> [Text]
entityTypesToDetect :: [Prelude.Text]
  }
  deriving (PIIDetection -> PIIDetection -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PIIDetection -> PIIDetection -> Bool
$c/= :: PIIDetection -> PIIDetection -> Bool
== :: PIIDetection -> PIIDetection -> Bool
$c== :: PIIDetection -> PIIDetection -> Bool
Prelude.Eq, ReadPrec [PIIDetection]
ReadPrec PIIDetection
Int -> ReadS PIIDetection
ReadS [PIIDetection]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [PIIDetection]
$creadListPrec :: ReadPrec [PIIDetection]
readPrec :: ReadPrec PIIDetection
$creadPrec :: ReadPrec PIIDetection
readList :: ReadS [PIIDetection]
$creadList :: ReadS [PIIDetection]
readsPrec :: Int -> ReadS PIIDetection
$creadsPrec :: Int -> ReadS PIIDetection
Prelude.Read, Int -> PIIDetection -> ShowS
[PIIDetection] -> ShowS
PIIDetection -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PIIDetection] -> ShowS
$cshowList :: [PIIDetection] -> ShowS
show :: PIIDetection -> String
$cshow :: PIIDetection -> String
showsPrec :: Int -> PIIDetection -> ShowS
$cshowsPrec :: Int -> PIIDetection -> ShowS
Prelude.Show, forall x. Rep PIIDetection x -> PIIDetection
forall x. PIIDetection -> Rep PIIDetection x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep PIIDetection x -> PIIDetection
$cfrom :: forall x. PIIDetection -> Rep PIIDetection x
Prelude.Generic)

-- |
-- Create a value of 'PIIDetection' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'maskValue', 'pIIDetection_maskValue' - Indicates the value that will replace the detected entity.
--
-- 'outputColumnName', 'pIIDetection_outputColumnName' - Indicates the output column name that will contain any entity type
-- detected in that row.
--
-- 'sampleFraction', 'pIIDetection_sampleFraction' - Indicates the fraction of the data to sample when scanning for PII
-- entities.
--
-- 'thresholdFraction', 'pIIDetection_thresholdFraction' - Indicates the fraction of the data that must be met in order for a
-- column to be identified as PII data.
--
-- 'name', 'pIIDetection_name' - The name of the transform node.
--
-- 'inputs', 'pIIDetection_inputs' - The node ID inputs to the transform.
--
-- 'piiType', 'pIIDetection_piiType' - Indicates the type of PIIDetection transform.
--
-- 'entityTypesToDetect', 'pIIDetection_entityTypesToDetect' - Indicates the types of entities the PIIDetection transform will identify
-- as PII data.
--
-- PII type entities include: PERSON_NAME, DATE, USA_SNN, EMAIL, USA_ITIN,
-- USA_PASSPORT_NUMBER, PHONE_NUMBER, BANK_ACCOUNT, IP_ADDRESS,
-- MAC_ADDRESS, USA_CPT_CODE, USA_HCPCS_CODE, USA_NATIONAL_DRUG_CODE,
-- USA_MEDICARE_BENEFICIARY_IDENTIFIER,
-- USA_HEALTH_INSURANCE_CLAIM_NUMBER,CREDIT_CARD,USA_NATIONAL_PROVIDER_IDENTIFIER,USA_DEA_NUMBER,USA_DRIVING_LICENSE
newPIIDetection ::
  -- | 'name'
  Prelude.Text ->
  -- | 'inputs'
  Prelude.NonEmpty Prelude.Text ->
  -- | 'piiType'
  PiiType ->
  PIIDetection
newPIIDetection :: Text -> NonEmpty Text -> PiiType -> PIIDetection
newPIIDetection Text
pName_ NonEmpty Text
pInputs_ PiiType
pPiiType_ =
  PIIDetection'
    { $sel:maskValue:PIIDetection' :: Maybe Text
maskValue = forall a. Maybe a
Prelude.Nothing,
      $sel:outputColumnName:PIIDetection' :: Maybe Text
outputColumnName = forall a. Maybe a
Prelude.Nothing,
      $sel:sampleFraction:PIIDetection' :: Maybe Double
sampleFraction = forall a. Maybe a
Prelude.Nothing,
      $sel:thresholdFraction:PIIDetection' :: Maybe Double
thresholdFraction = forall a. Maybe a
Prelude.Nothing,
      $sel:name:PIIDetection' :: Text
name = Text
pName_,
      $sel:inputs:PIIDetection' :: NonEmpty Text
inputs = forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced forall t b. AReview t b -> b -> t
Lens.# NonEmpty Text
pInputs_,
      $sel:piiType:PIIDetection' :: PiiType
piiType = PiiType
pPiiType_,
      $sel:entityTypesToDetect:PIIDetection' :: [Text]
entityTypesToDetect = forall a. Monoid a => a
Prelude.mempty
    }

-- | Indicates the value that will replace the detected entity.
pIIDetection_maskValue :: Lens.Lens' PIIDetection (Prelude.Maybe Prelude.Text)
pIIDetection_maskValue :: Lens' PIIDetection (Maybe Text)
pIIDetection_maskValue = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PIIDetection' {Maybe Text
maskValue :: Maybe Text
$sel:maskValue:PIIDetection' :: PIIDetection -> Maybe Text
maskValue} -> Maybe Text
maskValue) (\s :: PIIDetection
s@PIIDetection' {} Maybe Text
a -> PIIDetection
s {$sel:maskValue:PIIDetection' :: Maybe Text
maskValue = Maybe Text
a} :: PIIDetection)

-- | Indicates the output column name that will contain any entity type
-- detected in that row.
pIIDetection_outputColumnName :: Lens.Lens' PIIDetection (Prelude.Maybe Prelude.Text)
pIIDetection_outputColumnName :: Lens' PIIDetection (Maybe Text)
pIIDetection_outputColumnName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PIIDetection' {Maybe Text
outputColumnName :: Maybe Text
$sel:outputColumnName:PIIDetection' :: PIIDetection -> Maybe Text
outputColumnName} -> Maybe Text
outputColumnName) (\s :: PIIDetection
s@PIIDetection' {} Maybe Text
a -> PIIDetection
s {$sel:outputColumnName:PIIDetection' :: Maybe Text
outputColumnName = Maybe Text
a} :: PIIDetection)

-- | Indicates the fraction of the data to sample when scanning for PII
-- entities.
pIIDetection_sampleFraction :: Lens.Lens' PIIDetection (Prelude.Maybe Prelude.Double)
pIIDetection_sampleFraction :: Lens' PIIDetection (Maybe Double)
pIIDetection_sampleFraction = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PIIDetection' {Maybe Double
sampleFraction :: Maybe Double
$sel:sampleFraction:PIIDetection' :: PIIDetection -> Maybe Double
sampleFraction} -> Maybe Double
sampleFraction) (\s :: PIIDetection
s@PIIDetection' {} Maybe Double
a -> PIIDetection
s {$sel:sampleFraction:PIIDetection' :: Maybe Double
sampleFraction = Maybe Double
a} :: PIIDetection)

-- | Indicates the fraction of the data that must be met in order for a
-- column to be identified as PII data.
pIIDetection_thresholdFraction :: Lens.Lens' PIIDetection (Prelude.Maybe Prelude.Double)
pIIDetection_thresholdFraction :: Lens' PIIDetection (Maybe Double)
pIIDetection_thresholdFraction = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PIIDetection' {Maybe Double
thresholdFraction :: Maybe Double
$sel:thresholdFraction:PIIDetection' :: PIIDetection -> Maybe Double
thresholdFraction} -> Maybe Double
thresholdFraction) (\s :: PIIDetection
s@PIIDetection' {} Maybe Double
a -> PIIDetection
s {$sel:thresholdFraction:PIIDetection' :: Maybe Double
thresholdFraction = Maybe Double
a} :: PIIDetection)

-- | The name of the transform node.
pIIDetection_name :: Lens.Lens' PIIDetection Prelude.Text
pIIDetection_name :: Lens' PIIDetection Text
pIIDetection_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PIIDetection' {Text
name :: Text
$sel:name:PIIDetection' :: PIIDetection -> Text
name} -> Text
name) (\s :: PIIDetection
s@PIIDetection' {} Text
a -> PIIDetection
s {$sel:name:PIIDetection' :: Text
name = Text
a} :: PIIDetection)

-- | The node ID inputs to the transform.
pIIDetection_inputs :: Lens.Lens' PIIDetection (Prelude.NonEmpty Prelude.Text)
pIIDetection_inputs :: Lens' PIIDetection (NonEmpty Text)
pIIDetection_inputs = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PIIDetection' {NonEmpty Text
inputs :: NonEmpty Text
$sel:inputs:PIIDetection' :: PIIDetection -> NonEmpty Text
inputs} -> NonEmpty Text
inputs) (\s :: PIIDetection
s@PIIDetection' {} NonEmpty Text
a -> PIIDetection
s {$sel:inputs:PIIDetection' :: NonEmpty Text
inputs = NonEmpty Text
a} :: PIIDetection) 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

-- | Indicates the type of PIIDetection transform.
pIIDetection_piiType :: Lens.Lens' PIIDetection PiiType
pIIDetection_piiType :: Lens' PIIDetection PiiType
pIIDetection_piiType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PIIDetection' {PiiType
piiType :: PiiType
$sel:piiType:PIIDetection' :: PIIDetection -> PiiType
piiType} -> PiiType
piiType) (\s :: PIIDetection
s@PIIDetection' {} PiiType
a -> PIIDetection
s {$sel:piiType:PIIDetection' :: PiiType
piiType = PiiType
a} :: PIIDetection)

-- | Indicates the types of entities the PIIDetection transform will identify
-- as PII data.
--
-- PII type entities include: PERSON_NAME, DATE, USA_SNN, EMAIL, USA_ITIN,
-- USA_PASSPORT_NUMBER, PHONE_NUMBER, BANK_ACCOUNT, IP_ADDRESS,
-- MAC_ADDRESS, USA_CPT_CODE, USA_HCPCS_CODE, USA_NATIONAL_DRUG_CODE,
-- USA_MEDICARE_BENEFICIARY_IDENTIFIER,
-- USA_HEALTH_INSURANCE_CLAIM_NUMBER,CREDIT_CARD,USA_NATIONAL_PROVIDER_IDENTIFIER,USA_DEA_NUMBER,USA_DRIVING_LICENSE
pIIDetection_entityTypesToDetect :: Lens.Lens' PIIDetection [Prelude.Text]
pIIDetection_entityTypesToDetect :: Lens' PIIDetection [Text]
pIIDetection_entityTypesToDetect = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PIIDetection' {[Text]
entityTypesToDetect :: [Text]
$sel:entityTypesToDetect:PIIDetection' :: PIIDetection -> [Text]
entityTypesToDetect} -> [Text]
entityTypesToDetect) (\s :: PIIDetection
s@PIIDetection' {} [Text]
a -> PIIDetection
s {$sel:entityTypesToDetect:PIIDetection' :: [Text]
entityTypesToDetect = [Text]
a} :: PIIDetection) 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 Data.FromJSON PIIDetection where
  parseJSON :: Value -> Parser PIIDetection
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"PIIDetection"
      ( \Object
x ->
          Maybe Text
-> Maybe Text
-> Maybe Double
-> Maybe Double
-> Text
-> NonEmpty Text
-> PiiType
-> [Text]
-> PIIDetection
PIIDetection'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"MaskValue")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"OutputColumnName")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"SampleFraction")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"ThresholdFraction")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"Name")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"Inputs")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"PiiType")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x
                            forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"EntityTypesToDetect"
                            forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty
                        )
      )

instance Prelude.Hashable PIIDetection where
  hashWithSalt :: Int -> PIIDetection -> Int
hashWithSalt Int
_salt PIIDetection' {[Text]
Maybe Double
Maybe Text
NonEmpty Text
Text
PiiType
entityTypesToDetect :: [Text]
piiType :: PiiType
inputs :: NonEmpty Text
name :: Text
thresholdFraction :: Maybe Double
sampleFraction :: Maybe Double
outputColumnName :: Maybe Text
maskValue :: Maybe Text
$sel:entityTypesToDetect:PIIDetection' :: PIIDetection -> [Text]
$sel:piiType:PIIDetection' :: PIIDetection -> PiiType
$sel:inputs:PIIDetection' :: PIIDetection -> NonEmpty Text
$sel:name:PIIDetection' :: PIIDetection -> Text
$sel:thresholdFraction:PIIDetection' :: PIIDetection -> Maybe Double
$sel:sampleFraction:PIIDetection' :: PIIDetection -> Maybe Double
$sel:outputColumnName:PIIDetection' :: PIIDetection -> Maybe Text
$sel:maskValue:PIIDetection' :: PIIDetection -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
maskValue
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
outputColumnName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Double
sampleFraction
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Double
thresholdFraction
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
name
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` NonEmpty Text
inputs
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` PiiType
piiType
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` [Text]
entityTypesToDetect

instance Prelude.NFData PIIDetection where
  rnf :: PIIDetection -> ()
rnf PIIDetection' {[Text]
Maybe Double
Maybe Text
NonEmpty Text
Text
PiiType
entityTypesToDetect :: [Text]
piiType :: PiiType
inputs :: NonEmpty Text
name :: Text
thresholdFraction :: Maybe Double
sampleFraction :: Maybe Double
outputColumnName :: Maybe Text
maskValue :: Maybe Text
$sel:entityTypesToDetect:PIIDetection' :: PIIDetection -> [Text]
$sel:piiType:PIIDetection' :: PIIDetection -> PiiType
$sel:inputs:PIIDetection' :: PIIDetection -> NonEmpty Text
$sel:name:PIIDetection' :: PIIDetection -> Text
$sel:thresholdFraction:PIIDetection' :: PIIDetection -> Maybe Double
$sel:sampleFraction:PIIDetection' :: PIIDetection -> Maybe Double
$sel:outputColumnName:PIIDetection' :: PIIDetection -> Maybe Text
$sel:maskValue:PIIDetection' :: PIIDetection -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
maskValue
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
outputColumnName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Double
sampleFraction
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Double
thresholdFraction
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
name
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf NonEmpty Text
inputs
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf PiiType
piiType
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf [Text]
entityTypesToDetect

instance Data.ToJSON PIIDetection where
  toJSON :: PIIDetection -> Value
toJSON PIIDetection' {[Text]
Maybe Double
Maybe Text
NonEmpty Text
Text
PiiType
entityTypesToDetect :: [Text]
piiType :: PiiType
inputs :: NonEmpty Text
name :: Text
thresholdFraction :: Maybe Double
sampleFraction :: Maybe Double
outputColumnName :: Maybe Text
maskValue :: Maybe Text
$sel:entityTypesToDetect:PIIDetection' :: PIIDetection -> [Text]
$sel:piiType:PIIDetection' :: PIIDetection -> PiiType
$sel:inputs:PIIDetection' :: PIIDetection -> NonEmpty Text
$sel:name:PIIDetection' :: PIIDetection -> Text
$sel:thresholdFraction:PIIDetection' :: PIIDetection -> Maybe Double
$sel:sampleFraction:PIIDetection' :: PIIDetection -> Maybe Double
$sel:outputColumnName:PIIDetection' :: PIIDetection -> Maybe Text
$sel:maskValue:PIIDetection' :: PIIDetection -> Maybe Text
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"MaskValue" 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
maskValue,
            (Key
"OutputColumnName" 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
outputColumnName,
            (Key
"SampleFraction" 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 Double
sampleFraction,
            (Key
"ThresholdFraction" 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 Double
thresholdFraction,
            forall a. a -> Maybe a
Prelude.Just (Key
"Name" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
name),
            forall a. a -> Maybe a
Prelude.Just (Key
"Inputs" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= NonEmpty Text
inputs),
            forall a. a -> Maybe a
Prelude.Just (Key
"PiiType" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= PiiType
piiType),
            forall a. a -> Maybe a
Prelude.Just
              (Key
"EntityTypesToDetect" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= [Text]
entityTypesToDetect)
          ]
      )