{-# 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.KinesisFirehoseOutputUpdate
-- 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.KinesisFirehoseOutputUpdate 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

-- | For a SQL-based Kinesis Data Analytics application, when updating an
-- output configuration using the UpdateApplication operation, provides
-- information about a Kinesis Data Firehose delivery stream that is
-- configured as the destination.
--
-- /See:/ 'newKinesisFirehoseOutputUpdate' smart constructor.
data KinesisFirehoseOutputUpdate = KinesisFirehoseOutputUpdate'
  { -- | The Amazon Resource Name (ARN) of the delivery stream to write to.
    KinesisFirehoseOutputUpdate -> Text
resourceARNUpdate :: Prelude.Text
  }
  deriving (KinesisFirehoseOutputUpdate -> KinesisFirehoseOutputUpdate -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: KinesisFirehoseOutputUpdate -> KinesisFirehoseOutputUpdate -> Bool
$c/= :: KinesisFirehoseOutputUpdate -> KinesisFirehoseOutputUpdate -> Bool
== :: KinesisFirehoseOutputUpdate -> KinesisFirehoseOutputUpdate -> Bool
$c== :: KinesisFirehoseOutputUpdate -> KinesisFirehoseOutputUpdate -> Bool
Prelude.Eq, ReadPrec [KinesisFirehoseOutputUpdate]
ReadPrec KinesisFirehoseOutputUpdate
Int -> ReadS KinesisFirehoseOutputUpdate
ReadS [KinesisFirehoseOutputUpdate]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [KinesisFirehoseOutputUpdate]
$creadListPrec :: ReadPrec [KinesisFirehoseOutputUpdate]
readPrec :: ReadPrec KinesisFirehoseOutputUpdate
$creadPrec :: ReadPrec KinesisFirehoseOutputUpdate
readList :: ReadS [KinesisFirehoseOutputUpdate]
$creadList :: ReadS [KinesisFirehoseOutputUpdate]
readsPrec :: Int -> ReadS KinesisFirehoseOutputUpdate
$creadsPrec :: Int -> ReadS KinesisFirehoseOutputUpdate
Prelude.Read, Int -> KinesisFirehoseOutputUpdate -> ShowS
[KinesisFirehoseOutputUpdate] -> ShowS
KinesisFirehoseOutputUpdate -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [KinesisFirehoseOutputUpdate] -> ShowS
$cshowList :: [KinesisFirehoseOutputUpdate] -> ShowS
show :: KinesisFirehoseOutputUpdate -> String
$cshow :: KinesisFirehoseOutputUpdate -> String
showsPrec :: Int -> KinesisFirehoseOutputUpdate -> ShowS
$cshowsPrec :: Int -> KinesisFirehoseOutputUpdate -> ShowS
Prelude.Show, forall x.
Rep KinesisFirehoseOutputUpdate x -> KinesisFirehoseOutputUpdate
forall x.
KinesisFirehoseOutputUpdate -> Rep KinesisFirehoseOutputUpdate x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep KinesisFirehoseOutputUpdate x -> KinesisFirehoseOutputUpdate
$cfrom :: forall x.
KinesisFirehoseOutputUpdate -> Rep KinesisFirehoseOutputUpdate x
Prelude.Generic)

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

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

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

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

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