{-# 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.KinesisStreamsInput
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.KinesisAnalyticsV2.Types.KinesisStreamsInput where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude

-- | Identifies a Kinesis data stream as the streaming source. You provide
-- the stream\'s Amazon Resource Name (ARN).
--
-- /See:/ 'newKinesisStreamsInput' smart constructor.
data KinesisStreamsInput = KinesisStreamsInput'
  { -- | The ARN of the input Kinesis data stream to read.
    KinesisStreamsInput -> Text
resourceARN :: Prelude.Text
  }
  deriving (KinesisStreamsInput -> KinesisStreamsInput -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: KinesisStreamsInput -> KinesisStreamsInput -> Bool
$c/= :: KinesisStreamsInput -> KinesisStreamsInput -> Bool
== :: KinesisStreamsInput -> KinesisStreamsInput -> Bool
$c== :: KinesisStreamsInput -> KinesisStreamsInput -> Bool
Prelude.Eq, ReadPrec [KinesisStreamsInput]
ReadPrec KinesisStreamsInput
Int -> ReadS KinesisStreamsInput
ReadS [KinesisStreamsInput]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [KinesisStreamsInput]
$creadListPrec :: ReadPrec [KinesisStreamsInput]
readPrec :: ReadPrec KinesisStreamsInput
$creadPrec :: ReadPrec KinesisStreamsInput
readList :: ReadS [KinesisStreamsInput]
$creadList :: ReadS [KinesisStreamsInput]
readsPrec :: Int -> ReadS KinesisStreamsInput
$creadsPrec :: Int -> ReadS KinesisStreamsInput
Prelude.Read, Int -> KinesisStreamsInput -> ShowS
[KinesisStreamsInput] -> ShowS
KinesisStreamsInput -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [KinesisStreamsInput] -> ShowS
$cshowList :: [KinesisStreamsInput] -> ShowS
show :: KinesisStreamsInput -> String
$cshow :: KinesisStreamsInput -> String
showsPrec :: Int -> KinesisStreamsInput -> ShowS
$cshowsPrec :: Int -> KinesisStreamsInput -> ShowS
Prelude.Show, forall x. Rep KinesisStreamsInput x -> KinesisStreamsInput
forall x. KinesisStreamsInput -> Rep KinesisStreamsInput x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep KinesisStreamsInput x -> KinesisStreamsInput
$cfrom :: forall x. KinesisStreamsInput -> Rep KinesisStreamsInput x
Prelude.Generic)

-- |
-- Create a value of 'KinesisStreamsInput' 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:
--
-- 'resourceARN', 'kinesisStreamsInput_resourceARN' - The ARN of the input Kinesis data stream to read.
newKinesisStreamsInput ::
  -- | 'resourceARN'
  Prelude.Text ->
  KinesisStreamsInput
newKinesisStreamsInput :: Text -> KinesisStreamsInput
newKinesisStreamsInput Text
pResourceARN_ =
  KinesisStreamsInput' {$sel:resourceARN:KinesisStreamsInput' :: Text
resourceARN = Text
pResourceARN_}

-- | The ARN of the input Kinesis data stream to read.
kinesisStreamsInput_resourceARN :: Lens.Lens' KinesisStreamsInput Prelude.Text
kinesisStreamsInput_resourceARN :: Lens' KinesisStreamsInput Text
kinesisStreamsInput_resourceARN = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\KinesisStreamsInput' {Text
resourceARN :: Text
$sel:resourceARN:KinesisStreamsInput' :: KinesisStreamsInput -> Text
resourceARN} -> Text
resourceARN) (\s :: KinesisStreamsInput
s@KinesisStreamsInput' {} Text
a -> KinesisStreamsInput
s {$sel:resourceARN:KinesisStreamsInput' :: Text
resourceARN = Text
a} :: KinesisStreamsInput)

instance Prelude.Hashable KinesisStreamsInput where
  hashWithSalt :: Int -> KinesisStreamsInput -> Int
hashWithSalt Int
_salt KinesisStreamsInput' {Text
resourceARN :: Text
$sel:resourceARN:KinesisStreamsInput' :: KinesisStreamsInput -> Text
..} =
    Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
resourceARN

instance Prelude.NFData KinesisStreamsInput where
  rnf :: KinesisStreamsInput -> ()
rnf KinesisStreamsInput' {Text
resourceARN :: Text
$sel:resourceARN:KinesisStreamsInput' :: KinesisStreamsInput -> Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Text
resourceARN

instance Data.ToJSON KinesisStreamsInput where
  toJSON :: KinesisStreamsInput -> Value
toJSON KinesisStreamsInput' {Text
resourceARN :: Text
$sel:resourceARN:KinesisStreamsInput' :: KinesisStreamsInput -> Text
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [forall a. a -> Maybe a
Prelude.Just (Key
"ResourceARN" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
resourceARN)]
      )