{-# 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.KinesisFirehoseInputUpdate
-- 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.KinesisFirehoseInputUpdate 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, when updating
-- application input configuration, provides information about a Kinesis
-- Data Firehose delivery stream as the streaming source.
--
-- /See:/ 'newKinesisFirehoseInputUpdate' smart constructor.
data KinesisFirehoseInputUpdate = KinesisFirehoseInputUpdate'
  { -- | The Amazon Resource Name (ARN) of the input delivery stream to read.
    KinesisFirehoseInputUpdate -> Text
resourceARNUpdate :: Prelude.Text
  }
  deriving (KinesisFirehoseInputUpdate -> KinesisFirehoseInputUpdate -> Bool
(KinesisFirehoseInputUpdate -> KinesisFirehoseInputUpdate -> Bool)
-> (KinesisFirehoseInputUpdate
    -> KinesisFirehoseInputUpdate -> Bool)
-> Eq KinesisFirehoseInputUpdate
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: KinesisFirehoseInputUpdate -> KinesisFirehoseInputUpdate -> Bool
$c/= :: KinesisFirehoseInputUpdate -> KinesisFirehoseInputUpdate -> Bool
== :: KinesisFirehoseInputUpdate -> KinesisFirehoseInputUpdate -> Bool
$c== :: KinesisFirehoseInputUpdate -> KinesisFirehoseInputUpdate -> Bool
Prelude.Eq, ReadPrec [KinesisFirehoseInputUpdate]
ReadPrec KinesisFirehoseInputUpdate
Int -> ReadS KinesisFirehoseInputUpdate
ReadS [KinesisFirehoseInputUpdate]
(Int -> ReadS KinesisFirehoseInputUpdate)
-> ReadS [KinesisFirehoseInputUpdate]
-> ReadPrec KinesisFirehoseInputUpdate
-> ReadPrec [KinesisFirehoseInputUpdate]
-> Read KinesisFirehoseInputUpdate
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [KinesisFirehoseInputUpdate]
$creadListPrec :: ReadPrec [KinesisFirehoseInputUpdate]
readPrec :: ReadPrec KinesisFirehoseInputUpdate
$creadPrec :: ReadPrec KinesisFirehoseInputUpdate
readList :: ReadS [KinesisFirehoseInputUpdate]
$creadList :: ReadS [KinesisFirehoseInputUpdate]
readsPrec :: Int -> ReadS KinesisFirehoseInputUpdate
$creadsPrec :: Int -> ReadS KinesisFirehoseInputUpdate
Prelude.Read, Int -> KinesisFirehoseInputUpdate -> ShowS
[KinesisFirehoseInputUpdate] -> ShowS
KinesisFirehoseInputUpdate -> String
(Int -> KinesisFirehoseInputUpdate -> ShowS)
-> (KinesisFirehoseInputUpdate -> String)
-> ([KinesisFirehoseInputUpdate] -> ShowS)
-> Show KinesisFirehoseInputUpdate
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [KinesisFirehoseInputUpdate] -> ShowS
$cshowList :: [KinesisFirehoseInputUpdate] -> ShowS
show :: KinesisFirehoseInputUpdate -> String
$cshow :: KinesisFirehoseInputUpdate -> String
showsPrec :: Int -> KinesisFirehoseInputUpdate -> ShowS
$cshowsPrec :: Int -> KinesisFirehoseInputUpdate -> ShowS
Prelude.Show, (forall x.
 KinesisFirehoseInputUpdate -> Rep KinesisFirehoseInputUpdate x)
-> (forall x.
    Rep KinesisFirehoseInputUpdate x -> KinesisFirehoseInputUpdate)
-> Generic KinesisFirehoseInputUpdate
forall x.
Rep KinesisFirehoseInputUpdate x -> KinesisFirehoseInputUpdate
forall x.
KinesisFirehoseInputUpdate -> Rep KinesisFirehoseInputUpdate x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep KinesisFirehoseInputUpdate x -> KinesisFirehoseInputUpdate
$cfrom :: forall x.
KinesisFirehoseInputUpdate -> Rep KinesisFirehoseInputUpdate x
Prelude.Generic)

-- |
-- Create a value of 'KinesisFirehoseInputUpdate' 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:
--
-- 'resourceARNUpdate', 'kinesisFirehoseInputUpdate_resourceARNUpdate' - The Amazon Resource Name (ARN) of the input delivery stream to read.
newKinesisFirehoseInputUpdate ::
  -- | 'resourceARNUpdate'
  Prelude.Text ->
  KinesisFirehoseInputUpdate
newKinesisFirehoseInputUpdate :: Text -> KinesisFirehoseInputUpdate
newKinesisFirehoseInputUpdate Text
pResourceARNUpdate_ =
  KinesisFirehoseInputUpdate' :: Text -> KinesisFirehoseInputUpdate
KinesisFirehoseInputUpdate'
    { $sel:resourceARNUpdate:KinesisFirehoseInputUpdate' :: Text
resourceARNUpdate =
        Text
pResourceARNUpdate_
    }

-- | The Amazon Resource Name (ARN) of the input delivery stream to read.
kinesisFirehoseInputUpdate_resourceARNUpdate :: Lens.Lens' KinesisFirehoseInputUpdate Prelude.Text
kinesisFirehoseInputUpdate_resourceARNUpdate :: (Text -> f Text)
-> KinesisFirehoseInputUpdate -> f KinesisFirehoseInputUpdate
kinesisFirehoseInputUpdate_resourceARNUpdate = (KinesisFirehoseInputUpdate -> Text)
-> (KinesisFirehoseInputUpdate
    -> Text -> KinesisFirehoseInputUpdate)
-> Lens
     KinesisFirehoseInputUpdate KinesisFirehoseInputUpdate Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\KinesisFirehoseInputUpdate' {Text
resourceARNUpdate :: Text
$sel:resourceARNUpdate:KinesisFirehoseInputUpdate' :: KinesisFirehoseInputUpdate -> Text
resourceARNUpdate} -> Text
resourceARNUpdate) (\s :: KinesisFirehoseInputUpdate
s@KinesisFirehoseInputUpdate' {} Text
a -> KinesisFirehoseInputUpdate
s {$sel:resourceARNUpdate:KinesisFirehoseInputUpdate' :: Text
resourceARNUpdate = Text
a} :: KinesisFirehoseInputUpdate)

instance Prelude.Hashable KinesisFirehoseInputUpdate

instance Prelude.NFData KinesisFirehoseInputUpdate

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