{-# 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.EndpointInput
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.SageMaker.Types.EndpointInput where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.SageMaker.Types.ProcessingS3DataDistributionType
import Amazonka.SageMaker.Types.ProcessingS3InputMode

-- | Input object for the endpoint
--
-- /See:/ 'newEndpointInput' smart constructor.
data EndpointInput = EndpointInput'
  { -- | The attribute of the input data that represents the ground truth label.
    EndpointInput -> Maybe Text
inferenceAttribute :: Prelude.Maybe Prelude.Text,
    -- | Whether input data distributed in Amazon S3 is fully replicated or
    -- sharded by an S3 key. Defaults to @FullyReplicated@
    EndpointInput -> Maybe ProcessingS3DataDistributionType
s3DataDistributionType :: Prelude.Maybe ProcessingS3DataDistributionType,
    -- | Whether the @Pipe@ or @File@ is used as the input mode for transferring
    -- data for the monitoring job. @Pipe@ mode is recommended for large
    -- datasets. @File@ mode is useful for small files that fit in memory.
    -- Defaults to @File@.
    EndpointInput -> Maybe ProcessingS3InputMode
s3InputMode :: Prelude.Maybe ProcessingS3InputMode,
    -- | If specified, monitoring jobs substract this time from the start time.
    -- For information about using offsets for scheduling monitoring jobs, see
    -- <https://docs.aws.amazon.com/sagemaker/latest/dg/model-monitor-model-quality-schedule.html Schedule Model Quality Monitoring Jobs>.
    EndpointInput -> Maybe Text
startTimeOffset :: Prelude.Maybe Prelude.Text,
    -- | The attributes of the input data that are the input features.
    EndpointInput -> Maybe Text
featuresAttribute :: Prelude.Maybe Prelude.Text,
    -- | If specified, monitoring jobs substract this time from the end time. For
    -- information about using offsets for scheduling monitoring jobs, see
    -- <https://docs.aws.amazon.com/sagemaker/latest/dg/model-monitor-model-quality-schedule.html Schedule Model Quality Monitoring Jobs>.
    EndpointInput -> Maybe Text
endTimeOffset :: Prelude.Maybe Prelude.Text,
    -- | The threshold for the class probability to be evaluated as a positive
    -- result.
    EndpointInput -> Maybe Double
probabilityThresholdAttribute :: Prelude.Maybe Prelude.Double,
    -- | In a classification problem, the attribute that represents the class
    -- probability.
    EndpointInput -> Maybe Text
probabilityAttribute :: Prelude.Maybe Prelude.Text,
    -- | An endpoint in customer\'s account which has enabled @DataCaptureConfig@
    -- enabled.
    EndpointInput -> Text
endpointName :: Prelude.Text,
    -- | Path to the filesystem where the endpoint data is available to the
    -- container.
    EndpointInput -> Text
localPath :: Prelude.Text
  }
  deriving (EndpointInput -> EndpointInput -> Bool
(EndpointInput -> EndpointInput -> Bool)
-> (EndpointInput -> EndpointInput -> Bool) -> Eq EndpointInput
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: EndpointInput -> EndpointInput -> Bool
$c/= :: EndpointInput -> EndpointInput -> Bool
== :: EndpointInput -> EndpointInput -> Bool
$c== :: EndpointInput -> EndpointInput -> Bool
Prelude.Eq, ReadPrec [EndpointInput]
ReadPrec EndpointInput
Int -> ReadS EndpointInput
ReadS [EndpointInput]
(Int -> ReadS EndpointInput)
-> ReadS [EndpointInput]
-> ReadPrec EndpointInput
-> ReadPrec [EndpointInput]
-> Read EndpointInput
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [EndpointInput]
$creadListPrec :: ReadPrec [EndpointInput]
readPrec :: ReadPrec EndpointInput
$creadPrec :: ReadPrec EndpointInput
readList :: ReadS [EndpointInput]
$creadList :: ReadS [EndpointInput]
readsPrec :: Int -> ReadS EndpointInput
$creadsPrec :: Int -> ReadS EndpointInput
Prelude.Read, Int -> EndpointInput -> ShowS
[EndpointInput] -> ShowS
EndpointInput -> String
(Int -> EndpointInput -> ShowS)
-> (EndpointInput -> String)
-> ([EndpointInput] -> ShowS)
-> Show EndpointInput
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [EndpointInput] -> ShowS
$cshowList :: [EndpointInput] -> ShowS
show :: EndpointInput -> String
$cshow :: EndpointInput -> String
showsPrec :: Int -> EndpointInput -> ShowS
$cshowsPrec :: Int -> EndpointInput -> ShowS
Prelude.Show, (forall x. EndpointInput -> Rep EndpointInput x)
-> (forall x. Rep EndpointInput x -> EndpointInput)
-> Generic EndpointInput
forall x. Rep EndpointInput x -> EndpointInput
forall x. EndpointInput -> Rep EndpointInput x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep EndpointInput x -> EndpointInput
$cfrom :: forall x. EndpointInput -> Rep EndpointInput x
Prelude.Generic)

-- |
-- Create a value of 'EndpointInput' 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:
--
-- 'inferenceAttribute', 'endpointInput_inferenceAttribute' - The attribute of the input data that represents the ground truth label.
--
-- 's3DataDistributionType', 'endpointInput_s3DataDistributionType' - Whether input data distributed in Amazon S3 is fully replicated or
-- sharded by an S3 key. Defaults to @FullyReplicated@
--
-- 's3InputMode', 'endpointInput_s3InputMode' - Whether the @Pipe@ or @File@ is used as the input mode for transferring
-- data for the monitoring job. @Pipe@ mode is recommended for large
-- datasets. @File@ mode is useful for small files that fit in memory.
-- Defaults to @File@.
--
-- 'startTimeOffset', 'endpointInput_startTimeOffset' - If specified, monitoring jobs substract this time from the start time.
-- For information about using offsets for scheduling monitoring jobs, see
-- <https://docs.aws.amazon.com/sagemaker/latest/dg/model-monitor-model-quality-schedule.html Schedule Model Quality Monitoring Jobs>.
--
-- 'featuresAttribute', 'endpointInput_featuresAttribute' - The attributes of the input data that are the input features.
--
-- 'endTimeOffset', 'endpointInput_endTimeOffset' - If specified, monitoring jobs substract this time from the end time. For
-- information about using offsets for scheduling monitoring jobs, see
-- <https://docs.aws.amazon.com/sagemaker/latest/dg/model-monitor-model-quality-schedule.html Schedule Model Quality Monitoring Jobs>.
--
-- 'probabilityThresholdAttribute', 'endpointInput_probabilityThresholdAttribute' - The threshold for the class probability to be evaluated as a positive
-- result.
--
-- 'probabilityAttribute', 'endpointInput_probabilityAttribute' - In a classification problem, the attribute that represents the class
-- probability.
--
-- 'endpointName', 'endpointInput_endpointName' - An endpoint in customer\'s account which has enabled @DataCaptureConfig@
-- enabled.
--
-- 'localPath', 'endpointInput_localPath' - Path to the filesystem where the endpoint data is available to the
-- container.
newEndpointInput ::
  -- | 'endpointName'
  Prelude.Text ->
  -- | 'localPath'
  Prelude.Text ->
  EndpointInput
newEndpointInput :: Text -> Text -> EndpointInput
newEndpointInput Text
pEndpointName_ Text
pLocalPath_ =
  EndpointInput' :: Maybe Text
-> Maybe ProcessingS3DataDistributionType
-> Maybe ProcessingS3InputMode
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Double
-> Maybe Text
-> Text
-> Text
-> EndpointInput
EndpointInput'
    { $sel:inferenceAttribute:EndpointInput' :: Maybe Text
inferenceAttribute =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:s3DataDistributionType:EndpointInput' :: Maybe ProcessingS3DataDistributionType
s3DataDistributionType = Maybe ProcessingS3DataDistributionType
forall a. Maybe a
Prelude.Nothing,
      $sel:s3InputMode:EndpointInput' :: Maybe ProcessingS3InputMode
s3InputMode = Maybe ProcessingS3InputMode
forall a. Maybe a
Prelude.Nothing,
      $sel:startTimeOffset:EndpointInput' :: Maybe Text
startTimeOffset = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:featuresAttribute:EndpointInput' :: Maybe Text
featuresAttribute = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:endTimeOffset:EndpointInput' :: Maybe Text
endTimeOffset = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:probabilityThresholdAttribute:EndpointInput' :: Maybe Double
probabilityThresholdAttribute = Maybe Double
forall a. Maybe a
Prelude.Nothing,
      $sel:probabilityAttribute:EndpointInput' :: Maybe Text
probabilityAttribute = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:endpointName:EndpointInput' :: Text
endpointName = Text
pEndpointName_,
      $sel:localPath:EndpointInput' :: Text
localPath = Text
pLocalPath_
    }

-- | The attribute of the input data that represents the ground truth label.
endpointInput_inferenceAttribute :: Lens.Lens' EndpointInput (Prelude.Maybe Prelude.Text)
endpointInput_inferenceAttribute :: (Maybe Text -> f (Maybe Text)) -> EndpointInput -> f EndpointInput
endpointInput_inferenceAttribute = (EndpointInput -> Maybe Text)
-> (EndpointInput -> Maybe Text -> EndpointInput)
-> Lens EndpointInput EndpointInput (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EndpointInput' {Maybe Text
inferenceAttribute :: Maybe Text
$sel:inferenceAttribute:EndpointInput' :: EndpointInput -> Maybe Text
inferenceAttribute} -> Maybe Text
inferenceAttribute) (\s :: EndpointInput
s@EndpointInput' {} Maybe Text
a -> EndpointInput
s {$sel:inferenceAttribute:EndpointInput' :: Maybe Text
inferenceAttribute = Maybe Text
a} :: EndpointInput)

-- | Whether input data distributed in Amazon S3 is fully replicated or
-- sharded by an S3 key. Defaults to @FullyReplicated@
endpointInput_s3DataDistributionType :: Lens.Lens' EndpointInput (Prelude.Maybe ProcessingS3DataDistributionType)
endpointInput_s3DataDistributionType :: (Maybe ProcessingS3DataDistributionType
 -> f (Maybe ProcessingS3DataDistributionType))
-> EndpointInput -> f EndpointInput
endpointInput_s3DataDistributionType = (EndpointInput -> Maybe ProcessingS3DataDistributionType)
-> (EndpointInput
    -> Maybe ProcessingS3DataDistributionType -> EndpointInput)
-> Lens
     EndpointInput
     EndpointInput
     (Maybe ProcessingS3DataDistributionType)
     (Maybe ProcessingS3DataDistributionType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EndpointInput' {Maybe ProcessingS3DataDistributionType
s3DataDistributionType :: Maybe ProcessingS3DataDistributionType
$sel:s3DataDistributionType:EndpointInput' :: EndpointInput -> Maybe ProcessingS3DataDistributionType
s3DataDistributionType} -> Maybe ProcessingS3DataDistributionType
s3DataDistributionType) (\s :: EndpointInput
s@EndpointInput' {} Maybe ProcessingS3DataDistributionType
a -> EndpointInput
s {$sel:s3DataDistributionType:EndpointInput' :: Maybe ProcessingS3DataDistributionType
s3DataDistributionType = Maybe ProcessingS3DataDistributionType
a} :: EndpointInput)

-- | Whether the @Pipe@ or @File@ is used as the input mode for transferring
-- data for the monitoring job. @Pipe@ mode is recommended for large
-- datasets. @File@ mode is useful for small files that fit in memory.
-- Defaults to @File@.
endpointInput_s3InputMode :: Lens.Lens' EndpointInput (Prelude.Maybe ProcessingS3InputMode)
endpointInput_s3InputMode :: (Maybe ProcessingS3InputMode -> f (Maybe ProcessingS3InputMode))
-> EndpointInput -> f EndpointInput
endpointInput_s3InputMode = (EndpointInput -> Maybe ProcessingS3InputMode)
-> (EndpointInput -> Maybe ProcessingS3InputMode -> EndpointInput)
-> Lens
     EndpointInput
     EndpointInput
     (Maybe ProcessingS3InputMode)
     (Maybe ProcessingS3InputMode)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EndpointInput' {Maybe ProcessingS3InputMode
s3InputMode :: Maybe ProcessingS3InputMode
$sel:s3InputMode:EndpointInput' :: EndpointInput -> Maybe ProcessingS3InputMode
s3InputMode} -> Maybe ProcessingS3InputMode
s3InputMode) (\s :: EndpointInput
s@EndpointInput' {} Maybe ProcessingS3InputMode
a -> EndpointInput
s {$sel:s3InputMode:EndpointInput' :: Maybe ProcessingS3InputMode
s3InputMode = Maybe ProcessingS3InputMode
a} :: EndpointInput)

-- | If specified, monitoring jobs substract this time from the start time.
-- For information about using offsets for scheduling monitoring jobs, see
-- <https://docs.aws.amazon.com/sagemaker/latest/dg/model-monitor-model-quality-schedule.html Schedule Model Quality Monitoring Jobs>.
endpointInput_startTimeOffset :: Lens.Lens' EndpointInput (Prelude.Maybe Prelude.Text)
endpointInput_startTimeOffset :: (Maybe Text -> f (Maybe Text)) -> EndpointInput -> f EndpointInput
endpointInput_startTimeOffset = (EndpointInput -> Maybe Text)
-> (EndpointInput -> Maybe Text -> EndpointInput)
-> Lens EndpointInput EndpointInput (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EndpointInput' {Maybe Text
startTimeOffset :: Maybe Text
$sel:startTimeOffset:EndpointInput' :: EndpointInput -> Maybe Text
startTimeOffset} -> Maybe Text
startTimeOffset) (\s :: EndpointInput
s@EndpointInput' {} Maybe Text
a -> EndpointInput
s {$sel:startTimeOffset:EndpointInput' :: Maybe Text
startTimeOffset = Maybe Text
a} :: EndpointInput)

-- | The attributes of the input data that are the input features.
endpointInput_featuresAttribute :: Lens.Lens' EndpointInput (Prelude.Maybe Prelude.Text)
endpointInput_featuresAttribute :: (Maybe Text -> f (Maybe Text)) -> EndpointInput -> f EndpointInput
endpointInput_featuresAttribute = (EndpointInput -> Maybe Text)
-> (EndpointInput -> Maybe Text -> EndpointInput)
-> Lens EndpointInput EndpointInput (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EndpointInput' {Maybe Text
featuresAttribute :: Maybe Text
$sel:featuresAttribute:EndpointInput' :: EndpointInput -> Maybe Text
featuresAttribute} -> Maybe Text
featuresAttribute) (\s :: EndpointInput
s@EndpointInput' {} Maybe Text
a -> EndpointInput
s {$sel:featuresAttribute:EndpointInput' :: Maybe Text
featuresAttribute = Maybe Text
a} :: EndpointInput)

-- | If specified, monitoring jobs substract this time from the end time. For
-- information about using offsets for scheduling monitoring jobs, see
-- <https://docs.aws.amazon.com/sagemaker/latest/dg/model-monitor-model-quality-schedule.html Schedule Model Quality Monitoring Jobs>.
endpointInput_endTimeOffset :: Lens.Lens' EndpointInput (Prelude.Maybe Prelude.Text)
endpointInput_endTimeOffset :: (Maybe Text -> f (Maybe Text)) -> EndpointInput -> f EndpointInput
endpointInput_endTimeOffset = (EndpointInput -> Maybe Text)
-> (EndpointInput -> Maybe Text -> EndpointInput)
-> Lens EndpointInput EndpointInput (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EndpointInput' {Maybe Text
endTimeOffset :: Maybe Text
$sel:endTimeOffset:EndpointInput' :: EndpointInput -> Maybe Text
endTimeOffset} -> Maybe Text
endTimeOffset) (\s :: EndpointInput
s@EndpointInput' {} Maybe Text
a -> EndpointInput
s {$sel:endTimeOffset:EndpointInput' :: Maybe Text
endTimeOffset = Maybe Text
a} :: EndpointInput)

-- | The threshold for the class probability to be evaluated as a positive
-- result.
endpointInput_probabilityThresholdAttribute :: Lens.Lens' EndpointInput (Prelude.Maybe Prelude.Double)
endpointInput_probabilityThresholdAttribute :: (Maybe Double -> f (Maybe Double))
-> EndpointInput -> f EndpointInput
endpointInput_probabilityThresholdAttribute = (EndpointInput -> Maybe Double)
-> (EndpointInput -> Maybe Double -> EndpointInput)
-> Lens EndpointInput EndpointInput (Maybe Double) (Maybe Double)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EndpointInput' {Maybe Double
probabilityThresholdAttribute :: Maybe Double
$sel:probabilityThresholdAttribute:EndpointInput' :: EndpointInput -> Maybe Double
probabilityThresholdAttribute} -> Maybe Double
probabilityThresholdAttribute) (\s :: EndpointInput
s@EndpointInput' {} Maybe Double
a -> EndpointInput
s {$sel:probabilityThresholdAttribute:EndpointInput' :: Maybe Double
probabilityThresholdAttribute = Maybe Double
a} :: EndpointInput)

-- | In a classification problem, the attribute that represents the class
-- probability.
endpointInput_probabilityAttribute :: Lens.Lens' EndpointInput (Prelude.Maybe Prelude.Text)
endpointInput_probabilityAttribute :: (Maybe Text -> f (Maybe Text)) -> EndpointInput -> f EndpointInput
endpointInput_probabilityAttribute = (EndpointInput -> Maybe Text)
-> (EndpointInput -> Maybe Text -> EndpointInput)
-> Lens EndpointInput EndpointInput (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EndpointInput' {Maybe Text
probabilityAttribute :: Maybe Text
$sel:probabilityAttribute:EndpointInput' :: EndpointInput -> Maybe Text
probabilityAttribute} -> Maybe Text
probabilityAttribute) (\s :: EndpointInput
s@EndpointInput' {} Maybe Text
a -> EndpointInput
s {$sel:probabilityAttribute:EndpointInput' :: Maybe Text
probabilityAttribute = Maybe Text
a} :: EndpointInput)

-- | An endpoint in customer\'s account which has enabled @DataCaptureConfig@
-- enabled.
endpointInput_endpointName :: Lens.Lens' EndpointInput Prelude.Text
endpointInput_endpointName :: (Text -> f Text) -> EndpointInput -> f EndpointInput
endpointInput_endpointName = (EndpointInput -> Text)
-> (EndpointInput -> Text -> EndpointInput)
-> Lens EndpointInput EndpointInput Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EndpointInput' {Text
endpointName :: Text
$sel:endpointName:EndpointInput' :: EndpointInput -> Text
endpointName} -> Text
endpointName) (\s :: EndpointInput
s@EndpointInput' {} Text
a -> EndpointInput
s {$sel:endpointName:EndpointInput' :: Text
endpointName = Text
a} :: EndpointInput)

-- | Path to the filesystem where the endpoint data is available to the
-- container.
endpointInput_localPath :: Lens.Lens' EndpointInput Prelude.Text
endpointInput_localPath :: (Text -> f Text) -> EndpointInput -> f EndpointInput
endpointInput_localPath = (EndpointInput -> Text)
-> (EndpointInput -> Text -> EndpointInput)
-> Lens EndpointInput EndpointInput Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EndpointInput' {Text
localPath :: Text
$sel:localPath:EndpointInput' :: EndpointInput -> Text
localPath} -> Text
localPath) (\s :: EndpointInput
s@EndpointInput' {} Text
a -> EndpointInput
s {$sel:localPath:EndpointInput' :: Text
localPath = Text
a} :: EndpointInput)

instance Core.FromJSON EndpointInput where
  parseJSON :: Value -> Parser EndpointInput
parseJSON =
    String
-> (Object -> Parser EndpointInput)
-> Value
-> Parser EndpointInput
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"EndpointInput"
      ( \Object
x ->
          Maybe Text
-> Maybe ProcessingS3DataDistributionType
-> Maybe ProcessingS3InputMode
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Double
-> Maybe Text
-> Text
-> Text
-> EndpointInput
EndpointInput'
            (Maybe Text
 -> Maybe ProcessingS3DataDistributionType
 -> Maybe ProcessingS3InputMode
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Double
 -> Maybe Text
 -> Text
 -> Text
 -> EndpointInput)
-> Parser (Maybe Text)
-> Parser
     (Maybe ProcessingS3DataDistributionType
      -> Maybe ProcessingS3InputMode
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Double
      -> Maybe Text
      -> Text
      -> Text
      -> EndpointInput)
forall (f :: * -> *) a b. Functor 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
"InferenceAttribute")
            Parser
  (Maybe ProcessingS3DataDistributionType
   -> Maybe ProcessingS3InputMode
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Double
   -> Maybe Text
   -> Text
   -> Text
   -> EndpointInput)
-> Parser (Maybe ProcessingS3DataDistributionType)
-> Parser
     (Maybe ProcessingS3InputMode
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Double
      -> Maybe Text
      -> Text
      -> Text
      -> EndpointInput)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ProcessingS3DataDistributionType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"S3DataDistributionType")
            Parser
  (Maybe ProcessingS3InputMode
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Double
   -> Maybe Text
   -> Text
   -> Text
   -> EndpointInput)
-> Parser (Maybe ProcessingS3InputMode)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Double
      -> Maybe Text
      -> Text
      -> Text
      -> EndpointInput)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ProcessingS3InputMode)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"S3InputMode")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Double
   -> Maybe Text
   -> Text
   -> Text
   -> EndpointInput)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Double
      -> Maybe Text
      -> Text
      -> Text
      -> EndpointInput)
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
"StartTimeOffset")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Double
   -> Maybe Text
   -> Text
   -> Text
   -> EndpointInput)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Double -> Maybe Text -> Text -> Text -> EndpointInput)
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
"FeaturesAttribute")
            Parser
  (Maybe Text
   -> Maybe Double -> Maybe Text -> Text -> Text -> EndpointInput)
-> Parser (Maybe Text)
-> Parser
     (Maybe Double -> Maybe Text -> Text -> Text -> EndpointInput)
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
"EndTimeOffset")
            Parser
  (Maybe Double -> Maybe Text -> Text -> Text -> EndpointInput)
-> Parser (Maybe Double)
-> Parser (Maybe Text -> Text -> Text -> EndpointInput)
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
"ProbabilityThresholdAttribute")
            Parser (Maybe Text -> Text -> Text -> EndpointInput)
-> Parser (Maybe Text) -> Parser (Text -> Text -> EndpointInput)
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
"ProbabilityAttribute")
            Parser (Text -> Text -> EndpointInput)
-> Parser Text -> Parser (Text -> EndpointInput)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"EndpointName")
            Parser (Text -> EndpointInput)
-> Parser Text -> Parser EndpointInput
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"LocalPath")
      )

instance Prelude.Hashable EndpointInput

instance Prelude.NFData EndpointInput

instance Core.ToJSON EndpointInput where
  toJSON :: EndpointInput -> Value
toJSON EndpointInput' {Maybe Double
Maybe Text
Maybe ProcessingS3DataDistributionType
Maybe ProcessingS3InputMode
Text
localPath :: Text
endpointName :: Text
probabilityAttribute :: Maybe Text
probabilityThresholdAttribute :: Maybe Double
endTimeOffset :: Maybe Text
featuresAttribute :: Maybe Text
startTimeOffset :: Maybe Text
s3InputMode :: Maybe ProcessingS3InputMode
s3DataDistributionType :: Maybe ProcessingS3DataDistributionType
inferenceAttribute :: Maybe Text
$sel:localPath:EndpointInput' :: EndpointInput -> Text
$sel:endpointName:EndpointInput' :: EndpointInput -> Text
$sel:probabilityAttribute:EndpointInput' :: EndpointInput -> Maybe Text
$sel:probabilityThresholdAttribute:EndpointInput' :: EndpointInput -> Maybe Double
$sel:endTimeOffset:EndpointInput' :: EndpointInput -> Maybe Text
$sel:featuresAttribute:EndpointInput' :: EndpointInput -> Maybe Text
$sel:startTimeOffset:EndpointInput' :: EndpointInput -> Maybe Text
$sel:s3InputMode:EndpointInput' :: EndpointInput -> Maybe ProcessingS3InputMode
$sel:s3DataDistributionType:EndpointInput' :: EndpointInput -> Maybe ProcessingS3DataDistributionType
$sel:inferenceAttribute:EndpointInput' :: EndpointInput -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"InferenceAttribute" 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
inferenceAttribute,
            (Text
"S3DataDistributionType" Text -> ProcessingS3DataDistributionType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (ProcessingS3DataDistributionType -> Pair)
-> Maybe ProcessingS3DataDistributionType -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ProcessingS3DataDistributionType
s3DataDistributionType,
            (Text
"S3InputMode" Text -> ProcessingS3InputMode -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (ProcessingS3InputMode -> Pair)
-> Maybe ProcessingS3InputMode -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ProcessingS3InputMode
s3InputMode,
            (Text
"StartTimeOffset" 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
startTimeOffset,
            (Text
"FeaturesAttribute" 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
featuresAttribute,
            (Text
"EndTimeOffset" 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
endTimeOffset,
            (Text
"ProbabilityThresholdAttribute" 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
probabilityThresholdAttribute,
            (Text
"ProbabilityAttribute" 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
probabilityAttribute,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"EndpointName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
endpointName),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"LocalPath" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
localPath)
          ]
      )