{-# 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.TableDescription
-- 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.TableDescription where

import qualified Amazonka.Core as Core
import Amazonka.DynamoDB.Types.ArchivalSummary
import Amazonka.DynamoDB.Types.AttributeDefinition
import Amazonka.DynamoDB.Types.BillingModeSummary
import Amazonka.DynamoDB.Types.GlobalSecondaryIndexDescription
import Amazonka.DynamoDB.Types.KeySchemaElement
import Amazonka.DynamoDB.Types.LocalSecondaryIndexDescription
import Amazonka.DynamoDB.Types.ProvisionedThroughputDescription
import Amazonka.DynamoDB.Types.ReplicaDescription
import Amazonka.DynamoDB.Types.RestoreSummary
import Amazonka.DynamoDB.Types.SSEDescription
import Amazonka.DynamoDB.Types.StreamSpecification
import Amazonka.DynamoDB.Types.TableStatus
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Represents the properties of a table.
--
-- /See:/ 'newTableDescription' smart constructor.
data TableDescription = TableDescription'
  { -- | Contains details for the restore.
    TableDescription -> Maybe RestoreSummary
restoreSummary :: Prelude.Maybe RestoreSummary,
    -- | Represents the version of
    -- <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/GlobalTables.html global tables>
    -- in use, if the table is replicated across AWS Regions.
    TableDescription -> Maybe Text
globalTableVersion :: Prelude.Maybe Prelude.Text,
    -- | The total size of the specified table, in bytes. DynamoDB updates this
    -- value approximately every six hours. Recent changes might not be
    -- reflected in this value.
    TableDescription -> Maybe Integer
tableSizeBytes :: Prelude.Maybe Prelude.Integer,
    -- | An array of @AttributeDefinition@ objects. Each of these objects
    -- describes one attribute in the table and index key schema.
    --
    -- Each @AttributeDefinition@ object in this array is composed of:
    --
    -- -   @AttributeName@ - The name of the attribute.
    --
    -- -   @AttributeType@ - The data type for the attribute.
    TableDescription -> Maybe [AttributeDefinition]
attributeDefinitions :: Prelude.Maybe [AttributeDefinition],
    -- | The Amazon Resource Name (ARN) that uniquely identifies the latest
    -- stream for this table.
    TableDescription -> Maybe Text
latestStreamArn :: Prelude.Maybe Prelude.Text,
    -- | The provisioned throughput settings for the table, consisting of read
    -- and write capacity units, along with data about increases and decreases.
    TableDescription -> Maybe ProvisionedThroughputDescription
provisionedThroughput :: Prelude.Maybe ProvisionedThroughputDescription,
    -- | The current state of the table:
    --
    -- -   @CREATING@ - The table is being created.
    --
    -- -   @UPDATING@ - The table is being updated.
    --
    -- -   @DELETING@ - The table is being deleted.
    --
    -- -   @ACTIVE@ - The table is ready for use.
    --
    -- -   @INACCESSIBLE_ENCRYPTION_CREDENTIALS@ - The AWS KMS key used to
    --     encrypt the table in inaccessible. Table operations may fail due to
    --     failure to use the AWS KMS key. DynamoDB will initiate the table
    --     archival process when a table\'s AWS KMS key remains inaccessible
    --     for more than seven days.
    --
    -- -   @ARCHIVING@ - The table is being archived. Operations are not
    --     allowed until archival is complete.
    --
    -- -   @ARCHIVED@ - The table has been archived. See the ArchivalReason for
    --     more information.
    TableDescription -> Maybe TableStatus
tableStatus :: Prelude.Maybe TableStatus,
    -- | The Amazon Resource Name (ARN) that uniquely identifies the table.
    TableDescription -> Maybe Text
tableArn :: Prelude.Maybe Prelude.Text,
    -- | The primary key structure for the table. Each @KeySchemaElement@
    -- consists of:
    --
    -- -   @AttributeName@ - The name of the attribute.
    --
    -- -   @KeyType@ - The role of the attribute:
    --
    --     -   @HASH@ - partition key
    --
    --     -   @RANGE@ - sort key
    --
    --     The partition key of an item is also known as its /hash attribute/.
    --     The term \"hash attribute\" derives from DynamoDB\'s usage of an
    --     internal hash function to evenly distribute data items across
    --     partitions, based on their partition key values.
    --
    --     The sort key of an item is also known as its /range attribute/. The
    --     term \"range attribute\" derives from the way DynamoDB stores items
    --     with the same partition key physically close together, in sorted
    --     order by the sort key value.
    --
    -- For more information about primary keys, see
    -- <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DataModel.html#DataModelPrimaryKey Primary Key>
    -- in the /Amazon DynamoDB Developer Guide/.
    TableDescription -> Maybe (NonEmpty KeySchemaElement)
keySchema :: Prelude.Maybe (Prelude.NonEmpty KeySchemaElement),
    -- | The global secondary indexes, if any, on the table. Each index is scoped
    -- to a given partition key value. Each element is composed of:
    --
    -- -   @Backfilling@ - If true, then the index is currently in the
    --     backfilling phase. Backfilling occurs only when a new global
    --     secondary index is added to the table. It is the process by which
    --     DynamoDB populates the new index with data from the table. (This
    --     attribute does not appear for indexes that were created during a
    --     @CreateTable@ operation.)
    --
    --     You can delete an index that is being created during the
    --     @Backfilling@ phase when @IndexStatus@ is set to CREATING and
    --     @Backfilling@ is true. You can\'t delete the index that is being
    --     created when @IndexStatus@ is set to CREATING and @Backfilling@ is
    --     false. (This attribute does not appear for indexes that were created
    --     during a @CreateTable@ operation.)
    --
    -- -   @IndexName@ - The name of the global secondary index.
    --
    -- -   @IndexSizeBytes@ - The total size of the global secondary index, in
    --     bytes. DynamoDB updates this value approximately every six hours.
    --     Recent changes might not be reflected in this value.
    --
    -- -   @IndexStatus@ - The current status of the global secondary index:
    --
    --     -   @CREATING@ - The index is being created.
    --
    --     -   @UPDATING@ - The index is being updated.
    --
    --     -   @DELETING@ - The index is being deleted.
    --
    --     -   @ACTIVE@ - The index is ready for use.
    --
    -- -   @ItemCount@ - The number of items in the global secondary index.
    --     DynamoDB updates this value approximately every six hours. Recent
    --     changes might not be reflected in this value.
    --
    -- -   @KeySchema@ - Specifies the complete index key schema. The attribute
    --     names in the key schema must be between 1 and 255 characters
    --     (inclusive). The key schema must begin with the same partition key
    --     as the table.
    --
    -- -   @Projection@ - Specifies attributes that are copied (projected) from
    --     the table into the index. These are in addition to the primary key
    --     attributes and index key attributes, which are automatically
    --     projected. Each attribute specification is composed of:
    --
    --     -   @ProjectionType@ - One of the following:
    --
    --         -   @KEYS_ONLY@ - Only the index and primary keys are projected
    --             into the index.
    --
    --         -   @INCLUDE@ - In addition to the attributes described in
    --             @KEYS_ONLY@, the secondary index will include other non-key
    --             attributes that you specify.
    --
    --         -   @ALL@ - All of the table attributes are projected into the
    --             index.
    --
    --     -   @NonKeyAttributes@ - A list of one or more non-key attribute
    --         names that are projected into the secondary index. The total
    --         count of attributes provided in @NonKeyAttributes@, summed
    --         across all of the secondary indexes, must not exceed 20. If you
    --         project the same attribute into two different indexes, this
    --         counts as two distinct attributes when determining the total.
    --
    -- -   @ProvisionedThroughput@ - The provisioned throughput settings for
    --     the global secondary index, consisting of read and write capacity
    --     units, along with data about increases and decreases.
    --
    -- If the table is in the @DELETING@ state, no information about indexes
    -- will be returned.
    TableDescription -> Maybe [GlobalSecondaryIndexDescription]
globalSecondaryIndexes :: Prelude.Maybe [GlobalSecondaryIndexDescription],
    -- | A timestamp, in ISO 8601 format, for this stream.
    --
    -- Note that @LatestStreamLabel@ is not a unique identifier for the stream,
    -- because it is possible that a stream from another table might have the
    -- same timestamp. However, the combination of the following three elements
    -- is guaranteed to be unique:
    --
    -- -   AWS customer ID
    --
    -- -   Table name
    --
    -- -   @StreamLabel@
    TableDescription -> Maybe Text
latestStreamLabel :: Prelude.Maybe Prelude.Text,
    -- | Contains the details for the read\/write capacity mode.
    TableDescription -> Maybe BillingModeSummary
billingModeSummary :: Prelude.Maybe BillingModeSummary,
    -- | Represents one or more local secondary indexes on the table. Each index
    -- is scoped to a given partition key value. Tables with one or more local
    -- secondary indexes are subject to an item collection size limit, where
    -- the amount of data within a given item collection cannot exceed 10 GB.
    -- Each element is composed of:
    --
    -- -   @IndexName@ - The name of the local secondary index.
    --
    -- -   @KeySchema@ - Specifies the complete index key schema. The attribute
    --     names in the key schema must be between 1 and 255 characters
    --     (inclusive). The key schema must begin with the same partition key
    --     as the table.
    --
    -- -   @Projection@ - Specifies attributes that are copied (projected) from
    --     the table into the index. These are in addition to the primary key
    --     attributes and index key attributes, which are automatically
    --     projected. Each attribute specification is composed of:
    --
    --     -   @ProjectionType@ - One of the following:
    --
    --         -   @KEYS_ONLY@ - Only the index and primary keys are projected
    --             into the index.
    --
    --         -   @INCLUDE@ - Only the specified table attributes are
    --             projected into the index. The list of projected attributes
    --             is in @NonKeyAttributes@.
    --
    --         -   @ALL@ - All of the table attributes are projected into the
    --             index.
    --
    --     -   @NonKeyAttributes@ - A list of one or more non-key attribute
    --         names that are projected into the secondary index. The total
    --         count of attributes provided in @NonKeyAttributes@, summed
    --         across all of the secondary indexes, must not exceed 20. If you
    --         project the same attribute into two different indexes, this
    --         counts as two distinct attributes when determining the total.
    --
    -- -   @IndexSizeBytes@ - Represents the total size of the index, in bytes.
    --     DynamoDB updates this value approximately every six hours. Recent
    --     changes might not be reflected in this value.
    --
    -- -   @ItemCount@ - Represents the number of items in the index. DynamoDB
    --     updates this value approximately every six hours. Recent changes
    --     might not be reflected in this value.
    --
    -- If the table is in the @DELETING@ state, no information about indexes
    -- will be returned.
    TableDescription -> Maybe [LocalSecondaryIndexDescription]
localSecondaryIndexes :: Prelude.Maybe [LocalSecondaryIndexDescription],
    -- | The date and time when the table was created, in
    -- <http://www.epochconverter.com/ UNIX epoch time> format.
    TableDescription -> Maybe POSIX
creationDateTime :: Prelude.Maybe Core.POSIX,
    -- | The description of the server-side encryption status on the specified
    -- table.
    TableDescription -> Maybe SSEDescription
sSEDescription :: Prelude.Maybe SSEDescription,
    -- | Unique identifier for the table for which the backup was created.
    TableDescription -> Maybe Text
tableId :: Prelude.Maybe Prelude.Text,
    -- | Represents replicas of the table.
    TableDescription -> Maybe [ReplicaDescription]
replicas :: Prelude.Maybe [ReplicaDescription],
    -- | The number of items in the specified table. DynamoDB updates this value
    -- approximately every six hours. Recent changes might not be reflected in
    -- this value.
    TableDescription -> Maybe Integer
itemCount :: Prelude.Maybe Prelude.Integer,
    -- | Contains information about the table archive.
    TableDescription -> Maybe ArchivalSummary
archivalSummary :: Prelude.Maybe ArchivalSummary,
    -- | The name of the table.
    TableDescription -> Maybe Text
tableName :: Prelude.Maybe Prelude.Text,
    -- | The current DynamoDB Streams configuration for the table.
    TableDescription -> Maybe StreamSpecification
streamSpecification :: Prelude.Maybe StreamSpecification
  }
  deriving (TableDescription -> TableDescription -> Bool
(TableDescription -> TableDescription -> Bool)
-> (TableDescription -> TableDescription -> Bool)
-> Eq TableDescription
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TableDescription -> TableDescription -> Bool
$c/= :: TableDescription -> TableDescription -> Bool
== :: TableDescription -> TableDescription -> Bool
$c== :: TableDescription -> TableDescription -> Bool
Prelude.Eq, ReadPrec [TableDescription]
ReadPrec TableDescription
Int -> ReadS TableDescription
ReadS [TableDescription]
(Int -> ReadS TableDescription)
-> ReadS [TableDescription]
-> ReadPrec TableDescription
-> ReadPrec [TableDescription]
-> Read TableDescription
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [TableDescription]
$creadListPrec :: ReadPrec [TableDescription]
readPrec :: ReadPrec TableDescription
$creadPrec :: ReadPrec TableDescription
readList :: ReadS [TableDescription]
$creadList :: ReadS [TableDescription]
readsPrec :: Int -> ReadS TableDescription
$creadsPrec :: Int -> ReadS TableDescription
Prelude.Read, Int -> TableDescription -> ShowS
[TableDescription] -> ShowS
TableDescription -> String
(Int -> TableDescription -> ShowS)
-> (TableDescription -> String)
-> ([TableDescription] -> ShowS)
-> Show TableDescription
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [TableDescription] -> ShowS
$cshowList :: [TableDescription] -> ShowS
show :: TableDescription -> String
$cshow :: TableDescription -> String
showsPrec :: Int -> TableDescription -> ShowS
$cshowsPrec :: Int -> TableDescription -> ShowS
Prelude.Show, (forall x. TableDescription -> Rep TableDescription x)
-> (forall x. Rep TableDescription x -> TableDescription)
-> Generic TableDescription
forall x. Rep TableDescription x -> TableDescription
forall x. TableDescription -> Rep TableDescription x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep TableDescription x -> TableDescription
$cfrom :: forall x. TableDescription -> Rep TableDescription x
Prelude.Generic)

-- |
-- Create a value of 'TableDescription' 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:
--
-- 'restoreSummary', 'tableDescription_restoreSummary' - Contains details for the restore.
--
-- 'globalTableVersion', 'tableDescription_globalTableVersion' - Represents the version of
-- <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/GlobalTables.html global tables>
-- in use, if the table is replicated across AWS Regions.
--
-- 'tableSizeBytes', 'tableDescription_tableSizeBytes' - The total size of the specified table, in bytes. DynamoDB updates this
-- value approximately every six hours. Recent changes might not be
-- reflected in this value.
--
-- 'attributeDefinitions', 'tableDescription_attributeDefinitions' - An array of @AttributeDefinition@ objects. Each of these objects
-- describes one attribute in the table and index key schema.
--
-- Each @AttributeDefinition@ object in this array is composed of:
--
-- -   @AttributeName@ - The name of the attribute.
--
-- -   @AttributeType@ - The data type for the attribute.
--
-- 'latestStreamArn', 'tableDescription_latestStreamArn' - The Amazon Resource Name (ARN) that uniquely identifies the latest
-- stream for this table.
--
-- 'provisionedThroughput', 'tableDescription_provisionedThroughput' - The provisioned throughput settings for the table, consisting of read
-- and write capacity units, along with data about increases and decreases.
--
-- 'tableStatus', 'tableDescription_tableStatus' - The current state of the table:
--
-- -   @CREATING@ - The table is being created.
--
-- -   @UPDATING@ - The table is being updated.
--
-- -   @DELETING@ - The table is being deleted.
--
-- -   @ACTIVE@ - The table is ready for use.
--
-- -   @INACCESSIBLE_ENCRYPTION_CREDENTIALS@ - The AWS KMS key used to
--     encrypt the table in inaccessible. Table operations may fail due to
--     failure to use the AWS KMS key. DynamoDB will initiate the table
--     archival process when a table\'s AWS KMS key remains inaccessible
--     for more than seven days.
--
-- -   @ARCHIVING@ - The table is being archived. Operations are not
--     allowed until archival is complete.
--
-- -   @ARCHIVED@ - The table has been archived. See the ArchivalReason for
--     more information.
--
-- 'tableArn', 'tableDescription_tableArn' - The Amazon Resource Name (ARN) that uniquely identifies the table.
--
-- 'keySchema', 'tableDescription_keySchema' - The primary key structure for the table. Each @KeySchemaElement@
-- consists of:
--
-- -   @AttributeName@ - The name of the attribute.
--
-- -   @KeyType@ - The role of the attribute:
--
--     -   @HASH@ - partition key
--
--     -   @RANGE@ - sort key
--
--     The partition key of an item is also known as its /hash attribute/.
--     The term \"hash attribute\" derives from DynamoDB\'s usage of an
--     internal hash function to evenly distribute data items across
--     partitions, based on their partition key values.
--
--     The sort key of an item is also known as its /range attribute/. The
--     term \"range attribute\" derives from the way DynamoDB stores items
--     with the same partition key physically close together, in sorted
--     order by the sort key value.
--
-- For more information about primary keys, see
-- <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DataModel.html#DataModelPrimaryKey Primary Key>
-- in the /Amazon DynamoDB Developer Guide/.
--
-- 'globalSecondaryIndexes', 'tableDescription_globalSecondaryIndexes' - The global secondary indexes, if any, on the table. Each index is scoped
-- to a given partition key value. Each element is composed of:
--
-- -   @Backfilling@ - If true, then the index is currently in the
--     backfilling phase. Backfilling occurs only when a new global
--     secondary index is added to the table. It is the process by which
--     DynamoDB populates the new index with data from the table. (This
--     attribute does not appear for indexes that were created during a
--     @CreateTable@ operation.)
--
--     You can delete an index that is being created during the
--     @Backfilling@ phase when @IndexStatus@ is set to CREATING and
--     @Backfilling@ is true. You can\'t delete the index that is being
--     created when @IndexStatus@ is set to CREATING and @Backfilling@ is
--     false. (This attribute does not appear for indexes that were created
--     during a @CreateTable@ operation.)
--
-- -   @IndexName@ - The name of the global secondary index.
--
-- -   @IndexSizeBytes@ - The total size of the global secondary index, in
--     bytes. DynamoDB updates this value approximately every six hours.
--     Recent changes might not be reflected in this value.
--
-- -   @IndexStatus@ - The current status of the global secondary index:
--
--     -   @CREATING@ - The index is being created.
--
--     -   @UPDATING@ - The index is being updated.
--
--     -   @DELETING@ - The index is being deleted.
--
--     -   @ACTIVE@ - The index is ready for use.
--
-- -   @ItemCount@ - The number of items in the global secondary index.
--     DynamoDB updates this value approximately every six hours. Recent
--     changes might not be reflected in this value.
--
-- -   @KeySchema@ - Specifies the complete index key schema. The attribute
--     names in the key schema must be between 1 and 255 characters
--     (inclusive). The key schema must begin with the same partition key
--     as the table.
--
-- -   @Projection@ - Specifies attributes that are copied (projected) from
--     the table into the index. These are in addition to the primary key
--     attributes and index key attributes, which are automatically
--     projected. Each attribute specification is composed of:
--
--     -   @ProjectionType@ - One of the following:
--
--         -   @KEYS_ONLY@ - Only the index and primary keys are projected
--             into the index.
--
--         -   @INCLUDE@ - In addition to the attributes described in
--             @KEYS_ONLY@, the secondary index will include other non-key
--             attributes that you specify.
--
--         -   @ALL@ - All of the table attributes are projected into the
--             index.
--
--     -   @NonKeyAttributes@ - A list of one or more non-key attribute
--         names that are projected into the secondary index. The total
--         count of attributes provided in @NonKeyAttributes@, summed
--         across all of the secondary indexes, must not exceed 20. If you
--         project the same attribute into two different indexes, this
--         counts as two distinct attributes when determining the total.
--
-- -   @ProvisionedThroughput@ - The provisioned throughput settings for
--     the global secondary index, consisting of read and write capacity
--     units, along with data about increases and decreases.
--
-- If the table is in the @DELETING@ state, no information about indexes
-- will be returned.
--
-- 'latestStreamLabel', 'tableDescription_latestStreamLabel' - A timestamp, in ISO 8601 format, for this stream.
--
-- Note that @LatestStreamLabel@ is not a unique identifier for the stream,
-- because it is possible that a stream from another table might have the
-- same timestamp. However, the combination of the following three elements
-- is guaranteed to be unique:
--
-- -   AWS customer ID
--
-- -   Table name
--
-- -   @StreamLabel@
--
-- 'billingModeSummary', 'tableDescription_billingModeSummary' - Contains the details for the read\/write capacity mode.
--
-- 'localSecondaryIndexes', 'tableDescription_localSecondaryIndexes' - Represents one or more local secondary indexes on the table. Each index
-- is scoped to a given partition key value. Tables with one or more local
-- secondary indexes are subject to an item collection size limit, where
-- the amount of data within a given item collection cannot exceed 10 GB.
-- Each element is composed of:
--
-- -   @IndexName@ - The name of the local secondary index.
--
-- -   @KeySchema@ - Specifies the complete index key schema. The attribute
--     names in the key schema must be between 1 and 255 characters
--     (inclusive). The key schema must begin with the same partition key
--     as the table.
--
-- -   @Projection@ - Specifies attributes that are copied (projected) from
--     the table into the index. These are in addition to the primary key
--     attributes and index key attributes, which are automatically
--     projected. Each attribute specification is composed of:
--
--     -   @ProjectionType@ - One of the following:
--
--         -   @KEYS_ONLY@ - Only the index and primary keys are projected
--             into the index.
--
--         -   @INCLUDE@ - Only the specified table attributes are
--             projected into the index. The list of projected attributes
--             is in @NonKeyAttributes@.
--
--         -   @ALL@ - All of the table attributes are projected into the
--             index.
--
--     -   @NonKeyAttributes@ - A list of one or more non-key attribute
--         names that are projected into the secondary index. The total
--         count of attributes provided in @NonKeyAttributes@, summed
--         across all of the secondary indexes, must not exceed 20. If you
--         project the same attribute into two different indexes, this
--         counts as two distinct attributes when determining the total.
--
-- -   @IndexSizeBytes@ - Represents the total size of the index, in bytes.
--     DynamoDB updates this value approximately every six hours. Recent
--     changes might not be reflected in this value.
--
-- -   @ItemCount@ - Represents the number of items in the index. DynamoDB
--     updates this value approximately every six hours. Recent changes
--     might not be reflected in this value.
--
-- If the table is in the @DELETING@ state, no information about indexes
-- will be returned.
--
-- 'creationDateTime', 'tableDescription_creationDateTime' - The date and time when the table was created, in
-- <http://www.epochconverter.com/ UNIX epoch time> format.
--
-- 'sSEDescription', 'tableDescription_sSEDescription' - The description of the server-side encryption status on the specified
-- table.
--
-- 'tableId', 'tableDescription_tableId' - Unique identifier for the table for which the backup was created.
--
-- 'replicas', 'tableDescription_replicas' - Represents replicas of the table.
--
-- 'itemCount', 'tableDescription_itemCount' - The number of items in the specified table. DynamoDB updates this value
-- approximately every six hours. Recent changes might not be reflected in
-- this value.
--
-- 'archivalSummary', 'tableDescription_archivalSummary' - Contains information about the table archive.
--
-- 'tableName', 'tableDescription_tableName' - The name of the table.
--
-- 'streamSpecification', 'tableDescription_streamSpecification' - The current DynamoDB Streams configuration for the table.
newTableDescription ::
  TableDescription
newTableDescription :: TableDescription
newTableDescription =
  TableDescription' :: Maybe RestoreSummary
-> Maybe Text
-> Maybe Integer
-> Maybe [AttributeDefinition]
-> Maybe Text
-> Maybe ProvisionedThroughputDescription
-> Maybe TableStatus
-> Maybe Text
-> Maybe (NonEmpty KeySchemaElement)
-> Maybe [GlobalSecondaryIndexDescription]
-> Maybe Text
-> Maybe BillingModeSummary
-> Maybe [LocalSecondaryIndexDescription]
-> Maybe POSIX
-> Maybe SSEDescription
-> Maybe Text
-> Maybe [ReplicaDescription]
-> Maybe Integer
-> Maybe ArchivalSummary
-> Maybe Text
-> Maybe StreamSpecification
-> TableDescription
TableDescription'
    { $sel:restoreSummary:TableDescription' :: Maybe RestoreSummary
restoreSummary = Maybe RestoreSummary
forall a. Maybe a
Prelude.Nothing,
      $sel:globalTableVersion:TableDescription' :: Maybe Text
globalTableVersion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:tableSizeBytes:TableDescription' :: Maybe Integer
tableSizeBytes = Maybe Integer
forall a. Maybe a
Prelude.Nothing,
      $sel:attributeDefinitions:TableDescription' :: Maybe [AttributeDefinition]
attributeDefinitions = Maybe [AttributeDefinition]
forall a. Maybe a
Prelude.Nothing,
      $sel:latestStreamArn:TableDescription' :: Maybe Text
latestStreamArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:provisionedThroughput:TableDescription' :: Maybe ProvisionedThroughputDescription
provisionedThroughput = Maybe ProvisionedThroughputDescription
forall a. Maybe a
Prelude.Nothing,
      $sel:tableStatus:TableDescription' :: Maybe TableStatus
tableStatus = Maybe TableStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:tableArn:TableDescription' :: Maybe Text
tableArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:keySchema:TableDescription' :: Maybe (NonEmpty KeySchemaElement)
keySchema = Maybe (NonEmpty KeySchemaElement)
forall a. Maybe a
Prelude.Nothing,
      $sel:globalSecondaryIndexes:TableDescription' :: Maybe [GlobalSecondaryIndexDescription]
globalSecondaryIndexes = Maybe [GlobalSecondaryIndexDescription]
forall a. Maybe a
Prelude.Nothing,
      $sel:latestStreamLabel:TableDescription' :: Maybe Text
latestStreamLabel = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:billingModeSummary:TableDescription' :: Maybe BillingModeSummary
billingModeSummary = Maybe BillingModeSummary
forall a. Maybe a
Prelude.Nothing,
      $sel:localSecondaryIndexes:TableDescription' :: Maybe [LocalSecondaryIndexDescription]
localSecondaryIndexes = Maybe [LocalSecondaryIndexDescription]
forall a. Maybe a
Prelude.Nothing,
      $sel:creationDateTime:TableDescription' :: Maybe POSIX
creationDateTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:sSEDescription:TableDescription' :: Maybe SSEDescription
sSEDescription = Maybe SSEDescription
forall a. Maybe a
Prelude.Nothing,
      $sel:tableId:TableDescription' :: Maybe Text
tableId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:replicas:TableDescription' :: Maybe [ReplicaDescription]
replicas = Maybe [ReplicaDescription]
forall a. Maybe a
Prelude.Nothing,
      $sel:itemCount:TableDescription' :: Maybe Integer
itemCount = Maybe Integer
forall a. Maybe a
Prelude.Nothing,
      $sel:archivalSummary:TableDescription' :: Maybe ArchivalSummary
archivalSummary = Maybe ArchivalSummary
forall a. Maybe a
Prelude.Nothing,
      $sel:tableName:TableDescription' :: Maybe Text
tableName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:streamSpecification:TableDescription' :: Maybe StreamSpecification
streamSpecification = Maybe StreamSpecification
forall a. Maybe a
Prelude.Nothing
    }

-- | Contains details for the restore.
tableDescription_restoreSummary :: Lens.Lens' TableDescription (Prelude.Maybe RestoreSummary)
tableDescription_restoreSummary :: (Maybe RestoreSummary -> f (Maybe RestoreSummary))
-> TableDescription -> f TableDescription
tableDescription_restoreSummary = (TableDescription -> Maybe RestoreSummary)
-> (TableDescription -> Maybe RestoreSummary -> TableDescription)
-> Lens
     TableDescription
     TableDescription
     (Maybe RestoreSummary)
     (Maybe RestoreSummary)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TableDescription' {Maybe RestoreSummary
restoreSummary :: Maybe RestoreSummary
$sel:restoreSummary:TableDescription' :: TableDescription -> Maybe RestoreSummary
restoreSummary} -> Maybe RestoreSummary
restoreSummary) (\s :: TableDescription
s@TableDescription' {} Maybe RestoreSummary
a -> TableDescription
s {$sel:restoreSummary:TableDescription' :: Maybe RestoreSummary
restoreSummary = Maybe RestoreSummary
a} :: TableDescription)

-- | Represents the version of
-- <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/GlobalTables.html global tables>
-- in use, if the table is replicated across AWS Regions.
tableDescription_globalTableVersion :: Lens.Lens' TableDescription (Prelude.Maybe Prelude.Text)
tableDescription_globalTableVersion :: (Maybe Text -> f (Maybe Text))
-> TableDescription -> f TableDescription
tableDescription_globalTableVersion = (TableDescription -> Maybe Text)
-> (TableDescription -> Maybe Text -> TableDescription)
-> Lens TableDescription TableDescription (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TableDescription' {Maybe Text
globalTableVersion :: Maybe Text
$sel:globalTableVersion:TableDescription' :: TableDescription -> Maybe Text
globalTableVersion} -> Maybe Text
globalTableVersion) (\s :: TableDescription
s@TableDescription' {} Maybe Text
a -> TableDescription
s {$sel:globalTableVersion:TableDescription' :: Maybe Text
globalTableVersion = Maybe Text
a} :: TableDescription)

-- | The total size of the specified table, in bytes. DynamoDB updates this
-- value approximately every six hours. Recent changes might not be
-- reflected in this value.
tableDescription_tableSizeBytes :: Lens.Lens' TableDescription (Prelude.Maybe Prelude.Integer)
tableDescription_tableSizeBytes :: (Maybe Integer -> f (Maybe Integer))
-> TableDescription -> f TableDescription
tableDescription_tableSizeBytes = (TableDescription -> Maybe Integer)
-> (TableDescription -> Maybe Integer -> TableDescription)
-> Lens
     TableDescription TableDescription (Maybe Integer) (Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TableDescription' {Maybe Integer
tableSizeBytes :: Maybe Integer
$sel:tableSizeBytes:TableDescription' :: TableDescription -> Maybe Integer
tableSizeBytes} -> Maybe Integer
tableSizeBytes) (\s :: TableDescription
s@TableDescription' {} Maybe Integer
a -> TableDescription
s {$sel:tableSizeBytes:TableDescription' :: Maybe Integer
tableSizeBytes = Maybe Integer
a} :: TableDescription)

-- | An array of @AttributeDefinition@ objects. Each of these objects
-- describes one attribute in the table and index key schema.
--
-- Each @AttributeDefinition@ object in this array is composed of:
--
-- -   @AttributeName@ - The name of the attribute.
--
-- -   @AttributeType@ - The data type for the attribute.
tableDescription_attributeDefinitions :: Lens.Lens' TableDescription (Prelude.Maybe [AttributeDefinition])
tableDescription_attributeDefinitions :: (Maybe [AttributeDefinition] -> f (Maybe [AttributeDefinition]))
-> TableDescription -> f TableDescription
tableDescription_attributeDefinitions = (TableDescription -> Maybe [AttributeDefinition])
-> (TableDescription
    -> Maybe [AttributeDefinition] -> TableDescription)
-> Lens
     TableDescription
     TableDescription
     (Maybe [AttributeDefinition])
     (Maybe [AttributeDefinition])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TableDescription' {Maybe [AttributeDefinition]
attributeDefinitions :: Maybe [AttributeDefinition]
$sel:attributeDefinitions:TableDescription' :: TableDescription -> Maybe [AttributeDefinition]
attributeDefinitions} -> Maybe [AttributeDefinition]
attributeDefinitions) (\s :: TableDescription
s@TableDescription' {} Maybe [AttributeDefinition]
a -> TableDescription
s {$sel:attributeDefinitions:TableDescription' :: Maybe [AttributeDefinition]
attributeDefinitions = Maybe [AttributeDefinition]
a} :: TableDescription) ((Maybe [AttributeDefinition] -> f (Maybe [AttributeDefinition]))
 -> TableDescription -> f TableDescription)
-> ((Maybe [AttributeDefinition]
     -> f (Maybe [AttributeDefinition]))
    -> Maybe [AttributeDefinition] -> f (Maybe [AttributeDefinition]))
-> (Maybe [AttributeDefinition] -> f (Maybe [AttributeDefinition]))
-> TableDescription
-> f TableDescription
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [AttributeDefinition]
  [AttributeDefinition]
  [AttributeDefinition]
  [AttributeDefinition]
-> Iso
     (Maybe [AttributeDefinition])
     (Maybe [AttributeDefinition])
     (Maybe [AttributeDefinition])
     (Maybe [AttributeDefinition])
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
  [AttributeDefinition]
  [AttributeDefinition]
  [AttributeDefinition]
  [AttributeDefinition]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The Amazon Resource Name (ARN) that uniquely identifies the latest
-- stream for this table.
tableDescription_latestStreamArn :: Lens.Lens' TableDescription (Prelude.Maybe Prelude.Text)
tableDescription_latestStreamArn :: (Maybe Text -> f (Maybe Text))
-> TableDescription -> f TableDescription
tableDescription_latestStreamArn = (TableDescription -> Maybe Text)
-> (TableDescription -> Maybe Text -> TableDescription)
-> Lens TableDescription TableDescription (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TableDescription' {Maybe Text
latestStreamArn :: Maybe Text
$sel:latestStreamArn:TableDescription' :: TableDescription -> Maybe Text
latestStreamArn} -> Maybe Text
latestStreamArn) (\s :: TableDescription
s@TableDescription' {} Maybe Text
a -> TableDescription
s {$sel:latestStreamArn:TableDescription' :: Maybe Text
latestStreamArn = Maybe Text
a} :: TableDescription)

-- | The provisioned throughput settings for the table, consisting of read
-- and write capacity units, along with data about increases and decreases.
tableDescription_provisionedThroughput :: Lens.Lens' TableDescription (Prelude.Maybe ProvisionedThroughputDescription)
tableDescription_provisionedThroughput :: (Maybe ProvisionedThroughputDescription
 -> f (Maybe ProvisionedThroughputDescription))
-> TableDescription -> f TableDescription
tableDescription_provisionedThroughput = (TableDescription -> Maybe ProvisionedThroughputDescription)
-> (TableDescription
    -> Maybe ProvisionedThroughputDescription -> TableDescription)
-> Lens
     TableDescription
     TableDescription
     (Maybe ProvisionedThroughputDescription)
     (Maybe ProvisionedThroughputDescription)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TableDescription' {Maybe ProvisionedThroughputDescription
provisionedThroughput :: Maybe ProvisionedThroughputDescription
$sel:provisionedThroughput:TableDescription' :: TableDescription -> Maybe ProvisionedThroughputDescription
provisionedThroughput} -> Maybe ProvisionedThroughputDescription
provisionedThroughput) (\s :: TableDescription
s@TableDescription' {} Maybe ProvisionedThroughputDescription
a -> TableDescription
s {$sel:provisionedThroughput:TableDescription' :: Maybe ProvisionedThroughputDescription
provisionedThroughput = Maybe ProvisionedThroughputDescription
a} :: TableDescription)

-- | The current state of the table:
--
-- -   @CREATING@ - The table is being created.
--
-- -   @UPDATING@ - The table is being updated.
--
-- -   @DELETING@ - The table is being deleted.
--
-- -   @ACTIVE@ - The table is ready for use.
--
-- -   @INACCESSIBLE_ENCRYPTION_CREDENTIALS@ - The AWS KMS key used to
--     encrypt the table in inaccessible. Table operations may fail due to
--     failure to use the AWS KMS key. DynamoDB will initiate the table
--     archival process when a table\'s AWS KMS key remains inaccessible
--     for more than seven days.
--
-- -   @ARCHIVING@ - The table is being archived. Operations are not
--     allowed until archival is complete.
--
-- -   @ARCHIVED@ - The table has been archived. See the ArchivalReason for
--     more information.
tableDescription_tableStatus :: Lens.Lens' TableDescription (Prelude.Maybe TableStatus)
tableDescription_tableStatus :: (Maybe TableStatus -> f (Maybe TableStatus))
-> TableDescription -> f TableDescription
tableDescription_tableStatus = (TableDescription -> Maybe TableStatus)
-> (TableDescription -> Maybe TableStatus -> TableDescription)
-> Lens
     TableDescription
     TableDescription
     (Maybe TableStatus)
     (Maybe TableStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TableDescription' {Maybe TableStatus
tableStatus :: Maybe TableStatus
$sel:tableStatus:TableDescription' :: TableDescription -> Maybe TableStatus
tableStatus} -> Maybe TableStatus
tableStatus) (\s :: TableDescription
s@TableDescription' {} Maybe TableStatus
a -> TableDescription
s {$sel:tableStatus:TableDescription' :: Maybe TableStatus
tableStatus = Maybe TableStatus
a} :: TableDescription)

-- | The Amazon Resource Name (ARN) that uniquely identifies the table.
tableDescription_tableArn :: Lens.Lens' TableDescription (Prelude.Maybe Prelude.Text)
tableDescription_tableArn :: (Maybe Text -> f (Maybe Text))
-> TableDescription -> f TableDescription
tableDescription_tableArn = (TableDescription -> Maybe Text)
-> (TableDescription -> Maybe Text -> TableDescription)
-> Lens TableDescription TableDescription (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TableDescription' {Maybe Text
tableArn :: Maybe Text
$sel:tableArn:TableDescription' :: TableDescription -> Maybe Text
tableArn} -> Maybe Text
tableArn) (\s :: TableDescription
s@TableDescription' {} Maybe Text
a -> TableDescription
s {$sel:tableArn:TableDescription' :: Maybe Text
tableArn = Maybe Text
a} :: TableDescription)

-- | The primary key structure for the table. Each @KeySchemaElement@
-- consists of:
--
-- -   @AttributeName@ - The name of the attribute.
--
-- -   @KeyType@ - The role of the attribute:
--
--     -   @HASH@ - partition key
--
--     -   @RANGE@ - sort key
--
--     The partition key of an item is also known as its /hash attribute/.
--     The term \"hash attribute\" derives from DynamoDB\'s usage of an
--     internal hash function to evenly distribute data items across
--     partitions, based on their partition key values.
--
--     The sort key of an item is also known as its /range attribute/. The
--     term \"range attribute\" derives from the way DynamoDB stores items
--     with the same partition key physically close together, in sorted
--     order by the sort key value.
--
-- For more information about primary keys, see
-- <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DataModel.html#DataModelPrimaryKey Primary Key>
-- in the /Amazon DynamoDB Developer Guide/.
tableDescription_keySchema :: Lens.Lens' TableDescription (Prelude.Maybe (Prelude.NonEmpty KeySchemaElement))
tableDescription_keySchema :: (Maybe (NonEmpty KeySchemaElement)
 -> f (Maybe (NonEmpty KeySchemaElement)))
-> TableDescription -> f TableDescription
tableDescription_keySchema = (TableDescription -> Maybe (NonEmpty KeySchemaElement))
-> (TableDescription
    -> Maybe (NonEmpty KeySchemaElement) -> TableDescription)
-> Lens
     TableDescription
     TableDescription
     (Maybe (NonEmpty KeySchemaElement))
     (Maybe (NonEmpty KeySchemaElement))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TableDescription' {Maybe (NonEmpty KeySchemaElement)
keySchema :: Maybe (NonEmpty KeySchemaElement)
$sel:keySchema:TableDescription' :: TableDescription -> Maybe (NonEmpty KeySchemaElement)
keySchema} -> Maybe (NonEmpty KeySchemaElement)
keySchema) (\s :: TableDescription
s@TableDescription' {} Maybe (NonEmpty KeySchemaElement)
a -> TableDescription
s {$sel:keySchema:TableDescription' :: Maybe (NonEmpty KeySchemaElement)
keySchema = Maybe (NonEmpty KeySchemaElement)
a} :: TableDescription) ((Maybe (NonEmpty KeySchemaElement)
  -> f (Maybe (NonEmpty KeySchemaElement)))
 -> TableDescription -> f TableDescription)
-> ((Maybe (NonEmpty KeySchemaElement)
     -> f (Maybe (NonEmpty KeySchemaElement)))
    -> Maybe (NonEmpty KeySchemaElement)
    -> f (Maybe (NonEmpty KeySchemaElement)))
-> (Maybe (NonEmpty KeySchemaElement)
    -> f (Maybe (NonEmpty KeySchemaElement)))
-> TableDescription
-> f TableDescription
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

-- | The global secondary indexes, if any, on the table. Each index is scoped
-- to a given partition key value. Each element is composed of:
--
-- -   @Backfilling@ - If true, then the index is currently in the
--     backfilling phase. Backfilling occurs only when a new global
--     secondary index is added to the table. It is the process by which
--     DynamoDB populates the new index with data from the table. (This
--     attribute does not appear for indexes that were created during a
--     @CreateTable@ operation.)
--
--     You can delete an index that is being created during the
--     @Backfilling@ phase when @IndexStatus@ is set to CREATING and
--     @Backfilling@ is true. You can\'t delete the index that is being
--     created when @IndexStatus@ is set to CREATING and @Backfilling@ is
--     false. (This attribute does not appear for indexes that were created
--     during a @CreateTable@ operation.)
--
-- -   @IndexName@ - The name of the global secondary index.
--
-- -   @IndexSizeBytes@ - The total size of the global secondary index, in
--     bytes. DynamoDB updates this value approximately every six hours.
--     Recent changes might not be reflected in this value.
--
-- -   @IndexStatus@ - The current status of the global secondary index:
--
--     -   @CREATING@ - The index is being created.
--
--     -   @UPDATING@ - The index is being updated.
--
--     -   @DELETING@ - The index is being deleted.
--
--     -   @ACTIVE@ - The index is ready for use.
--
-- -   @ItemCount@ - The number of items in the global secondary index.
--     DynamoDB updates this value approximately every six hours. Recent
--     changes might not be reflected in this value.
--
-- -   @KeySchema@ - Specifies the complete index key schema. The attribute
--     names in the key schema must be between 1 and 255 characters
--     (inclusive). The key schema must begin with the same partition key
--     as the table.
--
-- -   @Projection@ - Specifies attributes that are copied (projected) from
--     the table into the index. These are in addition to the primary key
--     attributes and index key attributes, which are automatically
--     projected. Each attribute specification is composed of:
--
--     -   @ProjectionType@ - One of the following:
--
--         -   @KEYS_ONLY@ - Only the index and primary keys are projected
--             into the index.
--
--         -   @INCLUDE@ - In addition to the attributes described in
--             @KEYS_ONLY@, the secondary index will include other non-key
--             attributes that you specify.
--
--         -   @ALL@ - All of the table attributes are projected into the
--             index.
--
--     -   @NonKeyAttributes@ - A list of one or more non-key attribute
--         names that are projected into the secondary index. The total
--         count of attributes provided in @NonKeyAttributes@, summed
--         across all of the secondary indexes, must not exceed 20. If you
--         project the same attribute into two different indexes, this
--         counts as two distinct attributes when determining the total.
--
-- -   @ProvisionedThroughput@ - The provisioned throughput settings for
--     the global secondary index, consisting of read and write capacity
--     units, along with data about increases and decreases.
--
-- If the table is in the @DELETING@ state, no information about indexes
-- will be returned.
tableDescription_globalSecondaryIndexes :: Lens.Lens' TableDescription (Prelude.Maybe [GlobalSecondaryIndexDescription])
tableDescription_globalSecondaryIndexes :: (Maybe [GlobalSecondaryIndexDescription]
 -> f (Maybe [GlobalSecondaryIndexDescription]))
-> TableDescription -> f TableDescription
tableDescription_globalSecondaryIndexes = (TableDescription -> Maybe [GlobalSecondaryIndexDescription])
-> (TableDescription
    -> Maybe [GlobalSecondaryIndexDescription] -> TableDescription)
-> Lens
     TableDescription
     TableDescription
     (Maybe [GlobalSecondaryIndexDescription])
     (Maybe [GlobalSecondaryIndexDescription])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TableDescription' {Maybe [GlobalSecondaryIndexDescription]
globalSecondaryIndexes :: Maybe [GlobalSecondaryIndexDescription]
$sel:globalSecondaryIndexes:TableDescription' :: TableDescription -> Maybe [GlobalSecondaryIndexDescription]
globalSecondaryIndexes} -> Maybe [GlobalSecondaryIndexDescription]
globalSecondaryIndexes) (\s :: TableDescription
s@TableDescription' {} Maybe [GlobalSecondaryIndexDescription]
a -> TableDescription
s {$sel:globalSecondaryIndexes:TableDescription' :: Maybe [GlobalSecondaryIndexDescription]
globalSecondaryIndexes = Maybe [GlobalSecondaryIndexDescription]
a} :: TableDescription) ((Maybe [GlobalSecondaryIndexDescription]
  -> f (Maybe [GlobalSecondaryIndexDescription]))
 -> TableDescription -> f TableDescription)
-> ((Maybe [GlobalSecondaryIndexDescription]
     -> f (Maybe [GlobalSecondaryIndexDescription]))
    -> Maybe [GlobalSecondaryIndexDescription]
    -> f (Maybe [GlobalSecondaryIndexDescription]))
-> (Maybe [GlobalSecondaryIndexDescription]
    -> f (Maybe [GlobalSecondaryIndexDescription]))
-> TableDescription
-> f TableDescription
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [GlobalSecondaryIndexDescription]
  [GlobalSecondaryIndexDescription]
  [GlobalSecondaryIndexDescription]
  [GlobalSecondaryIndexDescription]
-> Iso
     (Maybe [GlobalSecondaryIndexDescription])
     (Maybe [GlobalSecondaryIndexDescription])
     (Maybe [GlobalSecondaryIndexDescription])
     (Maybe [GlobalSecondaryIndexDescription])
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
  [GlobalSecondaryIndexDescription]
  [GlobalSecondaryIndexDescription]
  [GlobalSecondaryIndexDescription]
  [GlobalSecondaryIndexDescription]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | A timestamp, in ISO 8601 format, for this stream.
--
-- Note that @LatestStreamLabel@ is not a unique identifier for the stream,
-- because it is possible that a stream from another table might have the
-- same timestamp. However, the combination of the following three elements
-- is guaranteed to be unique:
--
-- -   AWS customer ID
--
-- -   Table name
--
-- -   @StreamLabel@
tableDescription_latestStreamLabel :: Lens.Lens' TableDescription (Prelude.Maybe Prelude.Text)
tableDescription_latestStreamLabel :: (Maybe Text -> f (Maybe Text))
-> TableDescription -> f TableDescription
tableDescription_latestStreamLabel = (TableDescription -> Maybe Text)
-> (TableDescription -> Maybe Text -> TableDescription)
-> Lens TableDescription TableDescription (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TableDescription' {Maybe Text
latestStreamLabel :: Maybe Text
$sel:latestStreamLabel:TableDescription' :: TableDescription -> Maybe Text
latestStreamLabel} -> Maybe Text
latestStreamLabel) (\s :: TableDescription
s@TableDescription' {} Maybe Text
a -> TableDescription
s {$sel:latestStreamLabel:TableDescription' :: Maybe Text
latestStreamLabel = Maybe Text
a} :: TableDescription)

-- | Contains the details for the read\/write capacity mode.
tableDescription_billingModeSummary :: Lens.Lens' TableDescription (Prelude.Maybe BillingModeSummary)
tableDescription_billingModeSummary :: (Maybe BillingModeSummary -> f (Maybe BillingModeSummary))
-> TableDescription -> f TableDescription
tableDescription_billingModeSummary = (TableDescription -> Maybe BillingModeSummary)
-> (TableDescription
    -> Maybe BillingModeSummary -> TableDescription)
-> Lens
     TableDescription
     TableDescription
     (Maybe BillingModeSummary)
     (Maybe BillingModeSummary)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TableDescription' {Maybe BillingModeSummary
billingModeSummary :: Maybe BillingModeSummary
$sel:billingModeSummary:TableDescription' :: TableDescription -> Maybe BillingModeSummary
billingModeSummary} -> Maybe BillingModeSummary
billingModeSummary) (\s :: TableDescription
s@TableDescription' {} Maybe BillingModeSummary
a -> TableDescription
s {$sel:billingModeSummary:TableDescription' :: Maybe BillingModeSummary
billingModeSummary = Maybe BillingModeSummary
a} :: TableDescription)

-- | Represents one or more local secondary indexes on the table. Each index
-- is scoped to a given partition key value. Tables with one or more local
-- secondary indexes are subject to an item collection size limit, where
-- the amount of data within a given item collection cannot exceed 10 GB.
-- Each element is composed of:
--
-- -   @IndexName@ - The name of the local secondary index.
--
-- -   @KeySchema@ - Specifies the complete index key schema. The attribute
--     names in the key schema must be between 1 and 255 characters
--     (inclusive). The key schema must begin with the same partition key
--     as the table.
--
-- -   @Projection@ - Specifies attributes that are copied (projected) from
--     the table into the index. These are in addition to the primary key
--     attributes and index key attributes, which are automatically
--     projected. Each attribute specification is composed of:
--
--     -   @ProjectionType@ - One of the following:
--
--         -   @KEYS_ONLY@ - Only the index and primary keys are projected
--             into the index.
--
--         -   @INCLUDE@ - Only the specified table attributes are
--             projected into the index. The list of projected attributes
--             is in @NonKeyAttributes@.
--
--         -   @ALL@ - All of the table attributes are projected into the
--             index.
--
--     -   @NonKeyAttributes@ - A list of one or more non-key attribute
--         names that are projected into the secondary index. The total
--         count of attributes provided in @NonKeyAttributes@, summed
--         across all of the secondary indexes, must not exceed 20. If you
--         project the same attribute into two different indexes, this
--         counts as two distinct attributes when determining the total.
--
-- -   @IndexSizeBytes@ - Represents the total size of the index, in bytes.
--     DynamoDB updates this value approximately every six hours. Recent
--     changes might not be reflected in this value.
--
-- -   @ItemCount@ - Represents the number of items in the index. DynamoDB
--     updates this value approximately every six hours. Recent changes
--     might not be reflected in this value.
--
-- If the table is in the @DELETING@ state, no information about indexes
-- will be returned.
tableDescription_localSecondaryIndexes :: Lens.Lens' TableDescription (Prelude.Maybe [LocalSecondaryIndexDescription])
tableDescription_localSecondaryIndexes :: (Maybe [LocalSecondaryIndexDescription]
 -> f (Maybe [LocalSecondaryIndexDescription]))
-> TableDescription -> f TableDescription
tableDescription_localSecondaryIndexes = (TableDescription -> Maybe [LocalSecondaryIndexDescription])
-> (TableDescription
    -> Maybe [LocalSecondaryIndexDescription] -> TableDescription)
-> Lens
     TableDescription
     TableDescription
     (Maybe [LocalSecondaryIndexDescription])
     (Maybe [LocalSecondaryIndexDescription])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TableDescription' {Maybe [LocalSecondaryIndexDescription]
localSecondaryIndexes :: Maybe [LocalSecondaryIndexDescription]
$sel:localSecondaryIndexes:TableDescription' :: TableDescription -> Maybe [LocalSecondaryIndexDescription]
localSecondaryIndexes} -> Maybe [LocalSecondaryIndexDescription]
localSecondaryIndexes) (\s :: TableDescription
s@TableDescription' {} Maybe [LocalSecondaryIndexDescription]
a -> TableDescription
s {$sel:localSecondaryIndexes:TableDescription' :: Maybe [LocalSecondaryIndexDescription]
localSecondaryIndexes = Maybe [LocalSecondaryIndexDescription]
a} :: TableDescription) ((Maybe [LocalSecondaryIndexDescription]
  -> f (Maybe [LocalSecondaryIndexDescription]))
 -> TableDescription -> f TableDescription)
-> ((Maybe [LocalSecondaryIndexDescription]
     -> f (Maybe [LocalSecondaryIndexDescription]))
    -> Maybe [LocalSecondaryIndexDescription]
    -> f (Maybe [LocalSecondaryIndexDescription]))
-> (Maybe [LocalSecondaryIndexDescription]
    -> f (Maybe [LocalSecondaryIndexDescription]))
-> TableDescription
-> f TableDescription
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [LocalSecondaryIndexDescription]
  [LocalSecondaryIndexDescription]
  [LocalSecondaryIndexDescription]
  [LocalSecondaryIndexDescription]
-> Iso
     (Maybe [LocalSecondaryIndexDescription])
     (Maybe [LocalSecondaryIndexDescription])
     (Maybe [LocalSecondaryIndexDescription])
     (Maybe [LocalSecondaryIndexDescription])
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
  [LocalSecondaryIndexDescription]
  [LocalSecondaryIndexDescription]
  [LocalSecondaryIndexDescription]
  [LocalSecondaryIndexDescription]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The date and time when the table was created, in
-- <http://www.epochconverter.com/ UNIX epoch time> format.
tableDescription_creationDateTime :: Lens.Lens' TableDescription (Prelude.Maybe Prelude.UTCTime)
tableDescription_creationDateTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> TableDescription -> f TableDescription
tableDescription_creationDateTime = (TableDescription -> Maybe POSIX)
-> (TableDescription -> Maybe POSIX -> TableDescription)
-> Lens
     TableDescription TableDescription (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TableDescription' {Maybe POSIX
creationDateTime :: Maybe POSIX
$sel:creationDateTime:TableDescription' :: TableDescription -> Maybe POSIX
creationDateTime} -> Maybe POSIX
creationDateTime) (\s :: TableDescription
s@TableDescription' {} Maybe POSIX
a -> TableDescription
s {$sel:creationDateTime:TableDescription' :: Maybe POSIX
creationDateTime = Maybe POSIX
a} :: TableDescription) ((Maybe POSIX -> f (Maybe POSIX))
 -> TableDescription -> f TableDescription)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> TableDescription
-> f TableDescription
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

-- | The description of the server-side encryption status on the specified
-- table.
tableDescription_sSEDescription :: Lens.Lens' TableDescription (Prelude.Maybe SSEDescription)
tableDescription_sSEDescription :: (Maybe SSEDescription -> f (Maybe SSEDescription))
-> TableDescription -> f TableDescription
tableDescription_sSEDescription = (TableDescription -> Maybe SSEDescription)
-> (TableDescription -> Maybe SSEDescription -> TableDescription)
-> Lens
     TableDescription
     TableDescription
     (Maybe SSEDescription)
     (Maybe SSEDescription)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TableDescription' {Maybe SSEDescription
sSEDescription :: Maybe SSEDescription
$sel:sSEDescription:TableDescription' :: TableDescription -> Maybe SSEDescription
sSEDescription} -> Maybe SSEDescription
sSEDescription) (\s :: TableDescription
s@TableDescription' {} Maybe SSEDescription
a -> TableDescription
s {$sel:sSEDescription:TableDescription' :: Maybe SSEDescription
sSEDescription = Maybe SSEDescription
a} :: TableDescription)

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

-- | Represents replicas of the table.
tableDescription_replicas :: Lens.Lens' TableDescription (Prelude.Maybe [ReplicaDescription])
tableDescription_replicas :: (Maybe [ReplicaDescription] -> f (Maybe [ReplicaDescription]))
-> TableDescription -> f TableDescription
tableDescription_replicas = (TableDescription -> Maybe [ReplicaDescription])
-> (TableDescription
    -> Maybe [ReplicaDescription] -> TableDescription)
-> Lens
     TableDescription
     TableDescription
     (Maybe [ReplicaDescription])
     (Maybe [ReplicaDescription])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TableDescription' {Maybe [ReplicaDescription]
replicas :: Maybe [ReplicaDescription]
$sel:replicas:TableDescription' :: TableDescription -> Maybe [ReplicaDescription]
replicas} -> Maybe [ReplicaDescription]
replicas) (\s :: TableDescription
s@TableDescription' {} Maybe [ReplicaDescription]
a -> TableDescription
s {$sel:replicas:TableDescription' :: Maybe [ReplicaDescription]
replicas = Maybe [ReplicaDescription]
a} :: TableDescription) ((Maybe [ReplicaDescription] -> f (Maybe [ReplicaDescription]))
 -> TableDescription -> f TableDescription)
-> ((Maybe [ReplicaDescription] -> f (Maybe [ReplicaDescription]))
    -> Maybe [ReplicaDescription] -> f (Maybe [ReplicaDescription]))
-> (Maybe [ReplicaDescription] -> f (Maybe [ReplicaDescription]))
-> TableDescription
-> f TableDescription
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [ReplicaDescription]
  [ReplicaDescription]
  [ReplicaDescription]
  [ReplicaDescription]
-> Iso
     (Maybe [ReplicaDescription])
     (Maybe [ReplicaDescription])
     (Maybe [ReplicaDescription])
     (Maybe [ReplicaDescription])
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
  [ReplicaDescription]
  [ReplicaDescription]
  [ReplicaDescription]
  [ReplicaDescription]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The number of items in the specified table. DynamoDB updates this value
-- approximately every six hours. Recent changes might not be reflected in
-- this value.
tableDescription_itemCount :: Lens.Lens' TableDescription (Prelude.Maybe Prelude.Integer)
tableDescription_itemCount :: (Maybe Integer -> f (Maybe Integer))
-> TableDescription -> f TableDescription
tableDescription_itemCount = (TableDescription -> Maybe Integer)
-> (TableDescription -> Maybe Integer -> TableDescription)
-> Lens
     TableDescription TableDescription (Maybe Integer) (Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TableDescription' {Maybe Integer
itemCount :: Maybe Integer
$sel:itemCount:TableDescription' :: TableDescription -> Maybe Integer
itemCount} -> Maybe Integer
itemCount) (\s :: TableDescription
s@TableDescription' {} Maybe Integer
a -> TableDescription
s {$sel:itemCount:TableDescription' :: Maybe Integer
itemCount = Maybe Integer
a} :: TableDescription)

-- | Contains information about the table archive.
tableDescription_archivalSummary :: Lens.Lens' TableDescription (Prelude.Maybe ArchivalSummary)
tableDescription_archivalSummary :: (Maybe ArchivalSummary -> f (Maybe ArchivalSummary))
-> TableDescription -> f TableDescription
tableDescription_archivalSummary = (TableDescription -> Maybe ArchivalSummary)
-> (TableDescription -> Maybe ArchivalSummary -> TableDescription)
-> Lens
     TableDescription
     TableDescription
     (Maybe ArchivalSummary)
     (Maybe ArchivalSummary)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TableDescription' {Maybe ArchivalSummary
archivalSummary :: Maybe ArchivalSummary
$sel:archivalSummary:TableDescription' :: TableDescription -> Maybe ArchivalSummary
archivalSummary} -> Maybe ArchivalSummary
archivalSummary) (\s :: TableDescription
s@TableDescription' {} Maybe ArchivalSummary
a -> TableDescription
s {$sel:archivalSummary:TableDescription' :: Maybe ArchivalSummary
archivalSummary = Maybe ArchivalSummary
a} :: TableDescription)

-- | The name of the table.
tableDescription_tableName :: Lens.Lens' TableDescription (Prelude.Maybe Prelude.Text)
tableDescription_tableName :: (Maybe Text -> f (Maybe Text))
-> TableDescription -> f TableDescription
tableDescription_tableName = (TableDescription -> Maybe Text)
-> (TableDescription -> Maybe Text -> TableDescription)
-> Lens TableDescription TableDescription (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TableDescription' {Maybe Text
tableName :: Maybe Text
$sel:tableName:TableDescription' :: TableDescription -> Maybe Text
tableName} -> Maybe Text
tableName) (\s :: TableDescription
s@TableDescription' {} Maybe Text
a -> TableDescription
s {$sel:tableName:TableDescription' :: Maybe Text
tableName = Maybe Text
a} :: TableDescription)

-- | The current DynamoDB Streams configuration for the table.
tableDescription_streamSpecification :: Lens.Lens' TableDescription (Prelude.Maybe StreamSpecification)
tableDescription_streamSpecification :: (Maybe StreamSpecification -> f (Maybe StreamSpecification))
-> TableDescription -> f TableDescription
tableDescription_streamSpecification = (TableDescription -> Maybe StreamSpecification)
-> (TableDescription
    -> Maybe StreamSpecification -> TableDescription)
-> Lens
     TableDescription
     TableDescription
     (Maybe StreamSpecification)
     (Maybe StreamSpecification)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TableDescription' {Maybe StreamSpecification
streamSpecification :: Maybe StreamSpecification
$sel:streamSpecification:TableDescription' :: TableDescription -> Maybe StreamSpecification
streamSpecification} -> Maybe StreamSpecification
streamSpecification) (\s :: TableDescription
s@TableDescription' {} Maybe StreamSpecification
a -> TableDescription
s {$sel:streamSpecification:TableDescription' :: Maybe StreamSpecification
streamSpecification = Maybe StreamSpecification
a} :: TableDescription)

instance Core.FromJSON TableDescription where
  parseJSON :: Value -> Parser TableDescription
parseJSON =
    String
-> (Object -> Parser TableDescription)
-> Value
-> Parser TableDescription
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"TableDescription"
      ( \Object
x ->
          Maybe RestoreSummary
-> Maybe Text
-> Maybe Integer
-> Maybe [AttributeDefinition]
-> Maybe Text
-> Maybe ProvisionedThroughputDescription
-> Maybe TableStatus
-> Maybe Text
-> Maybe (NonEmpty KeySchemaElement)
-> Maybe [GlobalSecondaryIndexDescription]
-> Maybe Text
-> Maybe BillingModeSummary
-> Maybe [LocalSecondaryIndexDescription]
-> Maybe POSIX
-> Maybe SSEDescription
-> Maybe Text
-> Maybe [ReplicaDescription]
-> Maybe Integer
-> Maybe ArchivalSummary
-> Maybe Text
-> Maybe StreamSpecification
-> TableDescription
TableDescription'
            (Maybe RestoreSummary
 -> Maybe Text
 -> Maybe Integer
 -> Maybe [AttributeDefinition]
 -> Maybe Text
 -> Maybe ProvisionedThroughputDescription
 -> Maybe TableStatus
 -> Maybe Text
 -> Maybe (NonEmpty KeySchemaElement)
 -> Maybe [GlobalSecondaryIndexDescription]
 -> Maybe Text
 -> Maybe BillingModeSummary
 -> Maybe [LocalSecondaryIndexDescription]
 -> Maybe POSIX
 -> Maybe SSEDescription
 -> Maybe Text
 -> Maybe [ReplicaDescription]
 -> Maybe Integer
 -> Maybe ArchivalSummary
 -> Maybe Text
 -> Maybe StreamSpecification
 -> TableDescription)
-> Parser (Maybe RestoreSummary)
-> Parser
     (Maybe Text
      -> Maybe Integer
      -> Maybe [AttributeDefinition]
      -> Maybe Text
      -> Maybe ProvisionedThroughputDescription
      -> Maybe TableStatus
      -> Maybe Text
      -> Maybe (NonEmpty KeySchemaElement)
      -> Maybe [GlobalSecondaryIndexDescription]
      -> Maybe Text
      -> Maybe BillingModeSummary
      -> Maybe [LocalSecondaryIndexDescription]
      -> Maybe POSIX
      -> Maybe SSEDescription
      -> Maybe Text
      -> Maybe [ReplicaDescription]
      -> Maybe Integer
      -> Maybe ArchivalSummary
      -> Maybe Text
      -> Maybe StreamSpecification
      -> TableDescription)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe RestoreSummary)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"RestoreSummary")
            Parser
  (Maybe Text
   -> Maybe Integer
   -> Maybe [AttributeDefinition]
   -> Maybe Text
   -> Maybe ProvisionedThroughputDescription
   -> Maybe TableStatus
   -> Maybe Text
   -> Maybe (NonEmpty KeySchemaElement)
   -> Maybe [GlobalSecondaryIndexDescription]
   -> Maybe Text
   -> Maybe BillingModeSummary
   -> Maybe [LocalSecondaryIndexDescription]
   -> Maybe POSIX
   -> Maybe SSEDescription
   -> Maybe Text
   -> Maybe [ReplicaDescription]
   -> Maybe Integer
   -> Maybe ArchivalSummary
   -> Maybe Text
   -> Maybe StreamSpecification
   -> TableDescription)
-> Parser (Maybe Text)
-> Parser
     (Maybe Integer
      -> Maybe [AttributeDefinition]
      -> Maybe Text
      -> Maybe ProvisionedThroughputDescription
      -> Maybe TableStatus
      -> Maybe Text
      -> Maybe (NonEmpty KeySchemaElement)
      -> Maybe [GlobalSecondaryIndexDescription]
      -> Maybe Text
      -> Maybe BillingModeSummary
      -> Maybe [LocalSecondaryIndexDescription]
      -> Maybe POSIX
      -> Maybe SSEDescription
      -> Maybe Text
      -> Maybe [ReplicaDescription]
      -> Maybe Integer
      -> Maybe ArchivalSummary
      -> Maybe Text
      -> Maybe StreamSpecification
      -> TableDescription)
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
"GlobalTableVersion")
            Parser
  (Maybe Integer
   -> Maybe [AttributeDefinition]
   -> Maybe Text
   -> Maybe ProvisionedThroughputDescription
   -> Maybe TableStatus
   -> Maybe Text
   -> Maybe (NonEmpty KeySchemaElement)
   -> Maybe [GlobalSecondaryIndexDescription]
   -> Maybe Text
   -> Maybe BillingModeSummary
   -> Maybe [LocalSecondaryIndexDescription]
   -> Maybe POSIX
   -> Maybe SSEDescription
   -> Maybe Text
   -> Maybe [ReplicaDescription]
   -> Maybe Integer
   -> Maybe ArchivalSummary
   -> Maybe Text
   -> Maybe StreamSpecification
   -> TableDescription)
-> Parser (Maybe Integer)
-> Parser
     (Maybe [AttributeDefinition]
      -> Maybe Text
      -> Maybe ProvisionedThroughputDescription
      -> Maybe TableStatus
      -> Maybe Text
      -> Maybe (NonEmpty KeySchemaElement)
      -> Maybe [GlobalSecondaryIndexDescription]
      -> Maybe Text
      -> Maybe BillingModeSummary
      -> Maybe [LocalSecondaryIndexDescription]
      -> Maybe POSIX
      -> Maybe SSEDescription
      -> Maybe Text
      -> Maybe [ReplicaDescription]
      -> Maybe Integer
      -> Maybe ArchivalSummary
      -> Maybe Text
      -> Maybe StreamSpecification
      -> TableDescription)
forall (f :: * -> *) a b. Applicative f => 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 [AttributeDefinition]
   -> Maybe Text
   -> Maybe ProvisionedThroughputDescription
   -> Maybe TableStatus
   -> Maybe Text
   -> Maybe (NonEmpty KeySchemaElement)
   -> Maybe [GlobalSecondaryIndexDescription]
   -> Maybe Text
   -> Maybe BillingModeSummary
   -> Maybe [LocalSecondaryIndexDescription]
   -> Maybe POSIX
   -> Maybe SSEDescription
   -> Maybe Text
   -> Maybe [ReplicaDescription]
   -> Maybe Integer
   -> Maybe ArchivalSummary
   -> Maybe Text
   -> Maybe StreamSpecification
   -> TableDescription)
-> Parser (Maybe [AttributeDefinition])
-> Parser
     (Maybe Text
      -> Maybe ProvisionedThroughputDescription
      -> Maybe TableStatus
      -> Maybe Text
      -> Maybe (NonEmpty KeySchemaElement)
      -> Maybe [GlobalSecondaryIndexDescription]
      -> Maybe Text
      -> Maybe BillingModeSummary
      -> Maybe [LocalSecondaryIndexDescription]
      -> Maybe POSIX
      -> Maybe SSEDescription
      -> Maybe Text
      -> Maybe [ReplicaDescription]
      -> Maybe Integer
      -> Maybe ArchivalSummary
      -> Maybe Text
      -> Maybe StreamSpecification
      -> TableDescription)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Parser (Maybe (Maybe [AttributeDefinition]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"AttributeDefinitions"
                            Parser (Maybe (Maybe [AttributeDefinition]))
-> Maybe [AttributeDefinition]
-> Parser (Maybe [AttributeDefinition])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [AttributeDefinition]
forall a. Monoid a => a
Prelude.mempty
                        )
            Parser
  (Maybe Text
   -> Maybe ProvisionedThroughputDescription
   -> Maybe TableStatus
   -> Maybe Text
   -> Maybe (NonEmpty KeySchemaElement)
   -> Maybe [GlobalSecondaryIndexDescription]
   -> Maybe Text
   -> Maybe BillingModeSummary
   -> Maybe [LocalSecondaryIndexDescription]
   -> Maybe POSIX
   -> Maybe SSEDescription
   -> Maybe Text
   -> Maybe [ReplicaDescription]
   -> Maybe Integer
   -> Maybe ArchivalSummary
   -> Maybe Text
   -> Maybe StreamSpecification
   -> TableDescription)
-> Parser (Maybe Text)
-> Parser
     (Maybe ProvisionedThroughputDescription
      -> Maybe TableStatus
      -> Maybe Text
      -> Maybe (NonEmpty KeySchemaElement)
      -> Maybe [GlobalSecondaryIndexDescription]
      -> Maybe Text
      -> Maybe BillingModeSummary
      -> Maybe [LocalSecondaryIndexDescription]
      -> Maybe POSIX
      -> Maybe SSEDescription
      -> Maybe Text
      -> Maybe [ReplicaDescription]
      -> Maybe Integer
      -> Maybe ArchivalSummary
      -> Maybe Text
      -> Maybe StreamSpecification
      -> TableDescription)
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
"LatestStreamArn")
            Parser
  (Maybe ProvisionedThroughputDescription
   -> Maybe TableStatus
   -> Maybe Text
   -> Maybe (NonEmpty KeySchemaElement)
   -> Maybe [GlobalSecondaryIndexDescription]
   -> Maybe Text
   -> Maybe BillingModeSummary
   -> Maybe [LocalSecondaryIndexDescription]
   -> Maybe POSIX
   -> Maybe SSEDescription
   -> Maybe Text
   -> Maybe [ReplicaDescription]
   -> Maybe Integer
   -> Maybe ArchivalSummary
   -> Maybe Text
   -> Maybe StreamSpecification
   -> TableDescription)
-> Parser (Maybe ProvisionedThroughputDescription)
-> Parser
     (Maybe TableStatus
      -> Maybe Text
      -> Maybe (NonEmpty KeySchemaElement)
      -> Maybe [GlobalSecondaryIndexDescription]
      -> Maybe Text
      -> Maybe BillingModeSummary
      -> Maybe [LocalSecondaryIndexDescription]
      -> Maybe POSIX
      -> Maybe SSEDescription
      -> Maybe Text
      -> Maybe [ReplicaDescription]
      -> Maybe Integer
      -> Maybe ArchivalSummary
      -> Maybe Text
      -> Maybe StreamSpecification
      -> TableDescription)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ProvisionedThroughputDescription)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ProvisionedThroughput")
            Parser
  (Maybe TableStatus
   -> Maybe Text
   -> Maybe (NonEmpty KeySchemaElement)
   -> Maybe [GlobalSecondaryIndexDescription]
   -> Maybe Text
   -> Maybe BillingModeSummary
   -> Maybe [LocalSecondaryIndexDescription]
   -> Maybe POSIX
   -> Maybe SSEDescription
   -> Maybe Text
   -> Maybe [ReplicaDescription]
   -> Maybe Integer
   -> Maybe ArchivalSummary
   -> Maybe Text
   -> Maybe StreamSpecification
   -> TableDescription)
-> Parser (Maybe TableStatus)
-> Parser
     (Maybe Text
      -> Maybe (NonEmpty KeySchemaElement)
      -> Maybe [GlobalSecondaryIndexDescription]
      -> Maybe Text
      -> Maybe BillingModeSummary
      -> Maybe [LocalSecondaryIndexDescription]
      -> Maybe POSIX
      -> Maybe SSEDescription
      -> Maybe Text
      -> Maybe [ReplicaDescription]
      -> Maybe Integer
      -> Maybe ArchivalSummary
      -> Maybe Text
      -> Maybe StreamSpecification
      -> TableDescription)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe TableStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"TableStatus")
            Parser
  (Maybe Text
   -> Maybe (NonEmpty KeySchemaElement)
   -> Maybe [GlobalSecondaryIndexDescription]
   -> Maybe Text
   -> Maybe BillingModeSummary
   -> Maybe [LocalSecondaryIndexDescription]
   -> Maybe POSIX
   -> Maybe SSEDescription
   -> Maybe Text
   -> Maybe [ReplicaDescription]
   -> Maybe Integer
   -> Maybe ArchivalSummary
   -> Maybe Text
   -> Maybe StreamSpecification
   -> TableDescription)
-> Parser (Maybe Text)
-> Parser
     (Maybe (NonEmpty KeySchemaElement)
      -> Maybe [GlobalSecondaryIndexDescription]
      -> Maybe Text
      -> Maybe BillingModeSummary
      -> Maybe [LocalSecondaryIndexDescription]
      -> Maybe POSIX
      -> Maybe SSEDescription
      -> Maybe Text
      -> Maybe [ReplicaDescription]
      -> Maybe Integer
      -> Maybe ArchivalSummary
      -> Maybe Text
      -> Maybe StreamSpecification
      -> TableDescription)
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 (NonEmpty KeySchemaElement)
   -> Maybe [GlobalSecondaryIndexDescription]
   -> Maybe Text
   -> Maybe BillingModeSummary
   -> Maybe [LocalSecondaryIndexDescription]
   -> Maybe POSIX
   -> Maybe SSEDescription
   -> Maybe Text
   -> Maybe [ReplicaDescription]
   -> Maybe Integer
   -> Maybe ArchivalSummary
   -> Maybe Text
   -> Maybe StreamSpecification
   -> TableDescription)
-> Parser (Maybe (NonEmpty KeySchemaElement))
-> Parser
     (Maybe [GlobalSecondaryIndexDescription]
      -> Maybe Text
      -> Maybe BillingModeSummary
      -> Maybe [LocalSecondaryIndexDescription]
      -> Maybe POSIX
      -> Maybe SSEDescription
      -> Maybe Text
      -> Maybe [ReplicaDescription]
      -> Maybe Integer
      -> Maybe ArchivalSummary
      -> Maybe Text
      -> Maybe StreamSpecification
      -> TableDescription)
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 [GlobalSecondaryIndexDescription]
   -> Maybe Text
   -> Maybe BillingModeSummary
   -> Maybe [LocalSecondaryIndexDescription]
   -> Maybe POSIX
   -> Maybe SSEDescription
   -> Maybe Text
   -> Maybe [ReplicaDescription]
   -> Maybe Integer
   -> Maybe ArchivalSummary
   -> Maybe Text
   -> Maybe StreamSpecification
   -> TableDescription)
-> Parser (Maybe [GlobalSecondaryIndexDescription])
-> Parser
     (Maybe Text
      -> Maybe BillingModeSummary
      -> Maybe [LocalSecondaryIndexDescription]
      -> Maybe POSIX
      -> Maybe SSEDescription
      -> Maybe Text
      -> Maybe [ReplicaDescription]
      -> Maybe Integer
      -> Maybe ArchivalSummary
      -> Maybe Text
      -> Maybe StreamSpecification
      -> TableDescription)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object
-> Text -> Parser (Maybe (Maybe [GlobalSecondaryIndexDescription]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"GlobalSecondaryIndexes"
                            Parser (Maybe (Maybe [GlobalSecondaryIndexDescription]))
-> Maybe [GlobalSecondaryIndexDescription]
-> Parser (Maybe [GlobalSecondaryIndexDescription])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [GlobalSecondaryIndexDescription]
forall a. Monoid a => a
Prelude.mempty
                        )
            Parser
  (Maybe Text
   -> Maybe BillingModeSummary
   -> Maybe [LocalSecondaryIndexDescription]
   -> Maybe POSIX
   -> Maybe SSEDescription
   -> Maybe Text
   -> Maybe [ReplicaDescription]
   -> Maybe Integer
   -> Maybe ArchivalSummary
   -> Maybe Text
   -> Maybe StreamSpecification
   -> TableDescription)
-> Parser (Maybe Text)
-> Parser
     (Maybe BillingModeSummary
      -> Maybe [LocalSecondaryIndexDescription]
      -> Maybe POSIX
      -> Maybe SSEDescription
      -> Maybe Text
      -> Maybe [ReplicaDescription]
      -> Maybe Integer
      -> Maybe ArchivalSummary
      -> Maybe Text
      -> Maybe StreamSpecification
      -> TableDescription)
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
"LatestStreamLabel")
            Parser
  (Maybe BillingModeSummary
   -> Maybe [LocalSecondaryIndexDescription]
   -> Maybe POSIX
   -> Maybe SSEDescription
   -> Maybe Text
   -> Maybe [ReplicaDescription]
   -> Maybe Integer
   -> Maybe ArchivalSummary
   -> Maybe Text
   -> Maybe StreamSpecification
   -> TableDescription)
-> Parser (Maybe BillingModeSummary)
-> Parser
     (Maybe [LocalSecondaryIndexDescription]
      -> Maybe POSIX
      -> Maybe SSEDescription
      -> Maybe Text
      -> Maybe [ReplicaDescription]
      -> Maybe Integer
      -> Maybe ArchivalSummary
      -> Maybe Text
      -> Maybe StreamSpecification
      -> TableDescription)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe BillingModeSummary)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"BillingModeSummary")
            Parser
  (Maybe [LocalSecondaryIndexDescription]
   -> Maybe POSIX
   -> Maybe SSEDescription
   -> Maybe Text
   -> Maybe [ReplicaDescription]
   -> Maybe Integer
   -> Maybe ArchivalSummary
   -> Maybe Text
   -> Maybe StreamSpecification
   -> TableDescription)
-> Parser (Maybe [LocalSecondaryIndexDescription])
-> Parser
     (Maybe POSIX
      -> Maybe SSEDescription
      -> Maybe Text
      -> Maybe [ReplicaDescription]
      -> Maybe Integer
      -> Maybe ArchivalSummary
      -> Maybe Text
      -> Maybe StreamSpecification
      -> TableDescription)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object
-> Text -> Parser (Maybe (Maybe [LocalSecondaryIndexDescription]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"LocalSecondaryIndexes"
                            Parser (Maybe (Maybe [LocalSecondaryIndexDescription]))
-> Maybe [LocalSecondaryIndexDescription]
-> Parser (Maybe [LocalSecondaryIndexDescription])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [LocalSecondaryIndexDescription]
forall a. Monoid a => a
Prelude.mempty
                        )
            Parser
  (Maybe POSIX
   -> Maybe SSEDescription
   -> Maybe Text
   -> Maybe [ReplicaDescription]
   -> Maybe Integer
   -> Maybe ArchivalSummary
   -> Maybe Text
   -> Maybe StreamSpecification
   -> TableDescription)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe SSEDescription
      -> Maybe Text
      -> Maybe [ReplicaDescription]
      -> Maybe Integer
      -> Maybe ArchivalSummary
      -> Maybe Text
      -> Maybe StreamSpecification
      -> TableDescription)
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
"CreationDateTime")
            Parser
  (Maybe SSEDescription
   -> Maybe Text
   -> Maybe [ReplicaDescription]
   -> Maybe Integer
   -> Maybe ArchivalSummary
   -> Maybe Text
   -> Maybe StreamSpecification
   -> TableDescription)
-> Parser (Maybe SSEDescription)
-> Parser
     (Maybe Text
      -> Maybe [ReplicaDescription]
      -> Maybe Integer
      -> Maybe ArchivalSummary
      -> Maybe Text
      -> Maybe StreamSpecification
      -> TableDescription)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe SSEDescription)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"SSEDescription")
            Parser
  (Maybe Text
   -> Maybe [ReplicaDescription]
   -> Maybe Integer
   -> Maybe ArchivalSummary
   -> Maybe Text
   -> Maybe StreamSpecification
   -> TableDescription)
-> Parser (Maybe Text)
-> Parser
     (Maybe [ReplicaDescription]
      -> Maybe Integer
      -> Maybe ArchivalSummary
      -> Maybe Text
      -> Maybe StreamSpecification
      -> TableDescription)
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
"TableId")
            Parser
  (Maybe [ReplicaDescription]
   -> Maybe Integer
   -> Maybe ArchivalSummary
   -> Maybe Text
   -> Maybe StreamSpecification
   -> TableDescription)
-> Parser (Maybe [ReplicaDescription])
-> Parser
     (Maybe Integer
      -> Maybe ArchivalSummary
      -> Maybe Text
      -> Maybe StreamSpecification
      -> TableDescription)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [ReplicaDescription]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Replicas" Parser (Maybe (Maybe [ReplicaDescription]))
-> Maybe [ReplicaDescription]
-> Parser (Maybe [ReplicaDescription])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [ReplicaDescription]
forall a. Monoid a => a
Prelude.mempty)
            Parser
  (Maybe Integer
   -> Maybe ArchivalSummary
   -> Maybe Text
   -> Maybe StreamSpecification
   -> TableDescription)
-> Parser (Maybe Integer)
-> Parser
     (Maybe ArchivalSummary
      -> Maybe Text -> Maybe StreamSpecification -> TableDescription)
forall (f :: * -> *) a b. Applicative f => 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
"ItemCount")
            Parser
  (Maybe ArchivalSummary
   -> Maybe Text -> Maybe StreamSpecification -> TableDescription)
-> Parser (Maybe ArchivalSummary)
-> Parser
     (Maybe Text -> Maybe StreamSpecification -> TableDescription)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ArchivalSummary)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ArchivalSummary")
            Parser
  (Maybe Text -> Maybe StreamSpecification -> TableDescription)
-> Parser (Maybe Text)
-> Parser (Maybe StreamSpecification -> TableDescription)
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 StreamSpecification -> TableDescription)
-> Parser (Maybe StreamSpecification) -> Parser TableDescription
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe StreamSpecification)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"StreamSpecification")
      )

instance Prelude.Hashable TableDescription

instance Prelude.NFData TableDescription