{-# 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.KinesisAnalytics.Types.InputProcessingConfigurationDescription
-- 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.KinesisAnalytics.Types.InputProcessingConfigurationDescription where

import qualified Amazonka.Core as Core
import Amazonka.KinesisAnalytics.Types.InputLambdaProcessorDescription
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Provides configuration information about an input processor. Currently,
-- the only input processor available is
-- <https://docs.aws.amazon.com/lambda/ AWS Lambda>.
--
-- /See:/ 'newInputProcessingConfigurationDescription' smart constructor.
data InputProcessingConfigurationDescription = InputProcessingConfigurationDescription'
  { -- | Provides configuration information about the associated
    -- <https://docs.aws.amazon.com/kinesisanalytics/latest/dev/API_InputLambdaProcessorDescription.html InputLambdaProcessorDescription>.
    InputProcessingConfigurationDescription
-> Maybe InputLambdaProcessorDescription
inputLambdaProcessorDescription :: Prelude.Maybe InputLambdaProcessorDescription
  }
  deriving (InputProcessingConfigurationDescription
-> InputProcessingConfigurationDescription -> Bool
(InputProcessingConfigurationDescription
 -> InputProcessingConfigurationDescription -> Bool)
-> (InputProcessingConfigurationDescription
    -> InputProcessingConfigurationDescription -> Bool)
-> Eq InputProcessingConfigurationDescription
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: InputProcessingConfigurationDescription
-> InputProcessingConfigurationDescription -> Bool
$c/= :: InputProcessingConfigurationDescription
-> InputProcessingConfigurationDescription -> Bool
== :: InputProcessingConfigurationDescription
-> InputProcessingConfigurationDescription -> Bool
$c== :: InputProcessingConfigurationDescription
-> InputProcessingConfigurationDescription -> Bool
Prelude.Eq, ReadPrec [InputProcessingConfigurationDescription]
ReadPrec InputProcessingConfigurationDescription
Int -> ReadS InputProcessingConfigurationDescription
ReadS [InputProcessingConfigurationDescription]
(Int -> ReadS InputProcessingConfigurationDescription)
-> ReadS [InputProcessingConfigurationDescription]
-> ReadPrec InputProcessingConfigurationDescription
-> ReadPrec [InputProcessingConfigurationDescription]
-> Read InputProcessingConfigurationDescription
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [InputProcessingConfigurationDescription]
$creadListPrec :: ReadPrec [InputProcessingConfigurationDescription]
readPrec :: ReadPrec InputProcessingConfigurationDescription
$creadPrec :: ReadPrec InputProcessingConfigurationDescription
readList :: ReadS [InputProcessingConfigurationDescription]
$creadList :: ReadS [InputProcessingConfigurationDescription]
readsPrec :: Int -> ReadS InputProcessingConfigurationDescription
$creadsPrec :: Int -> ReadS InputProcessingConfigurationDescription
Prelude.Read, Int -> InputProcessingConfigurationDescription -> ShowS
[InputProcessingConfigurationDescription] -> ShowS
InputProcessingConfigurationDescription -> String
(Int -> InputProcessingConfigurationDescription -> ShowS)
-> (InputProcessingConfigurationDescription -> String)
-> ([InputProcessingConfigurationDescription] -> ShowS)
-> Show InputProcessingConfigurationDescription
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [InputProcessingConfigurationDescription] -> ShowS
$cshowList :: [InputProcessingConfigurationDescription] -> ShowS
show :: InputProcessingConfigurationDescription -> String
$cshow :: InputProcessingConfigurationDescription -> String
showsPrec :: Int -> InputProcessingConfigurationDescription -> ShowS
$cshowsPrec :: Int -> InputProcessingConfigurationDescription -> ShowS
Prelude.Show, (forall x.
 InputProcessingConfigurationDescription
 -> Rep InputProcessingConfigurationDescription x)
-> (forall x.
    Rep InputProcessingConfigurationDescription x
    -> InputProcessingConfigurationDescription)
-> Generic InputProcessingConfigurationDescription
forall x.
Rep InputProcessingConfigurationDescription x
-> InputProcessingConfigurationDescription
forall x.
InputProcessingConfigurationDescription
-> Rep InputProcessingConfigurationDescription x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep InputProcessingConfigurationDescription x
-> InputProcessingConfigurationDescription
$cfrom :: forall x.
InputProcessingConfigurationDescription
-> Rep InputProcessingConfigurationDescription x
Prelude.Generic)

-- |
-- Create a value of 'InputProcessingConfigurationDescription' 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:
--
-- 'inputLambdaProcessorDescription', 'inputProcessingConfigurationDescription_inputLambdaProcessorDescription' - Provides configuration information about the associated
-- <https://docs.aws.amazon.com/kinesisanalytics/latest/dev/API_InputLambdaProcessorDescription.html InputLambdaProcessorDescription>.
newInputProcessingConfigurationDescription ::
  InputProcessingConfigurationDescription
newInputProcessingConfigurationDescription :: InputProcessingConfigurationDescription
newInputProcessingConfigurationDescription =
  InputProcessingConfigurationDescription' :: Maybe InputLambdaProcessorDescription
-> InputProcessingConfigurationDescription
InputProcessingConfigurationDescription'
    { $sel:inputLambdaProcessorDescription:InputProcessingConfigurationDescription' :: Maybe InputLambdaProcessorDescription
inputLambdaProcessorDescription =
        Maybe InputLambdaProcessorDescription
forall a. Maybe a
Prelude.Nothing
    }

-- | Provides configuration information about the associated
-- <https://docs.aws.amazon.com/kinesisanalytics/latest/dev/API_InputLambdaProcessorDescription.html InputLambdaProcessorDescription>.
inputProcessingConfigurationDescription_inputLambdaProcessorDescription :: Lens.Lens' InputProcessingConfigurationDescription (Prelude.Maybe InputLambdaProcessorDescription)
inputProcessingConfigurationDescription_inputLambdaProcessorDescription :: (Maybe InputLambdaProcessorDescription
 -> f (Maybe InputLambdaProcessorDescription))
-> InputProcessingConfigurationDescription
-> f InputProcessingConfigurationDescription
inputProcessingConfigurationDescription_inputLambdaProcessorDescription = (InputProcessingConfigurationDescription
 -> Maybe InputLambdaProcessorDescription)
-> (InputProcessingConfigurationDescription
    -> Maybe InputLambdaProcessorDescription
    -> InputProcessingConfigurationDescription)
-> Lens
     InputProcessingConfigurationDescription
     InputProcessingConfigurationDescription
     (Maybe InputLambdaProcessorDescription)
     (Maybe InputLambdaProcessorDescription)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InputProcessingConfigurationDescription' {Maybe InputLambdaProcessorDescription
inputLambdaProcessorDescription :: Maybe InputLambdaProcessorDescription
$sel:inputLambdaProcessorDescription:InputProcessingConfigurationDescription' :: InputProcessingConfigurationDescription
-> Maybe InputLambdaProcessorDescription
inputLambdaProcessorDescription} -> Maybe InputLambdaProcessorDescription
inputLambdaProcessorDescription) (\s :: InputProcessingConfigurationDescription
s@InputProcessingConfigurationDescription' {} Maybe InputLambdaProcessorDescription
a -> InputProcessingConfigurationDescription
s {$sel:inputLambdaProcessorDescription:InputProcessingConfigurationDescription' :: Maybe InputLambdaProcessorDescription
inputLambdaProcessorDescription = Maybe InputLambdaProcessorDescription
a} :: InputProcessingConfigurationDescription)

instance
  Core.FromJSON
    InputProcessingConfigurationDescription
  where
  parseJSON :: Value -> Parser InputProcessingConfigurationDescription
parseJSON =
    String
-> (Object -> Parser InputProcessingConfigurationDescription)
-> Value
-> Parser InputProcessingConfigurationDescription
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"InputProcessingConfigurationDescription"
      ( \Object
x ->
          Maybe InputLambdaProcessorDescription
-> InputProcessingConfigurationDescription
InputProcessingConfigurationDescription'
            (Maybe InputLambdaProcessorDescription
 -> InputProcessingConfigurationDescription)
-> Parser (Maybe InputLambdaProcessorDescription)
-> Parser InputProcessingConfigurationDescription
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe InputLambdaProcessorDescription)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"InputLambdaProcessorDescription")
      )

instance
  Prelude.Hashable
    InputProcessingConfigurationDescription

instance
  Prelude.NFData
    InputProcessingConfigurationDescription