{-# 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.KinesisAnalyticsV2.Types.InputDescription
-- 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.KinesisAnalyticsV2.Types.InputDescription where

import qualified Amazonka.Core as Core
import Amazonka.KinesisAnalyticsV2.Types.InputParallelism
import Amazonka.KinesisAnalyticsV2.Types.InputProcessingConfigurationDescription
import Amazonka.KinesisAnalyticsV2.Types.InputStartingPositionConfiguration
import Amazonka.KinesisAnalyticsV2.Types.KinesisFirehoseInputDescription
import Amazonka.KinesisAnalyticsV2.Types.KinesisStreamsInputDescription
import Amazonka.KinesisAnalyticsV2.Types.SourceSchema
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Describes the application input configuration for a SQL-based Kinesis
-- Data Analytics application.
--
-- /See:/ 'newInputDescription' smart constructor.
data InputDescription = InputDescription'
  { -- | The point at which the application is configured to read from the input
    -- stream.
    InputDescription -> Maybe InputStartingPositionConfiguration
inputStartingPositionConfiguration :: Prelude.Maybe InputStartingPositionConfiguration,
    -- | Describes the configured parallelism (number of in-application streams
    -- mapped to the streaming source).
    InputDescription -> Maybe InputParallelism
inputParallelism :: Prelude.Maybe InputParallelism,
    -- | 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.
    InputDescription -> Maybe Text
inputId :: Prelude.Maybe Prelude.Text,
    -- | Returns the in-application stream names that are mapped to the stream
    -- source.
    InputDescription -> Maybe [Text]
inAppStreamNames :: Prelude.Maybe [Prelude.Text],
    -- | If a Kinesis Data Firehose delivery stream is configured as a streaming
    -- source, provides the delivery stream\'s ARN.
    InputDescription -> Maybe KinesisFirehoseInputDescription
kinesisFirehoseInputDescription :: Prelude.Maybe KinesisFirehoseInputDescription,
    -- | Describes the format of the data in the streaming source, and how each
    -- data element maps to corresponding columns in the in-application stream
    -- that is being created.
    InputDescription -> Maybe SourceSchema
inputSchema :: Prelude.Maybe SourceSchema,
    -- | If a Kinesis data stream is configured as a streaming source, provides
    -- the Kinesis data stream\'s Amazon Resource Name (ARN).
    InputDescription -> Maybe KinesisStreamsInputDescription
kinesisStreamsInputDescription :: Prelude.Maybe KinesisStreamsInputDescription,
    -- | The in-application name prefix.
    InputDescription -> Maybe Text
namePrefix :: Prelude.Maybe Prelude.Text,
    -- | The description of the preprocessor that executes on records in this
    -- input before the application\'s code is run.
    InputDescription -> Maybe InputProcessingConfigurationDescription
inputProcessingConfigurationDescription :: Prelude.Maybe InputProcessingConfigurationDescription
  }
  deriving (InputDescription -> InputDescription -> Bool
(InputDescription -> InputDescription -> Bool)
-> (InputDescription -> InputDescription -> Bool)
-> Eq InputDescription
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: InputDescription -> InputDescription -> Bool
$c/= :: InputDescription -> InputDescription -> Bool
== :: InputDescription -> InputDescription -> Bool
$c== :: InputDescription -> InputDescription -> Bool
Prelude.Eq, ReadPrec [InputDescription]
ReadPrec InputDescription
Int -> ReadS InputDescription
ReadS [InputDescription]
(Int -> ReadS InputDescription)
-> ReadS [InputDescription]
-> ReadPrec InputDescription
-> ReadPrec [InputDescription]
-> Read InputDescription
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [InputDescription]
$creadListPrec :: ReadPrec [InputDescription]
readPrec :: ReadPrec InputDescription
$creadPrec :: ReadPrec InputDescription
readList :: ReadS [InputDescription]
$creadList :: ReadS [InputDescription]
readsPrec :: Int -> ReadS InputDescription
$creadsPrec :: Int -> ReadS InputDescription
Prelude.Read, Int -> InputDescription -> ShowS
[InputDescription] -> ShowS
InputDescription -> String
(Int -> InputDescription -> ShowS)
-> (InputDescription -> String)
-> ([InputDescription] -> ShowS)
-> Show InputDescription
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [InputDescription] -> ShowS
$cshowList :: [InputDescription] -> ShowS
show :: InputDescription -> String
$cshow :: InputDescription -> String
showsPrec :: Int -> InputDescription -> ShowS
$cshowsPrec :: Int -> InputDescription -> ShowS
Prelude.Show, (forall x. InputDescription -> Rep InputDescription x)
-> (forall x. Rep InputDescription x -> InputDescription)
-> Generic InputDescription
forall x. Rep InputDescription x -> InputDescription
forall x. InputDescription -> Rep InputDescription x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep InputDescription x -> InputDescription
$cfrom :: forall x. InputDescription -> Rep InputDescription x
Prelude.Generic)

-- |
-- Create a value of 'InputDescription' 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:
--
-- 'inputStartingPositionConfiguration', 'inputDescription_inputStartingPositionConfiguration' - The point at which the application is configured to read from the input
-- stream.
--
-- 'inputParallelism', 'inputDescription_inputParallelism' - Describes the configured parallelism (number of in-application streams
-- mapped to the streaming source).
--
-- 'inputId', 'inputDescription_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.
--
-- 'inAppStreamNames', 'inputDescription_inAppStreamNames' - Returns the in-application stream names that are mapped to the stream
-- source.
--
-- 'kinesisFirehoseInputDescription', 'inputDescription_kinesisFirehoseInputDescription' - If a Kinesis Data Firehose delivery stream is configured as a streaming
-- source, provides the delivery stream\'s ARN.
--
-- 'inputSchema', 'inputDescription_inputSchema' - Describes the format of the data in the streaming source, and how each
-- data element maps to corresponding columns in the in-application stream
-- that is being created.
--
-- 'kinesisStreamsInputDescription', 'inputDescription_kinesisStreamsInputDescription' - If a Kinesis data stream is configured as a streaming source, provides
-- the Kinesis data stream\'s Amazon Resource Name (ARN).
--
-- 'namePrefix', 'inputDescription_namePrefix' - The in-application name prefix.
--
-- 'inputProcessingConfigurationDescription', 'inputDescription_inputProcessingConfigurationDescription' - The description of the preprocessor that executes on records in this
-- input before the application\'s code is run.
newInputDescription ::
  InputDescription
newInputDescription :: InputDescription
newInputDescription =
  InputDescription' :: Maybe InputStartingPositionConfiguration
-> Maybe InputParallelism
-> Maybe Text
-> Maybe [Text]
-> Maybe KinesisFirehoseInputDescription
-> Maybe SourceSchema
-> Maybe KinesisStreamsInputDescription
-> Maybe Text
-> Maybe InputProcessingConfigurationDescription
-> InputDescription
InputDescription'
    { $sel:inputStartingPositionConfiguration:InputDescription' :: Maybe InputStartingPositionConfiguration
inputStartingPositionConfiguration =
        Maybe InputStartingPositionConfiguration
forall a. Maybe a
Prelude.Nothing,
      $sel:inputParallelism:InputDescription' :: Maybe InputParallelism
inputParallelism = Maybe InputParallelism
forall a. Maybe a
Prelude.Nothing,
      $sel:inputId:InputDescription' :: Maybe Text
inputId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:inAppStreamNames:InputDescription' :: Maybe [Text]
inAppStreamNames = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:kinesisFirehoseInputDescription:InputDescription' :: Maybe KinesisFirehoseInputDescription
kinesisFirehoseInputDescription = Maybe KinesisFirehoseInputDescription
forall a. Maybe a
Prelude.Nothing,
      $sel:inputSchema:InputDescription' :: Maybe SourceSchema
inputSchema = Maybe SourceSchema
forall a. Maybe a
Prelude.Nothing,
      $sel:kinesisStreamsInputDescription:InputDescription' :: Maybe KinesisStreamsInputDescription
kinesisStreamsInputDescription = Maybe KinesisStreamsInputDescription
forall a. Maybe a
Prelude.Nothing,
      $sel:namePrefix:InputDescription' :: Maybe Text
namePrefix = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:inputProcessingConfigurationDescription:InputDescription' :: Maybe InputProcessingConfigurationDescription
inputProcessingConfigurationDescription =
        Maybe InputProcessingConfigurationDescription
forall a. Maybe a
Prelude.Nothing
    }

-- | The point at which the application is configured to read from the input
-- stream.
inputDescription_inputStartingPositionConfiguration :: Lens.Lens' InputDescription (Prelude.Maybe InputStartingPositionConfiguration)
inputDescription_inputStartingPositionConfiguration :: (Maybe InputStartingPositionConfiguration
 -> f (Maybe InputStartingPositionConfiguration))
-> InputDescription -> f InputDescription
inputDescription_inputStartingPositionConfiguration = (InputDescription -> Maybe InputStartingPositionConfiguration)
-> (InputDescription
    -> Maybe InputStartingPositionConfiguration -> InputDescription)
-> Lens
     InputDescription
     InputDescription
     (Maybe InputStartingPositionConfiguration)
     (Maybe InputStartingPositionConfiguration)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InputDescription' {Maybe InputStartingPositionConfiguration
inputStartingPositionConfiguration :: Maybe InputStartingPositionConfiguration
$sel:inputStartingPositionConfiguration:InputDescription' :: InputDescription -> Maybe InputStartingPositionConfiguration
inputStartingPositionConfiguration} -> Maybe InputStartingPositionConfiguration
inputStartingPositionConfiguration) (\s :: InputDescription
s@InputDescription' {} Maybe InputStartingPositionConfiguration
a -> InputDescription
s {$sel:inputStartingPositionConfiguration:InputDescription' :: Maybe InputStartingPositionConfiguration
inputStartingPositionConfiguration = Maybe InputStartingPositionConfiguration
a} :: InputDescription)

-- | Describes the configured parallelism (number of in-application streams
-- mapped to the streaming source).
inputDescription_inputParallelism :: Lens.Lens' InputDescription (Prelude.Maybe InputParallelism)
inputDescription_inputParallelism :: (Maybe InputParallelism -> f (Maybe InputParallelism))
-> InputDescription -> f InputDescription
inputDescription_inputParallelism = (InputDescription -> Maybe InputParallelism)
-> (InputDescription -> Maybe InputParallelism -> InputDescription)
-> Lens
     InputDescription
     InputDescription
     (Maybe InputParallelism)
     (Maybe InputParallelism)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InputDescription' {Maybe InputParallelism
inputParallelism :: Maybe InputParallelism
$sel:inputParallelism:InputDescription' :: InputDescription -> Maybe InputParallelism
inputParallelism} -> Maybe InputParallelism
inputParallelism) (\s :: InputDescription
s@InputDescription' {} Maybe InputParallelism
a -> InputDescription
s {$sel:inputParallelism:InputDescription' :: Maybe InputParallelism
inputParallelism = Maybe InputParallelism
a} :: InputDescription)

-- | 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.
inputDescription_inputId :: Lens.Lens' InputDescription (Prelude.Maybe Prelude.Text)
inputDescription_inputId :: (Maybe Text -> f (Maybe Text))
-> InputDescription -> f InputDescription
inputDescription_inputId = (InputDescription -> Maybe Text)
-> (InputDescription -> Maybe Text -> InputDescription)
-> Lens InputDescription InputDescription (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InputDescription' {Maybe Text
inputId :: Maybe Text
$sel:inputId:InputDescription' :: InputDescription -> Maybe Text
inputId} -> Maybe Text
inputId) (\s :: InputDescription
s@InputDescription' {} Maybe Text
a -> InputDescription
s {$sel:inputId:InputDescription' :: Maybe Text
inputId = Maybe Text
a} :: InputDescription)

-- | Returns the in-application stream names that are mapped to the stream
-- source.
inputDescription_inAppStreamNames :: Lens.Lens' InputDescription (Prelude.Maybe [Prelude.Text])
inputDescription_inAppStreamNames :: (Maybe [Text] -> f (Maybe [Text]))
-> InputDescription -> f InputDescription
inputDescription_inAppStreamNames = (InputDescription -> Maybe [Text])
-> (InputDescription -> Maybe [Text] -> InputDescription)
-> Lens
     InputDescription InputDescription (Maybe [Text]) (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InputDescription' {Maybe [Text]
inAppStreamNames :: Maybe [Text]
$sel:inAppStreamNames:InputDescription' :: InputDescription -> Maybe [Text]
inAppStreamNames} -> Maybe [Text]
inAppStreamNames) (\s :: InputDescription
s@InputDescription' {} Maybe [Text]
a -> InputDescription
s {$sel:inAppStreamNames:InputDescription' :: Maybe [Text]
inAppStreamNames = Maybe [Text]
a} :: InputDescription) ((Maybe [Text] -> f (Maybe [Text]))
 -> InputDescription -> f InputDescription)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> InputDescription
-> f InputDescription
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
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 AnIso [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | If a Kinesis Data Firehose delivery stream is configured as a streaming
-- source, provides the delivery stream\'s ARN.
inputDescription_kinesisFirehoseInputDescription :: Lens.Lens' InputDescription (Prelude.Maybe KinesisFirehoseInputDescription)
inputDescription_kinesisFirehoseInputDescription :: (Maybe KinesisFirehoseInputDescription
 -> f (Maybe KinesisFirehoseInputDescription))
-> InputDescription -> f InputDescription
inputDescription_kinesisFirehoseInputDescription = (InputDescription -> Maybe KinesisFirehoseInputDescription)
-> (InputDescription
    -> Maybe KinesisFirehoseInputDescription -> InputDescription)
-> Lens
     InputDescription
     InputDescription
     (Maybe KinesisFirehoseInputDescription)
     (Maybe KinesisFirehoseInputDescription)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InputDescription' {Maybe KinesisFirehoseInputDescription
kinesisFirehoseInputDescription :: Maybe KinesisFirehoseInputDescription
$sel:kinesisFirehoseInputDescription:InputDescription' :: InputDescription -> Maybe KinesisFirehoseInputDescription
kinesisFirehoseInputDescription} -> Maybe KinesisFirehoseInputDescription
kinesisFirehoseInputDescription) (\s :: InputDescription
s@InputDescription' {} Maybe KinesisFirehoseInputDescription
a -> InputDescription
s {$sel:kinesisFirehoseInputDescription:InputDescription' :: Maybe KinesisFirehoseInputDescription
kinesisFirehoseInputDescription = Maybe KinesisFirehoseInputDescription
a} :: InputDescription)

-- | Describes the format of the data in the streaming source, and how each
-- data element maps to corresponding columns in the in-application stream
-- that is being created.
inputDescription_inputSchema :: Lens.Lens' InputDescription (Prelude.Maybe SourceSchema)
inputDescription_inputSchema :: (Maybe SourceSchema -> f (Maybe SourceSchema))
-> InputDescription -> f InputDescription
inputDescription_inputSchema = (InputDescription -> Maybe SourceSchema)
-> (InputDescription -> Maybe SourceSchema -> InputDescription)
-> Lens
     InputDescription
     InputDescription
     (Maybe SourceSchema)
     (Maybe SourceSchema)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InputDescription' {Maybe SourceSchema
inputSchema :: Maybe SourceSchema
$sel:inputSchema:InputDescription' :: InputDescription -> Maybe SourceSchema
inputSchema} -> Maybe SourceSchema
inputSchema) (\s :: InputDescription
s@InputDescription' {} Maybe SourceSchema
a -> InputDescription
s {$sel:inputSchema:InputDescription' :: Maybe SourceSchema
inputSchema = Maybe SourceSchema
a} :: InputDescription)

-- | If a Kinesis data stream is configured as a streaming source, provides
-- the Kinesis data stream\'s Amazon Resource Name (ARN).
inputDescription_kinesisStreamsInputDescription :: Lens.Lens' InputDescription (Prelude.Maybe KinesisStreamsInputDescription)
inputDescription_kinesisStreamsInputDescription :: (Maybe KinesisStreamsInputDescription
 -> f (Maybe KinesisStreamsInputDescription))
-> InputDescription -> f InputDescription
inputDescription_kinesisStreamsInputDescription = (InputDescription -> Maybe KinesisStreamsInputDescription)
-> (InputDescription
    -> Maybe KinesisStreamsInputDescription -> InputDescription)
-> Lens
     InputDescription
     InputDescription
     (Maybe KinesisStreamsInputDescription)
     (Maybe KinesisStreamsInputDescription)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InputDescription' {Maybe KinesisStreamsInputDescription
kinesisStreamsInputDescription :: Maybe KinesisStreamsInputDescription
$sel:kinesisStreamsInputDescription:InputDescription' :: InputDescription -> Maybe KinesisStreamsInputDescription
kinesisStreamsInputDescription} -> Maybe KinesisStreamsInputDescription
kinesisStreamsInputDescription) (\s :: InputDescription
s@InputDescription' {} Maybe KinesisStreamsInputDescription
a -> InputDescription
s {$sel:kinesisStreamsInputDescription:InputDescription' :: Maybe KinesisStreamsInputDescription
kinesisStreamsInputDescription = Maybe KinesisStreamsInputDescription
a} :: InputDescription)

-- | The in-application name prefix.
inputDescription_namePrefix :: Lens.Lens' InputDescription (Prelude.Maybe Prelude.Text)
inputDescription_namePrefix :: (Maybe Text -> f (Maybe Text))
-> InputDescription -> f InputDescription
inputDescription_namePrefix = (InputDescription -> Maybe Text)
-> (InputDescription -> Maybe Text -> InputDescription)
-> Lens InputDescription InputDescription (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InputDescription' {Maybe Text
namePrefix :: Maybe Text
$sel:namePrefix:InputDescription' :: InputDescription -> Maybe Text
namePrefix} -> Maybe Text
namePrefix) (\s :: InputDescription
s@InputDescription' {} Maybe Text
a -> InputDescription
s {$sel:namePrefix:InputDescription' :: Maybe Text
namePrefix = Maybe Text
a} :: InputDescription)

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

instance Core.FromJSON InputDescription where
  parseJSON :: Value -> Parser InputDescription
parseJSON =
    String
-> (Object -> Parser InputDescription)
-> Value
-> Parser InputDescription
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"InputDescription"
      ( \Object
x ->
          Maybe InputStartingPositionConfiguration
-> Maybe InputParallelism
-> Maybe Text
-> Maybe [Text]
-> Maybe KinesisFirehoseInputDescription
-> Maybe SourceSchema
-> Maybe KinesisStreamsInputDescription
-> Maybe Text
-> Maybe InputProcessingConfigurationDescription
-> InputDescription
InputDescription'
            (Maybe InputStartingPositionConfiguration
 -> Maybe InputParallelism
 -> Maybe Text
 -> Maybe [Text]
 -> Maybe KinesisFirehoseInputDescription
 -> Maybe SourceSchema
 -> Maybe KinesisStreamsInputDescription
 -> Maybe Text
 -> Maybe InputProcessingConfigurationDescription
 -> InputDescription)
-> Parser (Maybe InputStartingPositionConfiguration)
-> Parser
     (Maybe InputParallelism
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe KinesisFirehoseInputDescription
      -> Maybe SourceSchema
      -> Maybe KinesisStreamsInputDescription
      -> Maybe Text
      -> Maybe InputProcessingConfigurationDescription
      -> InputDescription)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe InputStartingPositionConfiguration)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"InputStartingPositionConfiguration")
            Parser
  (Maybe InputParallelism
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe KinesisFirehoseInputDescription
   -> Maybe SourceSchema
   -> Maybe KinesisStreamsInputDescription
   -> Maybe Text
   -> Maybe InputProcessingConfigurationDescription
   -> InputDescription)
-> Parser (Maybe InputParallelism)
-> Parser
     (Maybe Text
      -> Maybe [Text]
      -> Maybe KinesisFirehoseInputDescription
      -> Maybe SourceSchema
      -> Maybe KinesisStreamsInputDescription
      -> Maybe Text
      -> Maybe InputProcessingConfigurationDescription
      -> InputDescription)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe InputParallelism)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"InputParallelism")
            Parser
  (Maybe Text
   -> Maybe [Text]
   -> Maybe KinesisFirehoseInputDescription
   -> Maybe SourceSchema
   -> Maybe KinesisStreamsInputDescription
   -> Maybe Text
   -> Maybe InputProcessingConfigurationDescription
   -> InputDescription)
-> Parser (Maybe Text)
-> Parser
     (Maybe [Text]
      -> Maybe KinesisFirehoseInputDescription
      -> Maybe SourceSchema
      -> Maybe KinesisStreamsInputDescription
      -> Maybe Text
      -> Maybe InputProcessingConfigurationDescription
      -> InputDescription)
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
"InputId")
            Parser
  (Maybe [Text]
   -> Maybe KinesisFirehoseInputDescription
   -> Maybe SourceSchema
   -> Maybe KinesisStreamsInputDescription
   -> Maybe Text
   -> Maybe InputProcessingConfigurationDescription
   -> InputDescription)
-> Parser (Maybe [Text])
-> Parser
     (Maybe KinesisFirehoseInputDescription
      -> Maybe SourceSchema
      -> Maybe KinesisStreamsInputDescription
      -> Maybe Text
      -> Maybe InputProcessingConfigurationDescription
      -> InputDescription)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Parser (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"InAppStreamNames"
                            Parser (Maybe (Maybe [Text]))
-> Maybe [Text] -> Parser (Maybe [Text])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Text]
forall a. Monoid a => a
Prelude.mempty
                        )
            Parser
  (Maybe KinesisFirehoseInputDescription
   -> Maybe SourceSchema
   -> Maybe KinesisStreamsInputDescription
   -> Maybe Text
   -> Maybe InputProcessingConfigurationDescription
   -> InputDescription)
-> Parser (Maybe KinesisFirehoseInputDescription)
-> Parser
     (Maybe SourceSchema
      -> Maybe KinesisStreamsInputDescription
      -> Maybe Text
      -> Maybe InputProcessingConfigurationDescription
      -> InputDescription)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe KinesisFirehoseInputDescription)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"KinesisFirehoseInputDescription")
            Parser
  (Maybe SourceSchema
   -> Maybe KinesisStreamsInputDescription
   -> Maybe Text
   -> Maybe InputProcessingConfigurationDescription
   -> InputDescription)
-> Parser (Maybe SourceSchema)
-> Parser
     (Maybe KinesisStreamsInputDescription
      -> Maybe Text
      -> Maybe InputProcessingConfigurationDescription
      -> InputDescription)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe SourceSchema)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"InputSchema")
            Parser
  (Maybe KinesisStreamsInputDescription
   -> Maybe Text
   -> Maybe InputProcessingConfigurationDescription
   -> InputDescription)
-> Parser (Maybe KinesisStreamsInputDescription)
-> Parser
     (Maybe Text
      -> Maybe InputProcessingConfigurationDescription
      -> InputDescription)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe KinesisStreamsInputDescription)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"KinesisStreamsInputDescription")
            Parser
  (Maybe Text
   -> Maybe InputProcessingConfigurationDescription
   -> InputDescription)
-> Parser (Maybe Text)
-> Parser
     (Maybe InputProcessingConfigurationDescription -> InputDescription)
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
"NamePrefix")
            Parser
  (Maybe InputProcessingConfigurationDescription -> InputDescription)
-> Parser (Maybe InputProcessingConfigurationDescription)
-> Parser InputDescription
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x
                            Object
-> Text -> Parser (Maybe InputProcessingConfigurationDescription)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"InputProcessingConfigurationDescription"
                        )
      )

instance Prelude.Hashable InputDescription

instance Prelude.NFData InputDescription