{-# 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.KinesisDataStreamDestination 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 KinesisDataStreamDestination = KinesisDataStreamDestination'
{
KinesisDataStreamDestination -> Maybe DestinationStatus
destinationStatus :: Prelude.Maybe DestinationStatus,
KinesisDataStreamDestination -> Maybe Text
streamArn :: Prelude.Maybe Prelude.Text,
KinesisDataStreamDestination -> Maybe Text
destinationStatusDescription :: Prelude.Maybe Prelude.Text
}
deriving (KinesisDataStreamDestination
-> KinesisDataStreamDestination -> Bool
(KinesisDataStreamDestination
-> KinesisDataStreamDestination -> Bool)
-> (KinesisDataStreamDestination
-> KinesisDataStreamDestination -> Bool)
-> Eq KinesisDataStreamDestination
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: KinesisDataStreamDestination
-> KinesisDataStreamDestination -> Bool
$c/= :: KinesisDataStreamDestination
-> KinesisDataStreamDestination -> Bool
== :: KinesisDataStreamDestination
-> KinesisDataStreamDestination -> Bool
$c== :: KinesisDataStreamDestination
-> KinesisDataStreamDestination -> Bool
Prelude.Eq, ReadPrec [KinesisDataStreamDestination]
ReadPrec KinesisDataStreamDestination
Int -> ReadS KinesisDataStreamDestination
ReadS [KinesisDataStreamDestination]
(Int -> ReadS KinesisDataStreamDestination)
-> ReadS [KinesisDataStreamDestination]
-> ReadPrec KinesisDataStreamDestination
-> ReadPrec [KinesisDataStreamDestination]
-> Read KinesisDataStreamDestination
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [KinesisDataStreamDestination]
$creadListPrec :: ReadPrec [KinesisDataStreamDestination]
readPrec :: ReadPrec KinesisDataStreamDestination
$creadPrec :: ReadPrec KinesisDataStreamDestination
readList :: ReadS [KinesisDataStreamDestination]
$creadList :: ReadS [KinesisDataStreamDestination]
readsPrec :: Int -> ReadS KinesisDataStreamDestination
$creadsPrec :: Int -> ReadS KinesisDataStreamDestination
Prelude.Read, Int -> KinesisDataStreamDestination -> ShowS
[KinesisDataStreamDestination] -> ShowS
KinesisDataStreamDestination -> String
(Int -> KinesisDataStreamDestination -> ShowS)
-> (KinesisDataStreamDestination -> String)
-> ([KinesisDataStreamDestination] -> ShowS)
-> Show KinesisDataStreamDestination
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [KinesisDataStreamDestination] -> ShowS
$cshowList :: [KinesisDataStreamDestination] -> ShowS
show :: KinesisDataStreamDestination -> String
$cshow :: KinesisDataStreamDestination -> String
showsPrec :: Int -> KinesisDataStreamDestination -> ShowS
$cshowsPrec :: Int -> KinesisDataStreamDestination -> ShowS
Prelude.Show, (forall x.
KinesisDataStreamDestination -> Rep KinesisDataStreamDestination x)
-> (forall x.
Rep KinesisDataStreamDestination x -> KinesisDataStreamDestination)
-> Generic KinesisDataStreamDestination
forall x.
Rep KinesisDataStreamDestination x -> KinesisDataStreamDestination
forall x.
KinesisDataStreamDestination -> Rep KinesisDataStreamDestination x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep KinesisDataStreamDestination x -> KinesisDataStreamDestination
$cfrom :: forall x.
KinesisDataStreamDestination -> Rep KinesisDataStreamDestination x
Prelude.Generic)
newKinesisDataStreamDestination ::
KinesisDataStreamDestination
newKinesisDataStreamDestination :: KinesisDataStreamDestination
newKinesisDataStreamDestination =
KinesisDataStreamDestination' :: Maybe DestinationStatus
-> Maybe Text -> Maybe Text -> KinesisDataStreamDestination
KinesisDataStreamDestination'
{ $sel:destinationStatus:KinesisDataStreamDestination' :: Maybe DestinationStatus
destinationStatus =
Maybe DestinationStatus
forall a. Maybe a
Prelude.Nothing,
$sel:streamArn:KinesisDataStreamDestination' :: Maybe Text
streamArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:destinationStatusDescription:KinesisDataStreamDestination' :: Maybe Text
destinationStatusDescription =
Maybe Text
forall a. Maybe a
Prelude.Nothing
}
kinesisDataStreamDestination_destinationStatus :: Lens.Lens' KinesisDataStreamDestination (Prelude.Maybe DestinationStatus)
kinesisDataStreamDestination_destinationStatus :: (Maybe DestinationStatus -> f (Maybe DestinationStatus))
-> KinesisDataStreamDestination -> f KinesisDataStreamDestination
kinesisDataStreamDestination_destinationStatus = (KinesisDataStreamDestination -> Maybe DestinationStatus)
-> (KinesisDataStreamDestination
-> Maybe DestinationStatus -> KinesisDataStreamDestination)
-> Lens
KinesisDataStreamDestination
KinesisDataStreamDestination
(Maybe DestinationStatus)
(Maybe DestinationStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\KinesisDataStreamDestination' {Maybe DestinationStatus
destinationStatus :: Maybe DestinationStatus
$sel:destinationStatus:KinesisDataStreamDestination' :: KinesisDataStreamDestination -> Maybe DestinationStatus
destinationStatus} -> Maybe DestinationStatus
destinationStatus) (\s :: KinesisDataStreamDestination
s@KinesisDataStreamDestination' {} Maybe DestinationStatus
a -> KinesisDataStreamDestination
s {$sel:destinationStatus:KinesisDataStreamDestination' :: Maybe DestinationStatus
destinationStatus = Maybe DestinationStatus
a} :: KinesisDataStreamDestination)
kinesisDataStreamDestination_streamArn :: Lens.Lens' KinesisDataStreamDestination (Prelude.Maybe Prelude.Text)
kinesisDataStreamDestination_streamArn :: (Maybe Text -> f (Maybe Text))
-> KinesisDataStreamDestination -> f KinesisDataStreamDestination
kinesisDataStreamDestination_streamArn = (KinesisDataStreamDestination -> Maybe Text)
-> (KinesisDataStreamDestination
-> Maybe Text -> KinesisDataStreamDestination)
-> Lens
KinesisDataStreamDestination
KinesisDataStreamDestination
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\KinesisDataStreamDestination' {Maybe Text
streamArn :: Maybe Text
$sel:streamArn:KinesisDataStreamDestination' :: KinesisDataStreamDestination -> Maybe Text
streamArn} -> Maybe Text
streamArn) (\s :: KinesisDataStreamDestination
s@KinesisDataStreamDestination' {} Maybe Text
a -> KinesisDataStreamDestination
s {$sel:streamArn:KinesisDataStreamDestination' :: Maybe Text
streamArn = Maybe Text
a} :: KinesisDataStreamDestination)
kinesisDataStreamDestination_destinationStatusDescription :: Lens.Lens' KinesisDataStreamDestination (Prelude.Maybe Prelude.Text)
kinesisDataStreamDestination_destinationStatusDescription :: (Maybe Text -> f (Maybe Text))
-> KinesisDataStreamDestination -> f KinesisDataStreamDestination
kinesisDataStreamDestination_destinationStatusDescription = (KinesisDataStreamDestination -> Maybe Text)
-> (KinesisDataStreamDestination
-> Maybe Text -> KinesisDataStreamDestination)
-> Lens
KinesisDataStreamDestination
KinesisDataStreamDestination
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\KinesisDataStreamDestination' {Maybe Text
destinationStatusDescription :: Maybe Text
$sel:destinationStatusDescription:KinesisDataStreamDestination' :: KinesisDataStreamDestination -> Maybe Text
destinationStatusDescription} -> Maybe Text
destinationStatusDescription) (\s :: KinesisDataStreamDestination
s@KinesisDataStreamDestination' {} Maybe Text
a -> KinesisDataStreamDestination
s {$sel:destinationStatusDescription:KinesisDataStreamDestination' :: Maybe Text
destinationStatusDescription = Maybe Text
a} :: KinesisDataStreamDestination)
instance Core.FromJSON KinesisDataStreamDestination where
parseJSON :: Value -> Parser KinesisDataStreamDestination
parseJSON =
String
-> (Object -> Parser KinesisDataStreamDestination)
-> Value
-> Parser KinesisDataStreamDestination
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"KinesisDataStreamDestination"
( \Object
x ->
Maybe DestinationStatus
-> Maybe Text -> Maybe Text -> KinesisDataStreamDestination
KinesisDataStreamDestination'
(Maybe DestinationStatus
-> Maybe Text -> Maybe Text -> KinesisDataStreamDestination)
-> Parser (Maybe DestinationStatus)
-> Parser
(Maybe Text -> Maybe Text -> KinesisDataStreamDestination)
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 -> KinesisDataStreamDestination)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> KinesisDataStreamDestination)
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 -> KinesisDataStreamDestination)
-> Parser (Maybe Text) -> Parser KinesisDataStreamDestination
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
"DestinationStatusDescription")
)
instance
Prelude.Hashable
KinesisDataStreamDestination
instance Prelude.NFData KinesisDataStreamDestination