{-# 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.KinesisFirehoseOutput
-- 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.KinesisFirehoseOutput 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 configuring
-- application output, identifies a Kinesis Data Firehose delivery stream
-- as the destination. You provide the stream Amazon Resource Name (ARN) of
-- the delivery stream.
--
-- /See:/ 'newKinesisFirehoseOutput' smart constructor.
data KinesisFirehoseOutput = KinesisFirehoseOutput'
  { -- | The ARN of the destination delivery stream to write to.
    KinesisFirehoseOutput -> Text
resourceARN :: Prelude.Text
  }
  deriving (KinesisFirehoseOutput -> KinesisFirehoseOutput -> Bool
(KinesisFirehoseOutput -> KinesisFirehoseOutput -> Bool)
-> (KinesisFirehoseOutput -> KinesisFirehoseOutput -> Bool)
-> Eq KinesisFirehoseOutput
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: KinesisFirehoseOutput -> KinesisFirehoseOutput -> Bool
$c/= :: KinesisFirehoseOutput -> KinesisFirehoseOutput -> Bool
== :: KinesisFirehoseOutput -> KinesisFirehoseOutput -> Bool
$c== :: KinesisFirehoseOutput -> KinesisFirehoseOutput -> Bool
Prelude.Eq, ReadPrec [KinesisFirehoseOutput]
ReadPrec KinesisFirehoseOutput
Int -> ReadS KinesisFirehoseOutput
ReadS [KinesisFirehoseOutput]
(Int -> ReadS KinesisFirehoseOutput)
-> ReadS [KinesisFirehoseOutput]
-> ReadPrec KinesisFirehoseOutput
-> ReadPrec [KinesisFirehoseOutput]
-> Read KinesisFirehoseOutput
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [KinesisFirehoseOutput]
$creadListPrec :: ReadPrec [KinesisFirehoseOutput]
readPrec :: ReadPrec KinesisFirehoseOutput
$creadPrec :: ReadPrec KinesisFirehoseOutput
readList :: ReadS [KinesisFirehoseOutput]
$creadList :: ReadS [KinesisFirehoseOutput]
readsPrec :: Int -> ReadS KinesisFirehoseOutput
$creadsPrec :: Int -> ReadS KinesisFirehoseOutput
Prelude.Read, Int -> KinesisFirehoseOutput -> ShowS
[KinesisFirehoseOutput] -> ShowS
KinesisFirehoseOutput -> String
(Int -> KinesisFirehoseOutput -> ShowS)
-> (KinesisFirehoseOutput -> String)
-> ([KinesisFirehoseOutput] -> ShowS)
-> Show KinesisFirehoseOutput
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [KinesisFirehoseOutput] -> ShowS
$cshowList :: [KinesisFirehoseOutput] -> ShowS
show :: KinesisFirehoseOutput -> String
$cshow :: KinesisFirehoseOutput -> String
showsPrec :: Int -> KinesisFirehoseOutput -> ShowS
$cshowsPrec :: Int -> KinesisFirehoseOutput -> ShowS
Prelude.Show, (forall x. KinesisFirehoseOutput -> Rep KinesisFirehoseOutput x)
-> (forall x. Rep KinesisFirehoseOutput x -> KinesisFirehoseOutput)
-> Generic KinesisFirehoseOutput
forall x. Rep KinesisFirehoseOutput x -> KinesisFirehoseOutput
forall x. KinesisFirehoseOutput -> Rep KinesisFirehoseOutput x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep KinesisFirehoseOutput x -> KinesisFirehoseOutput
$cfrom :: forall x. KinesisFirehoseOutput -> Rep KinesisFirehoseOutput x
Prelude.Generic)

-- |
-- Create a value of 'KinesisFirehoseOutput' 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', 'kinesisFirehoseOutput_resourceARN' - The ARN of the destination delivery stream to write to.
newKinesisFirehoseOutput ::
  -- | 'resourceARN'
  Prelude.Text ->
  KinesisFirehoseOutput
newKinesisFirehoseOutput :: Text -> KinesisFirehoseOutput
newKinesisFirehoseOutput Text
pResourceARN_ =
  KinesisFirehoseOutput' :: Text -> KinesisFirehoseOutput
KinesisFirehoseOutput' {$sel:resourceARN:KinesisFirehoseOutput' :: Text
resourceARN = Text
pResourceARN_}

-- | The ARN of the destination delivery stream to write to.
kinesisFirehoseOutput_resourceARN :: Lens.Lens' KinesisFirehoseOutput Prelude.Text
kinesisFirehoseOutput_resourceARN :: (Text -> f Text)
-> KinesisFirehoseOutput -> f KinesisFirehoseOutput
kinesisFirehoseOutput_resourceARN = (KinesisFirehoseOutput -> Text)
-> (KinesisFirehoseOutput -> Text -> KinesisFirehoseOutput)
-> Lens KinesisFirehoseOutput KinesisFirehoseOutput Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\KinesisFirehoseOutput' {Text
resourceARN :: Text
$sel:resourceARN:KinesisFirehoseOutput' :: KinesisFirehoseOutput -> Text
resourceARN} -> Text
resourceARN) (\s :: KinesisFirehoseOutput
s@KinesisFirehoseOutput' {} Text
a -> KinesisFirehoseOutput
s {$sel:resourceARN:KinesisFirehoseOutput' :: Text
resourceARN = Text
a} :: KinesisFirehoseOutput)

instance Prelude.Hashable KinesisFirehoseOutput

instance Prelude.NFData KinesisFirehoseOutput

instance Core.ToJSON KinesisFirehoseOutput where
  toJSON :: KinesisFirehoseOutput -> Value
toJSON KinesisFirehoseOutput' {Text
resourceARN :: Text
$sel:resourceARN:KinesisFirehoseOutput' :: KinesisFirehoseOutput -> 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)]
      )