{-# 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.KinesisStreamingDestinationInput where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data KinesisStreamingDestinationInput = KinesisStreamingDestinationInput'
{
KinesisStreamingDestinationInput -> Text
tableName :: Prelude.Text,
KinesisStreamingDestinationInput -> Text
streamArn :: Prelude.Text
}
deriving (KinesisStreamingDestinationInput
-> KinesisStreamingDestinationInput -> Bool
(KinesisStreamingDestinationInput
-> KinesisStreamingDestinationInput -> Bool)
-> (KinesisStreamingDestinationInput
-> KinesisStreamingDestinationInput -> Bool)
-> Eq KinesisStreamingDestinationInput
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: KinesisStreamingDestinationInput
-> KinesisStreamingDestinationInput -> Bool
$c/= :: KinesisStreamingDestinationInput
-> KinesisStreamingDestinationInput -> Bool
== :: KinesisStreamingDestinationInput
-> KinesisStreamingDestinationInput -> Bool
$c== :: KinesisStreamingDestinationInput
-> KinesisStreamingDestinationInput -> Bool
Prelude.Eq, ReadPrec [KinesisStreamingDestinationInput]
ReadPrec KinesisStreamingDestinationInput
Int -> ReadS KinesisStreamingDestinationInput
ReadS [KinesisStreamingDestinationInput]
(Int -> ReadS KinesisStreamingDestinationInput)
-> ReadS [KinesisStreamingDestinationInput]
-> ReadPrec KinesisStreamingDestinationInput
-> ReadPrec [KinesisStreamingDestinationInput]
-> Read KinesisStreamingDestinationInput
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [KinesisStreamingDestinationInput]
$creadListPrec :: ReadPrec [KinesisStreamingDestinationInput]
readPrec :: ReadPrec KinesisStreamingDestinationInput
$creadPrec :: ReadPrec KinesisStreamingDestinationInput
readList :: ReadS [KinesisStreamingDestinationInput]
$creadList :: ReadS [KinesisStreamingDestinationInput]
readsPrec :: Int -> ReadS KinesisStreamingDestinationInput
$creadsPrec :: Int -> ReadS KinesisStreamingDestinationInput
Prelude.Read, Int -> KinesisStreamingDestinationInput -> ShowS
[KinesisStreamingDestinationInput] -> ShowS
KinesisStreamingDestinationInput -> String
(Int -> KinesisStreamingDestinationInput -> ShowS)
-> (KinesisStreamingDestinationInput -> String)
-> ([KinesisStreamingDestinationInput] -> ShowS)
-> Show KinesisStreamingDestinationInput
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [KinesisStreamingDestinationInput] -> ShowS
$cshowList :: [KinesisStreamingDestinationInput] -> ShowS
show :: KinesisStreamingDestinationInput -> String
$cshow :: KinesisStreamingDestinationInput -> String
showsPrec :: Int -> KinesisStreamingDestinationInput -> ShowS
$cshowsPrec :: Int -> KinesisStreamingDestinationInput -> ShowS
Prelude.Show, (forall x.
KinesisStreamingDestinationInput
-> Rep KinesisStreamingDestinationInput x)
-> (forall x.
Rep KinesisStreamingDestinationInput x
-> KinesisStreamingDestinationInput)
-> Generic KinesisStreamingDestinationInput
forall x.
Rep KinesisStreamingDestinationInput x
-> KinesisStreamingDestinationInput
forall x.
KinesisStreamingDestinationInput
-> Rep KinesisStreamingDestinationInput x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep KinesisStreamingDestinationInput x
-> KinesisStreamingDestinationInput
$cfrom :: forall x.
KinesisStreamingDestinationInput
-> Rep KinesisStreamingDestinationInput x
Prelude.Generic)
newKinesisStreamingDestinationInput ::
Prelude.Text ->
Prelude.Text ->
KinesisStreamingDestinationInput
newKinesisStreamingDestinationInput :: Text -> Text -> KinesisStreamingDestinationInput
newKinesisStreamingDestinationInput
Text
pTableName_
Text
pStreamArn_ =
KinesisStreamingDestinationInput' :: Text -> Text -> KinesisStreamingDestinationInput
KinesisStreamingDestinationInput'
{ $sel:tableName:KinesisStreamingDestinationInput' :: Text
tableName =
Text
pTableName_,
$sel:streamArn:KinesisStreamingDestinationInput' :: Text
streamArn = Text
pStreamArn_
}
kinesisStreamingDestinationInput_tableName :: Lens.Lens' KinesisStreamingDestinationInput Prelude.Text
kinesisStreamingDestinationInput_tableName :: (Text -> f Text)
-> KinesisStreamingDestinationInput
-> f KinesisStreamingDestinationInput
kinesisStreamingDestinationInput_tableName = (KinesisStreamingDestinationInput -> Text)
-> (KinesisStreamingDestinationInput
-> Text -> KinesisStreamingDestinationInput)
-> Lens
KinesisStreamingDestinationInput
KinesisStreamingDestinationInput
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\KinesisStreamingDestinationInput' {Text
tableName :: Text
$sel:tableName:KinesisStreamingDestinationInput' :: KinesisStreamingDestinationInput -> Text
tableName} -> Text
tableName) (\s :: KinesisStreamingDestinationInput
s@KinesisStreamingDestinationInput' {} Text
a -> KinesisStreamingDestinationInput
s {$sel:tableName:KinesisStreamingDestinationInput' :: Text
tableName = Text
a} :: KinesisStreamingDestinationInput)
kinesisStreamingDestinationInput_streamArn :: Lens.Lens' KinesisStreamingDestinationInput Prelude.Text
kinesisStreamingDestinationInput_streamArn :: (Text -> f Text)
-> KinesisStreamingDestinationInput
-> f KinesisStreamingDestinationInput
kinesisStreamingDestinationInput_streamArn = (KinesisStreamingDestinationInput -> Text)
-> (KinesisStreamingDestinationInput
-> Text -> KinesisStreamingDestinationInput)
-> Lens
KinesisStreamingDestinationInput
KinesisStreamingDestinationInput
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\KinesisStreamingDestinationInput' {Text
streamArn :: Text
$sel:streamArn:KinesisStreamingDestinationInput' :: KinesisStreamingDestinationInput -> Text
streamArn} -> Text
streamArn) (\s :: KinesisStreamingDestinationInput
s@KinesisStreamingDestinationInput' {} Text
a -> KinesisStreamingDestinationInput
s {$sel:streamArn:KinesisStreamingDestinationInput' :: Text
streamArn = Text
a} :: KinesisStreamingDestinationInput)
instance
Prelude.Hashable
KinesisStreamingDestinationInput
instance
Prelude.NFData
KinesisStreamingDestinationInput
instance Core.ToJSON KinesisStreamingDestinationInput where
toJSON :: KinesisStreamingDestinationInput -> Value
toJSON KinesisStreamingDestinationInput' {Text
streamArn :: Text
tableName :: Text
$sel:streamArn:KinesisStreamingDestinationInput' :: KinesisStreamingDestinationInput -> Text
$sel:tableName:KinesisStreamingDestinationInput' :: KinesisStreamingDestinationInput -> 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
"TableName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
tableName),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"StreamArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
streamArn)
]
)