{-# 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.InputProcessingConfigurationUpdate
-- 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.InputProcessingConfigurationUpdate where

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

-- | Describes updates to an
-- <https://docs.aws.amazon.com/kinesisanalytics/latest/dev/API_InputProcessingConfiguration.html InputProcessingConfiguration>.
--
-- /See:/ 'newInputProcessingConfigurationUpdate' smart constructor.
data InputProcessingConfigurationUpdate = InputProcessingConfigurationUpdate'
  { -- | Provides update information for an
    -- <https://docs.aws.amazon.com/kinesisanalytics/latest/dev/API_InputLambdaProcessor.html InputLambdaProcessor>.
    InputProcessingConfigurationUpdate -> InputLambdaProcessorUpdate
inputLambdaProcessorUpdate :: InputLambdaProcessorUpdate
  }
  deriving (InputProcessingConfigurationUpdate
-> InputProcessingConfigurationUpdate -> Bool
(InputProcessingConfigurationUpdate
 -> InputProcessingConfigurationUpdate -> Bool)
-> (InputProcessingConfigurationUpdate
    -> InputProcessingConfigurationUpdate -> Bool)
-> Eq InputProcessingConfigurationUpdate
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: InputProcessingConfigurationUpdate
-> InputProcessingConfigurationUpdate -> Bool
$c/= :: InputProcessingConfigurationUpdate
-> InputProcessingConfigurationUpdate -> Bool
== :: InputProcessingConfigurationUpdate
-> InputProcessingConfigurationUpdate -> Bool
$c== :: InputProcessingConfigurationUpdate
-> InputProcessingConfigurationUpdate -> Bool
Prelude.Eq, ReadPrec [InputProcessingConfigurationUpdate]
ReadPrec InputProcessingConfigurationUpdate
Int -> ReadS InputProcessingConfigurationUpdate
ReadS [InputProcessingConfigurationUpdate]
(Int -> ReadS InputProcessingConfigurationUpdate)
-> ReadS [InputProcessingConfigurationUpdate]
-> ReadPrec InputProcessingConfigurationUpdate
-> ReadPrec [InputProcessingConfigurationUpdate]
-> Read InputProcessingConfigurationUpdate
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [InputProcessingConfigurationUpdate]
$creadListPrec :: ReadPrec [InputProcessingConfigurationUpdate]
readPrec :: ReadPrec InputProcessingConfigurationUpdate
$creadPrec :: ReadPrec InputProcessingConfigurationUpdate
readList :: ReadS [InputProcessingConfigurationUpdate]
$creadList :: ReadS [InputProcessingConfigurationUpdate]
readsPrec :: Int -> ReadS InputProcessingConfigurationUpdate
$creadsPrec :: Int -> ReadS InputProcessingConfigurationUpdate
Prelude.Read, Int -> InputProcessingConfigurationUpdate -> ShowS
[InputProcessingConfigurationUpdate] -> ShowS
InputProcessingConfigurationUpdate -> String
(Int -> InputProcessingConfigurationUpdate -> ShowS)
-> (InputProcessingConfigurationUpdate -> String)
-> ([InputProcessingConfigurationUpdate] -> ShowS)
-> Show InputProcessingConfigurationUpdate
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [InputProcessingConfigurationUpdate] -> ShowS
$cshowList :: [InputProcessingConfigurationUpdate] -> ShowS
show :: InputProcessingConfigurationUpdate -> String
$cshow :: InputProcessingConfigurationUpdate -> String
showsPrec :: Int -> InputProcessingConfigurationUpdate -> ShowS
$cshowsPrec :: Int -> InputProcessingConfigurationUpdate -> ShowS
Prelude.Show, (forall x.
 InputProcessingConfigurationUpdate
 -> Rep InputProcessingConfigurationUpdate x)
-> (forall x.
    Rep InputProcessingConfigurationUpdate x
    -> InputProcessingConfigurationUpdate)
-> Generic InputProcessingConfigurationUpdate
forall x.
Rep InputProcessingConfigurationUpdate x
-> InputProcessingConfigurationUpdate
forall x.
InputProcessingConfigurationUpdate
-> Rep InputProcessingConfigurationUpdate x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep InputProcessingConfigurationUpdate x
-> InputProcessingConfigurationUpdate
$cfrom :: forall x.
InputProcessingConfigurationUpdate
-> Rep InputProcessingConfigurationUpdate x
Prelude.Generic)

-- |
-- Create a value of 'InputProcessingConfigurationUpdate' 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:
--
-- 'inputLambdaProcessorUpdate', 'inputProcessingConfigurationUpdate_inputLambdaProcessorUpdate' - Provides update information for an
-- <https://docs.aws.amazon.com/kinesisanalytics/latest/dev/API_InputLambdaProcessor.html InputLambdaProcessor>.
newInputProcessingConfigurationUpdate ::
  -- | 'inputLambdaProcessorUpdate'
  InputLambdaProcessorUpdate ->
  InputProcessingConfigurationUpdate
newInputProcessingConfigurationUpdate :: InputLambdaProcessorUpdate -> InputProcessingConfigurationUpdate
newInputProcessingConfigurationUpdate
  InputLambdaProcessorUpdate
pInputLambdaProcessorUpdate_ =
    InputProcessingConfigurationUpdate' :: InputLambdaProcessorUpdate -> InputProcessingConfigurationUpdate
InputProcessingConfigurationUpdate'
      { $sel:inputLambdaProcessorUpdate:InputProcessingConfigurationUpdate' :: InputLambdaProcessorUpdate
inputLambdaProcessorUpdate =
          InputLambdaProcessorUpdate
pInputLambdaProcessorUpdate_
      }

-- | Provides update information for an
-- <https://docs.aws.amazon.com/kinesisanalytics/latest/dev/API_InputLambdaProcessor.html InputLambdaProcessor>.
inputProcessingConfigurationUpdate_inputLambdaProcessorUpdate :: Lens.Lens' InputProcessingConfigurationUpdate InputLambdaProcessorUpdate
inputProcessingConfigurationUpdate_inputLambdaProcessorUpdate :: (InputLambdaProcessorUpdate -> f InputLambdaProcessorUpdate)
-> InputProcessingConfigurationUpdate
-> f InputProcessingConfigurationUpdate
inputProcessingConfigurationUpdate_inputLambdaProcessorUpdate = (InputProcessingConfigurationUpdate -> InputLambdaProcessorUpdate)
-> (InputProcessingConfigurationUpdate
    -> InputLambdaProcessorUpdate
    -> InputProcessingConfigurationUpdate)
-> Lens
     InputProcessingConfigurationUpdate
     InputProcessingConfigurationUpdate
     InputLambdaProcessorUpdate
     InputLambdaProcessorUpdate
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InputProcessingConfigurationUpdate' {InputLambdaProcessorUpdate
inputLambdaProcessorUpdate :: InputLambdaProcessorUpdate
$sel:inputLambdaProcessorUpdate:InputProcessingConfigurationUpdate' :: InputProcessingConfigurationUpdate -> InputLambdaProcessorUpdate
inputLambdaProcessorUpdate} -> InputLambdaProcessorUpdate
inputLambdaProcessorUpdate) (\s :: InputProcessingConfigurationUpdate
s@InputProcessingConfigurationUpdate' {} InputLambdaProcessorUpdate
a -> InputProcessingConfigurationUpdate
s {$sel:inputLambdaProcessorUpdate:InputProcessingConfigurationUpdate' :: InputLambdaProcessorUpdate
inputLambdaProcessorUpdate = InputLambdaProcessorUpdate
a} :: InputProcessingConfigurationUpdate)

instance
  Prelude.Hashable
    InputProcessingConfigurationUpdate

instance
  Prelude.NFData
    InputProcessingConfigurationUpdate

instance
  Core.ToJSON
    InputProcessingConfigurationUpdate
  where
  toJSON :: InputProcessingConfigurationUpdate -> Value
toJSON InputProcessingConfigurationUpdate' {InputLambdaProcessorUpdate
inputLambdaProcessorUpdate :: InputLambdaProcessorUpdate
$sel:inputLambdaProcessorUpdate:InputProcessingConfigurationUpdate' :: InputProcessingConfigurationUpdate -> InputLambdaProcessorUpdate
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              ( Text
"InputLambdaProcessorUpdate"
                  Text -> InputLambdaProcessorUpdate -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= InputLambdaProcessorUpdate
inputLambdaProcessorUpdate
              )
          ]
      )