{-# 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.DynamoDB.Types.KinesisStreamingDestinationOutput
-- 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.DynamoDB.Types.KinesisStreamingDestinationOutput where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.DynamoDB.Types.AttributeValue
import Amazonka.DynamoDB.Types.DestinationStatus
import Amazonka.DynamoDB.Types.WriteRequest
import qualified Amazonka.Prelude as Prelude

-- | /See:/ 'newKinesisStreamingDestinationOutput' smart constructor.
data KinesisStreamingDestinationOutput = KinesisStreamingDestinationOutput'
  { -- | The current status of the replication.
    KinesisStreamingDestinationOutput -> Maybe DestinationStatus
destinationStatus :: Prelude.Maybe DestinationStatus,
    -- | The ARN for the specific Kinesis data stream.
    KinesisStreamingDestinationOutput -> Maybe Text
streamArn :: Prelude.Maybe Prelude.Text,
    -- | The name of the table being modified.
    KinesisStreamingDestinationOutput -> Maybe Text
tableName :: Prelude.Maybe Prelude.Text
  }
  deriving (KinesisStreamingDestinationOutput
-> KinesisStreamingDestinationOutput -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: KinesisStreamingDestinationOutput
-> KinesisStreamingDestinationOutput -> Bool
$c/= :: KinesisStreamingDestinationOutput
-> KinesisStreamingDestinationOutput -> Bool
== :: KinesisStreamingDestinationOutput
-> KinesisStreamingDestinationOutput -> Bool
$c== :: KinesisStreamingDestinationOutput
-> KinesisStreamingDestinationOutput -> Bool
Prelude.Eq, ReadPrec [KinesisStreamingDestinationOutput]
ReadPrec KinesisStreamingDestinationOutput
Int -> ReadS KinesisStreamingDestinationOutput
ReadS [KinesisStreamingDestinationOutput]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [KinesisStreamingDestinationOutput]
$creadListPrec :: ReadPrec [KinesisStreamingDestinationOutput]
readPrec :: ReadPrec KinesisStreamingDestinationOutput
$creadPrec :: ReadPrec KinesisStreamingDestinationOutput
readList :: ReadS [KinesisStreamingDestinationOutput]
$creadList :: ReadS [KinesisStreamingDestinationOutput]
readsPrec :: Int -> ReadS KinesisStreamingDestinationOutput
$creadsPrec :: Int -> ReadS KinesisStreamingDestinationOutput
Prelude.Read, Int -> KinesisStreamingDestinationOutput -> ShowS
[KinesisStreamingDestinationOutput] -> ShowS
KinesisStreamingDestinationOutput -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [KinesisStreamingDestinationOutput] -> ShowS
$cshowList :: [KinesisStreamingDestinationOutput] -> ShowS
show :: KinesisStreamingDestinationOutput -> String
$cshow :: KinesisStreamingDestinationOutput -> String
showsPrec :: Int -> KinesisStreamingDestinationOutput -> ShowS
$cshowsPrec :: Int -> KinesisStreamingDestinationOutput -> ShowS
Prelude.Show, forall x.
Rep KinesisStreamingDestinationOutput x
-> KinesisStreamingDestinationOutput
forall x.
KinesisStreamingDestinationOutput
-> Rep KinesisStreamingDestinationOutput x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep KinesisStreamingDestinationOutput x
-> KinesisStreamingDestinationOutput
$cfrom :: forall x.
KinesisStreamingDestinationOutput
-> Rep KinesisStreamingDestinationOutput x
Prelude.Generic)

-- |
-- Create a value of 'KinesisStreamingDestinationOutput' 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:
--
-- 'destinationStatus', 'kinesisStreamingDestinationOutput_destinationStatus' - The current status of the replication.
--
-- 'streamArn', 'kinesisStreamingDestinationOutput_streamArn' - The ARN for the specific Kinesis data stream.
--
-- 'tableName', 'kinesisStreamingDestinationOutput_tableName' - The name of the table being modified.
newKinesisStreamingDestinationOutput ::
  KinesisStreamingDestinationOutput
newKinesisStreamingDestinationOutput :: KinesisStreamingDestinationOutput
newKinesisStreamingDestinationOutput =
  KinesisStreamingDestinationOutput'
    { $sel:destinationStatus:KinesisStreamingDestinationOutput' :: Maybe DestinationStatus
destinationStatus =
        forall a. Maybe a
Prelude.Nothing,
      $sel:streamArn:KinesisStreamingDestinationOutput' :: Maybe Text
streamArn = forall a. Maybe a
Prelude.Nothing,
      $sel:tableName:KinesisStreamingDestinationOutput' :: Maybe Text
tableName = forall a. Maybe a
Prelude.Nothing
    }

-- | The current status of the replication.
kinesisStreamingDestinationOutput_destinationStatus :: Lens.Lens' KinesisStreamingDestinationOutput (Prelude.Maybe DestinationStatus)
kinesisStreamingDestinationOutput_destinationStatus :: Lens' KinesisStreamingDestinationOutput (Maybe DestinationStatus)
kinesisStreamingDestinationOutput_destinationStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\KinesisStreamingDestinationOutput' {Maybe DestinationStatus
destinationStatus :: Maybe DestinationStatus
$sel:destinationStatus:KinesisStreamingDestinationOutput' :: KinesisStreamingDestinationOutput -> Maybe DestinationStatus
destinationStatus} -> Maybe DestinationStatus
destinationStatus) (\s :: KinesisStreamingDestinationOutput
s@KinesisStreamingDestinationOutput' {} Maybe DestinationStatus
a -> KinesisStreamingDestinationOutput
s {$sel:destinationStatus:KinesisStreamingDestinationOutput' :: Maybe DestinationStatus
destinationStatus = Maybe DestinationStatus
a} :: KinesisStreamingDestinationOutput)

-- | The ARN for the specific Kinesis data stream.
kinesisStreamingDestinationOutput_streamArn :: Lens.Lens' KinesisStreamingDestinationOutput (Prelude.Maybe Prelude.Text)
kinesisStreamingDestinationOutput_streamArn :: Lens' KinesisStreamingDestinationOutput (Maybe Text)
kinesisStreamingDestinationOutput_streamArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\KinesisStreamingDestinationOutput' {Maybe Text
streamArn :: Maybe Text
$sel:streamArn:KinesisStreamingDestinationOutput' :: KinesisStreamingDestinationOutput -> Maybe Text
streamArn} -> Maybe Text
streamArn) (\s :: KinesisStreamingDestinationOutput
s@KinesisStreamingDestinationOutput' {} Maybe Text
a -> KinesisStreamingDestinationOutput
s {$sel:streamArn:KinesisStreamingDestinationOutput' :: Maybe Text
streamArn = Maybe Text
a} :: KinesisStreamingDestinationOutput)

-- | The name of the table being modified.
kinesisStreamingDestinationOutput_tableName :: Lens.Lens' KinesisStreamingDestinationOutput (Prelude.Maybe Prelude.Text)
kinesisStreamingDestinationOutput_tableName :: Lens' KinesisStreamingDestinationOutput (Maybe Text)
kinesisStreamingDestinationOutput_tableName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\KinesisStreamingDestinationOutput' {Maybe Text
tableName :: Maybe Text
$sel:tableName:KinesisStreamingDestinationOutput' :: KinesisStreamingDestinationOutput -> Maybe Text
tableName} -> Maybe Text
tableName) (\s :: KinesisStreamingDestinationOutput
s@KinesisStreamingDestinationOutput' {} Maybe Text
a -> KinesisStreamingDestinationOutput
s {$sel:tableName:KinesisStreamingDestinationOutput' :: Maybe Text
tableName = Maybe Text
a} :: KinesisStreamingDestinationOutput)

instance
  Data.FromJSON
    KinesisStreamingDestinationOutput
  where
  parseJSON :: Value -> Parser KinesisStreamingDestinationOutput
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"KinesisStreamingDestinationOutput"
      ( \Object
x ->
          Maybe DestinationStatus
-> Maybe Text -> Maybe Text -> KinesisStreamingDestinationOutput
KinesisStreamingDestinationOutput'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"DestinationStatus")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"StreamArn")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"TableName")
      )

instance
  Prelude.Hashable
    KinesisStreamingDestinationOutput
  where
  hashWithSalt :: Int -> KinesisStreamingDestinationOutput -> Int
hashWithSalt
    Int
_salt
    KinesisStreamingDestinationOutput' {Maybe Text
Maybe DestinationStatus
tableName :: Maybe Text
streamArn :: Maybe Text
destinationStatus :: Maybe DestinationStatus
$sel:tableName:KinesisStreamingDestinationOutput' :: KinesisStreamingDestinationOutput -> Maybe Text
$sel:streamArn:KinesisStreamingDestinationOutput' :: KinesisStreamingDestinationOutput -> Maybe Text
$sel:destinationStatus:KinesisStreamingDestinationOutput' :: KinesisStreamingDestinationOutput -> Maybe DestinationStatus
..} =
      Int
_salt
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe DestinationStatus
destinationStatus
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
streamArn
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
tableName

instance
  Prelude.NFData
    KinesisStreamingDestinationOutput
  where
  rnf :: KinesisStreamingDestinationOutput -> ()
rnf KinesisStreamingDestinationOutput' {Maybe Text
Maybe DestinationStatus
tableName :: Maybe Text
streamArn :: Maybe Text
destinationStatus :: Maybe DestinationStatus
$sel:tableName:KinesisStreamingDestinationOutput' :: KinesisStreamingDestinationOutput -> Maybe Text
$sel:streamArn:KinesisStreamingDestinationOutput' :: KinesisStreamingDestinationOutput -> Maybe Text
$sel:destinationStatus:KinesisStreamingDestinationOutput' :: KinesisStreamingDestinationOutput -> Maybe DestinationStatus
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe DestinationStatus
destinationStatus
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
streamArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
tableName