{-# 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.DynamoDBStreams.Types.StreamDescription where
import qualified Amazonka.Core as Core
import Amazonka.DynamoDBStreams.Types.KeySchemaElement
import Amazonka.DynamoDBStreams.Types.Shard
import Amazonka.DynamoDBStreams.Types.StreamStatus
import Amazonka.DynamoDBStreams.Types.StreamViewType
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data StreamDescription = StreamDescription'
{
StreamDescription -> Maybe Text
lastEvaluatedShardId :: Prelude.Maybe Prelude.Text,
StreamDescription -> Maybe Text
streamLabel :: Prelude.Maybe Prelude.Text,
StreamDescription -> Maybe StreamStatus
streamStatus :: Prelude.Maybe StreamStatus,
StreamDescription -> Maybe (NonEmpty KeySchemaElement)
keySchema :: Prelude.Maybe (Prelude.NonEmpty KeySchemaElement),
StreamDescription -> Maybe StreamViewType
streamViewType :: Prelude.Maybe StreamViewType,
StreamDescription -> Maybe Text
streamArn :: Prelude.Maybe Prelude.Text,
StreamDescription -> Maybe [Shard]
shards :: Prelude.Maybe [Shard],
StreamDescription -> Maybe Text
tableName :: Prelude.Maybe Prelude.Text,
StreamDescription -> Maybe POSIX
creationRequestDateTime :: Prelude.Maybe Core.POSIX
}
deriving (StreamDescription -> StreamDescription -> Bool
(StreamDescription -> StreamDescription -> Bool)
-> (StreamDescription -> StreamDescription -> Bool)
-> Eq StreamDescription
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StreamDescription -> StreamDescription -> Bool
$c/= :: StreamDescription -> StreamDescription -> Bool
== :: StreamDescription -> StreamDescription -> Bool
$c== :: StreamDescription -> StreamDescription -> Bool
Prelude.Eq, ReadPrec [StreamDescription]
ReadPrec StreamDescription
Int -> ReadS StreamDescription
ReadS [StreamDescription]
(Int -> ReadS StreamDescription)
-> ReadS [StreamDescription]
-> ReadPrec StreamDescription
-> ReadPrec [StreamDescription]
-> Read StreamDescription
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StreamDescription]
$creadListPrec :: ReadPrec [StreamDescription]
readPrec :: ReadPrec StreamDescription
$creadPrec :: ReadPrec StreamDescription
readList :: ReadS [StreamDescription]
$creadList :: ReadS [StreamDescription]
readsPrec :: Int -> ReadS StreamDescription
$creadsPrec :: Int -> ReadS StreamDescription
Prelude.Read, Int -> StreamDescription -> ShowS
[StreamDescription] -> ShowS
StreamDescription -> String
(Int -> StreamDescription -> ShowS)
-> (StreamDescription -> String)
-> ([StreamDescription] -> ShowS)
-> Show StreamDescription
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StreamDescription] -> ShowS
$cshowList :: [StreamDescription] -> ShowS
show :: StreamDescription -> String
$cshow :: StreamDescription -> String
showsPrec :: Int -> StreamDescription -> ShowS
$cshowsPrec :: Int -> StreamDescription -> ShowS
Prelude.Show, (forall x. StreamDescription -> Rep StreamDescription x)
-> (forall x. Rep StreamDescription x -> StreamDescription)
-> Generic StreamDescription
forall x. Rep StreamDescription x -> StreamDescription
forall x. StreamDescription -> Rep StreamDescription x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep StreamDescription x -> StreamDescription
$cfrom :: forall x. StreamDescription -> Rep StreamDescription x
Prelude.Generic)
newStreamDescription ::
StreamDescription
newStreamDescription :: StreamDescription
newStreamDescription =
StreamDescription' :: Maybe Text
-> Maybe Text
-> Maybe StreamStatus
-> Maybe (NonEmpty KeySchemaElement)
-> Maybe StreamViewType
-> Maybe Text
-> Maybe [Shard]
-> Maybe Text
-> Maybe POSIX
-> StreamDescription
StreamDescription'
{ $sel:lastEvaluatedShardId:StreamDescription' :: Maybe Text
lastEvaluatedShardId =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:streamLabel:StreamDescription' :: Maybe Text
streamLabel = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:streamStatus:StreamDescription' :: Maybe StreamStatus
streamStatus = Maybe StreamStatus
forall a. Maybe a
Prelude.Nothing,
$sel:keySchema:StreamDescription' :: Maybe (NonEmpty KeySchemaElement)
keySchema = Maybe (NonEmpty KeySchemaElement)
forall a. Maybe a
Prelude.Nothing,
$sel:streamViewType:StreamDescription' :: Maybe StreamViewType
streamViewType = Maybe StreamViewType
forall a. Maybe a
Prelude.Nothing,
$sel:streamArn:StreamDescription' :: Maybe Text
streamArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:shards:StreamDescription' :: Maybe [Shard]
shards = Maybe [Shard]
forall a. Maybe a
Prelude.Nothing,
$sel:tableName:StreamDescription' :: Maybe Text
tableName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:creationRequestDateTime:StreamDescription' :: Maybe POSIX
creationRequestDateTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing
}
streamDescription_lastEvaluatedShardId :: Lens.Lens' StreamDescription (Prelude.Maybe Prelude.Text)
streamDescription_lastEvaluatedShardId :: (Maybe Text -> f (Maybe Text))
-> StreamDescription -> f StreamDescription
streamDescription_lastEvaluatedShardId = (StreamDescription -> Maybe Text)
-> (StreamDescription -> Maybe Text -> StreamDescription)
-> Lens
StreamDescription StreamDescription (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StreamDescription' {Maybe Text
lastEvaluatedShardId :: Maybe Text
$sel:lastEvaluatedShardId:StreamDescription' :: StreamDescription -> Maybe Text
lastEvaluatedShardId} -> Maybe Text
lastEvaluatedShardId) (\s :: StreamDescription
s@StreamDescription' {} Maybe Text
a -> StreamDescription
s {$sel:lastEvaluatedShardId:StreamDescription' :: Maybe Text
lastEvaluatedShardId = Maybe Text
a} :: StreamDescription)
streamDescription_streamLabel :: Lens.Lens' StreamDescription (Prelude.Maybe Prelude.Text)
streamDescription_streamLabel :: (Maybe Text -> f (Maybe Text))
-> StreamDescription -> f StreamDescription
streamDescription_streamLabel = (StreamDescription -> Maybe Text)
-> (StreamDescription -> Maybe Text -> StreamDescription)
-> Lens
StreamDescription StreamDescription (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StreamDescription' {Maybe Text
streamLabel :: Maybe Text
$sel:streamLabel:StreamDescription' :: StreamDescription -> Maybe Text
streamLabel} -> Maybe Text
streamLabel) (\s :: StreamDescription
s@StreamDescription' {} Maybe Text
a -> StreamDescription
s {$sel:streamLabel:StreamDescription' :: Maybe Text
streamLabel = Maybe Text
a} :: StreamDescription)
streamDescription_streamStatus :: Lens.Lens' StreamDescription (Prelude.Maybe StreamStatus)
streamDescription_streamStatus :: (Maybe StreamStatus -> f (Maybe StreamStatus))
-> StreamDescription -> f StreamDescription
streamDescription_streamStatus = (StreamDescription -> Maybe StreamStatus)
-> (StreamDescription -> Maybe StreamStatus -> StreamDescription)
-> Lens
StreamDescription
StreamDescription
(Maybe StreamStatus)
(Maybe StreamStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StreamDescription' {Maybe StreamStatus
streamStatus :: Maybe StreamStatus
$sel:streamStatus:StreamDescription' :: StreamDescription -> Maybe StreamStatus
streamStatus} -> Maybe StreamStatus
streamStatus) (\s :: StreamDescription
s@StreamDescription' {} Maybe StreamStatus
a -> StreamDescription
s {$sel:streamStatus:StreamDescription' :: Maybe StreamStatus
streamStatus = Maybe StreamStatus
a} :: StreamDescription)
streamDescription_keySchema :: Lens.Lens' StreamDescription (Prelude.Maybe (Prelude.NonEmpty KeySchemaElement))
streamDescription_keySchema :: (Maybe (NonEmpty KeySchemaElement)
-> f (Maybe (NonEmpty KeySchemaElement)))
-> StreamDescription -> f StreamDescription
streamDescription_keySchema = (StreamDescription -> Maybe (NonEmpty KeySchemaElement))
-> (StreamDescription
-> Maybe (NonEmpty KeySchemaElement) -> StreamDescription)
-> Lens
StreamDescription
StreamDescription
(Maybe (NonEmpty KeySchemaElement))
(Maybe (NonEmpty KeySchemaElement))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StreamDescription' {Maybe (NonEmpty KeySchemaElement)
keySchema :: Maybe (NonEmpty KeySchemaElement)
$sel:keySchema:StreamDescription' :: StreamDescription -> Maybe (NonEmpty KeySchemaElement)
keySchema} -> Maybe (NonEmpty KeySchemaElement)
keySchema) (\s :: StreamDescription
s@StreamDescription' {} Maybe (NonEmpty KeySchemaElement)
a -> StreamDescription
s {$sel:keySchema:StreamDescription' :: Maybe (NonEmpty KeySchemaElement)
keySchema = Maybe (NonEmpty KeySchemaElement)
a} :: StreamDescription) ((Maybe (NonEmpty KeySchemaElement)
-> f (Maybe (NonEmpty KeySchemaElement)))
-> StreamDescription -> f StreamDescription)
-> ((Maybe (NonEmpty KeySchemaElement)
-> f (Maybe (NonEmpty KeySchemaElement)))
-> Maybe (NonEmpty KeySchemaElement)
-> f (Maybe (NonEmpty KeySchemaElement)))
-> (Maybe (NonEmpty KeySchemaElement)
-> f (Maybe (NonEmpty KeySchemaElement)))
-> StreamDescription
-> f StreamDescription
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(NonEmpty KeySchemaElement)
(NonEmpty KeySchemaElement)
(NonEmpty KeySchemaElement)
(NonEmpty KeySchemaElement)
-> Iso
(Maybe (NonEmpty KeySchemaElement))
(Maybe (NonEmpty KeySchemaElement))
(Maybe (NonEmpty KeySchemaElement))
(Maybe (NonEmpty KeySchemaElement))
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
(NonEmpty KeySchemaElement)
(NonEmpty KeySchemaElement)
(NonEmpty KeySchemaElement)
(NonEmpty KeySchemaElement)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
streamDescription_streamViewType :: Lens.Lens' StreamDescription (Prelude.Maybe StreamViewType)
streamDescription_streamViewType :: (Maybe StreamViewType -> f (Maybe StreamViewType))
-> StreamDescription -> f StreamDescription
streamDescription_streamViewType = (StreamDescription -> Maybe StreamViewType)
-> (StreamDescription -> Maybe StreamViewType -> StreamDescription)
-> Lens
StreamDescription
StreamDescription
(Maybe StreamViewType)
(Maybe StreamViewType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StreamDescription' {Maybe StreamViewType
streamViewType :: Maybe StreamViewType
$sel:streamViewType:StreamDescription' :: StreamDescription -> Maybe StreamViewType
streamViewType} -> Maybe StreamViewType
streamViewType) (\s :: StreamDescription
s@StreamDescription' {} Maybe StreamViewType
a -> StreamDescription
s {$sel:streamViewType:StreamDescription' :: Maybe StreamViewType
streamViewType = Maybe StreamViewType
a} :: StreamDescription)
streamDescription_streamArn :: Lens.Lens' StreamDescription (Prelude.Maybe Prelude.Text)
streamDescription_streamArn :: (Maybe Text -> f (Maybe Text))
-> StreamDescription -> f StreamDescription
streamDescription_streamArn = (StreamDescription -> Maybe Text)
-> (StreamDescription -> Maybe Text -> StreamDescription)
-> Lens
StreamDescription StreamDescription (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StreamDescription' {Maybe Text
streamArn :: Maybe Text
$sel:streamArn:StreamDescription' :: StreamDescription -> Maybe Text
streamArn} -> Maybe Text
streamArn) (\s :: StreamDescription
s@StreamDescription' {} Maybe Text
a -> StreamDescription
s {$sel:streamArn:StreamDescription' :: Maybe Text
streamArn = Maybe Text
a} :: StreamDescription)
streamDescription_shards :: Lens.Lens' StreamDescription (Prelude.Maybe [Shard])
streamDescription_shards :: (Maybe [Shard] -> f (Maybe [Shard]))
-> StreamDescription -> f StreamDescription
streamDescription_shards = (StreamDescription -> Maybe [Shard])
-> (StreamDescription -> Maybe [Shard] -> StreamDescription)
-> Lens
StreamDescription StreamDescription (Maybe [Shard]) (Maybe [Shard])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StreamDescription' {Maybe [Shard]
shards :: Maybe [Shard]
$sel:shards:StreamDescription' :: StreamDescription -> Maybe [Shard]
shards} -> Maybe [Shard]
shards) (\s :: StreamDescription
s@StreamDescription' {} Maybe [Shard]
a -> StreamDescription
s {$sel:shards:StreamDescription' :: Maybe [Shard]
shards = Maybe [Shard]
a} :: StreamDescription) ((Maybe [Shard] -> f (Maybe [Shard]))
-> StreamDescription -> f StreamDescription)
-> ((Maybe [Shard] -> f (Maybe [Shard]))
-> Maybe [Shard] -> f (Maybe [Shard]))
-> (Maybe [Shard] -> f (Maybe [Shard]))
-> StreamDescription
-> f StreamDescription
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Shard] [Shard] [Shard] [Shard]
-> Iso
(Maybe [Shard]) (Maybe [Shard]) (Maybe [Shard]) (Maybe [Shard])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Shard] [Shard] [Shard] [Shard]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
streamDescription_tableName :: Lens.Lens' StreamDescription (Prelude.Maybe Prelude.Text)
streamDescription_tableName :: (Maybe Text -> f (Maybe Text))
-> StreamDescription -> f StreamDescription
streamDescription_tableName = (StreamDescription -> Maybe Text)
-> (StreamDescription -> Maybe Text -> StreamDescription)
-> Lens
StreamDescription StreamDescription (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StreamDescription' {Maybe Text
tableName :: Maybe Text
$sel:tableName:StreamDescription' :: StreamDescription -> Maybe Text
tableName} -> Maybe Text
tableName) (\s :: StreamDescription
s@StreamDescription' {} Maybe Text
a -> StreamDescription
s {$sel:tableName:StreamDescription' :: Maybe Text
tableName = Maybe Text
a} :: StreamDescription)
streamDescription_creationRequestDateTime :: Lens.Lens' StreamDescription (Prelude.Maybe Prelude.UTCTime)
streamDescription_creationRequestDateTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> StreamDescription -> f StreamDescription
streamDescription_creationRequestDateTime = (StreamDescription -> Maybe POSIX)
-> (StreamDescription -> Maybe POSIX -> StreamDescription)
-> Lens
StreamDescription StreamDescription (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StreamDescription' {Maybe POSIX
creationRequestDateTime :: Maybe POSIX
$sel:creationRequestDateTime:StreamDescription' :: StreamDescription -> Maybe POSIX
creationRequestDateTime} -> Maybe POSIX
creationRequestDateTime) (\s :: StreamDescription
s@StreamDescription' {} Maybe POSIX
a -> StreamDescription
s {$sel:creationRequestDateTime:StreamDescription' :: Maybe POSIX
creationRequestDateTime = Maybe POSIX
a} :: StreamDescription) ((Maybe POSIX -> f (Maybe POSIX))
-> StreamDescription -> f StreamDescription)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> StreamDescription
-> f StreamDescription
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
instance Core.FromJSON StreamDescription where
parseJSON :: Value -> Parser StreamDescription
parseJSON =
String
-> (Object -> Parser StreamDescription)
-> Value
-> Parser StreamDescription
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"StreamDescription"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Maybe StreamStatus
-> Maybe (NonEmpty KeySchemaElement)
-> Maybe StreamViewType
-> Maybe Text
-> Maybe [Shard]
-> Maybe Text
-> Maybe POSIX
-> StreamDescription
StreamDescription'
(Maybe Text
-> Maybe Text
-> Maybe StreamStatus
-> Maybe (NonEmpty KeySchemaElement)
-> Maybe StreamViewType
-> Maybe Text
-> Maybe [Shard]
-> Maybe Text
-> Maybe POSIX
-> StreamDescription)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe StreamStatus
-> Maybe (NonEmpty KeySchemaElement)
-> Maybe StreamViewType
-> Maybe Text
-> Maybe [Shard]
-> Maybe Text
-> Maybe POSIX
-> StreamDescription)
forall (f :: * -> *) a b. Functor 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
"LastEvaluatedShardId")
Parser
(Maybe Text
-> Maybe StreamStatus
-> Maybe (NonEmpty KeySchemaElement)
-> Maybe StreamViewType
-> Maybe Text
-> Maybe [Shard]
-> Maybe Text
-> Maybe POSIX
-> StreamDescription)
-> Parser (Maybe Text)
-> Parser
(Maybe StreamStatus
-> Maybe (NonEmpty KeySchemaElement)
-> Maybe StreamViewType
-> Maybe Text
-> Maybe [Shard]
-> Maybe Text
-> Maybe POSIX
-> StreamDescription)
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
"StreamLabel")
Parser
(Maybe StreamStatus
-> Maybe (NonEmpty KeySchemaElement)
-> Maybe StreamViewType
-> Maybe Text
-> Maybe [Shard]
-> Maybe Text
-> Maybe POSIX
-> StreamDescription)
-> Parser (Maybe StreamStatus)
-> Parser
(Maybe (NonEmpty KeySchemaElement)
-> Maybe StreamViewType
-> Maybe Text
-> Maybe [Shard]
-> Maybe Text
-> Maybe POSIX
-> StreamDescription)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe StreamStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"StreamStatus")
Parser
(Maybe (NonEmpty KeySchemaElement)
-> Maybe StreamViewType
-> Maybe Text
-> Maybe [Shard]
-> Maybe Text
-> Maybe POSIX
-> StreamDescription)
-> Parser (Maybe (NonEmpty KeySchemaElement))
-> Parser
(Maybe StreamViewType
-> Maybe Text
-> Maybe [Shard]
-> Maybe Text
-> Maybe POSIX
-> StreamDescription)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (NonEmpty KeySchemaElement))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"KeySchema")
Parser
(Maybe StreamViewType
-> Maybe Text
-> Maybe [Shard]
-> Maybe Text
-> Maybe POSIX
-> StreamDescription)
-> Parser (Maybe StreamViewType)
-> Parser
(Maybe Text
-> Maybe [Shard] -> Maybe Text -> Maybe POSIX -> StreamDescription)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe StreamViewType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"StreamViewType")
Parser
(Maybe Text
-> Maybe [Shard] -> Maybe Text -> Maybe POSIX -> StreamDescription)
-> Parser (Maybe Text)
-> Parser
(Maybe [Shard] -> Maybe Text -> Maybe POSIX -> StreamDescription)
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 [Shard] -> Maybe Text -> Maybe POSIX -> StreamDescription)
-> Parser (Maybe [Shard])
-> Parser (Maybe Text -> Maybe POSIX -> StreamDescription)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [Shard]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Shards" Parser (Maybe (Maybe [Shard]))
-> Maybe [Shard] -> Parser (Maybe [Shard])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Shard]
forall a. Monoid a => a
Prelude.mempty)
Parser (Maybe Text -> Maybe POSIX -> StreamDescription)
-> Parser (Maybe Text) -> Parser (Maybe POSIX -> StreamDescription)
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")
Parser (Maybe POSIX -> StreamDescription)
-> Parser (Maybe POSIX) -> Parser StreamDescription
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CreationRequestDateTime")
)
instance Prelude.Hashable StreamDescription
instance Prelude.NFData StreamDescription