{-# 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 #-}
module Amazonka.DynamoDB.Types.KinesisStreamingDestinationOutput where
import qualified Amazonka.Core as Core
import Amazonka.DynamoDB.Types.DestinationStatus
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data KinesisStreamingDestinationOutput = KinesisStreamingDestinationOutput'
{
KinesisStreamingDestinationOutput -> Maybe DestinationStatus
destinationStatus :: Prelude.Maybe DestinationStatus,
KinesisStreamingDestinationOutput -> Maybe Text
streamArn :: Prelude.Maybe Prelude.Text,
KinesisStreamingDestinationOutput -> Maybe Text
tableName :: Prelude.Maybe Prelude.Text
}
deriving (KinesisStreamingDestinationOutput
-> KinesisStreamingDestinationOutput -> Bool
(KinesisStreamingDestinationOutput
-> KinesisStreamingDestinationOutput -> Bool)
-> (KinesisStreamingDestinationOutput
-> KinesisStreamingDestinationOutput -> Bool)
-> Eq KinesisStreamingDestinationOutput
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]
(Int -> ReadS KinesisStreamingDestinationOutput)
-> ReadS [KinesisStreamingDestinationOutput]
-> ReadPrec KinesisStreamingDestinationOutput
-> ReadPrec [KinesisStreamingDestinationOutput]
-> Read 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
(Int -> KinesisStreamingDestinationOutput -> ShowS)
-> (KinesisStreamingDestinationOutput -> String)
-> ([KinesisStreamingDestinationOutput] -> ShowS)
-> Show KinesisStreamingDestinationOutput
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.
KinesisStreamingDestinationOutput
-> Rep KinesisStreamingDestinationOutput x)
-> (forall x.
Rep KinesisStreamingDestinationOutput x
-> KinesisStreamingDestinationOutput)
-> Generic KinesisStreamingDestinationOutput
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)
newKinesisStreamingDestinationOutput ::
KinesisStreamingDestinationOutput
newKinesisStreamingDestinationOutput :: KinesisStreamingDestinationOutput
newKinesisStreamingDestinationOutput =
KinesisStreamingDestinationOutput' :: Maybe DestinationStatus
-> Maybe Text -> Maybe Text -> KinesisStreamingDestinationOutput
KinesisStreamingDestinationOutput'
{ $sel:destinationStatus:KinesisStreamingDestinationOutput' :: Maybe DestinationStatus
destinationStatus =
Maybe DestinationStatus
forall a. Maybe a
Prelude.Nothing,
$sel:streamArn:KinesisStreamingDestinationOutput' :: Maybe Text
streamArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:tableName:KinesisStreamingDestinationOutput' :: Maybe Text
tableName = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
kinesisStreamingDestinationOutput_destinationStatus :: Lens.Lens' KinesisStreamingDestinationOutput (Prelude.Maybe DestinationStatus)
kinesisStreamingDestinationOutput_destinationStatus :: (Maybe DestinationStatus -> f (Maybe DestinationStatus))
-> KinesisStreamingDestinationOutput
-> f KinesisStreamingDestinationOutput
kinesisStreamingDestinationOutput_destinationStatus = (KinesisStreamingDestinationOutput -> Maybe DestinationStatus)
-> (KinesisStreamingDestinationOutput
-> Maybe DestinationStatus -> KinesisStreamingDestinationOutput)
-> Lens
KinesisStreamingDestinationOutput
KinesisStreamingDestinationOutput
(Maybe DestinationStatus)
(Maybe 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)
kinesisStreamingDestinationOutput_streamArn :: Lens.Lens' KinesisStreamingDestinationOutput (Prelude.Maybe Prelude.Text)
kinesisStreamingDestinationOutput_streamArn :: (Maybe Text -> f (Maybe Text))
-> KinesisStreamingDestinationOutput
-> f KinesisStreamingDestinationOutput
kinesisStreamingDestinationOutput_streamArn = (KinesisStreamingDestinationOutput -> Maybe Text)
-> (KinesisStreamingDestinationOutput
-> Maybe Text -> KinesisStreamingDestinationOutput)
-> Lens
KinesisStreamingDestinationOutput
KinesisStreamingDestinationOutput
(Maybe Text)
(Maybe Text)
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)
kinesisStreamingDestinationOutput_tableName :: Lens.Lens' KinesisStreamingDestinationOutput (Prelude.Maybe Prelude.Text)
kinesisStreamingDestinationOutput_tableName :: (Maybe Text -> f (Maybe Text))
-> KinesisStreamingDestinationOutput
-> f KinesisStreamingDestinationOutput
kinesisStreamingDestinationOutput_tableName = (KinesisStreamingDestinationOutput -> Maybe Text)
-> (KinesisStreamingDestinationOutput
-> Maybe Text -> KinesisStreamingDestinationOutput)
-> Lens
KinesisStreamingDestinationOutput
KinesisStreamingDestinationOutput
(Maybe Text)
(Maybe Text)
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
Core.FromJSON
KinesisStreamingDestinationOutput
where
parseJSON :: Value -> Parser KinesisStreamingDestinationOutput
parseJSON =
String
-> (Object -> Parser KinesisStreamingDestinationOutput)
-> Value
-> Parser KinesisStreamingDestinationOutput
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"KinesisStreamingDestinationOutput"
( \Object
x ->
Maybe DestinationStatus
-> Maybe Text -> Maybe Text -> KinesisStreamingDestinationOutput
KinesisStreamingDestinationOutput'
(Maybe DestinationStatus
-> Maybe Text -> Maybe Text -> KinesisStreamingDestinationOutput)
-> Parser (Maybe DestinationStatus)
-> Parser
(Maybe Text -> Maybe Text -> KinesisStreamingDestinationOutput)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe DestinationStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"DestinationStatus")
Parser
(Maybe Text -> Maybe Text -> KinesisStreamingDestinationOutput)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> KinesisStreamingDestinationOutput)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"StreamArn")
Parser (Maybe Text -> KinesisStreamingDestinationOutput)
-> Parser (Maybe Text) -> Parser KinesisStreamingDestinationOutput
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"TableName")
)
instance
Prelude.Hashable
KinesisStreamingDestinationOutput
instance
Prelude.NFData
KinesisStreamingDestinationOutput