{-# 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.SourceTableDetails
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.DynamoDB.Types.SourceTableDetails where

import qualified Amazonka.Core as Core
import Amazonka.DynamoDB.Types.BillingMode
import Amazonka.DynamoDB.Types.KeySchemaElement
import Amazonka.DynamoDB.Types.ProvisionedThroughput
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Contains the details of the table when the backup was created.
--
-- /See:/ 'newSourceTableDetails' smart constructor.
data SourceTableDetails = SourceTableDetails'
  { -- | Size of the table in bytes. Note that this is an approximate value.
    SourceTableDetails -> Maybe Integer
tableSizeBytes :: Prelude.Maybe Prelude.Integer,
    -- | ARN of the table for which backup was created.
    SourceTableDetails -> Maybe Text
tableArn :: Prelude.Maybe Prelude.Text,
    -- | Controls how you are charged for read and write throughput and how you
    -- manage capacity. This setting can be changed later.
    --
    -- -   @PROVISIONED@ - Sets the read\/write capacity mode to @PROVISIONED@.
    --     We recommend using @PROVISIONED@ for predictable workloads.
    --
    -- -   @PAY_PER_REQUEST@ - Sets the read\/write capacity mode to
    --     @PAY_PER_REQUEST@. We recommend using @PAY_PER_REQUEST@ for
    --     unpredictable workloads.
    SourceTableDetails -> Maybe BillingMode
billingMode :: Prelude.Maybe BillingMode,
    -- | Number of items in the table. Note that this is an approximate value.
    SourceTableDetails -> Maybe Natural
itemCount :: Prelude.Maybe Prelude.Natural,
    -- | The name of the table for which the backup was created.
    SourceTableDetails -> Text
tableName :: Prelude.Text,
    -- | Unique identifier for the table for which the backup was created.
    SourceTableDetails -> Text
tableId :: Prelude.Text,
    -- | Schema of the table.
    SourceTableDetails -> NonEmpty KeySchemaElement
keySchema :: Prelude.NonEmpty KeySchemaElement,
    -- | Time when the source table was created.
    SourceTableDetails -> POSIX
tableCreationDateTime :: Core.POSIX,
    -- | Read IOPs and Write IOPS on the table when the backup was created.
    SourceTableDetails -> ProvisionedThroughput
provisionedThroughput :: ProvisionedThroughput
  }
  deriving (SourceTableDetails -> SourceTableDetails -> Bool
(SourceTableDetails -> SourceTableDetails -> Bool)
-> (SourceTableDetails -> SourceTableDetails -> Bool)
-> Eq SourceTableDetails
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SourceTableDetails -> SourceTableDetails -> Bool
$c/= :: SourceTableDetails -> SourceTableDetails -> Bool
== :: SourceTableDetails -> SourceTableDetails -> Bool
$c== :: SourceTableDetails -> SourceTableDetails -> Bool
Prelude.Eq, ReadPrec [SourceTableDetails]
ReadPrec SourceTableDetails
Int -> ReadS SourceTableDetails
ReadS [SourceTableDetails]
(Int -> ReadS SourceTableDetails)
-> ReadS [SourceTableDetails]
-> ReadPrec SourceTableDetails
-> ReadPrec [SourceTableDetails]
-> Read SourceTableDetails
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SourceTableDetails]
$creadListPrec :: ReadPrec [SourceTableDetails]
readPrec :: ReadPrec SourceTableDetails
$creadPrec :: ReadPrec SourceTableDetails
readList :: ReadS [SourceTableDetails]
$creadList :: ReadS [SourceTableDetails]
readsPrec :: Int -> ReadS SourceTableDetails
$creadsPrec :: Int -> ReadS SourceTableDetails
Prelude.Read, Int -> SourceTableDetails -> ShowS
[SourceTableDetails] -> ShowS
SourceTableDetails -> String
(Int -> SourceTableDetails -> ShowS)
-> (SourceTableDetails -> String)
-> ([SourceTableDetails] -> ShowS)
-> Show SourceTableDetails
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SourceTableDetails] -> ShowS
$cshowList :: [SourceTableDetails] -> ShowS
show :: SourceTableDetails -> String
$cshow :: SourceTableDetails -> String
showsPrec :: Int -> SourceTableDetails -> ShowS
$cshowsPrec :: Int -> SourceTableDetails -> ShowS
Prelude.Show, (forall x. SourceTableDetails -> Rep SourceTableDetails x)
-> (forall x. Rep SourceTableDetails x -> SourceTableDetails)
-> Generic SourceTableDetails
forall x. Rep SourceTableDetails x -> SourceTableDetails
forall x. SourceTableDetails -> Rep SourceTableDetails x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SourceTableDetails x -> SourceTableDetails
$cfrom :: forall x. SourceTableDetails -> Rep SourceTableDetails x
Prelude.Generic)

-- |
-- Create a value of 'SourceTableDetails' 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:
--
-- 'tableSizeBytes', 'sourceTableDetails_tableSizeBytes' - Size of the table in bytes. Note that this is an approximate value.
--
-- 'tableArn', 'sourceTableDetails_tableArn' - ARN of the table for which backup was created.
--
-- 'billingMode', 'sourceTableDetails_billingMode' - Controls how you are charged for read and write throughput and how you
-- manage capacity. This setting can be changed later.
--
-- -   @PROVISIONED@ - Sets the read\/write capacity mode to @PROVISIONED@.
--     We recommend using @PROVISIONED@ for predictable workloads.
--
-- -   @PAY_PER_REQUEST@ - Sets the read\/write capacity mode to
--     @PAY_PER_REQUEST@. We recommend using @PAY_PER_REQUEST@ for
--     unpredictable workloads.
--
-- 'itemCount', 'sourceTableDetails_itemCount' - Number of items in the table. Note that this is an approximate value.
--
-- 'tableName', 'sourceTableDetails_tableName' - The name of the table for which the backup was created.
--
-- 'tableId', 'sourceTableDetails_tableId' - Unique identifier for the table for which the backup was created.
--
-- 'keySchema', 'sourceTableDetails_keySchema' - Schema of the table.
--
-- 'tableCreationDateTime', 'sourceTableDetails_tableCreationDateTime' - Time when the source table was created.
--
-- 'provisionedThroughput', 'sourceTableDetails_provisionedThroughput' - Read IOPs and Write IOPS on the table when the backup was created.
newSourceTableDetails ::
  -- | 'tableName'
  Prelude.Text ->
  -- | 'tableId'
  Prelude.Text ->
  -- | 'keySchema'
  Prelude.NonEmpty KeySchemaElement ->
  -- | 'tableCreationDateTime'
  Prelude.UTCTime ->
  -- | 'provisionedThroughput'
  ProvisionedThroughput ->
  SourceTableDetails
newSourceTableDetails :: Text
-> Text
-> NonEmpty KeySchemaElement
-> UTCTime
-> ProvisionedThroughput
-> SourceTableDetails
newSourceTableDetails
  Text
pTableName_
  Text
pTableId_
  NonEmpty KeySchemaElement
pKeySchema_
  UTCTime
pTableCreationDateTime_
  ProvisionedThroughput
pProvisionedThroughput_ =
    SourceTableDetails' :: Maybe Integer
-> Maybe Text
-> Maybe BillingMode
-> Maybe Natural
-> Text
-> Text
-> NonEmpty KeySchemaElement
-> POSIX
-> ProvisionedThroughput
-> SourceTableDetails
SourceTableDetails'
      { $sel:tableSizeBytes:SourceTableDetails' :: Maybe Integer
tableSizeBytes =
          Maybe Integer
forall a. Maybe a
Prelude.Nothing,
        $sel:tableArn:SourceTableDetails' :: Maybe Text
tableArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:billingMode:SourceTableDetails' :: Maybe BillingMode
billingMode = Maybe BillingMode
forall a. Maybe a
Prelude.Nothing,
        $sel:itemCount:SourceTableDetails' :: Maybe Natural
itemCount = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
        $sel:tableName:SourceTableDetails' :: Text
tableName = Text
pTableName_,
        $sel:tableId:SourceTableDetails' :: Text
tableId = Text
pTableId_,
        $sel:keySchema:SourceTableDetails' :: NonEmpty KeySchemaElement
keySchema = Tagged
  (NonEmpty KeySchemaElement) (Identity (NonEmpty KeySchemaElement))
-> Tagged
     (NonEmpty KeySchemaElement) (Identity (NonEmpty KeySchemaElement))
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced (Tagged
   (NonEmpty KeySchemaElement) (Identity (NonEmpty KeySchemaElement))
 -> Tagged
      (NonEmpty KeySchemaElement) (Identity (NonEmpty KeySchemaElement)))
-> NonEmpty KeySchemaElement -> NonEmpty KeySchemaElement
forall t b. AReview t b -> b -> t
Lens.# NonEmpty KeySchemaElement
pKeySchema_,
        $sel:tableCreationDateTime:SourceTableDetails' :: POSIX
tableCreationDateTime =
          Tagged UTCTime (Identity UTCTime) -> Tagged POSIX (Identity POSIX)
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time (Tagged UTCTime (Identity UTCTime)
 -> Tagged POSIX (Identity POSIX))
-> UTCTime -> POSIX
forall t b. AReview t b -> b -> t
Lens.# UTCTime
pTableCreationDateTime_,
        $sel:provisionedThroughput:SourceTableDetails' :: ProvisionedThroughput
provisionedThroughput = ProvisionedThroughput
pProvisionedThroughput_
      }

-- | Size of the table in bytes. Note that this is an approximate value.
sourceTableDetails_tableSizeBytes :: Lens.Lens' SourceTableDetails (Prelude.Maybe Prelude.Integer)
sourceTableDetails_tableSizeBytes :: (Maybe Integer -> f (Maybe Integer))
-> SourceTableDetails -> f SourceTableDetails
sourceTableDetails_tableSizeBytes = (SourceTableDetails -> Maybe Integer)
-> (SourceTableDetails -> Maybe Integer -> SourceTableDetails)
-> Lens
     SourceTableDetails
     SourceTableDetails
     (Maybe Integer)
     (Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SourceTableDetails' {Maybe Integer
tableSizeBytes :: Maybe Integer
$sel:tableSizeBytes:SourceTableDetails' :: SourceTableDetails -> Maybe Integer
tableSizeBytes} -> Maybe Integer
tableSizeBytes) (\s :: SourceTableDetails
s@SourceTableDetails' {} Maybe Integer
a -> SourceTableDetails
s {$sel:tableSizeBytes:SourceTableDetails' :: Maybe Integer
tableSizeBytes = Maybe Integer
a} :: SourceTableDetails)

-- | ARN of the table for which backup was created.
sourceTableDetails_tableArn :: Lens.Lens' SourceTableDetails (Prelude.Maybe Prelude.Text)
sourceTableDetails_tableArn :: (Maybe Text -> f (Maybe Text))
-> SourceTableDetails -> f SourceTableDetails
sourceTableDetails_tableArn = (SourceTableDetails -> Maybe Text)
-> (SourceTableDetails -> Maybe Text -> SourceTableDetails)
-> Lens
     SourceTableDetails SourceTableDetails (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SourceTableDetails' {Maybe Text
tableArn :: Maybe Text
$sel:tableArn:SourceTableDetails' :: SourceTableDetails -> Maybe Text
tableArn} -> Maybe Text
tableArn) (\s :: SourceTableDetails
s@SourceTableDetails' {} Maybe Text
a -> SourceTableDetails
s {$sel:tableArn:SourceTableDetails' :: Maybe Text
tableArn = Maybe Text
a} :: SourceTableDetails)

-- | Controls how you are charged for read and write throughput and how you
-- manage capacity. This setting can be changed later.
--
-- -   @PROVISIONED@ - Sets the read\/write capacity mode to @PROVISIONED@.
--     We recommend using @PROVISIONED@ for predictable workloads.
--
-- -   @PAY_PER_REQUEST@ - Sets the read\/write capacity mode to
--     @PAY_PER_REQUEST@. We recommend using @PAY_PER_REQUEST@ for
--     unpredictable workloads.
sourceTableDetails_billingMode :: Lens.Lens' SourceTableDetails (Prelude.Maybe BillingMode)
sourceTableDetails_billingMode :: (Maybe BillingMode -> f (Maybe BillingMode))
-> SourceTableDetails -> f SourceTableDetails
sourceTableDetails_billingMode = (SourceTableDetails -> Maybe BillingMode)
-> (SourceTableDetails -> Maybe BillingMode -> SourceTableDetails)
-> Lens
     SourceTableDetails
     SourceTableDetails
     (Maybe BillingMode)
     (Maybe BillingMode)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SourceTableDetails' {Maybe BillingMode
billingMode :: Maybe BillingMode
$sel:billingMode:SourceTableDetails' :: SourceTableDetails -> Maybe BillingMode
billingMode} -> Maybe BillingMode
billingMode) (\s :: SourceTableDetails
s@SourceTableDetails' {} Maybe BillingMode
a -> SourceTableDetails
s {$sel:billingMode:SourceTableDetails' :: Maybe BillingMode
billingMode = Maybe BillingMode
a} :: SourceTableDetails)

-- | Number of items in the table. Note that this is an approximate value.
sourceTableDetails_itemCount :: Lens.Lens' SourceTableDetails (Prelude.Maybe Prelude.Natural)
sourceTableDetails_itemCount :: (Maybe Natural -> f (Maybe Natural))
-> SourceTableDetails -> f SourceTableDetails
sourceTableDetails_itemCount = (SourceTableDetails -> Maybe Natural)
-> (SourceTableDetails -> Maybe Natural -> SourceTableDetails)
-> Lens
     SourceTableDetails
     SourceTableDetails
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SourceTableDetails' {Maybe Natural
itemCount :: Maybe Natural
$sel:itemCount:SourceTableDetails' :: SourceTableDetails -> Maybe Natural
itemCount} -> Maybe Natural
itemCount) (\s :: SourceTableDetails
s@SourceTableDetails' {} Maybe Natural
a -> SourceTableDetails
s {$sel:itemCount:SourceTableDetails' :: Maybe Natural
itemCount = Maybe Natural
a} :: SourceTableDetails)

-- | The name of the table for which the backup was created.
sourceTableDetails_tableName :: Lens.Lens' SourceTableDetails Prelude.Text
sourceTableDetails_tableName :: (Text -> f Text) -> SourceTableDetails -> f SourceTableDetails
sourceTableDetails_tableName = (SourceTableDetails -> Text)
-> (SourceTableDetails -> Text -> SourceTableDetails)
-> Lens SourceTableDetails SourceTableDetails Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SourceTableDetails' {Text
tableName :: Text
$sel:tableName:SourceTableDetails' :: SourceTableDetails -> Text
tableName} -> Text
tableName) (\s :: SourceTableDetails
s@SourceTableDetails' {} Text
a -> SourceTableDetails
s {$sel:tableName:SourceTableDetails' :: Text
tableName = Text
a} :: SourceTableDetails)

-- | Unique identifier for the table for which the backup was created.
sourceTableDetails_tableId :: Lens.Lens' SourceTableDetails Prelude.Text
sourceTableDetails_tableId :: (Text -> f Text) -> SourceTableDetails -> f SourceTableDetails
sourceTableDetails_tableId = (SourceTableDetails -> Text)
-> (SourceTableDetails -> Text -> SourceTableDetails)
-> Lens SourceTableDetails SourceTableDetails Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SourceTableDetails' {Text
tableId :: Text
$sel:tableId:SourceTableDetails' :: SourceTableDetails -> Text
tableId} -> Text
tableId) (\s :: SourceTableDetails
s@SourceTableDetails' {} Text
a -> SourceTableDetails
s {$sel:tableId:SourceTableDetails' :: Text
tableId = Text
a} :: SourceTableDetails)

-- | Schema of the table.
sourceTableDetails_keySchema :: Lens.Lens' SourceTableDetails (Prelude.NonEmpty KeySchemaElement)
sourceTableDetails_keySchema :: (NonEmpty KeySchemaElement -> f (NonEmpty KeySchemaElement))
-> SourceTableDetails -> f SourceTableDetails
sourceTableDetails_keySchema = (SourceTableDetails -> NonEmpty KeySchemaElement)
-> (SourceTableDetails
    -> NonEmpty KeySchemaElement -> SourceTableDetails)
-> Lens
     SourceTableDetails
     SourceTableDetails
     (NonEmpty KeySchemaElement)
     (NonEmpty KeySchemaElement)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SourceTableDetails' {NonEmpty KeySchemaElement
keySchema :: NonEmpty KeySchemaElement
$sel:keySchema:SourceTableDetails' :: SourceTableDetails -> NonEmpty KeySchemaElement
keySchema} -> NonEmpty KeySchemaElement
keySchema) (\s :: SourceTableDetails
s@SourceTableDetails' {} NonEmpty KeySchemaElement
a -> SourceTableDetails
s {$sel:keySchema:SourceTableDetails' :: NonEmpty KeySchemaElement
keySchema = NonEmpty KeySchemaElement
a} :: SourceTableDetails) ((NonEmpty KeySchemaElement -> f (NonEmpty KeySchemaElement))
 -> SourceTableDetails -> f SourceTableDetails)
-> ((NonEmpty KeySchemaElement -> f (NonEmpty KeySchemaElement))
    -> NonEmpty KeySchemaElement -> f (NonEmpty KeySchemaElement))
-> (NonEmpty KeySchemaElement -> f (NonEmpty KeySchemaElement))
-> SourceTableDetails
-> f SourceTableDetails
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (NonEmpty KeySchemaElement -> f (NonEmpty KeySchemaElement))
-> NonEmpty KeySchemaElement -> f (NonEmpty KeySchemaElement)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Time when the source table was created.
sourceTableDetails_tableCreationDateTime :: Lens.Lens' SourceTableDetails Prelude.UTCTime
sourceTableDetails_tableCreationDateTime :: (UTCTime -> f UTCTime)
-> SourceTableDetails -> f SourceTableDetails
sourceTableDetails_tableCreationDateTime = (SourceTableDetails -> POSIX)
-> (SourceTableDetails -> POSIX -> SourceTableDetails)
-> Lens SourceTableDetails SourceTableDetails POSIX POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SourceTableDetails' {POSIX
tableCreationDateTime :: POSIX
$sel:tableCreationDateTime:SourceTableDetails' :: SourceTableDetails -> POSIX
tableCreationDateTime} -> POSIX
tableCreationDateTime) (\s :: SourceTableDetails
s@SourceTableDetails' {} POSIX
a -> SourceTableDetails
s {$sel:tableCreationDateTime:SourceTableDetails' :: POSIX
tableCreationDateTime = POSIX
a} :: SourceTableDetails) ((POSIX -> f POSIX) -> SourceTableDetails -> f SourceTableDetails)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> SourceTableDetails
-> f SourceTableDetails
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (UTCTime -> f UTCTime) -> POSIX -> f POSIX
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | Read IOPs and Write IOPS on the table when the backup was created.
sourceTableDetails_provisionedThroughput :: Lens.Lens' SourceTableDetails ProvisionedThroughput
sourceTableDetails_provisionedThroughput :: (ProvisionedThroughput -> f ProvisionedThroughput)
-> SourceTableDetails -> f SourceTableDetails
sourceTableDetails_provisionedThroughput = (SourceTableDetails -> ProvisionedThroughput)
-> (SourceTableDetails
    -> ProvisionedThroughput -> SourceTableDetails)
-> Lens
     SourceTableDetails
     SourceTableDetails
     ProvisionedThroughput
     ProvisionedThroughput
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SourceTableDetails' {ProvisionedThroughput
provisionedThroughput :: ProvisionedThroughput
$sel:provisionedThroughput:SourceTableDetails' :: SourceTableDetails -> ProvisionedThroughput
provisionedThroughput} -> ProvisionedThroughput
provisionedThroughput) (\s :: SourceTableDetails
s@SourceTableDetails' {} ProvisionedThroughput
a -> SourceTableDetails
s {$sel:provisionedThroughput:SourceTableDetails' :: ProvisionedThroughput
provisionedThroughput = ProvisionedThroughput
a} :: SourceTableDetails)

instance Core.FromJSON SourceTableDetails where
  parseJSON :: Value -> Parser SourceTableDetails
parseJSON =
    String
-> (Object -> Parser SourceTableDetails)
-> Value
-> Parser SourceTableDetails
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"SourceTableDetails"
      ( \Object
x ->
          Maybe Integer
-> Maybe Text
-> Maybe BillingMode
-> Maybe Natural
-> Text
-> Text
-> NonEmpty KeySchemaElement
-> POSIX
-> ProvisionedThroughput
-> SourceTableDetails
SourceTableDetails'
            (Maybe Integer
 -> Maybe Text
 -> Maybe BillingMode
 -> Maybe Natural
 -> Text
 -> Text
 -> NonEmpty KeySchemaElement
 -> POSIX
 -> ProvisionedThroughput
 -> SourceTableDetails)
-> Parser (Maybe Integer)
-> Parser
     (Maybe Text
      -> Maybe BillingMode
      -> Maybe Natural
      -> Text
      -> Text
      -> NonEmpty KeySchemaElement
      -> POSIX
      -> ProvisionedThroughput
      -> SourceTableDetails)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Integer)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"TableSizeBytes")
            Parser
  (Maybe Text
   -> Maybe BillingMode
   -> Maybe Natural
   -> Text
   -> Text
   -> NonEmpty KeySchemaElement
   -> POSIX
   -> ProvisionedThroughput
   -> SourceTableDetails)
-> Parser (Maybe Text)
-> Parser
     (Maybe BillingMode
      -> Maybe Natural
      -> Text
      -> Text
      -> NonEmpty KeySchemaElement
      -> POSIX
      -> ProvisionedThroughput
      -> SourceTableDetails)
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
"TableArn")
            Parser
  (Maybe BillingMode
   -> Maybe Natural
   -> Text
   -> Text
   -> NonEmpty KeySchemaElement
   -> POSIX
   -> ProvisionedThroughput
   -> SourceTableDetails)
-> Parser (Maybe BillingMode)
-> Parser
     (Maybe Natural
      -> Text
      -> Text
      -> NonEmpty KeySchemaElement
      -> POSIX
      -> ProvisionedThroughput
      -> SourceTableDetails)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe BillingMode)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"BillingMode")
            Parser
  (Maybe Natural
   -> Text
   -> Text
   -> NonEmpty KeySchemaElement
   -> POSIX
   -> ProvisionedThroughput
   -> SourceTableDetails)
-> Parser (Maybe Natural)
-> Parser
     (Text
      -> Text
      -> NonEmpty KeySchemaElement
      -> POSIX
      -> ProvisionedThroughput
      -> SourceTableDetails)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ItemCount")
            Parser
  (Text
   -> Text
   -> NonEmpty KeySchemaElement
   -> POSIX
   -> ProvisionedThroughput
   -> SourceTableDetails)
-> Parser Text
-> Parser
     (Text
      -> NonEmpty KeySchemaElement
      -> POSIX
      -> ProvisionedThroughput
      -> SourceTableDetails)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"TableName")
            Parser
  (Text
   -> NonEmpty KeySchemaElement
   -> POSIX
   -> ProvisionedThroughput
   -> SourceTableDetails)
-> Parser Text
-> Parser
     (NonEmpty KeySchemaElement
      -> POSIX -> ProvisionedThroughput -> SourceTableDetails)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"TableId")
            Parser
  (NonEmpty KeySchemaElement
   -> POSIX -> ProvisionedThroughput -> SourceTableDetails)
-> Parser (NonEmpty KeySchemaElement)
-> Parser (POSIX -> ProvisionedThroughput -> SourceTableDetails)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (NonEmpty KeySchemaElement)
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"KeySchema")
            Parser (POSIX -> ProvisionedThroughput -> SourceTableDetails)
-> Parser POSIX
-> Parser (ProvisionedThroughput -> SourceTableDetails)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser POSIX
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"TableCreationDateTime")
            Parser (ProvisionedThroughput -> SourceTableDetails)
-> Parser ProvisionedThroughput -> Parser SourceTableDetails
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser ProvisionedThroughput
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"ProvisionedThroughput")
      )

instance Prelude.Hashable SourceTableDetails

instance Prelude.NFData SourceTableDetails