{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}

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

-- |
-- Module      : Amazonka.KinesisAnalyticsV2.AddApplicationInputProcessingConfiguration
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Adds an InputProcessingConfiguration to a SQL-based Kinesis Data
-- Analytics application. An input processor pre-processes records on the
-- input stream before the application\'s SQL code executes. Currently, the
-- only input processor available is
-- <https://docs.aws.amazon.com/lambda/ Amazon Lambda>.
module Amazonka.KinesisAnalyticsV2.AddApplicationInputProcessingConfiguration
  ( -- * Creating a Request
    AddApplicationInputProcessingConfiguration (..),
    newAddApplicationInputProcessingConfiguration,

    -- * Request Lenses
    addApplicationInputProcessingConfiguration_applicationName,
    addApplicationInputProcessingConfiguration_currentApplicationVersionId,
    addApplicationInputProcessingConfiguration_inputId,
    addApplicationInputProcessingConfiguration_inputProcessingConfiguration,

    -- * Destructuring the Response
    AddApplicationInputProcessingConfigurationResponse (..),
    newAddApplicationInputProcessingConfigurationResponse,

    -- * Response Lenses
    addApplicationInputProcessingConfigurationResponse_applicationARN,
    addApplicationInputProcessingConfigurationResponse_applicationVersionId,
    addApplicationInputProcessingConfigurationResponse_inputId,
    addApplicationInputProcessingConfigurationResponse_inputProcessingConfigurationDescription,
    addApplicationInputProcessingConfigurationResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.KinesisAnalyticsV2.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newAddApplicationInputProcessingConfiguration' smart constructor.
data AddApplicationInputProcessingConfiguration = AddApplicationInputProcessingConfiguration'
  { -- | The name of the application to which you want to add the input
    -- processing configuration.
    AddApplicationInputProcessingConfiguration -> Text
applicationName :: Prelude.Text,
    -- | The version of the application to which you want to add the input
    -- processing configuration. You can use the DescribeApplication operation
    -- to get the current application version. If the version specified is not
    -- the current version, the @ConcurrentModificationException@ is returned.
    AddApplicationInputProcessingConfiguration -> Natural
currentApplicationVersionId :: Prelude.Natural,
    -- | The ID of the input configuration to add the input processing
    -- configuration to. You can get a list of the input IDs for an application
    -- using the DescribeApplication operation.
    AddApplicationInputProcessingConfiguration -> Text
inputId :: Prelude.Text,
    -- | The InputProcessingConfiguration to add to the application.
    AddApplicationInputProcessingConfiguration
-> InputProcessingConfiguration
inputProcessingConfiguration :: InputProcessingConfiguration
  }
  deriving (AddApplicationInputProcessingConfiguration
-> AddApplicationInputProcessingConfiguration -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AddApplicationInputProcessingConfiguration
-> AddApplicationInputProcessingConfiguration -> Bool
$c/= :: AddApplicationInputProcessingConfiguration
-> AddApplicationInputProcessingConfiguration -> Bool
== :: AddApplicationInputProcessingConfiguration
-> AddApplicationInputProcessingConfiguration -> Bool
$c== :: AddApplicationInputProcessingConfiguration
-> AddApplicationInputProcessingConfiguration -> Bool
Prelude.Eq, ReadPrec [AddApplicationInputProcessingConfiguration]
ReadPrec AddApplicationInputProcessingConfiguration
Int -> ReadS AddApplicationInputProcessingConfiguration
ReadS [AddApplicationInputProcessingConfiguration]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AddApplicationInputProcessingConfiguration]
$creadListPrec :: ReadPrec [AddApplicationInputProcessingConfiguration]
readPrec :: ReadPrec AddApplicationInputProcessingConfiguration
$creadPrec :: ReadPrec AddApplicationInputProcessingConfiguration
readList :: ReadS [AddApplicationInputProcessingConfiguration]
$creadList :: ReadS [AddApplicationInputProcessingConfiguration]
readsPrec :: Int -> ReadS AddApplicationInputProcessingConfiguration
$creadsPrec :: Int -> ReadS AddApplicationInputProcessingConfiguration
Prelude.Read, Int -> AddApplicationInputProcessingConfiguration -> ShowS
[AddApplicationInputProcessingConfiguration] -> ShowS
AddApplicationInputProcessingConfiguration -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AddApplicationInputProcessingConfiguration] -> ShowS
$cshowList :: [AddApplicationInputProcessingConfiguration] -> ShowS
show :: AddApplicationInputProcessingConfiguration -> String
$cshow :: AddApplicationInputProcessingConfiguration -> String
showsPrec :: Int -> AddApplicationInputProcessingConfiguration -> ShowS
$cshowsPrec :: Int -> AddApplicationInputProcessingConfiguration -> ShowS
Prelude.Show, forall x.
Rep AddApplicationInputProcessingConfiguration x
-> AddApplicationInputProcessingConfiguration
forall x.
AddApplicationInputProcessingConfiguration
-> Rep AddApplicationInputProcessingConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AddApplicationInputProcessingConfiguration x
-> AddApplicationInputProcessingConfiguration
$cfrom :: forall x.
AddApplicationInputProcessingConfiguration
-> Rep AddApplicationInputProcessingConfiguration x
Prelude.Generic)

-- |
-- Create a value of 'AddApplicationInputProcessingConfiguration' 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:
--
-- 'applicationName', 'addApplicationInputProcessingConfiguration_applicationName' - The name of the application to which you want to add the input
-- processing configuration.
--
-- 'currentApplicationVersionId', 'addApplicationInputProcessingConfiguration_currentApplicationVersionId' - The version of the application to which you want to add the input
-- processing configuration. You can use the DescribeApplication operation
-- to get the current application version. If the version specified is not
-- the current version, the @ConcurrentModificationException@ is returned.
--
-- 'inputId', 'addApplicationInputProcessingConfiguration_inputId' - The ID of the input configuration to add the input processing
-- configuration to. You can get a list of the input IDs for an application
-- using the DescribeApplication operation.
--
-- 'inputProcessingConfiguration', 'addApplicationInputProcessingConfiguration_inputProcessingConfiguration' - The InputProcessingConfiguration to add to the application.
newAddApplicationInputProcessingConfiguration ::
  -- | 'applicationName'
  Prelude.Text ->
  -- | 'currentApplicationVersionId'
  Prelude.Natural ->
  -- | 'inputId'
  Prelude.Text ->
  -- | 'inputProcessingConfiguration'
  InputProcessingConfiguration ->
  AddApplicationInputProcessingConfiguration
newAddApplicationInputProcessingConfiguration :: Text
-> Natural
-> Text
-> InputProcessingConfiguration
-> AddApplicationInputProcessingConfiguration
newAddApplicationInputProcessingConfiguration
  Text
pApplicationName_
  Natural
pCurrentApplicationVersionId_
  Text
pInputId_
  InputProcessingConfiguration
pInputProcessingConfiguration_ =
    AddApplicationInputProcessingConfiguration'
      { $sel:applicationName:AddApplicationInputProcessingConfiguration' :: Text
applicationName =
          Text
pApplicationName_,
        $sel:currentApplicationVersionId:AddApplicationInputProcessingConfiguration' :: Natural
currentApplicationVersionId =
          Natural
pCurrentApplicationVersionId_,
        $sel:inputId:AddApplicationInputProcessingConfiguration' :: Text
inputId = Text
pInputId_,
        $sel:inputProcessingConfiguration:AddApplicationInputProcessingConfiguration' :: InputProcessingConfiguration
inputProcessingConfiguration =
          InputProcessingConfiguration
pInputProcessingConfiguration_
      }

-- | The name of the application to which you want to add the input
-- processing configuration.
addApplicationInputProcessingConfiguration_applicationName :: Lens.Lens' AddApplicationInputProcessingConfiguration Prelude.Text
addApplicationInputProcessingConfiguration_applicationName :: Lens' AddApplicationInputProcessingConfiguration Text
addApplicationInputProcessingConfiguration_applicationName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AddApplicationInputProcessingConfiguration' {Text
applicationName :: Text
$sel:applicationName:AddApplicationInputProcessingConfiguration' :: AddApplicationInputProcessingConfiguration -> Text
applicationName} -> Text
applicationName) (\s :: AddApplicationInputProcessingConfiguration
s@AddApplicationInputProcessingConfiguration' {} Text
a -> AddApplicationInputProcessingConfiguration
s {$sel:applicationName:AddApplicationInputProcessingConfiguration' :: Text
applicationName = Text
a} :: AddApplicationInputProcessingConfiguration)

-- | The version of the application to which you want to add the input
-- processing configuration. You can use the DescribeApplication operation
-- to get the current application version. If the version specified is not
-- the current version, the @ConcurrentModificationException@ is returned.
addApplicationInputProcessingConfiguration_currentApplicationVersionId :: Lens.Lens' AddApplicationInputProcessingConfiguration Prelude.Natural
addApplicationInputProcessingConfiguration_currentApplicationVersionId :: Lens' AddApplicationInputProcessingConfiguration Natural
addApplicationInputProcessingConfiguration_currentApplicationVersionId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AddApplicationInputProcessingConfiguration' {Natural
currentApplicationVersionId :: Natural
$sel:currentApplicationVersionId:AddApplicationInputProcessingConfiguration' :: AddApplicationInputProcessingConfiguration -> Natural
currentApplicationVersionId} -> Natural
currentApplicationVersionId) (\s :: AddApplicationInputProcessingConfiguration
s@AddApplicationInputProcessingConfiguration' {} Natural
a -> AddApplicationInputProcessingConfiguration
s {$sel:currentApplicationVersionId:AddApplicationInputProcessingConfiguration' :: Natural
currentApplicationVersionId = Natural
a} :: AddApplicationInputProcessingConfiguration)

-- | The ID of the input configuration to add the input processing
-- configuration to. You can get a list of the input IDs for an application
-- using the DescribeApplication operation.
addApplicationInputProcessingConfiguration_inputId :: Lens.Lens' AddApplicationInputProcessingConfiguration Prelude.Text
addApplicationInputProcessingConfiguration_inputId :: Lens' AddApplicationInputProcessingConfiguration Text
addApplicationInputProcessingConfiguration_inputId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AddApplicationInputProcessingConfiguration' {Text
inputId :: Text
$sel:inputId:AddApplicationInputProcessingConfiguration' :: AddApplicationInputProcessingConfiguration -> Text
inputId} -> Text
inputId) (\s :: AddApplicationInputProcessingConfiguration
s@AddApplicationInputProcessingConfiguration' {} Text
a -> AddApplicationInputProcessingConfiguration
s {$sel:inputId:AddApplicationInputProcessingConfiguration' :: Text
inputId = Text
a} :: AddApplicationInputProcessingConfiguration)

-- | The InputProcessingConfiguration to add to the application.
addApplicationInputProcessingConfiguration_inputProcessingConfiguration :: Lens.Lens' AddApplicationInputProcessingConfiguration InputProcessingConfiguration
addApplicationInputProcessingConfiguration_inputProcessingConfiguration :: Lens'
  AddApplicationInputProcessingConfiguration
  InputProcessingConfiguration
addApplicationInputProcessingConfiguration_inputProcessingConfiguration = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AddApplicationInputProcessingConfiguration' {InputProcessingConfiguration
inputProcessingConfiguration :: InputProcessingConfiguration
$sel:inputProcessingConfiguration:AddApplicationInputProcessingConfiguration' :: AddApplicationInputProcessingConfiguration
-> InputProcessingConfiguration
inputProcessingConfiguration} -> InputProcessingConfiguration
inputProcessingConfiguration) (\s :: AddApplicationInputProcessingConfiguration
s@AddApplicationInputProcessingConfiguration' {} InputProcessingConfiguration
a -> AddApplicationInputProcessingConfiguration
s {$sel:inputProcessingConfiguration:AddApplicationInputProcessingConfiguration' :: InputProcessingConfiguration
inputProcessingConfiguration = InputProcessingConfiguration
a} :: AddApplicationInputProcessingConfiguration)

instance
  Core.AWSRequest
    AddApplicationInputProcessingConfiguration
  where
  type
    AWSResponse
      AddApplicationInputProcessingConfiguration =
      AddApplicationInputProcessingConfigurationResponse
  request :: (Service -> Service)
-> AddApplicationInputProcessingConfiguration
-> Request AddApplicationInputProcessingConfiguration
request Service -> Service
overrides =
    forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy AddApplicationInputProcessingConfiguration
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse
           (AWSResponse AddApplicationInputProcessingConfiguration)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe Text
-> Maybe Natural
-> Maybe Text
-> Maybe InputProcessingConfigurationDescription
-> Int
-> AddApplicationInputProcessingConfigurationResponse
AddApplicationInputProcessingConfigurationResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"ApplicationARN")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"ApplicationVersionId")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"InputId")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x
                            forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"InputProcessingConfigurationDescription"
                        )
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance
  Prelude.Hashable
    AddApplicationInputProcessingConfiguration
  where
  hashWithSalt :: Int -> AddApplicationInputProcessingConfiguration -> Int
hashWithSalt
    Int
_salt
    AddApplicationInputProcessingConfiguration' {Natural
Text
InputProcessingConfiguration
inputProcessingConfiguration :: InputProcessingConfiguration
inputId :: Text
currentApplicationVersionId :: Natural
applicationName :: Text
$sel:inputProcessingConfiguration:AddApplicationInputProcessingConfiguration' :: AddApplicationInputProcessingConfiguration
-> InputProcessingConfiguration
$sel:inputId:AddApplicationInputProcessingConfiguration' :: AddApplicationInputProcessingConfiguration -> Text
$sel:currentApplicationVersionId:AddApplicationInputProcessingConfiguration' :: AddApplicationInputProcessingConfiguration -> Natural
$sel:applicationName:AddApplicationInputProcessingConfiguration' :: AddApplicationInputProcessingConfiguration -> Text
..} =
      Int
_salt
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
applicationName
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Natural
currentApplicationVersionId
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
inputId
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` InputProcessingConfiguration
inputProcessingConfiguration

instance
  Prelude.NFData
    AddApplicationInputProcessingConfiguration
  where
  rnf :: AddApplicationInputProcessingConfiguration -> ()
rnf AddApplicationInputProcessingConfiguration' {Natural
Text
InputProcessingConfiguration
inputProcessingConfiguration :: InputProcessingConfiguration
inputId :: Text
currentApplicationVersionId :: Natural
applicationName :: Text
$sel:inputProcessingConfiguration:AddApplicationInputProcessingConfiguration' :: AddApplicationInputProcessingConfiguration
-> InputProcessingConfiguration
$sel:inputId:AddApplicationInputProcessingConfiguration' :: AddApplicationInputProcessingConfiguration -> Text
$sel:currentApplicationVersionId:AddApplicationInputProcessingConfiguration' :: AddApplicationInputProcessingConfiguration -> Natural
$sel:applicationName:AddApplicationInputProcessingConfiguration' :: AddApplicationInputProcessingConfiguration -> Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Text
applicationName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Natural
currentApplicationVersionId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
inputId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf InputProcessingConfiguration
inputProcessingConfiguration

instance
  Data.ToHeaders
    AddApplicationInputProcessingConfiguration
  where
  toHeaders :: AddApplicationInputProcessingConfiguration -> ResponseHeaders
toHeaders =
    forall a b. a -> b -> a
Prelude.const
      ( forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"X-Amz-Target"
              forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"KinesisAnalytics_20180523.AddApplicationInputProcessingConfiguration" ::
                          Prelude.ByteString
                      ),
            HeaderName
"Content-Type"
              forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance
  Data.ToJSON
    AddApplicationInputProcessingConfiguration
  where
  toJSON :: AddApplicationInputProcessingConfiguration -> Value
toJSON
    AddApplicationInputProcessingConfiguration' {Natural
Text
InputProcessingConfiguration
inputProcessingConfiguration :: InputProcessingConfiguration
inputId :: Text
currentApplicationVersionId :: Natural
applicationName :: Text
$sel:inputProcessingConfiguration:AddApplicationInputProcessingConfiguration' :: AddApplicationInputProcessingConfiguration
-> InputProcessingConfiguration
$sel:inputId:AddApplicationInputProcessingConfiguration' :: AddApplicationInputProcessingConfiguration -> Text
$sel:currentApplicationVersionId:AddApplicationInputProcessingConfiguration' :: AddApplicationInputProcessingConfiguration -> Natural
$sel:applicationName:AddApplicationInputProcessingConfiguration' :: AddApplicationInputProcessingConfiguration -> Text
..} =
      [Pair] -> Value
Data.object
        ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
            [ forall a. a -> Maybe a
Prelude.Just
                (Key
"ApplicationName" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
applicationName),
              forall a. a -> Maybe a
Prelude.Just
                ( Key
"CurrentApplicationVersionId"
                    forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Natural
currentApplicationVersionId
                ),
              forall a. a -> Maybe a
Prelude.Just (Key
"InputId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
inputId),
              forall a. a -> Maybe a
Prelude.Just
                ( Key
"InputProcessingConfiguration"
                    forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= InputProcessingConfiguration
inputProcessingConfiguration
                )
            ]
        )

instance
  Data.ToPath
    AddApplicationInputProcessingConfiguration
  where
  toPath :: AddApplicationInputProcessingConfiguration -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"

instance
  Data.ToQuery
    AddApplicationInputProcessingConfiguration
  where
  toQuery :: AddApplicationInputProcessingConfiguration -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty

-- | /See:/ 'newAddApplicationInputProcessingConfigurationResponse' smart constructor.
data AddApplicationInputProcessingConfigurationResponse = AddApplicationInputProcessingConfigurationResponse'
  { -- | The Amazon Resource Name (ARN) of the application.
    AddApplicationInputProcessingConfigurationResponse -> Maybe Text
applicationARN :: Prelude.Maybe Prelude.Text,
    -- | Provides the current application version.
    AddApplicationInputProcessingConfigurationResponse -> Maybe Natural
applicationVersionId :: Prelude.Maybe Prelude.Natural,
    -- | The input ID that is associated with the application input. This is the
    -- ID that Kinesis Data Analytics assigns to each input configuration that
    -- you add to your application.
    AddApplicationInputProcessingConfigurationResponse -> Maybe Text
inputId :: Prelude.Maybe Prelude.Text,
    -- | The description of the preprocessor that executes on records in this
    -- input before the application\'s code is run.
    AddApplicationInputProcessingConfigurationResponse
-> Maybe InputProcessingConfigurationDescription
inputProcessingConfigurationDescription :: Prelude.Maybe InputProcessingConfigurationDescription,
    -- | The response's http status code.
    AddApplicationInputProcessingConfigurationResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (AddApplicationInputProcessingConfigurationResponse
-> AddApplicationInputProcessingConfigurationResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AddApplicationInputProcessingConfigurationResponse
-> AddApplicationInputProcessingConfigurationResponse -> Bool
$c/= :: AddApplicationInputProcessingConfigurationResponse
-> AddApplicationInputProcessingConfigurationResponse -> Bool
== :: AddApplicationInputProcessingConfigurationResponse
-> AddApplicationInputProcessingConfigurationResponse -> Bool
$c== :: AddApplicationInputProcessingConfigurationResponse
-> AddApplicationInputProcessingConfigurationResponse -> Bool
Prelude.Eq, ReadPrec [AddApplicationInputProcessingConfigurationResponse]
ReadPrec AddApplicationInputProcessingConfigurationResponse
Int -> ReadS AddApplicationInputProcessingConfigurationResponse
ReadS [AddApplicationInputProcessingConfigurationResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AddApplicationInputProcessingConfigurationResponse]
$creadListPrec :: ReadPrec [AddApplicationInputProcessingConfigurationResponse]
readPrec :: ReadPrec AddApplicationInputProcessingConfigurationResponse
$creadPrec :: ReadPrec AddApplicationInputProcessingConfigurationResponse
readList :: ReadS [AddApplicationInputProcessingConfigurationResponse]
$creadList :: ReadS [AddApplicationInputProcessingConfigurationResponse]
readsPrec :: Int -> ReadS AddApplicationInputProcessingConfigurationResponse
$creadsPrec :: Int -> ReadS AddApplicationInputProcessingConfigurationResponse
Prelude.Read, Int -> AddApplicationInputProcessingConfigurationResponse -> ShowS
[AddApplicationInputProcessingConfigurationResponse] -> ShowS
AddApplicationInputProcessingConfigurationResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AddApplicationInputProcessingConfigurationResponse] -> ShowS
$cshowList :: [AddApplicationInputProcessingConfigurationResponse] -> ShowS
show :: AddApplicationInputProcessingConfigurationResponse -> String
$cshow :: AddApplicationInputProcessingConfigurationResponse -> String
showsPrec :: Int -> AddApplicationInputProcessingConfigurationResponse -> ShowS
$cshowsPrec :: Int -> AddApplicationInputProcessingConfigurationResponse -> ShowS
Prelude.Show, forall x.
Rep AddApplicationInputProcessingConfigurationResponse x
-> AddApplicationInputProcessingConfigurationResponse
forall x.
AddApplicationInputProcessingConfigurationResponse
-> Rep AddApplicationInputProcessingConfigurationResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AddApplicationInputProcessingConfigurationResponse x
-> AddApplicationInputProcessingConfigurationResponse
$cfrom :: forall x.
AddApplicationInputProcessingConfigurationResponse
-> Rep AddApplicationInputProcessingConfigurationResponse x
Prelude.Generic)

-- |
-- Create a value of 'AddApplicationInputProcessingConfigurationResponse' 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:
--
-- 'applicationARN', 'addApplicationInputProcessingConfigurationResponse_applicationARN' - The Amazon Resource Name (ARN) of the application.
--
-- 'applicationVersionId', 'addApplicationInputProcessingConfigurationResponse_applicationVersionId' - Provides the current application version.
--
-- 'inputId', 'addApplicationInputProcessingConfigurationResponse_inputId' - The input ID that is associated with the application input. This is the
-- ID that Kinesis Data Analytics assigns to each input configuration that
-- you add to your application.
--
-- 'inputProcessingConfigurationDescription', 'addApplicationInputProcessingConfigurationResponse_inputProcessingConfigurationDescription' - The description of the preprocessor that executes on records in this
-- input before the application\'s code is run.
--
-- 'httpStatus', 'addApplicationInputProcessingConfigurationResponse_httpStatus' - The response's http status code.
newAddApplicationInputProcessingConfigurationResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  AddApplicationInputProcessingConfigurationResponse
newAddApplicationInputProcessingConfigurationResponse :: Int -> AddApplicationInputProcessingConfigurationResponse
newAddApplicationInputProcessingConfigurationResponse
  Int
pHttpStatus_ =
    AddApplicationInputProcessingConfigurationResponse'
      { $sel:applicationARN:AddApplicationInputProcessingConfigurationResponse' :: Maybe Text
applicationARN =
          forall a. Maybe a
Prelude.Nothing,
        $sel:applicationVersionId:AddApplicationInputProcessingConfigurationResponse' :: Maybe Natural
applicationVersionId =
          forall a. Maybe a
Prelude.Nothing,
        $sel:inputId:AddApplicationInputProcessingConfigurationResponse' :: Maybe Text
inputId =
          forall a. Maybe a
Prelude.Nothing,
        $sel:inputProcessingConfigurationDescription:AddApplicationInputProcessingConfigurationResponse' :: Maybe InputProcessingConfigurationDescription
inputProcessingConfigurationDescription =
          forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:AddApplicationInputProcessingConfigurationResponse' :: Int
httpStatus =
          Int
pHttpStatus_
      }

-- | The Amazon Resource Name (ARN) of the application.
addApplicationInputProcessingConfigurationResponse_applicationARN :: Lens.Lens' AddApplicationInputProcessingConfigurationResponse (Prelude.Maybe Prelude.Text)
addApplicationInputProcessingConfigurationResponse_applicationARN :: Lens'
  AddApplicationInputProcessingConfigurationResponse (Maybe Text)
addApplicationInputProcessingConfigurationResponse_applicationARN = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AddApplicationInputProcessingConfigurationResponse' {Maybe Text
applicationARN :: Maybe Text
$sel:applicationARN:AddApplicationInputProcessingConfigurationResponse' :: AddApplicationInputProcessingConfigurationResponse -> Maybe Text
applicationARN} -> Maybe Text
applicationARN) (\s :: AddApplicationInputProcessingConfigurationResponse
s@AddApplicationInputProcessingConfigurationResponse' {} Maybe Text
a -> AddApplicationInputProcessingConfigurationResponse
s {$sel:applicationARN:AddApplicationInputProcessingConfigurationResponse' :: Maybe Text
applicationARN = Maybe Text
a} :: AddApplicationInputProcessingConfigurationResponse)

-- | Provides the current application version.
addApplicationInputProcessingConfigurationResponse_applicationVersionId :: Lens.Lens' AddApplicationInputProcessingConfigurationResponse (Prelude.Maybe Prelude.Natural)
addApplicationInputProcessingConfigurationResponse_applicationVersionId :: Lens'
  AddApplicationInputProcessingConfigurationResponse (Maybe Natural)
addApplicationInputProcessingConfigurationResponse_applicationVersionId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AddApplicationInputProcessingConfigurationResponse' {Maybe Natural
applicationVersionId :: Maybe Natural
$sel:applicationVersionId:AddApplicationInputProcessingConfigurationResponse' :: AddApplicationInputProcessingConfigurationResponse -> Maybe Natural
applicationVersionId} -> Maybe Natural
applicationVersionId) (\s :: AddApplicationInputProcessingConfigurationResponse
s@AddApplicationInputProcessingConfigurationResponse' {} Maybe Natural
a -> AddApplicationInputProcessingConfigurationResponse
s {$sel:applicationVersionId:AddApplicationInputProcessingConfigurationResponse' :: Maybe Natural
applicationVersionId = Maybe Natural
a} :: AddApplicationInputProcessingConfigurationResponse)

-- | The input ID that is associated with the application input. This is the
-- ID that Kinesis Data Analytics assigns to each input configuration that
-- you add to your application.
addApplicationInputProcessingConfigurationResponse_inputId :: Lens.Lens' AddApplicationInputProcessingConfigurationResponse (Prelude.Maybe Prelude.Text)
addApplicationInputProcessingConfigurationResponse_inputId :: Lens'
  AddApplicationInputProcessingConfigurationResponse (Maybe Text)
addApplicationInputProcessingConfigurationResponse_inputId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AddApplicationInputProcessingConfigurationResponse' {Maybe Text
inputId :: Maybe Text
$sel:inputId:AddApplicationInputProcessingConfigurationResponse' :: AddApplicationInputProcessingConfigurationResponse -> Maybe Text
inputId} -> Maybe Text
inputId) (\s :: AddApplicationInputProcessingConfigurationResponse
s@AddApplicationInputProcessingConfigurationResponse' {} Maybe Text
a -> AddApplicationInputProcessingConfigurationResponse
s {$sel:inputId:AddApplicationInputProcessingConfigurationResponse' :: Maybe Text
inputId = Maybe Text
a} :: AddApplicationInputProcessingConfigurationResponse)

-- | The description of the preprocessor that executes on records in this
-- input before the application\'s code is run.
addApplicationInputProcessingConfigurationResponse_inputProcessingConfigurationDescription :: Lens.Lens' AddApplicationInputProcessingConfigurationResponse (Prelude.Maybe InputProcessingConfigurationDescription)
addApplicationInputProcessingConfigurationResponse_inputProcessingConfigurationDescription :: Lens'
  AddApplicationInputProcessingConfigurationResponse
  (Maybe InputProcessingConfigurationDescription)
addApplicationInputProcessingConfigurationResponse_inputProcessingConfigurationDescription = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AddApplicationInputProcessingConfigurationResponse' {Maybe InputProcessingConfigurationDescription
inputProcessingConfigurationDescription :: Maybe InputProcessingConfigurationDescription
$sel:inputProcessingConfigurationDescription:AddApplicationInputProcessingConfigurationResponse' :: AddApplicationInputProcessingConfigurationResponse
-> Maybe InputProcessingConfigurationDescription
inputProcessingConfigurationDescription} -> Maybe InputProcessingConfigurationDescription
inputProcessingConfigurationDescription) (\s :: AddApplicationInputProcessingConfigurationResponse
s@AddApplicationInputProcessingConfigurationResponse' {} Maybe InputProcessingConfigurationDescription
a -> AddApplicationInputProcessingConfigurationResponse
s {$sel:inputProcessingConfigurationDescription:AddApplicationInputProcessingConfigurationResponse' :: Maybe InputProcessingConfigurationDescription
inputProcessingConfigurationDescription = Maybe InputProcessingConfigurationDescription
a} :: AddApplicationInputProcessingConfigurationResponse)

-- | The response's http status code.
addApplicationInputProcessingConfigurationResponse_httpStatus :: Lens.Lens' AddApplicationInputProcessingConfigurationResponse Prelude.Int
addApplicationInputProcessingConfigurationResponse_httpStatus :: Lens' AddApplicationInputProcessingConfigurationResponse Int
addApplicationInputProcessingConfigurationResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AddApplicationInputProcessingConfigurationResponse' {Int
httpStatus :: Int
$sel:httpStatus:AddApplicationInputProcessingConfigurationResponse' :: AddApplicationInputProcessingConfigurationResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: AddApplicationInputProcessingConfigurationResponse
s@AddApplicationInputProcessingConfigurationResponse' {} Int
a -> AddApplicationInputProcessingConfigurationResponse
s {$sel:httpStatus:AddApplicationInputProcessingConfigurationResponse' :: Int
httpStatus = Int
a} :: AddApplicationInputProcessingConfigurationResponse)

instance
  Prelude.NFData
    AddApplicationInputProcessingConfigurationResponse
  where
  rnf :: AddApplicationInputProcessingConfigurationResponse -> ()
rnf
    AddApplicationInputProcessingConfigurationResponse' {Int
Maybe Natural
Maybe Text
Maybe InputProcessingConfigurationDescription
httpStatus :: Int
inputProcessingConfigurationDescription :: Maybe InputProcessingConfigurationDescription
inputId :: Maybe Text
applicationVersionId :: Maybe Natural
applicationARN :: Maybe Text
$sel:httpStatus:AddApplicationInputProcessingConfigurationResponse' :: AddApplicationInputProcessingConfigurationResponse -> Int
$sel:inputProcessingConfigurationDescription:AddApplicationInputProcessingConfigurationResponse' :: AddApplicationInputProcessingConfigurationResponse
-> Maybe InputProcessingConfigurationDescription
$sel:inputId:AddApplicationInputProcessingConfigurationResponse' :: AddApplicationInputProcessingConfigurationResponse -> Maybe Text
$sel:applicationVersionId:AddApplicationInputProcessingConfigurationResponse' :: AddApplicationInputProcessingConfigurationResponse -> Maybe Natural
$sel:applicationARN:AddApplicationInputProcessingConfigurationResponse' :: AddApplicationInputProcessingConfigurationResponse -> Maybe Text
..} =
      forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
applicationARN
        seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
applicationVersionId
        seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
inputId
        seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe InputProcessingConfigurationDescription
inputProcessingConfigurationDescription
        seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus