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

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

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

-- |
-- Create a value of 'KinesisFirehoseInput' 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', 'kinesisFirehoseInput_resourceARN' - The Amazon Resource Name (ARN) of the delivery stream.
newKinesisFirehoseInput ::
  -- | 'resourceARN'
  Prelude.Text ->
  KinesisFirehoseInput
newKinesisFirehoseInput :: Text -> KinesisFirehoseInput
newKinesisFirehoseInput Text
pResourceARN_ =
  KinesisFirehoseInput' :: Text -> KinesisFirehoseInput
KinesisFirehoseInput' {$sel:resourceARN:KinesisFirehoseInput' :: Text
resourceARN = Text
pResourceARN_}

-- | The Amazon Resource Name (ARN) of the delivery stream.
kinesisFirehoseInput_resourceARN :: Lens.Lens' KinesisFirehoseInput Prelude.Text
kinesisFirehoseInput_resourceARN :: (Text -> f Text) -> KinesisFirehoseInput -> f KinesisFirehoseInput
kinesisFirehoseInput_resourceARN = (KinesisFirehoseInput -> Text)
-> (KinesisFirehoseInput -> Text -> KinesisFirehoseInput)
-> Lens KinesisFirehoseInput KinesisFirehoseInput Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\KinesisFirehoseInput' {Text
resourceARN :: Text
$sel:resourceARN:KinesisFirehoseInput' :: KinesisFirehoseInput -> Text
resourceARN} -> Text
resourceARN) (\s :: KinesisFirehoseInput
s@KinesisFirehoseInput' {} Text
a -> KinesisFirehoseInput
s {$sel:resourceARN:KinesisFirehoseInput' :: Text
resourceARN = Text
a} :: KinesisFirehoseInput)

instance Prelude.Hashable KinesisFirehoseInput

instance Prelude.NFData KinesisFirehoseInput

instance Core.ToJSON KinesisFirehoseInput where
  toJSON :: KinesisFirehoseInput -> Value
toJSON KinesisFirehoseInput' {Text
resourceARN :: Text
$sel:resourceARN:KinesisFirehoseInput' :: KinesisFirehoseInput -> Text
..} =
    [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
"ResourceARN" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
resourceARN)]
      )