{-# 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.SageMaker.Types.ClarifyInferenceConfig
-- 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.SageMaker.Types.ClarifyInferenceConfig where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import Amazonka.SageMaker.Types.ClarifyFeatureType

-- | The inference configuration parameter for the model container.
--
-- /See:/ 'newClarifyInferenceConfig' smart constructor.
data ClarifyInferenceConfig = ClarifyInferenceConfig'
  { -- | A template string used to format a JSON record into an acceptable model
    -- container input. For example, a @ContentTemplate@ string
    -- @\'{\"myfeatures\":$features}\'@ will format a list of features
    -- @[1,2,3]@ into the record string @\'{\"myfeatures\":[1,2,3]}\'@.
    -- Required only when the model container input is in JSON Lines format.
    ClarifyInferenceConfig -> Maybe Text
contentTemplate :: Prelude.Maybe Prelude.Text,
    -- | The names of the features. If provided, these are included in the
    -- endpoint response payload to help readability of the @InvokeEndpoint@
    -- output. See the
    -- <https://docs.aws.amazon.com/sagemaker/latest/dg/clarify-online-explainability-invoke-endpoint.html#clarify-online-explainability-response Response>
    -- section under __Invoke the endpoint__ in the Developer Guide for more
    -- information.
    ClarifyInferenceConfig -> Maybe (NonEmpty Text)
featureHeaders :: Prelude.Maybe (Prelude.NonEmpty Prelude.Text),
    -- | A list of data types of the features (optional). Applicable only to NLP
    -- explainability. If provided, @FeatureTypes@ must have at least one
    -- @\'text\'@ string (for example, @[\'text\']@). If @FeatureTypes@ is not
    -- provided, the explainer infers the feature types based on the baseline
    -- data. The feature types are included in the endpoint response payload.
    -- For additional information see the
    -- <https://docs.aws.amazon.com/sagemaker/latest/dg/clarify-online-explainability-invoke-endpoint.html#clarify-online-explainability-response response>
    -- section under __Invoke the endpoint__ in the Developer Guide for more
    -- information.
    ClarifyInferenceConfig -> Maybe (NonEmpty ClarifyFeatureType)
featureTypes :: Prelude.Maybe (Prelude.NonEmpty ClarifyFeatureType),
    -- | Provides the JMESPath expression to extract the features from a model
    -- container input in JSON Lines format. For example, if
    -- @FeaturesAttribute@ is the JMESPath expression @\'myfeatures\'@, it
    -- extracts a list of features @[1,2,3]@ from request data
    -- @\'{\"myfeatures\":[1,2,3]}\'@.
    ClarifyInferenceConfig -> Maybe Text
featuresAttribute :: Prelude.Maybe Prelude.Text,
    -- | A JMESPath expression used to locate the list of label headers in the
    -- model container output.
    --
    -- __Example__: If the model container output of a batch request is
    -- @\'{\"labels\":[\"cat\",\"dog\",\"fish\"],\"probability\":[0.6,0.3,0.1]}\'@,
    -- then set @LabelAttribute@ to @\'labels\'@ to extract the list of label
    -- headers @[\"cat\",\"dog\",\"fish\"]@
    ClarifyInferenceConfig -> Maybe Text
labelAttribute :: Prelude.Maybe Prelude.Text,
    -- | For multiclass classification problems, the label headers are the names
    -- of the classes. Otherwise, the label header is the name of the predicted
    -- label. These are used to help readability for the output of the
    -- @InvokeEndpoint@ API. See the
    -- <https://docs.aws.amazon.com/sagemaker/latest/dg/clarify-online-explainability-invoke-endpoint.html#clarify-online-explainability-response response>
    -- section under __Invoke the endpoint__ in the Developer Guide for more
    -- information. If there are no label headers in the model container
    -- output, provide them manually using this parameter.
    ClarifyInferenceConfig -> Maybe (NonEmpty Text)
labelHeaders :: Prelude.Maybe (Prelude.NonEmpty Prelude.Text),
    -- | A zero-based index used to extract a label header or list of label
    -- headers from model container output in CSV format.
    --
    -- __Example for a multiclass model:__ If the model container output
    -- consists of label headers followed by probabilities:
    -- @\'\"[\\\'cat\\\',\\\'dog\\\',\\\'fish\\\']\",\"[0.1,0.6,0.3]\"\'@, set
    -- @LabelIndex@ to @0@ to select the label headers
    -- @[\'cat\',\'dog\',\'fish\']@.
    ClarifyInferenceConfig -> Maybe Natural
labelIndex :: Prelude.Maybe Prelude.Natural,
    -- | The maximum payload size (MB) allowed of a request from the explainer to
    -- the model container. Defaults to @6@ MB.
    ClarifyInferenceConfig -> Maybe Natural
maxPayloadInMB :: Prelude.Maybe Prelude.Natural,
    -- | The maximum number of records in a request that the model container can
    -- process when querying the model container for the predictions of a
    -- <https://docs.aws.amazon.com/sagemaker/latest/dg/clarify-online-explainability-create-endpoint.html#clarify-online-explainability-create-endpoint-synthetic synthetic dataset>.
    -- A record is a unit of input data that inference can be made on, for
    -- example, a single line in CSV data. If @MaxRecordCount@ is @1@, the
    -- model container expects one record per request. A value of 2 or greater
    -- means that the model expects batch requests, which can reduce overhead
    -- and speed up the inferencing process. If this parameter is not provided,
    -- the explainer will tune the record count per request according to the
    -- model container\'s capacity at runtime.
    ClarifyInferenceConfig -> Maybe Natural
maxRecordCount :: Prelude.Maybe Prelude.Natural,
    -- | A JMESPath expression used to extract the probability (or score) from
    -- the model container output if the model container is in JSON Lines
    -- format.
    --
    -- __Example__: If the model container output of a single request is
    -- @\'{\"predicted_label\":1,\"probability\":0.6}\'@, then set
    -- @ProbabilityAttribute@ to @\'probability\'@.
    ClarifyInferenceConfig -> Maybe Text
probabilityAttribute :: Prelude.Maybe Prelude.Text,
    -- | A zero-based index used to extract a probability value (score) or list
    -- from model container output in CSV format. If this value is not
    -- provided, the entire model container output will be treated as a
    -- probability value (score) or list.
    --
    -- __Example for a single class model:__ If the model container output
    -- consists of a string-formatted prediction label followed by its
    -- probability: @\'1,0.6\'@, set @ProbabilityIndex@ to @1@ to select the
    -- probability value @0.6@.
    --
    -- __Example for a multiclass model:__ If the model container output
    -- consists of a string-formatted prediction label followed by its
    -- probability:
    -- @\'\"[\\\'cat\\\',\\\'dog\\\',\\\'fish\\\']\",\"[0.1,0.6,0.3]\"\'@, set
    -- @ProbabilityIndex@ to @1@ to select the probability values
    -- @[0.1,0.6,0.3]@.
    ClarifyInferenceConfig -> Maybe Natural
probabilityIndex :: Prelude.Maybe Prelude.Natural
  }
  deriving (ClarifyInferenceConfig -> ClarifyInferenceConfig -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ClarifyInferenceConfig -> ClarifyInferenceConfig -> Bool
$c/= :: ClarifyInferenceConfig -> ClarifyInferenceConfig -> Bool
== :: ClarifyInferenceConfig -> ClarifyInferenceConfig -> Bool
$c== :: ClarifyInferenceConfig -> ClarifyInferenceConfig -> Bool
Prelude.Eq, ReadPrec [ClarifyInferenceConfig]
ReadPrec ClarifyInferenceConfig
Int -> ReadS ClarifyInferenceConfig
ReadS [ClarifyInferenceConfig]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ClarifyInferenceConfig]
$creadListPrec :: ReadPrec [ClarifyInferenceConfig]
readPrec :: ReadPrec ClarifyInferenceConfig
$creadPrec :: ReadPrec ClarifyInferenceConfig
readList :: ReadS [ClarifyInferenceConfig]
$creadList :: ReadS [ClarifyInferenceConfig]
readsPrec :: Int -> ReadS ClarifyInferenceConfig
$creadsPrec :: Int -> ReadS ClarifyInferenceConfig
Prelude.Read, Int -> ClarifyInferenceConfig -> ShowS
[ClarifyInferenceConfig] -> ShowS
ClarifyInferenceConfig -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ClarifyInferenceConfig] -> ShowS
$cshowList :: [ClarifyInferenceConfig] -> ShowS
show :: ClarifyInferenceConfig -> String
$cshow :: ClarifyInferenceConfig -> String
showsPrec :: Int -> ClarifyInferenceConfig -> ShowS
$cshowsPrec :: Int -> ClarifyInferenceConfig -> ShowS
Prelude.Show, forall x. Rep ClarifyInferenceConfig x -> ClarifyInferenceConfig
forall x. ClarifyInferenceConfig -> Rep ClarifyInferenceConfig x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ClarifyInferenceConfig x -> ClarifyInferenceConfig
$cfrom :: forall x. ClarifyInferenceConfig -> Rep ClarifyInferenceConfig x
Prelude.Generic)

-- |
-- Create a value of 'ClarifyInferenceConfig' 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:
--
-- 'contentTemplate', 'clarifyInferenceConfig_contentTemplate' - A template string used to format a JSON record into an acceptable model
-- container input. For example, a @ContentTemplate@ string
-- @\'{\"myfeatures\":$features}\'@ will format a list of features
-- @[1,2,3]@ into the record string @\'{\"myfeatures\":[1,2,3]}\'@.
-- Required only when the model container input is in JSON Lines format.
--
-- 'featureHeaders', 'clarifyInferenceConfig_featureHeaders' - The names of the features. If provided, these are included in the
-- endpoint response payload to help readability of the @InvokeEndpoint@
-- output. See the
-- <https://docs.aws.amazon.com/sagemaker/latest/dg/clarify-online-explainability-invoke-endpoint.html#clarify-online-explainability-response Response>
-- section under __Invoke the endpoint__ in the Developer Guide for more
-- information.
--
-- 'featureTypes', 'clarifyInferenceConfig_featureTypes' - A list of data types of the features (optional). Applicable only to NLP
-- explainability. If provided, @FeatureTypes@ must have at least one
-- @\'text\'@ string (for example, @[\'text\']@). If @FeatureTypes@ is not
-- provided, the explainer infers the feature types based on the baseline
-- data. The feature types are included in the endpoint response payload.
-- For additional information see the
-- <https://docs.aws.amazon.com/sagemaker/latest/dg/clarify-online-explainability-invoke-endpoint.html#clarify-online-explainability-response response>
-- section under __Invoke the endpoint__ in the Developer Guide for more
-- information.
--
-- 'featuresAttribute', 'clarifyInferenceConfig_featuresAttribute' - Provides the JMESPath expression to extract the features from a model
-- container input in JSON Lines format. For example, if
-- @FeaturesAttribute@ is the JMESPath expression @\'myfeatures\'@, it
-- extracts a list of features @[1,2,3]@ from request data
-- @\'{\"myfeatures\":[1,2,3]}\'@.
--
-- 'labelAttribute', 'clarifyInferenceConfig_labelAttribute' - A JMESPath expression used to locate the list of label headers in the
-- model container output.
--
-- __Example__: If the model container output of a batch request is
-- @\'{\"labels\":[\"cat\",\"dog\",\"fish\"],\"probability\":[0.6,0.3,0.1]}\'@,
-- then set @LabelAttribute@ to @\'labels\'@ to extract the list of label
-- headers @[\"cat\",\"dog\",\"fish\"]@
--
-- 'labelHeaders', 'clarifyInferenceConfig_labelHeaders' - For multiclass classification problems, the label headers are the names
-- of the classes. Otherwise, the label header is the name of the predicted
-- label. These are used to help readability for the output of the
-- @InvokeEndpoint@ API. See the
-- <https://docs.aws.amazon.com/sagemaker/latest/dg/clarify-online-explainability-invoke-endpoint.html#clarify-online-explainability-response response>
-- section under __Invoke the endpoint__ in the Developer Guide for more
-- information. If there are no label headers in the model container
-- output, provide them manually using this parameter.
--
-- 'labelIndex', 'clarifyInferenceConfig_labelIndex' - A zero-based index used to extract a label header or list of label
-- headers from model container output in CSV format.
--
-- __Example for a multiclass model:__ If the model container output
-- consists of label headers followed by probabilities:
-- @\'\"[\\\'cat\\\',\\\'dog\\\',\\\'fish\\\']\",\"[0.1,0.6,0.3]\"\'@, set
-- @LabelIndex@ to @0@ to select the label headers
-- @[\'cat\',\'dog\',\'fish\']@.
--
-- 'maxPayloadInMB', 'clarifyInferenceConfig_maxPayloadInMB' - The maximum payload size (MB) allowed of a request from the explainer to
-- the model container. Defaults to @6@ MB.
--
-- 'maxRecordCount', 'clarifyInferenceConfig_maxRecordCount' - The maximum number of records in a request that the model container can
-- process when querying the model container for the predictions of a
-- <https://docs.aws.amazon.com/sagemaker/latest/dg/clarify-online-explainability-create-endpoint.html#clarify-online-explainability-create-endpoint-synthetic synthetic dataset>.
-- A record is a unit of input data that inference can be made on, for
-- example, a single line in CSV data. If @MaxRecordCount@ is @1@, the
-- model container expects one record per request. A value of 2 or greater
-- means that the model expects batch requests, which can reduce overhead
-- and speed up the inferencing process. If this parameter is not provided,
-- the explainer will tune the record count per request according to the
-- model container\'s capacity at runtime.
--
-- 'probabilityAttribute', 'clarifyInferenceConfig_probabilityAttribute' - A JMESPath expression used to extract the probability (or score) from
-- the model container output if the model container is in JSON Lines
-- format.
--
-- __Example__: If the model container output of a single request is
-- @\'{\"predicted_label\":1,\"probability\":0.6}\'@, then set
-- @ProbabilityAttribute@ to @\'probability\'@.
--
-- 'probabilityIndex', 'clarifyInferenceConfig_probabilityIndex' - A zero-based index used to extract a probability value (score) or list
-- from model container output in CSV format. If this value is not
-- provided, the entire model container output will be treated as a
-- probability value (score) or list.
--
-- __Example for a single class model:__ If the model container output
-- consists of a string-formatted prediction label followed by its
-- probability: @\'1,0.6\'@, set @ProbabilityIndex@ to @1@ to select the
-- probability value @0.6@.
--
-- __Example for a multiclass model:__ If the model container output
-- consists of a string-formatted prediction label followed by its
-- probability:
-- @\'\"[\\\'cat\\\',\\\'dog\\\',\\\'fish\\\']\",\"[0.1,0.6,0.3]\"\'@, set
-- @ProbabilityIndex@ to @1@ to select the probability values
-- @[0.1,0.6,0.3]@.
newClarifyInferenceConfig ::
  ClarifyInferenceConfig
newClarifyInferenceConfig :: ClarifyInferenceConfig
newClarifyInferenceConfig =
  ClarifyInferenceConfig'
    { $sel:contentTemplate:ClarifyInferenceConfig' :: Maybe Text
contentTemplate =
        forall a. Maybe a
Prelude.Nothing,
      $sel:featureHeaders:ClarifyInferenceConfig' :: Maybe (NonEmpty Text)
featureHeaders = forall a. Maybe a
Prelude.Nothing,
      $sel:featureTypes:ClarifyInferenceConfig' :: Maybe (NonEmpty ClarifyFeatureType)
featureTypes = forall a. Maybe a
Prelude.Nothing,
      $sel:featuresAttribute:ClarifyInferenceConfig' :: Maybe Text
featuresAttribute = forall a. Maybe a
Prelude.Nothing,
      $sel:labelAttribute:ClarifyInferenceConfig' :: Maybe Text
labelAttribute = forall a. Maybe a
Prelude.Nothing,
      $sel:labelHeaders:ClarifyInferenceConfig' :: Maybe (NonEmpty Text)
labelHeaders = forall a. Maybe a
Prelude.Nothing,
      $sel:labelIndex:ClarifyInferenceConfig' :: Maybe Natural
labelIndex = forall a. Maybe a
Prelude.Nothing,
      $sel:maxPayloadInMB:ClarifyInferenceConfig' :: Maybe Natural
maxPayloadInMB = forall a. Maybe a
Prelude.Nothing,
      $sel:maxRecordCount:ClarifyInferenceConfig' :: Maybe Natural
maxRecordCount = forall a. Maybe a
Prelude.Nothing,
      $sel:probabilityAttribute:ClarifyInferenceConfig' :: Maybe Text
probabilityAttribute = forall a. Maybe a
Prelude.Nothing,
      $sel:probabilityIndex:ClarifyInferenceConfig' :: Maybe Natural
probabilityIndex = forall a. Maybe a
Prelude.Nothing
    }

-- | A template string used to format a JSON record into an acceptable model
-- container input. For example, a @ContentTemplate@ string
-- @\'{\"myfeatures\":$features}\'@ will format a list of features
-- @[1,2,3]@ into the record string @\'{\"myfeatures\":[1,2,3]}\'@.
-- Required only when the model container input is in JSON Lines format.
clarifyInferenceConfig_contentTemplate :: Lens.Lens' ClarifyInferenceConfig (Prelude.Maybe Prelude.Text)
clarifyInferenceConfig_contentTemplate :: Lens' ClarifyInferenceConfig (Maybe Text)
clarifyInferenceConfig_contentTemplate = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ClarifyInferenceConfig' {Maybe Text
contentTemplate :: Maybe Text
$sel:contentTemplate:ClarifyInferenceConfig' :: ClarifyInferenceConfig -> Maybe Text
contentTemplate} -> Maybe Text
contentTemplate) (\s :: ClarifyInferenceConfig
s@ClarifyInferenceConfig' {} Maybe Text
a -> ClarifyInferenceConfig
s {$sel:contentTemplate:ClarifyInferenceConfig' :: Maybe Text
contentTemplate = Maybe Text
a} :: ClarifyInferenceConfig)

-- | The names of the features. If provided, these are included in the
-- endpoint response payload to help readability of the @InvokeEndpoint@
-- output. See the
-- <https://docs.aws.amazon.com/sagemaker/latest/dg/clarify-online-explainability-invoke-endpoint.html#clarify-online-explainability-response Response>
-- section under __Invoke the endpoint__ in the Developer Guide for more
-- information.
clarifyInferenceConfig_featureHeaders :: Lens.Lens' ClarifyInferenceConfig (Prelude.Maybe (Prelude.NonEmpty Prelude.Text))
clarifyInferenceConfig_featureHeaders :: Lens' ClarifyInferenceConfig (Maybe (NonEmpty Text))
clarifyInferenceConfig_featureHeaders = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ClarifyInferenceConfig' {Maybe (NonEmpty Text)
featureHeaders :: Maybe (NonEmpty Text)
$sel:featureHeaders:ClarifyInferenceConfig' :: ClarifyInferenceConfig -> Maybe (NonEmpty Text)
featureHeaders} -> Maybe (NonEmpty Text)
featureHeaders) (\s :: ClarifyInferenceConfig
s@ClarifyInferenceConfig' {} Maybe (NonEmpty Text)
a -> ClarifyInferenceConfig
s {$sel:featureHeaders:ClarifyInferenceConfig' :: Maybe (NonEmpty Text)
featureHeaders = Maybe (NonEmpty Text)
a} :: ClarifyInferenceConfig) 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

-- | A list of data types of the features (optional). Applicable only to NLP
-- explainability. If provided, @FeatureTypes@ must have at least one
-- @\'text\'@ string (for example, @[\'text\']@). If @FeatureTypes@ is not
-- provided, the explainer infers the feature types based on the baseline
-- data. The feature types are included in the endpoint response payload.
-- For additional information see the
-- <https://docs.aws.amazon.com/sagemaker/latest/dg/clarify-online-explainability-invoke-endpoint.html#clarify-online-explainability-response response>
-- section under __Invoke the endpoint__ in the Developer Guide for more
-- information.
clarifyInferenceConfig_featureTypes :: Lens.Lens' ClarifyInferenceConfig (Prelude.Maybe (Prelude.NonEmpty ClarifyFeatureType))
clarifyInferenceConfig_featureTypes :: Lens' ClarifyInferenceConfig (Maybe (NonEmpty ClarifyFeatureType))
clarifyInferenceConfig_featureTypes = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ClarifyInferenceConfig' {Maybe (NonEmpty ClarifyFeatureType)
featureTypes :: Maybe (NonEmpty ClarifyFeatureType)
$sel:featureTypes:ClarifyInferenceConfig' :: ClarifyInferenceConfig -> Maybe (NonEmpty ClarifyFeatureType)
featureTypes} -> Maybe (NonEmpty ClarifyFeatureType)
featureTypes) (\s :: ClarifyInferenceConfig
s@ClarifyInferenceConfig' {} Maybe (NonEmpty ClarifyFeatureType)
a -> ClarifyInferenceConfig
s {$sel:featureTypes:ClarifyInferenceConfig' :: Maybe (NonEmpty ClarifyFeatureType)
featureTypes = Maybe (NonEmpty ClarifyFeatureType)
a} :: ClarifyInferenceConfig) 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

-- | Provides the JMESPath expression to extract the features from a model
-- container input in JSON Lines format. For example, if
-- @FeaturesAttribute@ is the JMESPath expression @\'myfeatures\'@, it
-- extracts a list of features @[1,2,3]@ from request data
-- @\'{\"myfeatures\":[1,2,3]}\'@.
clarifyInferenceConfig_featuresAttribute :: Lens.Lens' ClarifyInferenceConfig (Prelude.Maybe Prelude.Text)
clarifyInferenceConfig_featuresAttribute :: Lens' ClarifyInferenceConfig (Maybe Text)
clarifyInferenceConfig_featuresAttribute = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ClarifyInferenceConfig' {Maybe Text
featuresAttribute :: Maybe Text
$sel:featuresAttribute:ClarifyInferenceConfig' :: ClarifyInferenceConfig -> Maybe Text
featuresAttribute} -> Maybe Text
featuresAttribute) (\s :: ClarifyInferenceConfig
s@ClarifyInferenceConfig' {} Maybe Text
a -> ClarifyInferenceConfig
s {$sel:featuresAttribute:ClarifyInferenceConfig' :: Maybe Text
featuresAttribute = Maybe Text
a} :: ClarifyInferenceConfig)

-- | A JMESPath expression used to locate the list of label headers in the
-- model container output.
--
-- __Example__: If the model container output of a batch request is
-- @\'{\"labels\":[\"cat\",\"dog\",\"fish\"],\"probability\":[0.6,0.3,0.1]}\'@,
-- then set @LabelAttribute@ to @\'labels\'@ to extract the list of label
-- headers @[\"cat\",\"dog\",\"fish\"]@
clarifyInferenceConfig_labelAttribute :: Lens.Lens' ClarifyInferenceConfig (Prelude.Maybe Prelude.Text)
clarifyInferenceConfig_labelAttribute :: Lens' ClarifyInferenceConfig (Maybe Text)
clarifyInferenceConfig_labelAttribute = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ClarifyInferenceConfig' {Maybe Text
labelAttribute :: Maybe Text
$sel:labelAttribute:ClarifyInferenceConfig' :: ClarifyInferenceConfig -> Maybe Text
labelAttribute} -> Maybe Text
labelAttribute) (\s :: ClarifyInferenceConfig
s@ClarifyInferenceConfig' {} Maybe Text
a -> ClarifyInferenceConfig
s {$sel:labelAttribute:ClarifyInferenceConfig' :: Maybe Text
labelAttribute = Maybe Text
a} :: ClarifyInferenceConfig)

-- | For multiclass classification problems, the label headers are the names
-- of the classes. Otherwise, the label header is the name of the predicted
-- label. These are used to help readability for the output of the
-- @InvokeEndpoint@ API. See the
-- <https://docs.aws.amazon.com/sagemaker/latest/dg/clarify-online-explainability-invoke-endpoint.html#clarify-online-explainability-response response>
-- section under __Invoke the endpoint__ in the Developer Guide for more
-- information. If there are no label headers in the model container
-- output, provide them manually using this parameter.
clarifyInferenceConfig_labelHeaders :: Lens.Lens' ClarifyInferenceConfig (Prelude.Maybe (Prelude.NonEmpty Prelude.Text))
clarifyInferenceConfig_labelHeaders :: Lens' ClarifyInferenceConfig (Maybe (NonEmpty Text))
clarifyInferenceConfig_labelHeaders = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ClarifyInferenceConfig' {Maybe (NonEmpty Text)
labelHeaders :: Maybe (NonEmpty Text)
$sel:labelHeaders:ClarifyInferenceConfig' :: ClarifyInferenceConfig -> Maybe (NonEmpty Text)
labelHeaders} -> Maybe (NonEmpty Text)
labelHeaders) (\s :: ClarifyInferenceConfig
s@ClarifyInferenceConfig' {} Maybe (NonEmpty Text)
a -> ClarifyInferenceConfig
s {$sel:labelHeaders:ClarifyInferenceConfig' :: Maybe (NonEmpty Text)
labelHeaders = Maybe (NonEmpty Text)
a} :: ClarifyInferenceConfig) 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

-- | A zero-based index used to extract a label header or list of label
-- headers from model container output in CSV format.
--
-- __Example for a multiclass model:__ If the model container output
-- consists of label headers followed by probabilities:
-- @\'\"[\\\'cat\\\',\\\'dog\\\',\\\'fish\\\']\",\"[0.1,0.6,0.3]\"\'@, set
-- @LabelIndex@ to @0@ to select the label headers
-- @[\'cat\',\'dog\',\'fish\']@.
clarifyInferenceConfig_labelIndex :: Lens.Lens' ClarifyInferenceConfig (Prelude.Maybe Prelude.Natural)
clarifyInferenceConfig_labelIndex :: Lens' ClarifyInferenceConfig (Maybe Natural)
clarifyInferenceConfig_labelIndex = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ClarifyInferenceConfig' {Maybe Natural
labelIndex :: Maybe Natural
$sel:labelIndex:ClarifyInferenceConfig' :: ClarifyInferenceConfig -> Maybe Natural
labelIndex} -> Maybe Natural
labelIndex) (\s :: ClarifyInferenceConfig
s@ClarifyInferenceConfig' {} Maybe Natural
a -> ClarifyInferenceConfig
s {$sel:labelIndex:ClarifyInferenceConfig' :: Maybe Natural
labelIndex = Maybe Natural
a} :: ClarifyInferenceConfig)

-- | The maximum payload size (MB) allowed of a request from the explainer to
-- the model container. Defaults to @6@ MB.
clarifyInferenceConfig_maxPayloadInMB :: Lens.Lens' ClarifyInferenceConfig (Prelude.Maybe Prelude.Natural)
clarifyInferenceConfig_maxPayloadInMB :: Lens' ClarifyInferenceConfig (Maybe Natural)
clarifyInferenceConfig_maxPayloadInMB = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ClarifyInferenceConfig' {Maybe Natural
maxPayloadInMB :: Maybe Natural
$sel:maxPayloadInMB:ClarifyInferenceConfig' :: ClarifyInferenceConfig -> Maybe Natural
maxPayloadInMB} -> Maybe Natural
maxPayloadInMB) (\s :: ClarifyInferenceConfig
s@ClarifyInferenceConfig' {} Maybe Natural
a -> ClarifyInferenceConfig
s {$sel:maxPayloadInMB:ClarifyInferenceConfig' :: Maybe Natural
maxPayloadInMB = Maybe Natural
a} :: ClarifyInferenceConfig)

-- | The maximum number of records in a request that the model container can
-- process when querying the model container for the predictions of a
-- <https://docs.aws.amazon.com/sagemaker/latest/dg/clarify-online-explainability-create-endpoint.html#clarify-online-explainability-create-endpoint-synthetic synthetic dataset>.
-- A record is a unit of input data that inference can be made on, for
-- example, a single line in CSV data. If @MaxRecordCount@ is @1@, the
-- model container expects one record per request. A value of 2 or greater
-- means that the model expects batch requests, which can reduce overhead
-- and speed up the inferencing process. If this parameter is not provided,
-- the explainer will tune the record count per request according to the
-- model container\'s capacity at runtime.
clarifyInferenceConfig_maxRecordCount :: Lens.Lens' ClarifyInferenceConfig (Prelude.Maybe Prelude.Natural)
clarifyInferenceConfig_maxRecordCount :: Lens' ClarifyInferenceConfig (Maybe Natural)
clarifyInferenceConfig_maxRecordCount = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ClarifyInferenceConfig' {Maybe Natural
maxRecordCount :: Maybe Natural
$sel:maxRecordCount:ClarifyInferenceConfig' :: ClarifyInferenceConfig -> Maybe Natural
maxRecordCount} -> Maybe Natural
maxRecordCount) (\s :: ClarifyInferenceConfig
s@ClarifyInferenceConfig' {} Maybe Natural
a -> ClarifyInferenceConfig
s {$sel:maxRecordCount:ClarifyInferenceConfig' :: Maybe Natural
maxRecordCount = Maybe Natural
a} :: ClarifyInferenceConfig)

-- | A JMESPath expression used to extract the probability (or score) from
-- the model container output if the model container is in JSON Lines
-- format.
--
-- __Example__: If the model container output of a single request is
-- @\'{\"predicted_label\":1,\"probability\":0.6}\'@, then set
-- @ProbabilityAttribute@ to @\'probability\'@.
clarifyInferenceConfig_probabilityAttribute :: Lens.Lens' ClarifyInferenceConfig (Prelude.Maybe Prelude.Text)
clarifyInferenceConfig_probabilityAttribute :: Lens' ClarifyInferenceConfig (Maybe Text)
clarifyInferenceConfig_probabilityAttribute = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ClarifyInferenceConfig' {Maybe Text
probabilityAttribute :: Maybe Text
$sel:probabilityAttribute:ClarifyInferenceConfig' :: ClarifyInferenceConfig -> Maybe Text
probabilityAttribute} -> Maybe Text
probabilityAttribute) (\s :: ClarifyInferenceConfig
s@ClarifyInferenceConfig' {} Maybe Text
a -> ClarifyInferenceConfig
s {$sel:probabilityAttribute:ClarifyInferenceConfig' :: Maybe Text
probabilityAttribute = Maybe Text
a} :: ClarifyInferenceConfig)

-- | A zero-based index used to extract a probability value (score) or list
-- from model container output in CSV format. If this value is not
-- provided, the entire model container output will be treated as a
-- probability value (score) or list.
--
-- __Example for a single class model:__ If the model container output
-- consists of a string-formatted prediction label followed by its
-- probability: @\'1,0.6\'@, set @ProbabilityIndex@ to @1@ to select the
-- probability value @0.6@.
--
-- __Example for a multiclass model:__ If the model container output
-- consists of a string-formatted prediction label followed by its
-- probability:
-- @\'\"[\\\'cat\\\',\\\'dog\\\',\\\'fish\\\']\",\"[0.1,0.6,0.3]\"\'@, set
-- @ProbabilityIndex@ to @1@ to select the probability values
-- @[0.1,0.6,0.3]@.
clarifyInferenceConfig_probabilityIndex :: Lens.Lens' ClarifyInferenceConfig (Prelude.Maybe Prelude.Natural)
clarifyInferenceConfig_probabilityIndex :: Lens' ClarifyInferenceConfig (Maybe Natural)
clarifyInferenceConfig_probabilityIndex = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ClarifyInferenceConfig' {Maybe Natural
probabilityIndex :: Maybe Natural
$sel:probabilityIndex:ClarifyInferenceConfig' :: ClarifyInferenceConfig -> Maybe Natural
probabilityIndex} -> Maybe Natural
probabilityIndex) (\s :: ClarifyInferenceConfig
s@ClarifyInferenceConfig' {} Maybe Natural
a -> ClarifyInferenceConfig
s {$sel:probabilityIndex:ClarifyInferenceConfig' :: Maybe Natural
probabilityIndex = Maybe Natural
a} :: ClarifyInferenceConfig)

instance Data.FromJSON ClarifyInferenceConfig where
  parseJSON :: Value -> Parser ClarifyInferenceConfig
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"ClarifyInferenceConfig"
      ( \Object
x ->
          Maybe Text
-> Maybe (NonEmpty Text)
-> Maybe (NonEmpty ClarifyFeatureType)
-> Maybe Text
-> Maybe Text
-> Maybe (NonEmpty Text)
-> Maybe Natural
-> Maybe Natural
-> Maybe Natural
-> Maybe Text
-> Maybe Natural
-> ClarifyInferenceConfig
ClarifyInferenceConfig'
            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
"ContentTemplate")
            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
"FeatureHeaders")
            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
"FeatureTypes")
            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
"FeaturesAttribute")
            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
"LabelAttribute")
            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
"LabelHeaders")
            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
"LabelIndex")
            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
"MaxPayloadInMB")
            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
"MaxRecordCount")
            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
"ProbabilityAttribute")
            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
"ProbabilityIndex")
      )

instance Prelude.Hashable ClarifyInferenceConfig where
  hashWithSalt :: Int -> ClarifyInferenceConfig -> Int
hashWithSalt Int
_salt ClarifyInferenceConfig' {Maybe Natural
Maybe (NonEmpty Text)
Maybe (NonEmpty ClarifyFeatureType)
Maybe Text
probabilityIndex :: Maybe Natural
probabilityAttribute :: Maybe Text
maxRecordCount :: Maybe Natural
maxPayloadInMB :: Maybe Natural
labelIndex :: Maybe Natural
labelHeaders :: Maybe (NonEmpty Text)
labelAttribute :: Maybe Text
featuresAttribute :: Maybe Text
featureTypes :: Maybe (NonEmpty ClarifyFeatureType)
featureHeaders :: Maybe (NonEmpty Text)
contentTemplate :: Maybe Text
$sel:probabilityIndex:ClarifyInferenceConfig' :: ClarifyInferenceConfig -> Maybe Natural
$sel:probabilityAttribute:ClarifyInferenceConfig' :: ClarifyInferenceConfig -> Maybe Text
$sel:maxRecordCount:ClarifyInferenceConfig' :: ClarifyInferenceConfig -> Maybe Natural
$sel:maxPayloadInMB:ClarifyInferenceConfig' :: ClarifyInferenceConfig -> Maybe Natural
$sel:labelIndex:ClarifyInferenceConfig' :: ClarifyInferenceConfig -> Maybe Natural
$sel:labelHeaders:ClarifyInferenceConfig' :: ClarifyInferenceConfig -> Maybe (NonEmpty Text)
$sel:labelAttribute:ClarifyInferenceConfig' :: ClarifyInferenceConfig -> Maybe Text
$sel:featuresAttribute:ClarifyInferenceConfig' :: ClarifyInferenceConfig -> Maybe Text
$sel:featureTypes:ClarifyInferenceConfig' :: ClarifyInferenceConfig -> Maybe (NonEmpty ClarifyFeatureType)
$sel:featureHeaders:ClarifyInferenceConfig' :: ClarifyInferenceConfig -> Maybe (NonEmpty Text)
$sel:contentTemplate:ClarifyInferenceConfig' :: ClarifyInferenceConfig -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
contentTemplate
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (NonEmpty Text)
featureHeaders
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (NonEmpty ClarifyFeatureType)
featureTypes
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
featuresAttribute
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
labelAttribute
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (NonEmpty Text)
labelHeaders
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
labelIndex
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
maxPayloadInMB
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
maxRecordCount
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
probabilityAttribute
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
probabilityIndex

instance Prelude.NFData ClarifyInferenceConfig where
  rnf :: ClarifyInferenceConfig -> ()
rnf ClarifyInferenceConfig' {Maybe Natural
Maybe (NonEmpty Text)
Maybe (NonEmpty ClarifyFeatureType)
Maybe Text
probabilityIndex :: Maybe Natural
probabilityAttribute :: Maybe Text
maxRecordCount :: Maybe Natural
maxPayloadInMB :: Maybe Natural
labelIndex :: Maybe Natural
labelHeaders :: Maybe (NonEmpty Text)
labelAttribute :: Maybe Text
featuresAttribute :: Maybe Text
featureTypes :: Maybe (NonEmpty ClarifyFeatureType)
featureHeaders :: Maybe (NonEmpty Text)
contentTemplate :: Maybe Text
$sel:probabilityIndex:ClarifyInferenceConfig' :: ClarifyInferenceConfig -> Maybe Natural
$sel:probabilityAttribute:ClarifyInferenceConfig' :: ClarifyInferenceConfig -> Maybe Text
$sel:maxRecordCount:ClarifyInferenceConfig' :: ClarifyInferenceConfig -> Maybe Natural
$sel:maxPayloadInMB:ClarifyInferenceConfig' :: ClarifyInferenceConfig -> Maybe Natural
$sel:labelIndex:ClarifyInferenceConfig' :: ClarifyInferenceConfig -> Maybe Natural
$sel:labelHeaders:ClarifyInferenceConfig' :: ClarifyInferenceConfig -> Maybe (NonEmpty Text)
$sel:labelAttribute:ClarifyInferenceConfig' :: ClarifyInferenceConfig -> Maybe Text
$sel:featuresAttribute:ClarifyInferenceConfig' :: ClarifyInferenceConfig -> Maybe Text
$sel:featureTypes:ClarifyInferenceConfig' :: ClarifyInferenceConfig -> Maybe (NonEmpty ClarifyFeatureType)
$sel:featureHeaders:ClarifyInferenceConfig' :: ClarifyInferenceConfig -> Maybe (NonEmpty Text)
$sel:contentTemplate:ClarifyInferenceConfig' :: ClarifyInferenceConfig -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
contentTemplate
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (NonEmpty Text)
featureHeaders
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (NonEmpty ClarifyFeatureType)
featureTypes
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
featuresAttribute
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
labelAttribute
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (NonEmpty Text)
labelHeaders
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
labelIndex
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
maxPayloadInMB
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
maxRecordCount
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
probabilityAttribute
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
probabilityIndex

instance Data.ToJSON ClarifyInferenceConfig where
  toJSON :: ClarifyInferenceConfig -> Value
toJSON ClarifyInferenceConfig' {Maybe Natural
Maybe (NonEmpty Text)
Maybe (NonEmpty ClarifyFeatureType)
Maybe Text
probabilityIndex :: Maybe Natural
probabilityAttribute :: Maybe Text
maxRecordCount :: Maybe Natural
maxPayloadInMB :: Maybe Natural
labelIndex :: Maybe Natural
labelHeaders :: Maybe (NonEmpty Text)
labelAttribute :: Maybe Text
featuresAttribute :: Maybe Text
featureTypes :: Maybe (NonEmpty ClarifyFeatureType)
featureHeaders :: Maybe (NonEmpty Text)
contentTemplate :: Maybe Text
$sel:probabilityIndex:ClarifyInferenceConfig' :: ClarifyInferenceConfig -> Maybe Natural
$sel:probabilityAttribute:ClarifyInferenceConfig' :: ClarifyInferenceConfig -> Maybe Text
$sel:maxRecordCount:ClarifyInferenceConfig' :: ClarifyInferenceConfig -> Maybe Natural
$sel:maxPayloadInMB:ClarifyInferenceConfig' :: ClarifyInferenceConfig -> Maybe Natural
$sel:labelIndex:ClarifyInferenceConfig' :: ClarifyInferenceConfig -> Maybe Natural
$sel:labelHeaders:ClarifyInferenceConfig' :: ClarifyInferenceConfig -> Maybe (NonEmpty Text)
$sel:labelAttribute:ClarifyInferenceConfig' :: ClarifyInferenceConfig -> Maybe Text
$sel:featuresAttribute:ClarifyInferenceConfig' :: ClarifyInferenceConfig -> Maybe Text
$sel:featureTypes:ClarifyInferenceConfig' :: ClarifyInferenceConfig -> Maybe (NonEmpty ClarifyFeatureType)
$sel:featureHeaders:ClarifyInferenceConfig' :: ClarifyInferenceConfig -> Maybe (NonEmpty Text)
$sel:contentTemplate:ClarifyInferenceConfig' :: ClarifyInferenceConfig -> Maybe Text
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"ContentTemplate" 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
contentTemplate,
            (Key
"FeatureHeaders" 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 (NonEmpty Text)
featureHeaders,
            (Key
"FeatureTypes" 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 (NonEmpty ClarifyFeatureType)
featureTypes,
            (Key
"FeaturesAttribute" 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
featuresAttribute,
            (Key
"LabelAttribute" 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
labelAttribute,
            (Key
"LabelHeaders" 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 (NonEmpty Text)
labelHeaders,
            (Key
"LabelIndex" 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 Natural
labelIndex,
            (Key
"MaxPayloadInMB" 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 Natural
maxPayloadInMB,
            (Key
"MaxRecordCount" 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 Natural
maxRecordCount,
            (Key
"ProbabilityAttribute" 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
probabilityAttribute,
            (Key
"ProbabilityIndex" 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 Natural
probabilityIndex
          ]
      )