diff --git a/README.md b/README.md
--- a/README.md
+++ b/README.md
@@ -1,24 +1,145 @@
 # Amazon DynamoDB SDK
 
-> _Warning:_ This is an experimental preview release which is still under heavy development and not intended for public consumption, _caveat emptor_!
-
+* [Version](#version)
 * [Description](#description)
 * [Contribute](#contribute)
 * [Licence](#licence)
 
+
+## Version
+
+`1.0.0`
+
+
 ## Description
 
-Amazon DynamoDB is a fully managed NoSQL database service that provides fast
-and predictable performance with seamless scalability. You can use Amazon
-DynamoDB to create a database table that can store and retrieve any amount of
-data, and serve any level of request traffic. Amazon DynamoDB automatically
-spreads the data and traffic for the table over a sufficient number of
-servers to handle the request capacity specified by the customer and the
-amount of data stored, while maintaining consistent and fast performance.
+Amazon DynamoDB
 
+__Overview__
+
+This is the Amazon DynamoDB API Reference. This guide provides
+descriptions and samples of the low-level DynamoDB API. For information
+about DynamoDB application development, see the
+<http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ Amazon DynamoDB Developer Guide>.
+
+Instead of making the requests to the low-level DynamoDB API directly
+from your application, we recommend that you use the AWS Software
+Development Kits (SDKs). The easy-to-use libraries in the AWS SDKs make
+it unnecessary to call the low-level DynamoDB API directly from your
+application. The libraries take care of request authentication,
+serialization, and connection management. For more information, see
+<http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/UsingAWSSDK.html Using the AWS SDKs with DynamoDB>
+in the /Amazon DynamoDB Developer Guide/.
+
+If you decide to code against the low-level DynamoDB API directly, you
+will need to write the necessary code to authenticate your requests. For
+more information on signing your requests, see
+<http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/API.html Using the DynamoDB API>
+in the /Amazon DynamoDB Developer Guide/.
+
+The following are short descriptions of each low-level API action,
+organized by function.
+
+__Managing Tables__
+
+-   /CreateTable/ - Creates a table with user-specified provisioned
+    throughput settings. You must designate one attribute as the hash
+    primary key for the table; you can optionally designate a second
+    attribute as the range primary key. DynamoDB creates indexes on
+    these key attributes for fast data access. Optionally, you can
+    create one or more secondary indexes, which provide fast data access
+    using non-key attributes.
+
+-   /DescribeTable/ - Returns metadata for a table, such as table size,
+    status, and index information.
+
+-   /UpdateTable/ - Modifies the provisioned throughput settings for a
+    table. Optionally, you can modify the provisioned throughput
+    settings for global secondary indexes on the table.
+
+-   /ListTables/ - Returns a list of all tables associated with the
+    current AWS account and endpoint.
+
+-   /DeleteTable/ - Deletes a table and all of its indexes.
+
+For conceptual information about managing tables, see
+<http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithTables.html Working with Tables>
+in the /Amazon DynamoDB Developer Guide/.
+
+__Reading Data__
+
+-   /GetItem/ - Returns a set of attributes for the item that has a
+    given primary key. By default, /GetItem/ performs an eventually
+    consistent read; however, applications can request a strongly
+    consistent read instead.
+
+-   /BatchGetItem/ - Performs multiple /GetItem/ requests for data items
+    using their primary keys, from one table or multiple tables. The
+    response from /BatchGetItem/ has a size limit of 16 MB and returns a
+    maximum of 100 items. Both eventually consistent and strongly
+    consistent reads can be used.
+
+-   /Query/ - Returns one or more items from a table or a secondary
+    index. You must provide a specific hash key value. You can narrow
+    the scope of the query using comparison operators against a range
+    key value, or on the index key. /Query/ supports either eventual or
+    strong consistency. A single response has a size limit of 1 MB.
+
+-   /Scan/ - Reads every item in a table; the result set is eventually
+    consistent. You can limit the number of items returned by filtering
+    the data attributes, using conditional expressions. /Scan/ can be
+    used to enable ad-hoc querying of a table against non-key
+    attributes; however, since this is a full table scan without using
+    an index, /Scan/ should not be used for any application query use
+    case that requires predictable performance.
+
+For conceptual information about reading data, see
+<http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithItems.html Working with Items>
+and
+<http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/QueryAndScan.html Query and Scan Operations>
+in the /Amazon DynamoDB Developer Guide/.
+
+__Modifying Data__
+
+-   /PutItem/ - Creates a new item, or replaces an existing item with a
+    new item (including all the attributes). By default, if an item in
+    the table already exists with the same primary key, the new item
+    completely replaces the existing item. You can use conditional
+    operators to replace an item only if its attribute values match
+    certain conditions, or to insert a new item only if that item
+    doesn\'t already exist.
+
+-   /UpdateItem/ - Modifies the attributes of an existing item. You can
+    also use conditional operators to perform an update only if the
+    item\'s attribute values match certain conditions.
+
+-   /DeleteItem/ - Deletes an item in a table by primary key. You can
+    use conditional operators to perform a delete an item only if the
+    item\'s attribute values match certain conditions.
+
+-   /BatchWriteItem/ - Performs multiple /PutItem/ and /DeleteItem/
+    requests across multiple tables in a single request. A failure of
+    any request(s) in the batch will not cause the entire
+    /BatchWriteItem/ operation to fail. Supports batches of up to 25
+    items to put or delete, with a maximum total request size of 16 MB.
+
+For conceptual information about modifying data, see
+<http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithItems.html Working with Items>
+and
+<http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/QueryAndScan.html Query and Scan Operations>
+in the /Amazon DynamoDB Developer Guide/.
+
 Documentation is available via [Hackage](http://hackage.haskell.org/package/amazonka-dynamodb)
 and the [AWS API Reference](http://docs.aws.amazon.com/amazondynamodb/latest/APIReference/Welcome.html).
 
+The types from this library are intended to be used with [amazonka](http://hackage.haskell.org/package/amazonka),
+which provides mechanisms for specifying AuthN/AuthZ information and sending requests.
+
+Use of lenses is required for constructing and manipulating types.
+This is due to the amount of nesting of AWS types and transparency regarding
+de/serialisation into more palatable Haskell values.
+The provided lenses should be compatible with any of the major lens libraries
+[lens](http://hackage.haskell.org/package/lens) or [lens-family-core](http://hackage.haskell.org/package/lens-family-core).
 
 ## Contribute
 
diff --git a/amazonka-dynamodb.cabal b/amazonka-dynamodb.cabal
--- a/amazonka-dynamodb.cabal
+++ b/amazonka-dynamodb.cabal
@@ -1,31 +1,147 @@
 name:                  amazonka-dynamodb
-version:               0.3.6
+version:               1.0.0
 synopsis:              Amazon DynamoDB SDK.
 homepage:              https://github.com/brendanhay/amazonka
 license:               OtherLicense
 license-file:          LICENSE
 author:                Brendan Hay
 maintainer:            Brendan Hay <brendan.g.hay@gmail.com>
-copyright:             Copyright (c) 2013-2014 Brendan Hay
+copyright:             Copyright (c) 2013-2015 Brendan Hay
 category:              Network, AWS, Cloud, Distributed Computing
 build-type:            Simple
 extra-source-files:    README.md
 cabal-version:         >= 1.10
 
 description:
-    Amazon DynamoDB is a fully managed NoSQL database service that provides fast
-    and predictable performance with seamless scalability. You can use Amazon
-    DynamoDB to create a database table that can store and retrieve any amount of
-    data, and serve any level of request traffic. Amazon DynamoDB automatically
-    spreads the data and traffic for the table over a sufficient number of
-    servers to handle the request capacity specified by the customer and the
-    amount of data stored, while maintaining consistent and fast performance.
+    Amazon DynamoDB
 
+    __Overview__
+
+    This is the Amazon DynamoDB API Reference. This guide provides
+    descriptions and samples of the low-level DynamoDB API. For information
+    about DynamoDB application development, see the
+    <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ Amazon DynamoDB Developer Guide>.
+
+    Instead of making the requests to the low-level DynamoDB API directly
+    from your application, we recommend that you use the AWS Software
+    Development Kits (SDKs). The easy-to-use libraries in the AWS SDKs make
+    it unnecessary to call the low-level DynamoDB API directly from your
+    application. The libraries take care of request authentication,
+    serialization, and connection management. For more information, see
+    <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/UsingAWSSDK.html Using the AWS SDKs with DynamoDB>
+    in the /Amazon DynamoDB Developer Guide/.
+
+    If you decide to code against the low-level DynamoDB API directly, you
+    will need to write the necessary code to authenticate your requests. For
+    more information on signing your requests, see
+    <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/API.html Using the DynamoDB API>
+    in the /Amazon DynamoDB Developer Guide/.
+
+    The following are short descriptions of each low-level API action,
+    organized by function.
+
+    __Managing Tables__
+
+    -   /CreateTable/ - Creates a table with user-specified provisioned
+        throughput settings. You must designate one attribute as the hash
+        primary key for the table; you can optionally designate a second
+        attribute as the range primary key. DynamoDB creates indexes on
+        these key attributes for fast data access. Optionally, you can
+        create one or more secondary indexes, which provide fast data access
+        using non-key attributes.
+
+    -   /DescribeTable/ - Returns metadata for a table, such as table size,
+        status, and index information.
+
+    -   /UpdateTable/ - Modifies the provisioned throughput settings for a
+        table. Optionally, you can modify the provisioned throughput
+        settings for global secondary indexes on the table.
+
+    -   /ListTables/ - Returns a list of all tables associated with the
+        current AWS account and endpoint.
+
+    -   /DeleteTable/ - Deletes a table and all of its indexes.
+
+    For conceptual information about managing tables, see
+    <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithTables.html Working with Tables>
+    in the /Amazon DynamoDB Developer Guide/.
+
+    __Reading Data__
+
+    -   /GetItem/ - Returns a set of attributes for the item that has a
+        given primary key. By default, /GetItem/ performs an eventually
+        consistent read; however, applications can request a strongly
+        consistent read instead.
+
+    -   /BatchGetItem/ - Performs multiple /GetItem/ requests for data items
+        using their primary keys, from one table or multiple tables. The
+        response from /BatchGetItem/ has a size limit of 16 MB and returns a
+        maximum of 100 items. Both eventually consistent and strongly
+        consistent reads can be used.
+
+    -   /Query/ - Returns one or more items from a table or a secondary
+        index. You must provide a specific hash key value. You can narrow
+        the scope of the query using comparison operators against a range
+        key value, or on the index key. /Query/ supports either eventual or
+        strong consistency. A single response has a size limit of 1 MB.
+
+    -   /Scan/ - Reads every item in a table; the result set is eventually
+        consistent. You can limit the number of items returned by filtering
+        the data attributes, using conditional expressions. /Scan/ can be
+        used to enable ad-hoc querying of a table against non-key
+        attributes; however, since this is a full table scan without using
+        an index, /Scan/ should not be used for any application query use
+        case that requires predictable performance.
+
+    For conceptual information about reading data, see
+    <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithItems.html Working with Items>
+    and
+    <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/QueryAndScan.html Query and Scan Operations>
+    in the /Amazon DynamoDB Developer Guide/.
+
+    __Modifying Data__
+
+    -   /PutItem/ - Creates a new item, or replaces an existing item with a
+        new item (including all the attributes). By default, if an item in
+        the table already exists with the same primary key, the new item
+        completely replaces the existing item. You can use conditional
+        operators to replace an item only if its attribute values match
+        certain conditions, or to insert a new item only if that item
+        doesn\'t already exist.
+
+    -   /UpdateItem/ - Modifies the attributes of an existing item. You can
+        also use conditional operators to perform an update only if the
+        item\'s attribute values match certain conditions.
+
+    -   /DeleteItem/ - Deletes an item in a table by primary key. You can
+        use conditional operators to perform a delete an item only if the
+        item\'s attribute values match certain conditions.
+
+    -   /BatchWriteItem/ - Performs multiple /PutItem/ and /DeleteItem/
+        requests across multiple tables in a single request. A failure of
+        any request(s) in the batch will not cause the entire
+        /BatchWriteItem/ operation to fail. Supports batches of up to 25
+        items to put or delete, with a maximum total request size of 16 MB.
+
+    For conceptual information about modifying data, see
+    <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithItems.html Working with Items>
+    and
+    <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/QueryAndScan.html Query and Scan Operations>
+    in the /Amazon DynamoDB Developer Guide/.
     .
-    /See:/ <http://docs.aws.amazon.com/amazondynamodb/latest/APIReference/Welcome.html AWS API Reference>
+    The types from this library are intended to be used with
+    <http://hackage.haskell.org/package/amazonka amazonka>, which provides
+    mechanisms for specifying AuthN/AuthZ information and sending requests.
     .
-    /Warning:/ This is an experimental preview release which is still under
-    heavy development and not intended for public consumption, caveat emptor!
+    Use of lenses is required for constructing and manipulating types.
+    This is due to the amount of nesting of AWS types and transparency regarding
+    de/serialisation into more palatable Haskell values.
+    The provided lenses should be compatible with any of the major lens libraries
+    such as <http://hackage.haskell.org/package/lens lens> or
+    <http://hackage.haskell.org/package/lens-family-core lens-family-core>.
+    .
+    See "Network.AWS.DynamoDB" and the <http://docs.aws.amazon.com/amazondynamodb/latest/APIReference/Welcome.html AWS API Reference>
+    to get started.
 
 source-repository head
     type:     git
@@ -56,7 +172,37 @@
         , Network.AWS.DynamoDB.Waiters
 
     other-modules:
+          Network.AWS.DynamoDB.Types.Product
+        , Network.AWS.DynamoDB.Types.Sum
 
     build-depends:
-          amazonka-core == 0.3.6.*
+          amazonka-core == 1.0.0.*
         , base          >= 4.7     && < 5
+
+test-suite amazonka-dynamodb-test
+    type:              exitcode-stdio-1.0
+    default-language:  Haskell2010
+    hs-source-dirs:    test
+    main-is:           Main.hs
+
+    ghc-options:       -Wall -threaded
+
+    -- This is not comprehensive if modules have manually been added.
+    -- It exists to ensure cabal 'somewhat' detects test module changes.
+    other-modules:
+          Test.AWS.DynamoDB
+        , Test.AWS.Gen.DynamoDB
+        , Test.AWS.DynamoDB.Internal
+
+    build-depends:
+          amazonka-core == 1.0.0
+        , amazonka-test == 1.0.0
+        , amazonka-dynamodb == 1.0.0
+        , base
+        , bytestring
+        , lens
+        , tasty
+        , tasty-hunit
+        , text
+        , time
+        , unordered-containers
diff --git a/gen/Network/AWS/DynamoDB.hs b/gen/Network/AWS/DynamoDB.hs
--- a/gen/Network/AWS/DynamoDB.hs
+++ b/gen/Network/AWS/DynamoDB.hs
@@ -1,52 +1,497 @@
+{-# OPTIONS_GHC -fno-warn-unused-imports    #-}
+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
+
+-- Derived from AWS service descriptions, licensed under Apache 2.0.
+
+-- |
 -- Module      : Network.AWS.DynamoDB
--- Copyright   : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>
--- License     : This Source Code Form is subject to the terms of
---               the Mozilla Public License, v. 2.0.
---               A copy of the MPL can be found in the LICENSE file or
---               you can obtain it at http://mozilla.org/MPL/2.0/.
+-- Copyright   : (c) 2013-2015 Brendan Hay
+-- License     : Mozilla Public License, v. 2.0.
 -- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com>
--- Stability   : experimental
+-- Stability   : auto-generated
 -- Portability : non-portable (GHC extensions)
 --
--- Derived from AWS service descriptions, licensed under Apache 2.0.
-
--- | Amazon DynamoDB is a fully managed NoSQL database service that provides fast
--- and predictable performance with seamless scalability. You can use Amazon
--- DynamoDB to create a database table that can store and retrieve any amount of
--- data, and serve any level of request traffic. Amazon DynamoDB automatically
--- spreads the data and traffic for the table over a sufficient number of
--- servers to handle the request capacity specified by the customer and the
--- amount of data stored, while maintaining consistent and fast performance.
+-- Amazon DynamoDB
+--
+-- __Overview__
+--
+-- This is the Amazon DynamoDB API Reference. This guide provides
+-- descriptions and samples of the low-level DynamoDB API. For information
+-- about DynamoDB application development, see the
+-- <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ Amazon DynamoDB Developer Guide>.
+--
+-- Instead of making the requests to the low-level DynamoDB API directly
+-- from your application, we recommend that you use the AWS Software
+-- Development Kits (SDKs). The easy-to-use libraries in the AWS SDKs make
+-- it unnecessary to call the low-level DynamoDB API directly from your
+-- application. The libraries take care of request authentication,
+-- serialization, and connection management. For more information, see
+-- <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/UsingAWSSDK.html Using the AWS SDKs with DynamoDB>
+-- in the /Amazon DynamoDB Developer Guide/.
+--
+-- If you decide to code against the low-level DynamoDB API directly, you
+-- will need to write the necessary code to authenticate your requests. For
+-- more information on signing your requests, see
+-- <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/API.html Using the DynamoDB API>
+-- in the /Amazon DynamoDB Developer Guide/.
+--
+-- The following are short descriptions of each low-level API action,
+-- organized by function.
+--
+-- __Managing Tables__
+--
+-- -   /CreateTable/ - Creates a table with user-specified provisioned
+--     throughput settings. You must designate one attribute as the hash
+--     primary key for the table; you can optionally designate a second
+--     attribute as the range primary key. DynamoDB creates indexes on
+--     these key attributes for fast data access. Optionally, you can
+--     create one or more secondary indexes, which provide fast data access
+--     using non-key attributes.
+--
+-- -   /DescribeTable/ - Returns metadata for a table, such as table size,
+--     status, and index information.
+--
+-- -   /UpdateTable/ - Modifies the provisioned throughput settings for a
+--     table. Optionally, you can modify the provisioned throughput
+--     settings for global secondary indexes on the table.
+--
+-- -   /ListTables/ - Returns a list of all tables associated with the
+--     current AWS account and endpoint.
+--
+-- -   /DeleteTable/ - Deletes a table and all of its indexes.
+--
+-- For conceptual information about managing tables, see
+-- <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithTables.html Working with Tables>
+-- in the /Amazon DynamoDB Developer Guide/.
+--
+-- __Reading Data__
+--
+-- -   /GetItem/ - Returns a set of attributes for the item that has a
+--     given primary key. By default, /GetItem/ performs an eventually
+--     consistent read; however, applications can request a strongly
+--     consistent read instead.
+--
+-- -   /BatchGetItem/ - Performs multiple /GetItem/ requests for data items
+--     using their primary keys, from one table or multiple tables. The
+--     response from /BatchGetItem/ has a size limit of 16 MB and returns a
+--     maximum of 100 items. Both eventually consistent and strongly
+--     consistent reads can be used.
+--
+-- -   /Query/ - Returns one or more items from a table or a secondary
+--     index. You must provide a specific hash key value. You can narrow
+--     the scope of the query using comparison operators against a range
+--     key value, or on the index key. /Query/ supports either eventual or
+--     strong consistency. A single response has a size limit of 1 MB.
+--
+-- -   /Scan/ - Reads every item in a table; the result set is eventually
+--     consistent. You can limit the number of items returned by filtering
+--     the data attributes, using conditional expressions. /Scan/ can be
+--     used to enable ad-hoc querying of a table against non-key
+--     attributes; however, since this is a full table scan without using
+--     an index, /Scan/ should not be used for any application query use
+--     case that requires predictable performance.
+--
+-- For conceptual information about reading data, see
+-- <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithItems.html Working with Items>
+-- and
+-- <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/QueryAndScan.html Query and Scan Operations>
+-- in the /Amazon DynamoDB Developer Guide/.
+--
+-- __Modifying Data__
+--
+-- -   /PutItem/ - Creates a new item, or replaces an existing item with a
+--     new item (including all the attributes). By default, if an item in
+--     the table already exists with the same primary key, the new item
+--     completely replaces the existing item. You can use conditional
+--     operators to replace an item only if its attribute values match
+--     certain conditions, or to insert a new item only if that item
+--     doesn\'t already exist.
+--
+-- -   /UpdateItem/ - Modifies the attributes of an existing item. You can
+--     also use conditional operators to perform an update only if the
+--     item\'s attribute values match certain conditions.
+--
+-- -   /DeleteItem/ - Deletes an item in a table by primary key. You can
+--     use conditional operators to perform a delete an item only if the
+--     item\'s attribute values match certain conditions.
+--
+-- -   /BatchWriteItem/ - Performs multiple /PutItem/ and /DeleteItem/
+--     requests across multiple tables in a single request. A failure of
+--     any request(s) in the batch will not cause the entire
+--     /BatchWriteItem/ operation to fail. Supports batches of up to 25
+--     items to put or delete, with a maximum total request size of 16 MB.
+--
+-- For conceptual information about modifying data, see
+-- <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithItems.html Working with Items>
+-- and
+-- <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/QueryAndScan.html Query and Scan Operations>
+-- in the /Amazon DynamoDB Developer Guide/.
+--
+-- /See:/ <http://docs.aws.amazon.com/amazondynamodb/latest/APIReference/Welcome.html AWS API Reference>
 module Network.AWS.DynamoDB
-    ( module Network.AWS.DynamoDB.BatchGetItem
-    , module Network.AWS.DynamoDB.BatchWriteItem
-    , module Network.AWS.DynamoDB.CreateTable
+    (
+    -- * Service
+      DynamoDB
+
+    -- * Errors
+    -- $errors
+
+    -- ** ProvisionedThroughputExceededException
+    , _ProvisionedThroughputExceededException
+
+    -- ** ConditionalCheckFailedException
+    , _ConditionalCheckFailedException
+
+    -- ** ItemCollectionSizeLimitExceededException
+    , _ItemCollectionSizeLimitExceededException
+
+    -- ** InternalServerError
+    , _InternalServerError
+
+    -- ** ResourceNotFoundException
+    , _ResourceNotFoundException
+
+    -- ** ResourceInUseException
+    , _ResourceInUseException
+
+    -- ** LimitExceededException
+    , _LimitExceededException
+
+    -- * Waiters
+    -- $waiters
+
+    -- ** TableNotExists
+    , tableNotExists
+
+    -- ** TableExists
+    , tableExists
+
+    -- * Operations
+    -- $operations
+
+    -- ** UpdateItem
+    , module Network.AWS.DynamoDB.UpdateItem
+
+    -- ** DeleteItem
     , module Network.AWS.DynamoDB.DeleteItem
+
+    -- ** PutItem
+    , module Network.AWS.DynamoDB.PutItem
+
+    -- ** DeleteTable
     , module Network.AWS.DynamoDB.DeleteTable
+
+    -- ** UpdateTable
+    , module Network.AWS.DynamoDB.UpdateTable
+
+    -- ** BatchGetItem
+    , module Network.AWS.DynamoDB.BatchGetItem
+
+    -- ** DescribeTable
     , module Network.AWS.DynamoDB.DescribeTable
+
+    -- ** GetItem
     , module Network.AWS.DynamoDB.GetItem
+
+    -- ** BatchWriteItem
+    , module Network.AWS.DynamoDB.BatchWriteItem
+
+    -- ** Scan (Paginated)
+    , module Network.AWS.DynamoDB.Scan
+
+    -- ** ListTables (Paginated)
     , module Network.AWS.DynamoDB.ListTables
-    , module Network.AWS.DynamoDB.PutItem
+
+    -- ** Query (Paginated)
     , module Network.AWS.DynamoDB.Query
-    , module Network.AWS.DynamoDB.Scan
-    , module Network.AWS.DynamoDB.Types
-    , module Network.AWS.DynamoDB.UpdateItem
-    , module Network.AWS.DynamoDB.UpdateTable
-    , module Network.AWS.DynamoDB.Waiters
+
+    -- ** CreateTable
+    , module Network.AWS.DynamoDB.CreateTable
+
+    -- * Types
+
+    -- ** AttributeAction
+    , AttributeAction (..)
+
+    -- ** ComparisonOperator
+    , ComparisonOperator (..)
+
+    -- ** ConditionalOperator
+    , ConditionalOperator (..)
+
+    -- ** IndexStatus
+    , IndexStatus (..)
+
+    -- ** KeyType
+    , KeyType (..)
+
+    -- ** ProjectionType
+    , ProjectionType (..)
+
+    -- ** ReturnConsumedCapacity
+    , ReturnConsumedCapacity (..)
+
+    -- ** ReturnItemCollectionMetrics
+    , ReturnItemCollectionMetrics (..)
+
+    -- ** ReturnValue
+    , ReturnValue (..)
+
+    -- ** ScalarAttributeType
+    , ScalarAttributeType (..)
+
+    -- ** Select
+    , Select (..)
+
+    -- ** StreamViewType
+    , StreamViewType (..)
+
+    -- ** TableStatus
+    , TableStatus (..)
+
+    -- ** AttributeDefinition
+    , AttributeDefinition
+    , attributeDefinition
+    , adAttributeName
+    , adAttributeType
+
+    -- ** AttributeValue
+    , AttributeValue
+    , attributeValue
+    , avL
+    , avM
+    , avNS
+    , avNULL
+    , avN
+    , avBS
+    , avB
+    , avSS
+    , avS
+    , avBOOL
+
+    -- ** AttributeValueUpdate
+    , AttributeValueUpdate
+    , attributeValueUpdate
+    , avuValue
+    , avuAction
+
+    -- ** Capacity
+    , Capacity
+    , capacity
+    , cCapacityUnits
+
+    -- ** Condition
+    , Condition
+    , condition
+    , cAttributeValueList
+    , cComparisonOperator
+
+    -- ** ConsumedCapacity
+    , ConsumedCapacity
+    , consumedCapacity
+    , ccCapacityUnits
+    , ccGlobalSecondaryIndexes
+    , ccLocalSecondaryIndexes
+    , ccTable
+    , ccTableName
+
+    -- ** CreateGlobalSecondaryIndexAction
+    , CreateGlobalSecondaryIndexAction
+    , createGlobalSecondaryIndexAction
+    , cgsiaIndexName
+    , cgsiaKeySchema
+    , cgsiaProjection
+    , cgsiaProvisionedThroughput
+
+    -- ** DeleteGlobalSecondaryIndexAction
+    , DeleteGlobalSecondaryIndexAction
+    , deleteGlobalSecondaryIndexAction
+    , dgsiaIndexName
+
+    -- ** DeleteRequest
+    , DeleteRequest
+    , deleteRequest
+    , drKey
+
+    -- ** ExpectedAttributeValue
+    , ExpectedAttributeValue
+    , expectedAttributeValue
+    , eavAttributeValueList
+    , eavExists
+    , eavValue
+    , eavComparisonOperator
+
+    -- ** GlobalSecondaryIndex
+    , GlobalSecondaryIndex
+    , globalSecondaryIndex
+    , gsiIndexName
+    , gsiKeySchema
+    , gsiProjection
+    , gsiProvisionedThroughput
+
+    -- ** GlobalSecondaryIndexDescription
+    , GlobalSecondaryIndexDescription
+    , globalSecondaryIndexDescription
+    , gsidBackfilling
+    , gsidProvisionedThroughput
+    , gsidIndexStatus
+    , gsidIndexSizeBytes
+    , gsidIndexARN
+    , gsidKeySchema
+    , gsidProjection
+    , gsidItemCount
+    , gsidIndexName
+
+    -- ** GlobalSecondaryIndexUpdate
+    , GlobalSecondaryIndexUpdate
+    , globalSecondaryIndexUpdate
+    , gsiuCreate
+    , gsiuDelete
+    , gsiuUpdate
+
+    -- ** ItemCollectionMetrics
+    , ItemCollectionMetrics
+    , itemCollectionMetrics
+    , icmItemCollectionKey
+    , icmSizeEstimateRangeGB
+
+    -- ** KeySchemaElement
+    , KeySchemaElement
+    , keySchemaElement
+    , kseAttributeName
+    , kseKeyType
+
+    -- ** KeysAndAttributes
+    , KeysAndAttributes
+    , keysAndAttributes
+    , kaaProjectionExpression
+    , kaaConsistentRead
+    , kaaExpressionAttributeNames
+    , kaaAttributesToGet
+    , kaaKeys
+
+    -- ** LocalSecondaryIndex
+    , LocalSecondaryIndex
+    , localSecondaryIndex
+    , lsiIndexName
+    , lsiKeySchema
+    , lsiProjection
+
+    -- ** LocalSecondaryIndexDescription
+    , LocalSecondaryIndexDescription
+    , localSecondaryIndexDescription
+    , lsidIndexSizeBytes
+    , lsidIndexARN
+    , lsidKeySchema
+    , lsidProjection
+    , lsidItemCount
+    , lsidIndexName
+
+    -- ** Projection
+    , Projection
+    , projection
+    , pProjectionType
+    , pNonKeyAttributes
+
+    -- ** ProvisionedThroughput
+    , ProvisionedThroughput
+    , provisionedThroughput
+    , ptReadCapacityUnits
+    , ptWriteCapacityUnits
+
+    -- ** ProvisionedThroughputDescription
+    , ProvisionedThroughputDescription
+    , provisionedThroughputDescription
+    , ptdReadCapacityUnits
+    , ptdLastDecreaseDateTime
+    , ptdWriteCapacityUnits
+    , ptdNumberOfDecreasesToday
+    , ptdLastIncreaseDateTime
+
+    -- ** PutRequest
+    , PutRequest
+    , putRequest
+    , prItem
+
+    -- ** StreamSpecification
+    , StreamSpecification
+    , streamSpecification
+    , ssStreamEnabled
+    , ssStreamViewType
+
+    -- ** TableDescription
+    , TableDescription
+    , tableDescription
+    , tdProvisionedThroughput
+    , tdAttributeDefinitions
+    , tdLatestStreamARN
+    , tdTableSizeBytes
+    , tdTableStatus
+    , tdTableARN
+    , tdKeySchema
+    , tdLatestStreamLabel
+    , tdGlobalSecondaryIndexes
+    , tdLocalSecondaryIndexes
+    , tdCreationDateTime
+    , tdItemCount
+    , tdTableName
+    , tdStreamSpecification
+
+    -- ** UpdateGlobalSecondaryIndexAction
+    , UpdateGlobalSecondaryIndexAction
+    , updateGlobalSecondaryIndexAction
+    , ugsiaIndexName
+    , ugsiaProvisionedThroughput
+
+    -- ** WriteRequest
+    , WriteRequest
+    , writeRequest
+    , wrPutRequest
+    , wrDeleteRequest
     ) where
 
-import Network.AWS.DynamoDB.BatchGetItem
-import Network.AWS.DynamoDB.BatchWriteItem
-import Network.AWS.DynamoDB.CreateTable
-import Network.AWS.DynamoDB.DeleteItem
-import Network.AWS.DynamoDB.DeleteTable
-import Network.AWS.DynamoDB.DescribeTable
-import Network.AWS.DynamoDB.GetItem
-import Network.AWS.DynamoDB.ListTables
-import Network.AWS.DynamoDB.PutItem
-import Network.AWS.DynamoDB.Query
-import Network.AWS.DynamoDB.Scan
-import Network.AWS.DynamoDB.Types
-import Network.AWS.DynamoDB.UpdateItem
-import Network.AWS.DynamoDB.UpdateTable
-import Network.AWS.DynamoDB.Waiters
+import           Network.AWS.DynamoDB.BatchGetItem
+import           Network.AWS.DynamoDB.BatchWriteItem
+import           Network.AWS.DynamoDB.CreateTable
+import           Network.AWS.DynamoDB.DeleteItem
+import           Network.AWS.DynamoDB.DeleteTable
+import           Network.AWS.DynamoDB.DescribeTable
+import           Network.AWS.DynamoDB.GetItem
+import           Network.AWS.DynamoDB.ListTables
+import           Network.AWS.DynamoDB.PutItem
+import           Network.AWS.DynamoDB.Query
+import           Network.AWS.DynamoDB.Scan
+import           Network.AWS.DynamoDB.Types
+import           Network.AWS.DynamoDB.UpdateItem
+import           Network.AWS.DynamoDB.UpdateTable
+import           Network.AWS.DynamoDB.Waiters
+
+{- $errors
+Error matchers are designed for use with the functions provided by
+<http://hackage.haskell.org/package/lens/docs/Control-Exception-Lens.html Control.Exception.Lens>.
+This allows catching (and rethrowing) service specific errors returned
+by 'DynamoDB'.
+-}
+
+{- $operations
+Some AWS operations return results that are incomplete and require subsequent
+requests in order to obtain the entire result set. The process of sending
+subsequent requests to continue where a previous request left off is called
+pagination. For example, the 'ListObjects' operation of Amazon S3 returns up to
+1000 objects at a time, and you must send subsequent requests with the
+appropriate Marker in order to retrieve the next page of results.
+
+Operations that have an 'AWSPager' instance can transparently perform subsequent
+requests, correctly setting Markers and other request facets to iterate through
+the entire result set of a truncated API operation. Operations which support
+this have an additional note in the documentation.
+
+Many operations have the ability to filter results on the server side. See the
+individual operation parameters for details.
+-}
+
+{- $waiters
+Waiters poll by repeatedly sending a request until some remote success condition
+configured by the 'Wait' specification is fulfilled. The 'Wait' specification
+determines how many attempts should be made, in addition to delay and retry strategies.
+-}
diff --git a/gen/Network/AWS/DynamoDB/BatchGetItem.hs b/gen/Network/AWS/DynamoDB/BatchGetItem.hs
--- a/gen/Network/AWS/DynamoDB/BatchGetItem.hs
+++ b/gen/Network/AWS/DynamoDB/BatchGetItem.hs
@@ -1,292 +1,336 @@
-{-# LANGUAGE DataKinds                   #-}
-{-# LANGUAGE DeriveGeneric               #-}
-{-# LANGUAGE FlexibleInstances           #-}
-{-# LANGUAGE GeneralizedNewtypeDeriving  #-}
-{-# LANGUAGE LambdaCase                  #-}
-{-# LANGUAGE NoImplicitPrelude           #-}
-{-# LANGUAGE OverloadedStrings           #-}
-{-# LANGUAGE RecordWildCards             #-}
-{-# LANGUAGE TypeFamilies                #-}
+{-# LANGUAGE DeriveDataTypeable #-}
+{-# LANGUAGE DeriveGeneric      #-}
+{-# LANGUAGE OverloadedStrings  #-}
+{-# LANGUAGE RecordWildCards    #-}
+{-# LANGUAGE TypeFamilies       #-}
 
 {-# OPTIONS_GHC -fno-warn-unused-imports #-}
+{-# OPTIONS_GHC -fno-warn-unused-binds   #-}
+{-# OPTIONS_GHC -fno-warn-unused-matches #-}
 
+-- Derived from AWS service descriptions, licensed under Apache 2.0.
+
+-- |
 -- Module      : Network.AWS.DynamoDB.BatchGetItem
--- Copyright   : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>
--- License     : This Source Code Form is subject to the terms of
---               the Mozilla Public License, v. 2.0.
---               A copy of the MPL can be found in the LICENSE file or
---               you can obtain it at http://mozilla.org/MPL/2.0/.
+-- Copyright   : (c) 2013-2015 Brendan Hay
+-- License     : Mozilla Public License, v. 2.0.
 -- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com>
--- Stability   : experimental
+-- Stability   : auto-generated
 -- Portability : non-portable (GHC extensions)
 --
--- Derived from AWS service descriptions, licensed under Apache 2.0.
-
--- | The /BatchGetItem/ operation returns the attributes of one or more items from
--- one or more tables. You identify requested items by primary key.
+-- The /BatchGetItem/ operation returns the attributes of one or more items
+-- from one or more tables. You identify requested items by primary key.
 --
--- A single operation can retrieve up to 16 MB of data, which can contain as
--- many as 100 items. /BatchGetItem/ will return a partial result if the response
--- size limit is exceeded, the table's provisioned throughput is exceeded, or an
--- internal processing failure occurs. If a partial result is returned, the
--- operation returns a value for /UnprocessedKeys/. You can use this value to
--- retry the operation starting with the next item to get.
+-- A single operation can retrieve up to 16 MB of data, which can contain
+-- as many as 100 items. /BatchGetItem/ will return a partial result if the
+-- response size limit is exceeded, the table\'s provisioned throughput is
+-- exceeded, or an internal processing failure occurs. If a partial result
+-- is returned, the operation returns a value for /UnprocessedKeys/. You
+-- can use this value to retry the operation starting with the next item to
+-- get.
 --
--- For example, if you ask to retrieve 100 items, but each individual item is
--- 300 KB in size, the system returns 52 items (so as not to exceed the 16 MB
--- limit). It also returns an appropriate /UnprocessedKeys/ value so you can get
--- the next page of results. If desired, your application can include its own
--- logic to assemble the pages of results into one data set.
+-- If you request more than 100 items /BatchGetItem/ will return a
+-- /ValidationException/ with the message \"Too many items requested for
+-- the BatchGetItem call\".
 --
+-- For example, if you ask to retrieve 100 items, but each individual item
+-- is 300 KB in size, the system returns 52 items (so as not to exceed the
+-- 16 MB limit). It also returns an appropriate /UnprocessedKeys/ value so
+-- you can get the next page of results. If desired, your application can
+-- include its own logic to assemble the pages of results into one data
+-- set.
+--
 -- If /none/ of the items can be processed due to insufficient provisioned
--- throughput on all of the tables in the request, then /BatchGetItem/ will return
--- a /ProvisionedThroughputExceededException/. If /at least one/ of the items is
--- successfully processed, then /BatchGetItem/ completes successfully, while
--- returning the keys of the unread items in /UnprocessedKeys/.
+-- throughput on all of the tables in the request, then /BatchGetItem/ will
+-- return a /ProvisionedThroughputExceededException/. If /at least one/ of
+-- the items is successfully processed, then /BatchGetItem/ completes
+-- successfully, while returning the keys of the unread items in
+-- /UnprocessedKeys/.
 --
 -- If DynamoDB returns any unprocessed items, you should retry the batch
--- operation on those items. However, /we strongly recommend that you use anexponential backoff algorithm/. If you retry the batch operation immediately,
--- the underlying read or write requests can still fail due to throttling on the
--- individual tables. If you delay the batch operation using exponential
--- backoff, the individual requests in the batch are much more likely to succeed.
+-- operation on those items. However, /we strongly recommend that you use
+-- an exponential backoff algorithm/. If you retry the batch operation
+-- immediately, the underlying read or write requests can still fail due to
+-- throttling on the individual tables. If you delay the batch operation
+-- using exponential backoff, the individual requests in the batch are much
+-- more likely to succeed.
 --
--- For more information, see <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ErrorHandling.html#BatchOperations Batch Operations and Error Handling> in the /AmazonDynamoDB Developer Guide/.
+-- For more information, see
+-- <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ErrorHandling.html#BatchOperations Batch Operations and Error Handling>
+-- in the /Amazon DynamoDB Developer Guide/.
 --
 -- By default, /BatchGetItem/ performs eventually consistent reads on every
--- table in the request. If you want strongly consistent reads instead, you can
--- set /ConsistentRead/ to 'true' for any or all tables.
+-- table in the request. If you want strongly consistent reads instead, you
+-- can set /ConsistentRead/ to 'true' for any or all tables.
 --
 -- In order to minimize response latency, /BatchGetItem/ retrieves items in
 -- parallel.
 --
--- When designing your application, keep in mind that DynamoDB does not return
--- attributes in any particular order. To help parse the response by item,
--- include the primary key values for the items in your request in the /AttributesToGet/ parameter.
+-- When designing your application, keep in mind that DynamoDB does not
+-- return attributes in any particular order. To help parse the response by
+-- item, include the primary key values for the items in your request in
+-- the /AttributesToGet/ parameter.
 --
 -- If a requested item does not exist, it is not returned in the result.
 -- Requests for nonexistent items consume the minimum read capacity units
--- according to the type of read. For more information, see <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithTables.html#CapacityUnitCalculations Capacity UnitsCalculations> in the /Amazon DynamoDB Developer Guide/.
+-- according to the type of read. For more information, see
+-- <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithTables.html#CapacityUnitCalculations Capacity Units Calculations>
+-- in the /Amazon DynamoDB Developer Guide/.
 --
--- <http://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_BatchGetItem.html>
+-- /See:/ <http://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_BatchGetItem.html AWS API Reference> for BatchGetItem.
 module Network.AWS.DynamoDB.BatchGetItem
     (
-    -- * Request
-      BatchGetItem
-    -- ** Request constructor
-    , batchGetItem
-    -- ** Request lenses
-    , bgiRequestItems
+    -- * Creating a Request
+      batchGetItem
+    , BatchGetItem
+    -- * Request Lenses
     , bgiReturnConsumedCapacity
+    , bgiRequestItems
 
-    -- * Response
-    , BatchGetItemResponse
-    -- ** Response constructor
+    -- * Destructuring the Response
     , batchGetItemResponse
-    -- ** Response lenses
-    , bgirConsumedCapacity
-    , bgirResponses
-    , bgirUnprocessedKeys
+    , BatchGetItemResponse
+    -- * Response Lenses
+    , bgirsUnprocessedKeys
+    , bgirsResponses
+    , bgirsConsumedCapacity
+    , bgirsStatus
     ) where
 
-import Network.AWS.Data (Object)
-import Network.AWS.Prelude
-import Network.AWS.Request.JSON
-import Network.AWS.DynamoDB.Types
-import qualified GHC.Exts
-
-data BatchGetItem = BatchGetItem
-    { _bgiRequestItems           :: Map Text KeysAndAttributes
-    , _bgiReturnConsumedCapacity :: Maybe ReturnConsumedCapacity
-    } deriving (Eq, Read, Show)
+import           Network.AWS.DynamoDB.Types
+import           Network.AWS.DynamoDB.Types.Product
+import           Network.AWS.Prelude
+import           Network.AWS.Request
+import           Network.AWS.Response
 
--- | 'BatchGetItem' constructor.
+-- | Represents the input of a /BatchGetItem/ operation.
 --
--- The fields accessible through corresponding lenses are:
+-- /See:/ 'batchGetItem' smart constructor.
+data BatchGetItem = BatchGetItem'
+    { _bgiReturnConsumedCapacity :: !(Maybe ReturnConsumedCapacity)
+    , _bgiRequestItems           :: !(Map Text KeysAndAttributes)
+    } deriving (Eq,Read,Show,Data,Typeable,Generic)
+
+-- | Creates a value of 'BatchGetItem' with the minimum fields required to make a request.
 --
--- * 'bgiRequestItems' @::@ 'HashMap' 'Text' 'KeysAndAttributes'
+-- Use one of the following lenses to modify other fields as desired:
 --
--- * 'bgiReturnConsumedCapacity' @::@ 'Maybe' 'ReturnConsumedCapacity'
+-- * 'bgiReturnConsumedCapacity'
 --
-batchGetItem :: BatchGetItem
-batchGetItem = BatchGetItem
-    { _bgiRequestItems           = mempty
-    , _bgiReturnConsumedCapacity = Nothing
+-- * 'bgiRequestItems'
+batchGetItem
+    :: BatchGetItem
+batchGetItem =
+    BatchGetItem'
+    { _bgiReturnConsumedCapacity = Nothing
+    , _bgiRequestItems = mempty
     }
 
--- | A map of one or more table names and, for each table, a map that describes
--- one or more items to retrieve from that table. Each table name can be used
--- only once per /BatchGetItem/ request.
+-- | Undocumented member.
+bgiReturnConsumedCapacity :: Lens' BatchGetItem (Maybe ReturnConsumedCapacity)
+bgiReturnConsumedCapacity = lens _bgiReturnConsumedCapacity (\ s a -> s{_bgiReturnConsumedCapacity = a});
+
+-- | A map of one or more table names and, for each table, a map that
+-- describes one or more items to retrieve from that table. Each table name
+-- can be used only once per /BatchGetItem/ request.
 --
 -- Each element in the map of items to retrieve consists of the following:
 --
--- /ConsistentRead/ - If 'true', a strongly consistent read is used; if 'false'
--- (the default), an eventually consistent read is used.
---
--- /ExpressionAttributeNames/ - One or more substitution tokens for attribute
--- names in the /ProjectionExpression/ parameter. The following are some use cases
--- for using /ExpressionAttributeNames/:
+-- -   /ConsistentRead/ - If 'true', a strongly consistent read is used; if
+--     'false' (the default), an eventually consistent read is used.
 --
--- To access an attribute whose name conflicts with a DynamoDB reserved word.
+-- -   /ExpressionAttributeNames/ - One or more substitution tokens for
+--     attribute names in the /ProjectionExpression/ parameter. The
+--     following are some use cases for using /ExpressionAttributeNames/:
 --
--- To create a placeholder for repeating occurrences of an attribute name in
--- an expression.
+--     -   To access an attribute whose name conflicts with a DynamoDB
+--         reserved word.
 --
--- To prevent special characters in an attribute name from being
--- misinterpreted in an expression.
+--     -   To create a placeholder for repeating occurrences of an
+--         attribute name in an expression.
 --
--- Use the # character in an expression to dereference an attribute name. For
--- example, consider the following attribute name:
+--     -   To prevent special characters in an attribute name from being
+--         misinterpreted in an expression.
 --
--- 'Percentile'
+--     Use the __#__ character in an expression to dereference an attribute
+--     name. For example, consider the following attribute name:
 --
--- The name of this attribute conflicts with a reserved word, so it cannot be
--- used directly in an expression. (For the complete list of reserved words, see <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ReservedWords.html Reserved Words> in the /Amazon DynamoDB Developer Guide/). To work around this,
--- you could specify the following for /ExpressionAttributeNames/:
+--     -   'Percentile'
 --
--- '{"#P":"Percentile"}'
+--     The name of this attribute conflicts with a reserved word, so it
+--     cannot be used directly in an expression. (For the complete list of
+--     reserved words, see
+--     <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ReservedWords.html Reserved Words>
+--     in the /Amazon DynamoDB Developer Guide/). To work around this, you
+--     could specify the following for /ExpressionAttributeNames/:
 --
--- You could then use this substitution in an expression, as in this example:
+--     -   '{\"#P\":\"Percentile\"}'
 --
--- '#P = :val'
+--     You could then use this substitution in an expression, as in this
+--     example:
 --
--- Tokens that begin with the : character are /expression attribute values/,
--- which are placeholders for the actual value at runtime.
+--     -   '#P = :val'
 --
--- For more information on expression attribute names, see <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.AccessingItemAttributes.html Accessing ItemAttributes> in the /Amazon DynamoDB Developer Guide/.
+--     Tokens that begin with the __:__ character are /expression attribute
+--     values/, which are placeholders for the actual value at runtime.
 --
--- /Keys/ - An array of primary key attribute values that define specific items
--- in the table. For each primary key, you must provide /all/ of the key
--- attributes. For example, with a hash type primary key, you only need to
--- provide the hash attribute. For a hash-and-range type primary key, you must
--- provide /both/ the hash attribute and the range attribute.
+--     For more information on expression attribute names, see
+--     <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.AccessingItemAttributes.html Accessing Item Attributes>
+--     in the /Amazon DynamoDB Developer Guide/.
 --
--- /ProjectionExpression/ - A string that identifies one or more attributes to
--- retrieve from the table. These attributes can include scalars, sets, or
--- elements of a JSON document. The attributes in the expression must be
--- separated by commas.
+-- -   /Keys/ - An array of primary key attribute values that define
+--     specific items in the table. For each primary key, you must provide
+--     /all/ of the key attributes. For example, with a hash type primary
+--     key, you only need to provide the hash attribute. For a
+--     hash-and-range type primary key, you must provide /both/ the hash
+--     attribute and the range attribute.
 --
--- If no attribute names are specified, then all attributes will be returned.
--- If any of the requested attributes are not found, they will not appear in the
--- result.
+-- -   /ProjectionExpression/ - A string that identifies one or more
+--     attributes to retrieve from the table. These attributes can include
+--     scalars, sets, or elements of a JSON document. The attributes in the
+--     expression must be separated by commas.
 --
--- For more information, see <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.AccessingItemAttributes.html Accessing Item Attributes> in the /Amazon DynamoDBDeveloper Guide/.
+--     If no attribute names are specified, then all attributes will be
+--     returned. If any of the requested attributes are not found, they
+--     will not appear in the result.
 --
--- /AttributesToGet/ -
+--     For more information, see
+--     <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.AccessingItemAttributes.html Accessing Item Attributes>
+--     in the /Amazon DynamoDB Developer Guide/.
 --
--- This is a legacy parameter, for backward compatibility. New applications
--- should use /ProjectionExpression/ instead. Do not combine legacy parameters and
--- expression parameters in a single API call; otherwise, DynamoDB will return a /ValidationException/ exception.
+-- -   /AttributesToGet/ -
 --
--- This parameter allows you to retrieve attributes of type List or Map;
--- however, it cannot retrieve individual elements within a List or a Map.
+--     This is a legacy parameter, for backward compatibility. New
+--     applications should use /ProjectionExpression/ instead. Do not
+--     combine legacy parameters and expression parameters in a single API
+--     call; otherwise, DynamoDB will return a /ValidationException/
+--     exception.
 --
--- The names of one or more attributes to retrieve. If no attribute names are
--- provided, then all attributes will be returned. If any of the requested
--- attributes are not found, they will not appear in the result.
+--     This parameter allows you to retrieve attributes of type List or
+--     Map; however, it cannot retrieve individual elements within a List
+--     or a Map.
 --
--- Note that /AttributesToGet/ has no effect on provisioned throughput
--- consumption. DynamoDB determines capacity units consumed based on item size,
--- not on the amount of data that is returned to an application.
+--     The names of one or more attributes to retrieve. If no attribute
+--     names are provided, then all attributes will be returned. If any of
+--     the requested attributes are not found, they will not appear in the
+--     result.
 --
+--     Note that /AttributesToGet/ has no effect on provisioned throughput
+--     consumption. DynamoDB determines capacity units consumed based on
+--     item size, not on the amount of data that is returned to an
+--     application.
 --
 bgiRequestItems :: Lens' BatchGetItem (HashMap Text KeysAndAttributes)
-bgiRequestItems = lens _bgiRequestItems (\s a -> s { _bgiRequestItems = a }) . _Map
+bgiRequestItems = lens _bgiRequestItems (\ s a -> s{_bgiRequestItems = a}) . _Map;
 
-bgiReturnConsumedCapacity :: Lens' BatchGetItem (Maybe ReturnConsumedCapacity)
-bgiReturnConsumedCapacity =
-    lens _bgiReturnConsumedCapacity
-        (\s a -> s { _bgiReturnConsumedCapacity = a })
+instance AWSRequest BatchGetItem where
+        type Sv BatchGetItem = DynamoDB
+        type Rs BatchGetItem = BatchGetItemResponse
+        request = postJSON
+        response
+          = receiveJSON
+              (\ s h x ->
+                 BatchGetItemResponse' <$>
+                   (x .?> "UnprocessedKeys" .!@ mempty) <*>
+                     (x .?> "Responses" .!@ mempty)
+                     <*> (x .?> "ConsumedCapacity" .!@ mempty)
+                     <*> (pure (fromEnum s)))
 
-data BatchGetItemResponse = BatchGetItemResponse
-    { _bgirConsumedCapacity :: List "ConsumedCapacity" ConsumedCapacity
-    , _bgirResponses        :: Map Text (List "Responses" (Map Text AttributeValue))
-    , _bgirUnprocessedKeys  :: Map Text KeysAndAttributes
-    } deriving (Eq, Read, Show)
+instance ToHeaders BatchGetItem where
+        toHeaders
+          = const
+              (mconcat
+                 ["X-Amz-Target" =#
+                    ("DynamoDB_20120810.BatchGetItem" :: ByteString),
+                  "Content-Type" =#
+                    ("application/x-amz-json-1.0" :: ByteString)])
 
--- | 'BatchGetItemResponse' constructor.
+instance ToJSON BatchGetItem where
+        toJSON BatchGetItem'{..}
+          = object
+              ["ReturnConsumedCapacity" .=
+                 _bgiReturnConsumedCapacity,
+               "RequestItems" .= _bgiRequestItems]
+
+instance ToPath BatchGetItem where
+        toPath = const "/"
+
+instance ToQuery BatchGetItem where
+        toQuery = const mempty
+
+-- | Represents the output of a /BatchGetItem/ operation.
 --
--- The fields accessible through corresponding lenses are:
+-- /See:/ 'batchGetItemResponse' smart constructor.
+data BatchGetItemResponse = BatchGetItemResponse'
+    { _bgirsUnprocessedKeys  :: !(Maybe (Map Text KeysAndAttributes))
+    , _bgirsResponses        :: !(Maybe (Map Text [Map Text AttributeValue]))
+    , _bgirsConsumedCapacity :: !(Maybe [ConsumedCapacity])
+    , _bgirsStatus           :: !Int
+    } deriving (Eq,Read,Show,Data,Typeable,Generic)
+
+-- | Creates a value of 'BatchGetItemResponse' with the minimum fields required to make a request.
 --
--- * 'bgirConsumedCapacity' @::@ ['ConsumedCapacity']
+-- Use one of the following lenses to modify other fields as desired:
 --
--- * 'bgirResponses' @::@ 'HashMap' 'Text' ['HashMap' 'Text' 'AttributeValue']
+-- * 'bgirsUnprocessedKeys'
 --
--- * 'bgirUnprocessedKeys' @::@ 'HashMap' 'Text' 'KeysAndAttributes'
+-- * 'bgirsResponses'
 --
-batchGetItemResponse :: BatchGetItemResponse
-batchGetItemResponse = BatchGetItemResponse
-    { _bgirResponses        = mempty
-    , _bgirUnprocessedKeys  = mempty
-    , _bgirConsumedCapacity = mempty
+-- * 'bgirsConsumedCapacity'
+--
+-- * 'bgirsStatus'
+batchGetItemResponse
+    :: Int -- ^ 'bgirsStatus'
+    -> BatchGetItemResponse
+batchGetItemResponse pStatus_ =
+    BatchGetItemResponse'
+    { _bgirsUnprocessedKeys = Nothing
+    , _bgirsResponses = Nothing
+    , _bgirsConsumedCapacity = Nothing
+    , _bgirsStatus = pStatus_
     }
 
--- | The read capacity units consumed by the operation.
+-- | A map of tables and their respective keys that were not processed with
+-- the current response. The /UnprocessedKeys/ value is in the same form as
+-- /RequestItems/, so the value can be provided directly to a subsequent
+-- /BatchGetItem/ operation. For more information, see /RequestItems/ in
+-- the Request Parameters section.
 --
 -- Each element consists of:
 --
--- /TableName/ - The table that consumed the provisioned throughput.
+-- -   /Keys/ - An array of primary key attribute values that define
+--     specific items in the table.
 --
--- /CapacityUnits/ - The total number of capacity units consumed.
+-- -   /AttributesToGet/ - One or more attributes to be retrieved from the
+--     table or index. By default, all attributes are returned. If a
+--     requested attribute is not found, it does not appear in the result.
 --
+-- -   /ConsistentRead/ - The consistency of a read operation. If set to
+--     'true', then a strongly consistent read is used; otherwise, an
+--     eventually consistent read is used.
 --
-bgirConsumedCapacity :: Lens' BatchGetItemResponse [ConsumedCapacity]
-bgirConsumedCapacity =
-    lens _bgirConsumedCapacity (\s a -> s { _bgirConsumedCapacity = a })
-        . _List
+-- If there are no unprocessed keys remaining, the response contains an
+-- empty /UnprocessedKeys/ map.
+bgirsUnprocessedKeys :: Lens' BatchGetItemResponse (HashMap Text KeysAndAttributes)
+bgirsUnprocessedKeys = lens _bgirsUnprocessedKeys (\ s a -> s{_bgirsUnprocessedKeys = a}) . _Default . _Map;
 
--- | A map of table name to a list of items. Each object in /Responses/ consists of
--- a table name, along with a map of attribute data consisting of the data type
--- and attribute value.
-bgirResponses :: Lens' BatchGetItemResponse (HashMap Text [HashMap Text AttributeValue])
-bgirResponses = lens _bgirResponses (\s a -> s { _bgirResponses = a }) . _Map
+-- | A map of table name to a list of items. Each object in /Responses/
+-- consists of a table name, along with a map of attribute data consisting
+-- of the data type and attribute value.
+bgirsResponses :: Lens' BatchGetItemResponse (HashMap Text [HashMap Text AttributeValue])
+bgirsResponses = lens _bgirsResponses (\ s a -> s{_bgirsResponses = a}) . _Default . _Map;
 
--- | A map of tables and their respective keys that were not processed with the
--- current response. The /UnprocessedKeys/ value is in the same form as /RequestItems/, so the value can be provided directly to a subsequent /BatchGetItem/
--- operation. For more information, see /RequestItems/ in the Request Parameters
--- section.
+-- | The read capacity units consumed by the operation.
 --
 -- Each element consists of:
 --
--- /Keys/ - An array of primary key attribute values that define specific items
--- in the table.
---
--- /AttributesToGet/ - One or more attributes to be retrieved from the table or
--- index. By default, all attributes are returned. If a requested attribute is
--- not found, it does not appear in the result.
+-- -   /TableName/ - The table that consumed the provisioned throughput.
 --
--- /ConsistentRead/ - The consistency of a read operation. If set to 'true', then
--- a strongly consistent read is used; otherwise, an eventually consistent read
--- is used.
+-- -   /CapacityUnits/ - The total number of capacity units consumed.
 --
--- If there are no unprocessed keys remaining, the response contains an empty /UnprocessedKeys/ map.
-bgirUnprocessedKeys :: Lens' BatchGetItemResponse (HashMap Text KeysAndAttributes)
-bgirUnprocessedKeys =
-    lens _bgirUnprocessedKeys (\s a -> s { _bgirUnprocessedKeys = a })
-        . _Map
-
-instance ToPath BatchGetItem where
-    toPath = const "/"
-
-instance ToQuery BatchGetItem where
-    toQuery = const mempty
-
-instance ToHeaders BatchGetItem
-
-instance ToJSON BatchGetItem where
-    toJSON BatchGetItem{..} = object
-        [ "RequestItems"           .= _bgiRequestItems
-        , "ReturnConsumedCapacity" .= _bgiReturnConsumedCapacity
-        ]
-
-instance AWSRequest BatchGetItem where
-    type Sv BatchGetItem = DynamoDB
-    type Rs BatchGetItem = BatchGetItemResponse
-
-    request  = post "BatchGetItem"
-    response = jsonResponse
+bgirsConsumedCapacity :: Lens' BatchGetItemResponse [ConsumedCapacity]
+bgirsConsumedCapacity = lens _bgirsConsumedCapacity (\ s a -> s{_bgirsConsumedCapacity = a}) . _Default . _Coerce;
 
-instance FromJSON BatchGetItemResponse where
-    parseJSON = withObject "BatchGetItemResponse" $ \o -> BatchGetItemResponse
-        <$> o .:? "ConsumedCapacity" .!= mempty
-        <*> o .:? "Responses" .!= mempty
-        <*> o .:? "UnprocessedKeys" .!= mempty
+-- | The response status code.
+bgirsStatus :: Lens' BatchGetItemResponse Int
+bgirsStatus = lens _bgirsStatus (\ s a -> s{_bgirsStatus = a});
diff --git a/gen/Network/AWS/DynamoDB/BatchWriteItem.hs b/gen/Network/AWS/DynamoDB/BatchWriteItem.hs
--- a/gen/Network/AWS/DynamoDB/BatchWriteItem.hs
+++ b/gen/Network/AWS/DynamoDB/BatchWriteItem.hs
@@ -1,309 +1,337 @@
-{-# LANGUAGE DataKinds                   #-}
-{-# LANGUAGE DeriveGeneric               #-}
-{-# LANGUAGE FlexibleInstances           #-}
-{-# LANGUAGE GeneralizedNewtypeDeriving  #-}
-{-# LANGUAGE LambdaCase                  #-}
-{-# LANGUAGE NoImplicitPrelude           #-}
-{-# LANGUAGE OverloadedStrings           #-}
-{-# LANGUAGE RecordWildCards             #-}
-{-# LANGUAGE TypeFamilies                #-}
+{-# LANGUAGE DeriveDataTypeable #-}
+{-# LANGUAGE DeriveGeneric      #-}
+{-# LANGUAGE OverloadedStrings  #-}
+{-# LANGUAGE RecordWildCards    #-}
+{-# LANGUAGE TypeFamilies       #-}
 
 {-# OPTIONS_GHC -fno-warn-unused-imports #-}
+{-# OPTIONS_GHC -fno-warn-unused-binds   #-}
+{-# OPTIONS_GHC -fno-warn-unused-matches #-}
 
+-- Derived from AWS service descriptions, licensed under Apache 2.0.
+
+-- |
 -- Module      : Network.AWS.DynamoDB.BatchWriteItem
--- Copyright   : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>
--- License     : This Source Code Form is subject to the terms of
---               the Mozilla Public License, v. 2.0.
---               A copy of the MPL can be found in the LICENSE file or
---               you can obtain it at http://mozilla.org/MPL/2.0/.
+-- Copyright   : (c) 2013-2015 Brendan Hay
+-- License     : Mozilla Public License, v. 2.0.
 -- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com>
--- Stability   : experimental
+-- Stability   : auto-generated
 -- Portability : non-portable (GHC extensions)
 --
--- Derived from AWS service descriptions, licensed under Apache 2.0.
-
--- | The /BatchWriteItem/ operation puts or deletes multiple items in one or more
--- tables. A single call to /BatchWriteItem/ can write up to 16 MB of data, which
--- can comprise as many as 25 put or delete requests. Individual items to be
--- written can be as large as 400 KB.
+-- The /BatchWriteItem/ operation puts or deletes multiple items in one or
+-- more tables. A single call to /BatchWriteItem/ can write up to 16 MB of
+-- data, which can comprise as many as 25 put or delete requests.
+-- Individual items to be written can be as large as 400 KB.
 --
--- /BatchWriteItem/ cannot update items. To update items, use the /UpdateItem/ API.
+-- /BatchWriteItem/ cannot update items. To update items, use the
+-- /UpdateItem/ API.
 --
--- The individual /PutItem/ and /DeleteItem/ operations specified in /BatchWriteItem/
--- are atomic; however /BatchWriteItem/ as a whole is not. If any requested
--- operations fail because the table's provisioned throughput is exceeded or an
--- internal processing failure occurs, the failed operations are returned in the /UnprocessedItems/ response parameter. You can investigate and optionally
--- resend the requests. Typically, you would call /BatchWriteItem/ in a loop. Each
--- iteration would check for unprocessed items and submit a new /BatchWriteItem/
--- request with those unprocessed items until all items have been processed.
+-- The individual /PutItem/ and /DeleteItem/ operations specified in
+-- /BatchWriteItem/ are atomic; however /BatchWriteItem/ as a whole is not.
+-- If any requested operations fail because the table\'s provisioned
+-- throughput is exceeded or an internal processing failure occurs, the
+-- failed operations are returned in the /UnprocessedItems/ response
+-- parameter. You can investigate and optionally resend the requests.
+-- Typically, you would call /BatchWriteItem/ in a loop. Each iteration
+-- would check for unprocessed items and submit a new /BatchWriteItem/
+-- request with those unprocessed items until all items have been
+-- processed.
 --
 -- Note that if /none/ of the items can be processed due to insufficient
--- provisioned throughput on all of the tables in the request, then /BatchWriteItem/ will return a /ProvisionedThroughputExceededException/.
+-- provisioned throughput on all of the tables in the request, then
+-- /BatchWriteItem/ will return a /ProvisionedThroughputExceededException/.
 --
 -- If DynamoDB returns any unprocessed items, you should retry the batch
--- operation on those items. However, /we strongly recommend that you use anexponential backoff algorithm/. If you retry the batch operation immediately,
--- the underlying read or write requests can still fail due to throttling on the
--- individual tables. If you delay the batch operation using exponential
--- backoff, the individual requests in the batch are much more likely to succeed.
+-- operation on those items. However, /we strongly recommend that you use
+-- an exponential backoff algorithm/. If you retry the batch operation
+-- immediately, the underlying read or write requests can still fail due to
+-- throttling on the individual tables. If you delay the batch operation
+-- using exponential backoff, the individual requests in the batch are much
+-- more likely to succeed.
 --
--- For more information, see <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ErrorHandling.html#BatchOperations Batch Operations and Error Handling> in the /AmazonDynamoDB Developer Guide/.
+-- For more information, see
+-- <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ErrorHandling.html#BatchOperations Batch Operations and Error Handling>
+-- in the /Amazon DynamoDB Developer Guide/.
 --
--- With /BatchWriteItem/, you can efficiently write or delete large amounts of
--- data, such as from Amazon Elastic MapReduce (EMR), or copy data from another
--- database into DynamoDB. In order to improve performance with these
--- large-scale operations, /BatchWriteItem/ does not behave in the same way as
--- individual /PutItem/ and /DeleteItem/ calls would. For example, you cannot
--- specify conditions on individual put and delete requests, and /BatchWriteItem/
--- does not return deleted items in the response.
+-- With /BatchWriteItem/, you can efficiently write or delete large amounts
+-- of data, such as from Amazon Elastic MapReduce (EMR), or copy data from
+-- another database into DynamoDB. In order to improve performance with
+-- these large-scale operations, /BatchWriteItem/ does not behave in the
+-- same way as individual /PutItem/ and /DeleteItem/ calls would. For
+-- example, you cannot specify conditions on individual put and delete
+-- requests, and /BatchWriteItem/ does not return deleted items in the
+-- response.
 --
--- If you use a programming language that supports concurrency, such as Java,
--- you can use threads to write items in parallel. Your application must include
--- the necessary logic to manage the threads. With languages that don't support
--- threading, such as PHP, you must update or delete the specified items one at
--- a time. In both situations, /BatchWriteItem/ provides an alternative where the
--- API performs the specified put and delete operations in parallel, giving you
--- the power of the thread pool approach without having to introduce complexity
--- into your application.
+-- If you use a programming language that supports concurrency, you can use
+-- threads to write items in parallel. Your application must include the
+-- necessary logic to manage the threads. With languages that don\'t
+-- support threading, you must update or delete the specified items one at
+-- a time. In both situations, /BatchWriteItem/ provides an alternative
+-- where the API performs the specified put and delete operations in
+-- parallel, giving you the power of the thread pool approach without
+-- having to introduce complexity into your application.
 --
 -- Parallel processing reduces latency, but each specified put and delete
 -- request consumes the same number of write capacity units whether it is
--- processed in parallel or not. Delete operations on nonexistent items consume
--- one write capacity unit.
---
--- If one or more of the following is true, DynamoDB rejects the entire batch
--- write operation:
+-- processed in parallel or not. Delete operations on nonexistent items
+-- consume one write capacity unit.
 --
--- One or more tables specified in the /BatchWriteItem/ request does not exist.
+-- If one or more of the following is true, DynamoDB rejects the entire
+-- batch write operation:
 --
--- Primary key attributes specified on an item in the request do not match
--- those in the corresponding table's primary key schema.
+-- -   One or more tables specified in the /BatchWriteItem/ request does
+--     not exist.
 --
--- You try to perform multiple operations on the same item in the same /BatchWriteItem/ request. For example, you cannot put and delete the same item in the same /BatchWriteItem/ request.
+-- -   Primary key attributes specified on an item in the request do not
+--     match those in the corresponding table\'s primary key schema.
 --
--- There are more than 25 requests in the batch.
+-- -   You try to perform multiple operations on the same item in the same
+--     /BatchWriteItem/ request. For example, you cannot put and delete the
+--     same item in the same /BatchWriteItem/ request.
 --
--- Any individual item in a batch exceeds 400 KB.
+-- -   There are more than 25 requests in the batch.
 --
--- The total request size exceeds 16 MB.
+-- -   Any individual item in a batch exceeds 400 KB.
 --
+-- -   The total request size exceeds 16 MB.
 --
 --
--- <http://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_BatchWriteItem.html>
+-- /See:/ <http://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_BatchWriteItem.html AWS API Reference> for BatchWriteItem.
 module Network.AWS.DynamoDB.BatchWriteItem
     (
-    -- * Request
-      BatchWriteItem
-    -- ** Request constructor
-    , batchWriteItem
-    -- ** Request lenses
-    , bwiRequestItems
+    -- * Creating a Request
+      batchWriteItem
+    , BatchWriteItem
+    -- * Request Lenses
     , bwiReturnConsumedCapacity
     , bwiReturnItemCollectionMetrics
+    , bwiRequestItems
 
-    -- * Response
-    , BatchWriteItemResponse
-    -- ** Response constructor
+    -- * Destructuring the Response
     , batchWriteItemResponse
-    -- ** Response lenses
-    , bwirConsumedCapacity
-    , bwirItemCollectionMetrics
-    , bwirUnprocessedItems
+    , BatchWriteItemResponse
+    -- * Response Lenses
+    , bwirsConsumedCapacity
+    , bwirsItemCollectionMetrics
+    , bwirsUnprocessedItems
+    , bwirsStatus
     ) where
 
-import Network.AWS.Data (Object)
-import Network.AWS.Prelude
-import Network.AWS.Request.JSON
-import Network.AWS.DynamoDB.Types
-import qualified GHC.Exts
-
-data BatchWriteItem = BatchWriteItem
-    { _bwiRequestItems                :: Map Text (List1 "RequestItems" WriteRequest)
-    , _bwiReturnConsumedCapacity      :: Maybe ReturnConsumedCapacity
-    , _bwiReturnItemCollectionMetrics :: Maybe ReturnItemCollectionMetrics
-    } deriving (Eq, Read, Show)
+import           Network.AWS.DynamoDB.Types
+import           Network.AWS.DynamoDB.Types.Product
+import           Network.AWS.Prelude
+import           Network.AWS.Request
+import           Network.AWS.Response
 
--- | 'BatchWriteItem' constructor.
+-- | Represents the input of a /BatchWriteItem/ operation.
 --
--- The fields accessible through corresponding lenses are:
+-- /See:/ 'batchWriteItem' smart constructor.
+data BatchWriteItem = BatchWriteItem'
+    { _bwiReturnConsumedCapacity      :: !(Maybe ReturnConsumedCapacity)
+    , _bwiReturnItemCollectionMetrics :: !(Maybe ReturnItemCollectionMetrics)
+    , _bwiRequestItems                :: !(Map Text (List1 WriteRequest))
+    } deriving (Eq,Read,Show,Data,Typeable,Generic)
+
+-- | Creates a value of 'BatchWriteItem' with the minimum fields required to make a request.
 --
--- * 'bwiRequestItems' @::@ 'HashMap' 'Text' ('NonEmpty' 'WriteRequest')
+-- Use one of the following lenses to modify other fields as desired:
 --
--- * 'bwiReturnConsumedCapacity' @::@ 'Maybe' 'ReturnConsumedCapacity'
+-- * 'bwiReturnConsumedCapacity'
 --
--- * 'bwiReturnItemCollectionMetrics' @::@ 'Maybe' 'ReturnItemCollectionMetrics'
+-- * 'bwiReturnItemCollectionMetrics'
 --
-batchWriteItem :: BatchWriteItem
-batchWriteItem = BatchWriteItem
-    { _bwiRequestItems                = mempty
-    , _bwiReturnConsumedCapacity      = Nothing
+-- * 'bwiRequestItems'
+batchWriteItem
+    :: BatchWriteItem
+batchWriteItem =
+    BatchWriteItem'
+    { _bwiReturnConsumedCapacity = Nothing
     , _bwiReturnItemCollectionMetrics = Nothing
+    , _bwiRequestItems = mempty
     }
 
--- | A map of one or more table names and, for each table, a list of operations to
--- be performed (/DeleteRequest/ or /PutRequest/). Each element in the map consists
--- of the following:
---
--- /DeleteRequest/ - Perform a /DeleteItem/ operation on the specified item. The
--- item to be deleted is identified by a /Key/ subelement:
+-- | Undocumented member.
+bwiReturnConsumedCapacity :: Lens' BatchWriteItem (Maybe ReturnConsumedCapacity)
+bwiReturnConsumedCapacity = lens _bwiReturnConsumedCapacity (\ s a -> s{_bwiReturnConsumedCapacity = a});
+
+-- | Determines whether item collection metrics are returned. If set to
+-- 'SIZE', the response includes statistics about item collections, if any,
+-- that were modified during the operation are returned in the response. If
+-- set to 'NONE' (the default), no statistics are returned.
+bwiReturnItemCollectionMetrics :: Lens' BatchWriteItem (Maybe ReturnItemCollectionMetrics)
+bwiReturnItemCollectionMetrics = lens _bwiReturnItemCollectionMetrics (\ s a -> s{_bwiReturnItemCollectionMetrics = a});
+
+-- | A map of one or more table names and, for each table, a list of
+-- operations to be performed (/DeleteRequest/ or /PutRequest/). Each
+-- element in the map consists of the following:
 --
--- /Key/ - A map of primary key attribute values that uniquely identify the !
--- item. Each entry in this map consists of an attribute name and an attribute
--- value. For each primary key, you must provide /all/ of the key attributes. For
--- example, with a hash type primary key, you only need to provide the hash
--- attribute. For a hash-and-range type primary key, you must provide /both/ the
--- hash attribute and the range attribute.
+-- -   /DeleteRequest/ - Perform a /DeleteItem/ operation on the specified
+--     item. The item to be deleted is identified by a /Key/ subelement:
 --
--- /PutRequest/ - Perform a /PutItem/ operation on the specified item. The item
--- to be put is identified by an /Item/ subelement:
+--     -   /Key/ - A map of primary key attribute values that uniquely
+--         identify the ! item. Each entry in this map consists of an
+--         attribute name and an attribute value. For each primary key, you
+--         must provide /all/ of the key attributes. For example, with a
+--         hash type primary key, you only need to provide the hash
+--         attribute. For a hash-and-range type primary key, you must
+--         provide /both/ the hash attribute and the range attribute.
 --
--- /Item/ - A map of attributes and their values. Each entry in this map
--- consists of an attribute name and an attribute value. Attribute values must
--- not be null; string and binary type attributes must have lengths greater than
--- zero; and set type attributes must not be empty. Requests that contain empty
--- values will be rejected with a /ValidationException/ exception.
+-- -   /PutRequest/ - Perform a /PutItem/ operation on the specified item.
+--     The item to be put is identified by an /Item/ subelement:
 --
--- If you specify any attributes that are part of an index key, then the data
--- types for those attributes must match those of the schema in the table's
--- attribute definition.
+--     -   /Item/ - A map of attributes and their values. Each entry in
+--         this map consists of an attribute name and an attribute value.
+--         Attribute values must not be null; string and binary type
+--         attributes must have lengths greater than zero; and set type
+--         attributes must not be empty. Requests that contain empty values
+--         will be rejected with a /ValidationException/ exception.
 --
+--         If you specify any attributes that are part of an index key,
+--         then the data types for those attributes must match those of the
+--         schema in the table\'s attribute definition.
 --
 bwiRequestItems :: Lens' BatchWriteItem (HashMap Text (NonEmpty WriteRequest))
-bwiRequestItems = lens _bwiRequestItems (\s a -> s { _bwiRequestItems = a }) . _Map
+bwiRequestItems = lens _bwiRequestItems (\ s a -> s{_bwiRequestItems = a}) . _Map;
 
-bwiReturnConsumedCapacity :: Lens' BatchWriteItem (Maybe ReturnConsumedCapacity)
-bwiReturnConsumedCapacity =
-    lens _bwiReturnConsumedCapacity
-        (\s a -> s { _bwiReturnConsumedCapacity = a })
+instance AWSRequest BatchWriteItem where
+        type Sv BatchWriteItem = DynamoDB
+        type Rs BatchWriteItem = BatchWriteItemResponse
+        request = postJSON
+        response
+          = receiveJSON
+              (\ s h x ->
+                 BatchWriteItemResponse' <$>
+                   (x .?> "ConsumedCapacity" .!@ mempty) <*>
+                     (x .?> "ItemCollectionMetrics" .!@ mempty)
+                     <*> (x .?> "UnprocessedItems" .!@ mempty)
+                     <*> (pure (fromEnum s)))
 
--- | A value that if set to 'SIZE', the response includes statistics about item
--- collections, if any, that were modified during the operation are returned in
--- the response. If set to 'NONE' (the default), no statistics are returned.
-bwiReturnItemCollectionMetrics :: Lens' BatchWriteItem (Maybe ReturnItemCollectionMetrics)
-bwiReturnItemCollectionMetrics =
-    lens _bwiReturnItemCollectionMetrics
-        (\s a -> s { _bwiReturnItemCollectionMetrics = a })
+instance ToHeaders BatchWriteItem where
+        toHeaders
+          = const
+              (mconcat
+                 ["X-Amz-Target" =#
+                    ("DynamoDB_20120810.BatchWriteItem" :: ByteString),
+                  "Content-Type" =#
+                    ("application/x-amz-json-1.0" :: ByteString)])
 
-data BatchWriteItemResponse = BatchWriteItemResponse
-    { _bwirConsumedCapacity      :: List "ConsumedCapacity" ConsumedCapacity
-    , _bwirItemCollectionMetrics :: Map Text (List "ItemCollectionMetrics" ItemCollectionMetrics)
-    , _bwirUnprocessedItems      :: Map Text (List1 "UnprocessedItems" WriteRequest)
-    } deriving (Eq, Read, Show)
+instance ToJSON BatchWriteItem where
+        toJSON BatchWriteItem'{..}
+          = object
+              ["ReturnConsumedCapacity" .=
+                 _bwiReturnConsumedCapacity,
+               "ReturnItemCollectionMetrics" .=
+                 _bwiReturnItemCollectionMetrics,
+               "RequestItems" .= _bwiRequestItems]
 
--- | 'BatchWriteItemResponse' constructor.
+instance ToPath BatchWriteItem where
+        toPath = const "/"
+
+instance ToQuery BatchWriteItem where
+        toQuery = const mempty
+
+-- | Represents the output of a /BatchWriteItem/ operation.
 --
--- The fields accessible through corresponding lenses are:
+-- /See:/ 'batchWriteItemResponse' smart constructor.
+data BatchWriteItemResponse = BatchWriteItemResponse'
+    { _bwirsConsumedCapacity      :: !(Maybe [ConsumedCapacity])
+    , _bwirsItemCollectionMetrics :: !(Maybe (Map Text [ItemCollectionMetrics]))
+    , _bwirsUnprocessedItems      :: !(Maybe (Map Text (List1 WriteRequest)))
+    , _bwirsStatus                :: !Int
+    } deriving (Eq,Read,Show,Data,Typeable,Generic)
+
+-- | Creates a value of 'BatchWriteItemResponse' with the minimum fields required to make a request.
 --
--- * 'bwirConsumedCapacity' @::@ ['ConsumedCapacity']
+-- Use one of the following lenses to modify other fields as desired:
 --
--- * 'bwirItemCollectionMetrics' @::@ 'HashMap' 'Text' ['ItemCollectionMetrics']
+-- * 'bwirsConsumedCapacity'
 --
--- * 'bwirUnprocessedItems' @::@ 'HashMap' 'Text' ('NonEmpty' 'WriteRequest')
+-- * 'bwirsItemCollectionMetrics'
 --
-batchWriteItemResponse :: BatchWriteItemResponse
-batchWriteItemResponse = BatchWriteItemResponse
-    { _bwirUnprocessedItems      = mempty
-    , _bwirItemCollectionMetrics = mempty
-    , _bwirConsumedCapacity      = mempty
+-- * 'bwirsUnprocessedItems'
+--
+-- * 'bwirsStatus'
+batchWriteItemResponse
+    :: Int -- ^ 'bwirsStatus'
+    -> BatchWriteItemResponse
+batchWriteItemResponse pStatus_ =
+    BatchWriteItemResponse'
+    { _bwirsConsumedCapacity = Nothing
+    , _bwirsItemCollectionMetrics = Nothing
+    , _bwirsUnprocessedItems = Nothing
+    , _bwirsStatus = pStatus_
     }
 
 -- | The capacity units consumed by the operation.
 --
 -- Each element consists of:
 --
--- /TableName/ - The table that consumed the provisioned throughput.
---
--- /CapacityUnits/ - The total number of capacity units consumed.
+-- -   /TableName/ - The table that consumed the provisioned throughput.
 --
+-- -   /CapacityUnits/ - The total number of capacity units consumed.
 --
-bwirConsumedCapacity :: Lens' BatchWriteItemResponse [ConsumedCapacity]
-bwirConsumedCapacity =
-    lens _bwirConsumedCapacity (\s a -> s { _bwirConsumedCapacity = a })
-        . _List
+bwirsConsumedCapacity :: Lens' BatchWriteItemResponse [ConsumedCapacity]
+bwirsConsumedCapacity = lens _bwirsConsumedCapacity (\ s a -> s{_bwirsConsumedCapacity = a}) . _Default . _Coerce;
 
--- | A list of tables that were processed by /BatchWriteItem/ and, for each table,
--- information about any item collections that were affected by individual /DeleteItem/ or /PutItem/ operations.
+-- | A list of tables that were processed by /BatchWriteItem/ and, for each
+-- table, information about any item collections that were affected by
+-- individual /DeleteItem/ or /PutItem/ operations.
 --
 -- Each entry consists of the following subelements:
 --
--- /ItemCollectionKey/ - The hash key value of the item collection. This is the
--- same as the hash key of the item.
---
--- /SizeEstimateRange/ - An estimate of item collection size, expressed in GB.
--- This is a two-element array containing a lower bound and an upper bound for
--- the estimate. The estimate includes the size of all the items in the table,
--- plus the size of all attributes projected into all of the local secondary
--- indexes on the table. Use this estimate to measure whether a local secondary
--- index is approaching its size limit.
+-- -   /ItemCollectionKey/ - The hash key value of the item collection.
+--     This is the same as the hash key of the item.
 --
--- The estimate is subject to change over time; therefore, do not rely on the
--- precision or accuracy of the estimate.
+-- -   /SizeEstimateRange/ - An estimate of item collection size, expressed
+--     in GB. This is a two-element array containing a lower bound and an
+--     upper bound for the estimate. The estimate includes the size of all
+--     the items in the table, plus the size of all attributes projected
+--     into all of the local secondary indexes on the table. Use this
+--     estimate to measure whether a local secondary index is approaching
+--     its size limit.
 --
+--     The estimate is subject to change over time; therefore, do not rely
+--     on the precision or accuracy of the estimate.
 --
-bwirItemCollectionMetrics :: Lens' BatchWriteItemResponse (HashMap Text [ItemCollectionMetrics])
-bwirItemCollectionMetrics =
-    lens _bwirItemCollectionMetrics
-        (\s a -> s { _bwirItemCollectionMetrics = a })
-            . _Map
+bwirsItemCollectionMetrics :: Lens' BatchWriteItemResponse (HashMap Text [ItemCollectionMetrics])
+bwirsItemCollectionMetrics = lens _bwirsItemCollectionMetrics (\ s a -> s{_bwirsItemCollectionMetrics = a}) . _Default . _Map;
 
--- | A map of tables and requests against those tables that were not processed.
--- The /UnprocessedItems/ value is in the same form as /RequestItems/, so you can
--- provide this value directly to a subsequent /BatchGetItem/ operation. For more
--- information, see /RequestItems/ in the Request Parameters section.
+-- | A map of tables and requests against those tables that were not
+-- processed. The /UnprocessedItems/ value is in the same form as
+-- /RequestItems/, so you can provide this value directly to a subsequent
+-- /BatchGetItem/ operation. For more information, see /RequestItems/ in
+-- the Request Parameters section.
 --
--- Each /UnprocessedItems/ entry consists of a table name and, for that table, a
--- list of operations to perform (/DeleteRequest/ or /PutRequest/).
+-- Each /UnprocessedItems/ entry consists of a table name and, for that
+-- table, a list of operations to perform (/DeleteRequest/ or
+-- /PutRequest/).
 --
--- /DeleteRequest/ - Perform a /DeleteItem/ operation on the specified item. The
--- item to be deleted is identified by a /Key/ subelement:
+-- -   /DeleteRequest/ - Perform a /DeleteItem/ operation on the specified
+--     item. The item to be deleted is identified by a /Key/ subelement:
 --
--- /Key/ - A map of primary key attribute values that uniquely identify the
--- item. Each entry in this map consists of an attribute name and an attribute
--- value.
+--     -   /Key/ - A map of primary key attribute values that uniquely
+--         identify the item. Each entry in this map consists of an
+--         attribute name and an attribute value.
 --
--- /PutRequest/ - Perform a /PutItem/ operation on the specified item. The item
--- to be put is identified by an /Item/ subelement:
+-- -   /PutRequest/ - Perform a /PutItem/ operation on the specified item.
+--     The item to be put is identified by an /Item/ subelement:
 --
--- /Item/ - A map of attributes and their values. Each entry in this map
--- consists of an attribute name and an attribute value. Attribute values must
--- not be null; string and binary type attributes must have lengths greater than
--- zero; and set type attributes must not be empty. Requests that contain empty
--- values will be rejected with a /ValidationException/ exception.
+--     -   /Item/ - A map of attributes and their values. Each entry in
+--         this map consists of an attribute name and an attribute value.
+--         Attribute values must not be null; string and binary type
+--         attributes must have lengths greater than zero; and set type
+--         attributes must not be empty. Requests that contain empty values
+--         will be rejected with a /ValidationException/ exception.
 --
--- If you specify any attributes that are part of an index key, then the data
--- types for those attributes must match those of the schema in the table's
--- attribute definition.
+--         If you specify any attributes that are part of an index key,
+--         then the data types for those attributes must match those of the
+--         schema in the table\'s attribute definition.
 --
 -- If there are no unprocessed items remaining, the response contains an
 -- empty /UnprocessedItems/ map.
-bwirUnprocessedItems :: Lens' BatchWriteItemResponse (HashMap Text (NonEmpty WriteRequest))
-bwirUnprocessedItems =
-    lens _bwirUnprocessedItems (\s a -> s { _bwirUnprocessedItems = a })
-        . _Map
-
-instance ToPath BatchWriteItem where
-    toPath = const "/"
-
-instance ToQuery BatchWriteItem where
-    toQuery = const mempty
-
-instance ToHeaders BatchWriteItem
-
-instance ToJSON BatchWriteItem where
-    toJSON BatchWriteItem{..} = object
-        [ "RequestItems"                .= _bwiRequestItems
-        , "ReturnConsumedCapacity"      .= _bwiReturnConsumedCapacity
-        , "ReturnItemCollectionMetrics" .= _bwiReturnItemCollectionMetrics
-        ]
-
-instance AWSRequest BatchWriteItem where
-    type Sv BatchWriteItem = DynamoDB
-    type Rs BatchWriteItem = BatchWriteItemResponse
-
-    request  = post "BatchWriteItem"
-    response = jsonResponse
+bwirsUnprocessedItems :: Lens' BatchWriteItemResponse (HashMap Text (NonEmpty WriteRequest))
+bwirsUnprocessedItems = lens _bwirsUnprocessedItems (\ s a -> s{_bwirsUnprocessedItems = a}) . _Default . _Map;
 
-instance FromJSON BatchWriteItemResponse where
-    parseJSON = withObject "BatchWriteItemResponse" $ \o -> BatchWriteItemResponse
-        <$> o .:? "ConsumedCapacity" .!= mempty
-        <*> o .:? "ItemCollectionMetrics" .!= mempty
-        <*> o .:? "UnprocessedItems" .!= mempty
+-- | The response status code.
+bwirsStatus :: Lens' BatchWriteItemResponse Int
+bwirsStatus = lens _bwirsStatus (\ s a -> s{_bwirsStatus = a});
diff --git a/gen/Network/AWS/DynamoDB/CreateTable.hs b/gen/Network/AWS/DynamoDB/CreateTable.hs
--- a/gen/Network/AWS/DynamoDB/CreateTable.hs
+++ b/gen/Network/AWS/DynamoDB/CreateTable.hs
@@ -1,266 +1,329 @@
-{-# LANGUAGE DataKinds                   #-}
-{-# LANGUAGE DeriveGeneric               #-}
-{-# LANGUAGE FlexibleInstances           #-}
-{-# LANGUAGE GeneralizedNewtypeDeriving  #-}
-{-# LANGUAGE LambdaCase                  #-}
-{-# LANGUAGE NoImplicitPrelude           #-}
-{-# LANGUAGE OverloadedStrings           #-}
-{-# LANGUAGE RecordWildCards             #-}
-{-# LANGUAGE TypeFamilies                #-}
+{-# LANGUAGE DeriveDataTypeable #-}
+{-# LANGUAGE DeriveGeneric      #-}
+{-# LANGUAGE OverloadedStrings  #-}
+{-# LANGUAGE RecordWildCards    #-}
+{-# LANGUAGE TypeFamilies       #-}
 
 {-# OPTIONS_GHC -fno-warn-unused-imports #-}
+{-# OPTIONS_GHC -fno-warn-unused-binds   #-}
+{-# OPTIONS_GHC -fno-warn-unused-matches #-}
 
+-- Derived from AWS service descriptions, licensed under Apache 2.0.
+
+-- |
 -- Module      : Network.AWS.DynamoDB.CreateTable
--- Copyright   : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>
--- License     : This Source Code Form is subject to the terms of
---               the Mozilla Public License, v. 2.0.
---               A copy of the MPL can be found in the LICENSE file or
---               you can obtain it at http://mozilla.org/MPL/2.0/.
+-- Copyright   : (c) 2013-2015 Brendan Hay
+-- License     : Mozilla Public License, v. 2.0.
 -- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com>
--- Stability   : experimental
+-- Stability   : auto-generated
 -- Portability : non-portable (GHC extensions)
 --
--- Derived from AWS service descriptions, licensed under Apache 2.0.
-
--- | The /CreateTable/ operation adds a new table to your account. In an AWS
--- account, table names must be unique within each region. That is, you can have
--- two tables with same name if you create the tables in different regions.
+-- The /CreateTable/ operation adds a new table to your account. In an AWS
+-- account, table names must be unique within each region. That is, you can
+-- have two tables with same name if you create the tables in different
+-- regions.
 --
--- /CreateTable/ is an asynchronous operation. Upon receiving a /CreateTable/
--- request, DynamoDB immediately returns a response with a /TableStatus/ of 'CREATING'. After the table is created, DynamoDB sets the /TableStatus/ to 'ACTIVE'. You
--- can perform read and write operations only on an 'ACTIVE' table.
+-- /CreateTable/ is an asynchronous operation. Upon receiving a
+-- /CreateTable/ request, DynamoDB immediately returns a response with a
+-- /TableStatus/ of 'CREATING'. After the table is created, DynamoDB sets
+-- the /TableStatus/ to 'ACTIVE'. You can perform read and write operations
+-- only on an 'ACTIVE' table.
 --
--- You can optionally define secondary indexes on the new table, as part of the /CreateTable/ operation. If you want to create multiple tables with secondary
--- indexes on them, you must create the tables sequentially. Only one table with
--- secondary indexes can be in the 'CREATING' state at any given time.
+-- You can optionally define secondary indexes on the new table, as part of
+-- the /CreateTable/ operation. If you want to create multiple tables with
+-- secondary indexes on them, you must create the tables sequentially. Only
+-- one table with secondary indexes can be in the 'CREATING' state at any
+-- given time.
 --
 -- You can use the /DescribeTable/ API to check the table status.
 --
--- <http://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_CreateTable.html>
+-- /See:/ <http://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_CreateTable.html AWS API Reference> for CreateTable.
 module Network.AWS.DynamoDB.CreateTable
     (
-    -- * Request
-      CreateTable
-    -- ** Request constructor
-    , createTable
-    -- ** Request lenses
-    , ctAttributeDefinitions
+    -- * Creating a Request
+      createTable
+    , CreateTable
+    -- * Request Lenses
     , ctGlobalSecondaryIndexes
-    , ctKeySchema
     , ctLocalSecondaryIndexes
-    , ctProvisionedThroughput
+    , ctStreamSpecification
+    , ctAttributeDefinitions
     , ctTableName
+    , ctKeySchema
+    , ctProvisionedThroughput
 
-    -- * Response
-    , CreateTableResponse
-    -- ** Response constructor
+    -- * Destructuring the Response
     , createTableResponse
-    -- ** Response lenses
-    , ctrTableDescription
+    , CreateTableResponse
+    -- * Response Lenses
+    , ctrsTableDescription
+    , ctrsStatus
     ) where
 
-import Network.AWS.Data (Object)
-import Network.AWS.Prelude
-import Network.AWS.Request.JSON
-import Network.AWS.DynamoDB.Types
-import qualified GHC.Exts
+import           Network.AWS.DynamoDB.Types
+import           Network.AWS.DynamoDB.Types.Product
+import           Network.AWS.Prelude
+import           Network.AWS.Request
+import           Network.AWS.Response
 
-data CreateTable = CreateTable
-    { _ctAttributeDefinitions   :: List "AttributeDefinitions" AttributeDefinition
-    , _ctGlobalSecondaryIndexes :: List "GlobalSecondaryIndexes" GlobalSecondaryIndex
-    , _ctKeySchema              :: List1 "KeySchema" KeySchemaElement
-    , _ctLocalSecondaryIndexes  :: List "LocalSecondaryIndexes" LocalSecondaryIndex
-    , _ctProvisionedThroughput  :: ProvisionedThroughput
-    , _ctTableName              :: Text
-    } deriving (Eq, Read, Show)
+-- | Represents the input of a /CreateTable/ operation.
+--
+-- /See:/ 'createTable' smart constructor.
+data CreateTable = CreateTable'
+    { _ctGlobalSecondaryIndexes :: !(Maybe [GlobalSecondaryIndex])
+    , _ctLocalSecondaryIndexes  :: !(Maybe [LocalSecondaryIndex])
+    , _ctStreamSpecification    :: !(Maybe StreamSpecification)
+    , _ctAttributeDefinitions   :: ![AttributeDefinition]
+    , _ctTableName              :: !Text
+    , _ctKeySchema              :: !(List1 KeySchemaElement)
+    , _ctProvisionedThroughput  :: !ProvisionedThroughput
+    } deriving (Eq,Read,Show,Data,Typeable,Generic)
 
--- | 'CreateTable' constructor.
+-- | Creates a value of 'CreateTable' with the minimum fields required to make a request.
 --
--- The fields accessible through corresponding lenses are:
+-- Use one of the following lenses to modify other fields as desired:
 --
--- * 'ctAttributeDefinitions' @::@ ['AttributeDefinition']
+-- * 'ctGlobalSecondaryIndexes'
 --
--- * 'ctGlobalSecondaryIndexes' @::@ ['GlobalSecondaryIndex']
+-- * 'ctLocalSecondaryIndexes'
 --
--- * 'ctKeySchema' @::@ 'NonEmpty' 'KeySchemaElement'
+-- * 'ctStreamSpecification'
 --
--- * 'ctLocalSecondaryIndexes' @::@ ['LocalSecondaryIndex']
+-- * 'ctAttributeDefinitions'
 --
--- * 'ctProvisionedThroughput' @::@ 'ProvisionedThroughput'
+-- * 'ctTableName'
 --
--- * 'ctTableName' @::@ 'Text'
+-- * 'ctKeySchema'
 --
-createTable :: Text -- ^ 'ctTableName'
-            -> NonEmpty KeySchemaElement -- ^ 'ctKeySchema'
-            -> ProvisionedThroughput -- ^ 'ctProvisionedThroughput'
-            -> CreateTable
-createTable p1 p2 p3 = CreateTable
-    { _ctTableName              = p1
-    , _ctKeySchema              = withIso _List1 (const id) p2
-    , _ctProvisionedThroughput  = p3
-    , _ctAttributeDefinitions   = mempty
-    , _ctLocalSecondaryIndexes  = mempty
-    , _ctGlobalSecondaryIndexes = mempty
+-- * 'ctProvisionedThroughput'
+createTable
+    :: Text -- ^ 'ctTableName'
+    -> NonEmpty KeySchemaElement -- ^ 'ctKeySchema'
+    -> ProvisionedThroughput -- ^ 'ctProvisionedThroughput'
+    -> CreateTable
+createTable pTableName_ pKeySchema_ pProvisionedThroughput_ =
+    CreateTable'
+    { _ctGlobalSecondaryIndexes = Nothing
+    , _ctLocalSecondaryIndexes = Nothing
+    , _ctStreamSpecification = Nothing
+    , _ctAttributeDefinitions = mempty
+    , _ctTableName = pTableName_
+    , _ctKeySchema = _List1 # pKeySchema_
+    , _ctProvisionedThroughput = pProvisionedThroughput_
     }
 
--- | An array of attributes that describe the key schema for the table and indexes.
-ctAttributeDefinitions :: Lens' CreateTable [AttributeDefinition]
-ctAttributeDefinitions =
-    lens _ctAttributeDefinitions (\s a -> s { _ctAttributeDefinitions = a })
-        . _List
-
--- | One or more global secondary indexes (the maximum is five) to be created on
--- the table. Each global secondary index in the array includes the following:
---
--- /IndexName/ - The name of the global secondary index. Must be unique only
--- for this table.
---
---
+-- | One or more global secondary indexes (the maximum is five) to be created
+-- on the table. Each global secondary index in the array includes the
+-- following:
 --
--- /KeySchema/ - Specifies the key schema for the global secondary index.
+-- -   /IndexName/ - The name of the global secondary index. Must be unique
+--     only for this 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:
+-- -   /KeySchema/ - Specifies the key schema for the global secondary
+--     index.
 --
--- /ProjectionType/ - One of the following:
+-- -   /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:
 --
--- 'KEYS_ONLY' - Only the index and primary keys are projected into the index.
+--     -   /ProjectionType/ - One of the following:
 --
--- 'INCLUDE' - Only the specified table attributes are projected into the
--- index. The list of projected attributes are in /NonKeyAttributes/.
+--         -   'KEYS_ONLY' - Only the index and primary keys are projected
+--             into the index.
 --
--- 'ALL' - All of the table attributes are projected into the index.
+--         -   'INCLUDE' - Only the specified table attributes are
+--             projected into the index. The list of projected attributes
+--             are in /NonKeyAttributes/.
 --
--- /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.
+--         -   'ALL' - All of the table attributes are projected into the
+--             index.
 --
--- /ProvisionedThroughput/ - The provisioned throughput settings for the
--- global secondary index, consisting of read and write capacity units.
+--     -   /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.
 --
 ctGlobalSecondaryIndexes :: Lens' CreateTable [GlobalSecondaryIndex]
-ctGlobalSecondaryIndexes =
-    lens _ctGlobalSecondaryIndexes
-        (\s a -> s { _ctGlobalSecondaryIndexes = a })
-            . _List
+ctGlobalSecondaryIndexes = lens _ctGlobalSecondaryIndexes (\ s a -> s{_ctGlobalSecondaryIndexes = a}) . _Default . _Coerce;
 
--- | Specifies the attributes that make up the primary key for a table or an
--- index. The attributes in /KeySchema/ must also be defined in the /AttributeDefinitions/ array. For more information, see <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DataModel.html Data Model> in the /Amazon DynamoDB DeveloperGuide/.
---
--- Each /KeySchemaElement/ in the array is composed of:
---
--- /AttributeName/ - The name of this key attribute.
+-- | One or more local secondary indexes (the maximum is five) to be created
+-- on the table. Each index is scoped to a given hash key value. There is a
+-- 10 GB size limit per hash key; otherwise, the size of a local secondary
+-- index is unconstrained.
 --
--- /KeyType/ - Determines whether the key attribute is 'HASH' or 'RANGE'.
+-- Each local secondary index in the array includes the following:
 --
--- For a primary key that consists of a hash attribute, you must provide
--- exactly one element with a /KeyType/ of 'HASH'.
+-- -   /IndexName/ - The name of the local secondary index. Must be unique
+--     only for this table.
 --
--- For a primary key that consists of hash and range attributes, you must
--- provide exactly two elements, in this order: The first element must have a /KeyType/ of 'HASH', and the second element must have a /KeyType/ of 'RANGE'.
+-- -   /KeySchema/ - Specifies the key schema for the local secondary
+--     index. The key schema must begin with the same hash key attribute as
+--     the table.
 --
--- For more information, see <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithTables.html#WorkingWithTables.primary.key Specifying the Primary Key> in the /Amazon DynamoDBDeveloper Guide/.
-ctKeySchema :: Lens' CreateTable (NonEmpty KeySchemaElement)
-ctKeySchema = lens _ctKeySchema (\s a -> s { _ctKeySchema = a }) . _List1
-
--- | One or more local secondary indexes (the maximum is five) to be created on
--- the table. Each index is scoped to a given hash key value. There is a 10 GB
--- size limit per hash key; otherwise, the size of a local secondary index is
--- unconstrained.
+-- -   /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:
 --
--- Each local secondary index in the array includes the following:
+--     -   /ProjectionType/ - One of the following:
 --
--- /IndexName/ - The name of the local secondary index. Must be unique only for
--- this table.
+--         -   '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
+--             are in /NonKeyAttributes/.
 --
+--         -   'ALL' - All of the table attributes are projected into the
+--             index.
 --
--- /KeySchema/ - Specifies the key schema for the local secondary index. The
--- key schema must begin with the same hash key attribute as the table.
+--     -   /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.
 --
--- /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:
+ctLocalSecondaryIndexes :: Lens' CreateTable [LocalSecondaryIndex]
+ctLocalSecondaryIndexes = lens _ctLocalSecondaryIndexes (\ s a -> s{_ctLocalSecondaryIndexes = a}) . _Default . _Coerce;
+
+-- | The settings for DynamoDB Streams on the table. These settings consist
+-- of:
 --
--- /ProjectionType/ - One of the following:
+-- -   /StreamEnabled/ - Indicates whether Streams is to be enabled (true)
+--     or disabled (false).
 --
--- 'KEYS_ONLY' - Only the index and primary keys are projected into the index.
+-- -   /StreamViewType/ - When an item in the table is modified,
+--     /StreamViewType/ determines what information is written to the
+--     table\'s stream. Valid values for /StreamViewType/ are:
 --
--- 'INCLUDE' - Only the specified table attributes are projected into the
--- index. The list of projected attributes are in /NonKeyAttributes/.
+--     -   /KEYS_ONLY/ - Only the key attributes of the modified item are
+--         written to the stream.
 --
--- 'ALL' - All of the table attributes are projected into the index.
+--     -   /NEW_IMAGE/ - The entire item, as it appears after it was
+--         modified, is written to the stream.
 --
--- /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.
+--     -   /OLD_IMAGE/ - The entire item, as it appeared before it was
+--         modified, is written to the stream.
 --
+--     -   /NEW_AND_OLD_IMAGES/ - Both the new and the old item images of
+--         the item are written to the stream.
 --
-ctLocalSecondaryIndexes :: Lens' CreateTable [LocalSecondaryIndex]
-ctLocalSecondaryIndexes =
-    lens _ctLocalSecondaryIndexes (\s a -> s { _ctLocalSecondaryIndexes = a })
-        . _List
+ctStreamSpecification :: Lens' CreateTable (Maybe StreamSpecification)
+ctStreamSpecification = lens _ctStreamSpecification (\ s a -> s{_ctStreamSpecification = a});
 
-ctProvisionedThroughput :: Lens' CreateTable ProvisionedThroughput
-ctProvisionedThroughput =
-    lens _ctProvisionedThroughput (\s a -> s { _ctProvisionedThroughput = a })
+-- | An array of attributes that describe the key schema for the table and
+-- indexes.
+ctAttributeDefinitions :: Lens' CreateTable [AttributeDefinition]
+ctAttributeDefinitions = lens _ctAttributeDefinitions (\ s a -> s{_ctAttributeDefinitions = a}) . _Coerce;
 
 -- | The name of the table to create.
 ctTableName :: Lens' CreateTable Text
-ctTableName = lens _ctTableName (\s a -> s { _ctTableName = a })
-
-newtype CreateTableResponse = CreateTableResponse
-    { _ctrTableDescription :: Maybe TableDescription
-    } deriving (Eq, Read, Show)
+ctTableName = lens _ctTableName (\ s a -> s{_ctTableName = a});
 
--- | 'CreateTableResponse' constructor.
+-- | Specifies the attributes that make up the primary key for a table or an
+-- index. The attributes in /KeySchema/ must also be defined in the
+-- /AttributeDefinitions/ array. For more information, see
+-- <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DataModel.html Data Model>
+-- in the /Amazon DynamoDB Developer Guide/.
 --
--- The fields accessible through corresponding lenses are:
+-- Each /KeySchemaElement/ in the array is composed of:
 --
--- * 'ctrTableDescription' @::@ 'Maybe' 'TableDescription'
+-- -   /AttributeName/ - The name of this key attribute.
 --
-createTableResponse :: CreateTableResponse
-createTableResponse = CreateTableResponse
-    { _ctrTableDescription = Nothing
-    }
+-- -   /KeyType/ - Determines whether the key attribute is 'HASH' or
+--     'RANGE'.
+--
+-- For a primary key that consists of a hash attribute, you must provide
+-- exactly one element with a /KeyType/ of 'HASH'.
+--
+-- For a primary key that consists of hash and range attributes, you must
+-- provide exactly two elements, in this order: The first element must have
+-- a /KeyType/ of 'HASH', and the second element must have a /KeyType/ of
+-- 'RANGE'.
+--
+-- For more information, see
+-- <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithTables.html#WorkingWithTables.primary.key Specifying the Primary Key>
+-- in the /Amazon DynamoDB Developer Guide/.
+ctKeySchema :: Lens' CreateTable (NonEmpty KeySchemaElement)
+ctKeySchema = lens _ctKeySchema (\ s a -> s{_ctKeySchema = a}) . _List1;
 
-ctrTableDescription :: Lens' CreateTableResponse (Maybe TableDescription)
-ctrTableDescription =
-    lens _ctrTableDescription (\s a -> s { _ctrTableDescription = a })
+-- | Undocumented member.
+ctProvisionedThroughput :: Lens' CreateTable ProvisionedThroughput
+ctProvisionedThroughput = lens _ctProvisionedThroughput (\ s a -> s{_ctProvisionedThroughput = a});
 
+instance AWSRequest CreateTable where
+        type Sv CreateTable = DynamoDB
+        type Rs CreateTable = CreateTableResponse
+        request = postJSON
+        response
+          = receiveJSON
+              (\ s h x ->
+                 CreateTableResponse' <$>
+                   (x .?> "TableDescription") <*> (pure (fromEnum s)))
+
+instance ToHeaders CreateTable where
+        toHeaders
+          = const
+              (mconcat
+                 ["X-Amz-Target" =#
+                    ("DynamoDB_20120810.CreateTable" :: ByteString),
+                  "Content-Type" =#
+                    ("application/x-amz-json-1.0" :: ByteString)])
+
+instance ToJSON CreateTable where
+        toJSON CreateTable'{..}
+          = object
+              ["GlobalSecondaryIndexes" .=
+                 _ctGlobalSecondaryIndexes,
+               "LocalSecondaryIndexes" .= _ctLocalSecondaryIndexes,
+               "StreamSpecification" .= _ctStreamSpecification,
+               "AttributeDefinitions" .= _ctAttributeDefinitions,
+               "TableName" .= _ctTableName,
+               "KeySchema" .= _ctKeySchema,
+               "ProvisionedThroughput" .= _ctProvisionedThroughput]
+
 instance ToPath CreateTable where
-    toPath = const "/"
+        toPath = const "/"
 
 instance ToQuery CreateTable where
-    toQuery = const mempty
-
-instance ToHeaders CreateTable
+        toQuery = const mempty
 
-instance ToJSON CreateTable where
-    toJSON CreateTable{..} = object
-        [ "AttributeDefinitions"   .= _ctAttributeDefinitions
-        , "TableName"              .= _ctTableName
-        , "KeySchema"              .= _ctKeySchema
-        , "LocalSecondaryIndexes"  .= _ctLocalSecondaryIndexes
-        , "GlobalSecondaryIndexes" .= _ctGlobalSecondaryIndexes
-        , "ProvisionedThroughput"  .= _ctProvisionedThroughput
-        ]
+-- | Represents the output of a /CreateTable/ operation.
+--
+-- /See:/ 'createTableResponse' smart constructor.
+data CreateTableResponse = CreateTableResponse'
+    { _ctrsTableDescription :: !(Maybe TableDescription)
+    , _ctrsStatus           :: !Int
+    } deriving (Eq,Read,Show,Data,Typeable,Generic)
 
-instance AWSRequest CreateTable where
-    type Sv CreateTable = DynamoDB
-    type Rs CreateTable = CreateTableResponse
+-- | Creates a value of 'CreateTableResponse' with the minimum fields required to make a request.
+--
+-- Use one of the following lenses to modify other fields as desired:
+--
+-- * 'ctrsTableDescription'
+--
+-- * 'ctrsStatus'
+createTableResponse
+    :: Int -- ^ 'ctrsStatus'
+    -> CreateTableResponse
+createTableResponse pStatus_ =
+    CreateTableResponse'
+    { _ctrsTableDescription = Nothing
+    , _ctrsStatus = pStatus_
+    }
 
-    request  = post "CreateTable"
-    response = jsonResponse
+-- | Undocumented member.
+ctrsTableDescription :: Lens' CreateTableResponse (Maybe TableDescription)
+ctrsTableDescription = lens _ctrsTableDescription (\ s a -> s{_ctrsTableDescription = a});
 
-instance FromJSON CreateTableResponse where
-    parseJSON = withObject "CreateTableResponse" $ \o -> CreateTableResponse
-        <$> o .:? "TableDescription"
+-- | The response status code.
+ctrsStatus :: Lens' CreateTableResponse Int
+ctrsStatus = lens _ctrsStatus (\ s a -> s{_ctrsStatus = a});
diff --git a/gen/Network/AWS/DynamoDB/DeleteItem.hs b/gen/Network/AWS/DynamoDB/DeleteItem.hs
--- a/gen/Network/AWS/DynamoDB/DeleteItem.hs
+++ b/gen/Network/AWS/DynamoDB/DeleteItem.hs
@@ -1,555 +1,611 @@
-{-# LANGUAGE DataKinds                   #-}
-{-# LANGUAGE DeriveGeneric               #-}
-{-# LANGUAGE FlexibleInstances           #-}
-{-# LANGUAGE GeneralizedNewtypeDeriving  #-}
-{-# LANGUAGE LambdaCase                  #-}
-{-# LANGUAGE NoImplicitPrelude           #-}
-{-# LANGUAGE OverloadedStrings           #-}
-{-# LANGUAGE RecordWildCards             #-}
-{-# LANGUAGE TypeFamilies                #-}
+{-# LANGUAGE DeriveDataTypeable #-}
+{-# LANGUAGE DeriveGeneric      #-}
+{-# LANGUAGE OverloadedStrings  #-}
+{-# LANGUAGE RecordWildCards    #-}
+{-# LANGUAGE TypeFamilies       #-}
 
 {-# OPTIONS_GHC -fno-warn-unused-imports #-}
+{-# OPTIONS_GHC -fno-warn-unused-binds   #-}
+{-# OPTIONS_GHC -fno-warn-unused-matches #-}
 
+-- Derived from AWS service descriptions, licensed under Apache 2.0.
+
+-- |
 -- Module      : Network.AWS.DynamoDB.DeleteItem
--- Copyright   : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>
--- License     : This Source Code Form is subject to the terms of
---               the Mozilla Public License, v. 2.0.
---               A copy of the MPL can be found in the LICENSE file or
---               you can obtain it at http://mozilla.org/MPL/2.0/.
+-- Copyright   : (c) 2013-2015 Brendan Hay
+-- License     : Mozilla Public License, v. 2.0.
 -- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com>
--- Stability   : experimental
+-- Stability   : auto-generated
 -- Portability : non-portable (GHC extensions)
 --
--- Derived from AWS service descriptions, licensed under Apache 2.0.
-
--- | Deletes a single item in a table by primary key. You can perform a
--- conditional delete operation that deletes the item if it exists, or if it has
--- an expected attribute value.
+-- Deletes a single item in a table by primary key. You can perform a
+-- conditional delete operation that deletes the item if it exists, or if
+-- it has an expected attribute value.
 --
--- In addition to deleting an item, you can also return the item's attribute
--- values in the same operation, using the /ReturnValues/ parameter.
+-- In addition to deleting an item, you can also return the item\'s
+-- attribute values in the same operation, using the /ReturnValues/
+-- parameter.
 --
--- Unless you specify conditions, the /DeleteItem/ is an idempotent operation;
--- running it multiple times on the same item or attribute does /not/ result in an
--- error response.
+-- Unless you specify conditions, the /DeleteItem/ is an idempotent
+-- operation; running it multiple times on the same item or attribute does
+-- /not/ result in an error response.
 --
 -- Conditional deletes are useful for deleting items only if specific
 -- conditions are met. If those conditions are met, DynamoDB performs the
 -- delete. Otherwise, the item is not deleted.
 --
--- <http://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_DeleteItem.html>
+-- /See:/ <http://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_DeleteItem.html AWS API Reference> for DeleteItem.
 module Network.AWS.DynamoDB.DeleteItem
     (
-    -- * Request
-      DeleteItem
-    -- ** Request constructor
-    , deleteItem
-    -- ** Request lenses
-    , diConditionExpression
-    , diConditionalOperator
-    , diExpected
+    -- * Creating a Request
+      deleteItem
+    , DeleteItem
+    -- * Request Lenses
+    , diReturnValues
     , diExpressionAttributeNames
-    , diExpressionAttributeValues
-    , diKey
     , diReturnConsumedCapacity
+    , diExpressionAttributeValues
     , diReturnItemCollectionMetrics
-    , diReturnValues
+    , diConditionExpression
+    , diConditionalOperator
+    , diExpected
     , diTableName
+    , diKey
 
-    -- * Response
-    , DeleteItemResponse
-    -- ** Response constructor
+    -- * Destructuring the Response
     , deleteItemResponse
-    -- ** Response lenses
-    , dirAttributes
-    , dirConsumedCapacity
-    , dirItemCollectionMetrics
+    , DeleteItemResponse
+    -- * Response Lenses
+    , dirsConsumedCapacity
+    , dirsItemCollectionMetrics
+    , dirsAttributes
+    , dirsStatus
     ) where
 
-import Network.AWS.Data (Object)
-import Network.AWS.Prelude
-import Network.AWS.Request.JSON
-import Network.AWS.DynamoDB.Types
-import qualified GHC.Exts
-
-data DeleteItem = DeleteItem
-    { _diConditionExpression         :: Maybe Text
-    , _diConditionalOperator         :: Maybe ConditionalOperator
-    , _diExpected                    :: Map Text ExpectedAttributeValue
-    , _diExpressionAttributeNames    :: Map Text Text
-    , _diExpressionAttributeValues   :: Map Text AttributeValue
-    , _diKey                         :: Map Text AttributeValue
-    , _diReturnConsumedCapacity      :: Maybe ReturnConsumedCapacity
-    , _diReturnItemCollectionMetrics :: Maybe ReturnItemCollectionMetrics
-    , _diReturnValues                :: Maybe ReturnValue
-    , _diTableName                   :: Text
-    } deriving (Eq, Read, Show)
+import           Network.AWS.DynamoDB.Types
+import           Network.AWS.DynamoDB.Types.Product
+import           Network.AWS.Prelude
+import           Network.AWS.Request
+import           Network.AWS.Response
 
--- | 'DeleteItem' constructor.
+-- | Represents the input of a /DeleteItem/ operation.
 --
--- The fields accessible through corresponding lenses are:
+-- /See:/ 'deleteItem' smart constructor.
+data DeleteItem = DeleteItem'
+    { _diReturnValues                :: !(Maybe ReturnValue)
+    , _diExpressionAttributeNames    :: !(Maybe (Map Text Text))
+    , _diReturnConsumedCapacity      :: !(Maybe ReturnConsumedCapacity)
+    , _diExpressionAttributeValues   :: !(Maybe (Map Text AttributeValue))
+    , _diReturnItemCollectionMetrics :: !(Maybe ReturnItemCollectionMetrics)
+    , _diConditionExpression         :: !(Maybe Text)
+    , _diConditionalOperator         :: !(Maybe ConditionalOperator)
+    , _diExpected                    :: !(Maybe (Map Text ExpectedAttributeValue))
+    , _diTableName                   :: !Text
+    , _diKey                         :: !(Map Text AttributeValue)
+    } deriving (Eq,Read,Show,Data,Typeable,Generic)
+
+-- | Creates a value of 'DeleteItem' with the minimum fields required to make a request.
 --
--- * 'diConditionExpression' @::@ 'Maybe' 'Text'
+-- Use one of the following lenses to modify other fields as desired:
 --
--- * 'diConditionalOperator' @::@ 'Maybe' 'ConditionalOperator'
+-- * 'diReturnValues'
 --
--- * 'diExpected' @::@ 'HashMap' 'Text' 'ExpectedAttributeValue'
+-- * 'diExpressionAttributeNames'
 --
--- * 'diExpressionAttributeNames' @::@ 'HashMap' 'Text' 'Text'
+-- * 'diReturnConsumedCapacity'
 --
--- * 'diExpressionAttributeValues' @::@ 'HashMap' 'Text' 'AttributeValue'
+-- * 'diExpressionAttributeValues'
 --
--- * 'diKey' @::@ 'HashMap' 'Text' 'AttributeValue'
+-- * 'diReturnItemCollectionMetrics'
 --
--- * 'diReturnConsumedCapacity' @::@ 'Maybe' 'ReturnConsumedCapacity'
+-- * 'diConditionExpression'
 --
--- * 'diReturnItemCollectionMetrics' @::@ 'Maybe' 'ReturnItemCollectionMetrics'
+-- * 'diConditionalOperator'
 --
--- * 'diReturnValues' @::@ 'Maybe' 'ReturnValue'
+-- * 'diExpected'
 --
--- * 'diTableName' @::@ 'Text'
+-- * 'diTableName'
 --
-deleteItem :: Text -- ^ 'diTableName'
-           -> DeleteItem
-deleteItem p1 = DeleteItem
-    { _diTableName                   = p1
-    , _diKey                         = mempty
-    , _diExpected                    = mempty
-    , _diConditionalOperator         = Nothing
-    , _diReturnValues                = Nothing
-    , _diReturnConsumedCapacity      = Nothing
+-- * 'diKey'
+deleteItem
+    :: Text -- ^ 'diTableName'
+    -> DeleteItem
+deleteItem pTableName_ =
+    DeleteItem'
+    { _diReturnValues = Nothing
+    , _diExpressionAttributeNames = Nothing
+    , _diReturnConsumedCapacity = Nothing
+    , _diExpressionAttributeValues = Nothing
     , _diReturnItemCollectionMetrics = Nothing
-    , _diConditionExpression         = Nothing
-    , _diExpressionAttributeNames    = mempty
-    , _diExpressionAttributeValues   = mempty
+    , _diConditionExpression = Nothing
+    , _diConditionalOperator = Nothing
+    , _diExpected = Nothing
+    , _diTableName = pTableName_
+    , _diKey = mempty
     }
 
--- | A condition that must be satisfied in order for a conditional /DeleteItem/ to
--- succeed.
---
--- An expression can contain any of the following:
---
--- Boolean functions: 'attribute_exists | attribute_not_exists | contains |begins_with'
---
--- These function names are case-sensitive.
---
--- Comparison operators: ' = | <> | < | > | <= | >= | BETWEEN | IN'
---
--- Logical operators: 'AND | OR | NOT'
+-- | Use /ReturnValues/ if you want to get the item attributes as they
+-- appeared before they were deleted. For /DeleteItem/, the valid values
+-- are:
 --
--- For more information on condition expressions, see <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.SpecifyingConditions.html Specifying Conditions>
--- in the /Amazon DynamoDB Developer Guide/.
+-- -   'NONE' - If /ReturnValues/ is not specified, or if its value is
+--     'NONE', then nothing is returned. (This setting is the default for
+--     /ReturnValues/.)
 --
--- /ConditionExpression/ replaces the legacy /ConditionalOperator/ and /Expected/
--- parameters.
+-- -   'ALL_OLD' - The content of the old item is returned.
 --
-diConditionExpression :: Lens' DeleteItem (Maybe Text)
-diConditionExpression =
-    lens _diConditionExpression (\s a -> s { _diConditionExpression = a })
+diReturnValues :: Lens' DeleteItem (Maybe ReturnValue)
+diReturnValues = lens _diReturnValues (\ s a -> s{_diReturnValues = a});
 
--- | This is a legacy parameter, for backward compatibility. New applications
--- should use /ConditionExpression/ instead. Do not combine legacy parameters and
--- expression parameters in a single API call; otherwise, DynamoDB will return a /ValidationException/ exception.
---
--- A logical operator to apply to the conditions in the /Expected/ map:
---
--- 'AND' - If all of the conditions evaluate to true, then the entire map
--- evaluates to true.
+-- | One or more substitution tokens for attribute names in an expression.
+-- The following are some use cases for using /ExpressionAttributeNames/:
 --
--- 'OR' - If at least one of the conditions evaluate to true, then the entire map
--- evaluates to true.
+-- -   To access an attribute whose name conflicts with a DynamoDB reserved
+--     word.
 --
--- If you omit /ConditionalOperator/, then 'AND' is the default.
+-- -   To create a placeholder for repeating occurrences of an attribute
+--     name in an expression.
 --
--- The operation will succeed only if the entire map evaluates to true.
+-- -   To prevent special characters in an attribute name from being
+--     misinterpreted in an expression.
 --
--- This parameter does not support attributes of type List or Map.
+-- Use the __#__ character in an expression to dereference an attribute
+-- name. For example, consider the following attribute name:
 --
-diConditionalOperator :: Lens' DeleteItem (Maybe ConditionalOperator)
-diConditionalOperator =
-    lens _diConditionalOperator (\s a -> s { _diConditionalOperator = a })
-
--- | This is a legacy parameter, for backward compatibility. New applications
--- should use /ConditionExpression/ instead. Do not combine legacy parameters and
--- expression parameters in a single API call; otherwise, DynamoDB will return a /ValidationException/ exception.
+-- -   'Percentile'
 --
--- A map of attribute/condition pairs. /Expected/ provides a conditional block
--- for the /DeleteItem/ operation.
+-- The name of this attribute conflicts with a reserved word, so it cannot
+-- be used directly in an expression. (For the complete list of reserved
+-- words, see
+-- <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ReservedWords.html Reserved Words>
+-- in the /Amazon DynamoDB Developer Guide/). To work around this, you
+-- could specify the following for /ExpressionAttributeNames/:
 --
--- Each element of /Expected/ consists of an attribute name, a comparison
--- operator, and one or more values. DynamoDB compares the attribute with the
--- value(s) you supplied, using the comparison operator. For each /Expected/
--- element, the result of the evaluation is either true or false.
+-- -   '{\"#P\":\"Percentile\"}'
 --
--- If you specify more than one element in the /Expected/ map, then by default
--- all of the conditions must evaluate to true. In other words, the conditions
--- are ANDed together. (You can use the /ConditionalOperator/ parameter to OR the
--- conditions instead. If you do this, then at least one of the conditions must
--- evaluate to true, rather than all of them.)
+-- You could then use this substitution in an expression, as in this
+-- example:
 --
--- If the /Expected/ map evaluates to true, then the conditional operation
--- succeeds; otherwise, it fails.
+-- -   '#P = :val'
 --
--- /Expected/ contains the following:
+-- Tokens that begin with the __:__ character are /expression attribute
+-- values/, which are placeholders for the actual value at runtime.
 --
--- /AttributeValueList/ - One or more values to evaluate against the supplied
--- attribute. The number of values in the list depends on the /ComparisonOperator/
--- being used.
+-- For more information on expression attribute names, see
+-- <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.AccessingItemAttributes.html Accessing Item Attributes>
+-- in the /Amazon DynamoDB Developer Guide/.
+diExpressionAttributeNames :: Lens' DeleteItem (HashMap Text Text)
+diExpressionAttributeNames = lens _diExpressionAttributeNames (\ s a -> s{_diExpressionAttributeNames = a}) . _Default . _Map;
+
+-- | Undocumented member.
+diReturnConsumedCapacity :: Lens' DeleteItem (Maybe ReturnConsumedCapacity)
+diReturnConsumedCapacity = lens _diReturnConsumedCapacity (\ s a -> s{_diReturnConsumedCapacity = a});
+
+-- | One or more values that can be substituted in an expression.
 --
--- For type Number, value comparisons are numeric.
+-- Use the __:__ (colon) character in an expression to dereference an
+-- attribute value. For example, suppose that you wanted to check whether
+-- the value of the /ProductStatus/ attribute was one of the following:
 --
--- String value comparisons for greater than, equals, or less than are based on
--- ASCII character code values. For example, 'a' is greater than 'A', and 'a' is
--- greater than 'B'. For a list of code values, see <http://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters http://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters>.
+-- 'Available | Backordered | Discontinued'
 --
--- For type Binary, DynamoDB treats each byte of the binary data as unsigned
--- when it compares binary values.
+-- You would first need to specify /ExpressionAttributeValues/ as follows:
 --
--- /ComparisonOperator/ - A comparator for evaluating attributes in the /AttributeValueList/. When performing the comparison, DynamoDB uses strongly consistent reads.
+-- '{ \":avail\":{\"S\":\"Available\"}, \":back\":{\"S\":\"Backordered\"}, \":disc\":{\"S\":\"Discontinued\"} }'
 --
--- The following comparison operators are available:
+-- You could then use these values in an expression, such as this:
 --
--- 'EQ | NE | LE | LT | GE | GT | NOT_NULL | NULL | CONTAINS | NOT_CONTAINS |BEGINS_WITH | IN | BETWEEN'
+-- 'ProductStatus IN (:avail, :back, :disc)'
 --
--- The following are descriptions of each comparison operator.
+-- For more information on expression attribute values, see
+-- <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.SpecifyingConditions.html Specifying Conditions>
+-- in the /Amazon DynamoDB Developer Guide/.
+diExpressionAttributeValues :: Lens' DeleteItem (HashMap Text AttributeValue)
+diExpressionAttributeValues = lens _diExpressionAttributeValues (\ s a -> s{_diExpressionAttributeValues = a}) . _Default . _Map;
+
+-- | Determines whether item collection metrics are returned. If set to
+-- 'SIZE', the response includes statistics about item collections, if any,
+-- that were modified during the operation are returned in the response. If
+-- set to 'NONE' (the default), no statistics are returned.
+diReturnItemCollectionMetrics :: Lens' DeleteItem (Maybe ReturnItemCollectionMetrics)
+diReturnItemCollectionMetrics = lens _diReturnItemCollectionMetrics (\ s a -> s{_diReturnItemCollectionMetrics = a});
+
+-- | A condition that must be satisfied in order for a conditional
+-- /DeleteItem/ to succeed.
 --
--- 'EQ' : Equal. 'EQ' is supported for all datatypes, including lists and maps.
+-- An expression can contain any of the following:
 --
--- /AttributeValueList/ can contain only one /AttributeValue/ element of type
--- String, Number, Binary, String Set, Number Set, or Binary Set. If an item
--- contains an /AttributeValue/ element of a different type than the one provided
--- in the request, the value does not match. For example, '{"S":"6"}' does not
--- equal '{"N":"6"}'. Also, '{"N":"6"}' does not equal '{"NS":["6", "2", "1"]}'.
+-- -   Functions:
+--     'attribute_exists | attribute_not_exists | attribute_type | contains | begins_with | size'
 --
+--     These function names are case-sensitive.
 --
+-- -   Comparison operators: ' = | \<> | \< | > | \<= | >= | BETWEEN | IN'
 --
--- 'NE' : Not equal. 'NE' is supported for all datatypes, including lists and
--- maps.
+-- -   Logical operators: 'AND | OR | NOT'
 --
--- /AttributeValueList/ can contain only one /AttributeValue/ of type String,
--- Number, Binary, String Set, Number Set, or Binary Set. If an item contains an /AttributeValue/ of a different type than the one provided in the request, the
--- value does not match. For example, '{"S":"6"}' does not equal '{"N":"6"}'. Also, '{"N":"6"}' does not equal '{"NS":["6", "2", "1"]}'.
+-- For more information on condition expressions, see
+-- <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.SpecifyingConditions.html Specifying Conditions>
+-- in the /Amazon DynamoDB Developer Guide/.
 --
+-- /ConditionExpression/ replaces the legacy /ConditionalOperator/ and
+-- /Expected/ parameters.
+diConditionExpression :: Lens' DeleteItem (Maybe Text)
+diConditionExpression = lens _diConditionExpression (\ s a -> s{_diConditionExpression = a});
+
+-- | This is a legacy parameter, for backward compatibility. New applications
+-- should use /ConditionExpression/ instead. Do not combine legacy
+-- parameters and expression parameters in a single API call; otherwise,
+-- DynamoDB will return a /ValidationException/ exception.
 --
+-- A logical operator to apply to the conditions in the /Expected/ map:
 --
--- 'LE' : Less than or equal.
+-- -   'AND' - If all of the conditions evaluate to true, then the entire
+--     map evaluates to true.
 --
--- /AttributeValueList/ can contain only one /AttributeValue/ element of type
--- String, Number, or Binary (not a set type). If an item contains an /AttributeValue/ element of a different type than the one provided in the request, the value
--- does not match. For example, '{"S":"6"}' does not equal '{"N":"6"}'. Also, '{"N":"6"}' does not compare to '{"NS":["6", "2", "1"]}'.
+-- -   'OR' - If at least one of the conditions evaluate to true, then the
+--     entire map evaluates to true.
 --
+-- If you omit /ConditionalOperator/, then 'AND' is the default.
 --
+-- The operation will succeed only if the entire map evaluates to true.
 --
--- 'LT' : Less than.
+-- This parameter does not support attributes of type List or Map.
+diConditionalOperator :: Lens' DeleteItem (Maybe ConditionalOperator)
+diConditionalOperator = lens _diConditionalOperator (\ s a -> s{_diConditionalOperator = a});
+
+-- | This is a legacy parameter, for backward compatibility. New applications
+-- should use /ConditionExpression/ instead. Do not combine legacy
+-- parameters and expression parameters in a single API call; otherwise,
+-- DynamoDB will return a /ValidationException/ exception.
 --
--- /AttributeValueList/ can contain only one /AttributeValue/ of type String,
--- Number, or Binary (not a set type). If an item contains an /AttributeValue/
--- element of a different type than the one provided in the request, the value
--- does not match. For example, '{"S":"6"}' does not equal '{"N":"6"}'. Also, '{"N":"6"}' does not compare to '{"NS":["6", "2", "1"]}'.
+-- A map of attribute\/condition pairs. /Expected/ provides a conditional
+-- block for the /DeleteItem/ operation.
 --
+-- Each element of /Expected/ consists of an attribute name, a comparison
+-- operator, and one or more values. DynamoDB compares the attribute with
+-- the value(s) you supplied, using the comparison operator. For each
+-- /Expected/ element, the result of the evaluation is either true or
+-- false.
 --
+-- If you specify more than one element in the /Expected/ map, then by
+-- default all of the conditions must evaluate to true. In other words, the
+-- conditions are ANDed together. (You can use the /ConditionalOperator/
+-- parameter to OR the conditions instead. If you do this, then at least
+-- one of the conditions must evaluate to true, rather than all of them.)
 --
--- 'GE' : Greater than or equal.
+-- If the /Expected/ map evaluates to true, then the conditional operation
+-- succeeds; otherwise, it fails.
 --
--- /AttributeValueList/ can contain only one /AttributeValue/ element of type
--- String, Number, or Binary (not a set type). If an item contains an /AttributeValue/ element of a different type than the one provided in the request, the value
--- does not match. For example, '{"S":"6"}' does not equal '{"N":"6"}'. Also, '{"N":"6"}' does not compare to '{"NS":["6", "2", "1"]}'.
+-- /Expected/ contains the following:
 --
+-- -   /AttributeValueList/ - One or more values to evaluate against the
+--     supplied attribute. The number of values in the list depends on the
+--     /ComparisonOperator/ being used.
 --
+--     For type Number, value comparisons are numeric.
 --
--- 'GT' : Greater than.
+--     String value comparisons for greater than, equals, or less than are
+--     based on ASCII character code values. For example, 'a' is greater
+--     than 'A', and 'a' is greater than 'B'. For a list of code values,
+--     see <http://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters>.
 --
--- /AttributeValueList/ can contain only one /AttributeValue/ element of type
--- String, Number, or Binary (not a set type). If an item contains an /AttributeValue/ element of a different type than the one provided in the request, the value
--- does not match. For example, '{"S":"6"}' does not equal '{"N":"6"}'. Also, '{"N":"6"}' does not compare to '{"NS":["6", "2", "1"]}'.
+--     For type Binary, DynamoDB treats each byte of the binary data as
+--     unsigned when it compares binary values.
 --
+-- -   /ComparisonOperator/ - A comparator for evaluating attributes in the
+--     /AttributeValueList/. When performing the comparison, DynamoDB uses
+--     strongly consistent reads.
 --
+--     The following comparison operators are available:
 --
--- 'NOT_NULL' : The attribute exists. 'NOT_NULL' is supported for all datatypes,
--- including lists and maps.
+--     'EQ | NE | LE | LT | GE | GT | NOT_NULL | NULL | CONTAINS | NOT_CONTAINS | BEGINS_WITH | IN | BETWEEN'
 --
--- This operator tests for the existence of an attribute, not its data type. If
--- the data type of attribute "'a'" is null, and you evaluate it using 'NOT_NULL',
--- the result is a Boolean /true/. This result is because the attribute "'a'"
--- exists; its data type is not relevant to the 'NOT_NULL' comparison operator.
+--     The following are descriptions of each comparison operator.
 --
--- 'NULL' : The attribute does not exist. 'NULL' is supported for all datatypes,
--- including lists and maps.
+--     -   'EQ' : Equal. 'EQ' is supported for all datatypes, including
+--         lists and maps.
 --
--- This operator tests for the nonexistence of an attribute, not its data type.
--- If the data type of attribute "'a'" is null, and you evaluate it using 'NULL',
--- the result is a Boolean /false/. This is because the attribute "'a'" exists; its
--- data type is not relevant to the 'NULL' comparison operator.
+--         /AttributeValueList/ can contain only one /AttributeValue/
+--         element of type String, Number, Binary, String Set, Number Set,
+--         or Binary Set. If an item contains an /AttributeValue/ element
+--         of a different type than the one provided in the request, the
+--         value does not match. For example, '{\"S\":\"6\"}' does not
+--         equal '{\"N\":\"6\"}'. Also, '{\"N\":\"6\"}' does not equal
+--         '{\"NS\":[\"6\", \"2\", \"1\"]}'.
 --
--- 'CONTAINS' : Checks for a subsequence, or value in a set.
+--     -   'NE' : Not equal. 'NE' is supported for all datatypes, including
+--         lists and maps.
 --
--- /AttributeValueList/ can contain only one /AttributeValue/ element of type
--- String, Number, or Binary (not a set type). If the target attribute of the
--- comparison is of type String, then the operator checks for a substring match.
--- If the target attribute of the comparison is of type Binary, then the
--- operator looks for a subsequence of the target that matches the input. If the
--- target attribute of the comparison is a set ("'SS'", "'NS'", or "'BS'"), then the
--- operator evaluates to true if it finds an exact match with any member of the
--- set.
+--         /AttributeValueList/ can contain only one /AttributeValue/ of
+--         type String, Number, Binary, String Set, Number Set, or Binary
+--         Set. If an item contains an /AttributeValue/ of a different type
+--         than the one provided in the request, the value does not match.
+--         For example, '{\"S\":\"6\"}' does not equal '{\"N\":\"6\"}'.
+--         Also, '{\"N\":\"6\"}' does not equal
+--         '{\"NS\":[\"6\", \"2\", \"1\"]}'.
 --
--- CONTAINS is supported for lists: When evaluating "'a CONTAINS b'", "'a'" can be
--- a list; however, "'b'" cannot be a set, a map, or a list.
+--     -   'LE' : Less than or equal.
 --
--- 'NOT_CONTAINS' : Checks for absence of a subsequence, or absence of a value
--- in a set.
+--         /AttributeValueList/ can contain only one /AttributeValue/
+--         element of type String, Number, or Binary (not a set type). If
+--         an item contains an /AttributeValue/ element of a different type
+--         than the one provided in the request, the value does not match.
+--         For example, '{\"S\":\"6\"}' does not equal '{\"N\":\"6\"}'.
+--         Also, '{\"N\":\"6\"}' does not compare to
+--         '{\"NS\":[\"6\", \"2\", \"1\"]}'.
 --
--- /AttributeValueList/ can contain only one /AttributeValue/ element of type
--- String, Number, or Binary (not a set type). If the target attribute of the
--- comparison is a String, then the operator checks for the absence of a
--- substring match. If the target attribute of the comparison is Binary, then
--- the operator checks for the absence of a subsequence of the target that
--- matches the input. If the target attribute of the comparison is a set ("'SS'", "'NS'", or "'BS'"), then the operator evaluates to true if it /does not/ find an
--- exact match with any member of the set.
+--     -   'LT' : Less than.
 --
--- NOT_CONTAINS is supported for lists: When evaluating "'a NOT CONTAINS b'", "'a'"
--- can be a list; however, "'b'" cannot be a set, a map, or a list.
+--         /AttributeValueList/ can contain only one /AttributeValue/ of
+--         type String, Number, or Binary (not a set type). If an item
+--         contains an /AttributeValue/ element of a different type than
+--         the one provided in the request, the value does not match. For
+--         example, '{\"S\":\"6\"}' does not equal '{\"N\":\"6\"}'. Also,
+--         '{\"N\":\"6\"}' does not compare to
+--         '{\"NS\":[\"6\", \"2\", \"1\"]}'.
 --
--- 'BEGINS_WITH' : Checks for a prefix.
+--     -   'GE' : Greater than or equal.
 --
--- /AttributeValueList/ can contain only one /AttributeValue/ of type String or
--- Binary (not a Number or a set type). The target attribute of the comparison
--- must be of type String or Binary (not a Number or a set type).
+--         /AttributeValueList/ can contain only one /AttributeValue/
+--         element of type String, Number, or Binary (not a set type). If
+--         an item contains an /AttributeValue/ element of a different type
+--         than the one provided in the request, the value does not match.
+--         For example, '{\"S\":\"6\"}' does not equal '{\"N\":\"6\"}'.
+--         Also, '{\"N\":\"6\"}' does not compare to
+--         '{\"NS\":[\"6\", \"2\", \"1\"]}'.
 --
+--     -   'GT' : Greater than.
 --
+--         /AttributeValueList/ can contain only one /AttributeValue/
+--         element of type String, Number, or Binary (not a set type). If
+--         an item contains an /AttributeValue/ element of a different type
+--         than the one provided in the request, the value does not match.
+--         For example, '{\"S\":\"6\"}' does not equal '{\"N\":\"6\"}'.
+--         Also, '{\"N\":\"6\"}' does not compare to
+--         '{\"NS\":[\"6\", \"2\", \"1\"]}'.
 --
--- 'IN' : Checks for matching elements within two sets.
+--     -   'NOT_NULL' : The attribute exists. 'NOT_NULL' is supported for
+--         all datatypes, including lists and maps.
 --
--- /AttributeValueList/ can contain one or more /AttributeValue/ elements of type
--- String, Number, or Binary (not a set type). These attributes are compared
--- against an existing set type attribute of an item. If any elements of the
--- input set are present in the item attribute, the expression evaluates to true.
+--         This operator tests for the existence of an attribute, not its
+--         data type. If the data type of attribute \"'a'\" is null, and
+--         you evaluate it using 'NOT_NULL', the result is a Boolean
+--         /true/. This result is because the attribute \"'a'\" exists; its
+--         data type is not relevant to the 'NOT_NULL' comparison operator.
 --
--- 'BETWEEN' : Greater than or equal to the first value, and less than or equal
--- to the second value.
+--     -   'NULL' : The attribute does not exist. 'NULL' is supported for
+--         all datatypes, including lists and maps.
 --
--- /AttributeValueList/ must contain two /AttributeValue/ elements of the same
--- type, either String, Number, or Binary (not a set type). A target attribute
--- matches if the target value is greater than, or equal to, the first element
--- and less than, or equal to, the second element. If an item contains an /AttributeValue/ element of a different type than the one provided in the request, the value
--- does not match. For example, '{"S":"6"}' does not compare to '{"N":"6"}'. Also, '{"N":"6"}' does not compare to '{"NS":["6", "2", "1"]}'
+--         This operator tests for the nonexistence of an attribute, not
+--         its data type. If the data type of attribute \"'a'\" is null,
+--         and you evaluate it using 'NULL', the result is a Boolean
+--         /false/. This is because the attribute \"'a'\" exists; its data
+--         type is not relevant to the 'NULL' comparison operator.
 --
--- For usage examples of /AttributeValueList/ and /ComparisonOperator/, see <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.html Legacy Conditional Parameters> in the /Amazon DynamoDB Developer Guide/.
+--     -   'CONTAINS' : Checks for a subsequence, or value in a set.
 --
--- For backward compatibility with previous DynamoDB releases, the following
--- parameters can be used instead of /AttributeValueList/ and /ComparisonOperator/:
+--         /AttributeValueList/ can contain only one /AttributeValue/
+--         element of type String, Number, or Binary (not a set type). If
+--         the target attribute of the comparison is of type String, then
+--         the operator checks for a substring match. If the target
+--         attribute of the comparison is of type Binary, then the operator
+--         looks for a subsequence of the target that matches the input. If
+--         the target attribute of the comparison is a set (\"'SS'\",
+--         \"'NS'\", or \"'BS'\"), then the operator evaluates to true if
+--         it finds an exact match with any member of the set.
 --
--- /Value/ - A value for DynamoDB to compare with an attribute.
+--         CONTAINS is supported for lists: When evaluating
+--         \"'a CONTAINS b'\", \"'a'\" can be a list; however, \"'b'\"
+--         cannot be a set, a map, or a list.
 --
--- /Exists/ - A Boolean value that causes DynamoDB to evaluate the value before
--- attempting the conditional operation:
+--     -   'NOT_CONTAINS' : Checks for absence of a subsequence, or absence
+--         of a value in a set.
 --
--- If /Exists/ is 'true', DynamoDB will check to see if that attribute value
--- already exists in the table. If it is found, then the condition evaluates to
--- true; otherwise the condition evaluate to false.
+--         /AttributeValueList/ can contain only one /AttributeValue/
+--         element of type String, Number, or Binary (not a set type). If
+--         the target attribute of the comparison is a String, then the
+--         operator checks for the absence of a substring match. If the
+--         target attribute of the comparison is Binary, then the operator
+--         checks for the absence of a subsequence of the target that
+--         matches the input. If the target attribute of the comparison is
+--         a set (\"'SS'\", \"'NS'\", or \"'BS'\"), then the operator
+--         evaluates to true if it /does not/ find an exact match with any
+--         member of the set.
 --
--- If /Exists/ is 'false', DynamoDB assumes that the attribute value does /not/
--- exist in the table. If in fact the value does not exist, then the assumption
--- is valid and the condition evaluates to true. If the value is found, despite
--- the assumption that it does not exist, the condition evaluates to false.
+--         NOT_CONTAINS is supported for lists: When evaluating
+--         \"'a NOT CONTAINS b'\", \"'a'\" can be a list; however, \"'b'\"
+--         cannot be a set, a map, or a list.
 --
--- Note that the default value for /Exists/ is 'true'.
+--     -   'BEGINS_WITH' : Checks for a prefix.
 --
--- The /Value/ and /Exists/ parameters are incompatible with /AttributeValueList/
--- and /ComparisonOperator/. Note that if you use both sets of parameters at once,
--- DynamoDB will return a /ValidationException/ exception.
+--         /AttributeValueList/ can contain only one /AttributeValue/ of
+--         type String or Binary (not a Number or a set type). The target
+--         attribute of the comparison must be of type String or Binary
+--         (not a Number or a set type).
 --
--- This parameter does not support attributes of type List or Map.
+--     -   'IN' : Checks for matching elements within two sets.
 --
-diExpected :: Lens' DeleteItem (HashMap Text ExpectedAttributeValue)
-diExpected = lens _diExpected (\s a -> s { _diExpected = a }) . _Map
-
--- | One or more substitution tokens for attribute names in an expression. The
--- following are some use cases for using /ExpressionAttributeNames/:
+--         /AttributeValueList/ can contain one or more /AttributeValue/
+--         elements of type String, Number, or Binary (not a set type).
+--         These attributes are compared against an existing set type
+--         attribute of an item. If any elements of the input set are
+--         present in the item attribute, the expression evaluates to true.
 --
--- To access an attribute whose name conflicts with a DynamoDB reserved word.
+--     -   'BETWEEN' : Greater than or equal to the first value, and less
+--         than or equal to the second value.
 --
--- To create a placeholder for repeating occurrences of an attribute name in
--- an expression.
+--         /AttributeValueList/ must contain two /AttributeValue/ elements
+--         of the same type, either String, Number, or Binary (not a set
+--         type). A target attribute matches if the target value is greater
+--         than, or equal to, the first element and less than, or equal to,
+--         the second element. If an item contains an /AttributeValue/
+--         element of a different type than the one provided in the
+--         request, the value does not match. For example, '{\"S\":\"6\"}'
+--         does not compare to '{\"N\":\"6\"}'. Also, '{\"N\":\"6\"}' does
+--         not compare to '{\"NS\":[\"6\", \"2\", \"1\"]}'
 --
--- To prevent special characters in an attribute name from being
--- misinterpreted in an expression.
+-- For usage examples of /AttributeValueList/ and /ComparisonOperator/, see
+-- <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.html Legacy Conditional Parameters>
+-- in the /Amazon DynamoDB Developer Guide/.
 --
--- Use the # character in an expression to dereference an attribute name. For
--- example, consider the following attribute name:
+-- For backward compatibility with previous DynamoDB releases, the
+-- following parameters can be used instead of /AttributeValueList/ and
+-- /ComparisonOperator/:
 --
--- 'Percentile'
+-- -   /Value/ - A value for DynamoDB to compare with an attribute.
 --
--- The name of this attribute conflicts with a reserved word, so it cannot be
--- used directly in an expression. (For the complete list of reserved words, see <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ReservedWords.html Reserved Words> in the /Amazon DynamoDB Developer Guide/). To work around this,
--- you could specify the following for /ExpressionAttributeNames/:
+-- -   /Exists/ - A Boolean value that causes DynamoDB to evaluate the
+--     value before attempting the conditional operation:
 --
--- '{"#P":"Percentile"}'
+--     -   If /Exists/ is 'true', DynamoDB will check to see if that
+--         attribute value already exists in the table. If it is found,
+--         then the condition evaluates to true; otherwise the condition
+--         evaluate to false.
 --
--- You could then use this substitution in an expression, as in this example:
+--     -   If /Exists/ is 'false', DynamoDB assumes that the attribute
+--         value does /not/ exist in the table. If in fact the value does
+--         not exist, then the assumption is valid and the condition
+--         evaluates to true. If the value is found, despite the assumption
+--         that it does not exist, the condition evaluates to false.
 --
--- '#P = :val'
+--     Note that the default value for /Exists/ is 'true'.
 --
--- Tokens that begin with the : character are /expression attribute values/,
--- which are placeholders for the actual value at runtime.
+-- The /Value/ and /Exists/ parameters are incompatible with
+-- /AttributeValueList/ and /ComparisonOperator/. Note that if you use both
+-- sets of parameters at once, DynamoDB will return a /ValidationException/
+-- exception.
 --
--- For more information on expression attribute names, see <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ExpressionPlaceholders.html Using Placeholdersfor Attribute Names and Values> in the /Amazon DynamoDB Developer Guide/.
-diExpressionAttributeNames :: Lens' DeleteItem (HashMap Text Text)
-diExpressionAttributeNames =
-    lens _diExpressionAttributeNames
-        (\s a -> s { _diExpressionAttributeNames = a })
-            . _Map
+-- This parameter does not support attributes of type List or Map.
+diExpected :: Lens' DeleteItem (HashMap Text ExpectedAttributeValue)
+diExpected = lens _diExpected (\ s a -> s{_diExpected = a}) . _Default . _Map;
 
--- | One or more values that can be substituted in an expression.
---
--- Use the : (colon) character in an expression to dereference an attribute
--- value. For example, suppose that you wanted to check whether the value of the /ProductStatus/ attribute was one of the following:
---
--- 'Available | Backordered | Discontinued'
---
--- You would first need to specify /ExpressionAttributeValues/ as follows:
---
--- '{ ":avail":{"S":"Available"}, ":back":{"S":"Backordered"},":disc":{"S":"Discontinued"} }'
---
--- You could then use these values in an expression, such as this:
---
--- 'ProductStatus IN (:avail, :back, :disc)'
---
--- For more information on expression attribute values, see <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.ExpressionPlaceholders.html Using Placeholdersfor Attribute Names and Values> in the /Amazon DynamoDB Developer Guide/.
-diExpressionAttributeValues :: Lens' DeleteItem (HashMap Text AttributeValue)
-diExpressionAttributeValues =
-    lens _diExpressionAttributeValues
-        (\s a -> s { _diExpressionAttributeValues = a })
-            . _Map
+-- | The name of the table from which to delete the item.
+diTableName :: Lens' DeleteItem Text
+diTableName = lens _diTableName (\ s a -> s{_diTableName = a});
 
--- | A map of attribute names to /AttributeValue/ objects, representing the primary
--- key of the item to delete.
+-- | A map of attribute names to /AttributeValue/ objects, representing the
+-- primary key of the item to delete.
 --
--- For the primary key, you must provide all of the attributes. For example,
--- with a hash type primary key, you only need to provide the hash attribute.
--- For a hash-and-range type primary key, you must provide both the hash
--- attribute and the range attribute.
+-- For the primary key, you must provide all of the attributes. For
+-- example, with a hash type primary key, you only need to provide the hash
+-- attribute. For a hash-and-range type primary key, you must provide both
+-- the hash attribute and the range attribute.
 diKey :: Lens' DeleteItem (HashMap Text AttributeValue)
-diKey = lens _diKey (\s a -> s { _diKey = a }) . _Map
+diKey = lens _diKey (\ s a -> s{_diKey = a}) . _Map;
 
-diReturnConsumedCapacity :: Lens' DeleteItem (Maybe ReturnConsumedCapacity)
-diReturnConsumedCapacity =
-    lens _diReturnConsumedCapacity
-        (\s a -> s { _diReturnConsumedCapacity = a })
+instance AWSRequest DeleteItem where
+        type Sv DeleteItem = DynamoDB
+        type Rs DeleteItem = DeleteItemResponse
+        request = postJSON
+        response
+          = receiveJSON
+              (\ s h x ->
+                 DeleteItemResponse' <$>
+                   (x .?> "ConsumedCapacity") <*>
+                     (x .?> "ItemCollectionMetrics")
+                     <*> (x .?> "Attributes" .!@ mempty)
+                     <*> (pure (fromEnum s)))
 
--- | A value that if set to 'SIZE', the response includes statistics about item
--- collections, if any, that were modified during the operation are returned in
--- the response. If set to 'NONE' (the default), no statistics are returned.
-diReturnItemCollectionMetrics :: Lens' DeleteItem (Maybe ReturnItemCollectionMetrics)
-diReturnItemCollectionMetrics =
-    lens _diReturnItemCollectionMetrics
-        (\s a -> s { _diReturnItemCollectionMetrics = a })
+instance ToHeaders DeleteItem where
+        toHeaders
+          = const
+              (mconcat
+                 ["X-Amz-Target" =#
+                    ("DynamoDB_20120810.DeleteItem" :: ByteString),
+                  "Content-Type" =#
+                    ("application/x-amz-json-1.0" :: ByteString)])
 
--- | Use /ReturnValues/ if you want to get the item attributes as they appeared
--- before they were deleted. For /DeleteItem/, the valid values are:
---
--- 'NONE' - If /ReturnValues/ is not specified, or if its value is 'NONE', then
--- nothing is returned. (This setting is the default for /ReturnValues/.)
---
--- 'ALL_OLD' - The content of the old item is returned.
---
---
-diReturnValues :: Lens' DeleteItem (Maybe ReturnValue)
-diReturnValues = lens _diReturnValues (\s a -> s { _diReturnValues = a })
+instance ToJSON DeleteItem where
+        toJSON DeleteItem'{..}
+          = object
+              ["ReturnValues" .= _diReturnValues,
+               "ExpressionAttributeNames" .=
+                 _diExpressionAttributeNames,
+               "ReturnConsumedCapacity" .=
+                 _diReturnConsumedCapacity,
+               "ExpressionAttributeValues" .=
+                 _diExpressionAttributeValues,
+               "ReturnItemCollectionMetrics" .=
+                 _diReturnItemCollectionMetrics,
+               "ConditionExpression" .= _diConditionExpression,
+               "ConditionalOperator" .= _diConditionalOperator,
+               "Expected" .= _diExpected,
+               "TableName" .= _diTableName, "Key" .= _diKey]
 
--- | The name of the table from which to delete the item.
-diTableName :: Lens' DeleteItem Text
-diTableName = lens _diTableName (\s a -> s { _diTableName = a })
+instance ToPath DeleteItem where
+        toPath = const "/"
 
-data DeleteItemResponse = DeleteItemResponse
-    { _dirAttributes            :: Map Text AttributeValue
-    , _dirConsumedCapacity      :: Maybe ConsumedCapacity
-    , _dirItemCollectionMetrics :: Maybe ItemCollectionMetrics
-    } deriving (Eq, Read, Show)
+instance ToQuery DeleteItem where
+        toQuery = const mempty
 
--- | 'DeleteItemResponse' constructor.
+-- | Represents the output of a /DeleteItem/ operation.
 --
--- The fields accessible through corresponding lenses are:
+-- /See:/ 'deleteItemResponse' smart constructor.
+data DeleteItemResponse = DeleteItemResponse'
+    { _dirsConsumedCapacity      :: !(Maybe ConsumedCapacity)
+    , _dirsItemCollectionMetrics :: !(Maybe ItemCollectionMetrics)
+    , _dirsAttributes            :: !(Maybe (Map Text AttributeValue))
+    , _dirsStatus                :: !Int
+    } deriving (Eq,Read,Show,Data,Typeable,Generic)
+
+-- | Creates a value of 'DeleteItemResponse' with the minimum fields required to make a request.
 --
--- * 'dirAttributes' @::@ 'HashMap' 'Text' 'AttributeValue'
+-- Use one of the following lenses to modify other fields as desired:
 --
--- * 'dirConsumedCapacity' @::@ 'Maybe' 'ConsumedCapacity'
+-- * 'dirsConsumedCapacity'
 --
--- * 'dirItemCollectionMetrics' @::@ 'Maybe' 'ItemCollectionMetrics'
+-- * 'dirsItemCollectionMetrics'
 --
-deleteItemResponse :: DeleteItemResponse
-deleteItemResponse = DeleteItemResponse
-    { _dirAttributes            = mempty
-    , _dirConsumedCapacity      = Nothing
-    , _dirItemCollectionMetrics = Nothing
+-- * 'dirsAttributes'
+--
+-- * 'dirsStatus'
+deleteItemResponse
+    :: Int -- ^ 'dirsStatus'
+    -> DeleteItemResponse
+deleteItemResponse pStatus_ =
+    DeleteItemResponse'
+    { _dirsConsumedCapacity = Nothing
+    , _dirsItemCollectionMetrics = Nothing
+    , _dirsAttributes = Nothing
+    , _dirsStatus = pStatus_
     }
 
--- | A map of attribute names to /AttributeValue/ objects, representing the item as
--- it appeared before the /DeleteItem/ operation. This map appears in the response
--- only if /ReturnValues/ was specified as 'ALL_OLD' in the request.
-dirAttributes :: Lens' DeleteItemResponse (HashMap Text AttributeValue)
-dirAttributes = lens _dirAttributes (\s a -> s { _dirAttributes = a }) . _Map
-
-dirConsumedCapacity :: Lens' DeleteItemResponse (Maybe ConsumedCapacity)
-dirConsumedCapacity =
-    lens _dirConsumedCapacity (\s a -> s { _dirConsumedCapacity = a })
+-- | Undocumented member.
+dirsConsumedCapacity :: Lens' DeleteItemResponse (Maybe ConsumedCapacity)
+dirsConsumedCapacity = lens _dirsConsumedCapacity (\ s a -> s{_dirsConsumedCapacity = a});
 
 -- | Information about item collections, if any, that were affected by the
--- operation. /ItemCollectionMetrics/ is only returned if the request asked for
--- it. If the table does not have any local secondary indexes, this information
--- is not returned in the response.
+-- operation. /ItemCollectionMetrics/ is only returned if the request asked
+-- for it. If the table does not have any local secondary indexes, this
+-- information is not returned in the response.
 --
 -- Each /ItemCollectionMetrics/ element consists of:
 --
--- /ItemCollectionKey/ - The hash key value of the item collection. This is the
--- same as the hash key of the item.
---
--- /SizeEstimateRange/ - An estimate of item collection size, in gigabytes. This
--- value is a two-element array containing a lower bound and an upper bound for
--- the estimate. The estimate includes the size of all the items in the table,
--- plus the size of all attributes projected into all of the local secondary
--- indexes on that table. Use this estimate to measure whether a local secondary
--- index is approaching its size limit.
+-- -   /ItemCollectionKey/ - The hash key value of the item collection.
+--     This is the same as the hash key of the item.
 --
--- The estimate is subject to change over time; therefore, do not rely on the
--- precision or accuracy of the estimate.
+-- -   /SizeEstimateRange/ - An estimate of item collection size, in
+--     gigabytes. This value is a two-element array containing a lower
+--     bound and an upper bound for the estimate. The estimate includes the
+--     size of all the items in the table, plus the size of all attributes
+--     projected into all of the local secondary indexes on that table. Use
+--     this estimate to measure whether a local secondary index is
+--     approaching its size limit.
 --
+--     The estimate is subject to change over time; therefore, do not rely
+--     on the precision or accuracy of the estimate.
 --
-dirItemCollectionMetrics :: Lens' DeleteItemResponse (Maybe ItemCollectionMetrics)
-dirItemCollectionMetrics =
-    lens _dirItemCollectionMetrics
-        (\s a -> s { _dirItemCollectionMetrics = a })
-
-instance ToPath DeleteItem where
-    toPath = const "/"
-
-instance ToQuery DeleteItem where
-    toQuery = const mempty
-
-instance ToHeaders DeleteItem
-
-instance ToJSON DeleteItem where
-    toJSON DeleteItem{..} = object
-        [ "TableName"                   .= _diTableName
-        , "Key"                         .= _diKey
-        , "Expected"                    .= _diExpected
-        , "ConditionalOperator"         .= _diConditionalOperator
-        , "ReturnValues"                .= _diReturnValues
-        , "ReturnConsumedCapacity"      .= _diReturnConsumedCapacity
-        , "ReturnItemCollectionMetrics" .= _diReturnItemCollectionMetrics
-        , "ConditionExpression"         .= _diConditionExpression
-        , "ExpressionAttributeNames"    .= _diExpressionAttributeNames
-        , "ExpressionAttributeValues"   .= _diExpressionAttributeValues
-        ]
-
-instance AWSRequest DeleteItem where
-    type Sv DeleteItem = DynamoDB
-    type Rs DeleteItem = DeleteItemResponse
+dirsItemCollectionMetrics :: Lens' DeleteItemResponse (Maybe ItemCollectionMetrics)
+dirsItemCollectionMetrics = lens _dirsItemCollectionMetrics (\ s a -> s{_dirsItemCollectionMetrics = a});
 
-    request  = post "DeleteItem"
-    response = jsonResponse
+-- | A map of attribute names to /AttributeValue/ objects, representing the
+-- item as it appeared before the /DeleteItem/ operation. This map appears
+-- in the response only if /ReturnValues/ was specified as 'ALL_OLD' in the
+-- request.
+dirsAttributes :: Lens' DeleteItemResponse (HashMap Text AttributeValue)
+dirsAttributes = lens _dirsAttributes (\ s a -> s{_dirsAttributes = a}) . _Default . _Map;
 
-instance FromJSON DeleteItemResponse where
-    parseJSON = withObject "DeleteItemResponse" $ \o -> DeleteItemResponse
-        <$> o .:? "Attributes" .!= mempty
-        <*> o .:? "ConsumedCapacity"
-        <*> o .:? "ItemCollectionMetrics"
+-- | The response status code.
+dirsStatus :: Lens' DeleteItemResponse Int
+dirsStatus = lens _dirsStatus (\ s a -> s{_dirsStatus = a});
diff --git a/gen/Network/AWS/DynamoDB/DeleteTable.hs b/gen/Network/AWS/DynamoDB/DeleteTable.hs
--- a/gen/Network/AWS/DynamoDB/DeleteTable.hs
+++ b/gen/Network/AWS/DynamoDB/DeleteTable.hs
@@ -1,121 +1,148 @@
-{-# LANGUAGE DataKinds                   #-}
-{-# LANGUAGE DeriveGeneric               #-}
-{-# LANGUAGE FlexibleInstances           #-}
-{-# LANGUAGE GeneralizedNewtypeDeriving  #-}
-{-# LANGUAGE LambdaCase                  #-}
-{-# LANGUAGE NoImplicitPrelude           #-}
-{-# LANGUAGE OverloadedStrings           #-}
-{-# LANGUAGE RecordWildCards             #-}
-{-# LANGUAGE TypeFamilies                #-}
+{-# LANGUAGE DeriveDataTypeable #-}
+{-# LANGUAGE DeriveGeneric      #-}
+{-# LANGUAGE OverloadedStrings  #-}
+{-# LANGUAGE RecordWildCards    #-}
+{-# LANGUAGE TypeFamilies       #-}
 
 {-# OPTIONS_GHC -fno-warn-unused-imports #-}
+{-# OPTIONS_GHC -fno-warn-unused-binds   #-}
+{-# OPTIONS_GHC -fno-warn-unused-matches #-}
 
+-- Derived from AWS service descriptions, licensed under Apache 2.0.
+
+-- |
 -- Module      : Network.AWS.DynamoDB.DeleteTable
--- Copyright   : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>
--- License     : This Source Code Form is subject to the terms of
---               the Mozilla Public License, v. 2.0.
---               A copy of the MPL can be found in the LICENSE file or
---               you can obtain it at http://mozilla.org/MPL/2.0/.
+-- Copyright   : (c) 2013-2015 Brendan Hay
+-- License     : Mozilla Public License, v. 2.0.
 -- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com>
--- Stability   : experimental
+-- Stability   : auto-generated
 -- Portability : non-portable (GHC extensions)
 --
--- Derived from AWS service descriptions, licensed under Apache 2.0.
-
--- | The /DeleteTable/ operation deletes a table and all of its items. After a /DeleteTable/ request, the specified table is in the 'DELETING' state until DynamoDB
--- completes the deletion. If the table is in the 'ACTIVE' state, you can delete
--- it. If a table is in 'CREATING' or 'UPDATING' states, then DynamoDB returns a /ResourceInUseException/. If the specified table does not exist, DynamoDB returns a /ResourceNotFoundException/. If table is already in the 'DELETING' state, no error is returned.
+-- The /DeleteTable/ operation deletes a table and all of its items. After
+-- a /DeleteTable/ request, the specified table is in the 'DELETING' state
+-- until DynamoDB completes the deletion. If the table is in the 'ACTIVE'
+-- state, you can delete it. If a table is in 'CREATING' or 'UPDATING'
+-- states, then DynamoDB returns a /ResourceInUseException/. If the
+-- specified table does not exist, DynamoDB returns a
+-- /ResourceNotFoundException/. If table is already in the 'DELETING'
+-- state, no error is returned.
 --
--- DynamoDB might continue to accept data read and write operations, such as /GetItem/ and /PutItem/, on a table in the 'DELETING' state until the table deletion is
--- complete.
+-- DynamoDB might continue to accept data read and write operations, such
+-- as /GetItem/ and /PutItem/, on a table in the 'DELETING' state until the
+-- table deletion is complete.
 --
 -- When you delete a table, any indexes on that table are also deleted.
 --
+-- If you have DynamoDB Streams enabled on the table, then the
+-- corresponding stream on that table goes into the 'DISABLED' state, and
+-- the stream is automatically deleted after 24 hours.
+--
 -- Use the /DescribeTable/ API to check the status of the table.
 --
--- <http://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_DeleteTable.html>
+-- /See:/ <http://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_DeleteTable.html AWS API Reference> for DeleteTable.
 module Network.AWS.DynamoDB.DeleteTable
     (
-    -- * Request
-      DeleteTable
-    -- ** Request constructor
-    , deleteTable
-    -- ** Request lenses
+    -- * Creating a Request
+      deleteTable
+    , DeleteTable
+    -- * Request Lenses
     , dtTableName
 
-    -- * Response
-    , DeleteTableResponse
-    -- ** Response constructor
+    -- * Destructuring the Response
     , deleteTableResponse
-    -- ** Response lenses
-    , dtrTableDescription
+    , DeleteTableResponse
+    -- * Response Lenses
+    , dtrsTableDescription
+    , dtrsStatus
     ) where
 
-import Network.AWS.Data (Object)
-import Network.AWS.Prelude
-import Network.AWS.Request.JSON
-import Network.AWS.DynamoDB.Types
-import qualified GHC.Exts
+import           Network.AWS.DynamoDB.Types
+import           Network.AWS.DynamoDB.Types.Product
+import           Network.AWS.Prelude
+import           Network.AWS.Request
+import           Network.AWS.Response
 
-newtype DeleteTable = DeleteTable
+-- | Represents the input of a /DeleteTable/ operation.
+--
+-- /See:/ 'deleteTable' smart constructor.
+newtype DeleteTable = DeleteTable'
     { _dtTableName :: Text
-    } deriving (Eq, Ord, Read, Show, Monoid, IsString)
+    } deriving (Eq,Read,Show,Data,Typeable,Generic)
 
--- | 'DeleteTable' constructor.
---
--- The fields accessible through corresponding lenses are:
+-- | Creates a value of 'DeleteTable' with the minimum fields required to make a request.
 --
--- * 'dtTableName' @::@ 'Text'
+-- Use one of the following lenses to modify other fields as desired:
 --
-deleteTable :: Text -- ^ 'dtTableName'
-            -> DeleteTable
-deleteTable p1 = DeleteTable
-    { _dtTableName = p1
+-- * 'dtTableName'
+deleteTable
+    :: Text -- ^ 'dtTableName'
+    -> DeleteTable
+deleteTable pTableName_ =
+    DeleteTable'
+    { _dtTableName = pTableName_
     }
 
 -- | The name of the table to delete.
 dtTableName :: Lens' DeleteTable Text
-dtTableName = lens _dtTableName (\s a -> s { _dtTableName = a })
+dtTableName = lens _dtTableName (\ s a -> s{_dtTableName = a});
 
-newtype DeleteTableResponse = DeleteTableResponse
-    { _dtrTableDescription :: Maybe TableDescription
-    } deriving (Eq, Read, Show)
+instance AWSRequest DeleteTable where
+        type Sv DeleteTable = DynamoDB
+        type Rs DeleteTable = DeleteTableResponse
+        request = postJSON
+        response
+          = receiveJSON
+              (\ s h x ->
+                 DeleteTableResponse' <$>
+                   (x .?> "TableDescription") <*> (pure (fromEnum s)))
 
--- | 'DeleteTableResponse' constructor.
---
--- The fields accessible through corresponding lenses are:
---
--- * 'dtrTableDescription' @::@ 'Maybe' 'TableDescription'
---
-deleteTableResponse :: DeleteTableResponse
-deleteTableResponse = DeleteTableResponse
-    { _dtrTableDescription = Nothing
-    }
+instance ToHeaders DeleteTable where
+        toHeaders
+          = const
+              (mconcat
+                 ["X-Amz-Target" =#
+                    ("DynamoDB_20120810.DeleteTable" :: ByteString),
+                  "Content-Type" =#
+                    ("application/x-amz-json-1.0" :: ByteString)])
 
-dtrTableDescription :: Lens' DeleteTableResponse (Maybe TableDescription)
-dtrTableDescription =
-    lens _dtrTableDescription (\s a -> s { _dtrTableDescription = a })
+instance ToJSON DeleteTable where
+        toJSON DeleteTable'{..}
+          = object ["TableName" .= _dtTableName]
 
 instance ToPath DeleteTable where
-    toPath = const "/"
+        toPath = const "/"
 
 instance ToQuery DeleteTable where
-    toQuery = const mempty
-
-instance ToHeaders DeleteTable
+        toQuery = const mempty
 
-instance ToJSON DeleteTable where
-    toJSON DeleteTable{..} = object
-        [ "TableName" .= _dtTableName
-        ]
+-- | Represents the output of a /DeleteTable/ operation.
+--
+-- /See:/ 'deleteTableResponse' smart constructor.
+data DeleteTableResponse = DeleteTableResponse'
+    { _dtrsTableDescription :: !(Maybe TableDescription)
+    , _dtrsStatus           :: !Int
+    } deriving (Eq,Read,Show,Data,Typeable,Generic)
 
-instance AWSRequest DeleteTable where
-    type Sv DeleteTable = DynamoDB
-    type Rs DeleteTable = DeleteTableResponse
+-- | Creates a value of 'DeleteTableResponse' with the minimum fields required to make a request.
+--
+-- Use one of the following lenses to modify other fields as desired:
+--
+-- * 'dtrsTableDescription'
+--
+-- * 'dtrsStatus'
+deleteTableResponse
+    :: Int -- ^ 'dtrsStatus'
+    -> DeleteTableResponse
+deleteTableResponse pStatus_ =
+    DeleteTableResponse'
+    { _dtrsTableDescription = Nothing
+    , _dtrsStatus = pStatus_
+    }
 
-    request  = post "DeleteTable"
-    response = jsonResponse
+-- | Undocumented member.
+dtrsTableDescription :: Lens' DeleteTableResponse (Maybe TableDescription)
+dtrsTableDescription = lens _dtrsTableDescription (\ s a -> s{_dtrsTableDescription = a});
 
-instance FromJSON DeleteTableResponse where
-    parseJSON = withObject "DeleteTableResponse" $ \o -> DeleteTableResponse
-        <$> o .:? "TableDescription"
+-- | The response status code.
+dtrsStatus :: Lens' DeleteTableResponse Int
+dtrsStatus = lens _dtrsStatus (\ s a -> s{_dtrsStatus = a});
diff --git a/gen/Network/AWS/DynamoDB/DescribeTable.hs b/gen/Network/AWS/DynamoDB/DescribeTable.hs
--- a/gen/Network/AWS/DynamoDB/DescribeTable.hs
+++ b/gen/Network/AWS/DynamoDB/DescribeTable.hs
@@ -1,122 +1,137 @@
-{-# LANGUAGE DataKinds                   #-}
-{-# LANGUAGE DeriveGeneric               #-}
-{-# LANGUAGE FlexibleInstances           #-}
-{-# LANGUAGE GeneralizedNewtypeDeriving  #-}
-{-# LANGUAGE LambdaCase                  #-}
-{-# LANGUAGE NoImplicitPrelude           #-}
-{-# LANGUAGE OverloadedStrings           #-}
-{-# LANGUAGE RecordWildCards             #-}
-{-# LANGUAGE TypeFamilies                #-}
+{-# LANGUAGE DeriveDataTypeable #-}
+{-# LANGUAGE DeriveGeneric      #-}
+{-# LANGUAGE OverloadedStrings  #-}
+{-# LANGUAGE RecordWildCards    #-}
+{-# LANGUAGE TypeFamilies       #-}
 
 {-# OPTIONS_GHC -fno-warn-unused-imports #-}
+{-# OPTIONS_GHC -fno-warn-unused-binds   #-}
+{-# OPTIONS_GHC -fno-warn-unused-matches #-}
 
+-- Derived from AWS service descriptions, licensed under Apache 2.0.
+
+-- |
 -- Module      : Network.AWS.DynamoDB.DescribeTable
--- Copyright   : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>
--- License     : This Source Code Form is subject to the terms of
---               the Mozilla Public License, v. 2.0.
---               A copy of the MPL can be found in the LICENSE file or
---               you can obtain it at http://mozilla.org/MPL/2.0/.
+-- Copyright   : (c) 2013-2015 Brendan Hay
+-- License     : Mozilla Public License, v. 2.0.
 -- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com>
--- Stability   : experimental
+-- Stability   : auto-generated
 -- Portability : non-portable (GHC extensions)
 --
--- Derived from AWS service descriptions, licensed under Apache 2.0.
-
--- | Returns information about the table, including the current status of the
--- table, when it was created, the primary key schema, and any indexes on the
--- table.
+-- Returns information about the table, including the current status of the
+-- table, when it was created, the primary key schema, and any indexes on
+-- the table.
 --
 -- If you issue a DescribeTable request immediately after a CreateTable
--- request, DynamoDB might return a ResourceNotFoundException. This is because
--- DescribeTable uses an eventually consistent query, and the metadata for your
--- table might not be available at that moment. Wait for a few seconds, and then
--- try the DescribeTable request again.
---
---
+-- request, DynamoDB might return a ResourceNotFoundException. This is
+-- because DescribeTable uses an eventually consistent query, and the
+-- metadata for your table might not be available at that moment. Wait for
+-- a few seconds, and then try the DescribeTable request again.
 --
--- <http://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_DescribeTable.html>
+-- /See:/ <http://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_DescribeTable.html AWS API Reference> for DescribeTable.
 module Network.AWS.DynamoDB.DescribeTable
     (
-    -- * Request
-      DescribeTable
-    -- ** Request constructor
-    , describeTable
-    -- ** Request lenses
-    , dt1TableName
+    -- * Creating a Request
+      describeTable
+    , DescribeTable
+    -- * Request Lenses
+    , dTableName
 
-    -- * Response
-    , DescribeTableResponse
-    -- ** Response constructor
+    -- * Destructuring the Response
     , describeTableResponse
-    -- ** Response lenses
-    , dtrTable
+    , DescribeTableResponse
+    -- * Response Lenses
+    , drsTable
+    , drsStatus
     ) where
 
-import Network.AWS.Data (Object)
-import Network.AWS.Prelude
-import Network.AWS.Request.JSON
-import Network.AWS.DynamoDB.Types
-import qualified GHC.Exts
-
-newtype DescribeTable = DescribeTable
-    { _dt1TableName :: Text
-    } deriving (Eq, Ord, Read, Show, Monoid, IsString)
+import           Network.AWS.DynamoDB.Types
+import           Network.AWS.DynamoDB.Types.Product
+import           Network.AWS.Prelude
+import           Network.AWS.Request
+import           Network.AWS.Response
 
--- | 'DescribeTable' constructor.
+-- | Represents the input of a /DescribeTable/ operation.
 --
--- The fields accessible through corresponding lenses are:
+-- /See:/ 'describeTable' smart constructor.
+newtype DescribeTable = DescribeTable'
+    { _dTableName :: Text
+    } deriving (Eq,Read,Show,Data,Typeable,Generic)
+
+-- | Creates a value of 'DescribeTable' with the minimum fields required to make a request.
 --
--- * 'dt1TableName' @::@ 'Text'
+-- Use one of the following lenses to modify other fields as desired:
 --
-describeTable :: Text -- ^ 'dt1TableName'
-              -> DescribeTable
-describeTable p1 = DescribeTable
-    { _dt1TableName = p1
+-- * 'dTableName'
+describeTable
+    :: Text -- ^ 'dTableName'
+    -> DescribeTable
+describeTable pTableName_ =
+    DescribeTable'
+    { _dTableName = pTableName_
     }
 
 -- | The name of the table to describe.
-dt1TableName :: Lens' DescribeTable Text
-dt1TableName = lens _dt1TableName (\s a -> s { _dt1TableName = a })
+dTableName :: Lens' DescribeTable Text
+dTableName = lens _dTableName (\ s a -> s{_dTableName = a});
 
-newtype DescribeTableResponse = DescribeTableResponse
-    { _dtrTable :: TableDescription
-    } deriving (Eq, Read, Show)
+instance AWSRequest DescribeTable where
+        type Sv DescribeTable = DynamoDB
+        type Rs DescribeTable = DescribeTableResponse
+        request = postJSON
+        response
+          = receiveJSON
+              (\ s h x ->
+                 DescribeTableResponse' <$>
+                   (x .?> "Table") <*> (pure (fromEnum s)))
 
--- | 'DescribeTableResponse' constructor.
---
--- The fields accessible through corresponding lenses are:
---
--- * 'dtrTable' @::@ 'TableDescription'
---
-describeTableResponse :: TableDescription -- ^ 'dtrTable'
-                      -> DescribeTableResponse
-describeTableResponse p1 = DescribeTableResponse
-    { _dtrTable = p1
-    }
+instance ToHeaders DescribeTable where
+        toHeaders
+          = const
+              (mconcat
+                 ["X-Amz-Target" =#
+                    ("DynamoDB_20120810.DescribeTable" :: ByteString),
+                  "Content-Type" =#
+                    ("application/x-amz-json-1.0" :: ByteString)])
 
-dtrTable :: Lens' DescribeTableResponse TableDescription
-dtrTable = lens _dtrTable (\s a -> s { _dtrTable = a })
+instance ToJSON DescribeTable where
+        toJSON DescribeTable'{..}
+          = object ["TableName" .= _dTableName]
 
 instance ToPath DescribeTable where
-    toPath = const "/"
+        toPath = const "/"
 
 instance ToQuery DescribeTable where
-    toQuery = const mempty
-
-instance ToHeaders DescribeTable
+        toQuery = const mempty
 
-instance ToJSON DescribeTable where
-    toJSON DescribeTable{..} = object
-        [ "TableName" .= _dt1TableName
-        ]
+-- | Represents the output of a /DescribeTable/ operation.
+--
+-- /See:/ 'describeTableResponse' smart constructor.
+data DescribeTableResponse = DescribeTableResponse'
+    { _drsTable  :: !(Maybe TableDescription)
+    , _drsStatus :: !Int
+    } deriving (Eq,Read,Show,Data,Typeable,Generic)
 
-instance AWSRequest DescribeTable where
-    type Sv DescribeTable = DynamoDB
-    type Rs DescribeTable = DescribeTableResponse
+-- | Creates a value of 'DescribeTableResponse' with the minimum fields required to make a request.
+--
+-- Use one of the following lenses to modify other fields as desired:
+--
+-- * 'drsTable'
+--
+-- * 'drsStatus'
+describeTableResponse
+    :: Int -- ^ 'drsStatus'
+    -> DescribeTableResponse
+describeTableResponse pStatus_ =
+    DescribeTableResponse'
+    { _drsTable = Nothing
+    , _drsStatus = pStatus_
+    }
 
-    request  = post "DescribeTable"
-    response = jsonResponse
+-- | Undocumented member.
+drsTable :: Lens' DescribeTableResponse (Maybe TableDescription)
+drsTable = lens _drsTable (\ s a -> s{_drsTable = a});
 
-instance FromJSON DescribeTableResponse where
-    parseJSON = withObject "DescribeTableResponse" $ \o -> DescribeTableResponse
-        <$> o .:  "Table"
+-- | The response status code.
+drsStatus :: Lens' DescribeTableResponse Int
+drsStatus = lens _drsStatus (\ s a -> s{_drsStatus = a});
diff --git a/gen/Network/AWS/DynamoDB/GetItem.hs b/gen/Network/AWS/DynamoDB/GetItem.hs
--- a/gen/Network/AWS/DynamoDB/GetItem.hs
+++ b/gen/Network/AWS/DynamoDB/GetItem.hs
@@ -1,256 +1,280 @@
-{-# LANGUAGE DataKinds                   #-}
-{-# LANGUAGE DeriveGeneric               #-}
-{-# LANGUAGE FlexibleInstances           #-}
-{-# LANGUAGE GeneralizedNewtypeDeriving  #-}
-{-# LANGUAGE LambdaCase                  #-}
-{-# LANGUAGE NoImplicitPrelude           #-}
-{-# LANGUAGE OverloadedStrings           #-}
-{-# LANGUAGE RecordWildCards             #-}
-{-# LANGUAGE TypeFamilies                #-}
+{-# LANGUAGE DeriveDataTypeable #-}
+{-# LANGUAGE DeriveGeneric      #-}
+{-# LANGUAGE OverloadedStrings  #-}
+{-# LANGUAGE RecordWildCards    #-}
+{-# LANGUAGE TypeFamilies       #-}
 
 {-# OPTIONS_GHC -fno-warn-unused-imports #-}
+{-# OPTIONS_GHC -fno-warn-unused-binds   #-}
+{-# OPTIONS_GHC -fno-warn-unused-matches #-}
 
+-- Derived from AWS service descriptions, licensed under Apache 2.0.
+
+-- |
 -- Module      : Network.AWS.DynamoDB.GetItem
--- Copyright   : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>
--- License     : This Source Code Form is subject to the terms of
---               the Mozilla Public License, v. 2.0.
---               A copy of the MPL can be found in the LICENSE file or
---               you can obtain it at http://mozilla.org/MPL/2.0/.
+-- Copyright   : (c) 2013-2015 Brendan Hay
+-- License     : Mozilla Public License, v. 2.0.
 -- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com>
--- Stability   : experimental
+-- Stability   : auto-generated
 -- Portability : non-portable (GHC extensions)
 --
--- Derived from AWS service descriptions, licensed under Apache 2.0.
-
--- | The /GetItem/ operation returns a set of attributes for the item with the given
--- primary key. If there is no matching item, /GetItem/ does not return any data.
+-- The /GetItem/ operation returns a set of attributes for the item with
+-- the given primary key. If there is no matching item, /GetItem/ does not
+-- return any data.
 --
 -- /GetItem/ provides an eventually consistent read by default. If your
--- application requires a strongly consistent read, set /ConsistentRead/ to 'true'.
--- Although a strongly consistent read might take more time than an eventually
--- consistent read, it always returns the last updated value.
+-- application requires a strongly consistent read, set /ConsistentRead/ to
+-- 'true'. Although a strongly consistent read might take more time than an
+-- eventually consistent read, it always returns the last updated value.
 --
--- <http://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_GetItem.html>
+-- /See:/ <http://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_GetItem.html AWS API Reference> for GetItem.
 module Network.AWS.DynamoDB.GetItem
     (
-    -- * Request
-      GetItem
-    -- ** Request constructor
-    , getItem
-    -- ** Request lenses
-    , giAttributesToGet
+    -- * Creating a Request
+      getItem
+    , GetItem
+    -- * Request Lenses
+    , giProjectionExpression
     , giConsistentRead
     , giExpressionAttributeNames
-    , giKey
-    , giProjectionExpression
+    , giAttributesToGet
     , giReturnConsumedCapacity
     , giTableName
+    , giKey
 
-    -- * Response
-    , GetItemResponse
-    -- ** Response constructor
+    -- * Destructuring the Response
     , getItemResponse
-    -- ** Response lenses
-    , girConsumedCapacity
-    , girItem
+    , GetItemResponse
+    -- * Response Lenses
+    , girsConsumedCapacity
+    , girsItem
+    , girsStatus
     ) where
 
-import Network.AWS.Data (Object)
-import Network.AWS.Prelude
-import Network.AWS.Request.JSON
-import Network.AWS.DynamoDB.Types
-import qualified GHC.Exts
-
-data GetItem = GetItem
-    { _giAttributesToGet          :: List1 "AttributesToGet" Text
-    , _giConsistentRead           :: Maybe Bool
-    , _giExpressionAttributeNames :: Map Text Text
-    , _giKey                      :: Map Text AttributeValue
-    , _giProjectionExpression     :: Maybe Text
-    , _giReturnConsumedCapacity   :: Maybe ReturnConsumedCapacity
-    , _giTableName                :: Text
-    } deriving (Eq, Read, Show)
+import           Network.AWS.DynamoDB.Types
+import           Network.AWS.DynamoDB.Types.Product
+import           Network.AWS.Prelude
+import           Network.AWS.Request
+import           Network.AWS.Response
 
--- | 'GetItem' constructor.
+-- | Represents the input of a /GetItem/ operation.
 --
--- The fields accessible through corresponding lenses are:
+-- /See:/ 'getItem' smart constructor.
+data GetItem = GetItem'
+    { _giProjectionExpression     :: !(Maybe Text)
+    , _giConsistentRead           :: !(Maybe Bool)
+    , _giExpressionAttributeNames :: !(Maybe (Map Text Text))
+    , _giAttributesToGet          :: !(Maybe (List1 Text))
+    , _giReturnConsumedCapacity   :: !(Maybe ReturnConsumedCapacity)
+    , _giTableName                :: !Text
+    , _giKey                      :: !(Map Text AttributeValue)
+    } deriving (Eq,Read,Show,Data,Typeable,Generic)
+
+-- | Creates a value of 'GetItem' with the minimum fields required to make a request.
 --
--- * 'giAttributesToGet' @::@ 'NonEmpty' 'Text'
+-- Use one of the following lenses to modify other fields as desired:
 --
--- * 'giConsistentRead' @::@ 'Maybe' 'Bool'
+-- * 'giProjectionExpression'
 --
--- * 'giExpressionAttributeNames' @::@ 'HashMap' 'Text' 'Text'
+-- * 'giConsistentRead'
 --
--- * 'giKey' @::@ 'HashMap' 'Text' 'AttributeValue'
+-- * 'giExpressionAttributeNames'
 --
--- * 'giProjectionExpression' @::@ 'Maybe' 'Text'
+-- * 'giAttributesToGet'
 --
--- * 'giReturnConsumedCapacity' @::@ 'Maybe' 'ReturnConsumedCapacity'
+-- * 'giReturnConsumedCapacity'
 --
--- * 'giTableName' @::@ 'Text'
+-- * 'giTableName'
 --
-getItem :: Text -- ^ 'giTableName'
-        -> NonEmpty Text -- ^ 'giAttributesToGet'
-        -> GetItem
-getItem p1 p2 = GetItem
-    { _giTableName                = p1
-    , _giAttributesToGet          = withIso _List1 (const id) p2
-    , _giKey                      = mempty
-    , _giConsistentRead           = Nothing
-    , _giReturnConsumedCapacity   = Nothing
-    , _giProjectionExpression     = Nothing
-    , _giExpressionAttributeNames = mempty
+-- * 'giKey'
+getItem
+    :: Text -- ^ 'giTableName'
+    -> GetItem
+getItem pTableName_ =
+    GetItem'
+    { _giProjectionExpression = Nothing
+    , _giConsistentRead = Nothing
+    , _giExpressionAttributeNames = Nothing
+    , _giAttributesToGet = Nothing
+    , _giReturnConsumedCapacity = Nothing
+    , _giTableName = pTableName_
+    , _giKey = mempty
     }
 
--- | This is a legacy parameter, for backward compatibility. New applications
--- should use /ProjectionExpression/ instead. Do not combine legacy parameters and
--- expression parameters in a single API call; otherwise, DynamoDB will return a /ValidationException/ exception.
+-- | A string that identifies one or more attributes to retrieve from the
+-- table. These attributes can include scalars, sets, or elements of a JSON
+-- document. The attributes in the expression must be separated by commas.
 --
--- This parameter allows you to retrieve attributes of type List or Map;
--- however, it cannot retrieve individual elements within a List or a Map.
+-- If no attribute names are specified, then all attributes will be
+-- returned. If any of the requested attributes are not found, they will
+-- not appear in the result.
 --
--- The names of one or more attributes to retrieve. If no attribute names are
--- provided, then all attributes will be returned. If any of the requested
--- attributes are not found, they will not appear in the result.
+-- For more information, see
+-- <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.AccessingItemAttributes.html Accessing Item Attributes>
+-- in the /Amazon DynamoDB Developer Guide/.
 --
--- Note that /AttributesToGet/ has no effect on provisioned throughput
--- consumption. DynamoDB determines capacity units consumed based on item size,
--- not on the amount of data that is returned to an application.
-giAttributesToGet :: Lens' GetItem (NonEmpty Text)
-giAttributesToGet =
-    lens _giAttributesToGet (\s a -> s { _giAttributesToGet = a })
-        . _List1
+-- /ProjectionExpression/ replaces the legacy /AttributesToGet/ parameter.
+giProjectionExpression :: Lens' GetItem (Maybe Text)
+giProjectionExpression = lens _giProjectionExpression (\ s a -> s{_giProjectionExpression = a});
 
--- | A value that if set to 'true', then the operation uses strongly consistent
--- reads; otherwise, eventually consistent reads are used.
+-- | Determines the read consistency model: If set to 'true', then the
+-- operation uses strongly consistent reads; otherwise, the operation uses
+-- eventually consistent reads.
 giConsistentRead :: Lens' GetItem (Maybe Bool)
-giConsistentRead = lens _giConsistentRead (\s a -> s { _giConsistentRead = a })
+giConsistentRead = lens _giConsistentRead (\ s a -> s{_giConsistentRead = a});
 
--- | One or more substitution tokens for attribute names in an expression. The
--- following are some use cases for using /ExpressionAttributeNames/:
+-- | One or more substitution tokens for attribute names in an expression.
+-- The following are some use cases for using /ExpressionAttributeNames/:
 --
--- To access an attribute whose name conflicts with a DynamoDB reserved word.
+-- -   To access an attribute whose name conflicts with a DynamoDB reserved
+--     word.
 --
--- To create a placeholder for repeating occurrences of an attribute name in
--- an expression.
+-- -   To create a placeholder for repeating occurrences of an attribute
+--     name in an expression.
 --
--- To prevent special characters in an attribute name from being
--- misinterpreted in an expression.
+-- -   To prevent special characters in an attribute name from being
+--     misinterpreted in an expression.
 --
--- Use the # character in an expression to dereference an attribute name. For
--- example, consider the following attribute name:
+-- Use the __#__ character in an expression to dereference an attribute
+-- name. For example, consider the following attribute name:
 --
--- 'Percentile'
+-- -   'Percentile'
 --
--- The name of this attribute conflicts with a reserved word, so it cannot be
--- used directly in an expression. (For the complete list of reserved words, see <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ReservedWords.html Reserved Words> in the /Amazon DynamoDB Developer Guide/). To work around this,
--- you could specify the following for /ExpressionAttributeNames/:
+-- The name of this attribute conflicts with a reserved word, so it cannot
+-- be used directly in an expression. (For the complete list of reserved
+-- words, see
+-- <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ReservedWords.html Reserved Words>
+-- in the /Amazon DynamoDB Developer Guide/). To work around this, you
+-- could specify the following for /ExpressionAttributeNames/:
 --
--- '{"#P":"Percentile"}'
+-- -   '{\"#P\":\"Percentile\"}'
 --
--- You could then use this substitution in an expression, as in this example:
+-- You could then use this substitution in an expression, as in this
+-- example:
 --
--- '#P = :val'
+-- -   '#P = :val'
 --
--- Tokens that begin with the : character are /expression attribute values/,
--- which are placeholders for the actual value at runtime.
+-- Tokens that begin with the __:__ character are /expression attribute
+-- values/, which are placeholders for the actual value at runtime.
 --
--- For more information on expression attribute names, see <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ExpressionPlaceholders.html Using Placeholdersfor Attribute Names and Values> in the /Amazon DynamoDB Developer Guide/.
+-- For more information on expression attribute names, see
+-- <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.AccessingItemAttributes.html Accessing Item Attributes>
+-- in the /Amazon DynamoDB Developer Guide/.
 giExpressionAttributeNames :: Lens' GetItem (HashMap Text Text)
-giExpressionAttributeNames =
-    lens _giExpressionAttributeNames
-        (\s a -> s { _giExpressionAttributeNames = a })
-            . _Map
-
--- | A map of attribute names to /AttributeValue/ objects, representing the primary
--- key of the item to retrieve.
---
--- For the primary key, you must provide all of the attributes. For example,
--- with a hash type primary key, you only need to provide the hash attribute.
--- For a hash-and-range type primary key, you must provide both the hash
--- attribute and the range attribute.
-giKey :: Lens' GetItem (HashMap Text AttributeValue)
-giKey = lens _giKey (\s a -> s { _giKey = a }) . _Map
+giExpressionAttributeNames = lens _giExpressionAttributeNames (\ s a -> s{_giExpressionAttributeNames = a}) . _Default . _Map;
 
--- | A string that identifies one or more attributes to retrieve from the table.
--- These attributes can include scalars, sets, or elements of a JSON document.
--- The attributes in the expression must be separated by commas.
---
--- If no attribute names are specified, then all attributes will be returned.
--- If any of the requested attributes are not found, they will not appear in the
--- result.
+-- | This is a legacy parameter, for backward compatibility. New applications
+-- should use /ProjectionExpression/ instead. Do not combine legacy
+-- parameters and expression parameters in a single API call; otherwise,
+-- DynamoDB will return a /ValidationException/ exception.
 --
--- For more information, see <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.AccessingItemAttributes.html Accessing Item Attributes> in the /Amazon DynamoDBDeveloper Guide/.
+-- This parameter allows you to retrieve attributes of type List or Map;
+-- however, it cannot retrieve individual elements within a List or a Map.
 --
--- /ProjectionExpression/ replaces the legacy /AttributesToGet/ parameter.
+-- The names of one or more attributes to retrieve. If no attribute names
+-- are provided, then all attributes will be returned. If any of the
+-- requested attributes are not found, they will not appear in the result.
 --
-giProjectionExpression :: Lens' GetItem (Maybe Text)
-giProjectionExpression =
-    lens _giProjectionExpression (\s a -> s { _giProjectionExpression = a })
+-- Note that /AttributesToGet/ has no effect on provisioned throughput
+-- consumption. DynamoDB determines capacity units consumed based on item
+-- size, not on the amount of data that is returned to an application.
+giAttributesToGet :: Lens' GetItem (Maybe (NonEmpty Text))
+giAttributesToGet = lens _giAttributesToGet (\ s a -> s{_giAttributesToGet = a}) . mapping _List1;
 
+-- | Undocumented member.
 giReturnConsumedCapacity :: Lens' GetItem (Maybe ReturnConsumedCapacity)
-giReturnConsumedCapacity =
-    lens _giReturnConsumedCapacity
-        (\s a -> s { _giReturnConsumedCapacity = a })
+giReturnConsumedCapacity = lens _giReturnConsumedCapacity (\ s a -> s{_giReturnConsumedCapacity = a});
 
 -- | The name of the table containing the requested item.
 giTableName :: Lens' GetItem Text
-giTableName = lens _giTableName (\s a -> s { _giTableName = a })
-
-data GetItemResponse = GetItemResponse
-    { _girConsumedCapacity :: Maybe ConsumedCapacity
-    , _girItem             :: Map Text AttributeValue
-    } deriving (Eq, Read, Show)
+giTableName = lens _giTableName (\ s a -> s{_giTableName = a});
 
--- | 'GetItemResponse' constructor.
---
--- The fields accessible through corresponding lenses are:
---
--- * 'girConsumedCapacity' @::@ 'Maybe' 'ConsumedCapacity'
---
--- * 'girItem' @::@ 'HashMap' 'Text' 'AttributeValue'
+-- | A map of attribute names to /AttributeValue/ objects, representing the
+-- primary key of the item to retrieve.
 --
-getItemResponse :: GetItemResponse
-getItemResponse = GetItemResponse
-    { _girItem             = mempty
-    , _girConsumedCapacity = Nothing
-    }
+-- For the primary key, you must provide all of the attributes. For
+-- example, with a hash type primary key, you only need to provide the hash
+-- attribute. For a hash-and-range type primary key, you must provide both
+-- the hash attribute and the range attribute.
+giKey :: Lens' GetItem (HashMap Text AttributeValue)
+giKey = lens _giKey (\ s a -> s{_giKey = a}) . _Map;
 
-girConsumedCapacity :: Lens' GetItemResponse (Maybe ConsumedCapacity)
-girConsumedCapacity =
-    lens _girConsumedCapacity (\s a -> s { _girConsumedCapacity = a })
+instance AWSRequest GetItem where
+        type Sv GetItem = DynamoDB
+        type Rs GetItem = GetItemResponse
+        request = postJSON
+        response
+          = receiveJSON
+              (\ s h x ->
+                 GetItemResponse' <$>
+                   (x .?> "ConsumedCapacity") <*>
+                     (x .?> "Item" .!@ mempty)
+                     <*> (pure (fromEnum s)))
 
--- | A map of attribute names to /AttributeValue/ objects, as specified by /AttributesToGet/.
-girItem :: Lens' GetItemResponse (HashMap Text AttributeValue)
-girItem = lens _girItem (\s a -> s { _girItem = a }) . _Map
+instance ToHeaders GetItem where
+        toHeaders
+          = const
+              (mconcat
+                 ["X-Amz-Target" =#
+                    ("DynamoDB_20120810.GetItem" :: ByteString),
+                  "Content-Type" =#
+                    ("application/x-amz-json-1.0" :: ByteString)])
 
+instance ToJSON GetItem where
+        toJSON GetItem'{..}
+          = object
+              ["ProjectionExpression" .= _giProjectionExpression,
+               "ConsistentRead" .= _giConsistentRead,
+               "ExpressionAttributeNames" .=
+                 _giExpressionAttributeNames,
+               "AttributesToGet" .= _giAttributesToGet,
+               "ReturnConsumedCapacity" .=
+                 _giReturnConsumedCapacity,
+               "TableName" .= _giTableName, "Key" .= _giKey]
+
 instance ToPath GetItem where
-    toPath = const "/"
+        toPath = const "/"
 
 instance ToQuery GetItem where
-    toQuery = const mempty
+        toQuery = const mempty
 
-instance ToHeaders GetItem
+-- | Represents the output of a /GetItem/ operation.
+--
+-- /See:/ 'getItemResponse' smart constructor.
+data GetItemResponse = GetItemResponse'
+    { _girsConsumedCapacity :: !(Maybe ConsumedCapacity)
+    , _girsItem             :: !(Maybe (Map Text AttributeValue))
+    , _girsStatus           :: !Int
+    } deriving (Eq,Read,Show,Data,Typeable,Generic)
 
-instance ToJSON GetItem where
-    toJSON GetItem{..} = object
-        [ "TableName"                .= _giTableName
-        , "Key"                      .= _giKey
-        , "AttributesToGet"          .= _giAttributesToGet
-        , "ConsistentRead"           .= _giConsistentRead
-        , "ReturnConsumedCapacity"   .= _giReturnConsumedCapacity
-        , "ProjectionExpression"     .= _giProjectionExpression
-        , "ExpressionAttributeNames" .= _giExpressionAttributeNames
-        ]
+-- | Creates a value of 'GetItemResponse' with the minimum fields required to make a request.
+--
+-- Use one of the following lenses to modify other fields as desired:
+--
+-- * 'girsConsumedCapacity'
+--
+-- * 'girsItem'
+--
+-- * 'girsStatus'
+getItemResponse
+    :: Int -- ^ 'girsStatus'
+    -> GetItemResponse
+getItemResponse pStatus_ =
+    GetItemResponse'
+    { _girsConsumedCapacity = Nothing
+    , _girsItem = Nothing
+    , _girsStatus = pStatus_
+    }
 
-instance AWSRequest GetItem where
-    type Sv GetItem = DynamoDB
-    type Rs GetItem = GetItemResponse
+-- | Undocumented member.
+girsConsumedCapacity :: Lens' GetItemResponse (Maybe ConsumedCapacity)
+girsConsumedCapacity = lens _girsConsumedCapacity (\ s a -> s{_girsConsumedCapacity = a});
 
-    request  = post "GetItem"
-    response = jsonResponse
+-- | A map of attribute names to /AttributeValue/ objects, as specified by
+-- /AttributesToGet/.
+girsItem :: Lens' GetItemResponse (HashMap Text AttributeValue)
+girsItem = lens _girsItem (\ s a -> s{_girsItem = a}) . _Default . _Map;
 
-instance FromJSON GetItemResponse where
-    parseJSON = withObject "GetItemResponse" $ \o -> GetItemResponse
-        <$> o .:? "ConsumedCapacity"
-        <*> o .:? "Item" .!= mempty
+-- | The response status code.
+girsStatus :: Lens' GetItemResponse Int
+girsStatus = lens _girsStatus (\ s a -> s{_girsStatus = a});
diff --git a/gen/Network/AWS/DynamoDB/ListTables.hs b/gen/Network/AWS/DynamoDB/ListTables.hs
--- a/gen/Network/AWS/DynamoDB/ListTables.hs
+++ b/gen/Network/AWS/DynamoDB/ListTables.hs
@@ -1,156 +1,178 @@
-{-# LANGUAGE DataKinds                   #-}
-{-# LANGUAGE DeriveGeneric               #-}
-{-# LANGUAGE FlexibleInstances           #-}
-{-# LANGUAGE GeneralizedNewtypeDeriving  #-}
-{-# LANGUAGE LambdaCase                  #-}
-{-# LANGUAGE NoImplicitPrelude           #-}
-{-# LANGUAGE OverloadedStrings           #-}
-{-# LANGUAGE RecordWildCards             #-}
-{-# LANGUAGE TypeFamilies                #-}
+{-# LANGUAGE DeriveDataTypeable #-}
+{-# LANGUAGE DeriveGeneric      #-}
+{-# LANGUAGE OverloadedStrings  #-}
+{-# LANGUAGE RecordWildCards    #-}
+{-# LANGUAGE TypeFamilies       #-}
 
 {-# OPTIONS_GHC -fno-warn-unused-imports #-}
+{-# OPTIONS_GHC -fno-warn-unused-binds   #-}
+{-# OPTIONS_GHC -fno-warn-unused-matches #-}
 
+-- Derived from AWS service descriptions, licensed under Apache 2.0.
+
+-- |
 -- Module      : Network.AWS.DynamoDB.ListTables
--- Copyright   : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>
--- License     : This Source Code Form is subject to the terms of
---               the Mozilla Public License, v. 2.0.
---               A copy of the MPL can be found in the LICENSE file or
---               you can obtain it at http://mozilla.org/MPL/2.0/.
+-- Copyright   : (c) 2013-2015 Brendan Hay
+-- License     : Mozilla Public License, v. 2.0.
 -- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com>
--- Stability   : experimental
+-- Stability   : auto-generated
 -- Portability : non-portable (GHC extensions)
 --
--- Derived from AWS service descriptions, licensed under Apache 2.0.
-
--- | Returns an array of table names associated with the current account and
--- endpoint. The output from /ListTables/ is paginated, with each page returning a
--- maximum of 100 table names.
+-- Returns an array of table names associated with the current account and
+-- endpoint. The output from /ListTables/ is paginated, with each page
+-- returning a maximum of 100 table names.
 --
--- <http://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_ListTables.html>
+-- /See:/ <http://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_ListTables.html AWS API Reference> for ListTables.
+--
+-- This operation returns paginated results.
 module Network.AWS.DynamoDB.ListTables
     (
-    -- * Request
-      ListTables
-    -- ** Request constructor
-    , listTables
-    -- ** Request lenses
+    -- * Creating a Request
+      listTables
+    , ListTables
+    -- * Request Lenses
     , ltExclusiveStartTableName
     , ltLimit
 
-    -- * Response
-    , ListTablesResponse
-    -- ** Response constructor
+    -- * Destructuring the Response
     , listTablesResponse
-    -- ** Response lenses
-    , ltrLastEvaluatedTableName
-    , ltrTableNames
+    , ListTablesResponse
+    -- * Response Lenses
+    , ltrsLastEvaluatedTableName
+    , ltrsTableNames
+    , ltrsStatus
     ) where
 
-import Network.AWS.Data (Object)
-import Network.AWS.Prelude
-import Network.AWS.Request.JSON
-import Network.AWS.DynamoDB.Types
-import qualified GHC.Exts
-
-data ListTables = ListTables
-    { _ltExclusiveStartTableName :: Maybe Text
-    , _ltLimit                   :: Maybe Nat
-    } deriving (Eq, Ord, Read, Show)
+import           Network.AWS.DynamoDB.Types
+import           Network.AWS.DynamoDB.Types.Product
+import           Network.AWS.Pager
+import           Network.AWS.Prelude
+import           Network.AWS.Request
+import           Network.AWS.Response
 
--- | 'ListTables' constructor.
+-- | Represents the input of a /ListTables/ operation.
 --
--- The fields accessible through corresponding lenses are:
+-- /See:/ 'listTables' smart constructor.
+data ListTables = ListTables'
+    { _ltExclusiveStartTableName :: !(Maybe Text)
+    , _ltLimit                   :: !(Maybe Nat)
+    } deriving (Eq,Read,Show,Data,Typeable,Generic)
+
+-- | Creates a value of 'ListTables' with the minimum fields required to make a request.
 --
--- * 'ltExclusiveStartTableName' @::@ 'Maybe' 'Text'
+-- Use one of the following lenses to modify other fields as desired:
 --
--- * 'ltLimit' @::@ 'Maybe' 'Natural'
+-- * 'ltExclusiveStartTableName'
 --
-listTables :: ListTables
-listTables = ListTables
+-- * 'ltLimit'
+listTables
+    :: ListTables
+listTables =
+    ListTables'
     { _ltExclusiveStartTableName = Nothing
-    , _ltLimit                   = Nothing
+    , _ltLimit = Nothing
     }
 
--- | The first table name that this operation will evaluate. Use the value that
--- was returned for /LastEvaluatedTableName/ in a previous operation, so that you
--- can obtain the next page of results.
+-- | The first table name that this operation will evaluate. Use the value
+-- that was returned for /LastEvaluatedTableName/ in a previous operation,
+-- so that you can obtain the next page of results.
 ltExclusiveStartTableName :: Lens' ListTables (Maybe Text)
-ltExclusiveStartTableName =
-    lens _ltExclusiveStartTableName
-        (\s a -> s { _ltExclusiveStartTableName = a })
+ltExclusiveStartTableName = lens _ltExclusiveStartTableName (\ s a -> s{_ltExclusiveStartTableName = a});
 
 -- | A maximum number of table names to return. If this parameter is not
 -- specified, the limit is 100.
 ltLimit :: Lens' ListTables (Maybe Natural)
-ltLimit = lens _ltLimit (\s a -> s { _ltLimit = a }) . mapping _Nat
+ltLimit = lens _ltLimit (\ s a -> s{_ltLimit = a}) . mapping _Nat;
 
-data ListTablesResponse = ListTablesResponse
-    { _ltrLastEvaluatedTableName :: Maybe Text
-    , _ltrTableNames             :: List "TableNames" Text
-    } deriving (Eq, Ord, Read, Show)
+instance AWSPager ListTables where
+        page rq rs
+          | stop (rs ^. ltrsLastEvaluatedTableName) = Nothing
+          | stop (rs ^. ltrsTableNames) = Nothing
+          | otherwise =
+            Just $ rq &
+              ltExclusiveStartTableName .~
+                rs ^. ltrsLastEvaluatedTableName
 
--- | 'ListTablesResponse' constructor.
---
--- The fields accessible through corresponding lenses are:
---
--- * 'ltrLastEvaluatedTableName' @::@ 'Maybe' 'Text'
---
--- * 'ltrTableNames' @::@ ['Text']
---
-listTablesResponse :: ListTablesResponse
-listTablesResponse = ListTablesResponse
-    { _ltrTableNames             = mempty
-    , _ltrLastEvaluatedTableName = Nothing
-    }
+instance AWSRequest ListTables where
+        type Sv ListTables = DynamoDB
+        type Rs ListTables = ListTablesResponse
+        request = postJSON
+        response
+          = receiveJSON
+              (\ s h x ->
+                 ListTablesResponse' <$>
+                   (x .?> "LastEvaluatedTableName") <*>
+                     (x .?> "TableNames" .!@ mempty)
+                     <*> (pure (fromEnum s)))
 
--- | The name of the last table in the current page of results. Use this value as
--- the /ExclusiveStartTableName/ in a new request to obtain the next page of
--- results, until all the table names are returned.
---
--- If you do not receive a /LastEvaluatedTableName/ value in the response, this
--- means that there are no more table names to be retrieved.
-ltrLastEvaluatedTableName :: Lens' ListTablesResponse (Maybe Text)
-ltrLastEvaluatedTableName =
-    lens _ltrLastEvaluatedTableName
-        (\s a -> s { _ltrLastEvaluatedTableName = a })
+instance ToHeaders ListTables where
+        toHeaders
+          = const
+              (mconcat
+                 ["X-Amz-Target" =#
+                    ("DynamoDB_20120810.ListTables" :: ByteString),
+                  "Content-Type" =#
+                    ("application/x-amz-json-1.0" :: ByteString)])
 
--- | The names of the tables associated with the current account at the current
--- endpoint. The maximum size of this array is 100.
---
--- If /LastEvaluatedTableName/ also appears in the output, you can use this value
--- as the /ExclusiveStartTableName/ parameter in a subsequent /ListTables/ request
--- and obtain the next page of results.
-ltrTableNames :: Lens' ListTablesResponse [Text]
-ltrTableNames = lens _ltrTableNames (\s a -> s { _ltrTableNames = a }) . _List
+instance ToJSON ListTables where
+        toJSON ListTables'{..}
+          = object
+              ["ExclusiveStartTableName" .=
+                 _ltExclusiveStartTableName,
+               "Limit" .= _ltLimit]
 
 instance ToPath ListTables where
-    toPath = const "/"
+        toPath = const "/"
 
 instance ToQuery ListTables where
-    toQuery = const mempty
-
-instance ToHeaders ListTables
+        toQuery = const mempty
 
-instance ToJSON ListTables where
-    toJSON ListTables{..} = object
-        [ "ExclusiveStartTableName" .= _ltExclusiveStartTableName
-        , "Limit"                   .= _ltLimit
-        ]
+-- | Represents the output of a /ListTables/ operation.
+--
+-- /See:/ 'listTablesResponse' smart constructor.
+data ListTablesResponse = ListTablesResponse'
+    { _ltrsLastEvaluatedTableName :: !(Maybe Text)
+    , _ltrsTableNames             :: !(Maybe [Text])
+    , _ltrsStatus                 :: !Int
+    } deriving (Eq,Read,Show,Data,Typeable,Generic)
 
-instance AWSRequest ListTables where
-    type Sv ListTables = DynamoDB
-    type Rs ListTables = ListTablesResponse
+-- | Creates a value of 'ListTablesResponse' with the minimum fields required to make a request.
+--
+-- Use one of the following lenses to modify other fields as desired:
+--
+-- * 'ltrsLastEvaluatedTableName'
+--
+-- * 'ltrsTableNames'
+--
+-- * 'ltrsStatus'
+listTablesResponse
+    :: Int -- ^ 'ltrsStatus'
+    -> ListTablesResponse
+listTablesResponse pStatus_ =
+    ListTablesResponse'
+    { _ltrsLastEvaluatedTableName = Nothing
+    , _ltrsTableNames = Nothing
+    , _ltrsStatus = pStatus_
+    }
 
-    request  = post "ListTables"
-    response = jsonResponse
+-- | The name of the last table in the current page of results. Use this
+-- value as the /ExclusiveStartTableName/ in a new request to obtain the
+-- next page of results, until all the table names are returned.
+--
+-- If you do not receive a /LastEvaluatedTableName/ value in the response,
+-- this means that there are no more table names to be retrieved.
+ltrsLastEvaluatedTableName :: Lens' ListTablesResponse (Maybe Text)
+ltrsLastEvaluatedTableName = lens _ltrsLastEvaluatedTableName (\ s a -> s{_ltrsLastEvaluatedTableName = a});
 
-instance FromJSON ListTablesResponse where
-    parseJSON = withObject "ListTablesResponse" $ \o -> ListTablesResponse
-        <$> o .:? "LastEvaluatedTableName"
-        <*> o .:? "TableNames" .!= mempty
+-- | The names of the tables associated with the current account at the
+-- current endpoint. The maximum size of this array is 100.
+--
+-- If /LastEvaluatedTableName/ also appears in the output, you can use this
+-- value as the /ExclusiveStartTableName/ parameter in a subsequent
+-- /ListTables/ request and obtain the next page of results.
+ltrsTableNames :: Lens' ListTablesResponse [Text]
+ltrsTableNames = lens _ltrsTableNames (\ s a -> s{_ltrsTableNames = a}) . _Default . _Coerce;
 
-instance AWSPager ListTables where
-    page rq rs
-        | stop (rs ^. ltrLastEvaluatedTableName) = Nothing
-        | otherwise = (\x -> rq & ltExclusiveStartTableName ?~ x)
-            <$> (rs ^. ltrLastEvaluatedTableName)
+-- | The response status code.
+ltrsStatus :: Lens' ListTablesResponse Int
+ltrsStatus = lens _ltrsStatus (\ s a -> s{_ltrsStatus = a});
diff --git a/gen/Network/AWS/DynamoDB/PutItem.hs b/gen/Network/AWS/DynamoDB/PutItem.hs
--- a/gen/Network/AWS/DynamoDB/PutItem.hs
+++ b/gen/Network/AWS/DynamoDB/PutItem.hs
@@ -1,576 +1,636 @@
-{-# LANGUAGE DataKinds                   #-}
-{-# LANGUAGE DeriveGeneric               #-}
-{-# LANGUAGE FlexibleInstances           #-}
-{-# LANGUAGE GeneralizedNewtypeDeriving  #-}
-{-# LANGUAGE LambdaCase                  #-}
-{-# LANGUAGE NoImplicitPrelude           #-}
-{-# LANGUAGE OverloadedStrings           #-}
-{-# LANGUAGE RecordWildCards             #-}
-{-# LANGUAGE TypeFamilies                #-}
+{-# LANGUAGE DeriveDataTypeable #-}
+{-# LANGUAGE DeriveGeneric      #-}
+{-# LANGUAGE OverloadedStrings  #-}
+{-# LANGUAGE RecordWildCards    #-}
+{-# LANGUAGE TypeFamilies       #-}
 
 {-# OPTIONS_GHC -fno-warn-unused-imports #-}
+{-# OPTIONS_GHC -fno-warn-unused-binds   #-}
+{-# OPTIONS_GHC -fno-warn-unused-matches #-}
 
+-- Derived from AWS service descriptions, licensed under Apache 2.0.
+
+-- |
 -- Module      : Network.AWS.DynamoDB.PutItem
--- Copyright   : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>
--- License     : This Source Code Form is subject to the terms of
---               the Mozilla Public License, v. 2.0.
---               A copy of the MPL can be found in the LICENSE file or
---               you can obtain it at http://mozilla.org/MPL/2.0/.
+-- Copyright   : (c) 2013-2015 Brendan Hay
+-- License     : Mozilla Public License, v. 2.0.
 -- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com>
--- Stability   : experimental
+-- Stability   : auto-generated
 -- Portability : non-portable (GHC extensions)
 --
--- Derived from AWS service descriptions, licensed under Apache 2.0.
-
--- | Creates a new item, or replaces an old item with a new item. If an item that
--- has the same primary key as the new item already exists in the specified
--- table, the new item completely replaces the existing item. You can perform a
--- conditional put operation (add a new item if one with the specified primary
--- key doesn't exist), or replace an existing item if it has certain attribute
--- values.
+-- Creates a new item, or replaces an old item with a new item. If an item
+-- that has the same primary key as the new item already exists in the
+-- specified table, the new item completely replaces the existing item. You
+-- can perform a conditional put operation (add a new item if one with the
+-- specified primary key doesn\'t exist), or replace an existing item if it
+-- has certain attribute values.
 --
--- In addition to putting an item, you can also return the item's attribute
--- values in the same operation, using the /ReturnValues/ parameter.
+-- In addition to putting an item, you can also return the item\'s
+-- attribute values in the same operation, using the /ReturnValues/
+-- parameter.
 --
 -- When you add an item, the primary key attribute(s) are the only required
 -- attributes. Attribute values cannot be null. String and Binary type
--- attributes must have lengths greater than zero. Set type attributes cannot be
--- empty. Requests with empty values will be rejected with a /ValidationException/
--- exception.
+-- attributes must have lengths greater than zero. Set type attributes
+-- cannot be empty. Requests with empty values will be rejected with a
+-- /ValidationException/ exception.
 --
 -- You can request that /PutItem/ return either a copy of the original item
--- (before the update) or a copy of the updated item (after the update). For
--- more information, see the /ReturnValues/ description below.
+-- (before the update) or a copy of the updated item (after the update).
+-- For more information, see the /ReturnValues/ description below.
 --
 -- To prevent a new item from replacing an existing item, use a conditional
--- put operation with /ComparisonOperator/ set to 'NULL' for the primary key
--- attribute, or attributes.
+-- put operation with /ComparisonOperator/ set to 'NULL' for the primary
+-- key attribute, or attributes.
 --
--- For more information about using this API, see <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithItems.html Working with Items> in the /Amazon DynamoDB Developer Guide/.
+-- For more information about using this API, see
+-- <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithItems.html Working with Items>
+-- in the /Amazon DynamoDB Developer Guide/.
 --
--- <http://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_PutItem.html>
+-- /See:/ <http://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_PutItem.html AWS API Reference> for PutItem.
 module Network.AWS.DynamoDB.PutItem
     (
-    -- * Request
-      PutItem
-    -- ** Request constructor
-    , putItem
-    -- ** Request lenses
-    , piConditionExpression
-    , piConditionalOperator
-    , piExpected
+    -- * Creating a Request
+      putItem
+    , PutItem
+    -- * Request Lenses
+    , piReturnValues
     , piExpressionAttributeNames
-    , piExpressionAttributeValues
-    , piItem
     , piReturnConsumedCapacity
+    , piExpressionAttributeValues
     , piReturnItemCollectionMetrics
-    , piReturnValues
+    , piConditionExpression
+    , piConditionalOperator
+    , piExpected
     , piTableName
+    , piItem
 
-    -- * Response
-    , PutItemResponse
-    -- ** Response constructor
+    -- * Destructuring the Response
     , putItemResponse
-    -- ** Response lenses
-    , pirAttributes
-    , pirConsumedCapacity
-    , pirItemCollectionMetrics
+    , PutItemResponse
+    -- * Response Lenses
+    , pirsConsumedCapacity
+    , pirsItemCollectionMetrics
+    , pirsAttributes
+    , pirsStatus
     ) where
 
-import Network.AWS.Data (Object)
-import Network.AWS.Prelude
-import Network.AWS.Request.JSON
-import Network.AWS.DynamoDB.Types
-import qualified GHC.Exts
-
-data PutItem = PutItem
-    { _piConditionExpression         :: Maybe Text
-    , _piConditionalOperator         :: Maybe ConditionalOperator
-    , _piExpected                    :: Map Text ExpectedAttributeValue
-    , _piExpressionAttributeNames    :: Map Text Text
-    , _piExpressionAttributeValues   :: Map Text AttributeValue
-    , _piItem                        :: Map Text AttributeValue
-    , _piReturnConsumedCapacity      :: Maybe ReturnConsumedCapacity
-    , _piReturnItemCollectionMetrics :: Maybe ReturnItemCollectionMetrics
-    , _piReturnValues                :: Maybe ReturnValue
-    , _piTableName                   :: Text
-    } deriving (Eq, Read, Show)
+import           Network.AWS.DynamoDB.Types
+import           Network.AWS.DynamoDB.Types.Product
+import           Network.AWS.Prelude
+import           Network.AWS.Request
+import           Network.AWS.Response
 
--- | 'PutItem' constructor.
+-- | Represents the input of a /PutItem/ operation.
 --
--- The fields accessible through corresponding lenses are:
+-- /See:/ 'putItem' smart constructor.
+data PutItem = PutItem'
+    { _piReturnValues                :: !(Maybe ReturnValue)
+    , _piExpressionAttributeNames    :: !(Maybe (Map Text Text))
+    , _piReturnConsumedCapacity      :: !(Maybe ReturnConsumedCapacity)
+    , _piExpressionAttributeValues   :: !(Maybe (Map Text AttributeValue))
+    , _piReturnItemCollectionMetrics :: !(Maybe ReturnItemCollectionMetrics)
+    , _piConditionExpression         :: !(Maybe Text)
+    , _piConditionalOperator         :: !(Maybe ConditionalOperator)
+    , _piExpected                    :: !(Maybe (Map Text ExpectedAttributeValue))
+    , _piTableName                   :: !Text
+    , _piItem                        :: !(Map Text AttributeValue)
+    } deriving (Eq,Read,Show,Data,Typeable,Generic)
+
+-- | Creates a value of 'PutItem' with the minimum fields required to make a request.
 --
--- * 'piConditionExpression' @::@ 'Maybe' 'Text'
+-- Use one of the following lenses to modify other fields as desired:
 --
--- * 'piConditionalOperator' @::@ 'Maybe' 'ConditionalOperator'
+-- * 'piReturnValues'
 --
--- * 'piExpected' @::@ 'HashMap' 'Text' 'ExpectedAttributeValue'
+-- * 'piExpressionAttributeNames'
 --
--- * 'piExpressionAttributeNames' @::@ 'HashMap' 'Text' 'Text'
+-- * 'piReturnConsumedCapacity'
 --
--- * 'piExpressionAttributeValues' @::@ 'HashMap' 'Text' 'AttributeValue'
+-- * 'piExpressionAttributeValues'
 --
--- * 'piItem' @::@ 'HashMap' 'Text' 'AttributeValue'
+-- * 'piReturnItemCollectionMetrics'
 --
--- * 'piReturnConsumedCapacity' @::@ 'Maybe' 'ReturnConsumedCapacity'
+-- * 'piConditionExpression'
 --
--- * 'piReturnItemCollectionMetrics' @::@ 'Maybe' 'ReturnItemCollectionMetrics'
+-- * 'piConditionalOperator'
 --
--- * 'piReturnValues' @::@ 'Maybe' 'ReturnValue'
+-- * 'piExpected'
 --
--- * 'piTableName' @::@ 'Text'
+-- * 'piTableName'
 --
-putItem :: Text -- ^ 'piTableName'
-        -> PutItem
-putItem p1 = PutItem
-    { _piTableName                   = p1
-    , _piItem                        = mempty
-    , _piExpected                    = mempty
-    , _piReturnValues                = Nothing
-    , _piReturnConsumedCapacity      = Nothing
+-- * 'piItem'
+putItem
+    :: Text -- ^ 'piTableName'
+    -> PutItem
+putItem pTableName_ =
+    PutItem'
+    { _piReturnValues = Nothing
+    , _piExpressionAttributeNames = Nothing
+    , _piReturnConsumedCapacity = Nothing
+    , _piExpressionAttributeValues = Nothing
     , _piReturnItemCollectionMetrics = Nothing
-    , _piConditionalOperator         = Nothing
-    , _piConditionExpression         = Nothing
-    , _piExpressionAttributeNames    = mempty
-    , _piExpressionAttributeValues   = mempty
+    , _piConditionExpression = Nothing
+    , _piConditionalOperator = Nothing
+    , _piExpected = Nothing
+    , _piTableName = pTableName_
+    , _piItem = mempty
     }
 
--- | A condition that must be satisfied in order for a conditional /PutItem/
--- operation to succeed.
---
--- An expression can contain any of the following:
---
--- Boolean functions: 'attribute_exists | attribute_not_exists | contains |begins_with'
---
--- These function names are case-sensitive.
---
--- Comparison operators: ' = | <> | < | > | <= | >= | BETWEEN | IN'
---
--- Logical operators: 'AND | OR | NOT'
+-- | Use /ReturnValues/ if you want to get the item attributes as they
+-- appeared before they were updated with the /PutItem/ request. For
+-- /PutItem/, the valid values are:
 --
--- For more information on condition expressions, see <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.SpecifyingConditions.html Specifying Conditions>
--- in the /Amazon DynamoDB Developer Guide/.
+-- -   'NONE' - If /ReturnValues/ is not specified, or if its value is
+--     'NONE', then nothing is returned. (This setting is the default for
+--     /ReturnValues/.)
 --
--- /ConditionExpression/ replaces the legacy /ConditionalOperator/ and /Expected/
--- parameters.
+-- -   'ALL_OLD' - If /PutItem/ overwrote an attribute name-value pair,
+--     then the content of the old item is returned.
 --
-piConditionExpression :: Lens' PutItem (Maybe Text)
-piConditionExpression =
-    lens _piConditionExpression (\s a -> s { _piConditionExpression = a })
+-- Other \"Valid Values\" are not relevant to PutItem.
+piReturnValues :: Lens' PutItem (Maybe ReturnValue)
+piReturnValues = lens _piReturnValues (\ s a -> s{_piReturnValues = a});
 
--- | This is a legacy parameter, for backward compatibility. New applications
--- should use /ConditionExpression/ instead. Do not combine legacy parameters and
--- expression parameters in a single API call; otherwise, DynamoDB will return a /ValidationException/ exception.
---
--- A logical operator to apply to the conditions in the /Expected/ map:
+-- | One or more substitution tokens for attribute names in an expression.
+-- The following are some use cases for using /ExpressionAttributeNames/:
 --
--- 'AND' - If all of the conditions evaluate to true, then the entire map
--- evaluates to true.
+-- -   To access an attribute whose name conflicts with a DynamoDB reserved
+--     word.
 --
--- 'OR' - If at least one of the conditions evaluate to true, then the entire map
--- evaluates to true.
+-- -   To create a placeholder for repeating occurrences of an attribute
+--     name in an expression.
 --
--- If you omit /ConditionalOperator/, then 'AND' is the default.
+-- -   To prevent special characters in an attribute name from being
+--     misinterpreted in an expression.
 --
--- The operation will succeed only if the entire map evaluates to true.
+-- Use the __#__ character in an expression to dereference an attribute
+-- name. For example, consider the following attribute name:
 --
--- This parameter does not support attributes of type List or Map.
+-- -   'Percentile'
 --
-piConditionalOperator :: Lens' PutItem (Maybe ConditionalOperator)
-piConditionalOperator =
-    lens _piConditionalOperator (\s a -> s { _piConditionalOperator = a })
-
--- | This is a legacy parameter, for backward compatibility. New applications
--- should use /ConditionExpression/ instead. Do not combine legacy parameters and
--- expression parameters in a single API call; otherwise, DynamoDB will return a /ValidationException/ exception.
+-- The name of this attribute conflicts with a reserved word, so it cannot
+-- be used directly in an expression. (For the complete list of reserved
+-- words, see
+-- <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ReservedWords.html Reserved Words>
+-- in the /Amazon DynamoDB Developer Guide/). To work around this, you
+-- could specify the following for /ExpressionAttributeNames/:
 --
--- A map of attribute/condition pairs. /Expected/ provides a conditional block
--- for the /PutItem/ operation.
+-- -   '{\"#P\":\"Percentile\"}'
 --
--- This parameter does not support attributes of type List or Map.
+-- You could then use this substitution in an expression, as in this
+-- example:
 --
--- Each element of /Expected/ consists of an attribute name, a comparison
--- operator, and one or more values. DynamoDB compares the attribute with the
--- value(s) you supplied, using the comparison operator. For each /Expected/
--- element, the result of the evaluation is either true or false.
+-- -   '#P = :val'
 --
--- If you specify more than one element in the /Expected/ map, then by default
--- all of the conditions must evaluate to true. In other words, the conditions
--- are ANDed together. (You can use the /ConditionalOperator/ parameter to OR the
--- conditions instead. If you do this, then at least one of the conditions must
--- evaluate to true, rather than all of them.)
+-- Tokens that begin with the __:__ character are /expression attribute
+-- values/, which are placeholders for the actual value at runtime.
 --
--- If the /Expected/ map evaluates to true, then the conditional operation
--- succeeds; otherwise, it fails.
+-- For more information on expression attribute names, see
+-- <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.AccessingItemAttributes.html Accessing Item Attributes>
+-- in the /Amazon DynamoDB Developer Guide/.
+piExpressionAttributeNames :: Lens' PutItem (HashMap Text Text)
+piExpressionAttributeNames = lens _piExpressionAttributeNames (\ s a -> s{_piExpressionAttributeNames = a}) . _Default . _Map;
+
+-- | Undocumented member.
+piReturnConsumedCapacity :: Lens' PutItem (Maybe ReturnConsumedCapacity)
+piReturnConsumedCapacity = lens _piReturnConsumedCapacity (\ s a -> s{_piReturnConsumedCapacity = a});
+
+-- | One or more values that can be substituted in an expression.
 --
--- /Expected/ contains the following:
+-- Use the __:__ (colon) character in an expression to dereference an
+-- attribute value. For example, suppose that you wanted to check whether
+-- the value of the /ProductStatus/ attribute was one of the following:
 --
--- /AttributeValueList/ - One or more values to evaluate against the supplied
--- attribute. The number of values in the list depends on the /ComparisonOperator/
--- being used.
+-- 'Available | Backordered | Discontinued'
 --
--- For type Number, value comparisons are numeric.
+-- You would first need to specify /ExpressionAttributeValues/ as follows:
 --
--- String value comparisons for greater than, equals, or less than are based on
--- ASCII character code values. For example, 'a' is greater than 'A', and 'a' is
--- greater than 'B'. For a list of code values, see <http://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters http://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters>.
+-- '{ \":avail\":{\"S\":\"Available\"}, \":back\":{\"S\":\"Backordered\"}, \":disc\":{\"S\":\"Discontinued\"} }'
 --
--- For type Binary, DynamoDB treats each byte of the binary data as unsigned
--- when it compares binary values.
+-- You could then use these values in an expression, such as this:
 --
--- /ComparisonOperator/ - A comparator for evaluating attributes in the /AttributeValueList/. When performing the comparison, DynamoDB uses strongly consistent reads.
+-- 'ProductStatus IN (:avail, :back, :disc)'
 --
--- The following comparison operators are available:
+-- For more information on expression attribute values, see
+-- <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.SpecifyingConditions.html Specifying Conditions>
+-- in the /Amazon DynamoDB Developer Guide/.
+piExpressionAttributeValues :: Lens' PutItem (HashMap Text AttributeValue)
+piExpressionAttributeValues = lens _piExpressionAttributeValues (\ s a -> s{_piExpressionAttributeValues = a}) . _Default . _Map;
+
+-- | Determines whether item collection metrics are returned. If set to
+-- 'SIZE', the response includes statistics about item collections, if any,
+-- that were modified during the operation are returned in the response. If
+-- set to 'NONE' (the default), no statistics are returned.
+piReturnItemCollectionMetrics :: Lens' PutItem (Maybe ReturnItemCollectionMetrics)
+piReturnItemCollectionMetrics = lens _piReturnItemCollectionMetrics (\ s a -> s{_piReturnItemCollectionMetrics = a});
+
+-- | A condition that must be satisfied in order for a conditional /PutItem/
+-- operation to succeed.
 --
--- 'EQ | NE | LE | LT | GE | GT | NOT_NULL | NULL | CONTAINS | NOT_CONTAINS |BEGINS_WITH | IN | BETWEEN'
+-- An expression can contain any of the following:
 --
--- The following are descriptions of each comparison operator.
+-- -   Functions:
+--     'attribute_exists | attribute_not_exists | attribute_type | contains | begins_with | size'
 --
--- 'EQ' : Equal. 'EQ' is supported for all datatypes, including lists and maps.
+--     These function names are case-sensitive.
 --
--- /AttributeValueList/ can contain only one /AttributeValue/ element of type
--- String, Number, Binary, String Set, Number Set, or Binary Set. If an item
--- contains an /AttributeValue/ element of a different type than the one provided
--- in the request, the value does not match. For example, '{"S":"6"}' does not
--- equal '{"N":"6"}'. Also, '{"N":"6"}' does not equal '{"NS":["6", "2", "1"]}'.
+-- -   Comparison operators: ' = | \<> | \< | > | \<= | >= | BETWEEN | IN'
 --
+-- -   Logical operators: 'AND | OR | NOT'
 --
+-- For more information on condition expressions, see
+-- <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.SpecifyingConditions.html Specifying Conditions>
+-- in the /Amazon DynamoDB Developer Guide/.
 --
--- 'NE' : Not equal. 'NE' is supported for all datatypes, including lists and
--- maps.
+-- /ConditionExpression/ replaces the legacy /ConditionalOperator/ and
+-- /Expected/ parameters.
+piConditionExpression :: Lens' PutItem (Maybe Text)
+piConditionExpression = lens _piConditionExpression (\ s a -> s{_piConditionExpression = a});
+
+-- | This is a legacy parameter, for backward compatibility. New applications
+-- should use /ConditionExpression/ instead. Do not combine legacy
+-- parameters and expression parameters in a single API call; otherwise,
+-- DynamoDB will return a /ValidationException/ exception.
 --
--- /AttributeValueList/ can contain only one /AttributeValue/ of type String,
--- Number, Binary, String Set, Number Set, or Binary Set. If an item contains an /AttributeValue/ of a different type than the one provided in the request, the
--- value does not match. For example, '{"S":"6"}' does not equal '{"N":"6"}'. Also, '{"N":"6"}' does not equal '{"NS":["6", "2", "1"]}'.
+-- A logical operator to apply to the conditions in the /Expected/ map:
 --
+-- -   'AND' - If all of the conditions evaluate to true, then the entire
+--     map evaluates to true.
 --
+-- -   'OR' - If at least one of the conditions evaluate to true, then the
+--     entire map evaluates to true.
 --
--- 'LE' : Less than or equal.
+-- If you omit /ConditionalOperator/, then 'AND' is the default.
 --
--- /AttributeValueList/ can contain only one /AttributeValue/ element of type
--- String, Number, or Binary (not a set type). If an item contains an /AttributeValue/ element of a different type than the one provided in the request, the value
--- does not match. For example, '{"S":"6"}' does not equal '{"N":"6"}'. Also, '{"N":"6"}' does not compare to '{"NS":["6", "2", "1"]}'.
+-- The operation will succeed only if the entire map evaluates to true.
 --
+-- This parameter does not support attributes of type List or Map.
+piConditionalOperator :: Lens' PutItem (Maybe ConditionalOperator)
+piConditionalOperator = lens _piConditionalOperator (\ s a -> s{_piConditionalOperator = a});
+
+-- | This is a legacy parameter, for backward compatibility. New applications
+-- should use /ConditionExpression/ instead. Do not combine legacy
+-- parameters and expression parameters in a single API call; otherwise,
+-- DynamoDB will return a /ValidationException/ exception.
 --
+-- A map of attribute\/condition pairs. /Expected/ provides a conditional
+-- block for the /PutItem/ operation.
 --
--- 'LT' : Less than.
+-- This parameter does not support attributes of type List or Map.
 --
--- /AttributeValueList/ can contain only one /AttributeValue/ of type String,
--- Number, or Binary (not a set type). If an item contains an /AttributeValue/
--- element of a different type than the one provided in the request, the value
--- does not match. For example, '{"S":"6"}' does not equal '{"N":"6"}'. Also, '{"N":"6"}' does not compare to '{"NS":["6", "2", "1"]}'.
+-- Each element of /Expected/ consists of an attribute name, a comparison
+-- operator, and one or more values. DynamoDB compares the attribute with
+-- the value(s) you supplied, using the comparison operator. For each
+-- /Expected/ element, the result of the evaluation is either true or
+-- false.
 --
+-- If you specify more than one element in the /Expected/ map, then by
+-- default all of the conditions must evaluate to true. In other words, the
+-- conditions are ANDed together. (You can use the /ConditionalOperator/
+-- parameter to OR the conditions instead. If you do this, then at least
+-- one of the conditions must evaluate to true, rather than all of them.)
 --
+-- If the /Expected/ map evaluates to true, then the conditional operation
+-- succeeds; otherwise, it fails.
 --
--- 'GE' : Greater than or equal.
+-- /Expected/ contains the following:
 --
--- /AttributeValueList/ can contain only one /AttributeValue/ element of type
--- String, Number, or Binary (not a set type). If an item contains an /AttributeValue/ element of a different type than the one provided in the request, the value
--- does not match. For example, '{"S":"6"}' does not equal '{"N":"6"}'. Also, '{"N":"6"}' does not compare to '{"NS":["6", "2", "1"]}'.
+-- -   /AttributeValueList/ - One or more values to evaluate against the
+--     supplied attribute. The number of values in the list depends on the
+--     /ComparisonOperator/ being used.
 --
+--     For type Number, value comparisons are numeric.
 --
+--     String value comparisons for greater than, equals, or less than are
+--     based on ASCII character code values. For example, 'a' is greater
+--     than 'A', and 'a' is greater than 'B'. For a list of code values,
+--     see <http://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters>.
 --
--- 'GT' : Greater than.
+--     For type Binary, DynamoDB treats each byte of the binary data as
+--     unsigned when it compares binary values.
 --
--- /AttributeValueList/ can contain only one /AttributeValue/ element of type
--- String, Number, or Binary (not a set type). If an item contains an /AttributeValue/ element of a different type than the one provided in the request, the value
--- does not match. For example, '{"S":"6"}' does not equal '{"N":"6"}'. Also, '{"N":"6"}' does not compare to '{"NS":["6", "2", "1"]}'.
+-- -   /ComparisonOperator/ - A comparator for evaluating attributes in the
+--     /AttributeValueList/. When performing the comparison, DynamoDB uses
+--     strongly consistent reads.
 --
+--     The following comparison operators are available:
 --
+--     'EQ | NE | LE | LT | GE | GT | NOT_NULL | NULL | CONTAINS | NOT_CONTAINS | BEGINS_WITH | IN | BETWEEN'
 --
--- 'NOT_NULL' : The attribute exists. 'NOT_NULL' is supported for all datatypes,
--- including lists and maps.
+--     The following are descriptions of each comparison operator.
 --
--- This operator tests for the existence of an attribute, not its data type. If
--- the data type of attribute "'a'" is null, and you evaluate it using 'NOT_NULL',
--- the result is a Boolean /true/. This result is because the attribute "'a'"
--- exists; its data type is not relevant to the 'NOT_NULL' comparison operator.
+--     -   'EQ' : Equal. 'EQ' is supported for all datatypes, including
+--         lists and maps.
 --
--- 'NULL' : The attribute does not exist. 'NULL' is supported for all datatypes,
--- including lists and maps.
+--         /AttributeValueList/ can contain only one /AttributeValue/
+--         element of type String, Number, Binary, String Set, Number Set,
+--         or Binary Set. If an item contains an /AttributeValue/ element
+--         of a different type than the one provided in the request, the
+--         value does not match. For example, '{\"S\":\"6\"}' does not
+--         equal '{\"N\":\"6\"}'. Also, '{\"N\":\"6\"}' does not equal
+--         '{\"NS\":[\"6\", \"2\", \"1\"]}'.
 --
--- This operator tests for the nonexistence of an attribute, not its data type.
--- If the data type of attribute "'a'" is null, and you evaluate it using 'NULL',
--- the result is a Boolean /false/. This is because the attribute "'a'" exists; its
--- data type is not relevant to the 'NULL' comparison operator.
+--     -   'NE' : Not equal. 'NE' is supported for all datatypes, including
+--         lists and maps.
 --
--- 'CONTAINS' : Checks for a subsequence, or value in a set.
+--         /AttributeValueList/ can contain only one /AttributeValue/ of
+--         type String, Number, Binary, String Set, Number Set, or Binary
+--         Set. If an item contains an /AttributeValue/ of a different type
+--         than the one provided in the request, the value does not match.
+--         For example, '{\"S\":\"6\"}' does not equal '{\"N\":\"6\"}'.
+--         Also, '{\"N\":\"6\"}' does not equal
+--         '{\"NS\":[\"6\", \"2\", \"1\"]}'.
 --
--- /AttributeValueList/ can contain only one /AttributeValue/ element of type
--- String, Number, or Binary (not a set type). If the target attribute of the
--- comparison is of type String, then the operator checks for a substring match.
--- If the target attribute of the comparison is of type Binary, then the
--- operator looks for a subsequence of the target that matches the input. If the
--- target attribute of the comparison is a set ("'SS'", "'NS'", or "'BS'"), then the
--- operator evaluates to true if it finds an exact match with any member of the
--- set.
+--     -   'LE' : Less than or equal.
 --
--- CONTAINS is supported for lists: When evaluating "'a CONTAINS b'", "'a'" can be
--- a list; however, "'b'" cannot be a set, a map, or a list.
+--         /AttributeValueList/ can contain only one /AttributeValue/
+--         element of type String, Number, or Binary (not a set type). If
+--         an item contains an /AttributeValue/ element of a different type
+--         than the one provided in the request, the value does not match.
+--         For example, '{\"S\":\"6\"}' does not equal '{\"N\":\"6\"}'.
+--         Also, '{\"N\":\"6\"}' does not compare to
+--         '{\"NS\":[\"6\", \"2\", \"1\"]}'.
 --
--- 'NOT_CONTAINS' : Checks for absence of a subsequence, or absence of a value
--- in a set.
+--     -   'LT' : Less than.
 --
--- /AttributeValueList/ can contain only one /AttributeValue/ element of type
--- String, Number, or Binary (not a set type). If the target attribute of the
--- comparison is a String, then the operator checks for the absence of a
--- substring match. If the target attribute of the comparison is Binary, then
--- the operator checks for the absence of a subsequence of the target that
--- matches the input. If the target attribute of the comparison is a set ("'SS'", "'NS'", or "'BS'"), then the operator evaluates to true if it /does not/ find an
--- exact match with any member of the set.
+--         /AttributeValueList/ can contain only one /AttributeValue/ of
+--         type String, Number, or Binary (not a set type). If an item
+--         contains an /AttributeValue/ element of a different type than
+--         the one provided in the request, the value does not match. For
+--         example, '{\"S\":\"6\"}' does not equal '{\"N\":\"6\"}'. Also,
+--         '{\"N\":\"6\"}' does not compare to
+--         '{\"NS\":[\"6\", \"2\", \"1\"]}'.
 --
--- NOT_CONTAINS is supported for lists: When evaluating "'a NOT CONTAINS b'", "'a'"
--- can be a list; however, "'b'" cannot be a set, a map, or a list.
+--     -   'GE' : Greater than or equal.
 --
--- 'BEGINS_WITH' : Checks for a prefix.
+--         /AttributeValueList/ can contain only one /AttributeValue/
+--         element of type String, Number, or Binary (not a set type). If
+--         an item contains an /AttributeValue/ element of a different type
+--         than the one provided in the request, the value does not match.
+--         For example, '{\"S\":\"6\"}' does not equal '{\"N\":\"6\"}'.
+--         Also, '{\"N\":\"6\"}' does not compare to
+--         '{\"NS\":[\"6\", \"2\", \"1\"]}'.
 --
--- /AttributeValueList/ can contain only one /AttributeValue/ of type String or
--- Binary (not a Number or a set type). The target attribute of the comparison
--- must be of type String or Binary (not a Number or a set type).
+--     -   'GT' : Greater than.
 --
+--         /AttributeValueList/ can contain only one /AttributeValue/
+--         element of type String, Number, or Binary (not a set type). If
+--         an item contains an /AttributeValue/ element of a different type
+--         than the one provided in the request, the value does not match.
+--         For example, '{\"S\":\"6\"}' does not equal '{\"N\":\"6\"}'.
+--         Also, '{\"N\":\"6\"}' does not compare to
+--         '{\"NS\":[\"6\", \"2\", \"1\"]}'.
 --
+--     -   'NOT_NULL' : The attribute exists. 'NOT_NULL' is supported for
+--         all datatypes, including lists and maps.
 --
--- 'IN' : Checks for matching elements within two sets.
+--         This operator tests for the existence of an attribute, not its
+--         data type. If the data type of attribute \"'a'\" is null, and
+--         you evaluate it using 'NOT_NULL', the result is a Boolean
+--         /true/. This result is because the attribute \"'a'\" exists; its
+--         data type is not relevant to the 'NOT_NULL' comparison operator.
 --
--- /AttributeValueList/ can contain one or more /AttributeValue/ elements of type
--- String, Number, or Binary (not a set type). These attributes are compared
--- against an existing set type attribute of an item. If any elements of the
--- input set are present in the item attribute, the expression evaluates to true.
+--     -   'NULL' : The attribute does not exist. 'NULL' is supported for
+--         all datatypes, including lists and maps.
 --
--- 'BETWEEN' : Greater than or equal to the first value, and less than or equal
--- to the second value.
+--         This operator tests for the nonexistence of an attribute, not
+--         its data type. If the data type of attribute \"'a'\" is null,
+--         and you evaluate it using 'NULL', the result is a Boolean
+--         /false/. This is because the attribute \"'a'\" exists; its data
+--         type is not relevant to the 'NULL' comparison operator.
 --
--- /AttributeValueList/ must contain two /AttributeValue/ elements of the same
--- type, either String, Number, or Binary (not a set type). A target attribute
--- matches if the target value is greater than, or equal to, the first element
--- and less than, or equal to, the second element. If an item contains an /AttributeValue/ element of a different type than the one provided in the request, the value
--- does not match. For example, '{"S":"6"}' does not compare to '{"N":"6"}'. Also, '{"N":"6"}' does not compare to '{"NS":["6", "2", "1"]}'
+--     -   'CONTAINS' : Checks for a subsequence, or value in a set.
 --
--- For usage examples of /AttributeValueList/ and /ComparisonOperator/, see <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.html Legacy Conditional Parameters> in the /Amazon DynamoDB Developer Guide/.
+--         /AttributeValueList/ can contain only one /AttributeValue/
+--         element of type String, Number, or Binary (not a set type). If
+--         the target attribute of the comparison is of type String, then
+--         the operator checks for a substring match. If the target
+--         attribute of the comparison is of type Binary, then the operator
+--         looks for a subsequence of the target that matches the input. If
+--         the target attribute of the comparison is a set (\"'SS'\",
+--         \"'NS'\", or \"'BS'\"), then the operator evaluates to true if
+--         it finds an exact match with any member of the set.
 --
--- For backward compatibility with previous DynamoDB releases, the following
--- parameters can be used instead of /AttributeValueList/ and /ComparisonOperator/:
+--         CONTAINS is supported for lists: When evaluating
+--         \"'a CONTAINS b'\", \"'a'\" can be a list; however, \"'b'\"
+--         cannot be a set, a map, or a list.
 --
--- /Value/ - A value for DynamoDB to compare with an attribute.
+--     -   'NOT_CONTAINS' : Checks for absence of a subsequence, or absence
+--         of a value in a set.
 --
--- /Exists/ - A Boolean value that causes DynamoDB to evaluate the value before
--- attempting the conditional operation:
+--         /AttributeValueList/ can contain only one /AttributeValue/
+--         element of type String, Number, or Binary (not a set type). If
+--         the target attribute of the comparison is a String, then the
+--         operator checks for the absence of a substring match. If the
+--         target attribute of the comparison is Binary, then the operator
+--         checks for the absence of a subsequence of the target that
+--         matches the input. If the target attribute of the comparison is
+--         a set (\"'SS'\", \"'NS'\", or \"'BS'\"), then the operator
+--         evaluates to true if it /does not/ find an exact match with any
+--         member of the set.
 --
--- If /Exists/ is 'true', DynamoDB will check to see if that attribute value
--- already exists in the table. If it is found, then the condition evaluates to
--- true; otherwise the condition evaluate to false.
+--         NOT_CONTAINS is supported for lists: When evaluating
+--         \"'a NOT CONTAINS b'\", \"'a'\" can be a list; however, \"'b'\"
+--         cannot be a set, a map, or a list.
 --
--- If /Exists/ is 'false', DynamoDB assumes that the attribute value does /not/
--- exist in the table. If in fact the value does not exist, then the assumption
--- is valid and the condition evaluates to true. If the value is found, despite
--- the assumption that it does not exist, the condition evaluates to false.
+--     -   'BEGINS_WITH' : Checks for a prefix.
 --
--- Note that the default value for /Exists/ is 'true'.
+--         /AttributeValueList/ can contain only one /AttributeValue/ of
+--         type String or Binary (not a Number or a set type). The target
+--         attribute of the comparison must be of type String or Binary
+--         (not a Number or a set type).
 --
--- The /Value/ and /Exists/ parameters are incompatible with /AttributeValueList/
--- and /ComparisonOperator/. Note that if you use both sets of parameters at once,
--- DynamoDB will return a /ValidationException/ exception.
-piExpected :: Lens' PutItem (HashMap Text ExpectedAttributeValue)
-piExpected = lens _piExpected (\s a -> s { _piExpected = a }) . _Map
-
--- | One or more substitution tokens for attribute names in an expression. The
--- following are some use cases for using /ExpressionAttributeNames/:
+--     -   'IN' : Checks for matching elements within two sets.
 --
--- To access an attribute whose name conflicts with a DynamoDB reserved word.
+--         /AttributeValueList/ can contain one or more /AttributeValue/
+--         elements of type String, Number, or Binary (not a set type).
+--         These attributes are compared against an existing set type
+--         attribute of an item. If any elements of the input set are
+--         present in the item attribute, the expression evaluates to true.
 --
--- To create a placeholder for repeating occurrences of an attribute name in
--- an expression.
+--     -   'BETWEEN' : Greater than or equal to the first value, and less
+--         than or equal to the second value.
 --
--- To prevent special characters in an attribute name from being
--- misinterpreted in an expression.
+--         /AttributeValueList/ must contain two /AttributeValue/ elements
+--         of the same type, either String, Number, or Binary (not a set
+--         type). A target attribute matches if the target value is greater
+--         than, or equal to, the first element and less than, or equal to,
+--         the second element. If an item contains an /AttributeValue/
+--         element of a different type than the one provided in the
+--         request, the value does not match. For example, '{\"S\":\"6\"}'
+--         does not compare to '{\"N\":\"6\"}'. Also, '{\"N\":\"6\"}' does
+--         not compare to '{\"NS\":[\"6\", \"2\", \"1\"]}'
 --
--- Use the # character in an expression to dereference an attribute name. For
--- example, consider the following attribute name:
+-- For usage examples of /AttributeValueList/ and /ComparisonOperator/, see
+-- <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.html Legacy Conditional Parameters>
+-- in the /Amazon DynamoDB Developer Guide/.
 --
--- 'Percentile'
+-- For backward compatibility with previous DynamoDB releases, the
+-- following parameters can be used instead of /AttributeValueList/ and
+-- /ComparisonOperator/:
 --
--- The name of this attribute conflicts with a reserved word, so it cannot be
--- used directly in an expression. (For the complete list of reserved words, see <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ReservedWords.html Reserved Words> in the /Amazon DynamoDB Developer Guide/). To work around this,
--- you could specify the following for /ExpressionAttributeNames/:
+-- -   /Value/ - A value for DynamoDB to compare with an attribute.
 --
--- '{"#P":"Percentile"}'
+-- -   /Exists/ - A Boolean value that causes DynamoDB to evaluate the
+--     value before attempting the conditional operation:
 --
--- You could then use this substitution in an expression, as in this example:
+--     -   If /Exists/ is 'true', DynamoDB will check to see if that
+--         attribute value already exists in the table. If it is found,
+--         then the condition evaluates to true; otherwise the condition
+--         evaluate to false.
 --
--- '#P = :val'
+--     -   If /Exists/ is 'false', DynamoDB assumes that the attribute
+--         value does /not/ exist in the table. If in fact the value does
+--         not exist, then the assumption is valid and the condition
+--         evaluates to true. If the value is found, despite the assumption
+--         that it does not exist, the condition evaluates to false.
 --
--- Tokens that begin with the : character are /expression attribute values/,
--- which are placeholders for the actual value at runtime.
+--     Note that the default value for /Exists/ is 'true'.
 --
--- For more information on expression attribute names, see <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ExpressionPlaceholders.html Using Placeholdersfor Attribute Names and Values> in the /Amazon DynamoDB Developer Guide/.
-piExpressionAttributeNames :: Lens' PutItem (HashMap Text Text)
-piExpressionAttributeNames =
-    lens _piExpressionAttributeNames
-        (\s a -> s { _piExpressionAttributeNames = a })
-            . _Map
+-- The /Value/ and /Exists/ parameters are incompatible with
+-- /AttributeValueList/ and /ComparisonOperator/. Note that if you use both
+-- sets of parameters at once, DynamoDB will return a /ValidationException/
+-- exception.
+piExpected :: Lens' PutItem (HashMap Text ExpectedAttributeValue)
+piExpected = lens _piExpected (\ s a -> s{_piExpected = a}) . _Default . _Map;
 
--- | One or more values that can be substituted in an expression.
---
--- Use the : (colon) character in an expression to dereference an attribute
--- value. For example, suppose that you wanted to check whether the value of the /ProductStatus/ attribute was one of the following:
---
--- 'Available | Backordered | Discontinued'
---
--- You would first need to specify /ExpressionAttributeValues/ as follows:
---
--- '{ ":avail":{"S":"Available"}, ":back":{"S":"Backordered"},":disc":{"S":"Discontinued"} }'
---
--- You could then use these values in an expression, such as this:
---
--- 'ProductStatus IN (:avail, :back, :disc)'
---
--- For more information on expression attribute values, see <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.ExpressionPlaceholders.html Using Placeholdersfor Attribute Names and Values> in the /Amazon DynamoDB Developer Guide/.
-piExpressionAttributeValues :: Lens' PutItem (HashMap Text AttributeValue)
-piExpressionAttributeValues =
-    lens _piExpressionAttributeValues
-        (\s a -> s { _piExpressionAttributeValues = a })
-            . _Map
+-- | The name of the table to contain the item.
+piTableName :: Lens' PutItem Text
+piTableName = lens _piTableName (\ s a -> s{_piTableName = a});
 
--- | A map of attribute name/value pairs, one for each attribute. Only the primary
--- key attributes are required; you can optionally provide other attribute
--- name-value pairs for the item.
+-- | A map of attribute name\/value pairs, one for each attribute. Only the
+-- primary key attributes are required; you can optionally provide other
+-- attribute name-value pairs for the item.
 --
 -- You must provide all of the attributes for the primary key. For example,
--- with a hash type primary key, you only need to provide the hash attribute.
--- For a hash-and-range type primary key, you must provide both the hash
--- attribute and the range attribute.
+-- with a hash type primary key, you only need to provide the hash
+-- attribute. For a hash-and-range type primary key, you must provide both
+-- the hash attribute and the range attribute.
 --
--- If you specify any attributes that are part of an index key, then the data
--- types for those attributes must match those of the schema in the table's
--- attribute definition.
+-- If you specify any attributes that are part of an index key, then the
+-- data types for those attributes must match those of the schema in the
+-- table\'s attribute definition.
 --
--- For more information about primary keys, see <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DataModel.html#DataModelPrimaryKey Primary Key> in the /AmazonDynamoDB Developer Guide/.
+-- For more information about primary keys, see
+-- <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DataModel.html#DataModelPrimaryKey Primary Key>
+-- in the /Amazon DynamoDB Developer Guide/.
 --
 -- Each element in the /Item/ map is an /AttributeValue/ object.
 piItem :: Lens' PutItem (HashMap Text AttributeValue)
-piItem = lens _piItem (\s a -> s { _piItem = a }) . _Map
+piItem = lens _piItem (\ s a -> s{_piItem = a}) . _Map;
 
-piReturnConsumedCapacity :: Lens' PutItem (Maybe ReturnConsumedCapacity)
-piReturnConsumedCapacity =
-    lens _piReturnConsumedCapacity
-        (\s a -> s { _piReturnConsumedCapacity = a })
+instance AWSRequest PutItem where
+        type Sv PutItem = DynamoDB
+        type Rs PutItem = PutItemResponse
+        request = postJSON
+        response
+          = receiveJSON
+              (\ s h x ->
+                 PutItemResponse' <$>
+                   (x .?> "ConsumedCapacity") <*>
+                     (x .?> "ItemCollectionMetrics")
+                     <*> (x .?> "Attributes" .!@ mempty)
+                     <*> (pure (fromEnum s)))
 
--- | A value that if set to 'SIZE', the response includes statistics about item
--- collections, if any, that were modified during the operation are returned in
--- the response. If set to 'NONE' (the default), no statistics are returned.
-piReturnItemCollectionMetrics :: Lens' PutItem (Maybe ReturnItemCollectionMetrics)
-piReturnItemCollectionMetrics =
-    lens _piReturnItemCollectionMetrics
-        (\s a -> s { _piReturnItemCollectionMetrics = a })
+instance ToHeaders PutItem where
+        toHeaders
+          = const
+              (mconcat
+                 ["X-Amz-Target" =#
+                    ("DynamoDB_20120810.PutItem" :: ByteString),
+                  "Content-Type" =#
+                    ("application/x-amz-json-1.0" :: ByteString)])
 
--- | Use /ReturnValues/ if you want to get the item attributes as they appeared
--- before they were updated with the /PutItem/ request. For /PutItem/, the valid
--- values are:
---
--- 'NONE' - If /ReturnValues/ is not specified, or if its value is 'NONE', then
--- nothing is returned. (This setting is the default for /ReturnValues/.)
---
--- 'ALL_OLD' - If /PutItem/ overwrote an attribute name-value pair, then the
--- content of the old item is returned.
---
---
-piReturnValues :: Lens' PutItem (Maybe ReturnValue)
-piReturnValues = lens _piReturnValues (\s a -> s { _piReturnValues = a })
+instance ToJSON PutItem where
+        toJSON PutItem'{..}
+          = object
+              ["ReturnValues" .= _piReturnValues,
+               "ExpressionAttributeNames" .=
+                 _piExpressionAttributeNames,
+               "ReturnConsumedCapacity" .=
+                 _piReturnConsumedCapacity,
+               "ExpressionAttributeValues" .=
+                 _piExpressionAttributeValues,
+               "ReturnItemCollectionMetrics" .=
+                 _piReturnItemCollectionMetrics,
+               "ConditionExpression" .= _piConditionExpression,
+               "ConditionalOperator" .= _piConditionalOperator,
+               "Expected" .= _piExpected,
+               "TableName" .= _piTableName, "Item" .= _piItem]
 
--- | The name of the table to contain the item.
-piTableName :: Lens' PutItem Text
-piTableName = lens _piTableName (\s a -> s { _piTableName = a })
+instance ToPath PutItem where
+        toPath = const "/"
 
-data PutItemResponse = PutItemResponse
-    { _pirAttributes            :: Map Text AttributeValue
-    , _pirConsumedCapacity      :: Maybe ConsumedCapacity
-    , _pirItemCollectionMetrics :: Maybe ItemCollectionMetrics
-    } deriving (Eq, Read, Show)
+instance ToQuery PutItem where
+        toQuery = const mempty
 
--- | 'PutItemResponse' constructor.
+-- | Represents the output of a /PutItem/ operation.
 --
--- The fields accessible through corresponding lenses are:
+-- /See:/ 'putItemResponse' smart constructor.
+data PutItemResponse = PutItemResponse'
+    { _pirsConsumedCapacity      :: !(Maybe ConsumedCapacity)
+    , _pirsItemCollectionMetrics :: !(Maybe ItemCollectionMetrics)
+    , _pirsAttributes            :: !(Maybe (Map Text AttributeValue))
+    , _pirsStatus                :: !Int
+    } deriving (Eq,Read,Show,Data,Typeable,Generic)
+
+-- | Creates a value of 'PutItemResponse' with the minimum fields required to make a request.
 --
--- * 'pirAttributes' @::@ 'HashMap' 'Text' 'AttributeValue'
+-- Use one of the following lenses to modify other fields as desired:
 --
--- * 'pirConsumedCapacity' @::@ 'Maybe' 'ConsumedCapacity'
+-- * 'pirsConsumedCapacity'
 --
--- * 'pirItemCollectionMetrics' @::@ 'Maybe' 'ItemCollectionMetrics'
+-- * 'pirsItemCollectionMetrics'
 --
-putItemResponse :: PutItemResponse
-putItemResponse = PutItemResponse
-    { _pirAttributes            = mempty
-    , _pirConsumedCapacity      = Nothing
-    , _pirItemCollectionMetrics = Nothing
+-- * 'pirsAttributes'
+--
+-- * 'pirsStatus'
+putItemResponse
+    :: Int -- ^ 'pirsStatus'
+    -> PutItemResponse
+putItemResponse pStatus_ =
+    PutItemResponse'
+    { _pirsConsumedCapacity = Nothing
+    , _pirsItemCollectionMetrics = Nothing
+    , _pirsAttributes = Nothing
+    , _pirsStatus = pStatus_
     }
 
--- | The attribute values as they appeared before the /PutItem/ operation, but only
--- if /ReturnValues/ is specified as 'ALL_OLD' in the request. Each element consists
--- of an attribute name and an attribute value.
-pirAttributes :: Lens' PutItemResponse (HashMap Text AttributeValue)
-pirAttributes = lens _pirAttributes (\s a -> s { _pirAttributes = a }) . _Map
-
-pirConsumedCapacity :: Lens' PutItemResponse (Maybe ConsumedCapacity)
-pirConsumedCapacity =
-    lens _pirConsumedCapacity (\s a -> s { _pirConsumedCapacity = a })
+-- | Undocumented member.
+pirsConsumedCapacity :: Lens' PutItemResponse (Maybe ConsumedCapacity)
+pirsConsumedCapacity = lens _pirsConsumedCapacity (\ s a -> s{_pirsConsumedCapacity = a});
 
 -- | Information about item collections, if any, that were affected by the
--- operation. /ItemCollectionMetrics/ is only returned if the request asked for
--- it. If the table does not have any local secondary indexes, this information
--- is not returned in the response.
+-- operation. /ItemCollectionMetrics/ is only returned if the request asked
+-- for it. If the table does not have any local secondary indexes, this
+-- information is not returned in the response.
 --
 -- Each /ItemCollectionMetrics/ element consists of:
 --
--- /ItemCollectionKey/ - The hash key value of the item collection. This is the
--- same as the hash key of the item.
---
--- /SizeEstimateRange/ - An estimate of item collection size, in gigabytes. This
--- value is a two-element array containing a lower bound and an upper bound for
--- the estimate. The estimate includes the size of all the items in the table,
--- plus the size of all attributes projected into all of the local secondary
--- indexes on that table. Use this estimate to measure whether a local secondary
--- index is approaching its size limit.
+-- -   /ItemCollectionKey/ - The hash key value of the item collection.
+--     This is the same as the hash key of the item.
 --
--- The estimate is subject to change over time; therefore, do not rely on the
--- precision or accuracy of the estimate.
+-- -   /SizeEstimateRange/ - An estimate of item collection size, in
+--     gigabytes. This value is a two-element array containing a lower
+--     bound and an upper bound for the estimate. The estimate includes the
+--     size of all the items in the table, plus the size of all attributes
+--     projected into all of the local secondary indexes on that table. Use
+--     this estimate to measure whether a local secondary index is
+--     approaching its size limit.
 --
+--     The estimate is subject to change over time; therefore, do not rely
+--     on the precision or accuracy of the estimate.
 --
-pirItemCollectionMetrics :: Lens' PutItemResponse (Maybe ItemCollectionMetrics)
-pirItemCollectionMetrics =
-    lens _pirItemCollectionMetrics
-        (\s a -> s { _pirItemCollectionMetrics = a })
-
-instance ToPath PutItem where
-    toPath = const "/"
-
-instance ToQuery PutItem where
-    toQuery = const mempty
-
-instance ToHeaders PutItem
-
-instance ToJSON PutItem where
-    toJSON PutItem{..} = object
-        [ "TableName"                   .= _piTableName
-        , "Item"                        .= _piItem
-        , "Expected"                    .= _piExpected
-        , "ReturnValues"                .= _piReturnValues
-        , "ReturnConsumedCapacity"      .= _piReturnConsumedCapacity
-        , "ReturnItemCollectionMetrics" .= _piReturnItemCollectionMetrics
-        , "ConditionalOperator"         .= _piConditionalOperator
-        , "ConditionExpression"         .= _piConditionExpression
-        , "ExpressionAttributeNames"    .= _piExpressionAttributeNames
-        , "ExpressionAttributeValues"   .= _piExpressionAttributeValues
-        ]
-
-instance AWSRequest PutItem where
-    type Sv PutItem = DynamoDB
-    type Rs PutItem = PutItemResponse
+pirsItemCollectionMetrics :: Lens' PutItemResponse (Maybe ItemCollectionMetrics)
+pirsItemCollectionMetrics = lens _pirsItemCollectionMetrics (\ s a -> s{_pirsItemCollectionMetrics = a});
 
-    request  = post "PutItem"
-    response = jsonResponse
+-- | The attribute values as they appeared before the /PutItem/ operation,
+-- but only if /ReturnValues/ is specified as 'ALL_OLD' in the request.
+-- Each element consists of an attribute name and an attribute value.
+pirsAttributes :: Lens' PutItemResponse (HashMap Text AttributeValue)
+pirsAttributes = lens _pirsAttributes (\ s a -> s{_pirsAttributes = a}) . _Default . _Map;
 
-instance FromJSON PutItemResponse where
-    parseJSON = withObject "PutItemResponse" $ \o -> PutItemResponse
-        <$> o .:? "Attributes" .!= mempty
-        <*> o .:? "ConsumedCapacity"
-        <*> o .:? "ItemCollectionMetrics"
+-- | The response status code.
+pirsStatus :: Lens' PutItemResponse Int
+pirsStatus = lens _pirsStatus (\ s a -> s{_pirsStatus = a});
diff --git a/gen/Network/AWS/DynamoDB/Query.hs b/gen/Network/AWS/DynamoDB/Query.hs
--- a/gen/Network/AWS/DynamoDB/Query.hs
+++ b/gen/Network/AWS/DynamoDB/Query.hs
@@ -1,759 +1,848 @@
-{-# LANGUAGE DataKinds                   #-}
-{-# LANGUAGE DeriveGeneric               #-}
-{-# LANGUAGE FlexibleInstances           #-}
-{-# LANGUAGE GeneralizedNewtypeDeriving  #-}
-{-# LANGUAGE LambdaCase                  #-}
-{-# LANGUAGE NoImplicitPrelude           #-}
-{-# LANGUAGE OverloadedStrings           #-}
-{-# LANGUAGE RecordWildCards             #-}
-{-# LANGUAGE TypeFamilies                #-}
-
-{-# OPTIONS_GHC -fno-warn-unused-imports #-}
-
--- Module      : Network.AWS.DynamoDB.Query
--- Copyright   : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>
--- License     : This Source Code Form is subject to the terms of
---               the Mozilla Public License, v. 2.0.
---               A copy of the MPL can be found in the LICENSE file or
---               you can obtain it at http://mozilla.org/MPL/2.0/.
--- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com>
--- Stability   : experimental
--- Portability : non-portable (GHC extensions)
---
--- Derived from AWS service descriptions, licensed under Apache 2.0.
-
--- | A /Query/ operation uses the primary key of a table or a secondary index to
--- directly access items from that table or index.
---
--- Use the /KeyConditionExpression/ parameter to provide a specific hash key
--- value. The /Query/ operation will return all of the items from the table or
--- index with that hash key value. You can optionally narrow the scope of the /Query/ by specifying a range key value and a comparison operator in the /KeyConditionExpression/. You can use the /ScanIndexForward/ parameter to get results in forward or
--- reverse order, by range key or by index key.
---
--- Queries that do not return results consume the minimum number of read
--- capacity units for that type of read operation.
---
--- If the total number of items meeting the query criteria exceeds the result
--- set size limit of 1 MB, the query stops and results are returned to the user
--- with /LastEvaluatedKey/ to continue the query in a subsequent operation. Unlike
--- a /Scan/ operation, a /Query/ operation never returns both an empty result set
--- and a /LastEvaluatedKey/. The /LastEvaluatedKey/ is only provided if the results
--- exceed 1 MB, or if you have used /Limit/.
---
--- You can query a table, a local secondary index, or a global secondary index.
--- For a query on a table or on a local secondary index, you can set /ConsistentRead/ to true and obtain a strongly consistent result. Global secondary indexes
--- support eventually consistent reads only, so do not specify /ConsistentRead/
--- when querying a global secondary index.
---
--- <http://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_Query.html>
-module Network.AWS.DynamoDB.Query
-    (
-    -- * Request
-      Query
-    -- ** Request constructor
-    , query
-    -- ** Request lenses
-    , qAttributesToGet
-    , qConditionalOperator
-    , qConsistentRead
-    , qExclusiveStartKey
-    , qExpressionAttributeNames
-    , qExpressionAttributeValues
-    , qFilterExpression
-    , qIndexName
-    , qKeyConditionExpression
-    , qKeyConditions
-    , qLimit
-    , qProjectionExpression
-    , qQueryFilter
-    , qReturnConsumedCapacity
-    , qScanIndexForward
-    , qSelect
-    , qTableName
-
-    -- * Response
-    , QueryResponse
-    -- ** Response constructor
-    , queryResponse
-    -- ** Response lenses
-    , qrConsumedCapacity
-    , qrCount
-    , qrItems
-    , qrLastEvaluatedKey
-    , qrScannedCount
-    ) where
-
-import Network.AWS.Data (Object)
-import Network.AWS.Prelude
-import Network.AWS.Request.JSON
-import Network.AWS.DynamoDB.Types
-import qualified GHC.Exts
-
-data Query = Query
-    { _qAttributesToGet           :: List1 "AttributesToGet" Text
-    , _qConditionalOperator       :: Maybe ConditionalOperator
-    , _qConsistentRead            :: Maybe Bool
-    , _qExclusiveStartKey         :: Map Text AttributeValue
-    , _qExpressionAttributeNames  :: Map Text Text
-    , _qExpressionAttributeValues :: Map Text AttributeValue
-    , _qFilterExpression          :: Maybe Text
-    , _qIndexName                 :: Maybe Text
-    , _qKeyConditionExpression    :: Maybe Text
-    , _qKeyConditions             :: Map Text Condition
-    , _qLimit                     :: Maybe Nat
-    , _qProjectionExpression      :: Maybe Text
-    , _qQueryFilter               :: Map Text Condition
-    , _qReturnConsumedCapacity    :: Maybe ReturnConsumedCapacity
-    , _qScanIndexForward          :: Maybe Bool
-    , _qSelect                    :: Maybe Select
-    , _qTableName                 :: Text
-    } deriving (Eq, Read, Show)
-
--- | 'Query' constructor.
---
--- The fields accessible through corresponding lenses are:
---
--- * 'qAttributesToGet' @::@ 'NonEmpty' 'Text'
---
--- * 'qConditionalOperator' @::@ 'Maybe' 'ConditionalOperator'
---
--- * 'qConsistentRead' @::@ 'Maybe' 'Bool'
---
--- * 'qExclusiveStartKey' @::@ 'HashMap' 'Text' 'AttributeValue'
---
--- * 'qExpressionAttributeNames' @::@ 'HashMap' 'Text' 'Text'
---
--- * 'qExpressionAttributeValues' @::@ 'HashMap' 'Text' 'AttributeValue'
---
--- * 'qFilterExpression' @::@ 'Maybe' 'Text'
---
--- * 'qIndexName' @::@ 'Maybe' 'Text'
---
--- * 'qKeyConditionExpression' @::@ 'Maybe' 'Text'
---
--- * 'qKeyConditions' @::@ 'HashMap' 'Text' 'Condition'
---
--- * 'qLimit' @::@ 'Maybe' 'Natural'
---
--- * 'qProjectionExpression' @::@ 'Maybe' 'Text'
---
--- * 'qQueryFilter' @::@ 'HashMap' 'Text' 'Condition'
---
--- * 'qReturnConsumedCapacity' @::@ 'Maybe' 'ReturnConsumedCapacity'
---
--- * 'qScanIndexForward' @::@ 'Maybe' 'Bool'
---
--- * 'qSelect' @::@ 'Maybe' 'Select'
---
--- * 'qTableName' @::@ 'Text'
---
-query :: Text -- ^ 'qTableName'
-      -> NonEmpty Text -- ^ 'qAttributesToGet'
-      -> Query
-query p1 p2 = Query
-    { _qTableName                 = p1
-    , _qAttributesToGet           = withIso _List1 (const id) p2
-    , _qIndexName                 = Nothing
-    , _qSelect                    = Nothing
-    , _qLimit                     = Nothing
-    , _qConsistentRead            = Nothing
-    , _qKeyConditions             = mempty
-    , _qQueryFilter               = mempty
-    , _qConditionalOperator       = Nothing
-    , _qScanIndexForward          = Nothing
-    , _qExclusiveStartKey         = mempty
-    , _qReturnConsumedCapacity    = Nothing
-    , _qProjectionExpression      = Nothing
-    , _qFilterExpression          = Nothing
-    , _qKeyConditionExpression    = Nothing
-    , _qExpressionAttributeNames  = mempty
-    , _qExpressionAttributeValues = mempty
-    }
-
--- | This is a legacy parameter, for backward compatibility. New applications
--- should use /ProjectionExpression/ instead. Do not combine legacy parameters and
--- expression parameters in a single API call; otherwise, DynamoDB will return a /ValidationException/ exception.
---
--- This parameter allows you to retrieve attributes of type List or Map;
--- however, it cannot retrieve individual elements within a List or a Map.
---
--- The names of one or more attributes to retrieve. If no attribute names are
--- provided, then all attributes will be returned. If any of the requested
--- attributes are not found, they will not appear in the result.
---
--- Note that /AttributesToGet/ has no effect on provisioned throughput
--- consumption. DynamoDB determines capacity units consumed based on item size,
--- not on the amount of data that is returned to an application.
---
--- You cannot use both /AttributesToGet/ and /Select/ together in a /Query/ request, /unless/ the value for /Select/ is 'SPECIFIC_ATTRIBUTES'. (This usage is equivalent to
--- specifying /AttributesToGet/ without any value for /Select/.)
---
--- If you query a local secondary index and request only attributes that are
--- projected into that index, the operation will read only the index and not the
--- table. If any of the requested attributes are not projected into the local
--- secondary index, DynamoDB will fetch each of these attributes from the parent
--- table. This extra fetching incurs additional throughput cost and latency.
---
--- If you query a global secondary index, you can only request attributes that
--- are projected into the index. Global secondary index queries cannot fetch
--- attributes from the parent table.
-qAttributesToGet :: Lens' Query (NonEmpty Text)
-qAttributesToGet = lens _qAttributesToGet (\s a -> s { _qAttributesToGet = a }) . _List1
-
--- | This is a legacy parameter, for backward compatibility. New applications
--- should use /FilterExpression/ instead. Do not combine legacy parameters and
--- expression parameters in a single API call; otherwise, DynamoDB will return a /ValidationException/ exception.
---
--- A logical operator to apply to the conditions in a /QueryFilter/ map:
---
--- 'AND' - If all of the conditions evaluate to true, then the entire map
--- evaluates to true.
---
--- 'OR' - If at least one of the conditions evaluate to true, then the entire map
--- evaluates to true.
---
--- If you omit /ConditionalOperator/, then 'AND' is the default.
---
--- The operation will succeed only if the entire map evaluates to true.
---
--- This parameter does not support attributes of type List or Map.
---
-qConditionalOperator :: Lens' Query (Maybe ConditionalOperator)
-qConditionalOperator =
-    lens _qConditionalOperator (\s a -> s { _qConditionalOperator = a })
-
--- | A value that if set to 'true', then the operation uses strongly consistent
--- reads; otherwise, eventually consistent reads are used.
---
--- Strongly consistent reads are not supported on global secondary indexes. If
--- you query a global secondary index with /ConsistentRead/ set to 'true', you will
--- receive an error message.
-qConsistentRead :: Lens' Query (Maybe Bool)
-qConsistentRead = lens _qConsistentRead (\s a -> s { _qConsistentRead = a })
-
--- | The primary key of the first item that this operation will evaluate. Use the
--- value that was returned for /LastEvaluatedKey/ in the previous operation.
---
--- The data type for /ExclusiveStartKey/ must be String, Number or Binary. No set
--- data types are allowed.
-qExclusiveStartKey :: Lens' Query (HashMap Text AttributeValue)
-qExclusiveStartKey =
-    lens _qExclusiveStartKey (\s a -> s { _qExclusiveStartKey = a })
-        . _Map
-
--- | One or more substitution tokens for attribute names in an expression. The
--- following are some use cases for using /ExpressionAttributeNames/:
---
--- To access an attribute whose name conflicts with a DynamoDB reserved word.
---
--- To create a placeholder for repeating occurrences of an attribute name in
--- an expression.
---
--- To prevent special characters in an attribute name from being
--- misinterpreted in an expression.
---
--- Use the # character in an expression to dereference an attribute name. For
--- example, consider the following attribute name:
---
--- 'Percentile'
---
--- The name of this attribute conflicts with a reserved word, so it cannot be
--- used directly in an expression. (For the complete list of reserved words, see <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ReservedWords.html Reserved Words> in the /Amazon DynamoDB Developer Guide/). To work around this,
--- you could specify the following for /ExpressionAttributeNames/:
---
--- '{"#P":"Percentile"}'
---
--- You could then use this substitution in an expression, as in this example:
---
--- '#P = :val'
---
--- Tokens that begin with the : character are /expression attribute values/,
--- which are placeholders for the actual value at runtime.
---
--- For more information on expression attribute names, see <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ExpressionPlaceholders.html Using Placeholdersfor Attribute Names and Values> in the /Amazon DynamoDB Developer Guide/.
-qExpressionAttributeNames :: Lens' Query (HashMap Text Text)
-qExpressionAttributeNames =
-    lens _qExpressionAttributeNames
-        (\s a -> s { _qExpressionAttributeNames = a })
-            . _Map
-
--- | One or more values that can be substituted in an expression.
---
--- Use the : (colon) character in an expression to dereference an attribute
--- value. For example, suppose that you wanted to check whether the value of the /ProductStatus/ attribute was one of the following:
---
--- 'Available | Backordered | Discontinued'
---
--- You would first need to specify /ExpressionAttributeValues/ as follows:
---
--- '{ ":avail":{"S":"Available"}, ":back":{"S":"Backordered"},":disc":{"S":"Discontinued"} }'
---
--- You could then use these values in an expression, such as this:
---
--- 'ProductStatus IN (:avail, :back, :disc)'
---
--- For more information on expression attribute values, see <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.ExpressionPlaceholders.html Using Placeholdersfor Attribute Names and Values> in the /Amazon DynamoDB Developer Guide/.
-qExpressionAttributeValues :: Lens' Query (HashMap Text AttributeValue)
-qExpressionAttributeValues =
-    lens _qExpressionAttributeValues
-        (\s a -> s { _qExpressionAttributeValues = a })
-            . _Map
-
--- | A string that contains conditions that DynamoDB applies after the /Query/
--- operation, but before the data is returned to you. Items that do not satisfy
--- the /FilterExpression/ criteria are not returned.
---
--- A /FilterExpression/ is applied after the items have already been read; the
--- process of filtering does not consume any additional read capacity units.
---
--- For more information, see <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/QueryAndScan.html#FilteringResults Filter Expressions> in the /Amazon DynamoDBDeveloper Guide/.
---
--- /FilterExpression/ replaces the legacy /QueryFilter/ and /ConditionalOperator/
--- parameters.
---
-qFilterExpression :: Lens' Query (Maybe Text)
-qFilterExpression =
-    lens _qFilterExpression (\s a -> s { _qFilterExpression = a })
-
--- | The name of an index to query. This index can be any local secondary index or
--- global secondary index on the table. Note that if you use the /IndexName/
--- parameter, you must also provide /TableName./
-qIndexName :: Lens' Query (Maybe Text)
-qIndexName = lens _qIndexName (\s a -> s { _qIndexName = a })
-
--- | The condition that specifies the key value(s) for items to be retrieved by
--- the /Query/ action.
---
--- The condition must perform an equality test on a single hash key value. The
--- condition can also test for one or more range key values. A /Query/ can use /KeyConditionExpression/ to retrieve a single item with a given hash and range key value, or several
--- items that have the same hash key value but different range key values.
---
--- The hash key equality test is required, and must be specified in the
--- following format:
---
--- 'hashAttributeName' /=/ ':hashval'
---
--- If you also want to provide a range key condition, it must be combined using /AND/ with the hash key condition. Following is an example, using the =
--- comparison operator for the range key:
---
--- 'hashAttributeName' /=/ ':hashval' /AND/ 'rangeAttributeName' /=/ ':rangeval'
---
--- Valid comparisons for the range key condition are as follows:
---
--- 'rangeAttributeName' /=/ ':rangeval' - true if the range key is equal to ':rangeval'.
---
--- 'rangeAttributeName' /</ ':rangeval' - true if the range key is less than ':rangeval'.
---
--- 'rangeAttributeName' /<=/ ':rangeval' - true if the range key is less than or
--- equal to ':rangeval'.
---
--- 'rangeAttributeName' />/ ':rangeval' - true if the range key is greater than ':rangeval'.
---
--- 'rangeAttributeName' />= /':rangeval' - true if the range key is greater than or
--- equal to ':rangeval'.
---
--- 'rangeAttributeName' /BETWEEN/ ':rangeval1' /AND/ ':rangeval2' - true if the range
--- key is less than or greater than ':rangeval1', and less than or equal to ':rangeval2'.
---
--- /begins_with (/'rangeAttributeName', ':rangeval'/)/ - true if the range key begins
--- with a particular operand. Note that the function name 'begins_with' is
--- case-sensitive.
---
--- Use the /ExpressionAttributeValues/ parameter to replace tokens such as ':hashval' and ':rangeval' with actual values at runtime.
---
--- You can optionally use the /ExpressionAttributeNames/ parameter to replace the
--- names of the hash and range attributes with placeholder tokens. This might be
--- necessary if an attribute name conflicts with a DynamoDB reserved word. For
--- example, the following /KeyConditionExpression/ causes an error because /Size/ is
--- a reserved word:
---
--- 'Size = :myval'   To work around this, define a placeholder (such a '#myval')
--- to represent the attribute name /Size/. /KeyConditionExpression/ then is as
--- follows:
---
--- '#S = :myval'   For a list of reserved words, see <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ReservedWords.html Reserved Words> in the /Amazon DynamoDB Developer Guide/.
---
--- For more information on /ExpressionAttributeNames/ and /ExpressionAttributeValues/, see <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ExpressionPlaceholders.html Using Placeholders for Attribute Names and Values> in the /AmazonDynamoDB Developer Guide/.
---
--- /KeyConditionExpression/ replaces the legacy /KeyConditions/ parameter.
---
---
-qKeyConditionExpression :: Lens' Query (Maybe Text)
-qKeyConditionExpression =
-    lens _qKeyConditionExpression (\s a -> s { _qKeyConditionExpression = a })
-
--- | This is a legacy parameter, for backward compatibility. New applications
--- should use /KeyConditionExpression/ instead. Do not combine legacy parameters
--- and expression parameters in a single API call; otherwise, DynamoDB will
--- return a /ValidationException/ exception.
---
--- The selection criteria for the query. For a query on a table, you can have
--- conditions only on the table primary key attributes. You must provide the
--- hash key attribute name and value as an 'EQ' condition. You can optionally
--- provide a second condition, referring to the range key attribute.
---
--- If you don't provide a range key condition, all of the items that match the
--- hash key will be retrieved. If a /FilterExpression/ or /QueryFilter/ is present,
--- it will be applied after the items are retrieved.
---
--- For a query on an index, you can have conditions only on the index key
--- attributes. You must provide the index hash attribute name and value as an 'EQ'
--- condition. You can optionally provide a second condition, referring to the
--- index key range attribute.
---
--- Each /KeyConditions/ element consists of an attribute name to compare, along
--- with the following:
---
--- /AttributeValueList/ - One or more values to evaluate against the supplied
--- attribute. The number of values in the list depends on the /ComparisonOperator/
--- being used.
---
--- For type Number, value comparisons are numeric.
---
--- String value comparisons for greater than, equals, or less than are based on
--- ASCII character code values. For example, 'a' is greater than 'A', and 'a' is
--- greater than 'B'. For a list of code values, see <http://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters http://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters>.
---
--- For Binary, DynamoDB treats each byte of the binary data as unsigned when it
--- compares binary values.
---
--- /ComparisonOperator/ - A comparator for evaluating attributes, for example,
--- equals, greater than, less than, and so on.
---
--- For /KeyConditions/, only the following comparison operators are supported:
---
--- 'EQ | LE | LT | GE | GT | BEGINS_WITH | BETWEEN'
---
--- The following are descriptions of these comparison operators.
---
--- 'EQ' : Equal.
---
--- /AttributeValueList/ can contain only one /AttributeValue/ of type String,
--- Number, or Binary (not a set type). If an item contains an /AttributeValue/
--- element of a different type than the one specified in the request, the value
--- does not match. For example, '{"S":"6"}' does not equal '{"N":"6"}'. Also, '{"N":"6"}' does not equal '{"NS":["6", "2", "1"]}'.
---
---
---
--- 'LE' : Less than or equal.
---
--- /AttributeValueList/ can contain only one /AttributeValue/ element of type
--- String, Number, or Binary (not a set type). If an item contains an /AttributeValue/ element of a different type than the one provided in the request, the value
--- does not match. For example, '{"S":"6"}' does not equal '{"N":"6"}'. Also, '{"N":"6"}' does not compare to '{"NS":["6", "2", "1"]}'.
---
---
---
--- 'LT' : Less than.
---
--- /AttributeValueList/ can contain only one /AttributeValue/ of type String,
--- Number, or Binary (not a set type). If an item contains an /AttributeValue/
--- element of a different type than the one provided in the request, the value
--- does not match. For example, '{"S":"6"}' does not equal '{"N":"6"}'. Also, '{"N":"6"}' does not compare to '{"NS":["6", "2", "1"]}'.
---
---
---
--- 'GE' : Greater than or equal.
---
--- /AttributeValueList/ can contain only one /AttributeValue/ element of type
--- String, Number, or Binary (not a set type). If an item contains an /AttributeValue/ element of a different type than the one provided in the request, the value
--- does not match. For example, '{"S":"6"}' does not equal '{"N":"6"}'. Also, '{"N":"6"}' does not compare to '{"NS":["6", "2", "1"]}'.
---
---
---
--- 'GT' : Greater than.
---
--- /AttributeValueList/ can contain only one /AttributeValue/ element of type
--- String, Number, or Binary (not a set type). If an item contains an /AttributeValue/ element of a different type than the one provided in the request, the value
--- does not match. For example, '{"S":"6"}' does not equal '{"N":"6"}'. Also, '{"N":"6"}' does not compare to '{"NS":["6", "2", "1"]}'.
---
---
---
--- 'BEGINS_WITH' : Checks for a prefix.
---
--- /AttributeValueList/ can contain only one /AttributeValue/ of type String or
--- Binary (not a Number or a set type). The target attribute of the comparison
--- must be of type String or Binary (not a Number or a set type).
---
---
---
--- 'BETWEEN' : Greater than or equal to the first value, and less than or equal
--- to the second value.
---
--- /AttributeValueList/ must contain two /AttributeValue/ elements of the same
--- type, either String, Number, or Binary (not a set type). A target attribute
--- matches if the target value is greater than, or equal to, the first element
--- and less than, or equal to, the second element. If an item contains an /AttributeValue/ element of a different type than the one provided in the request, the value
--- does not match. For example, '{"S":"6"}' does not compare to '{"N":"6"}'. Also, '{"N":"6"}' does not compare to '{"NS":["6", "2", "1"]}'
---
--- For usage examples of /AttributeValueList/ and /ComparisonOperator/, see <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.html Legacy Conditional Parameters> in the /Amazon DynamoDB Developer Guide/.
-qKeyConditions :: Lens' Query (HashMap Text Condition)
-qKeyConditions = lens _qKeyConditions (\s a -> s { _qKeyConditions = a }) . _Map
-
--- | The maximum number of items to evaluate (not necessarily the number of
--- matching items). If DynamoDB processes the number of items up to the limit
--- while processing the results, it stops the operation and returns the matching
--- values up to that point, and a key in /LastEvaluatedKey/ to apply in a
--- subsequent operation, so that you can pick up where you left off. Also, if
--- the processed data set size exceeds 1 MB before DynamoDB reaches this limit,
--- it stops the operation and returns the matching values up to the limit, and a
--- key in /LastEvaluatedKey/ to apply in a subsequent operation to continue the
--- operation. For more information, see <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/QueryAndScan.html Query and Scan> in the /Amazon DynamoDBDeveloper Guide/.
-qLimit :: Lens' Query (Maybe Natural)
-qLimit = lens _qLimit (\s a -> s { _qLimit = a }) . mapping _Nat
-
--- | A string that identifies one or more attributes to retrieve from the table.
--- These attributes can include scalars, sets, or elements of a JSON document.
--- The attributes in the expression must be separated by commas.
---
--- If no attribute names are specified, then all attributes will be returned.
--- If any of the requested attributes are not found, they will not appear in the
--- result.
---
--- For more information, see <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.AccessingItemAttributes.html Accessing Item Attributes> in the /Amazon DynamoDBDeveloper Guide/.
---
--- /ProjectionExpression/ replaces the legacy /AttributesToGet/ parameter.
---
-qProjectionExpression :: Lens' Query (Maybe Text)
-qProjectionExpression =
-    lens _qProjectionExpression (\s a -> s { _qProjectionExpression = a })
-
--- | This is a legacy parameter, for backward compatibility. New applications
--- should use /FilterExpression/ instead. Do not combine legacy parameters and
--- expression parameters in a single API call; otherwise, DynamoDB will return a /ValidationException/ exception.
---
--- A condition that evaluates the query results after the items are read and
--- returns only the desired values.
---
--- This parameter does not support attributes of type List or Map.
---
--- A /QueryFilter/ is applied after the items have already been read; the
--- process of filtering does not consume any additional read capacity units.
---
--- If you provide more than one condition in the /QueryFilter/ map, then by
--- default all of the conditions must evaluate to true. In other words, the
--- conditions are ANDed together. (You can use the /ConditionalOperator/ parameter
--- to OR the conditions instead. If you do this, then at least one of the
--- conditions must evaluate to true, rather than all of them.)
---
--- Note that /QueryFilter/ does not allow key attributes. You cannot define a
--- filter condition on a hash key or range key.
---
--- Each /QueryFilter/ element consists of an attribute name to compare, along
--- with the following:
---
--- /AttributeValueList/ - One or more values to evaluate against the supplied
--- attribute. The number of values in the list depends on the operator specified
--- in /ComparisonOperator/.
---
--- For type Number, value comparisons are numeric.
---
--- String value comparisons for greater than, equals, or less than are based on
--- ASCII character code values. For example, 'a' is greater than 'A', and 'a' is
--- greater than 'B'. For a list of code values, see <http://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters http://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters>.
---
--- For type Binary, DynamoDB treats each byte of the binary data as unsigned
--- when it compares binary values.
---
--- For information on specifying data types in JSON, see <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DataFormat.html JSON Data Format> in
--- the /Amazon DynamoDB Developer Guide/.
---
--- /ComparisonOperator/ - A comparator for evaluating attributes. For example,
--- equals, greater than, less than, etc.
---
--- The following comparison operators are available:
---
--- 'EQ | NE | LE | LT | GE | GT | NOT_NULL | NULL | CONTAINS | NOT_CONTAINS |BEGINS_WITH | IN | BETWEEN'
---
--- For complete descriptions of all comparison operators, see the <http://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_Condition.html Condition>
--- data type.
---
---
-qQueryFilter :: Lens' Query (HashMap Text Condition)
-qQueryFilter = lens _qQueryFilter (\s a -> s { _qQueryFilter = a }) . _Map
-
-qReturnConsumedCapacity :: Lens' Query (Maybe ReturnConsumedCapacity)
-qReturnConsumedCapacity =
-    lens _qReturnConsumedCapacity (\s a -> s { _qReturnConsumedCapacity = a })
-
--- | A value that specifies ascending (true) or descending (false) traversal of
--- the index. DynamoDB returns results reflecting the requested order determined
--- by the range key. If the data type is Number, the results are returned in
--- numeric order. For type String, the results are returned in order of ASCII
--- character code values. For type Binary, DynamoDB treats each byte of the
--- binary data as unsigned when it compares binary values.
---
--- If /ScanIndexForward/ is not specified, the results are returned in ascending
--- order.
-qScanIndexForward :: Lens' Query (Maybe Bool)
-qScanIndexForward =
-    lens _qScanIndexForward (\s a -> s { _qScanIndexForward = a })
-
--- | The attributes to be returned in the result. You can retrieve all item
--- attributes, specific item attributes, the count of matching items, or in the
--- case of an index, some or all of the attributes projected into the index.
---
--- 'ALL_ATTRIBUTES' - Returns all of the item attributes from the specified
--- table or index. If you query a local secondary index, then for each matching
--- item in the index DynamoDB will fetch the entire item from the parent table.
--- If the index is configured to project all item attributes, then all of the
--- data can be obtained from the local secondary index, and no fetching is
--- required.
---
--- 'ALL_PROJECTED_ATTRIBUTES' - Allowed only when querying an index. Retrieves
--- all attributes that have been projected into the index. If the index is
--- configured to project all attributes, this return value is equivalent to
--- specifying 'ALL_ATTRIBUTES'.
---
--- 'COUNT' - Returns the number of matching items, rather than the matching
--- items themselves.
---
--- 'SPECIFIC_ATTRIBUTES' - Returns only the attributes listed in /AttributesToGet/. This return value is equivalent to specifying /AttributesToGet/ without
--- specifying any value for /Select/.
---
--- If you query a local secondary index and request only attributes that are
--- projected into that index, the operation will read only the index and not the
--- table. If any of the requested attributes are not projected into the local
--- secondary index, DynamoDB will fetch each of these attributes from the parent
--- table. This extra fetching incurs additional throughput cost and latency.
---
--- If you query a global secondary index, you can only request attributes that
--- are projected into the index. Global secondary index queries cannot fetch
--- attributes from the parent table.
---
--- If neither /Select/ nor /AttributesToGet/ are specified, DynamoDB defaults to 'ALL_ATTRIBUTES' when accessing a table, and 'ALL_PROJECTED_ATTRIBUTES' when accessing an
--- index. You cannot use both /Select/ and /AttributesToGet/ together in a single
--- request, unless the value for /Select/ is 'SPECIFIC_ATTRIBUTES'. (This usage is
--- equivalent to specifying /AttributesToGet/ without any value for /Select/.)
---
--- If you use the /ProjectionExpression/ parameter, then the value for /Select/ can
--- only be 'SPECIFIC_ATTRIBUTES'. Any other value for /Select/ will return an error.
---
-qSelect :: Lens' Query (Maybe Select)
-qSelect = lens _qSelect (\s a -> s { _qSelect = a })
-
--- | The name of the table containing the requested items.
-qTableName :: Lens' Query Text
-qTableName = lens _qTableName (\s a -> s { _qTableName = a })
-
-data QueryResponse = QueryResponse
-    { _qrConsumedCapacity :: Maybe ConsumedCapacity
-    , _qrCount            :: Maybe Int
-    , _qrItems            :: List "Items" (Map Text AttributeValue)
-    , _qrLastEvaluatedKey :: Map Text AttributeValue
-    , _qrScannedCount     :: Maybe Int
-    } deriving (Eq, Read, Show)
-
--- | 'QueryResponse' constructor.
---
--- The fields accessible through corresponding lenses are:
---
--- * 'qrConsumedCapacity' @::@ 'Maybe' 'ConsumedCapacity'
---
--- * 'qrCount' @::@ 'Maybe' 'Int'
---
--- * 'qrItems' @::@ ['HashMap' 'Text' 'AttributeValue']
---
--- * 'qrLastEvaluatedKey' @::@ 'HashMap' 'Text' 'AttributeValue'
---
--- * 'qrScannedCount' @::@ 'Maybe' 'Int'
---
-queryResponse :: QueryResponse
-queryResponse = QueryResponse
-    { _qrItems            = mempty
-    , _qrCount            = Nothing
-    , _qrScannedCount     = Nothing
-    , _qrLastEvaluatedKey = mempty
-    , _qrConsumedCapacity = Nothing
-    }
-
-qrConsumedCapacity :: Lens' QueryResponse (Maybe ConsumedCapacity)
-qrConsumedCapacity =
-    lens _qrConsumedCapacity (\s a -> s { _qrConsumedCapacity = a })
-
--- | The number of items in the response.
---
--- If you used a /QueryFilter/ in the request, then /Count/ is the number of items
--- returned after the filter was applied, and /ScannedCount/ is the number of
--- matching items before> the filter was applied.
---
--- If you did not use a filter in the request, then /Count/ and /ScannedCount/ are
--- the same.
-qrCount :: Lens' QueryResponse (Maybe Int)
-qrCount = lens _qrCount (\s a -> s { _qrCount = a })
-
--- | An array of item attributes that match the query criteria. Each element in
--- this array consists of an attribute name and the value for that attribute.
-qrItems :: Lens' QueryResponse [HashMap Text AttributeValue]
-qrItems = lens _qrItems (\s a -> s { _qrItems = a }) . _List
-
--- | The primary key of the item where the operation stopped, inclusive of the
--- previous result set. Use this value to start a new operation, excluding this
--- value in the new request.
---
--- If /LastEvaluatedKey/ is empty, then the "last page" of results has been
--- processed and there is no more data to be retrieved.
---
--- If /LastEvaluatedKey/ is not empty, it does not necessarily mean that there is
--- more data in the result set. The only way to know when you have reached the
--- end of the result set is when /LastEvaluatedKey/ is empty.
-qrLastEvaluatedKey :: Lens' QueryResponse (HashMap Text AttributeValue)
-qrLastEvaluatedKey =
-    lens _qrLastEvaluatedKey (\s a -> s { _qrLastEvaluatedKey = a })
-        . _Map
-
--- | The number of items evaluated, before any /QueryFilter/ is applied. A high /ScannedCount/ value with few, or no, /Count/ results indicates an inefficient /Query/
--- operation. For more information, see <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/QueryAndScan.html#Count Count and ScannedCount> in the /AmazonDynamoDB Developer Guide/.
---
--- If you did not use a filter in the request, then /ScannedCount/ is the same as /Count/.
-qrScannedCount :: Lens' QueryResponse (Maybe Int)
-qrScannedCount = lens _qrScannedCount (\s a -> s { _qrScannedCount = a })
-
-instance ToPath Query where
-    toPath = const "/"
-
-instance ToQuery Query where
-    toQuery = const mempty
-
-instance ToHeaders Query
-
-instance ToJSON Query where
-    toJSON Query{..} = object
-        [ "TableName"                 .= _qTableName
-        , "IndexName"                 .= _qIndexName
-        , "Select"                    .= _qSelect
-        , "AttributesToGet"           .= _qAttributesToGet
-        , "Limit"                     .= _qLimit
-        , "ConsistentRead"            .= _qConsistentRead
-        , "KeyConditions"             .= _qKeyConditions
-        , "QueryFilter"               .= _qQueryFilter
-        , "ConditionalOperator"       .= _qConditionalOperator
-        , "ScanIndexForward"          .= _qScanIndexForward
-        , "ExclusiveStartKey"         .= _qExclusiveStartKey
-        , "ReturnConsumedCapacity"    .= _qReturnConsumedCapacity
-        , "ProjectionExpression"      .= _qProjectionExpression
-        , "FilterExpression"          .= _qFilterExpression
-        , "KeyConditionExpression"    .= _qKeyConditionExpression
-        , "ExpressionAttributeNames"  .= _qExpressionAttributeNames
-        , "ExpressionAttributeValues" .= _qExpressionAttributeValues
-        ]
-
-instance AWSRequest Query where
-    type Sv Query = DynamoDB
-    type Rs Query = QueryResponse
-
-    request  = post "Query"
-    response = jsonResponse
-
-instance FromJSON QueryResponse where
-    parseJSON = withObject "QueryResponse" $ \o -> QueryResponse
-        <$> o .:? "ConsumedCapacity"
-        <*> o .:? "Count"
-        <*> o .:? "Items" .!= mempty
-        <*> o .:? "LastEvaluatedKey" .!= mempty
-        <*> o .:? "ScannedCount"
-
-instance AWSPager Query where
-    page rq rs
-        | stop (rs ^. qrLastEvaluatedKey) = Nothing
-        | otherwise = Just $ rq
-            & qExclusiveStartKey .~ rs ^. qrLastEvaluatedKey
+{-# LANGUAGE DeriveDataTypeable #-}
+{-# LANGUAGE DeriveGeneric      #-}
+{-# LANGUAGE OverloadedStrings  #-}
+{-# LANGUAGE RecordWildCards    #-}
+{-# LANGUAGE TypeFamilies       #-}
+
+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
+{-# OPTIONS_GHC -fno-warn-unused-binds   #-}
+{-# OPTIONS_GHC -fno-warn-unused-matches #-}
+
+-- Derived from AWS service descriptions, licensed under Apache 2.0.
+
+-- |
+-- Module      : Network.AWS.DynamoDB.Query
+-- Copyright   : (c) 2013-2015 Brendan Hay
+-- License     : Mozilla Public License, v. 2.0.
+-- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com>
+-- Stability   : auto-generated
+-- Portability : non-portable (GHC extensions)
+--
+-- A /Query/ operation uses the primary key of a table or a secondary index
+-- to directly access items from that table or index.
+--
+-- Use the /KeyConditionExpression/ parameter to provide a specific hash
+-- key value. The /Query/ operation will return all of the items from the
+-- table or index with that hash key value. You can optionally narrow the
+-- scope of the /Query/ operation by specifying a range key value and a
+-- comparison operator in /KeyConditionExpression/. You can use the
+-- /ScanIndexForward/ parameter to get results in forward or reverse order,
+-- by range key or by index key.
+--
+-- Queries that do not return results consume the minimum number of read
+-- capacity units for that type of read operation.
+--
+-- If the total number of items meeting the query criteria exceeds the
+-- result set size limit of 1 MB, the query stops and results are returned
+-- to the user with the /LastEvaluatedKey/ element to continue the query in
+-- a subsequent operation. Unlike a /Scan/ operation, a /Query/ operation
+-- never returns both an empty result set and a /LastEvaluatedKey/ value.
+-- /LastEvaluatedKey/ is only provided if the results exceed 1 MB, or if
+-- you have used the /Limit/ parameter.
+--
+-- You can query a table, a local secondary index, or a global secondary
+-- index. For a query on a table or on a local secondary index, you can set
+-- the /ConsistentRead/ parameter to 'true' and obtain a strongly
+-- consistent result. Global secondary indexes support eventually
+-- consistent reads only, so do not specify /ConsistentRead/ when querying
+-- a global secondary index.
+--
+-- /See:/ <http://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_Query.html AWS API Reference> for Query.
+--
+-- This operation returns paginated results.
+module Network.AWS.DynamoDB.Query
+    (
+    -- * Creating a Request
+      query
+    , Query
+    -- * Request Lenses
+    , qProjectionExpression
+    , qKeyConditions
+    , qFilterExpression
+    , qQueryFilter
+    , qConsistentRead
+    , qExpressionAttributeNames
+    , qAttributesToGet
+    , qReturnConsumedCapacity
+    , qExpressionAttributeValues
+    , qScanIndexForward
+    , qLimit
+    , qSelect
+    , qConditionalOperator
+    , qKeyConditionExpression
+    , qExclusiveStartKey
+    , qIndexName
+    , qTableName
+
+    -- * Destructuring the Response
+    , queryResponse
+    , QueryResponse
+    -- * Response Lenses
+    , qrsLastEvaluatedKey
+    , qrsCount
+    , qrsScannedCount
+    , qrsItems
+    , qrsConsumedCapacity
+    , qrsStatus
+    ) where
+
+import           Network.AWS.DynamoDB.Types
+import           Network.AWS.DynamoDB.Types.Product
+import           Network.AWS.Pager
+import           Network.AWS.Prelude
+import           Network.AWS.Request
+import           Network.AWS.Response
+
+-- | Represents the input of a /Query/ operation.
+--
+-- /See:/ 'query' smart constructor.
+data Query = Query'
+    { _qProjectionExpression      :: !(Maybe Text)
+    , _qKeyConditions             :: !(Maybe (Map Text Condition))
+    , _qFilterExpression          :: !(Maybe Text)
+    , _qQueryFilter               :: !(Maybe (Map Text Condition))
+    , _qConsistentRead            :: !(Maybe Bool)
+    , _qExpressionAttributeNames  :: !(Maybe (Map Text Text))
+    , _qAttributesToGet           :: !(Maybe (List1 Text))
+    , _qReturnConsumedCapacity    :: !(Maybe ReturnConsumedCapacity)
+    , _qExpressionAttributeValues :: !(Maybe (Map Text AttributeValue))
+    , _qScanIndexForward          :: !(Maybe Bool)
+    , _qLimit                     :: !(Maybe Nat)
+    , _qSelect                    :: !(Maybe Select)
+    , _qConditionalOperator       :: !(Maybe ConditionalOperator)
+    , _qKeyConditionExpression    :: !(Maybe Text)
+    , _qExclusiveStartKey         :: !(Maybe (Map Text AttributeValue))
+    , _qIndexName                 :: !(Maybe Text)
+    , _qTableName                 :: !Text
+    } deriving (Eq,Read,Show,Data,Typeable,Generic)
+
+-- | Creates a value of 'Query' with the minimum fields required to make a request.
+--
+-- Use one of the following lenses to modify other fields as desired:
+--
+-- * 'qProjectionExpression'
+--
+-- * 'qKeyConditions'
+--
+-- * 'qFilterExpression'
+--
+-- * 'qQueryFilter'
+--
+-- * 'qConsistentRead'
+--
+-- * 'qExpressionAttributeNames'
+--
+-- * 'qAttributesToGet'
+--
+-- * 'qReturnConsumedCapacity'
+--
+-- * 'qExpressionAttributeValues'
+--
+-- * 'qScanIndexForward'
+--
+-- * 'qLimit'
+--
+-- * 'qSelect'
+--
+-- * 'qConditionalOperator'
+--
+-- * 'qKeyConditionExpression'
+--
+-- * 'qExclusiveStartKey'
+--
+-- * 'qIndexName'
+--
+-- * 'qTableName'
+query
+    :: Text -- ^ 'qTableName'
+    -> Query
+query pTableName_ =
+    Query'
+    { _qProjectionExpression = Nothing
+    , _qKeyConditions = Nothing
+    , _qFilterExpression = Nothing
+    , _qQueryFilter = Nothing
+    , _qConsistentRead = Nothing
+    , _qExpressionAttributeNames = Nothing
+    , _qAttributesToGet = Nothing
+    , _qReturnConsumedCapacity = Nothing
+    , _qExpressionAttributeValues = Nothing
+    , _qScanIndexForward = Nothing
+    , _qLimit = Nothing
+    , _qSelect = Nothing
+    , _qConditionalOperator = Nothing
+    , _qKeyConditionExpression = Nothing
+    , _qExclusiveStartKey = Nothing
+    , _qIndexName = Nothing
+    , _qTableName = pTableName_
+    }
+
+-- | A string that identifies one or more attributes to retrieve from the
+-- table. These attributes can include scalars, sets, or elements of a JSON
+-- document. The attributes in the expression must be separated by commas.
+--
+-- If no attribute names are specified, then all attributes will be
+-- returned. If any of the requested attributes are not found, they will
+-- not appear in the result.
+--
+-- For more information, see
+-- <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.AccessingItemAttributes.html Accessing Item Attributes>
+-- in the /Amazon DynamoDB Developer Guide/.
+--
+-- /ProjectionExpression/ replaces the legacy /AttributesToGet/ parameter.
+qProjectionExpression :: Lens' Query (Maybe Text)
+qProjectionExpression = lens _qProjectionExpression (\ s a -> s{_qProjectionExpression = a});
+
+-- | This is a legacy parameter, for backward compatibility. New applications
+-- should use /KeyConditionExpression/ instead. Do not combine legacy
+-- parameters and expression parameters in a single API call; otherwise,
+-- DynamoDB will return a /ValidationException/ exception.
+--
+-- The selection criteria for the query. For a query on a table, you can
+-- have conditions only on the table primary key attributes. You must
+-- provide the hash key attribute name and value as an 'EQ' condition. You
+-- can optionally provide a second condition, referring to the range key
+-- attribute.
+--
+-- If you don\'t provide a range key condition, all of the items that match
+-- the hash key will be retrieved. If a /FilterExpression/ or /QueryFilter/
+-- is present, it will be applied after the items are retrieved.
+--
+-- For a query on an index, you can have conditions only on the index key
+-- attributes. You must provide the index hash attribute name and value as
+-- an 'EQ' condition. You can optionally provide a second condition,
+-- referring to the index key range attribute.
+--
+-- Each /KeyConditions/ element consists of an attribute name to compare,
+-- along with the following:
+--
+-- -   /AttributeValueList/ - One or more values to evaluate against the
+--     supplied attribute. The number of values in the list depends on the
+--     /ComparisonOperator/ being used.
+--
+--     For type Number, value comparisons are numeric.
+--
+--     String value comparisons for greater than, equals, or less than are
+--     based on ASCII character code values. For example, 'a' is greater
+--     than 'A', and 'a' is greater than 'B'. For a list of code values,
+--     see <http://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters>.
+--
+--     For Binary, DynamoDB treats each byte of the binary data as unsigned
+--     when it compares binary values.
+--
+-- -   /ComparisonOperator/ - A comparator for evaluating attributes, for
+--     example, equals, greater than, less than, and so on.
+--
+--     For /KeyConditions/, only the following comparison operators are
+--     supported:
+--
+--     'EQ | LE | LT | GE | GT | BEGINS_WITH | BETWEEN'
+--
+--     The following are descriptions of these comparison operators.
+--
+--     -   'EQ' : Equal.
+--
+--         /AttributeValueList/ can contain only one /AttributeValue/ of
+--         type String, Number, or Binary (not a set type). If an item
+--         contains an /AttributeValue/ element of a different type than
+--         the one specified in the request, the value does not match. For
+--         example, '{\"S\":\"6\"}' does not equal '{\"N\":\"6\"}'. Also,
+--         '{\"N\":\"6\"}' does not equal '{\"NS\":[\"6\", \"2\", \"1\"]}'.
+--
+--     -   'LE' : Less than or equal.
+--
+--         /AttributeValueList/ can contain only one /AttributeValue/
+--         element of type String, Number, or Binary (not a set type). If
+--         an item contains an /AttributeValue/ element of a different type
+--         than the one provided in the request, the value does not match.
+--         For example, '{\"S\":\"6\"}' does not equal '{\"N\":\"6\"}'.
+--         Also, '{\"N\":\"6\"}' does not compare to
+--         '{\"NS\":[\"6\", \"2\", \"1\"]}'.
+--
+--     -   'LT' : Less than.
+--
+--         /AttributeValueList/ can contain only one /AttributeValue/ of
+--         type String, Number, or Binary (not a set type). If an item
+--         contains an /AttributeValue/ element of a different type than
+--         the one provided in the request, the value does not match. For
+--         example, '{\"S\":\"6\"}' does not equal '{\"N\":\"6\"}'. Also,
+--         '{\"N\":\"6\"}' does not compare to
+--         '{\"NS\":[\"6\", \"2\", \"1\"]}'.
+--
+--     -   'GE' : Greater than or equal.
+--
+--         /AttributeValueList/ can contain only one /AttributeValue/
+--         element of type String, Number, or Binary (not a set type). If
+--         an item contains an /AttributeValue/ element of a different type
+--         than the one provided in the request, the value does not match.
+--         For example, '{\"S\":\"6\"}' does not equal '{\"N\":\"6\"}'.
+--         Also, '{\"N\":\"6\"}' does not compare to
+--         '{\"NS\":[\"6\", \"2\", \"1\"]}'.
+--
+--     -   'GT' : Greater than.
+--
+--         /AttributeValueList/ can contain only one /AttributeValue/
+--         element of type String, Number, or Binary (not a set type). If
+--         an item contains an /AttributeValue/ element of a different type
+--         than the one provided in the request, the value does not match.
+--         For example, '{\"S\":\"6\"}' does not equal '{\"N\":\"6\"}'.
+--         Also, '{\"N\":\"6\"}' does not compare to
+--         '{\"NS\":[\"6\", \"2\", \"1\"]}'.
+--
+--     -   'BEGINS_WITH' : Checks for a prefix.
+--
+--         /AttributeValueList/ can contain only one /AttributeValue/ of
+--         type String or Binary (not a Number or a set type). The target
+--         attribute of the comparison must be of type String or Binary
+--         (not a Number or a set type).
+--
+--     -   'BETWEEN' : Greater than or equal to the first value, and less
+--         than or equal to the second value.
+--
+--         /AttributeValueList/ must contain two /AttributeValue/ elements
+--         of the same type, either String, Number, or Binary (not a set
+--         type). A target attribute matches if the target value is greater
+--         than, or equal to, the first element and less than, or equal to,
+--         the second element. If an item contains an /AttributeValue/
+--         element of a different type than the one provided in the
+--         request, the value does not match. For example, '{\"S\":\"6\"}'
+--         does not compare to '{\"N\":\"6\"}'. Also, '{\"N\":\"6\"}' does
+--         not compare to '{\"NS\":[\"6\", \"2\", \"1\"]}'
+--
+-- For usage examples of /AttributeValueList/ and /ComparisonOperator/, see
+-- <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.html Legacy Conditional Parameters>
+-- in the /Amazon DynamoDB Developer Guide/.
+qKeyConditions :: Lens' Query (HashMap Text Condition)
+qKeyConditions = lens _qKeyConditions (\ s a -> s{_qKeyConditions = a}) . _Default . _Map;
+
+-- | A string that contains conditions that DynamoDB applies after the
+-- /Query/ operation, but before the data is returned to you. Items that do
+-- not satisfy the /FilterExpression/ criteria are not returned.
+--
+-- A /FilterExpression/ is applied after the items have already been read;
+-- the process of filtering does not consume any additional read capacity
+-- units.
+--
+-- For more information, see
+-- <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/QueryAndScan.html#FilteringResults Filter Expressions>
+-- in the /Amazon DynamoDB Developer Guide/.
+--
+-- /FilterExpression/ replaces the legacy /QueryFilter/ and
+-- /ConditionalOperator/ parameters.
+qFilterExpression :: Lens' Query (Maybe Text)
+qFilterExpression = lens _qFilterExpression (\ s a -> s{_qFilterExpression = a});
+
+-- | This is a legacy parameter, for backward compatibility. New applications
+-- should use /FilterExpression/ instead. Do not combine legacy parameters
+-- and expression parameters in a single API call; otherwise, DynamoDB will
+-- return a /ValidationException/ exception.
+--
+-- A condition that evaluates the query results after the items are read
+-- and returns only the desired values.
+--
+-- This parameter does not support attributes of type List or Map.
+--
+-- A /QueryFilter/ is applied after the items have already been read; the
+-- process of filtering does not consume any additional read capacity
+-- units.
+--
+-- If you provide more than one condition in the /QueryFilter/ map, then by
+-- default all of the conditions must evaluate to true. In other words, the
+-- conditions are ANDed together. (You can use the /ConditionalOperator/
+-- parameter to OR the conditions instead. If you do this, then at least
+-- one of the conditions must evaluate to true, rather than all of them.)
+--
+-- Note that /QueryFilter/ does not allow key attributes. You cannot define
+-- a filter condition on a hash key or range key.
+--
+-- Each /QueryFilter/ element consists of an attribute name to compare,
+-- along with the following:
+--
+-- -   /AttributeValueList/ - One or more values to evaluate against the
+--     supplied attribute. The number of values in the list depends on the
+--     operator specified in /ComparisonOperator/.
+--
+--     For type Number, value comparisons are numeric.
+--
+--     String value comparisons for greater than, equals, or less than are
+--     based on ASCII character code values. For example, 'a' is greater
+--     than 'A', and 'a' is greater than 'B'. For a list of code values,
+--     see <http://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters>.
+--
+--     For type Binary, DynamoDB treats each byte of the binary data as
+--     unsigned when it compares binary values.
+--
+--     For information on specifying data types in JSON, see
+--     <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DataFormat.html JSON Data Format>
+--     in the /Amazon DynamoDB Developer Guide/.
+--
+-- -   /ComparisonOperator/ - A comparator for evaluating attributes. For
+--     example, equals, greater than, less than, etc.
+--
+--     The following comparison operators are available:
+--
+--     'EQ | NE | LE | LT | GE | GT | NOT_NULL | NULL | CONTAINS | NOT_CONTAINS | BEGINS_WITH | IN | BETWEEN'
+--
+--     For complete descriptions of all comparison operators, see the
+--     <http://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_Condition.html Condition>
+--     data type.
+--
+qQueryFilter :: Lens' Query (HashMap Text Condition)
+qQueryFilter = lens _qQueryFilter (\ s a -> s{_qQueryFilter = a}) . _Default . _Map;
+
+-- | Determines the read consistency model: If set to 'true', then the
+-- operation uses strongly consistent reads; otherwise, the operation uses
+-- eventually consistent reads.
+--
+-- Strongly consistent reads are not supported on global secondary indexes.
+-- If you query a global secondary index with /ConsistentRead/ set to
+-- 'true', you will receive a /ValidationException/.
+qConsistentRead :: Lens' Query (Maybe Bool)
+qConsistentRead = lens _qConsistentRead (\ s a -> s{_qConsistentRead = a});
+
+-- | One or more substitution tokens for attribute names in an expression.
+-- The following are some use cases for using /ExpressionAttributeNames/:
+--
+-- -   To access an attribute whose name conflicts with a DynamoDB reserved
+--     word.
+--
+-- -   To create a placeholder for repeating occurrences of an attribute
+--     name in an expression.
+--
+-- -   To prevent special characters in an attribute name from being
+--     misinterpreted in an expression.
+--
+-- Use the __#__ character in an expression to dereference an attribute
+-- name. For example, consider the following attribute name:
+--
+-- -   'Percentile'
+--
+-- The name of this attribute conflicts with a reserved word, so it cannot
+-- be used directly in an expression. (For the complete list of reserved
+-- words, see
+-- <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ReservedWords.html Reserved Words>
+-- in the /Amazon DynamoDB Developer Guide/). To work around this, you
+-- could specify the following for /ExpressionAttributeNames/:
+--
+-- -   '{\"#P\":\"Percentile\"}'
+--
+-- You could then use this substitution in an expression, as in this
+-- example:
+--
+-- -   '#P = :val'
+--
+-- Tokens that begin with the __:__ character are /expression attribute
+-- values/, which are placeholders for the actual value at runtime.
+--
+-- For more information on expression attribute names, see
+-- <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.AccessingItemAttributes.html Accessing Item Attributes>
+-- in the /Amazon DynamoDB Developer Guide/.
+qExpressionAttributeNames :: Lens' Query (HashMap Text Text)
+qExpressionAttributeNames = lens _qExpressionAttributeNames (\ s a -> s{_qExpressionAttributeNames = a}) . _Default . _Map;
+
+-- | This is a legacy parameter, for backward compatibility. New applications
+-- should use /ProjectionExpression/ instead. Do not combine legacy
+-- parameters and expression parameters in a single API call; otherwise,
+-- DynamoDB will return a /ValidationException/ exception.
+--
+-- This parameter allows you to retrieve attributes of type List or Map;
+-- however, it cannot retrieve individual elements within a List or a Map.
+--
+-- The names of one or more attributes to retrieve. If no attribute names
+-- are provided, then all attributes will be returned. If any of the
+-- requested attributes are not found, they will not appear in the result.
+--
+-- Note that /AttributesToGet/ has no effect on provisioned throughput
+-- consumption. DynamoDB determines capacity units consumed based on item
+-- size, not on the amount of data that is returned to an application.
+--
+-- You cannot use both /AttributesToGet/ and /Select/ together in a /Query/
+-- request, /unless/ the value for /Select/ is 'SPECIFIC_ATTRIBUTES'. (This
+-- usage is equivalent to specifying /AttributesToGet/ without any value
+-- for /Select/.)
+--
+-- If you query a local secondary index and request only attributes that
+-- are projected into that index, the operation will read only the index
+-- and not the table. If any of the requested attributes are not projected
+-- into the local secondary index, DynamoDB will fetch each of these
+-- attributes from the parent table. This extra fetching incurs additional
+-- throughput cost and latency.
+--
+-- If you query a global secondary index, you can only request attributes
+-- that are projected into the index. Global secondary index queries cannot
+-- fetch attributes from the parent table.
+qAttributesToGet :: Lens' Query (Maybe (NonEmpty Text))
+qAttributesToGet = lens _qAttributesToGet (\ s a -> s{_qAttributesToGet = a}) . mapping _List1;
+
+-- | Undocumented member.
+qReturnConsumedCapacity :: Lens' Query (Maybe ReturnConsumedCapacity)
+qReturnConsumedCapacity = lens _qReturnConsumedCapacity (\ s a -> s{_qReturnConsumedCapacity = a});
+
+-- | One or more values that can be substituted in an expression.
+--
+-- Use the __:__ (colon) character in an expression to dereference an
+-- attribute value. For example, suppose that you wanted to check whether
+-- the value of the /ProductStatus/ attribute was one of the following:
+--
+-- 'Available | Backordered | Discontinued'
+--
+-- You would first need to specify /ExpressionAttributeValues/ as follows:
+--
+-- '{ \":avail\":{\"S\":\"Available\"}, \":back\":{\"S\":\"Backordered\"}, \":disc\":{\"S\":\"Discontinued\"} }'
+--
+-- You could then use these values in an expression, such as this:
+--
+-- 'ProductStatus IN (:avail, :back, :disc)'
+--
+-- For more information on expression attribute values, see
+-- <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.SpecifyingConditions.html Specifying Conditions>
+-- in the /Amazon DynamoDB Developer Guide/.
+qExpressionAttributeValues :: Lens' Query (HashMap Text AttributeValue)
+qExpressionAttributeValues = lens _qExpressionAttributeValues (\ s a -> s{_qExpressionAttributeValues = a}) . _Default . _Map;
+
+-- | Specifies the order in which to return the query results - either
+-- ascending ('true') or descending ('false').
+--
+-- Items with the same hash key are stored in sorted order by range key .If
+-- the range key data type is Number, the results are stored in numeric
+-- order. For type String, the results are returned in order of ASCII
+-- character code values. For type Binary, DynamoDB treats each byte of the
+-- binary data as unsigned.
+--
+-- If /ScanIndexForward/ is 'true', DynamoDB returns the results in order,
+-- by range key. This is the default behavior.
+--
+-- If /ScanIndexForward/ is 'false', DynamoDB sorts the results in
+-- descending order by range key, and then returns the results to the
+-- client.
+qScanIndexForward :: Lens' Query (Maybe Bool)
+qScanIndexForward = lens _qScanIndexForward (\ s a -> s{_qScanIndexForward = a});
+
+-- | The maximum number of items to evaluate (not necessarily the number of
+-- matching items). If DynamoDB processes the number of items up to the
+-- limit while processing the results, it stops the operation and returns
+-- the matching values up to that point, and a key in /LastEvaluatedKey/ to
+-- apply in a subsequent operation, so that you can pick up where you left
+-- off. Also, if the processed data set size exceeds 1 MB before DynamoDB
+-- reaches this limit, it stops the operation and returns the matching
+-- values up to the limit, and a key in /LastEvaluatedKey/ to apply in a
+-- subsequent operation to continue the operation. For more information,
+-- see
+-- <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/QueryAndScan.html Query and Scan>
+-- in the /Amazon DynamoDB Developer Guide/.
+qLimit :: Lens' Query (Maybe Natural)
+qLimit = lens _qLimit (\ s a -> s{_qLimit = a}) . mapping _Nat;
+
+-- | The attributes to be returned in the result. You can retrieve all item
+-- attributes, specific item attributes, the count of matching items, or in
+-- the case of an index, some or all of the attributes projected into the
+-- index.
+--
+-- -   'ALL_ATTRIBUTES' - Returns all of the item attributes from the
+--     specified table or index. If you query a local secondary index, then
+--     for each matching item in the index DynamoDB will fetch the entire
+--     item from the parent table. If the index is configured to project
+--     all item attributes, then all of the data can be obtained from the
+--     local secondary index, and no fetching is required.
+--
+-- -   'ALL_PROJECTED_ATTRIBUTES' - Allowed only when querying an index.
+--     Retrieves all attributes that have been projected into the index. If
+--     the index is configured to project all attributes, this return value
+--     is equivalent to specifying 'ALL_ATTRIBUTES'.
+--
+-- -   'COUNT' - Returns the number of matching items, rather than the
+--     matching items themselves.
+--
+-- -   'SPECIFIC_ATTRIBUTES' - Returns only the attributes listed in
+--     /AttributesToGet/. This return value is equivalent to specifying
+--     /AttributesToGet/ without specifying any value for /Select/.
+--
+--     If you query a local secondary index and request only attributes
+--     that are projected into that index, the operation will read only the
+--     index and not the table. If any of the requested attributes are not
+--     projected into the local secondary index, DynamoDB will fetch each
+--     of these attributes from the parent table. This extra fetching
+--     incurs additional throughput cost and latency.
+--
+--     If you query a global secondary index, you can only request
+--     attributes that are projected into the index. Global secondary index
+--     queries cannot fetch attributes from the parent table.
+--
+-- If neither /Select/ nor /AttributesToGet/ are specified, DynamoDB
+-- defaults to 'ALL_ATTRIBUTES' when accessing a table, and
+-- 'ALL_PROJECTED_ATTRIBUTES' when accessing an index. You cannot use both
+-- /Select/ and /AttributesToGet/ together in a single request, unless the
+-- value for /Select/ is 'SPECIFIC_ATTRIBUTES'. (This usage is equivalent
+-- to specifying /AttributesToGet/ without any value for /Select/.)
+--
+-- If you use the /ProjectionExpression/ parameter, then the value for
+-- /Select/ can only be 'SPECIFIC_ATTRIBUTES'. Any other value for /Select/
+-- will return an error.
+qSelect :: Lens' Query (Maybe Select)
+qSelect = lens _qSelect (\ s a -> s{_qSelect = a});
+
+-- | This is a legacy parameter, for backward compatibility. New applications
+-- should use /FilterExpression/ instead. Do not combine legacy parameters
+-- and expression parameters in a single API call; otherwise, DynamoDB will
+-- return a /ValidationException/ exception.
+--
+-- A logical operator to apply to the conditions in a /QueryFilter/ map:
+--
+-- -   'AND' - If all of the conditions evaluate to true, then the entire
+--     map evaluates to true.
+--
+-- -   'OR' - If at least one of the conditions evaluate to true, then the
+--     entire map evaluates to true.
+--
+-- If you omit /ConditionalOperator/, then 'AND' is the default.
+--
+-- The operation will succeed only if the entire map evaluates to true.
+--
+-- This parameter does not support attributes of type List or Map.
+qConditionalOperator :: Lens' Query (Maybe ConditionalOperator)
+qConditionalOperator = lens _qConditionalOperator (\ s a -> s{_qConditionalOperator = a});
+
+-- | The condition that specifies the key value(s) for items to be retrieved
+-- by the /Query/ action.
+--
+-- The condition must perform an equality test on a single hash key value.
+-- The condition can also perform one of several comparison tests on a
+-- single range key value. /Query/ can use /KeyConditionExpression/ to
+-- retrieve one item with a given hash and range key value, or several
+-- items that have the same hash key value but different range key values.
+--
+-- The hash key equality test is required, and must be specified in the
+-- following format:
+--
+-- 'hashAttributeName' /=/ ':hashval'
+--
+-- If you also want to provide a range key condition, it must be combined
+-- using /AND/ with the hash key condition. Following is an example, using
+-- the __=__ comparison operator for the range key:
+--
+-- 'hashAttributeName' /=/ ':hashval' /AND/ 'rangeAttributeName' /=/
+-- ':rangeval'
+--
+-- Valid comparisons for the range key condition are as follows:
+--
+-- -   'rangeAttributeName' /=/ ':rangeval' - true if the range key is
+--     equal to ':rangeval'.
+--
+-- -   'rangeAttributeName' /\</ ':rangeval' - true if the range key is
+--     less than ':rangeval'.
+--
+-- -   'rangeAttributeName' /\<=/ ':rangeval' - true if the range key is
+--     less than or equal to ':rangeval'.
+--
+-- -   'rangeAttributeName' />/ ':rangeval' - true if the range key is
+--     greater than ':rangeval'.
+--
+-- -   'rangeAttributeName' />=/ ':rangeval' - true if the range key is
+--     greater than or equal to ':rangeval'.
+--
+-- -   'rangeAttributeName' /BETWEEN/ ':rangeval1' /AND/ ':rangeval2' -
+--     true if the range key is greater than or equal to ':rangeval1', and
+--     less than or equal to ':rangeval2'.
+--
+-- -   /begins_with (/'rangeAttributeName', ':rangeval'/)/ - true if the
+--     range key begins with a particular operand. (You cannot use this
+--     function with a range key that is of type Number.) Note that the
+--     function name 'begins_with' is case-sensitive.
+--
+-- Use the /ExpressionAttributeValues/ parameter to replace tokens such as
+-- ':hashval' and ':rangeval' with actual values at runtime.
+--
+-- You can optionally use the /ExpressionAttributeNames/ parameter to
+-- replace the names of the hash and range attributes with placeholder
+-- tokens. This option might be necessary if an attribute name conflicts
+-- with a DynamoDB reserved word. For example, the following
+-- /KeyConditionExpression/ parameter causes an error because /Size/ is a
+-- reserved word:
+--
+-- -   'Size = :myval'
+--
+-- To work around this, define a placeholder (such a '#S') to represent the
+-- attribute name /Size/. /KeyConditionExpression/ then is as follows:
+--
+-- -   '#S = :myval'
+--
+-- For a list of reserved words, see
+-- <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ReservedWords.html Reserved Words>
+-- in the /Amazon DynamoDB Developer Guide/.
+--
+-- For more information on /ExpressionAttributeNames/ and
+-- /ExpressionAttributeValues/, see
+-- <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ExpressionPlaceholders.html Using Placeholders for Attribute Names and Values>
+-- in the /Amazon DynamoDB Developer Guide/.
+--
+-- /KeyConditionExpression/ replaces the legacy /KeyConditions/ parameter.
+qKeyConditionExpression :: Lens' Query (Maybe Text)
+qKeyConditionExpression = lens _qKeyConditionExpression (\ s a -> s{_qKeyConditionExpression = a});
+
+-- | The primary key of the first item that this operation will evaluate. Use
+-- the value that was returned for /LastEvaluatedKey/ in the previous
+-- operation.
+--
+-- The data type for /ExclusiveStartKey/ must be String, Number or Binary.
+-- No set data types are allowed.
+qExclusiveStartKey :: Lens' Query (HashMap Text AttributeValue)
+qExclusiveStartKey = lens _qExclusiveStartKey (\ s a -> s{_qExclusiveStartKey = a}) . _Default . _Map;
+
+-- | The name of an index to query. This index can be any local secondary
+-- index or global secondary index on the table. Note that if you use the
+-- /IndexName/ parameter, you must also provide /TableName./
+qIndexName :: Lens' Query (Maybe Text)
+qIndexName = lens _qIndexName (\ s a -> s{_qIndexName = a});
+
+-- | The name of the table containing the requested items.
+qTableName :: Lens' Query Text
+qTableName = lens _qTableName (\ s a -> s{_qTableName = a});
+
+instance AWSPager Query where
+        page rq rs
+          | stop (rs ^. qrsLastEvaluatedKey) = Nothing
+          | stop (rs ^. qrsItems) = Nothing
+          | otherwise =
+            Just $ rq &
+              qExclusiveStartKey .~ rs ^. qrsLastEvaluatedKey
+
+instance AWSRequest Query where
+        type Sv Query = DynamoDB
+        type Rs Query = QueryResponse
+        request = postJSON
+        response
+          = receiveJSON
+              (\ s h x ->
+                 QueryResponse' <$>
+                   (x .?> "LastEvaluatedKey" .!@ mempty) <*>
+                     (x .?> "Count")
+                     <*> (x .?> "ScannedCount")
+                     <*> (x .?> "Items" .!@ mempty)
+                     <*> (x .?> "ConsumedCapacity")
+                     <*> (pure (fromEnum s)))
+
+instance ToHeaders Query where
+        toHeaders
+          = const
+              (mconcat
+                 ["X-Amz-Target" =#
+                    ("DynamoDB_20120810.Query" :: ByteString),
+                  "Content-Type" =#
+                    ("application/x-amz-json-1.0" :: ByteString)])
+
+instance ToJSON Query where
+        toJSON Query'{..}
+          = object
+              ["ProjectionExpression" .= _qProjectionExpression,
+               "KeyConditions" .= _qKeyConditions,
+               "FilterExpression" .= _qFilterExpression,
+               "QueryFilter" .= _qQueryFilter,
+               "ConsistentRead" .= _qConsistentRead,
+               "ExpressionAttributeNames" .=
+                 _qExpressionAttributeNames,
+               "AttributesToGet" .= _qAttributesToGet,
+               "ReturnConsumedCapacity" .= _qReturnConsumedCapacity,
+               "ExpressionAttributeValues" .=
+                 _qExpressionAttributeValues,
+               "ScanIndexForward" .= _qScanIndexForward,
+               "Limit" .= _qLimit, "Select" .= _qSelect,
+               "ConditionalOperator" .= _qConditionalOperator,
+               "KeyConditionExpression" .= _qKeyConditionExpression,
+               "ExclusiveStartKey" .= _qExclusiveStartKey,
+               "IndexName" .= _qIndexName,
+               "TableName" .= _qTableName]
+
+instance ToPath Query where
+        toPath = const "/"
+
+instance ToQuery Query where
+        toQuery = const mempty
+
+-- | Represents the output of a /Query/ operation.
+--
+-- /See:/ 'queryResponse' smart constructor.
+data QueryResponse = QueryResponse'
+    { _qrsLastEvaluatedKey :: !(Maybe (Map Text AttributeValue))
+    , _qrsCount            :: !(Maybe Int)
+    , _qrsScannedCount     :: !(Maybe Int)
+    , _qrsItems            :: !(Maybe [Map Text AttributeValue])
+    , _qrsConsumedCapacity :: !(Maybe ConsumedCapacity)
+    , _qrsStatus           :: !Int
+    } deriving (Eq,Read,Show,Data,Typeable,Generic)
+
+-- | Creates a value of 'QueryResponse' with the minimum fields required to make a request.
+--
+-- Use one of the following lenses to modify other fields as desired:
+--
+-- * 'qrsLastEvaluatedKey'
+--
+-- * 'qrsCount'
+--
+-- * 'qrsScannedCount'
+--
+-- * 'qrsItems'
+--
+-- * 'qrsConsumedCapacity'
+--
+-- * 'qrsStatus'
+queryResponse
+    :: Int -- ^ 'qrsStatus'
+    -> QueryResponse
+queryResponse pStatus_ =
+    QueryResponse'
+    { _qrsLastEvaluatedKey = Nothing
+    , _qrsCount = Nothing
+    , _qrsScannedCount = Nothing
+    , _qrsItems = Nothing
+    , _qrsConsumedCapacity = Nothing
+    , _qrsStatus = pStatus_
+    }
+
+-- | The primary key of the item where the operation stopped, inclusive of
+-- the previous result set. Use this value to start a new operation,
+-- excluding this value in the new request.
+--
+-- If /LastEvaluatedKey/ is empty, then the \"last page\" of results has
+-- been processed and there is no more data to be retrieved.
+--
+-- If /LastEvaluatedKey/ is not empty, it does not necessarily mean that
+-- there is more data in the result set. The only way to know when you have
+-- reached the end of the result set is when /LastEvaluatedKey/ is empty.
+qrsLastEvaluatedKey :: Lens' QueryResponse (HashMap Text AttributeValue)
+qrsLastEvaluatedKey = lens _qrsLastEvaluatedKey (\ s a -> s{_qrsLastEvaluatedKey = a}) . _Default . _Map;
+
+-- | The number of items in the response.
+--
+-- If you used a /QueryFilter/ in the request, then /Count/ is the number
+-- of items returned after the filter was applied, and /ScannedCount/ is
+-- the number of matching items before> the filter was applied.
+--
+-- If you did not use a filter in the request, then /Count/ and
+-- /ScannedCount/ are the same.
+qrsCount :: Lens' QueryResponse (Maybe Int)
+qrsCount = lens _qrsCount (\ s a -> s{_qrsCount = a});
+
+-- | The number of items evaluated, before any /QueryFilter/ is applied. A
+-- high /ScannedCount/ value with few, or no, /Count/ results indicates an
+-- inefficient /Query/ operation. For more information, see
+-- <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/QueryAndScan.html#Count Count and ScannedCount>
+-- in the /Amazon DynamoDB Developer Guide/.
+--
+-- If you did not use a filter in the request, then /ScannedCount/ is the
+-- same as /Count/.
+qrsScannedCount :: Lens' QueryResponse (Maybe Int)
+qrsScannedCount = lens _qrsScannedCount (\ s a -> s{_qrsScannedCount = a});
+
+-- | An array of item attributes that match the query criteria. Each element
+-- in this array consists of an attribute name and the value for that
+-- attribute.
+qrsItems :: Lens' QueryResponse [HashMap Text AttributeValue]
+qrsItems = lens _qrsItems (\ s a -> s{_qrsItems = a}) . _Default . _Coerce;
+
+-- | Undocumented member.
+qrsConsumedCapacity :: Lens' QueryResponse (Maybe ConsumedCapacity)
+qrsConsumedCapacity = lens _qrsConsumedCapacity (\ s a -> s{_qrsConsumedCapacity = a});
+
+-- | The response status code.
+qrsStatus :: Lens' QueryResponse Int
+qrsStatus = lens _qrsStatus (\ s a -> s{_qrsStatus = a});
diff --git a/gen/Network/AWS/DynamoDB/Scan.hs b/gen/Network/AWS/DynamoDB/Scan.hs
--- a/gen/Network/AWS/DynamoDB/Scan.hs
+++ b/gen/Network/AWS/DynamoDB/Scan.hs
@@ -1,540 +1,619 @@
-{-# LANGUAGE DataKinds                   #-}
-{-# LANGUAGE DeriveGeneric               #-}
-{-# LANGUAGE FlexibleInstances           #-}
-{-# LANGUAGE GeneralizedNewtypeDeriving  #-}
-{-# LANGUAGE LambdaCase                  #-}
-{-# LANGUAGE NoImplicitPrelude           #-}
-{-# LANGUAGE OverloadedStrings           #-}
-{-# LANGUAGE RecordWildCards             #-}
-{-# LANGUAGE TypeFamilies                #-}
+{-# LANGUAGE DeriveDataTypeable #-}
+{-# LANGUAGE DeriveGeneric      #-}
+{-# LANGUAGE OverloadedStrings  #-}
+{-# LANGUAGE RecordWildCards    #-}
+{-# LANGUAGE TypeFamilies       #-}
 
 {-# OPTIONS_GHC -fno-warn-unused-imports #-}
+{-# OPTIONS_GHC -fno-warn-unused-binds   #-}
+{-# OPTIONS_GHC -fno-warn-unused-matches #-}
 
+-- Derived from AWS service descriptions, licensed under Apache 2.0.
+
+-- |
 -- Module      : Network.AWS.DynamoDB.Scan
--- Copyright   : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>
--- License     : This Source Code Form is subject to the terms of
---               the Mozilla Public License, v. 2.0.
---               A copy of the MPL can be found in the LICENSE file or
---               you can obtain it at http://mozilla.org/MPL/2.0/.
+-- Copyright   : (c) 2013-2015 Brendan Hay
+-- License     : Mozilla Public License, v. 2.0.
 -- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com>
--- Stability   : experimental
+-- Stability   : auto-generated
 -- Portability : non-portable (GHC extensions)
 --
--- Derived from AWS service descriptions, licensed under Apache 2.0.
-
--- | The /Scan/ operation returns one or more items and item attributes by accessing
--- every item in a table or a secondary index. To have DynamoDB return fewer
--- items, you can provide a /ScanFilter/ operation.
---
--- If the total number of scanned items exceeds the maximum data set size limit
--- of 1 MB, the scan stops and results are returned to the user as a /LastEvaluatedKey/ value to continue the scan in a subsequent operation. The results also
--- include the number of items exceeding the limit. A scan can result in no
--- table data meeting the filter criteria.
+-- The /Scan/ operation returns one or more items and item attributes by
+-- accessing every item in a table or a secondary index. To have DynamoDB
+-- return fewer items, you can provide a /ScanFilter/ operation.
 --
--- The result set is eventually consistent.
+-- If the total number of scanned items exceeds the maximum data set size
+-- limit of 1 MB, the scan stops and results are returned to the user as a
+-- /LastEvaluatedKey/ value to continue the scan in a subsequent operation.
+-- The results also include the number of items exceeding the limit. A scan
+-- can result in no table data meeting the filter criteria.
 --
 -- By default, /Scan/ operations proceed sequentially; however, for faster
--- performance on a large table or secondary index, applications can request a
--- parallel /Scan/ operation by providing the /Segment/ and /TotalSegments/
--- parameters. For more information, see <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/QueryAndScan.html#QueryAndScanParallelScan Parallel Scan> in the /Amazon DynamoDBDeveloper Guide/.
+-- performance on a large table or secondary index, applications can
+-- request a parallel /Scan/ operation by providing the /Segment/ and
+-- /TotalSegments/ parameters. For more information, see
+-- <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/QueryAndScan.html#QueryAndScanParallelScan Parallel Scan>
+-- in the /Amazon DynamoDB Developer Guide/.
 --
--- <http://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_Scan.html>
+-- By default, /Scan/ uses eventually consistent reads when acessing the
+-- data in the table or local secondary index. However, you can use
+-- strongly consistent reads instead by setting the /ConsistentRead/
+-- parameter to /true/.
+--
+-- /See:/ <http://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_Scan.html AWS API Reference> for Scan.
+--
+-- This operation returns paginated results.
 module Network.AWS.DynamoDB.Scan
     (
-    -- * Request
-      Scan
-    -- ** Request constructor
-    , scan
-    -- ** Request lenses
-    , sAttributesToGet
-    , sConditionalOperator
-    , sExclusiveStartKey
+    -- * Creating a Request
+      scan
+    , Scan
+    -- * Request Lenses
+    , sProjectionExpression
+    , sScanFilter
+    , sTotalSegments
+    , sFilterExpression
+    , sConsistentRead
     , sExpressionAttributeNames
+    , sAttributesToGet
+    , sReturnConsumedCapacity
     , sExpressionAttributeValues
-    , sFilterExpression
-    , sIndexName
     , sLimit
-    , sProjectionExpression
-    , sReturnConsumedCapacity
-    , sScanFilter
-    , sSegment
     , sSelect
+    , sSegment
+    , sConditionalOperator
+    , sExclusiveStartKey
+    , sIndexName
     , sTableName
-    , sTotalSegments
 
-    -- * Response
-    , ScanResponse
-    -- ** Response constructor
+    -- * Destructuring the Response
     , scanResponse
-    -- ** Response lenses
-    , srConsumedCapacity
-    , srCount
-    , srItems
-    , srLastEvaluatedKey
-    , srScannedCount
+    , ScanResponse
+    -- * Response Lenses
+    , srsLastEvaluatedKey
+    , srsCount
+    , srsScannedCount
+    , srsItems
+    , srsConsumedCapacity
+    , srsStatus
     ) where
 
-import Network.AWS.Data (Object)
-import Network.AWS.Prelude
-import Network.AWS.Request.JSON
-import Network.AWS.DynamoDB.Types
-import qualified GHC.Exts
+import           Network.AWS.DynamoDB.Types
+import           Network.AWS.DynamoDB.Types.Product
+import           Network.AWS.Pager
+import           Network.AWS.Prelude
+import           Network.AWS.Request
+import           Network.AWS.Response
 
-data Scan = Scan
-    { _sAttributesToGet           :: List1 "AttributesToGet" Text
-    , _sConditionalOperator       :: Maybe ConditionalOperator
-    , _sExclusiveStartKey         :: Map Text AttributeValue
-    , _sExpressionAttributeNames  :: Map Text Text
-    , _sExpressionAttributeValues :: Map Text AttributeValue
-    , _sFilterExpression          :: Maybe Text
-    , _sIndexName                 :: Maybe Text
-    , _sLimit                     :: Maybe Nat
-    , _sProjectionExpression      :: Maybe Text
-    , _sReturnConsumedCapacity    :: Maybe ReturnConsumedCapacity
-    , _sScanFilter                :: Map Text Condition
-    , _sSegment                   :: Maybe Nat
-    , _sSelect                    :: Maybe Select
-    , _sTableName                 :: Text
-    , _sTotalSegments             :: Maybe Nat
-    } deriving (Eq, Read, Show)
+-- | Represents the input of a /Scan/ operation.
+--
+-- /See:/ 'scan' smart constructor.
+data Scan = Scan'
+    { _sProjectionExpression      :: !(Maybe Text)
+    , _sScanFilter                :: !(Maybe (Map Text Condition))
+    , _sTotalSegments             :: !(Maybe Nat)
+    , _sFilterExpression          :: !(Maybe Text)
+    , _sConsistentRead            :: !(Maybe Bool)
+    , _sExpressionAttributeNames  :: !(Maybe (Map Text Text))
+    , _sAttributesToGet           :: !(Maybe (List1 Text))
+    , _sReturnConsumedCapacity    :: !(Maybe ReturnConsumedCapacity)
+    , _sExpressionAttributeValues :: !(Maybe (Map Text AttributeValue))
+    , _sLimit                     :: !(Maybe Nat)
+    , _sSelect                    :: !(Maybe Select)
+    , _sSegment                   :: !(Maybe Nat)
+    , _sConditionalOperator       :: !(Maybe ConditionalOperator)
+    , _sExclusiveStartKey         :: !(Maybe (Map Text AttributeValue))
+    , _sIndexName                 :: !(Maybe Text)
+    , _sTableName                 :: !Text
+    } deriving (Eq,Read,Show,Data,Typeable,Generic)
 
--- | 'Scan' constructor.
+-- | Creates a value of 'Scan' with the minimum fields required to make a request.
 --
--- The fields accessible through corresponding lenses are:
+-- Use one of the following lenses to modify other fields as desired:
 --
--- * 'sAttributesToGet' @::@ 'NonEmpty' 'Text'
+-- * 'sProjectionExpression'
 --
--- * 'sConditionalOperator' @::@ 'Maybe' 'ConditionalOperator'
+-- * 'sScanFilter'
 --
--- * 'sExclusiveStartKey' @::@ 'HashMap' 'Text' 'AttributeValue'
+-- * 'sTotalSegments'
 --
--- * 'sExpressionAttributeNames' @::@ 'HashMap' 'Text' 'Text'
+-- * 'sFilterExpression'
 --
--- * 'sExpressionAttributeValues' @::@ 'HashMap' 'Text' 'AttributeValue'
+-- * 'sConsistentRead'
 --
--- * 'sFilterExpression' @::@ 'Maybe' 'Text'
+-- * 'sExpressionAttributeNames'
 --
--- * 'sIndexName' @::@ 'Maybe' 'Text'
+-- * 'sAttributesToGet'
 --
--- * 'sLimit' @::@ 'Maybe' 'Natural'
+-- * 'sReturnConsumedCapacity'
 --
--- * 'sProjectionExpression' @::@ 'Maybe' 'Text'
+-- * 'sExpressionAttributeValues'
 --
--- * 'sReturnConsumedCapacity' @::@ 'Maybe' 'ReturnConsumedCapacity'
+-- * 'sLimit'
 --
--- * 'sScanFilter' @::@ 'HashMap' 'Text' 'Condition'
+-- * 'sSelect'
 --
--- * 'sSegment' @::@ 'Maybe' 'Natural'
+-- * 'sSegment'
 --
--- * 'sSelect' @::@ 'Maybe' 'Select'
+-- * 'sConditionalOperator'
 --
--- * 'sTableName' @::@ 'Text'
+-- * 'sExclusiveStartKey'
 --
--- * 'sTotalSegments' @::@ 'Maybe' 'Natural'
+-- * 'sIndexName'
 --
-scan :: Text -- ^ 'sTableName'
-     -> NonEmpty Text -- ^ 'sAttributesToGet'
-     -> Scan
-scan p1 p2 = Scan
-    { _sTableName                 = p1
-    , _sAttributesToGet           = withIso _List1 (const id) p2
-    , _sIndexName                 = Nothing
-    , _sLimit                     = Nothing
-    , _sSelect                    = Nothing
-    , _sScanFilter                = mempty
-    , _sConditionalOperator       = Nothing
-    , _sExclusiveStartKey         = mempty
-    , _sReturnConsumedCapacity    = Nothing
-    , _sTotalSegments             = Nothing
-    , _sSegment                   = Nothing
-    , _sProjectionExpression      = Nothing
-    , _sFilterExpression          = Nothing
-    , _sExpressionAttributeNames  = mempty
-    , _sExpressionAttributeValues = mempty
+-- * 'sTableName'
+scan
+    :: Text -- ^ 'sTableName'
+    -> Scan
+scan pTableName_ =
+    Scan'
+    { _sProjectionExpression = Nothing
+    , _sScanFilter = Nothing
+    , _sTotalSegments = Nothing
+    , _sFilterExpression = Nothing
+    , _sConsistentRead = Nothing
+    , _sExpressionAttributeNames = Nothing
+    , _sAttributesToGet = Nothing
+    , _sReturnConsumedCapacity = Nothing
+    , _sExpressionAttributeValues = Nothing
+    , _sLimit = Nothing
+    , _sSelect = Nothing
+    , _sSegment = Nothing
+    , _sConditionalOperator = Nothing
+    , _sExclusiveStartKey = Nothing
+    , _sIndexName = Nothing
+    , _sTableName = pTableName_
     }
 
--- | This is a legacy parameter, for backward compatibility. New applications
--- should use /ProjectionExpression/ instead. Do not combine legacy parameters and
--- expression parameters in a single API call; otherwise, DynamoDB will return a /ValidationException/ exception.
+-- | A string that identifies one or more attributes to retrieve from the
+-- specified table or index. These attributes can include scalars, sets, or
+-- elements of a JSON document. The attributes in the expression must be
+-- separated by commas.
 --
--- This parameter allows you to retrieve attributes of type List or Map;
--- however, it cannot retrieve individual elements within a List or a Map.
+-- If no attribute names are specified, then all attributes will be
+-- returned. If any of the requested attributes are not found, they will
+-- not appear in the result.
 --
--- The names of one or more attributes to retrieve. If no attribute names are
--- provided, then all attributes will be returned. If any of the requested
--- attributes are not found, they will not appear in the result.
+-- For more information, see
+-- <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.AccessingItemAttributes.html Accessing Item Attributes>
+-- in the /Amazon DynamoDB Developer Guide/.
 --
--- Note that /AttributesToGet/ has no effect on provisioned throughput
--- consumption. DynamoDB determines capacity units consumed based on item size,
--- not on the amount of data that is returned to an application.
-sAttributesToGet :: Lens' Scan (NonEmpty Text)
-sAttributesToGet = lens _sAttributesToGet (\s a -> s { _sAttributesToGet = a }) . _List1
+-- /ProjectionExpression/ replaces the legacy /AttributesToGet/ parameter.
+sProjectionExpression :: Lens' Scan (Maybe Text)
+sProjectionExpression = lens _sProjectionExpression (\ s a -> s{_sProjectionExpression = a});
 
 -- | This is a legacy parameter, for backward compatibility. New applications
--- should use /FilterExpression/ instead. Do not combine legacy parameters and
--- expression parameters in a single API call; otherwise, DynamoDB will return a /ValidationException/ exception.
---
--- A logical operator to apply to the conditions in a /ScanFilter/ map:
+-- should use /FilterExpression/ instead. Do not combine legacy parameters
+-- and expression parameters in a single API call; otherwise, DynamoDB will
+-- return a /ValidationException/ exception.
 --
--- 'AND' - If all of the conditions evaluate to true, then the entire map
--- evaluates to true.
+-- A condition that evaluates the scan results and returns only the desired
+-- values.
 --
--- 'OR' - If at least one of the conditions evaluate to true, then the entire map
--- evaluates to true.
+-- This parameter does not support attributes of type List or Map.
 --
--- If you omit /ConditionalOperator/, then 'AND' is the default.
+-- If you specify more than one condition in the /ScanFilter/ map, then by
+-- default all of the conditions must evaluate to true. In other words, the
+-- conditions are ANDed together. (You can use the /ConditionalOperator/
+-- parameter to OR the conditions instead. If you do this, then at least
+-- one of the conditions must evaluate to true, rather than all of them.)
 --
--- The operation will succeed only if the entire map evaluates to true.
+-- Each /ScanFilter/ element consists of an attribute name to compare,
+-- along with the following:
 --
--- This parameter does not support attributes of type List or Map.
+-- -   /AttributeValueList/ - One or more values to evaluate against the
+--     supplied attribute. The number of values in the list depends on the
+--     operator specified in /ComparisonOperator/ .
 --
-sConditionalOperator :: Lens' Scan (Maybe ConditionalOperator)
-sConditionalOperator =
-    lens _sConditionalOperator (\s a -> s { _sConditionalOperator = a })
-
--- | The primary key of the first item that this operation will evaluate. Use the
--- value that was returned for /LastEvaluatedKey/ in the previous operation.
+--     For type Number, value comparisons are numeric.
 --
--- The data type for /ExclusiveStartKey/ must be String, Number or Binary. No set
--- data types are allowed.
+--     String value comparisons for greater than, equals, or less than are
+--     based on ASCII character code values. For example, 'a' is greater
+--     than 'A', and 'a' is greater than 'B'. For a list of code values,
+--     see <http://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters>.
 --
--- In a parallel scan, a /Scan/ request that includes /ExclusiveStartKey/ must
--- specify the same segment whose previous /Scan/ returned the corresponding value
--- of /LastEvaluatedKey/.
-sExclusiveStartKey :: Lens' Scan (HashMap Text AttributeValue)
-sExclusiveStartKey =
-    lens _sExclusiveStartKey (\s a -> s { _sExclusiveStartKey = a })
-        . _Map
-
--- | One or more substitution tokens for attribute names in an expression. The
--- following are some use cases for using /ExpressionAttributeNames/:
+--     For Binary, DynamoDB treats each byte of the binary data as unsigned
+--     when it compares binary values.
 --
--- To access an attribute whose name conflicts with a DynamoDB reserved word.
+--     For information on specifying data types in JSON, see
+--     <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DataFormat.html JSON Data Format>
+--     in the /Amazon DynamoDB Developer Guide/.
 --
--- To create a placeholder for repeating occurrences of an attribute name in
--- an expression.
+-- -   /ComparisonOperator/ - A comparator for evaluating attributes. For
+--     example, equals, greater than, less than, etc.
 --
--- To prevent special characters in an attribute name from being
--- misinterpreted in an expression.
+--     The following comparison operators are available:
 --
--- Use the # character in an expression to dereference an attribute name. For
--- example, consider the following attribute name:
+--     'EQ | NE | LE | LT | GE | GT | NOT_NULL | NULL | CONTAINS | NOT_CONTAINS | BEGINS_WITH | IN | BETWEEN'
 --
--- 'Percentile'
+--     For complete descriptions of all comparison operators, see
+--     <http://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_Condition.html Condition>.
 --
--- The name of this attribute conflicts with a reserved word, so it cannot be
--- used directly in an expression. (For the complete list of reserved words, see <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ReservedWords.html Reserved Words> in the /Amazon DynamoDB Developer Guide/). To work around this,
--- you could specify the following for /ExpressionAttributeNames/:
+sScanFilter :: Lens' Scan (HashMap Text Condition)
+sScanFilter = lens _sScanFilter (\ s a -> s{_sScanFilter = a}) . _Default . _Map;
+
+-- | For a parallel /Scan/ request, /TotalSegments/ represents the total
+-- number of segments into which the /Scan/ operation will be divided. The
+-- value of /TotalSegments/ corresponds to the number of application
+-- workers that will perform the parallel scan. For example, if you want to
+-- use four application threads to scan a table or an index, specify a
+-- /TotalSegments/ value of 4.
 --
--- '{"#P":"Percentile"}'
+-- The value for /TotalSegments/ must be greater than or equal to 1, and
+-- less than or equal to 1000000. If you specify a /TotalSegments/ value of
+-- 1, the /Scan/ operation will be sequential rather than parallel.
 --
--- You could then use this substitution in an expression, as in this example:
+-- If you specify /TotalSegments/, you must also specify /Segment/.
+sTotalSegments :: Lens' Scan (Maybe Natural)
+sTotalSegments = lens _sTotalSegments (\ s a -> s{_sTotalSegments = a}) . mapping _Nat;
+
+-- | A string that contains conditions that DynamoDB applies after the /Scan/
+-- operation, but before the data is returned to you. Items that do not
+-- satisfy the /FilterExpression/ criteria are not returned.
 --
--- '#P = :val'
+-- A /FilterExpression/ is applied after the items have already been read;
+-- the process of filtering does not consume any additional read capacity
+-- units.
 --
--- Tokens that begin with the : character are /expression attribute values/,
--- which are placeholders for the actual value at runtime.
+-- For more information, see
+-- <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/QueryAndScan.html#FilteringResults Filter Expressions>
+-- in the /Amazon DynamoDB Developer Guide/.
 --
--- For more information on expression attribute names, see <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ExpressionPlaceholders.html Using Placeholdersfor Attribute Names and Values> in the /Amazon DynamoDB Developer Guide/.
-sExpressionAttributeNames :: Lens' Scan (HashMap Text Text)
-sExpressionAttributeNames =
-    lens _sExpressionAttributeNames
-        (\s a -> s { _sExpressionAttributeNames = a })
-            . _Map
+-- /FilterExpression/ replaces the legacy /ScanFilter/ and
+-- /ConditionalOperator/ parameters.
+sFilterExpression :: Lens' Scan (Maybe Text)
+sFilterExpression = lens _sFilterExpression (\ s a -> s{_sFilterExpression = a});
 
--- | One or more values that can be substituted in an expression.
+-- | A Boolean value that determines the read consistency model during the
+-- scan:
 --
--- Use the : (colon) character in an expression to dereference an attribute
--- value. For example, suppose that you wanted to check whether the value of the /ProductStatus/ attribute was one of the following:
+-- -   If /ConsistentRead/ is 'false', then /Scan/ will use eventually
+--     consistent reads. The data returned from /Scan/ might not contain
+--     the results of other recently completed write operations (PutItem,
+--     UpdateItem or DeleteItem). The /Scan/ response might include some
+--     stale data.
 --
--- 'Available | Backordered | Discontinued'
+-- -   If /ConsistentRead/ is 'true', then /Scan/ will use strongly
+--     consistent reads. All of the write operations that completed before
+--     the /Scan/ began are guaranteed to be contained in the /Scan/
+--     response.
 --
--- You would first need to specify /ExpressionAttributeValues/ as follows:
+-- The default setting for /ConsistentRead/ is 'false', meaning that
+-- eventually consistent reads will be used.
 --
--- '{ ":avail":{"S":"Available"}, ":back":{"S":"Backordered"},":disc":{"S":"Discontinued"} }'
+-- Strongly consistent reads are not supported on global secondary indexes.
+-- If you scan a global secondary index with /ConsistentRead/ set to true,
+-- you will receive a /ValidationException/.
+sConsistentRead :: Lens' Scan (Maybe Bool)
+sConsistentRead = lens _sConsistentRead (\ s a -> s{_sConsistentRead = a});
+
+-- | One or more substitution tokens for attribute names in an expression.
+-- The following are some use cases for using /ExpressionAttributeNames/:
 --
--- You could then use these values in an expression, such as this:
+-- -   To access an attribute whose name conflicts with a DynamoDB reserved
+--     word.
 --
--- 'ProductStatus IN (:avail, :back, :disc)'
+-- -   To create a placeholder for repeating occurrences of an attribute
+--     name in an expression.
 --
--- For more information on expression attribute values, see <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.ExpressionPlaceholders.html Using Placeholdersfor Attribute Names and Values> in the /Amazon DynamoDB Developer Guide/.
-sExpressionAttributeValues :: Lens' Scan (HashMap Text AttributeValue)
-sExpressionAttributeValues =
-    lens _sExpressionAttributeValues
-        (\s a -> s { _sExpressionAttributeValues = a })
-            . _Map
-
--- | A string that contains conditions that DynamoDB applies after the /Scan/
--- operation, but before the data is returned to you. Items that do not satisfy
--- the /FilterExpression/ criteria are not returned.
+-- -   To prevent special characters in an attribute name from being
+--     misinterpreted in an expression.
 --
--- A /FilterExpression/ is applied after the items have already been read; the
--- process of filtering does not consume any additional read capacity units.
+-- Use the __#__ character in an expression to dereference an attribute
+-- name. For example, consider the following attribute name:
 --
--- For more information, see <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/QueryAndScan.html#FilteringResults Filter Expressions> in the /Amazon DynamoDBDeveloper Guide/.
+-- -   'Percentile'
 --
--- /FilterExpression/ replaces the legacy /ScanFilter/ and /ConditionalOperator/
--- parameters.
+-- The name of this attribute conflicts with a reserved word, so it cannot
+-- be used directly in an expression. (For the complete list of reserved
+-- words, see
+-- <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ReservedWords.html Reserved Words>
+-- in the /Amazon DynamoDB Developer Guide/). To work around this, you
+-- could specify the following for /ExpressionAttributeNames/:
 --
-sFilterExpression :: Lens' Scan (Maybe Text)
-sFilterExpression =
-    lens _sFilterExpression (\s a -> s { _sFilterExpression = a })
-
--- | The name of a secondary index to scan. This index can be any local secondary
--- index or global secondary index. Note that if you use the 'IndexName'
--- parameter, you must also provide 'TableName'.
-sIndexName :: Lens' Scan (Maybe Text)
-sIndexName = lens _sIndexName (\s a -> s { _sIndexName = a })
-
--- | The maximum number of items to evaluate (not necessarily the number of
--- matching items). If DynamoDB processes the number of items up to the limit
--- while processing the results, it stops the operation and returns the matching
--- values up to that point, and a key in /LastEvaluatedKey/ to apply in a
--- subsequent operation, so that you can pick up where you left off. Also, if
--- the processed data set size exceeds 1 MB before DynamoDB reaches this limit,
--- it stops the operation and returns the matching values up to the limit, and a
--- key in /LastEvaluatedKey/ to apply in a subsequent operation to continue the
--- operation. For more information, see <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/QueryAndScan.html Query and Scan> in the /Amazon DynamoDBDeveloper Guide/.
-sLimit :: Lens' Scan (Maybe Natural)
-sLimit = lens _sLimit (\s a -> s { _sLimit = a }) . mapping _Nat
-
--- | A string that identifies one or more attributes to retrieve from the
--- specified table or index. These attributes can include scalars, sets, or
--- elements of a JSON document. The attributes in the expression must be
--- separated by commas.
+-- -   '{\"#P\":\"Percentile\"}'
 --
--- If no attribute names are specified, then all attributes will be returned.
--- If any of the requested attributes are not found, they will not appear in the
--- result.
+-- You could then use this substitution in an expression, as in this
+-- example:
 --
--- For more information, see <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.AccessingItemAttributes.html Accessing Item Attributes> in the /Amazon DynamoDBDeveloper Guide/.
+-- -   '#P = :val'
 --
--- /ProjectionExpression/ replaces the legacy /AttributesToGet/ parameter.
+-- Tokens that begin with the __:__ character are /expression attribute
+-- values/, which are placeholders for the actual value at runtime.
 --
-sProjectionExpression :: Lens' Scan (Maybe Text)
-sProjectionExpression =
-    lens _sProjectionExpression (\s a -> s { _sProjectionExpression = a })
-
-sReturnConsumedCapacity :: Lens' Scan (Maybe ReturnConsumedCapacity)
-sReturnConsumedCapacity =
-    lens _sReturnConsumedCapacity (\s a -> s { _sReturnConsumedCapacity = a })
+-- For more information on expression attribute names, see
+-- <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.AccessingItemAttributes.html Accessing Item Attributes>
+-- in the /Amazon DynamoDB Developer Guide/.
+sExpressionAttributeNames :: Lens' Scan (HashMap Text Text)
+sExpressionAttributeNames = lens _sExpressionAttributeNames (\ s a -> s{_sExpressionAttributeNames = a}) . _Default . _Map;
 
 -- | This is a legacy parameter, for backward compatibility. New applications
--- should use /FilterExpression/ instead. Do not combine legacy parameters and
--- expression parameters in a single API call; otherwise, DynamoDB will return a /ValidationException/ exception.
---
--- A condition that evaluates the scan results and returns only the desired
--- values.
+-- should use /ProjectionExpression/ instead. Do not combine legacy
+-- parameters and expression parameters in a single API call; otherwise,
+-- DynamoDB will return a /ValidationException/ exception.
 --
--- This parameter does not support attributes of type List or Map.
+-- This parameter allows you to retrieve attributes of type List or Map;
+-- however, it cannot retrieve individual elements within a List or a Map.
 --
--- If you specify more than one condition in the /ScanFilter/ map, then by
--- default all of the conditions must evaluate to true. In other words, the
--- conditions are ANDed together. (You can use the /ConditionalOperator/ parameter
--- to OR the conditions instead. If you do this, then at least one of the
--- conditions must evaluate to true, rather than all of them.)
+-- The names of one or more attributes to retrieve. If no attribute names
+-- are provided, then all attributes will be returned. If any of the
+-- requested attributes are not found, they will not appear in the result.
 --
--- Each /ScanFilter/ element consists of an attribute name to compare, along with
--- the following:
+-- Note that /AttributesToGet/ has no effect on provisioned throughput
+-- consumption. DynamoDB determines capacity units consumed based on item
+-- size, not on the amount of data that is returned to an application.
+sAttributesToGet :: Lens' Scan (Maybe (NonEmpty Text))
+sAttributesToGet = lens _sAttributesToGet (\ s a -> s{_sAttributesToGet = a}) . mapping _List1;
+
+-- | Undocumented member.
+sReturnConsumedCapacity :: Lens' Scan (Maybe ReturnConsumedCapacity)
+sReturnConsumedCapacity = lens _sReturnConsumedCapacity (\ s a -> s{_sReturnConsumedCapacity = a});
+
+-- | One or more values that can be substituted in an expression.
 --
--- /AttributeValueList/ - One or more values to evaluate against the supplied
--- attribute. The number of values in the list depends on the operator specified
--- in /ComparisonOperator/ .
+-- Use the __:__ (colon) character in an expression to dereference an
+-- attribute value. For example, suppose that you wanted to check whether
+-- the value of the /ProductStatus/ attribute was one of the following:
 --
--- For type Number, value comparisons are numeric.
+-- 'Available | Backordered | Discontinued'
 --
--- String value comparisons for greater than, equals, or less than are based on
--- ASCII character code values. For example, 'a' is greater than 'A', and 'a' is
--- greater than 'B'. For a list of code values, see <http://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters http://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters>.
+-- You would first need to specify /ExpressionAttributeValues/ as follows:
 --
--- For Binary, DynamoDB treats each byte of the binary data as unsigned when it
--- compares binary values.
+-- '{ \":avail\":{\"S\":\"Available\"}, \":back\":{\"S\":\"Backordered\"}, \":disc\":{\"S\":\"Discontinued\"} }'
 --
--- For information on specifying data types in JSON, see <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DataFormat.html JSON Data Format> in
--- the /Amazon DynamoDB Developer Guide/.
+-- You could then use these values in an expression, such as this:
 --
--- /ComparisonOperator/ - A comparator for evaluating attributes. For example,
--- equals, greater than, less than, etc.
+-- 'ProductStatus IN (:avail, :back, :disc)'
 --
--- The following comparison operators are available:
+-- For more information on expression attribute values, see
+-- <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.SpecifyingConditions.html Specifying Conditions>
+-- in the /Amazon DynamoDB Developer Guide/.
+sExpressionAttributeValues :: Lens' Scan (HashMap Text AttributeValue)
+sExpressionAttributeValues = lens _sExpressionAttributeValues (\ s a -> s{_sExpressionAttributeValues = a}) . _Default . _Map;
+
+-- | The maximum number of items to evaluate (not necessarily the number of
+-- matching items). If DynamoDB processes the number of items up to the
+-- limit while processing the results, it stops the operation and returns
+-- the matching values up to that point, and a key in /LastEvaluatedKey/ to
+-- apply in a subsequent operation, so that you can pick up where you left
+-- off. Also, if the processed data set size exceeds 1 MB before DynamoDB
+-- reaches this limit, it stops the operation and returns the matching
+-- values up to the limit, and a key in /LastEvaluatedKey/ to apply in a
+-- subsequent operation to continue the operation. For more information,
+-- see
+-- <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/QueryAndScan.html Query and Scan>
+-- in the /Amazon DynamoDB Developer Guide/.
+sLimit :: Lens' Scan (Maybe Natural)
+sLimit = lens _sLimit (\ s a -> s{_sLimit = a}) . mapping _Nat;
+
+-- | The attributes to be returned in the result. You can retrieve all item
+-- attributes, specific item attributes, or the count of matching items.
 --
--- 'EQ | NE | LE | LT | GE | GT | NOT_NULL | NULL | CONTAINS | NOT_CONTAINS |BEGINS_WITH | IN | BETWEEN'
+-- -   'ALL_ATTRIBUTES' - Returns all of the item attributes.
 --
--- For complete descriptions of all comparison operators, see <http://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_Condition.html Condition>.
+-- -   'COUNT' - Returns the number of matching items, rather than the
+--     matching items themselves.
 --
+-- -   'SPECIFIC_ATTRIBUTES' - Returns only the attributes listed in
+--     /AttributesToGet/. This return value is equivalent to specifying
+--     /AttributesToGet/ without specifying any value for /Select/.
 --
-sScanFilter :: Lens' Scan (HashMap Text Condition)
-sScanFilter = lens _sScanFilter (\s a -> s { _sScanFilter = a }) . _Map
+-- If neither /Select/ nor /AttributesToGet/ are specified, DynamoDB
+-- defaults to 'ALL_ATTRIBUTES'. You cannot use both /AttributesToGet/ and
+-- /Select/ together in a single request, unless the value for /Select/ is
+-- 'SPECIFIC_ATTRIBUTES'. (This usage is equivalent to specifying
+-- /AttributesToGet/ without any value for /Select/.)
+sSelect :: Lens' Scan (Maybe Select)
+sSelect = lens _sSelect (\ s a -> s{_sSelect = a});
 
--- | For a parallel /Scan/ request, /Segment/ identifies an individual segment to be
--- scanned by an application worker.
+-- | For a parallel /Scan/ request, /Segment/ identifies an individual
+-- segment to be scanned by an application worker.
 --
--- Segment IDs are zero-based, so the first segment is always 0. For example,
--- if you want to use four application threads to scan a table or an index, then
--- the first thread specifies a /Segment/ value of 0, the second thread specifies
--- 1, and so on.
+-- Segment IDs are zero-based, so the first segment is always 0. For
+-- example, if you want to use four application threads to scan a table or
+-- an index, then the first thread specifies a /Segment/ value of 0, the
+-- second thread specifies 1, and so on.
 --
--- The value of /LastEvaluatedKey/ returned from a parallel /Scan/ request must be
--- used as /ExclusiveStartKey/ with the same segment ID in a subsequent /Scan/
--- operation.
+-- The value of /LastEvaluatedKey/ returned from a parallel /Scan/ request
+-- must be used as /ExclusiveStartKey/ with the same segment ID in a
+-- subsequent /Scan/ operation.
 --
--- The value for /Segment/ must be greater than or equal to 0, and less than the
--- value provided for /TotalSegments/.
+-- The value for /Segment/ must be greater than or equal to 0, and less
+-- than the value provided for /TotalSegments/.
 --
 -- If you provide /Segment/, you must also provide /TotalSegments/.
 sSegment :: Lens' Scan (Maybe Natural)
-sSegment = lens _sSegment (\s a -> s { _sSegment = a }) . mapping _Nat
+sSegment = lens _sSegment (\ s a -> s{_sSegment = a}) . mapping _Nat;
 
--- | The attributes to be returned in the result. You can retrieve all item
--- attributes, specific item attributes, or the count of matching items.
+-- | This is a legacy parameter, for backward compatibility. New applications
+-- should use /FilterExpression/ instead. Do not combine legacy parameters
+-- and expression parameters in a single API call; otherwise, DynamoDB will
+-- return a /ValidationException/ exception.
 --
--- 'ALL_ATTRIBUTES' - Returns all of the item attributes.
+-- A logical operator to apply to the conditions in a /ScanFilter/ map:
 --
--- 'COUNT' - Returns the number of matching items, rather than the matching
--- items themselves.
+-- -   'AND' - If all of the conditions evaluate to true, then the entire
+--     map evaluates to true.
 --
--- 'SPECIFIC_ATTRIBUTES' - Returns only the attributes listed in /AttributesToGet/. This return value is equivalent to specifying /AttributesToGet/ without
--- specifying any value for /Select/.
+-- -   'OR' - If at least one of the conditions evaluate to true, then the
+--     entire map evaluates to true.
 --
--- If neither /Select/ nor /AttributesToGet/ are specified, DynamoDB defaults to 'ALL_ATTRIBUTES'. You cannot use both /AttributesToGet/ and /Select/ together in a single
--- request, unless the value for /Select/ is 'SPECIFIC_ATTRIBUTES'. (This usage is
--- equivalent to specifying /AttributesToGet/ without any value for /Select/.)
-sSelect :: Lens' Scan (Maybe Select)
-sSelect = lens _sSelect (\s a -> s { _sSelect = a })
-
--- | The name of the table containing the requested items; or, if you provide 'IndexName', the name of the table to which that index belongs.
-sTableName :: Lens' Scan Text
-sTableName = lens _sTableName (\s a -> s { _sTableName = a })
+-- If you omit /ConditionalOperator/, then 'AND' is the default.
+--
+-- The operation will succeed only if the entire map evaluates to true.
+--
+-- This parameter does not support attributes of type List or Map.
+sConditionalOperator :: Lens' Scan (Maybe ConditionalOperator)
+sConditionalOperator = lens _sConditionalOperator (\ s a -> s{_sConditionalOperator = a});
 
--- | For a parallel /Scan/ request, /TotalSegments/ represents the total number of
--- segments into which the /Scan/ operation will be divided. The value of /TotalSegments/ corresponds to the number of application workers that will perform the
--- parallel scan. For example, if you want to use four application threads to
--- scan a table or an index, specify a /TotalSegments/ value of 4.
+-- | The primary key of the first item that this operation will evaluate. Use
+-- the value that was returned for /LastEvaluatedKey/ in the previous
+-- operation.
 --
--- The value for /TotalSegments/ must be greater than or equal to 1, and less
--- than or equal to 1000000. If you specify a /TotalSegments/ value of 1, the /Scan/
--- operation will be sequential rather than parallel.
+-- The data type for /ExclusiveStartKey/ must be String, Number or Binary.
+-- No set data types are allowed.
 --
--- If you specify /TotalSegments/, you must also specify /Segment/.
-sTotalSegments :: Lens' Scan (Maybe Natural)
-sTotalSegments = lens _sTotalSegments (\s a -> s { _sTotalSegments = a }) . mapping _Nat
+-- In a parallel scan, a /Scan/ request that includes /ExclusiveStartKey/
+-- must specify the same segment whose previous /Scan/ returned the
+-- corresponding value of /LastEvaluatedKey/.
+sExclusiveStartKey :: Lens' Scan (HashMap Text AttributeValue)
+sExclusiveStartKey = lens _sExclusiveStartKey (\ s a -> s{_sExclusiveStartKey = a}) . _Default . _Map;
 
-data ScanResponse = ScanResponse
-    { _srConsumedCapacity :: Maybe ConsumedCapacity
-    , _srCount            :: Maybe Int
-    , _srItems            :: List "Items" (Map Text AttributeValue)
-    , _srLastEvaluatedKey :: Map Text AttributeValue
-    , _srScannedCount     :: Maybe Int
-    } deriving (Eq, Read, Show)
+-- | The name of a secondary index to scan. This index can be any local
+-- secondary index or global secondary index. Note that if you use the
+-- 'IndexName' parameter, you must also provide 'TableName'.
+sIndexName :: Lens' Scan (Maybe Text)
+sIndexName = lens _sIndexName (\ s a -> s{_sIndexName = a});
 
--- | 'ScanResponse' constructor.
+-- | The name of the table containing the requested items; or, if you provide
+-- 'IndexName', the name of the table to which that index belongs.
+sTableName :: Lens' Scan Text
+sTableName = lens _sTableName (\ s a -> s{_sTableName = a});
+
+instance AWSPager Scan where
+        page rq rs
+          | stop (rs ^. srsLastEvaluatedKey) = Nothing
+          | stop (rs ^. srsItems) = Nothing
+          | otherwise =
+            Just $ rq &
+              sExclusiveStartKey .~ rs ^. srsLastEvaluatedKey
+
+instance AWSRequest Scan where
+        type Sv Scan = DynamoDB
+        type Rs Scan = ScanResponse
+        request = postJSON
+        response
+          = receiveJSON
+              (\ s h x ->
+                 ScanResponse' <$>
+                   (x .?> "LastEvaluatedKey" .!@ mempty) <*>
+                     (x .?> "Count")
+                     <*> (x .?> "ScannedCount")
+                     <*> (x .?> "Items" .!@ mempty)
+                     <*> (x .?> "ConsumedCapacity")
+                     <*> (pure (fromEnum s)))
+
+instance ToHeaders Scan where
+        toHeaders
+          = const
+              (mconcat
+                 ["X-Amz-Target" =#
+                    ("DynamoDB_20120810.Scan" :: ByteString),
+                  "Content-Type" =#
+                    ("application/x-amz-json-1.0" :: ByteString)])
+
+instance ToJSON Scan where
+        toJSON Scan'{..}
+          = object
+              ["ProjectionExpression" .= _sProjectionExpression,
+               "ScanFilter" .= _sScanFilter,
+               "TotalSegments" .= _sTotalSegments,
+               "FilterExpression" .= _sFilterExpression,
+               "ConsistentRead" .= _sConsistentRead,
+               "ExpressionAttributeNames" .=
+                 _sExpressionAttributeNames,
+               "AttributesToGet" .= _sAttributesToGet,
+               "ReturnConsumedCapacity" .= _sReturnConsumedCapacity,
+               "ExpressionAttributeValues" .=
+                 _sExpressionAttributeValues,
+               "Limit" .= _sLimit, "Select" .= _sSelect,
+               "Segment" .= _sSegment,
+               "ConditionalOperator" .= _sConditionalOperator,
+               "ExclusiveStartKey" .= _sExclusiveStartKey,
+               "IndexName" .= _sIndexName,
+               "TableName" .= _sTableName]
+
+instance ToPath Scan where
+        toPath = const "/"
+
+instance ToQuery Scan where
+        toQuery = const mempty
+
+-- | Represents the output of a /Scan/ operation.
 --
--- The fields accessible through corresponding lenses are:
+-- /See:/ 'scanResponse' smart constructor.
+data ScanResponse = ScanResponse'
+    { _srsLastEvaluatedKey :: !(Maybe (Map Text AttributeValue))
+    , _srsCount            :: !(Maybe Int)
+    , _srsScannedCount     :: !(Maybe Int)
+    , _srsItems            :: !(Maybe [Map Text AttributeValue])
+    , _srsConsumedCapacity :: !(Maybe ConsumedCapacity)
+    , _srsStatus           :: !Int
+    } deriving (Eq,Read,Show,Data,Typeable,Generic)
+
+-- | Creates a value of 'ScanResponse' with the minimum fields required to make a request.
 --
--- * 'srConsumedCapacity' @::@ 'Maybe' 'ConsumedCapacity'
+-- Use one of the following lenses to modify other fields as desired:
 --
--- * 'srCount' @::@ 'Maybe' 'Int'
+-- * 'srsLastEvaluatedKey'
 --
--- * 'srItems' @::@ ['HashMap' 'Text' 'AttributeValue']
+-- * 'srsCount'
 --
--- * 'srLastEvaluatedKey' @::@ 'HashMap' 'Text' 'AttributeValue'
+-- * 'srsScannedCount'
 --
--- * 'srScannedCount' @::@ 'Maybe' 'Int'
+-- * 'srsItems'
 --
-scanResponse :: ScanResponse
-scanResponse = ScanResponse
-    { _srItems            = mempty
-    , _srCount            = Nothing
-    , _srScannedCount     = Nothing
-    , _srLastEvaluatedKey = mempty
-    , _srConsumedCapacity = Nothing
+-- * 'srsConsumedCapacity'
+--
+-- * 'srsStatus'
+scanResponse
+    :: Int -- ^ 'srsStatus'
+    -> ScanResponse
+scanResponse pStatus_ =
+    ScanResponse'
+    { _srsLastEvaluatedKey = Nothing
+    , _srsCount = Nothing
+    , _srsScannedCount = Nothing
+    , _srsItems = Nothing
+    , _srsConsumedCapacity = Nothing
+    , _srsStatus = pStatus_
     }
 
-srConsumedCapacity :: Lens' ScanResponse (Maybe ConsumedCapacity)
-srConsumedCapacity =
-    lens _srConsumedCapacity (\s a -> s { _srConsumedCapacity = a })
-
--- | The number of items in the response.
+-- | The primary key of the item where the operation stopped, inclusive of
+-- the previous result set. Use this value to start a new operation,
+-- excluding this value in the new request.
 --
--- If you set /ScanFilter/ in the request, then /Count/ is the number of items
--- returned after the filter was applied, and /ScannedCount/ is the number of
--- matching items before the filter was applied.
+-- If /LastEvaluatedKey/ is empty, then the \"last page\" of results has
+-- been processed and there is no more data to be retrieved.
 --
--- If you did not use a filter in the request, then /Count/ is the same as /ScannedCount/.
-srCount :: Lens' ScanResponse (Maybe Int)
-srCount = lens _srCount (\s a -> s { _srCount = a })
-
--- | An array of item attributes that match the scan criteria. Each element in
--- this array consists of an attribute name and the value for that attribute.
-srItems :: Lens' ScanResponse [HashMap Text AttributeValue]
-srItems = lens _srItems (\s a -> s { _srItems = a }) . _List
+-- If /LastEvaluatedKey/ is not empty, it does not necessarily mean that
+-- there is more data in the result set. The only way to know when you have
+-- reached the end of the result set is when /LastEvaluatedKey/ is empty.
+srsLastEvaluatedKey :: Lens' ScanResponse (HashMap Text AttributeValue)
+srsLastEvaluatedKey = lens _srsLastEvaluatedKey (\ s a -> s{_srsLastEvaluatedKey = a}) . _Default . _Map;
 
--- | The primary key of the item where the operation stopped, inclusive of the
--- previous result set. Use this value to start a new operation, excluding this
--- value in the new request.
+-- | The number of items in the response.
 --
--- If /LastEvaluatedKey/ is empty, then the "last page" of results has been
--- processed and there is no more data to be retrieved.
+-- If you set /ScanFilter/ in the request, then /Count/ is the number of
+-- items returned after the filter was applied, and /ScannedCount/ is the
+-- number of matching items before the filter was applied.
 --
--- If /LastEvaluatedKey/ is not empty, it does not necessarily mean that there is
--- more data in the result set. The only way to know when you have reached the
--- end of the result set is when /LastEvaluatedKey/ is empty.
-srLastEvaluatedKey :: Lens' ScanResponse (HashMap Text AttributeValue)
-srLastEvaluatedKey =
-    lens _srLastEvaluatedKey (\s a -> s { _srLastEvaluatedKey = a })
-        . _Map
+-- If you did not use a filter in the request, then /Count/ is the same as
+-- /ScannedCount/.
+srsCount :: Lens' ScanResponse (Maybe Int)
+srsCount = lens _srsCount (\ s a -> s{_srsCount = a});
 
--- | The number of items evaluated, before any /ScanFilter/ is applied. A high /ScannedCount/ value with few, or no, /Count/ results indicates an inefficient /Scan/
--- operation. For more information, see <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/QueryAndScan.html#Count Count and ScannedCount> in the /AmazonDynamoDB Developer Guide/.
+-- | The number of items evaluated, before any /ScanFilter/ is applied. A
+-- high /ScannedCount/ value with few, or no, /Count/ results indicates an
+-- inefficient /Scan/ operation. For more information, see
+-- <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/QueryAndScan.html#Count Count and ScannedCount>
+-- in the /Amazon DynamoDB Developer Guide/.
 --
--- If you did not use a filter in the request, then /ScannedCount/ is the same as /Count/.
-srScannedCount :: Lens' ScanResponse (Maybe Int)
-srScannedCount = lens _srScannedCount (\s a -> s { _srScannedCount = a })
-
-instance ToPath Scan where
-    toPath = const "/"
-
-instance ToQuery Scan where
-    toQuery = const mempty
-
-instance ToHeaders Scan
-
-instance ToJSON Scan where
-    toJSON Scan{..} = object
-        [ "TableName"                 .= _sTableName
-        , "IndexName"                 .= _sIndexName
-        , "AttributesToGet"           .= _sAttributesToGet
-        , "Limit"                     .= _sLimit
-        , "Select"                    .= _sSelect
-        , "ScanFilter"                .= _sScanFilter
-        , "ConditionalOperator"       .= _sConditionalOperator
-        , "ExclusiveStartKey"         .= _sExclusiveStartKey
-        , "ReturnConsumedCapacity"    .= _sReturnConsumedCapacity
-        , "TotalSegments"             .= _sTotalSegments
-        , "Segment"                   .= _sSegment
-        , "ProjectionExpression"      .= _sProjectionExpression
-        , "FilterExpression"          .= _sFilterExpression
-        , "ExpressionAttributeNames"  .= _sExpressionAttributeNames
-        , "ExpressionAttributeValues" .= _sExpressionAttributeValues
-        ]
-
-instance AWSRequest Scan where
-    type Sv Scan = DynamoDB
-    type Rs Scan = ScanResponse
+-- If you did not use a filter in the request, then /ScannedCount/ is the
+-- same as /Count/.
+srsScannedCount :: Lens' ScanResponse (Maybe Int)
+srsScannedCount = lens _srsScannedCount (\ s a -> s{_srsScannedCount = a});
 
-    request  = post "Scan"
-    response = jsonResponse
+-- | An array of item attributes that match the scan criteria. Each element
+-- in this array consists of an attribute name and the value for that
+-- attribute.
+srsItems :: Lens' ScanResponse [HashMap Text AttributeValue]
+srsItems = lens _srsItems (\ s a -> s{_srsItems = a}) . _Default . _Coerce;
 
-instance FromJSON ScanResponse where
-    parseJSON = withObject "ScanResponse" $ \o -> ScanResponse
-        <$> o .:? "ConsumedCapacity"
-        <*> o .:? "Count"
-        <*> o .:? "Items" .!= mempty
-        <*> o .:? "LastEvaluatedKey" .!= mempty
-        <*> o .:? "ScannedCount"
+-- | Undocumented member.
+srsConsumedCapacity :: Lens' ScanResponse (Maybe ConsumedCapacity)
+srsConsumedCapacity = lens _srsConsumedCapacity (\ s a -> s{_srsConsumedCapacity = a});
 
-instance AWSPager Scan where
-    page rq rs
-        | stop (rs ^. srLastEvaluatedKey) = Nothing
-        | otherwise = Just $ rq
-            & sExclusiveStartKey .~ rs ^. srLastEvaluatedKey
+-- | The response status code.
+srsStatus :: Lens' ScanResponse Int
+srsStatus = lens _srsStatus (\ s a -> s{_srsStatus = a});
diff --git a/gen/Network/AWS/DynamoDB/Types.hs b/gen/Network/AWS/DynamoDB/Types.hs
--- a/gen/Network/AWS/DynamoDB/Types.hs
+++ b/gen/Network/AWS/DynamoDB/Types.hs
@@ -1,2756 +1,360 @@
-{-# LANGUAGE DataKinds                   #-}
-{-# LANGUAGE DeriveGeneric               #-}
-{-# LANGUAGE FlexibleInstances           #-}
-{-# LANGUAGE GeneralizedNewtypeDeriving  #-}
-{-# LANGUAGE LambdaCase                  #-}
-{-# LANGUAGE NoImplicitPrelude           #-}
-{-# LANGUAGE OverloadedStrings           #-}
-{-# LANGUAGE RecordWildCards             #-}
-{-# LANGUAGE TypeFamilies                #-}
-{-# LANGUAGE ViewPatterns                #-}
-
-{-# OPTIONS_GHC -fno-warn-unused-imports #-}
-
--- Module      : Network.AWS.DynamoDB.Types
--- Copyright   : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>
--- License     : This Source Code Form is subject to the terms of
---               the Mozilla Public License, v. 2.0.
---               A copy of the MPL can be found in the LICENSE file or
---               you can obtain it at http://mozilla.org/MPL/2.0/.
--- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com>
--- Stability   : experimental
--- Portability : non-portable (GHC extensions)
---
--- Derived from AWS service descriptions, licensed under Apache 2.0.
-
-module Network.AWS.DynamoDB.Types
-    (
-    -- * Service
-      DynamoDB
-    -- ** Error
-    , JSONError
-
-    -- * WriteRequest
-    , WriteRequest
-    , writeRequest
-    , wDeleteRequest
-    , wPutRequest
-
-    -- * ProvisionedThroughputDescription
-    , ProvisionedThroughputDescription
-    , provisionedThroughputDescription
-    , ptdLastDecreaseDateTime
-    , ptdLastIncreaseDateTime
-    , ptdNumberOfDecreasesToday
-    , ptdReadCapacityUnits
-    , ptdWriteCapacityUnits
-
-    -- * KeyType
-    , KeyType (..)
-
-    -- * AttributeValue
-    , AttributeValue
-    , attributeValue
-    , avB
-    , avBOOL
-    , avBS
-    , avL
-    , avM
-    , avN
-    , avNS
-    , avNULL
-    , avS
-    , avSS
-
-    -- * IndexStatus
-    , IndexStatus (..)
-
-    -- * ProvisionedThroughput
-    , ProvisionedThroughput
-    , provisionedThroughput
-    , ptReadCapacityUnits
-    , ptWriteCapacityUnits
-
-    -- * TableStatus
-    , TableStatus (..)
-
-    -- * ProjectionType
-    , ProjectionType (..)
-
-    -- * TableDescription
-    , TableDescription
-    , tableDescription
-    , tdAttributeDefinitions
-    , tdCreationDateTime
-    , tdGlobalSecondaryIndexes
-    , tdItemCount
-    , tdKeySchema
-    , tdLocalSecondaryIndexes
-    , tdProvisionedThroughput
-    , tdTableName
-    , tdTableSizeBytes
-    , tdTableStatus
-
-    -- * KeysAndAttributes
-    , KeysAndAttributes
-    , keysAndAttributes
-    , kaaAttributesToGet
-    , kaaConsistentRead
-    , kaaExpressionAttributeNames
-    , kaaKeys
-    , kaaProjectionExpression
-
-    -- * ReturnConsumedCapacity
-    , ReturnConsumedCapacity (..)
-
-    -- * ReturnItemCollectionMetrics
-    , ReturnItemCollectionMetrics (..)
-
-    -- * AttributeValueUpdate
-    , AttributeValueUpdate
-    , attributeValueUpdate
-    , avuAction
-    , avuValue
-
-    -- * ExpectedAttributeValue
-    , ExpectedAttributeValue
-    , expectedAttributeValue
-    , eavAttributeValueList
-    , eavComparisonOperator
-    , eavExists
-    , eavValue
-
-    -- * AttributeDefinition
-    , AttributeDefinition
-    , attributeDefinition
-    , adAttributeName
-    , adAttributeType
-
-    -- * ComparisonOperator
-    , ComparisonOperator (..)
-
-    -- * ReturnValue
-    , ReturnValue (..)
-
-    -- * LocalSecondaryIndex
-    , LocalSecondaryIndex
-    , localSecondaryIndex
-    , lsiIndexName
-    , lsiKeySchema
-    , lsiProjection
-
-    -- * GlobalSecondaryIndexDescription
-    , GlobalSecondaryIndexDescription
-    , globalSecondaryIndexDescription
-    , gsidBackfilling
-    , gsidIndexName
-    , gsidIndexSizeBytes
-    , gsidIndexStatus
-    , gsidItemCount
-    , gsidKeySchema
-    , gsidProjection
-    , gsidProvisionedThroughput
-
-    -- * ItemCollectionMetrics
-    , ItemCollectionMetrics
-    , itemCollectionMetrics
-    , icmItemCollectionKey
-    , icmSizeEstimateRangeGB
-
-    -- * Capacity
-    , Capacity
-    , capacity
-    , cCapacityUnits
-
-    -- * ConsumedCapacity
-    , ConsumedCapacity
-    , consumedCapacity
-    , ccCapacityUnits
-    , ccGlobalSecondaryIndexes
-    , ccLocalSecondaryIndexes
-    , ccTable
-    , ccTableName
-
-    -- * GlobalSecondaryIndex
-    , GlobalSecondaryIndex
-    , globalSecondaryIndex
-    , gsiIndexName
-    , gsiKeySchema
-    , gsiProjection
-    , gsiProvisionedThroughput
-
-    -- * LocalSecondaryIndexDescription
-    , LocalSecondaryIndexDescription
-    , localSecondaryIndexDescription
-    , lsidIndexName
-    , lsidIndexSizeBytes
-    , lsidItemCount
-    , lsidKeySchema
-    , lsidProjection
-
-    -- * AttributeAction
-    , AttributeAction (..)
-
-    -- * ScalarAttributeType
-    , ScalarAttributeType (..)
-
-    -- * Projection
-    , Projection
-    , projection
-    , pNonKeyAttributes
-    , pProjectionType
-
-    -- * CreateGlobalSecondaryIndexAction
-    , CreateGlobalSecondaryIndexAction
-    , createGlobalSecondaryIndexAction
-    , cgsiaIndexName
-    , cgsiaKeySchema
-    , cgsiaProjection
-    , cgsiaProvisionedThroughput
-
-    -- * Select
-    , Select (..)
-
-    -- * KeySchemaElement
-    , KeySchemaElement
-    , keySchemaElement
-    , kseAttributeName
-    , kseKeyType
-
-    -- * DeleteGlobalSecondaryIndexAction
-    , DeleteGlobalSecondaryIndexAction
-    , deleteGlobalSecondaryIndexAction
-    , dgsiaIndexName
-
-    -- * DeleteRequest
-    , DeleteRequest
-    , deleteRequest
-    , dKey
-
-    -- * UpdateGlobalSecondaryIndexAction
-    , UpdateGlobalSecondaryIndexAction
-    , updateGlobalSecondaryIndexAction
-    , ugsiaIndexName
-    , ugsiaProvisionedThroughput
-
-    -- * PutRequest
-    , PutRequest
-    , putRequest
-    , pItem
-
-    -- * Condition
-    , Condition
-    , condition
-    , cAttributeValueList
-    , cComparisonOperator
-
-    -- * ConditionalOperator
-    , ConditionalOperator (..)
-
-    -- * GlobalSecondaryIndexUpdate
-    , GlobalSecondaryIndexUpdate
-    , globalSecondaryIndexUpdate
-    , gsiuCreate
-    , gsiuDelete
-    , gsiuUpdate
-    ) where
-
-import Network.AWS.Prelude
-import Network.AWS.Signing
-import qualified GHC.Exts
-
--- | Version @2012-08-10@ of the Amazon DynamoDB service.
-data DynamoDB
-
-instance AWSService DynamoDB where
-    type Sg DynamoDB = V4
-    type Er DynamoDB = JSONError
-
-    service = service'
-      where
-        service' :: Service DynamoDB
-        service' = Service
-            { _svcAbbrev       = "DynamoDB"
-            , _svcPrefix       = "dynamodb"
-            , _svcVersion      = "2012-08-10"
-            , _svcTargetPrefix = Just "DynamoDB_20120810"
-            , _svcJSONVersion  = Just "1.0"
-            , _svcHandle       = handle
-            , _svcRetry        = retry
-            }
-
-        handle :: Status
-               -> Maybe (LazyByteString -> ServiceError JSONError)
-        handle = jsonError statusSuccess service'
-
-        retry :: Retry DynamoDB
-        retry = Exponential
-            { _retryBase     = 0.05
-            , _retryGrowth   = 2
-            , _retryAttempts = 10
-            , _retryCheck    = check
-            }
-
-        check :: Status
-              -> JSONError
-              -> Bool
-        check (statusCode -> s) (awsErrorCode -> e)
-            | s == 400 && (Just "ThrottlingException") == e = True -- Throttling
-            | s == 400 && (Just "ProvisionedThroughputExceededException") == e = True -- Throughput Exceeded
-            | s == 500  = True -- General Server Error
-            | s == 509  = True -- Limit Exceeded
-            | s == 503  = True -- Service Unavailable
-            | otherwise = False
-
-data WriteRequest = WriteRequest
-    { _wDeleteRequest :: Maybe DeleteRequest
-    , _wPutRequest    :: Maybe PutRequest
-    } deriving (Eq, Read, Show)
-
--- | 'WriteRequest' constructor.
---
--- The fields accessible through corresponding lenses are:
---
--- * 'wDeleteRequest' @::@ 'Maybe' 'DeleteRequest'
---
--- * 'wPutRequest' @::@ 'Maybe' 'PutRequest'
---
-writeRequest :: WriteRequest
-writeRequest = WriteRequest
-    { _wPutRequest    = Nothing
-    , _wDeleteRequest = Nothing
-    }
-
--- | A request to perform a /DeleteItem/ operation.
-wDeleteRequest :: Lens' WriteRequest (Maybe DeleteRequest)
-wDeleteRequest = lens _wDeleteRequest (\s a -> s { _wDeleteRequest = a })
-
--- | A request to perform a /PutItem/ operation.
-wPutRequest :: Lens' WriteRequest (Maybe PutRequest)
-wPutRequest = lens _wPutRequest (\s a -> s { _wPutRequest = a })
-
-instance FromJSON WriteRequest where
-    parseJSON = withObject "WriteRequest" $ \o -> WriteRequest
-        <$> o .:? "DeleteRequest"
-        <*> o .:? "PutRequest"
-
-instance ToJSON WriteRequest where
-    toJSON WriteRequest{..} = object
-        [ "PutRequest"    .= _wPutRequest
-        , "DeleteRequest" .= _wDeleteRequest
-        ]
-
-data ProvisionedThroughputDescription = ProvisionedThroughputDescription
-    { _ptdLastDecreaseDateTime   :: Maybe POSIX
-    , _ptdLastIncreaseDateTime   :: Maybe POSIX
-    , _ptdNumberOfDecreasesToday :: Maybe Nat
-    , _ptdReadCapacityUnits      :: Maybe Nat
-    , _ptdWriteCapacityUnits     :: Maybe Nat
-    } deriving (Eq, Ord, Read, Show)
-
--- | 'ProvisionedThroughputDescription' constructor.
---
--- The fields accessible through corresponding lenses are:
---
--- * 'ptdLastDecreaseDateTime' @::@ 'Maybe' 'UTCTime'
---
--- * 'ptdLastIncreaseDateTime' @::@ 'Maybe' 'UTCTime'
---
--- * 'ptdNumberOfDecreasesToday' @::@ 'Maybe' 'Natural'
---
--- * 'ptdReadCapacityUnits' @::@ 'Maybe' 'Natural'
---
--- * 'ptdWriteCapacityUnits' @::@ 'Maybe' 'Natural'
---
-provisionedThroughputDescription :: ProvisionedThroughputDescription
-provisionedThroughputDescription = ProvisionedThroughputDescription
-    { _ptdLastIncreaseDateTime   = Nothing
-    , _ptdLastDecreaseDateTime   = Nothing
-    , _ptdNumberOfDecreasesToday = Nothing
-    , _ptdReadCapacityUnits      = Nothing
-    , _ptdWriteCapacityUnits     = Nothing
-    }
-
--- | The date and time of the last provisioned throughput decrease for this table.
-ptdLastDecreaseDateTime :: Lens' ProvisionedThroughputDescription (Maybe UTCTime)
-ptdLastDecreaseDateTime =
-    lens _ptdLastDecreaseDateTime (\s a -> s { _ptdLastDecreaseDateTime = a })
-        . mapping _Time
-
--- | The date and time of the last provisioned throughput increase for this table.
-ptdLastIncreaseDateTime :: Lens' ProvisionedThroughputDescription (Maybe UTCTime)
-ptdLastIncreaseDateTime =
-    lens _ptdLastIncreaseDateTime (\s a -> s { _ptdLastIncreaseDateTime = a })
-        . mapping _Time
-
--- | The number of provisioned throughput decreases for this table during this UTC
--- calendar day. For current maximums on provisioned throughput decreases, see <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Limits.html Limits> in the /Amazon DynamoDB Developer Guide/.
-ptdNumberOfDecreasesToday :: Lens' ProvisionedThroughputDescription (Maybe Natural)
-ptdNumberOfDecreasesToday =
-    lens _ptdNumberOfDecreasesToday
-        (\s a -> s { _ptdNumberOfDecreasesToday = a })
-            . mapping _Nat
-
--- | The maximum number of strongly consistent reads consumed per second before
--- DynamoDB returns a /ThrottlingException/. Eventually consistent reads require
--- less effort than strongly consistent reads, so a setting of 50 /ReadCapacityUnits/ per second provides 100 eventually consistent /ReadCapacityUnits/ per second.
-ptdReadCapacityUnits :: Lens' ProvisionedThroughputDescription (Maybe Natural)
-ptdReadCapacityUnits =
-    lens _ptdReadCapacityUnits (\s a -> s { _ptdReadCapacityUnits = a })
-        . mapping _Nat
-
--- | The maximum number of writes consumed per second before DynamoDB returns a /ThrottlingException/.
-ptdWriteCapacityUnits :: Lens' ProvisionedThroughputDescription (Maybe Natural)
-ptdWriteCapacityUnits =
-    lens _ptdWriteCapacityUnits (\s a -> s { _ptdWriteCapacityUnits = a })
-        . mapping _Nat
-
-instance FromJSON ProvisionedThroughputDescription where
-    parseJSON = withObject "ProvisionedThroughputDescription" $ \o -> ProvisionedThroughputDescription
-        <$> o .:? "LastDecreaseDateTime"
-        <*> o .:? "LastIncreaseDateTime"
-        <*> o .:? "NumberOfDecreasesToday"
-        <*> o .:? "ReadCapacityUnits"
-        <*> o .:? "WriteCapacityUnits"
-
-instance ToJSON ProvisionedThroughputDescription where
-    toJSON ProvisionedThroughputDescription{..} = object
-        [ "LastIncreaseDateTime"   .= _ptdLastIncreaseDateTime
-        , "LastDecreaseDateTime"   .= _ptdLastDecreaseDateTime
-        , "NumberOfDecreasesToday" .= _ptdNumberOfDecreasesToday
-        , "ReadCapacityUnits"      .= _ptdReadCapacityUnits
-        , "WriteCapacityUnits"     .= _ptdWriteCapacityUnits
-        ]
-
-data KeyType
-    = Hash  -- ^ HASH
-    | Range -- ^ RANGE
-      deriving (Eq, Ord, Read, Show, Generic, Enum)
-
-instance Hashable KeyType
-
-instance FromText KeyType where
-    parser = takeLowerText >>= \case
-        "hash"  -> pure Hash
-        "range" -> pure Range
-        e       -> fail $
-            "Failure parsing KeyType from " ++ show e
-
-instance ToText KeyType where
-    toText = \case
-        Hash  -> "HASH"
-        Range -> "RANGE"
-
-instance ToByteString KeyType
-instance ToHeader     KeyType
-instance ToQuery      KeyType
-
-instance FromJSON KeyType where
-    parseJSON = parseJSONText "KeyType"
-
-instance ToJSON KeyType where
-    toJSON = toJSONText
-
-data AttributeValue = AttributeValue
-    { _avB    :: Maybe Base64
-    , _avBOOL :: Maybe Bool
-    , _avBS   :: List "BS" Base64
-    , _avL    :: List "L" AttributeValue
-    , _avM    :: Map Text AttributeValue
-    , _avN    :: Maybe Text
-    , _avNS   :: List "NS" Text
-    , _avNULL :: Maybe Bool
-    , _avS    :: Maybe Text
-    , _avSS   :: List "SS" Text
-    } deriving (Eq, Read, Show)
-
--- | 'AttributeValue' constructor.
---
--- The fields accessible through corresponding lenses are:
---
--- * 'avB' @::@ 'Maybe' 'Base64'
---
--- * 'avBOOL' @::@ 'Maybe' 'Bool'
---
--- * 'avBS' @::@ ['Base64']
---
--- * 'avL' @::@ ['AttributeValue']
---
--- * 'avM' @::@ 'HashMap' 'Text' 'AttributeValue'
---
--- * 'avN' @::@ 'Maybe' 'Text'
---
--- * 'avNS' @::@ ['Text']
---
--- * 'avNULL' @::@ 'Maybe' 'Bool'
---
--- * 'avS' @::@ 'Maybe' 'Text'
---
--- * 'avSS' @::@ ['Text']
---
-attributeValue :: AttributeValue
-attributeValue = AttributeValue
-    { _avS    = Nothing
-    , _avN    = Nothing
-    , _avB    = Nothing
-    , _avSS   = mempty
-    , _avNS   = mempty
-    , _avBS   = mempty
-    , _avM    = mempty
-    , _avL    = mempty
-    , _avNULL = Nothing
-    , _avBOOL = Nothing
-    }
-
--- | A Binary data type.
-avB :: Lens' AttributeValue (Maybe Base64)
-avB = lens _avB (\s a -> s { _avB = a })
-
--- | A Boolean data type.
-avBOOL :: Lens' AttributeValue (Maybe Bool)
-avBOOL = lens _avBOOL (\s a -> s { _avBOOL = a })
-
--- | A Binary Set data type.
-avBS :: Lens' AttributeValue [Base64]
-avBS = lens _avBS (\s a -> s { _avBS = a }) . _List
-
--- | A List of attribute values.
-avL :: Lens' AttributeValue [AttributeValue]
-avL = lens _avL (\s a -> s { _avL = a }) . _List
-
--- | A Map of attribute values.
-avM :: Lens' AttributeValue (HashMap Text AttributeValue)
-avM = lens _avM (\s a -> s { _avM = a }) . _Map
-
--- | A Number data type.
-avN :: Lens' AttributeValue (Maybe Text)
-avN = lens _avN (\s a -> s { _avN = a })
-
--- | A Number Set data type.
-avNS :: Lens' AttributeValue [Text]
-avNS = lens _avNS (\s a -> s { _avNS = a }) . _List
-
--- | A Null data type.
-avNULL :: Lens' AttributeValue (Maybe Bool)
-avNULL = lens _avNULL (\s a -> s { _avNULL = a })
-
--- | A String data type.
-avS :: Lens' AttributeValue (Maybe Text)
-avS = lens _avS (\s a -> s { _avS = a })
-
--- | A String Set data type.
-avSS :: Lens' AttributeValue [Text]
-avSS = lens _avSS (\s a -> s { _avSS = a }) . _List
-
-instance FromJSON AttributeValue where
-    parseJSON = withObject "AttributeValue" $ \o -> AttributeValue
-        <$> o .:? "B"
-        <*> o .:? "BOOL"
-        <*> o .:? "BS" .!= mempty
-        <*> o .:? "L" .!= mempty
-        <*> o .:? "M" .!= mempty
-        <*> o .:? "N"
-        <*> o .:? "NS" .!= mempty
-        <*> o .:? "NULL"
-        <*> o .:? "S"
-        <*> o .:? "SS" .!= mempty
-
-instance ToJSON AttributeValue where
-    toJSON AttributeValue{..} = object
-        [ "S"    .= _avS
-        , "N"    .= _avN
-        , "B"    .= _avB
-        , "SS"   .= _avSS
-        , "NS"   .= _avNS
-        , "BS"   .= _avBS
-        , "M"    .= _avM
-        , "L"    .= _avL
-        , "NULL" .= _avNULL
-        , "BOOL" .= _avBOOL
-        ]
-
-data IndexStatus
-    = Active   -- ^ ACTIVE
-    | Creating -- ^ CREATING
-    | Deleting -- ^ DELETING
-    | Updating -- ^ UPDATING
-      deriving (Eq, Ord, Read, Show, Generic, Enum)
-
-instance Hashable IndexStatus
-
-instance FromText IndexStatus where
-    parser = takeLowerText >>= \case
-        "active"   -> pure Active
-        "creating" -> pure Creating
-        "deleting" -> pure Deleting
-        "updating" -> pure Updating
-        e          -> fail $
-            "Failure parsing IndexStatus from " ++ show e
-
-instance ToText IndexStatus where
-    toText = \case
-        Active   -> "ACTIVE"
-        Creating -> "CREATING"
-        Deleting -> "DELETING"
-        Updating -> "UPDATING"
-
-instance ToByteString IndexStatus
-instance ToHeader     IndexStatus
-instance ToQuery      IndexStatus
-
-instance FromJSON IndexStatus where
-    parseJSON = parseJSONText "IndexStatus"
-
-instance ToJSON IndexStatus where
-    toJSON = toJSONText
-
-data ProvisionedThroughput = ProvisionedThroughput
-    { _ptReadCapacityUnits  :: Nat
-    , _ptWriteCapacityUnits :: Nat
-    } deriving (Eq, Ord, Read, Show)
-
--- | 'ProvisionedThroughput' constructor.
---
--- The fields accessible through corresponding lenses are:
---
--- * 'ptReadCapacityUnits' @::@ 'Natural'
---
--- * 'ptWriteCapacityUnits' @::@ 'Natural'
---
-provisionedThroughput :: Natural -- ^ 'ptReadCapacityUnits'
-                      -> Natural -- ^ 'ptWriteCapacityUnits'
-                      -> ProvisionedThroughput
-provisionedThroughput p1 p2 = ProvisionedThroughput
-    { _ptReadCapacityUnits  = withIso _Nat (const id) p1
-    , _ptWriteCapacityUnits = withIso _Nat (const id) p2
-    }
-
--- | The maximum number of strongly consistent reads consumed per second before
--- DynamoDB returns a /ThrottlingException/. For more information, see <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithTables.html#ProvisionedThroughput SpecifyingRead and Write Requirements> in the /Amazon DynamoDB Developer Guide/.
-ptReadCapacityUnits :: Lens' ProvisionedThroughput Natural
-ptReadCapacityUnits =
-    lens _ptReadCapacityUnits (\s a -> s { _ptReadCapacityUnits = a })
-        . _Nat
-
--- | The maximum number of writes consumed per second before DynamoDB returns a /ThrottlingException/. For more information, see <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithTables.html#ProvisionedThroughput Specifying Read and Write Requirements> in the /Amazon DynamoDB Developer Guide/.
-ptWriteCapacityUnits :: Lens' ProvisionedThroughput Natural
-ptWriteCapacityUnits =
-    lens _ptWriteCapacityUnits (\s a -> s { _ptWriteCapacityUnits = a })
-        . _Nat
-
-instance FromJSON ProvisionedThroughput where
-    parseJSON = withObject "ProvisionedThroughput" $ \o -> ProvisionedThroughput
-        <$> o .:  "ReadCapacityUnits"
-        <*> o .:  "WriteCapacityUnits"
-
-instance ToJSON ProvisionedThroughput where
-    toJSON ProvisionedThroughput{..} = object
-        [ "ReadCapacityUnits"  .= _ptReadCapacityUnits
-        , "WriteCapacityUnits" .= _ptWriteCapacityUnits
-        ]
-
-data TableStatus
-    = TSActive   -- ^ ACTIVE
-    | TSCreating -- ^ CREATING
-    | TSDeleting -- ^ DELETING
-    | TSUpdating -- ^ UPDATING
-      deriving (Eq, Ord, Read, Show, Generic, Enum)
-
-instance Hashable TableStatus
-
-instance FromText TableStatus where
-    parser = takeLowerText >>= \case
-        "active"   -> pure TSActive
-        "creating" -> pure TSCreating
-        "deleting" -> pure TSDeleting
-        "updating" -> pure TSUpdating
-        e          -> fail $
-            "Failure parsing TableStatus from " ++ show e
-
-instance ToText TableStatus where
-    toText = \case
-        TSActive   -> "ACTIVE"
-        TSCreating -> "CREATING"
-        TSDeleting -> "DELETING"
-        TSUpdating -> "UPDATING"
-
-instance ToByteString TableStatus
-instance ToHeader     TableStatus
-instance ToQuery      TableStatus
-
-instance FromJSON TableStatus where
-    parseJSON = parseJSONText "TableStatus"
-
-instance ToJSON TableStatus where
-    toJSON = toJSONText
-
-data ProjectionType
-    = All      -- ^ ALL
-    | Include  -- ^ INCLUDE
-    | KeysOnly -- ^ KEYS_ONLY
-      deriving (Eq, Ord, Read, Show, Generic, Enum)
-
-instance Hashable ProjectionType
-
-instance FromText ProjectionType where
-    parser = takeLowerText >>= \case
-        "all"       -> pure All
-        "include"   -> pure Include
-        "keys_only" -> pure KeysOnly
-        e           -> fail $
-            "Failure parsing ProjectionType from " ++ show e
-
-instance ToText ProjectionType where
-    toText = \case
-        All      -> "ALL"
-        Include  -> "INCLUDE"
-        KeysOnly -> "KEYS_ONLY"
-
-instance ToByteString ProjectionType
-instance ToHeader     ProjectionType
-instance ToQuery      ProjectionType
-
-instance FromJSON ProjectionType where
-    parseJSON = parseJSONText "ProjectionType"
-
-instance ToJSON ProjectionType where
-    toJSON = toJSONText
-
-data TableDescription = TableDescription
-    { _tdAttributeDefinitions   :: List "AttributeDefinitions" AttributeDefinition
-    , _tdCreationDateTime       :: POSIX
-    , _tdGlobalSecondaryIndexes :: List "GlobalSecondaryIndexes" GlobalSecondaryIndexDescription
-    , _tdItemCount              :: Integer
-    , _tdKeySchema              :: List1 "KeySchema" KeySchemaElement
-    , _tdLocalSecondaryIndexes  :: List "LocalSecondaryIndexes" LocalSecondaryIndexDescription
-    , _tdProvisionedThroughput  :: ProvisionedThroughputDescription
-    , _tdTableName              :: Text
-    , _tdTableSizeBytes         :: Integer
-    , _tdTableStatus            :: TableStatus
-    } deriving (Eq, Read, Show)
-
--- | 'TableDescription' constructor.
---
--- The fields accessible through corresponding lenses are:
---
--- * 'tdAttributeDefinitions' @::@ ['AttributeDefinition']
---
--- * 'tdCreationDateTime' @::@ 'UTCTime'
---
--- * 'tdGlobalSecondaryIndexes' @::@ ['GlobalSecondaryIndexDescription']
---
--- * 'tdItemCount' @::@ 'Integer'
---
--- * 'tdKeySchema' @::@ 'NonEmpty' 'KeySchemaElement'
---
--- * 'tdLocalSecondaryIndexes' @::@ ['LocalSecondaryIndexDescription']
---
--- * 'tdProvisionedThroughput' @::@ 'ProvisionedThroughputDescription'
---
--- * 'tdTableName' @::@ 'Text'
---
--- * 'tdTableSizeBytes' @::@ 'Integer'
---
--- * 'tdTableStatus' @::@ 'TableStatus'
---
-tableDescription :: Text -- ^ 'tdTableName'
-                 -> NonEmpty KeySchemaElement -- ^ 'tdKeySchema'
-                 -> TableStatus -- ^ 'tdTableStatus'
-                 -> UTCTime -- ^ 'tdCreationDateTime'
-                 -> ProvisionedThroughputDescription -- ^ 'tdProvisionedThroughput'
-                 -> Integer -- ^ 'tdTableSizeBytes'
-                 -> Integer -- ^ 'tdItemCount'
-                 -> TableDescription
-tableDescription p1 p2 p3 p4 p5 p6 p7 = TableDescription
-    { _tdTableName              = p1
-    , _tdKeySchema              = withIso _List1 (const id) p2
-    , _tdTableStatus            = p3
-    , _tdCreationDateTime       = withIso _Time (const id) p4
-    , _tdProvisionedThroughput  = p5
-    , _tdTableSizeBytes         = p6
-    , _tdItemCount              = p7
-    , _tdAttributeDefinitions   = mempty
-    , _tdLocalSecondaryIndexes  = mempty
-    , _tdGlobalSecondaryIndexes = mempty
-    }
-
--- | 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.
---
---
-tdAttributeDefinitions :: Lens' TableDescription [AttributeDefinition]
-tdAttributeDefinitions =
-    lens _tdAttributeDefinitions (\s a -> s { _tdAttributeDefinitions = a })
-        . _List
-
--- | The date and time when the table was created, in <http://www.epochconverter.com/ UNIX epoch time> format.
-tdCreationDateTime :: Lens' TableDescription UTCTime
-tdCreationDateTime =
-    lens _tdCreationDateTime (\s a -> s { _tdCreationDateTime = a })
-        . _Time
-
--- | The global secondary indexes, if any, on the table. Each index is scoped to a
--- given hash 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.)
---
--- /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 hash key attribute 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 are 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.
---
--- /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.
-tdGlobalSecondaryIndexes :: Lens' TableDescription [GlobalSecondaryIndexDescription]
-tdGlobalSecondaryIndexes =
-    lens _tdGlobalSecondaryIndexes
-        (\s a -> s { _tdGlobalSecondaryIndexes = a })
-            . _List
-
--- | 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.
-tdItemCount :: Lens' TableDescription Integer
-tdItemCount = lens _tdItemCount (\s a -> s { _tdItemCount = a })
-
--- | The primary key structure for the table. Each /KeySchemaElement/ consists of:
---
--- /AttributeName/ - The name of the attribute.
---
--- /KeyType/ - The key type for the attribute. Can be either 'HASH' or 'RANGE'.
---
--- For more information about primary keys, see <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DataModel.html#DataModelPrimaryKey Primary Key> in the /AmazonDynamoDB Developer Guide/.
-tdKeySchema :: Lens' TableDescription (NonEmpty KeySchemaElement)
-tdKeySchema = lens _tdKeySchema (\s a -> s { _tdKeySchema = a }) . _List1
-
--- | Represents one or more local secondary indexes on the table. Each index is
--- scoped to a given hash 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 hash key attribute 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 are 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.
-tdLocalSecondaryIndexes :: Lens' TableDescription [LocalSecondaryIndexDescription]
-tdLocalSecondaryIndexes =
-    lens _tdLocalSecondaryIndexes (\s a -> s { _tdLocalSecondaryIndexes = a })
-        . _List
-
--- | The provisioned throughput settings for the table, consisting of read and
--- write capacity units, along with data about increases and decreases.
-tdProvisionedThroughput :: Lens' TableDescription ProvisionedThroughputDescription
-tdProvisionedThroughput =
-    lens _tdProvisionedThroughput (\s a -> s { _tdProvisionedThroughput = a })
-
--- | The name of the table.
-tdTableName :: Lens' TableDescription Text
-tdTableName = lens _tdTableName (\s a -> s { _tdTableName = a })
-
--- | 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.
-tdTableSizeBytes :: Lens' TableDescription Integer
-tdTableSizeBytes = lens _tdTableSizeBytes (\s a -> s { _tdTableSizeBytes = a })
-
--- | 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.
---
---
-tdTableStatus :: Lens' TableDescription TableStatus
-tdTableStatus = lens _tdTableStatus (\s a -> s { _tdTableStatus = a })
-
-instance FromJSON TableDescription where
-    parseJSON = withObject "TableDescription" $ \o -> TableDescription
-        <$> o .:? "AttributeDefinitions" .!= mempty
-        <*> o .:  "CreationDateTime"
-        <*> o .:? "GlobalSecondaryIndexes" .!= mempty
-        <*> o .:  "ItemCount"
-        <*> o .:  "KeySchema"
-        <*> o .:? "LocalSecondaryIndexes" .!= mempty
-        <*> o .:  "ProvisionedThroughput"
-        <*> o .:  "TableName"
-        <*> o .:  "TableSizeBytes"
-        <*> o .:  "TableStatus"
-
-instance ToJSON TableDescription where
-    toJSON TableDescription{..} = object
-        [ "AttributeDefinitions"   .= _tdAttributeDefinitions
-        , "TableName"              .= _tdTableName
-        , "KeySchema"              .= _tdKeySchema
-        , "TableStatus"            .= _tdTableStatus
-        , "CreationDateTime"       .= _tdCreationDateTime
-        , "ProvisionedThroughput"  .= _tdProvisionedThroughput
-        , "TableSizeBytes"         .= _tdTableSizeBytes
-        , "ItemCount"              .= _tdItemCount
-        , "LocalSecondaryIndexes"  .= _tdLocalSecondaryIndexes
-        , "GlobalSecondaryIndexes" .= _tdGlobalSecondaryIndexes
-        ]
-
-data KeysAndAttributes = KeysAndAttributes
-    { _kaaAttributesToGet          :: List1 "AttributesToGet" Text
-    , _kaaConsistentRead           :: Maybe Bool
-    , _kaaExpressionAttributeNames :: Map Text Text
-    , _kaaKeys                     :: List1 "Keys" (Map Text AttributeValue)
-    , _kaaProjectionExpression     :: Maybe Text
-    } deriving (Eq, Read, Show)
-
--- | 'KeysAndAttributes' constructor.
---
--- The fields accessible through corresponding lenses are:
---
--- * 'kaaAttributesToGet' @::@ 'NonEmpty' 'Text'
---
--- * 'kaaConsistentRead' @::@ 'Maybe' 'Bool'
---
--- * 'kaaExpressionAttributeNames' @::@ 'HashMap' 'Text' 'Text'
---
--- * 'kaaKeys' @::@ 'NonEmpty' ('HashMap' 'Text' 'AttributeValue')
---
--- * 'kaaProjectionExpression' @::@ 'Maybe' 'Text'
---
-keysAndAttributes :: NonEmpty (HashMap Text AttributeValue) -- ^ 'kaaKeys'
-                  -> NonEmpty Text -- ^ 'kaaAttributesToGet'
-                  -> KeysAndAttributes
-keysAndAttributes p1 p2 = KeysAndAttributes
-    { _kaaKeys                     = withIso _List1 (const id) p1
-    , _kaaAttributesToGet          = withIso _List1 (const id) p2
-    , _kaaConsistentRead           = Nothing
-    , _kaaProjectionExpression     = Nothing
-    , _kaaExpressionAttributeNames = mempty
-    }
-
--- | One or more attributes to retrieve from the table or index. If no attribute
--- names are specified then all attributes will be returned. If any of the
--- specified attributes are not found, they will not appear in the result.
-kaaAttributesToGet :: Lens' KeysAndAttributes (NonEmpty Text)
-kaaAttributesToGet =
-    lens _kaaAttributesToGet (\s a -> s { _kaaAttributesToGet = a })
-        . _List1
-
--- | The consistency of a read operation. If set to 'true', then a strongly
--- consistent read is used; otherwise, an eventually consistent read is used.
-kaaConsistentRead :: Lens' KeysAndAttributes (Maybe Bool)
-kaaConsistentRead =
-    lens _kaaConsistentRead (\s a -> s { _kaaConsistentRead = a })
-
--- | One or more substitution tokens for attribute names in an expression. The
--- following are some use cases for using /ExpressionAttributeNames/:
---
--- To access an attribute whose name conflicts with a DynamoDB reserved word.
---
--- To create a placeholder for repeating occurrences of an attribute name in
--- an expression.
---
--- To prevent special characters in an attribute name from being
--- misinterpreted in an expression.
---
--- Use the # character in an expression to dereference an attribute name. For
--- example, consider the following attribute name:
---
--- 'Percentile'
---
--- The name of this attribute conflicts with a reserved word, so it cannot be
--- used directly in an expression. (For the complete list of reserved words, see <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ReservedWords.html Reserved Words> in the /Amazon DynamoDB Developer Guide/). To work around this,
--- you could specify the following for /ExpressionAttributeNames/:
---
--- '{"#P":"Percentile"}'
---
--- You could then use this substitution in an expression, as in this example:
---
--- '#P = :val'
---
--- Tokens that begin with the : character are /expression attribute values/,
--- which are placeholders for the actual value at runtime.
---
--- For more information on expression attribute names, see <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ExpressionPlaceholders.html Using Placeholdersfor Attribute Names and Values> in the /Amazon DynamoDB Developer Guide/.
-kaaExpressionAttributeNames :: Lens' KeysAndAttributes (HashMap Text Text)
-kaaExpressionAttributeNames =
-    lens _kaaExpressionAttributeNames
-        (\s a -> s { _kaaExpressionAttributeNames = a })
-            . _Map
-
--- | The primary key attribute values that define the items and the attributes
--- associated with the items.
-kaaKeys :: Lens' KeysAndAttributes (NonEmpty (HashMap Text AttributeValue))
-kaaKeys = lens _kaaKeys (\s a -> s { _kaaKeys = a }) . _List1
-
--- | A string that identifies one or more attributes to retrieve from the table.
--- These attributes can include scalars, sets, or elements of a JSON document.
--- The attributes in the /ProjectionExpression/ must be separated by commas.
---
--- If no attribute names are specified, then all attributes will be returned.
--- If any of the requested attributes are not found, they will not appear in the
--- result.
---
--- For more information, see <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.AccessingItemAttributes.html Accessing Item Attributes> in the /Amazon DynamoDBDeveloper Guide/.
---
--- /ProjectionExpression/ replaces the legacy /AttributesToGet/ parameter.
---
-kaaProjectionExpression :: Lens' KeysAndAttributes (Maybe Text)
-kaaProjectionExpression =
-    lens _kaaProjectionExpression (\s a -> s { _kaaProjectionExpression = a })
-
-instance FromJSON KeysAndAttributes where
-    parseJSON = withObject "KeysAndAttributes" $ \o -> KeysAndAttributes
-        <$> o .:  "AttributesToGet"
-        <*> o .:? "ConsistentRead"
-        <*> o .:? "ExpressionAttributeNames" .!= mempty
-        <*> o .:  "Keys"
-        <*> o .:? "ProjectionExpression"
-
-instance ToJSON KeysAndAttributes where
-    toJSON KeysAndAttributes{..} = object
-        [ "Keys"                     .= _kaaKeys
-        , "AttributesToGet"          .= _kaaAttributesToGet
-        , "ConsistentRead"           .= _kaaConsistentRead
-        , "ProjectionExpression"     .= _kaaProjectionExpression
-        , "ExpressionAttributeNames" .= _kaaExpressionAttributeNames
-        ]
-
-data ReturnConsumedCapacity
-    = Indexes -- ^ INDEXES
-    | None    -- ^ NONE
-    | Total   -- ^ TOTAL
-      deriving (Eq, Ord, Read, Show, Generic, Enum)
-
-instance Hashable ReturnConsumedCapacity
-
-instance FromText ReturnConsumedCapacity where
-    parser = takeLowerText >>= \case
-        "indexes" -> pure Indexes
-        "none"    -> pure None
-        "total"   -> pure Total
-        e         -> fail $
-            "Failure parsing ReturnConsumedCapacity from " ++ show e
-
-instance ToText ReturnConsumedCapacity where
-    toText = \case
-        Indexes -> "INDEXES"
-        None    -> "NONE"
-        Total   -> "TOTAL"
-
-instance ToByteString ReturnConsumedCapacity
-instance ToHeader     ReturnConsumedCapacity
-instance ToQuery      ReturnConsumedCapacity
-
-instance FromJSON ReturnConsumedCapacity where
-    parseJSON = parseJSONText "ReturnConsumedCapacity"
-
-instance ToJSON ReturnConsumedCapacity where
-    toJSON = toJSONText
-
-data ReturnItemCollectionMetrics
-    = RICMNone -- ^ NONE
-    | RICMSize -- ^ SIZE
-      deriving (Eq, Ord, Read, Show, Generic, Enum)
-
-instance Hashable ReturnItemCollectionMetrics
-
-instance FromText ReturnItemCollectionMetrics where
-    parser = takeLowerText >>= \case
-        "none" -> pure RICMNone
-        "size" -> pure RICMSize
-        e      -> fail $
-            "Failure parsing ReturnItemCollectionMetrics from " ++ show e
-
-instance ToText ReturnItemCollectionMetrics where
-    toText = \case
-        RICMNone -> "NONE"
-        RICMSize -> "SIZE"
-
-instance ToByteString ReturnItemCollectionMetrics
-instance ToHeader     ReturnItemCollectionMetrics
-instance ToQuery      ReturnItemCollectionMetrics
-
-instance FromJSON ReturnItemCollectionMetrics where
-    parseJSON = parseJSONText "ReturnItemCollectionMetrics"
-
-instance ToJSON ReturnItemCollectionMetrics where
-    toJSON = toJSONText
-
-data AttributeValueUpdate = AttributeValueUpdate
-    { _avuAction :: Maybe AttributeAction
-    , _avuValue  :: Maybe AttributeValue
-    } deriving (Eq, Read, Show)
-
--- | 'AttributeValueUpdate' constructor.
---
--- The fields accessible through corresponding lenses are:
---
--- * 'avuAction' @::@ 'Maybe' 'AttributeAction'
---
--- * 'avuValue' @::@ 'Maybe' 'AttributeValue'
---
-attributeValueUpdate :: AttributeValueUpdate
-attributeValueUpdate = AttributeValueUpdate
-    { _avuValue  = Nothing
-    , _avuAction = Nothing
-    }
-
--- | Specifies how to perform the update. Valid values are 'PUT' (default), 'DELETE',
--- and 'ADD'. The behavior depends on whether the specified primary key already
--- exists in the table.
---
--- If an item with the specified /Key/ is found in the table:
---
--- 'PUT' - Adds the specified attribute to the item. If the attribute already
--- exists, it is replaced by the new value.
---
--- 'DELETE' - If no value is specified, the attribute and its value are removed
--- from the item. The data type of the specified value must match the existing
--- value's data type.
---
--- If a /set/ of values is specified, then those values are subtracted from the
--- old set. For example, if the attribute value was the set '[a,b,c]' and the /DELETE/ action specified '[a,c]', then the final attribute value would be '[b]'.
--- Specifying an empty set is an error.
---
--- 'ADD' - If the attribute does not already exist, then the attribute and its
--- values are added to the item. If the attribute does exist, then the behavior
--- of 'ADD' depends on the data type of the attribute:
---
--- If the existing attribute is a number, and if /Value/ is also a number, then
--- the /Value/ is mathematically added to the existing attribute. If /Value/ is a
--- negative number, then it is subtracted from the existing attribute.
---
--- If you use 'ADD' to increment or decrement a number value for an item that
--- doesn't exist before the update, DynamoDB uses 0 as the initial value.
---
--- In addition, if you use 'ADD' to update an existing item, and intend to
--- increment or decrement an attribute value which does not yet exist, DynamoDB
--- uses '0' as the initial value. For example, suppose that the item you want to
--- update does not yet have an attribute named /itemcount/, but you decide to 'ADD'
--- the number '3' to this attribute anyway, even though it currently does not
--- exist. DynamoDB will create the /itemcount/ attribute, set its initial value to '0', and finally add '3' to it. The result will be a new /itemcount/ attribute in
--- the item, with a value of '3'.
---
--- If the existing data type is a set, and if the /Value/ is also a set, then
--- the /Value/ is added to the existing set. (This is a /set/ operation, not
--- mathematical addition.) For example, if the attribute value was the set '[1,2]', and the
--- 'ADD' action specified '[3]', then the final attribute value would be '[1,2,3]'. An
--- error occurs if an Add action is specified for a set attribute and the
--- attribute type specified does not match the existing set type.
---
--- Both sets must have the same primitive data type. For example, if the
--- existing data type is a set of strings, the /Value/ must also be a set of
--- strings. The same holds true for number sets and binary sets.
---
--- This action is only valid for an existing attribute whose data type is
--- number or is a set. Do not use 'ADD' for any other data types.
---
--- If no item with the specified /Key/ is found:
---
--- 'PUT' - DynamoDB creates a new item with the specified primary key, and then
--- adds the attribute.
---
--- 'DELETE' - Nothing happens; there is no attribute to delete.
---
--- 'ADD' - DynamoDB creates an item with the supplied primary key and number
--- (or set of numbers) for the attribute value. The only data types allowed are
--- number and number set; no other data types can be specified.
---
---
-avuAction :: Lens' AttributeValueUpdate (Maybe AttributeAction)
-avuAction = lens _avuAction (\s a -> s { _avuAction = a })
-
-avuValue :: Lens' AttributeValueUpdate (Maybe AttributeValue)
-avuValue = lens _avuValue (\s a -> s { _avuValue = a })
-
-instance FromJSON AttributeValueUpdate where
-    parseJSON = withObject "AttributeValueUpdate" $ \o -> AttributeValueUpdate
-        <$> o .:? "Action"
-        <*> o .:? "Value"
-
-instance ToJSON AttributeValueUpdate where
-    toJSON AttributeValueUpdate{..} = object
-        [ "Value"  .= _avuValue
-        , "Action" .= _avuAction
-        ]
-
-data ExpectedAttributeValue = ExpectedAttributeValue
-    { _eavAttributeValueList :: List "AttributeValueList" AttributeValue
-    , _eavComparisonOperator :: Maybe ComparisonOperator
-    , _eavExists             :: Maybe Bool
-    , _eavValue              :: Maybe AttributeValue
-    } deriving (Eq, Read, Show)
-
--- | 'ExpectedAttributeValue' constructor.
---
--- The fields accessible through corresponding lenses are:
---
--- * 'eavAttributeValueList' @::@ ['AttributeValue']
---
--- * 'eavComparisonOperator' @::@ 'Maybe' 'ComparisonOperator'
---
--- * 'eavExists' @::@ 'Maybe' 'Bool'
---
--- * 'eavValue' @::@ 'Maybe' 'AttributeValue'
---
-expectedAttributeValue :: ExpectedAttributeValue
-expectedAttributeValue = ExpectedAttributeValue
-    { _eavValue              = Nothing
-    , _eavExists             = Nothing
-    , _eavComparisonOperator = Nothing
-    , _eavAttributeValueList = mempty
-    }
-
--- | One or more values to evaluate against the supplied attribute. The number of
--- values in the list depends on the /ComparisonOperator/ being used.
---
--- For type Number, value comparisons are numeric.
---
--- String value comparisons for greater than, equals, or less than are based on
--- ASCII character code values. For example, 'a' is greater than 'A', and 'a' is
--- greater than 'B'. For a list of code values, see <http://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters http://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters>.
---
--- For Binary, DynamoDB treats each byte of the binary data as unsigned when it
--- compares binary values.
---
--- For information on specifying data types in JSON, see <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DataFormat.html JSON Data Format> in
--- the /Amazon DynamoDB Developer Guide/.
-eavAttributeValueList :: Lens' ExpectedAttributeValue [AttributeValue]
-eavAttributeValueList =
-    lens _eavAttributeValueList (\s a -> s { _eavAttributeValueList = a })
-        . _List
-
--- | A comparator for evaluating attributes in the /AttributeValueList/. For
--- example, equals, greater than, less than, etc.
---
--- The following comparison operators are available:
---
--- 'EQ | NE | LE | LT | GE | GT | NOT_NULL | NULL | CONTAINS | NOT_CONTAINS |BEGINS_WITH | IN | BETWEEN'
---
--- The following are descriptions of each comparison operator.
---
--- 'EQ' : Equal. 'EQ' is supported for all datatypes, including lists and maps.
---
--- /AttributeValueList/ can contain only one /AttributeValue/ element of type
--- String, Number, Binary, String Set, Number Set, or Binary Set. If an item
--- contains an /AttributeValue/ element of a different type than the one provided
--- in the request, the value does not match. For example, '{"S":"6"}' does not
--- equal '{"N":"6"}'. Also, '{"N":"6"}' does not equal '{"NS":["6", "2", "1"]}'.
---
---
---
--- 'NE' : Not equal. 'NE' is supported for all datatypes, including lists and
--- maps.
---
--- /AttributeValueList/ can contain only one /AttributeValue/ of type String,
--- Number, Binary, String Set, Number Set, or Binary Set. If an item contains an /AttributeValue/ of a different type than the one provided in the request, the
--- value does not match. For example, '{"S":"6"}' does not equal '{"N":"6"}'. Also, '{"N":"6"}' does not equal '{"NS":["6", "2", "1"]}'.
---
---
---
--- 'LE' : Less than or equal.
---
--- /AttributeValueList/ can contain only one /AttributeValue/ element of type
--- String, Number, or Binary (not a set type). If an item contains an /AttributeValue/ element of a different type than the one provided in the request, the value
--- does not match. For example, '{"S":"6"}' does not equal '{"N":"6"}'. Also, '{"N":"6"}' does not compare to '{"NS":["6", "2", "1"]}'.
---
---
---
--- 'LT' : Less than.
---
--- /AttributeValueList/ can contain only one /AttributeValue/ of type String,
--- Number, or Binary (not a set type). If an item contains an /AttributeValue/
--- element of a different type than the one provided in the request, the value
--- does not match. For example, '{"S":"6"}' does not equal '{"N":"6"}'. Also, '{"N":"6"}' does not compare to '{"NS":["6", "2", "1"]}'.
---
---
---
--- 'GE' : Greater than or equal.
---
--- /AttributeValueList/ can contain only one /AttributeValue/ element of type
--- String, Number, or Binary (not a set type). If an item contains an /AttributeValue/ element of a different type than the one provided in the request, the value
--- does not match. For example, '{"S":"6"}' does not equal '{"N":"6"}'. Also, '{"N":"6"}' does not compare to '{"NS":["6", "2", "1"]}'.
---
---
---
--- 'GT' : Greater than.
---
--- /AttributeValueList/ can contain only one /AttributeValue/ element of type
--- String, Number, or Binary (not a set type). If an item contains an /AttributeValue/ element of a different type than the one provided in the request, the value
--- does not match. For example, '{"S":"6"}' does not equal '{"N":"6"}'. Also, '{"N":"6"}' does not compare to '{"NS":["6", "2", "1"]}'.
---
---
---
--- 'NOT_NULL' : The attribute exists. 'NOT_NULL' is supported for all datatypes,
--- including lists and maps.
---
--- This operator tests for the existence of an attribute, not its data type. If
--- the data type of attribute "'a'" is null, and you evaluate it using 'NOT_NULL',
--- the result is a Boolean /true/. This result is because the attribute "'a'"
--- exists; its data type is not relevant to the 'NOT_NULL' comparison operator.
---
--- 'NULL' : The attribute does not exist. 'NULL' is supported for all datatypes,
--- including lists and maps.
---
--- This operator tests for the nonexistence of an attribute, not its data type.
--- If the data type of attribute "'a'" is null, and you evaluate it using 'NULL',
--- the result is a Boolean /false/. This is because the attribute "'a'" exists; its
--- data type is not relevant to the 'NULL' comparison operator.
---
--- 'CONTAINS' : Checks for a subsequence, or value in a set.
---
--- /AttributeValueList/ can contain only one /AttributeValue/ element of type
--- String, Number, or Binary (not a set type). If the target attribute of the
--- comparison is of type String, then the operator checks for a substring match.
--- If the target attribute of the comparison is of type Binary, then the
--- operator looks for a subsequence of the target that matches the input. If the
--- target attribute of the comparison is a set ("'SS'", "'NS'", or "'BS'"), then the
--- operator evaluates to true if it finds an exact match with any member of the
--- set.
---
--- CONTAINS is supported for lists: When evaluating "'a CONTAINS b'", "'a'" can be
--- a list; however, "'b'" cannot be a set, a map, or a list.
---
--- 'NOT_CONTAINS' : Checks for absence of a subsequence, or absence of a value
--- in a set.
---
--- /AttributeValueList/ can contain only one /AttributeValue/ element of type
--- String, Number, or Binary (not a set type). If the target attribute of the
--- comparison is a String, then the operator checks for the absence of a
--- substring match. If the target attribute of the comparison is Binary, then
--- the operator checks for the absence of a subsequence of the target that
--- matches the input. If the target attribute of the comparison is a set ("'SS'", "'NS'", or "'BS'"), then the operator evaluates to true if it /does not/ find an
--- exact match with any member of the set.
---
--- NOT_CONTAINS is supported for lists: When evaluating "'a NOT CONTAINS b'", "'a'"
--- can be a list; however, "'b'" cannot be a set, a map, or a list.
---
--- 'BEGINS_WITH' : Checks for a prefix.
---
--- /AttributeValueList/ can contain only one /AttributeValue/ of type String or
--- Binary (not a Number or a set type). The target attribute of the comparison
--- must be of type String or Binary (not a Number or a set type).
---
---
---
--- 'IN' : Checks for matching elements within two sets.
---
--- /AttributeValueList/ can contain one or more /AttributeValue/ elements of type
--- String, Number, or Binary (not a set type). These attributes are compared
--- against an existing set type attribute of an item. If any elements of the
--- input set are present in the item attribute, the expression evaluates to true.
---
--- 'BETWEEN' : Greater than or equal to the first value, and less than or equal
--- to the second value.
---
--- /AttributeValueList/ must contain two /AttributeValue/ elements of the same
--- type, either String, Number, or Binary (not a set type). A target attribute
--- matches if the target value is greater than, or equal to, the first element
--- and less than, or equal to, the second element. If an item contains an /AttributeValue/ element of a different type than the one provided in the request, the value
--- does not match. For example, '{"S":"6"}' does not compare to '{"N":"6"}'. Also, '{"N":"6"}' does not compare to '{"NS":["6", "2", "1"]}'
---
---
-eavComparisonOperator :: Lens' ExpectedAttributeValue (Maybe ComparisonOperator)
-eavComparisonOperator =
-    lens _eavComparisonOperator (\s a -> s { _eavComparisonOperator = a })
-
--- | Causes DynamoDB to evaluate the value before attempting a conditional
--- operation:
---
--- If /Exists/ is 'true', DynamoDB will check to see if that attribute value
--- already exists in the table. If it is found, then the operation succeeds. If
--- it is not found, the operation fails with a /ConditionalCheckFailedException/.
---
--- If /Exists/ is 'false', DynamoDB assumes that the attribute value does not
--- exist in the table. If in fact the value does not exist, then the assumption
--- is valid and the operation succeeds. If the value is found, despite the
--- assumption that it does not exist, the operation fails with a /ConditionalCheckFailedException/.
---
--- The default setting for /Exists/ is 'true'. If you supply a /Value/ all by
--- itself, DynamoDB assumes the attribute exists: You don't have to set /Exists/
--- to 'true', because it is implied.
---
--- DynamoDB returns a /ValidationException/ if:
---
--- /Exists/ is 'true' but there is no /Value/ to check. (You expect a value to
--- exist, but don't specify what that value is.)
---
--- /Exists/ is 'false' but you also provide a /Value/. (You cannot expect an
--- attribute to have a value, while also expecting it not to exist.)
---
---
-eavExists :: Lens' ExpectedAttributeValue (Maybe Bool)
-eavExists = lens _eavExists (\s a -> s { _eavExists = a })
-
-eavValue :: Lens' ExpectedAttributeValue (Maybe AttributeValue)
-eavValue = lens _eavValue (\s a -> s { _eavValue = a })
-
-instance FromJSON ExpectedAttributeValue where
-    parseJSON = withObject "ExpectedAttributeValue" $ \o -> ExpectedAttributeValue
-        <$> o .:? "AttributeValueList" .!= mempty
-        <*> o .:? "ComparisonOperator"
-        <*> o .:? "Exists"
-        <*> o .:? "Value"
-
-instance ToJSON ExpectedAttributeValue where
-    toJSON ExpectedAttributeValue{..} = object
-        [ "Value"              .= _eavValue
-        , "Exists"             .= _eavExists
-        , "ComparisonOperator" .= _eavComparisonOperator
-        , "AttributeValueList" .= _eavAttributeValueList
-        ]
-
-data AttributeDefinition = AttributeDefinition
-    { _adAttributeName :: Text
-    , _adAttributeType :: ScalarAttributeType
-    } deriving (Eq, Read, Show)
-
--- | 'AttributeDefinition' constructor.
---
--- The fields accessible through corresponding lenses are:
---
--- * 'adAttributeName' @::@ 'Text'
---
--- * 'adAttributeType' @::@ 'ScalarAttributeType'
---
-attributeDefinition :: Text -- ^ 'adAttributeName'
-                    -> ScalarAttributeType -- ^ 'adAttributeType'
-                    -> AttributeDefinition
-attributeDefinition p1 p2 = AttributeDefinition
-    { _adAttributeName = p1
-    , _adAttributeType = p2
-    }
-
--- | A name for the attribute.
-adAttributeName :: Lens' AttributeDefinition Text
-adAttributeName = lens _adAttributeName (\s a -> s { _adAttributeName = a })
-
--- | The data type for the attribute.
-adAttributeType :: Lens' AttributeDefinition ScalarAttributeType
-adAttributeType = lens _adAttributeType (\s a -> s { _adAttributeType = a })
-
-instance FromJSON AttributeDefinition where
-    parseJSON = withObject "AttributeDefinition" $ \o -> AttributeDefinition
-        <$> o .:  "AttributeName"
-        <*> o .:  "AttributeType"
-
-instance ToJSON AttributeDefinition where
-    toJSON AttributeDefinition{..} = object
-        [ "AttributeName" .= _adAttributeName
-        , "AttributeType" .= _adAttributeType
-        ]
-
-data ComparisonOperator
-    = BeginsWith  -- ^ BEGINS_WITH
-    | Between     -- ^ BETWEEN
-    | Contains    -- ^ CONTAINS
-    | Eq          -- ^ EQ
-    | Ge          -- ^ GE
-    | Gt          -- ^ GT
-    | In'         -- ^ IN
-    | Le          -- ^ LE
-    | Lt          -- ^ LT
-    | Ne          -- ^ NE
-    | NotContains -- ^ NOT_CONTAINS
-    | NotNull     -- ^ NOT_NULL
-    | Null        -- ^ NULL
-      deriving (Eq, Ord, Read, Show, Generic, Enum)
-
-instance Hashable ComparisonOperator
-
-instance FromText ComparisonOperator where
-    parser = takeLowerText >>= \case
-        "begins_with"  -> pure BeginsWith
-        "between"      -> pure Between
-        "contains"     -> pure Contains
-        "eq"           -> pure Eq
-        "ge"           -> pure Ge
-        "gt"           -> pure Gt
-        "in"           -> pure In'
-        "le"           -> pure Le
-        "lt"           -> pure Lt
-        "ne"           -> pure Ne
-        "not_contains" -> pure NotContains
-        "not_null"     -> pure NotNull
-        "null"         -> pure Null
-        e              -> fail $
-            "Failure parsing ComparisonOperator from " ++ show e
-
-instance ToText ComparisonOperator where
-    toText = \case
-        BeginsWith  -> "BEGINS_WITH"
-        Between     -> "BETWEEN"
-        Contains    -> "CONTAINS"
-        Eq          -> "EQ"
-        Ge          -> "GE"
-        Gt          -> "GT"
-        In'         -> "IN"
-        Le          -> "LE"
-        Lt          -> "LT"
-        Ne          -> "NE"
-        NotContains -> "NOT_CONTAINS"
-        NotNull     -> "NOT_NULL"
-        Null        -> "NULL"
-
-instance ToByteString ComparisonOperator
-instance ToHeader     ComparisonOperator
-instance ToQuery      ComparisonOperator
-
-instance FromJSON ComparisonOperator where
-    parseJSON = parseJSONText "ComparisonOperator"
-
-instance ToJSON ComparisonOperator where
-    toJSON = toJSONText
-
-data ReturnValue
-    = RVAllNew     -- ^ ALL_NEW
-    | RVAllOld     -- ^ ALL_OLD
-    | RVNone       -- ^ NONE
-    | RVUpdatedNew -- ^ UPDATED_NEW
-    | RVUpdatedOld -- ^ UPDATED_OLD
-      deriving (Eq, Ord, Read, Show, Generic, Enum)
-
-instance Hashable ReturnValue
-
-instance FromText ReturnValue where
-    parser = takeLowerText >>= \case
-        "all_new"     -> pure RVAllNew
-        "all_old"     -> pure RVAllOld
-        "none"        -> pure RVNone
-        "updated_new" -> pure RVUpdatedNew
-        "updated_old" -> pure RVUpdatedOld
-        e             -> fail $
-            "Failure parsing ReturnValue from " ++ show e
-
-instance ToText ReturnValue where
-    toText = \case
-        RVAllNew     -> "ALL_NEW"
-        RVAllOld     -> "ALL_OLD"
-        RVNone       -> "NONE"
-        RVUpdatedNew -> "UPDATED_NEW"
-        RVUpdatedOld -> "UPDATED_OLD"
-
-instance ToByteString ReturnValue
-instance ToHeader     ReturnValue
-instance ToQuery      ReturnValue
-
-instance FromJSON ReturnValue where
-    parseJSON = parseJSONText "ReturnValue"
-
-instance ToJSON ReturnValue where
-    toJSON = toJSONText
-
-data LocalSecondaryIndex = LocalSecondaryIndex
-    { _lsiIndexName  :: Text
-    , _lsiKeySchema  :: List1 "KeySchema" KeySchemaElement
-    , _lsiProjection :: Projection
-    } deriving (Eq, Read, Show)
-
--- | 'LocalSecondaryIndex' constructor.
---
--- The fields accessible through corresponding lenses are:
---
--- * 'lsiIndexName' @::@ 'Text'
---
--- * 'lsiKeySchema' @::@ 'NonEmpty' 'KeySchemaElement'
---
--- * 'lsiProjection' @::@ 'Projection'
---
-localSecondaryIndex :: Text -- ^ 'lsiIndexName'
-                    -> NonEmpty KeySchemaElement -- ^ 'lsiKeySchema'
-                    -> Projection -- ^ 'lsiProjection'
-                    -> LocalSecondaryIndex
-localSecondaryIndex p1 p2 p3 = LocalSecondaryIndex
-    { _lsiIndexName  = p1
-    , _lsiKeySchema  = withIso _List1 (const id) p2
-    , _lsiProjection = p3
-    }
-
--- | The name of the local secondary index. The name must be unique among all
--- other indexes on this table.
-lsiIndexName :: Lens' LocalSecondaryIndex Text
-lsiIndexName = lens _lsiIndexName (\s a -> s { _lsiIndexName = a })
-
--- | The complete key schema for the local secondary index, consisting of one or
--- more pairs of attribute names and key types ('HASH' or 'RANGE').
-lsiKeySchema :: Lens' LocalSecondaryIndex (NonEmpty KeySchemaElement)
-lsiKeySchema = lens _lsiKeySchema (\s a -> s { _lsiKeySchema = a }) . _List1
-
-lsiProjection :: Lens' LocalSecondaryIndex Projection
-lsiProjection = lens _lsiProjection (\s a -> s { _lsiProjection = a })
-
-instance FromJSON LocalSecondaryIndex where
-    parseJSON = withObject "LocalSecondaryIndex" $ \o -> LocalSecondaryIndex
-        <$> o .:  "IndexName"
-        <*> o .:  "KeySchema"
-        <*> o .:  "Projection"
-
-instance ToJSON LocalSecondaryIndex where
-    toJSON LocalSecondaryIndex{..} = object
-        [ "IndexName"  .= _lsiIndexName
-        , "KeySchema"  .= _lsiKeySchema
-        , "Projection" .= _lsiProjection
-        ]
-
-data GlobalSecondaryIndexDescription = GlobalSecondaryIndexDescription
-    { _gsidBackfilling           :: Maybe Bool
-    , _gsidIndexName             :: Maybe Text
-    , _gsidIndexSizeBytes        :: Maybe Integer
-    , _gsidIndexStatus           :: Maybe IndexStatus
-    , _gsidItemCount             :: Maybe Integer
-    , _gsidKeySchema             :: List1 "KeySchema" KeySchemaElement
-    , _gsidProjection            :: Maybe Projection
-    , _gsidProvisionedThroughput :: Maybe ProvisionedThroughputDescription
-    } deriving (Eq, Read, Show)
-
--- | 'GlobalSecondaryIndexDescription' constructor.
---
--- The fields accessible through corresponding lenses are:
---
--- * 'gsidBackfilling' @::@ 'Maybe' 'Bool'
---
--- * 'gsidIndexName' @::@ 'Maybe' 'Text'
---
--- * 'gsidIndexSizeBytes' @::@ 'Maybe' 'Integer'
---
--- * 'gsidIndexStatus' @::@ 'Maybe' 'IndexStatus'
---
--- * 'gsidItemCount' @::@ 'Maybe' 'Integer'
---
--- * 'gsidKeySchema' @::@ 'NonEmpty' 'KeySchemaElement'
---
--- * 'gsidProjection' @::@ 'Maybe' 'Projection'
---
--- * 'gsidProvisionedThroughput' @::@ 'Maybe' 'ProvisionedThroughputDescription'
---
-globalSecondaryIndexDescription :: NonEmpty KeySchemaElement -- ^ 'gsidKeySchema'
-                                -> GlobalSecondaryIndexDescription
-globalSecondaryIndexDescription p1 = GlobalSecondaryIndexDescription
-    { _gsidKeySchema             = withIso _List1 (const id) p1
-    , _gsidIndexName             = Nothing
-    , _gsidProjection            = Nothing
-    , _gsidIndexStatus           = Nothing
-    , _gsidBackfilling           = Nothing
-    , _gsidProvisionedThroughput = Nothing
-    , _gsidIndexSizeBytes        = Nothing
-    , _gsidItemCount             = Nothing
-    }
-
--- | Indicates whether the index is currently backfilling. /Backfilling/ is the
--- process of reading items from the table and determining whether they can be
--- added to the index. (Not all items will qualify: For example, a hash key
--- attribute cannot have any duplicates.) If an item can be added to the index,
--- DynamoDB will do so. After all items have been processed, the backfilling
--- operation is complete and /Backfilling/ is false.
---
--- For indexes that were created during a /CreateTable/ operation, the /Backfilling/
--- attribute does not appear in the /DescribeTable/ output.
---
-gsidBackfilling :: Lens' GlobalSecondaryIndexDescription (Maybe Bool)
-gsidBackfilling = lens _gsidBackfilling (\s a -> s { _gsidBackfilling = a })
-
--- | The name of the global secondary index.
-gsidIndexName :: Lens' GlobalSecondaryIndexDescription (Maybe Text)
-gsidIndexName = lens _gsidIndexName (\s a -> s { _gsidIndexName = a })
-
--- | The total size of the specified index, in bytes. DynamoDB updates this value
--- approximately every six hours. Recent changes might not be reflected in this
--- value.
-gsidIndexSizeBytes :: Lens' GlobalSecondaryIndexDescription (Maybe Integer)
-gsidIndexSizeBytes =
-    lens _gsidIndexSizeBytes (\s a -> s { _gsidIndexSizeBytes = a })
-
--- | The current state 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.
---
---
-gsidIndexStatus :: Lens' GlobalSecondaryIndexDescription (Maybe IndexStatus)
-gsidIndexStatus = lens _gsidIndexStatus (\s a -> s { _gsidIndexStatus = a })
-
--- | The number of items in the specified index. DynamoDB updates this value
--- approximately every six hours. Recent changes might not be reflected in this
--- value.
-gsidItemCount :: Lens' GlobalSecondaryIndexDescription (Maybe Integer)
-gsidItemCount = lens _gsidItemCount (\s a -> s { _gsidItemCount = a })
-
--- | The complete key schema for the global secondary index, consisting of one or
--- more pairs of attribute names and key types ('HASH' or 'RANGE').
-gsidKeySchema :: Lens' GlobalSecondaryIndexDescription (NonEmpty KeySchemaElement)
-gsidKeySchema = lens _gsidKeySchema (\s a -> s { _gsidKeySchema = a }) . _List1
-
-gsidProjection :: Lens' GlobalSecondaryIndexDescription (Maybe Projection)
-gsidProjection = lens _gsidProjection (\s a -> s { _gsidProjection = a })
-
-gsidProvisionedThroughput :: Lens' GlobalSecondaryIndexDescription (Maybe ProvisionedThroughputDescription)
-gsidProvisionedThroughput =
-    lens _gsidProvisionedThroughput
-        (\s a -> s { _gsidProvisionedThroughput = a })
-
-instance FromJSON GlobalSecondaryIndexDescription where
-    parseJSON = withObject "GlobalSecondaryIndexDescription" $ \o -> GlobalSecondaryIndexDescription
-        <$> o .:? "Backfilling"
-        <*> o .:? "IndexName"
-        <*> o .:? "IndexSizeBytes"
-        <*> o .:? "IndexStatus"
-        <*> o .:? "ItemCount"
-        <*> o .:  "KeySchema"
-        <*> o .:? "Projection"
-        <*> o .:? "ProvisionedThroughput"
-
-instance ToJSON GlobalSecondaryIndexDescription where
-    toJSON GlobalSecondaryIndexDescription{..} = object
-        [ "IndexName"             .= _gsidIndexName
-        , "KeySchema"             .= _gsidKeySchema
-        , "Projection"            .= _gsidProjection
-        , "IndexStatus"           .= _gsidIndexStatus
-        , "Backfilling"           .= _gsidBackfilling
-        , "ProvisionedThroughput" .= _gsidProvisionedThroughput
-        , "IndexSizeBytes"        .= _gsidIndexSizeBytes
-        , "ItemCount"             .= _gsidItemCount
-        ]
-
-data ItemCollectionMetrics = ItemCollectionMetrics
-    { _icmItemCollectionKey   :: Map Text AttributeValue
-    , _icmSizeEstimateRangeGB :: List "SizeEstimateRangeGB" Double
-    } deriving (Eq, Read, Show)
-
--- | 'ItemCollectionMetrics' constructor.
---
--- The fields accessible through corresponding lenses are:
---
--- * 'icmItemCollectionKey' @::@ 'HashMap' 'Text' 'AttributeValue'
---
--- * 'icmSizeEstimateRangeGB' @::@ ['Double']
---
-itemCollectionMetrics :: ItemCollectionMetrics
-itemCollectionMetrics = ItemCollectionMetrics
-    { _icmItemCollectionKey   = mempty
-    , _icmSizeEstimateRangeGB = mempty
-    }
-
--- | The hash key value of the item collection. This value is the same as the hash
--- key of the item.
-icmItemCollectionKey :: Lens' ItemCollectionMetrics (HashMap Text AttributeValue)
-icmItemCollectionKey =
-    lens _icmItemCollectionKey (\s a -> s { _icmItemCollectionKey = a })
-        . _Map
-
--- | An estimate of item collection size, in gigabytes. This value is a
--- two-element array containing a lower bound and an upper bound for the
--- estimate. The estimate includes the size of all the items in the table, plus
--- the size of all attributes projected into all of the local secondary indexes
--- on that table. Use this estimate to measure whether a local secondary index
--- is approaching its size limit.
---
--- The estimate is subject to change over time; therefore, do not rely on the
--- precision or accuracy of the estimate.
-icmSizeEstimateRangeGB :: Lens' ItemCollectionMetrics [Double]
-icmSizeEstimateRangeGB =
-    lens _icmSizeEstimateRangeGB (\s a -> s { _icmSizeEstimateRangeGB = a })
-        . _List
-
-instance FromJSON ItemCollectionMetrics where
-    parseJSON = withObject "ItemCollectionMetrics" $ \o -> ItemCollectionMetrics
-        <$> o .:? "ItemCollectionKey" .!= mempty
-        <*> o .:? "SizeEstimateRangeGB" .!= mempty
-
-instance ToJSON ItemCollectionMetrics where
-    toJSON ItemCollectionMetrics{..} = object
-        [ "ItemCollectionKey"   .= _icmItemCollectionKey
-        , "SizeEstimateRangeGB" .= _icmSizeEstimateRangeGB
-        ]
-
-newtype Capacity = Capacity
-    { _cCapacityUnits :: Maybe Double
-    } deriving (Eq, Ord, Read, Show)
-
--- | 'Capacity' constructor.
---
--- The fields accessible through corresponding lenses are:
---
--- * 'cCapacityUnits' @::@ 'Maybe' 'Double'
---
-capacity :: Capacity
-capacity = Capacity
-    { _cCapacityUnits = Nothing
-    }
-
--- | The total number of capacity units consumed on a table or an index.
-cCapacityUnits :: Lens' Capacity (Maybe Double)
-cCapacityUnits = lens _cCapacityUnits (\s a -> s { _cCapacityUnits = a })
-
-instance FromJSON Capacity where
-    parseJSON = withObject "Capacity" $ \o -> Capacity
-        <$> o .:? "CapacityUnits"
-
-instance ToJSON Capacity where
-    toJSON Capacity{..} = object
-        [ "CapacityUnits" .= _cCapacityUnits
-        ]
-
-data ConsumedCapacity = ConsumedCapacity
-    { _ccCapacityUnits          :: Maybe Double
-    , _ccGlobalSecondaryIndexes :: Map Text Capacity
-    , _ccLocalSecondaryIndexes  :: Map Text Capacity
-    , _ccTable                  :: Maybe Capacity
-    , _ccTableName              :: Maybe Text
-    } deriving (Eq, Read, Show)
-
--- | 'ConsumedCapacity' constructor.
---
--- The fields accessible through corresponding lenses are:
---
--- * 'ccCapacityUnits' @::@ 'Maybe' 'Double'
---
--- * 'ccGlobalSecondaryIndexes' @::@ 'HashMap' 'Text' 'Capacity'
---
--- * 'ccLocalSecondaryIndexes' @::@ 'HashMap' 'Text' 'Capacity'
---
--- * 'ccTable' @::@ 'Maybe' 'Capacity'
---
--- * 'ccTableName' @::@ 'Maybe' 'Text'
---
-consumedCapacity :: ConsumedCapacity
-consumedCapacity = ConsumedCapacity
-    { _ccTableName              = Nothing
-    , _ccCapacityUnits          = Nothing
-    , _ccTable                  = Nothing
-    , _ccLocalSecondaryIndexes  = mempty
-    , _ccGlobalSecondaryIndexes = mempty
-    }
-
--- | The total number of capacity units consumed by the operation.
-ccCapacityUnits :: Lens' ConsumedCapacity (Maybe Double)
-ccCapacityUnits = lens _ccCapacityUnits (\s a -> s { _ccCapacityUnits = a })
-
--- | The amount of throughput consumed on each global index affected by the
--- operation.
-ccGlobalSecondaryIndexes :: Lens' ConsumedCapacity (HashMap Text Capacity)
-ccGlobalSecondaryIndexes =
-    lens _ccGlobalSecondaryIndexes
-        (\s a -> s { _ccGlobalSecondaryIndexes = a })
-            . _Map
-
--- | The amount of throughput consumed on each local index affected by the
--- operation.
-ccLocalSecondaryIndexes :: Lens' ConsumedCapacity (HashMap Text Capacity)
-ccLocalSecondaryIndexes =
-    lens _ccLocalSecondaryIndexes (\s a -> s { _ccLocalSecondaryIndexes = a })
-        . _Map
-
--- | The amount of throughput consumed on the table affected by the operation.
-ccTable :: Lens' ConsumedCapacity (Maybe Capacity)
-ccTable = lens _ccTable (\s a -> s { _ccTable = a })
-
--- | The name of the table that was affected by the operation.
-ccTableName :: Lens' ConsumedCapacity (Maybe Text)
-ccTableName = lens _ccTableName (\s a -> s { _ccTableName = a })
-
-instance FromJSON ConsumedCapacity where
-    parseJSON = withObject "ConsumedCapacity" $ \o -> ConsumedCapacity
-        <$> o .:? "CapacityUnits"
-        <*> o .:? "GlobalSecondaryIndexes" .!= mempty
-        <*> o .:? "LocalSecondaryIndexes" .!= mempty
-        <*> o .:? "Table"
-        <*> o .:? "TableName"
-
-instance ToJSON ConsumedCapacity where
-    toJSON ConsumedCapacity{..} = object
-        [ "TableName"              .= _ccTableName
-        , "CapacityUnits"          .= _ccCapacityUnits
-        , "Table"                  .= _ccTable
-        , "LocalSecondaryIndexes"  .= _ccLocalSecondaryIndexes
-        , "GlobalSecondaryIndexes" .= _ccGlobalSecondaryIndexes
-        ]
-
-data GlobalSecondaryIndex = GlobalSecondaryIndex
-    { _gsiIndexName             :: Text
-    , _gsiKeySchema             :: List1 "KeySchema" KeySchemaElement
-    , _gsiProjection            :: Projection
-    , _gsiProvisionedThroughput :: ProvisionedThroughput
-    } deriving (Eq, Read, Show)
-
--- | 'GlobalSecondaryIndex' constructor.
---
--- The fields accessible through corresponding lenses are:
---
--- * 'gsiIndexName' @::@ 'Text'
---
--- * 'gsiKeySchema' @::@ 'NonEmpty' 'KeySchemaElement'
---
--- * 'gsiProjection' @::@ 'Projection'
---
--- * 'gsiProvisionedThroughput' @::@ 'ProvisionedThroughput'
---
-globalSecondaryIndex :: Text -- ^ 'gsiIndexName'
-                     -> NonEmpty KeySchemaElement -- ^ 'gsiKeySchema'
-                     -> Projection -- ^ 'gsiProjection'
-                     -> ProvisionedThroughput -- ^ 'gsiProvisionedThroughput'
-                     -> GlobalSecondaryIndex
-globalSecondaryIndex p1 p2 p3 p4 = GlobalSecondaryIndex
-    { _gsiIndexName             = p1
-    , _gsiKeySchema             = withIso _List1 (const id) p2
-    , _gsiProjection            = p3
-    , _gsiProvisionedThroughput = p4
-    }
-
--- | The name of the global secondary index. The name must be unique among all
--- other indexes on this table.
-gsiIndexName :: Lens' GlobalSecondaryIndex Text
-gsiIndexName = lens _gsiIndexName (\s a -> s { _gsiIndexName = a })
-
--- | The complete key schema for a global secondary index, which consists of one
--- or more pairs of attribute names and key types ('HASH' or 'RANGE').
-gsiKeySchema :: Lens' GlobalSecondaryIndex (NonEmpty KeySchemaElement)
-gsiKeySchema = lens _gsiKeySchema (\s a -> s { _gsiKeySchema = a }) . _List1
-
-gsiProjection :: Lens' GlobalSecondaryIndex Projection
-gsiProjection = lens _gsiProjection (\s a -> s { _gsiProjection = a })
-
-gsiProvisionedThroughput :: Lens' GlobalSecondaryIndex ProvisionedThroughput
-gsiProvisionedThroughput =
-    lens _gsiProvisionedThroughput
-        (\s a -> s { _gsiProvisionedThroughput = a })
-
-instance FromJSON GlobalSecondaryIndex where
-    parseJSON = withObject "GlobalSecondaryIndex" $ \o -> GlobalSecondaryIndex
-        <$> o .:  "IndexName"
-        <*> o .:  "KeySchema"
-        <*> o .:  "Projection"
-        <*> o .:  "ProvisionedThroughput"
-
-instance ToJSON GlobalSecondaryIndex where
-    toJSON GlobalSecondaryIndex{..} = object
-        [ "IndexName"             .= _gsiIndexName
-        , "KeySchema"             .= _gsiKeySchema
-        , "Projection"            .= _gsiProjection
-        , "ProvisionedThroughput" .= _gsiProvisionedThroughput
-        ]
-
-data LocalSecondaryIndexDescription = LocalSecondaryIndexDescription
-    { _lsidIndexName      :: Maybe Text
-    , _lsidIndexSizeBytes :: Maybe Integer
-    , _lsidItemCount      :: Maybe Integer
-    , _lsidKeySchema      :: List1 "KeySchema" KeySchemaElement
-    , _lsidProjection     :: Maybe Projection
-    } deriving (Eq, Read, Show)
-
--- | 'LocalSecondaryIndexDescription' constructor.
---
--- The fields accessible through corresponding lenses are:
---
--- * 'lsidIndexName' @::@ 'Maybe' 'Text'
---
--- * 'lsidIndexSizeBytes' @::@ 'Maybe' 'Integer'
---
--- * 'lsidItemCount' @::@ 'Maybe' 'Integer'
---
--- * 'lsidKeySchema' @::@ 'NonEmpty' 'KeySchemaElement'
---
--- * 'lsidProjection' @::@ 'Maybe' 'Projection'
---
-localSecondaryIndexDescription :: NonEmpty KeySchemaElement -- ^ 'lsidKeySchema'
-                               -> LocalSecondaryIndexDescription
-localSecondaryIndexDescription p1 = LocalSecondaryIndexDescription
-    { _lsidKeySchema      = withIso _List1 (const id) p1
-    , _lsidIndexName      = Nothing
-    , _lsidProjection     = Nothing
-    , _lsidIndexSizeBytes = Nothing
-    , _lsidItemCount      = Nothing
-    }
-
--- | Represents the name of the local secondary index.
-lsidIndexName :: Lens' LocalSecondaryIndexDescription (Maybe Text)
-lsidIndexName = lens _lsidIndexName (\s a -> s { _lsidIndexName = a })
-
--- | The total size of the specified index, in bytes. DynamoDB updates this value
--- approximately every six hours. Recent changes might not be reflected in this
--- value.
-lsidIndexSizeBytes :: Lens' LocalSecondaryIndexDescription (Maybe Integer)
-lsidIndexSizeBytes =
-    lens _lsidIndexSizeBytes (\s a -> s { _lsidIndexSizeBytes = a })
-
--- | The number of items in the specified index. DynamoDB updates this value
--- approximately every six hours. Recent changes might not be reflected in this
--- value.
-lsidItemCount :: Lens' LocalSecondaryIndexDescription (Maybe Integer)
-lsidItemCount = lens _lsidItemCount (\s a -> s { _lsidItemCount = a })
-
--- | The complete index key schema, which consists of one or more pairs of
--- attribute names and key types ('HASH' or 'RANGE').
-lsidKeySchema :: Lens' LocalSecondaryIndexDescription (NonEmpty KeySchemaElement)
-lsidKeySchema = lens _lsidKeySchema (\s a -> s { _lsidKeySchema = a }) . _List1
-
-lsidProjection :: Lens' LocalSecondaryIndexDescription (Maybe Projection)
-lsidProjection = lens _lsidProjection (\s a -> s { _lsidProjection = a })
-
-instance FromJSON LocalSecondaryIndexDescription where
-    parseJSON = withObject "LocalSecondaryIndexDescription" $ \o -> LocalSecondaryIndexDescription
-        <$> o .:? "IndexName"
-        <*> o .:? "IndexSizeBytes"
-        <*> o .:? "ItemCount"
-        <*> o .:  "KeySchema"
-        <*> o .:? "Projection"
-
-instance ToJSON LocalSecondaryIndexDescription where
-    toJSON LocalSecondaryIndexDescription{..} = object
-        [ "IndexName"      .= _lsidIndexName
-        , "KeySchema"      .= _lsidKeySchema
-        , "Projection"     .= _lsidProjection
-        , "IndexSizeBytes" .= _lsidIndexSizeBytes
-        , "ItemCount"      .= _lsidItemCount
-        ]
-
-data AttributeAction
-    = Add     -- ^ ADD
-    | Delete' -- ^ DELETE
-    | Put     -- ^ PUT
-      deriving (Eq, Ord, Read, Show, Generic, Enum)
-
-instance Hashable AttributeAction
-
-instance FromText AttributeAction where
-    parser = takeLowerText >>= \case
-        "add"    -> pure Add
-        "delete" -> pure Delete'
-        "put"    -> pure Put
-        e        -> fail $
-            "Failure parsing AttributeAction from " ++ show e
-
-instance ToText AttributeAction where
-    toText = \case
-        Add     -> "ADD"
-        Delete' -> "DELETE"
-        Put     -> "PUT"
-
-instance ToByteString AttributeAction
-instance ToHeader     AttributeAction
-instance ToQuery      AttributeAction
-
-instance FromJSON AttributeAction where
-    parseJSON = parseJSONText "AttributeAction"
-
-instance ToJSON AttributeAction where
-    toJSON = toJSONText
-
-data ScalarAttributeType
-    = B -- ^ B
-    | N -- ^ N
-    | S -- ^ S
-      deriving (Eq, Ord, Read, Show, Generic, Enum)
-
-instance Hashable ScalarAttributeType
-
-instance FromText ScalarAttributeType where
-    parser = takeLowerText >>= \case
-        "b" -> pure B
-        "n" -> pure N
-        "s" -> pure S
-        e   -> fail $
-            "Failure parsing ScalarAttributeType from " ++ show e
-
-instance ToText ScalarAttributeType where
-    toText = \case
-        B -> "B"
-        N -> "N"
-        S -> "S"
-
-instance ToByteString ScalarAttributeType
-instance ToHeader     ScalarAttributeType
-instance ToQuery      ScalarAttributeType
-
-instance FromJSON ScalarAttributeType where
-    parseJSON = parseJSONText "ScalarAttributeType"
-
-instance ToJSON ScalarAttributeType where
-    toJSON = toJSONText
-
-data Projection = Projection
-    { _pNonKeyAttributes :: List1 "NonKeyAttributes" Text
-    , _pProjectionType   :: Maybe ProjectionType
-    } deriving (Eq, Read, Show)
-
--- | 'Projection' constructor.
---
--- The fields accessible through corresponding lenses are:
---
--- * 'pNonKeyAttributes' @::@ 'NonEmpty' 'Text'
---
--- * 'pProjectionType' @::@ 'Maybe' 'ProjectionType'
---
-projection :: NonEmpty Text -- ^ 'pNonKeyAttributes'
-           -> Projection
-projection p1 = Projection
-    { _pNonKeyAttributes = withIso _List1 (const id) p1
-    , _pProjectionType   = Nothing
-    }
-
--- | Represents the non-key attribute names which will be projected into the index.
---
--- For local secondary indexes, the total count of /NonKeyAttributes/ summed
--- across all of the local 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.
-pNonKeyAttributes :: Lens' Projection (NonEmpty Text)
-pNonKeyAttributes =
-    lens _pNonKeyAttributes (\s a -> s { _pNonKeyAttributes = a })
-        . _List1
-
--- | The set of attributes that are projected into the index:
---
--- '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 are in /NonKeyAttributes/.
---
--- 'ALL' - All of the table attributes are projected into the index.
---
---
-pProjectionType :: Lens' Projection (Maybe ProjectionType)
-pProjectionType = lens _pProjectionType (\s a -> s { _pProjectionType = a })
-
-instance FromJSON Projection where
-    parseJSON = withObject "Projection" $ \o -> Projection
-        <$> o .:  "NonKeyAttributes"
-        <*> o .:? "ProjectionType"
-
-instance ToJSON Projection where
-    toJSON Projection{..} = object
-        [ "ProjectionType"   .= _pProjectionType
-        , "NonKeyAttributes" .= _pNonKeyAttributes
-        ]
-
-data CreateGlobalSecondaryIndexAction = CreateGlobalSecondaryIndexAction
-    { _cgsiaIndexName             :: Text
-    , _cgsiaKeySchema             :: List1 "KeySchema" KeySchemaElement
-    , _cgsiaProjection            :: Projection
-    , _cgsiaProvisionedThroughput :: ProvisionedThroughput
-    } deriving (Eq, Read, Show)
-
--- | 'CreateGlobalSecondaryIndexAction' constructor.
---
--- The fields accessible through corresponding lenses are:
---
--- * 'cgsiaIndexName' @::@ 'Text'
---
--- * 'cgsiaKeySchema' @::@ 'NonEmpty' 'KeySchemaElement'
---
--- * 'cgsiaProjection' @::@ 'Projection'
---
--- * 'cgsiaProvisionedThroughput' @::@ 'ProvisionedThroughput'
---
-createGlobalSecondaryIndexAction :: Text -- ^ 'cgsiaIndexName'
-                                 -> NonEmpty KeySchemaElement -- ^ 'cgsiaKeySchema'
-                                 -> Projection -- ^ 'cgsiaProjection'
-                                 -> ProvisionedThroughput -- ^ 'cgsiaProvisionedThroughput'
-                                 -> CreateGlobalSecondaryIndexAction
-createGlobalSecondaryIndexAction p1 p2 p3 p4 = CreateGlobalSecondaryIndexAction
-    { _cgsiaIndexName             = p1
-    , _cgsiaKeySchema             = withIso _List1 (const id) p2
-    , _cgsiaProjection            = p3
-    , _cgsiaProvisionedThroughput = p4
-    }
-
--- | The name of the global secondary index to be created.
-cgsiaIndexName :: Lens' CreateGlobalSecondaryIndexAction Text
-cgsiaIndexName = lens _cgsiaIndexName (\s a -> s { _cgsiaIndexName = a })
-
--- | The key schema for the global secondary index.
-cgsiaKeySchema :: Lens' CreateGlobalSecondaryIndexAction (NonEmpty KeySchemaElement)
-cgsiaKeySchema = lens _cgsiaKeySchema (\s a -> s { _cgsiaKeySchema = a }) . _List1
-
-cgsiaProjection :: Lens' CreateGlobalSecondaryIndexAction Projection
-cgsiaProjection = lens _cgsiaProjection (\s a -> s { _cgsiaProjection = a })
-
-cgsiaProvisionedThroughput :: Lens' CreateGlobalSecondaryIndexAction ProvisionedThroughput
-cgsiaProvisionedThroughput =
-    lens _cgsiaProvisionedThroughput
-        (\s a -> s { _cgsiaProvisionedThroughput = a })
-
-instance FromJSON CreateGlobalSecondaryIndexAction where
-    parseJSON = withObject "CreateGlobalSecondaryIndexAction" $ \o -> CreateGlobalSecondaryIndexAction
-        <$> o .:  "IndexName"
-        <*> o .:  "KeySchema"
-        <*> o .:  "Projection"
-        <*> o .:  "ProvisionedThroughput"
-
-instance ToJSON CreateGlobalSecondaryIndexAction where
-    toJSON CreateGlobalSecondaryIndexAction{..} = object
-        [ "IndexName"             .= _cgsiaIndexName
-        , "KeySchema"             .= _cgsiaKeySchema
-        , "Projection"            .= _cgsiaProjection
-        , "ProvisionedThroughput" .= _cgsiaProvisionedThroughput
-        ]
-
-data Select
-    = AllAttributes          -- ^ ALL_ATTRIBUTES
-    | AllProjectedAttributes -- ^ ALL_PROJECTED_ATTRIBUTES
-    | Count                  -- ^ COUNT
-    | SpecificAttributes     -- ^ SPECIFIC_ATTRIBUTES
-      deriving (Eq, Ord, Read, Show, Generic, Enum)
-
-instance Hashable Select
-
-instance FromText Select where
-    parser = takeLowerText >>= \case
-        "all_attributes"           -> pure AllAttributes
-        "all_projected_attributes" -> pure AllProjectedAttributes
-        "count"                    -> pure Count
-        "specific_attributes"      -> pure SpecificAttributes
-        e                          -> fail $
-            "Failure parsing Select from " ++ show e
-
-instance ToText Select where
-    toText = \case
-        AllAttributes          -> "ALL_ATTRIBUTES"
-        AllProjectedAttributes -> "ALL_PROJECTED_ATTRIBUTES"
-        Count                  -> "COUNT"
-        SpecificAttributes     -> "SPECIFIC_ATTRIBUTES"
-
-instance ToByteString Select
-instance ToHeader     Select
-instance ToQuery      Select
-
-instance FromJSON Select where
-    parseJSON = parseJSONText "Select"
-
-instance ToJSON Select where
-    toJSON = toJSONText
-
-data KeySchemaElement = KeySchemaElement
-    { _kseAttributeName :: Text
-    , _kseKeyType       :: KeyType
-    } deriving (Eq, Read, Show)
-
--- | 'KeySchemaElement' constructor.
---
--- The fields accessible through corresponding lenses are:
---
--- * 'kseAttributeName' @::@ 'Text'
---
--- * 'kseKeyType' @::@ 'KeyType'
---
-keySchemaElement :: Text -- ^ 'kseAttributeName'
-                 -> KeyType -- ^ 'kseKeyType'
-                 -> KeySchemaElement
-keySchemaElement p1 p2 = KeySchemaElement
-    { _kseAttributeName = p1
-    , _kseKeyType       = p2
-    }
-
--- | The name of a key attribute.
-kseAttributeName :: Lens' KeySchemaElement Text
-kseAttributeName = lens _kseAttributeName (\s a -> s { _kseAttributeName = a })
-
--- | The attribute data, consisting of the data type and the attribute value
--- itself.
-kseKeyType :: Lens' KeySchemaElement KeyType
-kseKeyType = lens _kseKeyType (\s a -> s { _kseKeyType = a })
-
-instance FromJSON KeySchemaElement where
-    parseJSON = withObject "KeySchemaElement" $ \o -> KeySchemaElement
-        <$> o .:  "AttributeName"
-        <*> o .:  "KeyType"
-
-instance ToJSON KeySchemaElement where
-    toJSON KeySchemaElement{..} = object
-        [ "AttributeName" .= _kseAttributeName
-        , "KeyType"       .= _kseKeyType
-        ]
-
-newtype DeleteGlobalSecondaryIndexAction = DeleteGlobalSecondaryIndexAction
-    { _dgsiaIndexName :: Text
-    } deriving (Eq, Ord, Read, Show, Monoid, IsString)
-
--- | 'DeleteGlobalSecondaryIndexAction' constructor.
---
--- The fields accessible through corresponding lenses are:
---
--- * 'dgsiaIndexName' @::@ 'Text'
---
-deleteGlobalSecondaryIndexAction :: Text -- ^ 'dgsiaIndexName'
-                                 -> DeleteGlobalSecondaryIndexAction
-deleteGlobalSecondaryIndexAction p1 = DeleteGlobalSecondaryIndexAction
-    { _dgsiaIndexName = p1
-    }
-
--- | The name of the global secondary index to be deleted.
-dgsiaIndexName :: Lens' DeleteGlobalSecondaryIndexAction Text
-dgsiaIndexName = lens _dgsiaIndexName (\s a -> s { _dgsiaIndexName = a })
-
-instance FromJSON DeleteGlobalSecondaryIndexAction where
-    parseJSON = withObject "DeleteGlobalSecondaryIndexAction" $ \o -> DeleteGlobalSecondaryIndexAction
-        <$> o .:  "IndexName"
-
-instance ToJSON DeleteGlobalSecondaryIndexAction where
-    toJSON DeleteGlobalSecondaryIndexAction{..} = object
-        [ "IndexName" .= _dgsiaIndexName
-        ]
-
-newtype DeleteRequest = DeleteRequest
-    { _dKey :: Map Text AttributeValue
-    } deriving (Eq, Read, Show, Monoid, Semigroup)
-
--- | 'DeleteRequest' constructor.
---
--- The fields accessible through corresponding lenses are:
---
--- * 'dKey' @::@ 'HashMap' 'Text' 'AttributeValue'
---
-deleteRequest :: DeleteRequest
-deleteRequest = DeleteRequest
-    { _dKey = mempty
-    }
-
--- | A map of attribute name to attribute values, representing the primary key of
--- the item to delete. All of the table's primary key attributes must be
--- specified, and their data types must match those of the table's key schema.
-dKey :: Lens' DeleteRequest (HashMap Text AttributeValue)
-dKey = lens _dKey (\s a -> s { _dKey = a }) . _Map
-
-instance FromJSON DeleteRequest where
-    parseJSON = withObject "DeleteRequest" $ \o -> DeleteRequest
-        <$> o .:? "Key" .!= mempty
-
-instance ToJSON DeleteRequest where
-    toJSON DeleteRequest{..} = object
-        [ "Key" .= _dKey
-        ]
-
-data UpdateGlobalSecondaryIndexAction = UpdateGlobalSecondaryIndexAction
-    { _ugsiaIndexName             :: Text
-    , _ugsiaProvisionedThroughput :: ProvisionedThroughput
-    } deriving (Eq, Read, Show)
-
--- | 'UpdateGlobalSecondaryIndexAction' constructor.
---
--- The fields accessible through corresponding lenses are:
---
--- * 'ugsiaIndexName' @::@ 'Text'
---
--- * 'ugsiaProvisionedThroughput' @::@ 'ProvisionedThroughput'
---
-updateGlobalSecondaryIndexAction :: Text -- ^ 'ugsiaIndexName'
-                                 -> ProvisionedThroughput -- ^ 'ugsiaProvisionedThroughput'
-                                 -> UpdateGlobalSecondaryIndexAction
-updateGlobalSecondaryIndexAction p1 p2 = UpdateGlobalSecondaryIndexAction
-    { _ugsiaIndexName             = p1
-    , _ugsiaProvisionedThroughput = p2
-    }
-
--- | The name of the global secondary index to be updated.
-ugsiaIndexName :: Lens' UpdateGlobalSecondaryIndexAction Text
-ugsiaIndexName = lens _ugsiaIndexName (\s a -> s { _ugsiaIndexName = a })
-
-ugsiaProvisionedThroughput :: Lens' UpdateGlobalSecondaryIndexAction ProvisionedThroughput
-ugsiaProvisionedThroughput =
-    lens _ugsiaProvisionedThroughput
-        (\s a -> s { _ugsiaProvisionedThroughput = a })
-
-instance FromJSON UpdateGlobalSecondaryIndexAction where
-    parseJSON = withObject "UpdateGlobalSecondaryIndexAction" $ \o -> UpdateGlobalSecondaryIndexAction
-        <$> o .:  "IndexName"
-        <*> o .:  "ProvisionedThroughput"
-
-instance ToJSON UpdateGlobalSecondaryIndexAction where
-    toJSON UpdateGlobalSecondaryIndexAction{..} = object
-        [ "IndexName"             .= _ugsiaIndexName
-        , "ProvisionedThroughput" .= _ugsiaProvisionedThroughput
-        ]
-
-newtype PutRequest = PutRequest
-    { _pItem :: Map Text AttributeValue
-    } deriving (Eq, Read, Show, Monoid, Semigroup)
-
--- | 'PutRequest' constructor.
---
--- The fields accessible through corresponding lenses are:
---
--- * 'pItem' @::@ 'HashMap' 'Text' 'AttributeValue'
---
-putRequest :: PutRequest
-putRequest = PutRequest
-    { _pItem = mempty
-    }
-
--- | A map of attribute name to attribute values, representing the primary key of
--- an item to be processed by /PutItem/. All of the table's primary key attributes
--- must be specified, and their data types must match those of the table's key
--- schema. If any attributes are present in the item which are part of an index
--- key schema for the table, their types must match the index key schema.
-pItem :: Lens' PutRequest (HashMap Text AttributeValue)
-pItem = lens _pItem (\s a -> s { _pItem = a }) . _Map
-
-instance FromJSON PutRequest where
-    parseJSON = withObject "PutRequest" $ \o -> PutRequest
-        <$> o .:? "Item" .!= mempty
-
-instance ToJSON PutRequest where
-    toJSON PutRequest{..} = object
-        [ "Item" .= _pItem
-        ]
-
-data Condition = Condition
-    { _cAttributeValueList :: List "AttributeValueList" AttributeValue
-    , _cComparisonOperator :: ComparisonOperator
-    } deriving (Eq, Read, Show)
-
--- | 'Condition' constructor.
---
--- The fields accessible through corresponding lenses are:
---
--- * 'cAttributeValueList' @::@ ['AttributeValue']
---
--- * 'cComparisonOperator' @::@ 'ComparisonOperator'
---
-condition :: ComparisonOperator -- ^ 'cComparisonOperator'
-          -> Condition
-condition p1 = Condition
-    { _cComparisonOperator = p1
-    , _cAttributeValueList = mempty
-    }
-
--- | One or more values to evaluate against the supplied attribute. The number of
--- values in the list depends on the /ComparisonOperator/ being used.
---
--- For type Number, value comparisons are numeric.
---
--- String value comparisons for greater than, equals, or less than are based on
--- ASCII character code values. For example, 'a' is greater than 'A', and 'a' is
--- greater than 'B'. For a list of code values, see <http://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters http://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters>.
---
--- For Binary, DynamoDB treats each byte of the binary data as unsigned when it
--- compares binary values.
-cAttributeValueList :: Lens' Condition [AttributeValue]
-cAttributeValueList =
-    lens _cAttributeValueList (\s a -> s { _cAttributeValueList = a })
-        . _List
-
--- | A comparator for evaluating attributes. For example, equals, greater than,
--- less than, etc.
---
--- The following comparison operators are available:
---
--- 'EQ | NE | LE | LT | GE | GT | NOT_NULL | NULL | CONTAINS | NOT_CONTAINS |BEGINS_WITH | IN | BETWEEN'
---
--- The following are descriptions of each comparison operator.
---
--- 'EQ' : Equal. 'EQ' is supported for all datatypes, including lists and maps.
---
--- /AttributeValueList/ can contain only one /AttributeValue/ element of type
--- String, Number, Binary, String Set, Number Set, or Binary Set. If an item
--- contains an /AttributeValue/ element of a different type than the one provided
--- in the request, the value does not match. For example, '{"S":"6"}' does not
--- equal '{"N":"6"}'. Also, '{"N":"6"}' does not equal '{"NS":["6", "2", "1"]}'.
---
---
---
--- 'NE' : Not equal. 'NE' is supported for all datatypes, including lists and
--- maps.
---
--- /AttributeValueList/ can contain only one /AttributeValue/ of type String,
--- Number, Binary, String Set, Number Set, or Binary Set. If an item contains an /AttributeValue/ of a different type than the one provided in the request, the
--- value does not match. For example, '{"S":"6"}' does not equal '{"N":"6"}'. Also, '{"N":"6"}' does not equal '{"NS":["6", "2", "1"]}'.
---
---
---
--- 'LE' : Less than or equal.
---
--- /AttributeValueList/ can contain only one /AttributeValue/ element of type
--- String, Number, or Binary (not a set type). If an item contains an /AttributeValue/ element of a different type than the one provided in the request, the value
--- does not match. For example, '{"S":"6"}' does not equal '{"N":"6"}'. Also, '{"N":"6"}' does not compare to '{"NS":["6", "2", "1"]}'.
---
---
---
--- 'LT' : Less than.
---
--- /AttributeValueList/ can contain only one /AttributeValue/ of type String,
--- Number, or Binary (not a set type). If an item contains an /AttributeValue/
--- element of a different type than the one provided in the request, the value
--- does not match. For example, '{"S":"6"}' does not equal '{"N":"6"}'. Also, '{"N":"6"}' does not compare to '{"NS":["6", "2", "1"]}'.
---
---
---
--- 'GE' : Greater than or equal.
---
--- /AttributeValueList/ can contain only one /AttributeValue/ element of type
--- String, Number, or Binary (not a set type). If an item contains an /AttributeValue/ element of a different type than the one provided in the request, the value
--- does not match. For example, '{"S":"6"}' does not equal '{"N":"6"}'. Also, '{"N":"6"}' does not compare to '{"NS":["6", "2", "1"]}'.
---
---
---
--- 'GT' : Greater than.
---
--- /AttributeValueList/ can contain only one /AttributeValue/ element of type
--- String, Number, or Binary (not a set type). If an item contains an /AttributeValue/ element of a different type than the one provided in the request, the value
--- does not match. For example, '{"S":"6"}' does not equal '{"N":"6"}'. Also, '{"N":"6"}' does not compare to '{"NS":["6", "2", "1"]}'.
---
---
---
--- 'NOT_NULL' : The attribute exists. 'NOT_NULL' is supported for all datatypes,
--- including lists and maps.
---
--- This operator tests for the existence of an attribute, not its data type. If
--- the data type of attribute "'a'" is null, and you evaluate it using 'NOT_NULL',
--- the result is a Boolean /true/. This result is because the attribute "'a'"
--- exists; its data type is not relevant to the 'NOT_NULL' comparison operator.
---
--- 'NULL' : The attribute does not exist. 'NULL' is supported for all datatypes,
--- including lists and maps.
---
--- This operator tests for the nonexistence of an attribute, not its data type.
--- If the data type of attribute "'a'" is null, and you evaluate it using 'NULL',
--- the result is a Boolean /false/. This is because the attribute "'a'" exists; its
--- data type is not relevant to the 'NULL' comparison operator.
---
--- 'CONTAINS' : Checks for a subsequence, or value in a set.
---
--- /AttributeValueList/ can contain only one /AttributeValue/ element of type
--- String, Number, or Binary (not a set type). If the target attribute of the
--- comparison is of type String, then the operator checks for a substring match.
--- If the target attribute of the comparison is of type Binary, then the
--- operator looks for a subsequence of the target that matches the input. If the
--- target attribute of the comparison is a set ("'SS'", "'NS'", or "'BS'"), then the
--- operator evaluates to true if it finds an exact match with any member of the
--- set.
---
--- CONTAINS is supported for lists: When evaluating "'a CONTAINS b'", "'a'" can be
--- a list; however, "'b'" cannot be a set, a map, or a list.
---
--- 'NOT_CONTAINS' : Checks for absence of a subsequence, or absence of a value
--- in a set.
---
--- /AttributeValueList/ can contain only one /AttributeValue/ element of type
--- String, Number, or Binary (not a set type). If the target attribute of the
--- comparison is a String, then the operator checks for the absence of a
--- substring match. If the target attribute of the comparison is Binary, then
--- the operator checks for the absence of a subsequence of the target that
--- matches the input. If the target attribute of the comparison is a set ("'SS'", "'NS'", or "'BS'"), then the operator evaluates to true if it /does not/ find an
--- exact match with any member of the set.
---
--- NOT_CONTAINS is supported for lists: When evaluating "'a NOT CONTAINS b'", "'a'"
--- can be a list; however, "'b'" cannot be a set, a map, or a list.
---
--- 'BEGINS_WITH' : Checks for a prefix.
---
--- /AttributeValueList/ can contain only one /AttributeValue/ of type String or
--- Binary (not a Number or a set type). The target attribute of the comparison
--- must be of type String or Binary (not a Number or a set type).
---
---
---
--- 'IN' : Checks for matching elements within two sets.
---
--- /AttributeValueList/ can contain one or more /AttributeValue/ elements of type
--- String, Number, or Binary (not a set type). These attributes are compared
--- against an existing set type attribute of an item. If any elements of the
--- input set are present in the item attribute, the expression evaluates to true.
---
--- 'BETWEEN' : Greater than or equal to the first value, and less than or equal
--- to the second value.
---
--- /AttributeValueList/ must contain two /AttributeValue/ elements of the same
--- type, either String, Number, or Binary (not a set type). A target attribute
--- matches if the target value is greater than, or equal to, the first element
--- and less than, or equal to, the second element. If an item contains an /AttributeValue/ element of a different type than the one provided in the request, the value
--- does not match. For example, '{"S":"6"}' does not compare to '{"N":"6"}'. Also, '{"N":"6"}' does not compare to '{"NS":["6", "2", "1"]}'
---
--- For usage examples of /AttributeValueList/ and /ComparisonOperator/, see <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.html Legacy Conditional Parameters> in the /Amazon DynamoDB Developer Guide/.
-cComparisonOperator :: Lens' Condition ComparisonOperator
-cComparisonOperator =
-    lens _cComparisonOperator (\s a -> s { _cComparisonOperator = a })
-
-instance FromJSON Condition where
-    parseJSON = withObject "Condition" $ \o -> Condition
-        <$> o .:? "AttributeValueList" .!= mempty
-        <*> o .:  "ComparisonOperator"
-
-instance ToJSON Condition where
-    toJSON Condition{..} = object
-        [ "AttributeValueList" .= _cAttributeValueList
-        , "ComparisonOperator" .= _cComparisonOperator
-        ]
-
-data ConditionalOperator
-    = And -- ^ AND
-    | Or  -- ^ OR
-      deriving (Eq, Ord, Read, Show, Generic, Enum)
-
-instance Hashable ConditionalOperator
-
-instance FromText ConditionalOperator where
-    parser = takeLowerText >>= \case
-        "and" -> pure And
-        "or"  -> pure Or
-        e     -> fail $
-            "Failure parsing ConditionalOperator from " ++ show e
-
-instance ToText ConditionalOperator where
-    toText = \case
-        And -> "AND"
-        Or  -> "OR"
-
-instance ToByteString ConditionalOperator
-instance ToHeader     ConditionalOperator
-instance ToQuery      ConditionalOperator
-
-instance FromJSON ConditionalOperator where
-    parseJSON = parseJSONText "ConditionalOperator"
-
-instance ToJSON ConditionalOperator where
-    toJSON = toJSONText
-
-data GlobalSecondaryIndexUpdate = GlobalSecondaryIndexUpdate
-    { _gsiuCreate :: Maybe CreateGlobalSecondaryIndexAction
-    , _gsiuDelete :: Maybe DeleteGlobalSecondaryIndexAction
-    , _gsiuUpdate :: Maybe UpdateGlobalSecondaryIndexAction
-    } deriving (Eq, Read, Show)
-
--- | 'GlobalSecondaryIndexUpdate' constructor.
---
--- The fields accessible through corresponding lenses are:
---
--- * 'gsiuCreate' @::@ 'Maybe' 'CreateGlobalSecondaryIndexAction'
---
--- * 'gsiuDelete' @::@ 'Maybe' 'DeleteGlobalSecondaryIndexAction'
---
--- * 'gsiuUpdate' @::@ 'Maybe' 'UpdateGlobalSecondaryIndexAction'
---
-globalSecondaryIndexUpdate :: GlobalSecondaryIndexUpdate
-globalSecondaryIndexUpdate = GlobalSecondaryIndexUpdate
-    { _gsiuUpdate = Nothing
-    , _gsiuCreate = Nothing
-    , _gsiuDelete = Nothing
-    }
-
--- | The parameters required for creating a global secondary index on an existing
--- table:
---
--- 'IndexName '
---
--- 'KeySchema '
---
--- 'AttributeDefinitions '
---
--- 'Projection '
---
--- 'ProvisionedThroughput '
---
---
-gsiuCreate :: Lens' GlobalSecondaryIndexUpdate (Maybe CreateGlobalSecondaryIndexAction)
-gsiuCreate = lens _gsiuCreate (\s a -> s { _gsiuCreate = a })
-
--- | The name of an existing global secondary index to be removed.
-gsiuDelete :: Lens' GlobalSecondaryIndexUpdate (Maybe DeleteGlobalSecondaryIndexAction)
-gsiuDelete = lens _gsiuDelete (\s a -> s { _gsiuDelete = a })
-
--- | The name of an existing global secondary index, along with new provisioned
--- throughput settings to be applied to that index.
-gsiuUpdate :: Lens' GlobalSecondaryIndexUpdate (Maybe UpdateGlobalSecondaryIndexAction)
-gsiuUpdate = lens _gsiuUpdate (\s a -> s { _gsiuUpdate = a })
-
-instance FromJSON GlobalSecondaryIndexUpdate where
-    parseJSON = withObject "GlobalSecondaryIndexUpdate" $ \o -> GlobalSecondaryIndexUpdate
-        <$> o .:? "Create"
-        <*> o .:? "Delete"
-        <*> o .:? "Update"
-
-instance ToJSON GlobalSecondaryIndexUpdate where
-    toJSON GlobalSecondaryIndexUpdate{..} = object
-        [ "Update" .= _gsiuUpdate
-        , "Create" .= _gsiuCreate
-        , "Delete" .= _gsiuDelete
-        ]
+{-# LANGUAGE OverloadedStrings #-}
+{-# LANGUAGE TypeFamilies      #-}
+
+-- Derived from AWS service descriptions, licensed under Apache 2.0.
+
+-- |
+-- Module      : Network.AWS.DynamoDB.Types
+-- Copyright   : (c) 2013-2015 Brendan Hay
+-- License     : Mozilla Public License, v. 2.0.
+-- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com>
+-- Stability   : auto-generated
+-- Portability : non-portable (GHC extensions)
+--
+module Network.AWS.DynamoDB.Types
+    (
+    -- * Service
+      DynamoDB
+
+    -- * Errors
+    , _ProvisionedThroughputExceededException
+    , _ConditionalCheckFailedException
+    , _ItemCollectionSizeLimitExceededException
+    , _InternalServerError
+    , _ResourceNotFoundException
+    , _ResourceInUseException
+    , _LimitExceededException
+
+    -- * AttributeAction
+    , AttributeAction (..)
+
+    -- * ComparisonOperator
+    , ComparisonOperator (..)
+
+    -- * ConditionalOperator
+    , ConditionalOperator (..)
+
+    -- * IndexStatus
+    , IndexStatus (..)
+
+    -- * KeyType
+    , KeyType (..)
+
+    -- * ProjectionType
+    , ProjectionType (..)
+
+    -- * ReturnConsumedCapacity
+    , ReturnConsumedCapacity (..)
+
+    -- * ReturnItemCollectionMetrics
+    , ReturnItemCollectionMetrics (..)
+
+    -- * ReturnValue
+    , ReturnValue (..)
+
+    -- * ScalarAttributeType
+    , ScalarAttributeType (..)
+
+    -- * Select
+    , Select (..)
+
+    -- * StreamViewType
+    , StreamViewType (..)
+
+    -- * TableStatus
+    , TableStatus (..)
+
+    -- * AttributeDefinition
+    , AttributeDefinition
+    , attributeDefinition
+    , adAttributeName
+    , adAttributeType
+
+    -- * AttributeValue
+    , AttributeValue
+    , attributeValue
+    , avL
+    , avM
+    , avNS
+    , avNULL
+    , avN
+    , avBS
+    , avB
+    , avSS
+    , avS
+    , avBOOL
+
+    -- * AttributeValueUpdate
+    , AttributeValueUpdate
+    , attributeValueUpdate
+    , avuValue
+    , avuAction
+
+    -- * Capacity
+    , Capacity
+    , capacity
+    , cCapacityUnits
+
+    -- * Condition
+    , Condition
+    , condition
+    , cAttributeValueList
+    , cComparisonOperator
+
+    -- * ConsumedCapacity
+    , ConsumedCapacity
+    , consumedCapacity
+    , ccCapacityUnits
+    , ccGlobalSecondaryIndexes
+    , ccLocalSecondaryIndexes
+    , ccTable
+    , ccTableName
+
+    -- * CreateGlobalSecondaryIndexAction
+    , CreateGlobalSecondaryIndexAction
+    , createGlobalSecondaryIndexAction
+    , cgsiaIndexName
+    , cgsiaKeySchema
+    , cgsiaProjection
+    , cgsiaProvisionedThroughput
+
+    -- * DeleteGlobalSecondaryIndexAction
+    , DeleteGlobalSecondaryIndexAction
+    , deleteGlobalSecondaryIndexAction
+    , dgsiaIndexName
+
+    -- * DeleteRequest
+    , DeleteRequest
+    , deleteRequest
+    , drKey
+
+    -- * ExpectedAttributeValue
+    , ExpectedAttributeValue
+    , expectedAttributeValue
+    , eavAttributeValueList
+    , eavExists
+    , eavValue
+    , eavComparisonOperator
+
+    -- * GlobalSecondaryIndex
+    , GlobalSecondaryIndex
+    , globalSecondaryIndex
+    , gsiIndexName
+    , gsiKeySchema
+    , gsiProjection
+    , gsiProvisionedThroughput
+
+    -- * GlobalSecondaryIndexDescription
+    , GlobalSecondaryIndexDescription
+    , globalSecondaryIndexDescription
+    , gsidBackfilling
+    , gsidProvisionedThroughput
+    , gsidIndexStatus
+    , gsidIndexSizeBytes
+    , gsidIndexARN
+    , gsidKeySchema
+    , gsidProjection
+    , gsidItemCount
+    , gsidIndexName
+
+    -- * GlobalSecondaryIndexUpdate
+    , GlobalSecondaryIndexUpdate
+    , globalSecondaryIndexUpdate
+    , gsiuCreate
+    , gsiuDelete
+    , gsiuUpdate
+
+    -- * ItemCollectionMetrics
+    , ItemCollectionMetrics
+    , itemCollectionMetrics
+    , icmItemCollectionKey
+    , icmSizeEstimateRangeGB
+
+    -- * KeySchemaElement
+    , KeySchemaElement
+    , keySchemaElement
+    , kseAttributeName
+    , kseKeyType
+
+    -- * KeysAndAttributes
+    , KeysAndAttributes
+    , keysAndAttributes
+    , kaaProjectionExpression
+    , kaaConsistentRead
+    , kaaExpressionAttributeNames
+    , kaaAttributesToGet
+    , kaaKeys
+
+    -- * LocalSecondaryIndex
+    , LocalSecondaryIndex
+    , localSecondaryIndex
+    , lsiIndexName
+    , lsiKeySchema
+    , lsiProjection
+
+    -- * LocalSecondaryIndexDescription
+    , LocalSecondaryIndexDescription
+    , localSecondaryIndexDescription
+    , lsidIndexSizeBytes
+    , lsidIndexARN
+    , lsidKeySchema
+    , lsidProjection
+    , lsidItemCount
+    , lsidIndexName
+
+    -- * Projection
+    , Projection
+    , projection
+    , pProjectionType
+    , pNonKeyAttributes
+
+    -- * ProvisionedThroughput
+    , ProvisionedThroughput
+    , provisionedThroughput
+    , ptReadCapacityUnits
+    , ptWriteCapacityUnits
+
+    -- * ProvisionedThroughputDescription
+    , ProvisionedThroughputDescription
+    , provisionedThroughputDescription
+    , ptdReadCapacityUnits
+    , ptdLastDecreaseDateTime
+    , ptdWriteCapacityUnits
+    , ptdNumberOfDecreasesToday
+    , ptdLastIncreaseDateTime
+
+    -- * PutRequest
+    , PutRequest
+    , putRequest
+    , prItem
+
+    -- * StreamSpecification
+    , StreamSpecification
+    , streamSpecification
+    , ssStreamEnabled
+    , ssStreamViewType
+
+    -- * TableDescription
+    , TableDescription
+    , tableDescription
+    , tdProvisionedThroughput
+    , tdAttributeDefinitions
+    , tdLatestStreamARN
+    , tdTableSizeBytes
+    , tdTableStatus
+    , tdTableARN
+    , tdKeySchema
+    , tdLatestStreamLabel
+    , tdGlobalSecondaryIndexes
+    , tdLocalSecondaryIndexes
+    , tdCreationDateTime
+    , tdItemCount
+    , tdTableName
+    , tdStreamSpecification
+
+    -- * UpdateGlobalSecondaryIndexAction
+    , UpdateGlobalSecondaryIndexAction
+    , updateGlobalSecondaryIndexAction
+    , ugsiaIndexName
+    , ugsiaProvisionedThroughput
+
+    -- * WriteRequest
+    , WriteRequest
+    , writeRequest
+    , wrPutRequest
+    , wrDeleteRequest
+    ) where
+
+import           Network.AWS.DynamoDB.Types.Product
+import           Network.AWS.DynamoDB.Types.Sum
+import           Network.AWS.Prelude
+import           Network.AWS.Sign.V4
+
+-- | Version @2012-08-10@ of the Amazon DynamoDB SDK.
+data DynamoDB
+
+instance AWSService DynamoDB where
+    type Sg DynamoDB = V4
+    service = const svc
+      where
+        svc =
+            Service
+            { _svcAbbrev = "DynamoDB"
+            , _svcPrefix = "dynamodb"
+            , _svcVersion = "2012-08-10"
+            , _svcEndpoint = defaultEndpoint svc
+            , _svcTimeout = Just 70
+            , _svcStatus = statusSuccess
+            , _svcError = parseJSONError
+            , _svcRetry = retry
+            }
+        retry =
+            Exponential
+            { _retryBase = 5.0e-2
+            , _retryGrowth = 2
+            , _retryAttempts = 5
+            , _retryCheck = check
+            }
+        check e
+          | has (hasCode "ThrottlingException" . hasStatus 400) e =
+              Just "throttling_exception"
+          | has (hasCode "Throttling" . hasStatus 400) e = Just "throttling"
+          | has
+               (hasCode "ProvisionedThroughputExceededException" .
+                hasStatus 400)
+               e =
+              Just "throughput_exceeded"
+          | has (hasStatus 503) e = Just "service_unavailable"
+          | has (hasStatus 500) e = Just "general_server_error"
+          | has (hasStatus 509) e = Just "limit_exceeded"
+          | otherwise = Nothing
+
+-- | Your request rate is too high. The AWS SDKs for DynamoDB automatically
+-- retry requests that receive this exception. Your request is eventually
+-- successful, unless your retry queue is too large to finish. Reduce the
+-- frequency of requests and use exponential backoff. For more information,
+-- go to
+-- <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ErrorHandling.html#APIRetries Error Retries and Exponential Backoff>
+-- in the /Amazon DynamoDB Developer Guide/.
+_ProvisionedThroughputExceededException :: AsError a => Getting (First ServiceError) a ServiceError
+_ProvisionedThroughputExceededException =
+    _ServiceError . hasCode "ProvisionedThroughputExceededException"
+
+-- | A condition specified in the operation could not be evaluated.
+_ConditionalCheckFailedException :: AsError a => Getting (First ServiceError) a ServiceError
+_ConditionalCheckFailedException =
+    _ServiceError . hasCode "ConditionalCheckFailedException"
+
+-- | An item collection is too large. This exception is only returned for
+-- tables that have one or more local secondary indexes.
+_ItemCollectionSizeLimitExceededException :: AsError a => Getting (First ServiceError) a ServiceError
+_ItemCollectionSizeLimitExceededException =
+    _ServiceError . hasCode "ItemCollectionSizeLimitExceededException"
+
+-- | An error occurred on the server side.
+_InternalServerError :: AsError a => Getting (First ServiceError) a ServiceError
+_InternalServerError = _ServiceError . hasCode "InternalServerError"
+
+-- | The operation tried to access a nonexistent table or index. The resource
+-- might not be specified correctly, or its status might not be 'ACTIVE'.
+_ResourceNotFoundException :: AsError a => Getting (First ServiceError) a ServiceError
+_ResourceNotFoundException =
+    _ServiceError . hasCode "ResourceNotFoundException"
+
+-- | The operation conflicts with the resource\'s availability. For example,
+-- you attempted to recreate an existing table, or tried to delete a table
+-- currently in the 'CREATING' state.
+_ResourceInUseException :: AsError a => Getting (First ServiceError) a ServiceError
+_ResourceInUseException = _ServiceError . hasCode "ResourceInUseException"
+
+-- | The number of concurrent table requests (cumulative number of tables in
+-- the 'CREATING', 'DELETING' or 'UPDATING' state) exceeds the maximum
+-- allowed of 10.
+--
+-- Also, for tables with secondary indexes, only one of those tables can be
+-- in the 'CREATING' state at any point in time. Do not attempt to create
+-- more than one such table simultaneously.
+--
+-- The total limit of tables in the 'ACTIVE' state is 250.
+_LimitExceededException :: AsError a => Getting (First ServiceError) a ServiceError
+_LimitExceededException = _ServiceError . hasCode "LimitExceededException"
diff --git a/gen/Network/AWS/DynamoDB/Types/Product.hs b/gen/Network/AWS/DynamoDB/Types/Product.hs
new file mode 100644
--- /dev/null
+++ b/gen/Network/AWS/DynamoDB/Types/Product.hs
@@ -0,0 +1,2333 @@
+{-# LANGUAGE DeriveDataTypeable #-}
+{-# LANGUAGE DeriveGeneric      #-}
+{-# LANGUAGE OverloadedStrings  #-}
+{-# LANGUAGE RecordWildCards    #-}
+{-# LANGUAGE TypeFamilies       #-}
+
+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
+
+-- Derived from AWS service descriptions, licensed under Apache 2.0.
+
+-- |
+-- Module      : Network.AWS.DynamoDB.Types.Product
+-- Copyright   : (c) 2013-2015 Brendan Hay
+-- License     : Mozilla Public License, v. 2.0.
+-- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com>
+-- Stability   : auto-generated
+-- Portability : non-portable (GHC extensions)
+--
+module Network.AWS.DynamoDB.Types.Product where
+
+import           Network.AWS.DynamoDB.Types.Sum
+import           Network.AWS.Prelude
+
+-- | Represents an attribute for describing the key schema for the table and
+-- indexes.
+--
+-- /See:/ 'attributeDefinition' smart constructor.
+data AttributeDefinition = AttributeDefinition'
+    { _adAttributeName :: !Text
+    , _adAttributeType :: !ScalarAttributeType
+    } deriving (Eq,Read,Show,Data,Typeable,Generic)
+
+-- | Creates a value of 'AttributeDefinition' with the minimum fields required to make a request.
+--
+-- Use one of the following lenses to modify other fields as desired:
+--
+-- * 'adAttributeName'
+--
+-- * 'adAttributeType'
+attributeDefinition
+    :: Text -- ^ 'adAttributeName'
+    -> ScalarAttributeType -- ^ 'adAttributeType'
+    -> AttributeDefinition
+attributeDefinition pAttributeName_ pAttributeType_ =
+    AttributeDefinition'
+    { _adAttributeName = pAttributeName_
+    , _adAttributeType = pAttributeType_
+    }
+
+-- | A name for the attribute.
+adAttributeName :: Lens' AttributeDefinition Text
+adAttributeName = lens _adAttributeName (\ s a -> s{_adAttributeName = a});
+
+-- | The data type for the attribute.
+adAttributeType :: Lens' AttributeDefinition ScalarAttributeType
+adAttributeType = lens _adAttributeType (\ s a -> s{_adAttributeType = a});
+
+instance FromJSON AttributeDefinition where
+        parseJSON
+          = withObject "AttributeDefinition"
+              (\ x ->
+                 AttributeDefinition' <$>
+                   (x .: "AttributeName") <*> (x .: "AttributeType"))
+
+instance ToJSON AttributeDefinition where
+        toJSON AttributeDefinition'{..}
+          = object
+              ["AttributeName" .= _adAttributeName,
+               "AttributeType" .= _adAttributeType]
+
+-- | Represents the data for an attribute. You can set one, and only one, of
+-- the elements.
+--
+-- Each attribute in an item is a name-value pair. An attribute can be
+-- single-valued or multi-valued set. For example, a book item can have
+-- title and authors attributes. Each book has one title but can have many
+-- authors. The multi-valued attribute is a set; duplicate values are not
+-- allowed.
+--
+-- /See:/ 'attributeValue' smart constructor.
+data AttributeValue = AttributeValue'
+    { _avL    :: !(Maybe [AttributeValue])
+    , _avM    :: !(Maybe (Map Text AttributeValue))
+    , _avNS   :: !(Maybe [Text])
+    , _avNULL :: !(Maybe Bool)
+    , _avN    :: !(Maybe Text)
+    , _avBS   :: !(Maybe [Base64])
+    , _avB    :: !(Maybe Base64)
+    , _avSS   :: !(Maybe [Text])
+    , _avS    :: !(Maybe Text)
+    , _avBOOL :: !(Maybe Bool)
+    } deriving (Eq,Read,Show,Data,Typeable,Generic)
+
+-- | Creates a value of 'AttributeValue' with the minimum fields required to make a request.
+--
+-- Use one of the following lenses to modify other fields as desired:
+--
+-- * 'avL'
+--
+-- * 'avM'
+--
+-- * 'avNS'
+--
+-- * 'avNULL'
+--
+-- * 'avN'
+--
+-- * 'avBS'
+--
+-- * 'avB'
+--
+-- * 'avSS'
+--
+-- * 'avS'
+--
+-- * 'avBOOL'
+attributeValue
+    :: AttributeValue
+attributeValue =
+    AttributeValue'
+    { _avL = Nothing
+    , _avM = Nothing
+    , _avNS = Nothing
+    , _avNULL = Nothing
+    , _avN = Nothing
+    , _avBS = Nothing
+    , _avB = Nothing
+    , _avSS = Nothing
+    , _avS = Nothing
+    , _avBOOL = Nothing
+    }
+
+-- | A List of attribute values.
+avL :: Lens' AttributeValue [AttributeValue]
+avL = lens _avL (\ s a -> s{_avL = a}) . _Default . _Coerce;
+
+-- | A Map of attribute values.
+avM :: Lens' AttributeValue (HashMap Text AttributeValue)
+avM = lens _avM (\ s a -> s{_avM = a}) . _Default . _Map;
+
+-- | A Number Set data type.
+avNS :: Lens' AttributeValue [Text]
+avNS = lens _avNS (\ s a -> s{_avNS = a}) . _Default . _Coerce;
+
+-- | A Null data type.
+avNULL :: Lens' AttributeValue (Maybe Bool)
+avNULL = lens _avNULL (\ s a -> s{_avNULL = a});
+
+-- | A Number data type.
+avN :: Lens' AttributeValue (Maybe Text)
+avN = lens _avN (\ s a -> s{_avN = a});
+
+-- | A Binary Set data type.
+avBS :: Lens' AttributeValue [ByteString]
+avBS = lens _avBS (\ s a -> s{_avBS = a}) . _Default . _Coerce;
+
+-- | A Binary data type.
+avB :: Lens' AttributeValue (Maybe ByteString)
+avB = lens _avB (\ s a -> s{_avB = a}) . mapping _Base64;
+
+-- | A String Set data type.
+avSS :: Lens' AttributeValue [Text]
+avSS = lens _avSS (\ s a -> s{_avSS = a}) . _Default . _Coerce;
+
+-- | A String data type.
+avS :: Lens' AttributeValue (Maybe Text)
+avS = lens _avS (\ s a -> s{_avS = a});
+
+-- | A Boolean data type.
+avBOOL :: Lens' AttributeValue (Maybe Bool)
+avBOOL = lens _avBOOL (\ s a -> s{_avBOOL = a});
+
+instance FromJSON AttributeValue where
+        parseJSON
+          = withObject "AttributeValue"
+              (\ x ->
+                 AttributeValue' <$>
+                   (x .:? "L" .!= mempty) <*> (x .:? "M" .!= mempty) <*>
+                     (x .:? "NS" .!= mempty)
+                     <*> (x .:? "NULL")
+                     <*> (x .:? "N")
+                     <*> (x .:? "BS" .!= mempty)
+                     <*> (x .:? "B")
+                     <*> (x .:? "SS" .!= mempty)
+                     <*> (x .:? "S")
+                     <*> (x .:? "BOOL"))
+
+instance ToJSON AttributeValue where
+        toJSON AttributeValue'{..}
+          = object
+              ["L" .= _avL, "M" .= _avM, "NS" .= _avNS,
+               "NULL" .= _avNULL, "N" .= _avN, "BS" .= _avBS,
+               "B" .= _avB, "SS" .= _avSS, "S" .= _avS,
+               "BOOL" .= _avBOOL]
+
+-- | For the /UpdateItem/ operation, represents the attributes to be
+-- modified, the action to perform on each, and the new value for each.
+--
+-- You cannot use /UpdateItem/ to update any primary key attributes.
+-- Instead, you will need to delete the item, and then use /PutItem/ to
+-- create a new item with new attributes.
+--
+-- Attribute values cannot be null; string and binary type attributes must
+-- have lengths greater than zero; and set type attributes must not be
+-- empty. Requests with empty values will be rejected with a
+-- /ValidationException/ exception.
+--
+-- /See:/ 'attributeValueUpdate' smart constructor.
+data AttributeValueUpdate = AttributeValueUpdate'
+    { _avuValue  :: !(Maybe AttributeValue)
+    , _avuAction :: !(Maybe AttributeAction)
+    } deriving (Eq,Read,Show,Data,Typeable,Generic)
+
+-- | Creates a value of 'AttributeValueUpdate' with the minimum fields required to make a request.
+--
+-- Use one of the following lenses to modify other fields as desired:
+--
+-- * 'avuValue'
+--
+-- * 'avuAction'
+attributeValueUpdate
+    :: AttributeValueUpdate
+attributeValueUpdate =
+    AttributeValueUpdate'
+    { _avuValue = Nothing
+    , _avuAction = Nothing
+    }
+
+-- | Undocumented member.
+avuValue :: Lens' AttributeValueUpdate (Maybe AttributeValue)
+avuValue = lens _avuValue (\ s a -> s{_avuValue = a});
+
+-- | Specifies how to perform the update. Valid values are 'PUT' (default),
+-- 'DELETE', and 'ADD'. The behavior depends on whether the specified
+-- primary key already exists in the table.
+--
+-- __If an item with the specified /Key/ is found in the table:__
+--
+-- -   'PUT' - Adds the specified attribute to the item. If the attribute
+--     already exists, it is replaced by the new value.
+--
+-- -   'DELETE' - If no value is specified, the attribute and its value are
+--     removed from the item. The data type of the specified value must
+--     match the existing value\'s data type.
+--
+--     If a /set/ of values is specified, then those values are subtracted
+--     from the old set. For example, if the attribute value was the set
+--     '[a,b,c]' and the /DELETE/ action specified '[a,c]', then the final
+--     attribute value would be '[b]'. Specifying an empty set is an error.
+--
+-- -   'ADD' - If the attribute does not already exist, then the attribute
+--     and its values are added to the item. If the attribute does exist,
+--     then the behavior of 'ADD' depends on the data type of the
+--     attribute:
+--
+--     -   If the existing attribute is a number, and if /Value/ is also a
+--         number, then the /Value/ is mathematically added to the existing
+--         attribute. If /Value/ is a negative number, then it is
+--         subtracted from the existing attribute.
+--
+--         If you use 'ADD' to increment or decrement a number value for an
+--         item that doesn\'t exist before the update, DynamoDB uses 0 as
+--         the initial value.
+--
+--         In addition, if you use 'ADD' to update an existing item, and
+--         intend to increment or decrement an attribute value which does
+--         not yet exist, DynamoDB uses '0' as the initial value. For
+--         example, suppose that the item you want to update does not yet
+--         have an attribute named /itemcount/, but you decide to 'ADD' the
+--         number '3' to this attribute anyway, even though it currently
+--         does not exist. DynamoDB will create the /itemcount/ attribute,
+--         set its initial value to '0', and finally add '3' to it. The
+--         result will be a new /itemcount/ attribute in the item, with a
+--         value of '3'.
+--
+--     -   If the existing data type is a set, and if the /Value/ is also a
+--         set, then the /Value/ is added to the existing set. (This is a
+--         /set/ operation, not mathematical addition.) For example, if the
+--         attribute value was the set '[1,2]', and the 'ADD' action
+--         specified '[3]', then the final attribute value would be
+--         '[1,2,3]'. An error occurs if an Add action is specified for a
+--         set attribute and the attribute type specified does not match
+--         the existing set type.
+--
+--         Both sets must have the same primitive data type. For example,
+--         if the existing data type is a set of strings, the /Value/ must
+--         also be a set of strings. The same holds true for number sets
+--         and binary sets.
+--
+--     This action is only valid for an existing attribute whose data type
+--     is number or is a set. Do not use 'ADD' for any other data types.
+--
+-- __If no item with the specified /Key/ is found:__
+--
+-- -   'PUT' - DynamoDB creates a new item with the specified primary key,
+--     and then adds the attribute.
+--
+-- -   'DELETE' - Nothing happens; there is no attribute to delete.
+--
+-- -   'ADD' - DynamoDB creates an item with the supplied primary key and
+--     number (or set of numbers) for the attribute value. The only data
+--     types allowed are number and number set; no other data types can be
+--     specified.
+--
+avuAction :: Lens' AttributeValueUpdate (Maybe AttributeAction)
+avuAction = lens _avuAction (\ s a -> s{_avuAction = a});
+
+instance ToJSON AttributeValueUpdate where
+        toJSON AttributeValueUpdate'{..}
+          = object
+              ["Value" .= _avuValue, "Action" .= _avuAction]
+
+-- | Represents the amount of provisioned throughput capacity consumed on a
+-- table or an index.
+--
+-- /See:/ 'capacity' smart constructor.
+newtype Capacity = Capacity'
+    { _cCapacityUnits :: Maybe Double
+    } deriving (Eq,Read,Show,Data,Typeable,Generic)
+
+-- | Creates a value of 'Capacity' with the minimum fields required to make a request.
+--
+-- Use one of the following lenses to modify other fields as desired:
+--
+-- * 'cCapacityUnits'
+capacity
+    :: Capacity
+capacity =
+    Capacity'
+    { _cCapacityUnits = Nothing
+    }
+
+-- | The total number of capacity units consumed on a table or an index.
+cCapacityUnits :: Lens' Capacity (Maybe Double)
+cCapacityUnits = lens _cCapacityUnits (\ s a -> s{_cCapacityUnits = a});
+
+instance FromJSON Capacity where
+        parseJSON
+          = withObject "Capacity"
+              (\ x -> Capacity' <$> (x .:? "CapacityUnits"))
+
+-- | Represents the selection criteria for a /Query/ or /Scan/ operation:
+--
+-- -   For a /Query/ operation, /Condition/ is used for specifying the
+--     /KeyConditions/ to use when querying a table or an index. For
+--     /KeyConditions/, only the following comparison operators are
+--     supported:
+--
+--     'EQ | LE | LT | GE | GT | BEGINS_WITH | BETWEEN'
+--
+--     /Condition/ is also used in a /QueryFilter/, which evaluates the
+--     query results and returns only the desired values.
+--
+-- -   For a /Scan/ operation, /Condition/ is used in a /ScanFilter/, which
+--     evaluates the scan results and returns only the desired values.
+--
+--
+-- /See:/ 'condition' smart constructor.
+data Condition = Condition'
+    { _cAttributeValueList :: !(Maybe [AttributeValue])
+    , _cComparisonOperator :: !ComparisonOperator
+    } deriving (Eq,Read,Show,Data,Typeable,Generic)
+
+-- | Creates a value of 'Condition' with the minimum fields required to make a request.
+--
+-- Use one of the following lenses to modify other fields as desired:
+--
+-- * 'cAttributeValueList'
+--
+-- * 'cComparisonOperator'
+condition
+    :: ComparisonOperator -- ^ 'cComparisonOperator'
+    -> Condition
+condition pComparisonOperator_ =
+    Condition'
+    { _cAttributeValueList = Nothing
+    , _cComparisonOperator = pComparisonOperator_
+    }
+
+-- | One or more values to evaluate against the supplied attribute. The
+-- number of values in the list depends on the /ComparisonOperator/ being
+-- used.
+--
+-- For type Number, value comparisons are numeric.
+--
+-- String value comparisons for greater than, equals, or less than are
+-- based on ASCII character code values. For example, 'a' is greater than
+-- 'A', and 'a' is greater than 'B'. For a list of code values, see
+-- <http://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters>.
+--
+-- For Binary, DynamoDB treats each byte of the binary data as unsigned
+-- when it compares binary values.
+cAttributeValueList :: Lens' Condition [AttributeValue]
+cAttributeValueList = lens _cAttributeValueList (\ s a -> s{_cAttributeValueList = a}) . _Default . _Coerce;
+
+-- | A comparator for evaluating attributes. For example, equals, greater
+-- than, less than, etc.
+--
+-- The following comparison operators are available:
+--
+-- 'EQ | NE | LE | LT | GE | GT | NOT_NULL | NULL | CONTAINS | NOT_CONTAINS | BEGINS_WITH | IN | BETWEEN'
+--
+-- The following are descriptions of each comparison operator.
+--
+-- -   'EQ' : Equal. 'EQ' is supported for all datatypes, including lists
+--     and maps.
+--
+--     /AttributeValueList/ can contain only one /AttributeValue/ element
+--     of type String, Number, Binary, String Set, Number Set, or Binary
+--     Set. If an item contains an /AttributeValue/ element of a different
+--     type than the one provided in the request, the value does not match.
+--     For example, '{\"S\":\"6\"}' does not equal '{\"N\":\"6\"}'. Also,
+--     '{\"N\":\"6\"}' does not equal '{\"NS\":[\"6\", \"2\", \"1\"]}'.
+--
+-- -   'NE' : Not equal. 'NE' is supported for all datatypes, including
+--     lists and maps.
+--
+--     /AttributeValueList/ can contain only one /AttributeValue/ of type
+--     String, Number, Binary, String Set, Number Set, or Binary Set. If an
+--     item contains an /AttributeValue/ of a different type than the one
+--     provided in the request, the value does not match. For example,
+--     '{\"S\":\"6\"}' does not equal '{\"N\":\"6\"}'. Also,
+--     '{\"N\":\"6\"}' does not equal '{\"NS\":[\"6\", \"2\", \"1\"]}'.
+--
+-- -   'LE' : Less than or equal.
+--
+--     /AttributeValueList/ can contain only one /AttributeValue/ element
+--     of type String, Number, or Binary (not a set type). If an item
+--     contains an /AttributeValue/ element of a different type than the
+--     one provided in the request, the value does not match. For example,
+--     '{\"S\":\"6\"}' does not equal '{\"N\":\"6\"}'. Also,
+--     '{\"N\":\"6\"}' does not compare to
+--     '{\"NS\":[\"6\", \"2\", \"1\"]}'.
+--
+-- -   'LT' : Less than.
+--
+--     /AttributeValueList/ can contain only one /AttributeValue/ of type
+--     String, Number, or Binary (not a set type). If an item contains an
+--     /AttributeValue/ element of a different type than the one provided
+--     in the request, the value does not match. For example,
+--     '{\"S\":\"6\"}' does not equal '{\"N\":\"6\"}'. Also,
+--     '{\"N\":\"6\"}' does not compare to
+--     '{\"NS\":[\"6\", \"2\", \"1\"]}'.
+--
+-- -   'GE' : Greater than or equal.
+--
+--     /AttributeValueList/ can contain only one /AttributeValue/ element
+--     of type String, Number, or Binary (not a set type). If an item
+--     contains an /AttributeValue/ element of a different type than the
+--     one provided in the request, the value does not match. For example,
+--     '{\"S\":\"6\"}' does not equal '{\"N\":\"6\"}'. Also,
+--     '{\"N\":\"6\"}' does not compare to
+--     '{\"NS\":[\"6\", \"2\", \"1\"]}'.
+--
+-- -   'GT' : Greater than.
+--
+--     /AttributeValueList/ can contain only one /AttributeValue/ element
+--     of type String, Number, or Binary (not a set type). If an item
+--     contains an /AttributeValue/ element of a different type than the
+--     one provided in the request, the value does not match. For example,
+--     '{\"S\":\"6\"}' does not equal '{\"N\":\"6\"}'. Also,
+--     '{\"N\":\"6\"}' does not compare to
+--     '{\"NS\":[\"6\", \"2\", \"1\"]}'.
+--
+-- -   'NOT_NULL' : The attribute exists. 'NOT_NULL' is supported for all
+--     datatypes, including lists and maps.
+--
+--     This operator tests for the existence of an attribute, not its data
+--     type. If the data type of attribute \"'a'\" is null, and you
+--     evaluate it using 'NOT_NULL', the result is a Boolean /true/. This
+--     result is because the attribute \"'a'\" exists; its data type is not
+--     relevant to the 'NOT_NULL' comparison operator.
+--
+-- -   'NULL' : The attribute does not exist. 'NULL' is supported for all
+--     datatypes, including lists and maps.
+--
+--     This operator tests for the nonexistence of an attribute, not its
+--     data type. If the data type of attribute \"'a'\" is null, and you
+--     evaluate it using 'NULL', the result is a Boolean /false/. This is
+--     because the attribute \"'a'\" exists; its data type is not relevant
+--     to the 'NULL' comparison operator.
+--
+-- -   'CONTAINS' : Checks for a subsequence, or value in a set.
+--
+--     /AttributeValueList/ can contain only one /AttributeValue/ element
+--     of type String, Number, or Binary (not a set type). If the target
+--     attribute of the comparison is of type String, then the operator
+--     checks for a substring match. If the target attribute of the
+--     comparison is of type Binary, then the operator looks for a
+--     subsequence of the target that matches the input. If the target
+--     attribute of the comparison is a set (\"'SS'\", \"'NS'\", or
+--     \"'BS'\"), then the operator evaluates to true if it finds an exact
+--     match with any member of the set.
+--
+--     CONTAINS is supported for lists: When evaluating \"'a CONTAINS b'\",
+--     \"'a'\" can be a list; however, \"'b'\" cannot be a set, a map, or a
+--     list.
+--
+-- -   'NOT_CONTAINS' : Checks for absence of a subsequence, or absence of
+--     a value in a set.
+--
+--     /AttributeValueList/ can contain only one /AttributeValue/ element
+--     of type String, Number, or Binary (not a set type). If the target
+--     attribute of the comparison is a String, then the operator checks
+--     for the absence of a substring match. If the target attribute of the
+--     comparison is Binary, then the operator checks for the absence of a
+--     subsequence of the target that matches the input. If the target
+--     attribute of the comparison is a set (\"'SS'\", \"'NS'\", or
+--     \"'BS'\"), then the operator evaluates to true if it /does not/ find
+--     an exact match with any member of the set.
+--
+--     NOT_CONTAINS is supported for lists: When evaluating
+--     \"'a NOT CONTAINS b'\", \"'a'\" can be a list; however, \"'b'\"
+--     cannot be a set, a map, or a list.
+--
+-- -   'BEGINS_WITH' : Checks for a prefix.
+--
+--     /AttributeValueList/ can contain only one /AttributeValue/ of type
+--     String or Binary (not a Number or a set type). The target attribute
+--     of the comparison must be of type String or Binary (not a Number or
+--     a set type).
+--
+-- -   'IN' : Checks for matching elements within two sets.
+--
+--     /AttributeValueList/ can contain one or more /AttributeValue/
+--     elements of type String, Number, or Binary (not a set type). These
+--     attributes are compared against an existing set type attribute of an
+--     item. If any elements of the input set are present in the item
+--     attribute, the expression evaluates to true.
+--
+-- -   'BETWEEN' : Greater than or equal to the first value, and less than
+--     or equal to the second value.
+--
+--     /AttributeValueList/ must contain two /AttributeValue/ elements of
+--     the same type, either String, Number, or Binary (not a set type). A
+--     target attribute matches if the target value is greater than, or
+--     equal to, the first element and less than, or equal to, the second
+--     element. If an item contains an /AttributeValue/ element of a
+--     different type than the one provided in the request, the value does
+--     not match. For example, '{\"S\":\"6\"}' does not compare to
+--     '{\"N\":\"6\"}'. Also, '{\"N\":\"6\"}' does not compare to
+--     '{\"NS\":[\"6\", \"2\", \"1\"]}'
+--
+-- For usage examples of /AttributeValueList/ and /ComparisonOperator/, see
+-- <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.html Legacy Conditional Parameters>
+-- in the /Amazon DynamoDB Developer Guide/.
+cComparisonOperator :: Lens' Condition ComparisonOperator
+cComparisonOperator = lens _cComparisonOperator (\ s a -> s{_cComparisonOperator = a});
+
+instance ToJSON Condition where
+        toJSON Condition'{..}
+          = object
+              ["AttributeValueList" .= _cAttributeValueList,
+               "ComparisonOperator" .= _cComparisonOperator]
+
+-- | The capacity units consumed by an operation. The data returned includes
+-- the total provisioned throughput consumed, along with statistics for the
+-- table and any indexes involved in the operation. /ConsumedCapacity/ is
+-- only returned if the request asked for it. For more information, see
+-- <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ProvisionedThroughputIntro.html Provisioned Throughput>
+-- in the /Amazon DynamoDB Developer Guide/.
+--
+-- /See:/ 'consumedCapacity' smart constructor.
+data ConsumedCapacity = ConsumedCapacity'
+    { _ccCapacityUnits          :: !(Maybe Double)
+    , _ccGlobalSecondaryIndexes :: !(Maybe (Map Text Capacity))
+    , _ccLocalSecondaryIndexes  :: !(Maybe (Map Text Capacity))
+    , _ccTable                  :: !(Maybe Capacity)
+    , _ccTableName              :: !(Maybe Text)
+    } deriving (Eq,Read,Show,Data,Typeable,Generic)
+
+-- | Creates a value of 'ConsumedCapacity' with the minimum fields required to make a request.
+--
+-- Use one of the following lenses to modify other fields as desired:
+--
+-- * 'ccCapacityUnits'
+--
+-- * 'ccGlobalSecondaryIndexes'
+--
+-- * 'ccLocalSecondaryIndexes'
+--
+-- * 'ccTable'
+--
+-- * 'ccTableName'
+consumedCapacity
+    :: ConsumedCapacity
+consumedCapacity =
+    ConsumedCapacity'
+    { _ccCapacityUnits = Nothing
+    , _ccGlobalSecondaryIndexes = Nothing
+    , _ccLocalSecondaryIndexes = Nothing
+    , _ccTable = Nothing
+    , _ccTableName = Nothing
+    }
+
+-- | The total number of capacity units consumed by the operation.
+ccCapacityUnits :: Lens' ConsumedCapacity (Maybe Double)
+ccCapacityUnits = lens _ccCapacityUnits (\ s a -> s{_ccCapacityUnits = a});
+
+-- | The amount of throughput consumed on each global index affected by the
+-- operation.
+ccGlobalSecondaryIndexes :: Lens' ConsumedCapacity (HashMap Text Capacity)
+ccGlobalSecondaryIndexes = lens _ccGlobalSecondaryIndexes (\ s a -> s{_ccGlobalSecondaryIndexes = a}) . _Default . _Map;
+
+-- | The amount of throughput consumed on each local index affected by the
+-- operation.
+ccLocalSecondaryIndexes :: Lens' ConsumedCapacity (HashMap Text Capacity)
+ccLocalSecondaryIndexes = lens _ccLocalSecondaryIndexes (\ s a -> s{_ccLocalSecondaryIndexes = a}) . _Default . _Map;
+
+-- | The amount of throughput consumed on the table affected by the
+-- operation.
+ccTable :: Lens' ConsumedCapacity (Maybe Capacity)
+ccTable = lens _ccTable (\ s a -> s{_ccTable = a});
+
+-- | The name of the table that was affected by the operation.
+ccTableName :: Lens' ConsumedCapacity (Maybe Text)
+ccTableName = lens _ccTableName (\ s a -> s{_ccTableName = a});
+
+instance FromJSON ConsumedCapacity where
+        parseJSON
+          = withObject "ConsumedCapacity"
+              (\ x ->
+                 ConsumedCapacity' <$>
+                   (x .:? "CapacityUnits") <*>
+                     (x .:? "GlobalSecondaryIndexes" .!= mempty)
+                     <*> (x .:? "LocalSecondaryIndexes" .!= mempty)
+                     <*> (x .:? "Table")
+                     <*> (x .:? "TableName"))
+
+-- | Represents a new global secondary index to be added to an existing
+-- table.
+--
+-- /See:/ 'createGlobalSecondaryIndexAction' smart constructor.
+data CreateGlobalSecondaryIndexAction = CreateGlobalSecondaryIndexAction'
+    { _cgsiaIndexName             :: !Text
+    , _cgsiaKeySchema             :: !(List1 KeySchemaElement)
+    , _cgsiaProjection            :: !Projection
+    , _cgsiaProvisionedThroughput :: !ProvisionedThroughput
+    } deriving (Eq,Read,Show,Data,Typeable,Generic)
+
+-- | Creates a value of 'CreateGlobalSecondaryIndexAction' with the minimum fields required to make a request.
+--
+-- Use one of the following lenses to modify other fields as desired:
+--
+-- * 'cgsiaIndexName'
+--
+-- * 'cgsiaKeySchema'
+--
+-- * 'cgsiaProjection'
+--
+-- * 'cgsiaProvisionedThroughput'
+createGlobalSecondaryIndexAction
+    :: Text -- ^ 'cgsiaIndexName'
+    -> NonEmpty KeySchemaElement -- ^ 'cgsiaKeySchema'
+    -> Projection -- ^ 'cgsiaProjection'
+    -> ProvisionedThroughput -- ^ 'cgsiaProvisionedThroughput'
+    -> CreateGlobalSecondaryIndexAction
+createGlobalSecondaryIndexAction pIndexName_ pKeySchema_ pProjection_ pProvisionedThroughput_ =
+    CreateGlobalSecondaryIndexAction'
+    { _cgsiaIndexName = pIndexName_
+    , _cgsiaKeySchema = _List1 # pKeySchema_
+    , _cgsiaProjection = pProjection_
+    , _cgsiaProvisionedThroughput = pProvisionedThroughput_
+    }
+
+-- | The name of the global secondary index to be created.
+cgsiaIndexName :: Lens' CreateGlobalSecondaryIndexAction Text
+cgsiaIndexName = lens _cgsiaIndexName (\ s a -> s{_cgsiaIndexName = a});
+
+-- | The key schema for the global secondary index.
+cgsiaKeySchema :: Lens' CreateGlobalSecondaryIndexAction (NonEmpty KeySchemaElement)
+cgsiaKeySchema = lens _cgsiaKeySchema (\ s a -> s{_cgsiaKeySchema = a}) . _List1;
+
+-- | Undocumented member.
+cgsiaProjection :: Lens' CreateGlobalSecondaryIndexAction Projection
+cgsiaProjection = lens _cgsiaProjection (\ s a -> s{_cgsiaProjection = a});
+
+-- | Undocumented member.
+cgsiaProvisionedThroughput :: Lens' CreateGlobalSecondaryIndexAction ProvisionedThroughput
+cgsiaProvisionedThroughput = lens _cgsiaProvisionedThroughput (\ s a -> s{_cgsiaProvisionedThroughput = a});
+
+instance ToJSON CreateGlobalSecondaryIndexAction
+         where
+        toJSON CreateGlobalSecondaryIndexAction'{..}
+          = object
+              ["IndexName" .= _cgsiaIndexName,
+               "KeySchema" .= _cgsiaKeySchema,
+               "Projection" .= _cgsiaProjection,
+               "ProvisionedThroughput" .=
+                 _cgsiaProvisionedThroughput]
+
+-- | Represents a global secondary index to be deleted from an existing
+-- table.
+--
+-- /See:/ 'deleteGlobalSecondaryIndexAction' smart constructor.
+newtype DeleteGlobalSecondaryIndexAction = DeleteGlobalSecondaryIndexAction'
+    { _dgsiaIndexName :: Text
+    } deriving (Eq,Read,Show,Data,Typeable,Generic)
+
+-- | Creates a value of 'DeleteGlobalSecondaryIndexAction' with the minimum fields required to make a request.
+--
+-- Use one of the following lenses to modify other fields as desired:
+--
+-- * 'dgsiaIndexName'
+deleteGlobalSecondaryIndexAction
+    :: Text -- ^ 'dgsiaIndexName'
+    -> DeleteGlobalSecondaryIndexAction
+deleteGlobalSecondaryIndexAction pIndexName_ =
+    DeleteGlobalSecondaryIndexAction'
+    { _dgsiaIndexName = pIndexName_
+    }
+
+-- | The name of the global secondary index to be deleted.
+dgsiaIndexName :: Lens' DeleteGlobalSecondaryIndexAction Text
+dgsiaIndexName = lens _dgsiaIndexName (\ s a -> s{_dgsiaIndexName = a});
+
+instance ToJSON DeleteGlobalSecondaryIndexAction
+         where
+        toJSON DeleteGlobalSecondaryIndexAction'{..}
+          = object ["IndexName" .= _dgsiaIndexName]
+
+-- | Represents a request to perform a /DeleteItem/ operation on an item.
+--
+-- /See:/ 'deleteRequest' smart constructor.
+newtype DeleteRequest = DeleteRequest'
+    { _drKey :: Map Text AttributeValue
+    } deriving (Eq,Read,Show,Data,Typeable,Generic)
+
+-- | Creates a value of 'DeleteRequest' with the minimum fields required to make a request.
+--
+-- Use one of the following lenses to modify other fields as desired:
+--
+-- * 'drKey'
+deleteRequest
+    :: DeleteRequest
+deleteRequest =
+    DeleteRequest'
+    { _drKey = mempty
+    }
+
+-- | A map of attribute name to attribute values, representing the primary
+-- key of the item to delete. All of the table\'s primary key attributes
+-- must be specified, and their data types must match those of the table\'s
+-- key schema.
+drKey :: Lens' DeleteRequest (HashMap Text AttributeValue)
+drKey = lens _drKey (\ s a -> s{_drKey = a}) . _Map;
+
+instance FromJSON DeleteRequest where
+        parseJSON
+          = withObject "DeleteRequest"
+              (\ x -> DeleteRequest' <$> (x .:? "Key" .!= mempty))
+
+instance ToJSON DeleteRequest where
+        toJSON DeleteRequest'{..} = object ["Key" .= _drKey]
+
+-- | Represents a condition to be compared with an attribute value. This
+-- condition can be used with /DeleteItem/, /PutItem/ or /UpdateItem/
+-- operations; if the comparison evaluates to true, the operation succeeds;
+-- if not, the operation fails. You can use /ExpectedAttributeValue/ in one
+-- of two different ways:
+--
+-- -   Use /AttributeValueList/ to specify one or more values to compare
+--     against an attribute. Use /ComparisonOperator/ to specify how you
+--     want to perform the comparison. If the comparison evaluates to true,
+--     then the conditional operation succeeds.
+--
+-- -   Use /Value/ to specify a value that DynamoDB will compare against an
+--     attribute. If the values match, then /ExpectedAttributeValue/
+--     evaluates to true and the conditional operation succeeds.
+--     Optionally, you can also set /Exists/ to false, indicating that you
+--     /do not/ expect to find the attribute value in the table. In this
+--     case, the conditional operation succeeds only if the comparison
+--     evaluates to false.
+--
+-- /Value/ and /Exists/ are incompatible with /AttributeValueList/ and
+-- /ComparisonOperator/. Note that if you use both sets of parameters at
+-- once, DynamoDB will return a /ValidationException/ exception.
+--
+-- /See:/ 'expectedAttributeValue' smart constructor.
+data ExpectedAttributeValue = ExpectedAttributeValue'
+    { _eavAttributeValueList :: !(Maybe [AttributeValue])
+    , _eavExists             :: !(Maybe Bool)
+    , _eavValue              :: !(Maybe AttributeValue)
+    , _eavComparisonOperator :: !(Maybe ComparisonOperator)
+    } deriving (Eq,Read,Show,Data,Typeable,Generic)
+
+-- | Creates a value of 'ExpectedAttributeValue' with the minimum fields required to make a request.
+--
+-- Use one of the following lenses to modify other fields as desired:
+--
+-- * 'eavAttributeValueList'
+--
+-- * 'eavExists'
+--
+-- * 'eavValue'
+--
+-- * 'eavComparisonOperator'
+expectedAttributeValue
+    :: ExpectedAttributeValue
+expectedAttributeValue =
+    ExpectedAttributeValue'
+    { _eavAttributeValueList = Nothing
+    , _eavExists = Nothing
+    , _eavValue = Nothing
+    , _eavComparisonOperator = Nothing
+    }
+
+-- | One or more values to evaluate against the supplied attribute. The
+-- number of values in the list depends on the /ComparisonOperator/ being
+-- used.
+--
+-- For type Number, value comparisons are numeric.
+--
+-- String value comparisons for greater than, equals, or less than are
+-- based on ASCII character code values. For example, 'a' is greater than
+-- 'A', and 'a' is greater than 'B'. For a list of code values, see
+-- <http://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters>.
+--
+-- For Binary, DynamoDB treats each byte of the binary data as unsigned
+-- when it compares binary values.
+--
+-- For information on specifying data types in JSON, see
+-- <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DataFormat.html JSON Data Format>
+-- in the /Amazon DynamoDB Developer Guide/.
+eavAttributeValueList :: Lens' ExpectedAttributeValue [AttributeValue]
+eavAttributeValueList = lens _eavAttributeValueList (\ s a -> s{_eavAttributeValueList = a}) . _Default . _Coerce;
+
+-- | Causes DynamoDB to evaluate the value before attempting a conditional
+-- operation:
+--
+-- -   If /Exists/ is 'true', DynamoDB will check to see if that attribute
+--     value already exists in the table. If it is found, then the
+--     operation succeeds. If it is not found, the operation fails with a
+--     /ConditionalCheckFailedException/.
+--
+-- -   If /Exists/ is 'false', DynamoDB assumes that the attribute value
+--     does not exist in the table. If in fact the value does not exist,
+--     then the assumption is valid and the operation succeeds. If the
+--     value is found, despite the assumption that it does not exist, the
+--     operation fails with a /ConditionalCheckFailedException/.
+--
+-- The default setting for /Exists/ is 'true'. If you supply a /Value/ all
+-- by itself, DynamoDB assumes the attribute exists: You don\'t have to set
+-- /Exists/ to 'true', because it is implied.
+--
+-- DynamoDB returns a /ValidationException/ if:
+--
+-- -   /Exists/ is 'true' but there is no /Value/ to check. (You expect a
+--     value to exist, but don\'t specify what that value is.)
+--
+-- -   /Exists/ is 'false' but you also provide a /Value/. (You cannot
+--     expect an attribute to have a value, while also expecting it not to
+--     exist.)
+--
+eavExists :: Lens' ExpectedAttributeValue (Maybe Bool)
+eavExists = lens _eavExists (\ s a -> s{_eavExists = a});
+
+-- | Undocumented member.
+eavValue :: Lens' ExpectedAttributeValue (Maybe AttributeValue)
+eavValue = lens _eavValue (\ s a -> s{_eavValue = a});
+
+-- | A comparator for evaluating attributes in the /AttributeValueList/. For
+-- example, equals, greater than, less than, etc.
+--
+-- The following comparison operators are available:
+--
+-- 'EQ | NE | LE | LT | GE | GT | NOT_NULL | NULL | CONTAINS | NOT_CONTAINS | BEGINS_WITH | IN | BETWEEN'
+--
+-- The following are descriptions of each comparison operator.
+--
+-- -   'EQ' : Equal. 'EQ' is supported for all datatypes, including lists
+--     and maps.
+--
+--     /AttributeValueList/ can contain only one /AttributeValue/ element
+--     of type String, Number, Binary, String Set, Number Set, or Binary
+--     Set. If an item contains an /AttributeValue/ element of a different
+--     type than the one provided in the request, the value does not match.
+--     For example, '{\"S\":\"6\"}' does not equal '{\"N\":\"6\"}'. Also,
+--     '{\"N\":\"6\"}' does not equal '{\"NS\":[\"6\", \"2\", \"1\"]}'.
+--
+-- -   'NE' : Not equal. 'NE' is supported for all datatypes, including
+--     lists and maps.
+--
+--     /AttributeValueList/ can contain only one /AttributeValue/ of type
+--     String, Number, Binary, String Set, Number Set, or Binary Set. If an
+--     item contains an /AttributeValue/ of a different type than the one
+--     provided in the request, the value does not match. For example,
+--     '{\"S\":\"6\"}' does not equal '{\"N\":\"6\"}'. Also,
+--     '{\"N\":\"6\"}' does not equal '{\"NS\":[\"6\", \"2\", \"1\"]}'.
+--
+-- -   'LE' : Less than or equal.
+--
+--     /AttributeValueList/ can contain only one /AttributeValue/ element
+--     of type String, Number, or Binary (not a set type). If an item
+--     contains an /AttributeValue/ element of a different type than the
+--     one provided in the request, the value does not match. For example,
+--     '{\"S\":\"6\"}' does not equal '{\"N\":\"6\"}'. Also,
+--     '{\"N\":\"6\"}' does not compare to
+--     '{\"NS\":[\"6\", \"2\", \"1\"]}'.
+--
+-- -   'LT' : Less than.
+--
+--     /AttributeValueList/ can contain only one /AttributeValue/ of type
+--     String, Number, or Binary (not a set type). If an item contains an
+--     /AttributeValue/ element of a different type than the one provided
+--     in the request, the value does not match. For example,
+--     '{\"S\":\"6\"}' does not equal '{\"N\":\"6\"}'. Also,
+--     '{\"N\":\"6\"}' does not compare to
+--     '{\"NS\":[\"6\", \"2\", \"1\"]}'.
+--
+-- -   'GE' : Greater than or equal.
+--
+--     /AttributeValueList/ can contain only one /AttributeValue/ element
+--     of type String, Number, or Binary (not a set type). If an item
+--     contains an /AttributeValue/ element of a different type than the
+--     one provided in the request, the value does not match. For example,
+--     '{\"S\":\"6\"}' does not equal '{\"N\":\"6\"}'. Also,
+--     '{\"N\":\"6\"}' does not compare to
+--     '{\"NS\":[\"6\", \"2\", \"1\"]}'.
+--
+-- -   'GT' : Greater than.
+--
+--     /AttributeValueList/ can contain only one /AttributeValue/ element
+--     of type String, Number, or Binary (not a set type). If an item
+--     contains an /AttributeValue/ element of a different type than the
+--     one provided in the request, the value does not match. For example,
+--     '{\"S\":\"6\"}' does not equal '{\"N\":\"6\"}'. Also,
+--     '{\"N\":\"6\"}' does not compare to
+--     '{\"NS\":[\"6\", \"2\", \"1\"]}'.
+--
+-- -   'NOT_NULL' : The attribute exists. 'NOT_NULL' is supported for all
+--     datatypes, including lists and maps.
+--
+--     This operator tests for the existence of an attribute, not its data
+--     type. If the data type of attribute \"'a'\" is null, and you
+--     evaluate it using 'NOT_NULL', the result is a Boolean /true/. This
+--     result is because the attribute \"'a'\" exists; its data type is not
+--     relevant to the 'NOT_NULL' comparison operator.
+--
+-- -   'NULL' : The attribute does not exist. 'NULL' is supported for all
+--     datatypes, including lists and maps.
+--
+--     This operator tests for the nonexistence of an attribute, not its
+--     data type. If the data type of attribute \"'a'\" is null, and you
+--     evaluate it using 'NULL', the result is a Boolean /false/. This is
+--     because the attribute \"'a'\" exists; its data type is not relevant
+--     to the 'NULL' comparison operator.
+--
+-- -   'CONTAINS' : Checks for a subsequence, or value in a set.
+--
+--     /AttributeValueList/ can contain only one /AttributeValue/ element
+--     of type String, Number, or Binary (not a set type). If the target
+--     attribute of the comparison is of type String, then the operator
+--     checks for a substring match. If the target attribute of the
+--     comparison is of type Binary, then the operator looks for a
+--     subsequence of the target that matches the input. If the target
+--     attribute of the comparison is a set (\"'SS'\", \"'NS'\", or
+--     \"'BS'\"), then the operator evaluates to true if it finds an exact
+--     match with any member of the set.
+--
+--     CONTAINS is supported for lists: When evaluating \"'a CONTAINS b'\",
+--     \"'a'\" can be a list; however, \"'b'\" cannot be a set, a map, or a
+--     list.
+--
+-- -   'NOT_CONTAINS' : Checks for absence of a subsequence, or absence of
+--     a value in a set.
+--
+--     /AttributeValueList/ can contain only one /AttributeValue/ element
+--     of type String, Number, or Binary (not a set type). If the target
+--     attribute of the comparison is a String, then the operator checks
+--     for the absence of a substring match. If the target attribute of the
+--     comparison is Binary, then the operator checks for the absence of a
+--     subsequence of the target that matches the input. If the target
+--     attribute of the comparison is a set (\"'SS'\", \"'NS'\", or
+--     \"'BS'\"), then the operator evaluates to true if it /does not/ find
+--     an exact match with any member of the set.
+--
+--     NOT_CONTAINS is supported for lists: When evaluating
+--     \"'a NOT CONTAINS b'\", \"'a'\" can be a list; however, \"'b'\"
+--     cannot be a set, a map, or a list.
+--
+-- -   'BEGINS_WITH' : Checks for a prefix.
+--
+--     /AttributeValueList/ can contain only one /AttributeValue/ of type
+--     String or Binary (not a Number or a set type). The target attribute
+--     of the comparison must be of type String or Binary (not a Number or
+--     a set type).
+--
+-- -   'IN' : Checks for matching elements within two sets.
+--
+--     /AttributeValueList/ can contain one or more /AttributeValue/
+--     elements of type String, Number, or Binary (not a set type). These
+--     attributes are compared against an existing set type attribute of an
+--     item. If any elements of the input set are present in the item
+--     attribute, the expression evaluates to true.
+--
+-- -   'BETWEEN' : Greater than or equal to the first value, and less than
+--     or equal to the second value.
+--
+--     /AttributeValueList/ must contain two /AttributeValue/ elements of
+--     the same type, either String, Number, or Binary (not a set type). A
+--     target attribute matches if the target value is greater than, or
+--     equal to, the first element and less than, or equal to, the second
+--     element. If an item contains an /AttributeValue/ element of a
+--     different type than the one provided in the request, the value does
+--     not match. For example, '{\"S\":\"6\"}' does not compare to
+--     '{\"N\":\"6\"}'. Also, '{\"N\":\"6\"}' does not compare to
+--     '{\"NS\":[\"6\", \"2\", \"1\"]}'
+--
+eavComparisonOperator :: Lens' ExpectedAttributeValue (Maybe ComparisonOperator)
+eavComparisonOperator = lens _eavComparisonOperator (\ s a -> s{_eavComparisonOperator = a});
+
+instance ToJSON ExpectedAttributeValue where
+        toJSON ExpectedAttributeValue'{..}
+          = object
+              ["AttributeValueList" .= _eavAttributeValueList,
+               "Exists" .= _eavExists, "Value" .= _eavValue,
+               "ComparisonOperator" .= _eavComparisonOperator]
+
+-- | Represents the properties of a global secondary index.
+--
+-- /See:/ 'globalSecondaryIndex' smart constructor.
+data GlobalSecondaryIndex = GlobalSecondaryIndex'
+    { _gsiIndexName             :: !Text
+    , _gsiKeySchema             :: !(List1 KeySchemaElement)
+    , _gsiProjection            :: !Projection
+    , _gsiProvisionedThroughput :: !ProvisionedThroughput
+    } deriving (Eq,Read,Show,Data,Typeable,Generic)
+
+-- | Creates a value of 'GlobalSecondaryIndex' with the minimum fields required to make a request.
+--
+-- Use one of the following lenses to modify other fields as desired:
+--
+-- * 'gsiIndexName'
+--
+-- * 'gsiKeySchema'
+--
+-- * 'gsiProjection'
+--
+-- * 'gsiProvisionedThroughput'
+globalSecondaryIndex
+    :: Text -- ^ 'gsiIndexName'
+    -> NonEmpty KeySchemaElement -- ^ 'gsiKeySchema'
+    -> Projection -- ^ 'gsiProjection'
+    -> ProvisionedThroughput -- ^ 'gsiProvisionedThroughput'
+    -> GlobalSecondaryIndex
+globalSecondaryIndex pIndexName_ pKeySchema_ pProjection_ pProvisionedThroughput_ =
+    GlobalSecondaryIndex'
+    { _gsiIndexName = pIndexName_
+    , _gsiKeySchema = _List1 # pKeySchema_
+    , _gsiProjection = pProjection_
+    , _gsiProvisionedThroughput = pProvisionedThroughput_
+    }
+
+-- | The name of the global secondary index. The name must be unique among
+-- all other indexes on this table.
+gsiIndexName :: Lens' GlobalSecondaryIndex Text
+gsiIndexName = lens _gsiIndexName (\ s a -> s{_gsiIndexName = a});
+
+-- | The complete key schema for a global secondary index, which consists of
+-- one or more pairs of attribute names and key types ('HASH' or 'RANGE').
+gsiKeySchema :: Lens' GlobalSecondaryIndex (NonEmpty KeySchemaElement)
+gsiKeySchema = lens _gsiKeySchema (\ s a -> s{_gsiKeySchema = a}) . _List1;
+
+-- | Undocumented member.
+gsiProjection :: Lens' GlobalSecondaryIndex Projection
+gsiProjection = lens _gsiProjection (\ s a -> s{_gsiProjection = a});
+
+-- | Undocumented member.
+gsiProvisionedThroughput :: Lens' GlobalSecondaryIndex ProvisionedThroughput
+gsiProvisionedThroughput = lens _gsiProvisionedThroughput (\ s a -> s{_gsiProvisionedThroughput = a});
+
+instance ToJSON GlobalSecondaryIndex where
+        toJSON GlobalSecondaryIndex'{..}
+          = object
+              ["IndexName" .= _gsiIndexName,
+               "KeySchema" .= _gsiKeySchema,
+               "Projection" .= _gsiProjection,
+               "ProvisionedThroughput" .= _gsiProvisionedThroughput]
+
+-- | Represents the properties of a global secondary index.
+--
+-- /See:/ 'globalSecondaryIndexDescription' smart constructor.
+data GlobalSecondaryIndexDescription = GlobalSecondaryIndexDescription'
+    { _gsidBackfilling           :: !(Maybe Bool)
+    , _gsidProvisionedThroughput :: !(Maybe ProvisionedThroughputDescription)
+    , _gsidIndexStatus           :: !(Maybe IndexStatus)
+    , _gsidIndexSizeBytes        :: !(Maybe Integer)
+    , _gsidIndexARN              :: !(Maybe Text)
+    , _gsidKeySchema             :: !(Maybe (List1 KeySchemaElement))
+    , _gsidProjection            :: !(Maybe Projection)
+    , _gsidItemCount             :: !(Maybe Integer)
+    , _gsidIndexName             :: !(Maybe Text)
+    } deriving (Eq,Read,Show,Data,Typeable,Generic)
+
+-- | Creates a value of 'GlobalSecondaryIndexDescription' with the minimum fields required to make a request.
+--
+-- Use one of the following lenses to modify other fields as desired:
+--
+-- * 'gsidBackfilling'
+--
+-- * 'gsidProvisionedThroughput'
+--
+-- * 'gsidIndexStatus'
+--
+-- * 'gsidIndexSizeBytes'
+--
+-- * 'gsidIndexARN'
+--
+-- * 'gsidKeySchema'
+--
+-- * 'gsidProjection'
+--
+-- * 'gsidItemCount'
+--
+-- * 'gsidIndexName'
+globalSecondaryIndexDescription
+    :: GlobalSecondaryIndexDescription
+globalSecondaryIndexDescription =
+    GlobalSecondaryIndexDescription'
+    { _gsidBackfilling = Nothing
+    , _gsidProvisionedThroughput = Nothing
+    , _gsidIndexStatus = Nothing
+    , _gsidIndexSizeBytes = Nothing
+    , _gsidIndexARN = Nothing
+    , _gsidKeySchema = Nothing
+    , _gsidProjection = Nothing
+    , _gsidItemCount = Nothing
+    , _gsidIndexName = Nothing
+    }
+
+-- | Indicates whether the index is currently backfilling. /Backfilling/ is
+-- the process of reading items from the table and determining whether they
+-- can be added to the index. (Not all items will qualify: For example, a
+-- hash key attribute cannot have any duplicates.) If an item can be added
+-- to the index, DynamoDB will do so. After all items have been processed,
+-- the backfilling operation is complete and /Backfilling/ is false.
+--
+-- For indexes that were created during a /CreateTable/ operation, the
+-- /Backfilling/ attribute does not appear in the /DescribeTable/ output.
+gsidBackfilling :: Lens' GlobalSecondaryIndexDescription (Maybe Bool)
+gsidBackfilling = lens _gsidBackfilling (\ s a -> s{_gsidBackfilling = a});
+
+-- | Undocumented member.
+gsidProvisionedThroughput :: Lens' GlobalSecondaryIndexDescription (Maybe ProvisionedThroughputDescription)
+gsidProvisionedThroughput = lens _gsidProvisionedThroughput (\ s a -> s{_gsidProvisionedThroughput = a});
+
+-- | The current state 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.
+--
+gsidIndexStatus :: Lens' GlobalSecondaryIndexDescription (Maybe IndexStatus)
+gsidIndexStatus = lens _gsidIndexStatus (\ s a -> s{_gsidIndexStatus = a});
+
+-- | The total size of the specified index, in bytes. DynamoDB updates this
+-- value approximately every six hours. Recent changes might not be
+-- reflected in this value.
+gsidIndexSizeBytes :: Lens' GlobalSecondaryIndexDescription (Maybe Integer)
+gsidIndexSizeBytes = lens _gsidIndexSizeBytes (\ s a -> s{_gsidIndexSizeBytes = a});
+
+-- | The Amazon Resource Name (ARN) that uniquely identifies the index.
+gsidIndexARN :: Lens' GlobalSecondaryIndexDescription (Maybe Text)
+gsidIndexARN = lens _gsidIndexARN (\ s a -> s{_gsidIndexARN = a});
+
+-- | The complete key schema for the global secondary index, consisting of
+-- one or more pairs of attribute names and key types ('HASH' or 'RANGE').
+gsidKeySchema :: Lens' GlobalSecondaryIndexDescription (Maybe (NonEmpty KeySchemaElement))
+gsidKeySchema = lens _gsidKeySchema (\ s a -> s{_gsidKeySchema = a}) . mapping _List1;
+
+-- | Undocumented member.
+gsidProjection :: Lens' GlobalSecondaryIndexDescription (Maybe Projection)
+gsidProjection = lens _gsidProjection (\ s a -> s{_gsidProjection = a});
+
+-- | The number of items in the specified index. DynamoDB updates this value
+-- approximately every six hours. Recent changes might not be reflected in
+-- this value.
+gsidItemCount :: Lens' GlobalSecondaryIndexDescription (Maybe Integer)
+gsidItemCount = lens _gsidItemCount (\ s a -> s{_gsidItemCount = a});
+
+-- | The name of the global secondary index.
+gsidIndexName :: Lens' GlobalSecondaryIndexDescription (Maybe Text)
+gsidIndexName = lens _gsidIndexName (\ s a -> s{_gsidIndexName = a});
+
+instance FromJSON GlobalSecondaryIndexDescription
+         where
+        parseJSON
+          = withObject "GlobalSecondaryIndexDescription"
+              (\ x ->
+                 GlobalSecondaryIndexDescription' <$>
+                   (x .:? "Backfilling") <*>
+                     (x .:? "ProvisionedThroughput")
+                     <*> (x .:? "IndexStatus")
+                     <*> (x .:? "IndexSizeBytes")
+                     <*> (x .:? "IndexArn")
+                     <*> (x .:? "KeySchema")
+                     <*> (x .:? "Projection")
+                     <*> (x .:? "ItemCount")
+                     <*> (x .:? "IndexName"))
+
+-- | Represents one of the following:
+--
+-- -   A new global secondary index to be added to an existing table.
+--
+-- -   New provisioned throughput parameters for an existing global
+--     secondary index.
+--
+-- -   An existing global secondary index to be removed from an existing
+--     table.
+--
+--
+-- /See:/ 'globalSecondaryIndexUpdate' smart constructor.
+data GlobalSecondaryIndexUpdate = GlobalSecondaryIndexUpdate'
+    { _gsiuCreate :: !(Maybe CreateGlobalSecondaryIndexAction)
+    , _gsiuDelete :: !(Maybe DeleteGlobalSecondaryIndexAction)
+    , _gsiuUpdate :: !(Maybe UpdateGlobalSecondaryIndexAction)
+    } deriving (Eq,Read,Show,Data,Typeable,Generic)
+
+-- | Creates a value of 'GlobalSecondaryIndexUpdate' with the minimum fields required to make a request.
+--
+-- Use one of the following lenses to modify other fields as desired:
+--
+-- * 'gsiuCreate'
+--
+-- * 'gsiuDelete'
+--
+-- * 'gsiuUpdate'
+globalSecondaryIndexUpdate
+    :: GlobalSecondaryIndexUpdate
+globalSecondaryIndexUpdate =
+    GlobalSecondaryIndexUpdate'
+    { _gsiuCreate = Nothing
+    , _gsiuDelete = Nothing
+    , _gsiuUpdate = Nothing
+    }
+
+-- | The parameters required for creating a global secondary index on an
+-- existing table:
+--
+-- -   'IndexName '
+--
+-- -   'KeySchema '
+--
+-- -   'AttributeDefinitions '
+--
+-- -   'Projection '
+--
+-- -   'ProvisionedThroughput '
+--
+gsiuCreate :: Lens' GlobalSecondaryIndexUpdate (Maybe CreateGlobalSecondaryIndexAction)
+gsiuCreate = lens _gsiuCreate (\ s a -> s{_gsiuCreate = a});
+
+-- | The name of an existing global secondary index to be removed.
+gsiuDelete :: Lens' GlobalSecondaryIndexUpdate (Maybe DeleteGlobalSecondaryIndexAction)
+gsiuDelete = lens _gsiuDelete (\ s a -> s{_gsiuDelete = a});
+
+-- | The name of an existing global secondary index, along with new
+-- provisioned throughput settings to be applied to that index.
+gsiuUpdate :: Lens' GlobalSecondaryIndexUpdate (Maybe UpdateGlobalSecondaryIndexAction)
+gsiuUpdate = lens _gsiuUpdate (\ s a -> s{_gsiuUpdate = a});
+
+instance ToJSON GlobalSecondaryIndexUpdate where
+        toJSON GlobalSecondaryIndexUpdate'{..}
+          = object
+              ["Create" .= _gsiuCreate, "Delete" .= _gsiuDelete,
+               "Update" .= _gsiuUpdate]
+
+-- | Information about item collections, if any, that were affected by the
+-- operation. /ItemCollectionMetrics/ is only returned if the request asked
+-- for it. If the table does not have any local secondary indexes, this
+-- information is not returned in the response.
+--
+-- /See:/ 'itemCollectionMetrics' smart constructor.
+data ItemCollectionMetrics = ItemCollectionMetrics'
+    { _icmItemCollectionKey   :: !(Maybe (Map Text AttributeValue))
+    , _icmSizeEstimateRangeGB :: !(Maybe [Double])
+    } deriving (Eq,Read,Show,Data,Typeable,Generic)
+
+-- | Creates a value of 'ItemCollectionMetrics' with the minimum fields required to make a request.
+--
+-- Use one of the following lenses to modify other fields as desired:
+--
+-- * 'icmItemCollectionKey'
+--
+-- * 'icmSizeEstimateRangeGB'
+itemCollectionMetrics
+    :: ItemCollectionMetrics
+itemCollectionMetrics =
+    ItemCollectionMetrics'
+    { _icmItemCollectionKey = Nothing
+    , _icmSizeEstimateRangeGB = Nothing
+    }
+
+-- | The hash key value of the item collection. This value is the same as the
+-- hash key of the item.
+icmItemCollectionKey :: Lens' ItemCollectionMetrics (HashMap Text AttributeValue)
+icmItemCollectionKey = lens _icmItemCollectionKey (\ s a -> s{_icmItemCollectionKey = a}) . _Default . _Map;
+
+-- | An estimate of item collection size, in gigabytes. This value is a
+-- two-element array containing a lower bound and an upper bound for the
+-- estimate. The estimate includes the size of all the items in the table,
+-- plus the size of all attributes projected into all of the local
+-- secondary indexes on that table. Use this estimate to measure whether a
+-- local secondary index is approaching its size limit.
+--
+-- The estimate is subject to change over time; therefore, do not rely on
+-- the precision or accuracy of the estimate.
+icmSizeEstimateRangeGB :: Lens' ItemCollectionMetrics [Double]
+icmSizeEstimateRangeGB = lens _icmSizeEstimateRangeGB (\ s a -> s{_icmSizeEstimateRangeGB = a}) . _Default . _Coerce;
+
+instance FromJSON ItemCollectionMetrics where
+        parseJSON
+          = withObject "ItemCollectionMetrics"
+              (\ x ->
+                 ItemCollectionMetrics' <$>
+                   (x .:? "ItemCollectionKey" .!= mempty) <*>
+                     (x .:? "SizeEstimateRangeGB" .!= mempty))
+
+-- | Represents /a single element/ of a key schema. A key schema specifies
+-- the attributes that make up the primary key of a table, or the key
+-- attributes of an index.
+--
+-- A /KeySchemaElement/ represents exactly one attribute of the primary
+-- key. For example, a hash type primary key would be represented by one
+-- /KeySchemaElement/. A hash-and-range type primary key would require one
+-- /KeySchemaElement/ for the hash attribute, and another
+-- /KeySchemaElement/ for the range attribute.
+--
+-- /See:/ 'keySchemaElement' smart constructor.
+data KeySchemaElement = KeySchemaElement'
+    { _kseAttributeName :: !Text
+    , _kseKeyType       :: !KeyType
+    } deriving (Eq,Read,Show,Data,Typeable,Generic)
+
+-- | Creates a value of 'KeySchemaElement' with the minimum fields required to make a request.
+--
+-- Use one of the following lenses to modify other fields as desired:
+--
+-- * 'kseAttributeName'
+--
+-- * 'kseKeyType'
+keySchemaElement
+    :: Text -- ^ 'kseAttributeName'
+    -> KeyType -- ^ 'kseKeyType'
+    -> KeySchemaElement
+keySchemaElement pAttributeName_ pKeyType_ =
+    KeySchemaElement'
+    { _kseAttributeName = pAttributeName_
+    , _kseKeyType = pKeyType_
+    }
+
+-- | The name of a key attribute.
+kseAttributeName :: Lens' KeySchemaElement Text
+kseAttributeName = lens _kseAttributeName (\ s a -> s{_kseAttributeName = a});
+
+-- | The attribute data, consisting of the data type and the attribute value
+-- itself.
+kseKeyType :: Lens' KeySchemaElement KeyType
+kseKeyType = lens _kseKeyType (\ s a -> s{_kseKeyType = a});
+
+instance FromJSON KeySchemaElement where
+        parseJSON
+          = withObject "KeySchemaElement"
+              (\ x ->
+                 KeySchemaElement' <$>
+                   (x .: "AttributeName") <*> (x .: "KeyType"))
+
+instance ToJSON KeySchemaElement where
+        toJSON KeySchemaElement'{..}
+          = object
+              ["AttributeName" .= _kseAttributeName,
+               "KeyType" .= _kseKeyType]
+
+-- | Represents a set of primary keys and, for each key, the attributes to
+-- retrieve from the table.
+--
+-- For each primary key, you must provide /all/ of the key attributes. For
+-- example, with a hash type primary key, you only need to provide the hash
+-- attribute. For a hash-and-range type primary key, you must provide
+-- /both/ the hash attribute and the range attribute.
+--
+-- /See:/ 'keysAndAttributes' smart constructor.
+data KeysAndAttributes = KeysAndAttributes'
+    { _kaaProjectionExpression     :: !(Maybe Text)
+    , _kaaConsistentRead           :: !(Maybe Bool)
+    , _kaaExpressionAttributeNames :: !(Maybe (Map Text Text))
+    , _kaaAttributesToGet          :: !(Maybe (List1 Text))
+    , _kaaKeys                     :: !(List1 (Map Text AttributeValue))
+    } deriving (Eq,Read,Show,Data,Typeable,Generic)
+
+-- | Creates a value of 'KeysAndAttributes' with the minimum fields required to make a request.
+--
+-- Use one of the following lenses to modify other fields as desired:
+--
+-- * 'kaaProjectionExpression'
+--
+-- * 'kaaConsistentRead'
+--
+-- * 'kaaExpressionAttributeNames'
+--
+-- * 'kaaAttributesToGet'
+--
+-- * 'kaaKeys'
+keysAndAttributes
+    :: NonEmpty (HashMap Text AttributeValue) -- ^ 'kaaKeys'
+    -> KeysAndAttributes
+keysAndAttributes pKeys_ =
+    KeysAndAttributes'
+    { _kaaProjectionExpression = Nothing
+    , _kaaConsistentRead = Nothing
+    , _kaaExpressionAttributeNames = Nothing
+    , _kaaAttributesToGet = Nothing
+    , _kaaKeys = _List1 # pKeys_
+    }
+
+-- | A string that identifies one or more attributes to retrieve from the
+-- table. These attributes can include scalars, sets, or elements of a JSON
+-- document. The attributes in the /ProjectionExpression/ must be separated
+-- by commas.
+--
+-- If no attribute names are specified, then all attributes will be
+-- returned. If any of the requested attributes are not found, they will
+-- not appear in the result.
+--
+-- For more information, see
+-- <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.AccessingItemAttributes.html Accessing Item Attributes>
+-- in the /Amazon DynamoDB Developer Guide/.
+--
+-- /ProjectionExpression/ replaces the legacy /AttributesToGet/ parameter.
+kaaProjectionExpression :: Lens' KeysAndAttributes (Maybe Text)
+kaaProjectionExpression = lens _kaaProjectionExpression (\ s a -> s{_kaaProjectionExpression = a});
+
+-- | The consistency of a read operation. If set to 'true', then a strongly
+-- consistent read is used; otherwise, an eventually consistent read is
+-- used.
+kaaConsistentRead :: Lens' KeysAndAttributes (Maybe Bool)
+kaaConsistentRead = lens _kaaConsistentRead (\ s a -> s{_kaaConsistentRead = a});
+
+-- | One or more substitution tokens for attribute names in an expression.
+-- The following are some use cases for using /ExpressionAttributeNames/:
+--
+-- -   To access an attribute whose name conflicts with a DynamoDB reserved
+--     word.
+--
+-- -   To create a placeholder for repeating occurrences of an attribute
+--     name in an expression.
+--
+-- -   To prevent special characters in an attribute name from being
+--     misinterpreted in an expression.
+--
+-- Use the __#__ character in an expression to dereference an attribute
+-- name. For example, consider the following attribute name:
+--
+-- -   'Percentile'
+--
+-- The name of this attribute conflicts with a reserved word, so it cannot
+-- be used directly in an expression. (For the complete list of reserved
+-- words, see
+-- <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ReservedWords.html Reserved Words>
+-- in the /Amazon DynamoDB Developer Guide/). To work around this, you
+-- could specify the following for /ExpressionAttributeNames/:
+--
+-- -   '{\"#P\":\"Percentile\"}'
+--
+-- You could then use this substitution in an expression, as in this
+-- example:
+--
+-- -   '#P = :val'
+--
+-- Tokens that begin with the __:__ character are /expression attribute
+-- values/, which are placeholders for the actual value at runtime.
+--
+-- For more information on expression attribute names, see
+-- <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.AccessingItemAttributes.html Accessing Item Attributes>
+-- in the /Amazon DynamoDB Developer Guide/.
+kaaExpressionAttributeNames :: Lens' KeysAndAttributes (HashMap Text Text)
+kaaExpressionAttributeNames = lens _kaaExpressionAttributeNames (\ s a -> s{_kaaExpressionAttributeNames = a}) . _Default . _Map;
+
+-- | One or more attributes to retrieve from the table or index. If no
+-- attribute names are specified then all attributes will be returned. If
+-- any of the specified attributes are not found, they will not appear in
+-- the result.
+kaaAttributesToGet :: Lens' KeysAndAttributes (Maybe (NonEmpty Text))
+kaaAttributesToGet = lens _kaaAttributesToGet (\ s a -> s{_kaaAttributesToGet = a}) . mapping _List1;
+
+-- | The primary key attribute values that define the items and the
+-- attributes associated with the items.
+kaaKeys :: Lens' KeysAndAttributes (NonEmpty (HashMap Text AttributeValue))
+kaaKeys = lens _kaaKeys (\ s a -> s{_kaaKeys = a}) . _List1;
+
+instance FromJSON KeysAndAttributes where
+        parseJSON
+          = withObject "KeysAndAttributes"
+              (\ x ->
+                 KeysAndAttributes' <$>
+                   (x .:? "ProjectionExpression") <*>
+                     (x .:? "ConsistentRead")
+                     <*> (x .:? "ExpressionAttributeNames" .!= mempty)
+                     <*> (x .:? "AttributesToGet")
+                     <*> (x .: "Keys"))
+
+instance ToJSON KeysAndAttributes where
+        toJSON KeysAndAttributes'{..}
+          = object
+              ["ProjectionExpression" .= _kaaProjectionExpression,
+               "ConsistentRead" .= _kaaConsistentRead,
+               "ExpressionAttributeNames" .=
+                 _kaaExpressionAttributeNames,
+               "AttributesToGet" .= _kaaAttributesToGet,
+               "Keys" .= _kaaKeys]
+
+-- | Represents the properties of a local secondary index.
+--
+-- /See:/ 'localSecondaryIndex' smart constructor.
+data LocalSecondaryIndex = LocalSecondaryIndex'
+    { _lsiIndexName  :: !Text
+    , _lsiKeySchema  :: !(List1 KeySchemaElement)
+    , _lsiProjection :: !Projection
+    } deriving (Eq,Read,Show,Data,Typeable,Generic)
+
+-- | Creates a value of 'LocalSecondaryIndex' with the minimum fields required to make a request.
+--
+-- Use one of the following lenses to modify other fields as desired:
+--
+-- * 'lsiIndexName'
+--
+-- * 'lsiKeySchema'
+--
+-- * 'lsiProjection'
+localSecondaryIndex
+    :: Text -- ^ 'lsiIndexName'
+    -> NonEmpty KeySchemaElement -- ^ 'lsiKeySchema'
+    -> Projection -- ^ 'lsiProjection'
+    -> LocalSecondaryIndex
+localSecondaryIndex pIndexName_ pKeySchema_ pProjection_ =
+    LocalSecondaryIndex'
+    { _lsiIndexName = pIndexName_
+    , _lsiKeySchema = _List1 # pKeySchema_
+    , _lsiProjection = pProjection_
+    }
+
+-- | The name of the local secondary index. The name must be unique among all
+-- other indexes on this table.
+lsiIndexName :: Lens' LocalSecondaryIndex Text
+lsiIndexName = lens _lsiIndexName (\ s a -> s{_lsiIndexName = a});
+
+-- | The complete key schema for the local secondary index, consisting of one
+-- or more pairs of attribute names and key types ('HASH' or 'RANGE').
+lsiKeySchema :: Lens' LocalSecondaryIndex (NonEmpty KeySchemaElement)
+lsiKeySchema = lens _lsiKeySchema (\ s a -> s{_lsiKeySchema = a}) . _List1;
+
+-- | Undocumented member.
+lsiProjection :: Lens' LocalSecondaryIndex Projection
+lsiProjection = lens _lsiProjection (\ s a -> s{_lsiProjection = a});
+
+instance ToJSON LocalSecondaryIndex where
+        toJSON LocalSecondaryIndex'{..}
+          = object
+              ["IndexName" .= _lsiIndexName,
+               "KeySchema" .= _lsiKeySchema,
+               "Projection" .= _lsiProjection]
+
+-- | Represents the properties of a local secondary index.
+--
+-- /See:/ 'localSecondaryIndexDescription' smart constructor.
+data LocalSecondaryIndexDescription = LocalSecondaryIndexDescription'
+    { _lsidIndexSizeBytes :: !(Maybe Integer)
+    , _lsidIndexARN       :: !(Maybe Text)
+    , _lsidKeySchema      :: !(Maybe (List1 KeySchemaElement))
+    , _lsidProjection     :: !(Maybe Projection)
+    , _lsidItemCount      :: !(Maybe Integer)
+    , _lsidIndexName      :: !(Maybe Text)
+    } deriving (Eq,Read,Show,Data,Typeable,Generic)
+
+-- | Creates a value of 'LocalSecondaryIndexDescription' with the minimum fields required to make a request.
+--
+-- Use one of the following lenses to modify other fields as desired:
+--
+-- * 'lsidIndexSizeBytes'
+--
+-- * 'lsidIndexARN'
+--
+-- * 'lsidKeySchema'
+--
+-- * 'lsidProjection'
+--
+-- * 'lsidItemCount'
+--
+-- * 'lsidIndexName'
+localSecondaryIndexDescription
+    :: LocalSecondaryIndexDescription
+localSecondaryIndexDescription =
+    LocalSecondaryIndexDescription'
+    { _lsidIndexSizeBytes = Nothing
+    , _lsidIndexARN = Nothing
+    , _lsidKeySchema = Nothing
+    , _lsidProjection = Nothing
+    , _lsidItemCount = Nothing
+    , _lsidIndexName = Nothing
+    }
+
+-- | The total size of the specified index, in bytes. DynamoDB updates this
+-- value approximately every six hours. Recent changes might not be
+-- reflected in this value.
+lsidIndexSizeBytes :: Lens' LocalSecondaryIndexDescription (Maybe Integer)
+lsidIndexSizeBytes = lens _lsidIndexSizeBytes (\ s a -> s{_lsidIndexSizeBytes = a});
+
+-- | The Amazon Resource Name (ARN) that uniquely identifies the index.
+lsidIndexARN :: Lens' LocalSecondaryIndexDescription (Maybe Text)
+lsidIndexARN = lens _lsidIndexARN (\ s a -> s{_lsidIndexARN = a});
+
+-- | The complete index key schema, which consists of one or more pairs of
+-- attribute names and key types ('HASH' or 'RANGE').
+lsidKeySchema :: Lens' LocalSecondaryIndexDescription (Maybe (NonEmpty KeySchemaElement))
+lsidKeySchema = lens _lsidKeySchema (\ s a -> s{_lsidKeySchema = a}) . mapping _List1;
+
+-- | Undocumented member.
+lsidProjection :: Lens' LocalSecondaryIndexDescription (Maybe Projection)
+lsidProjection = lens _lsidProjection (\ s a -> s{_lsidProjection = a});
+
+-- | The number of items in the specified index. DynamoDB updates this value
+-- approximately every six hours. Recent changes might not be reflected in
+-- this value.
+lsidItemCount :: Lens' LocalSecondaryIndexDescription (Maybe Integer)
+lsidItemCount = lens _lsidItemCount (\ s a -> s{_lsidItemCount = a});
+
+-- | Represents the name of the local secondary index.
+lsidIndexName :: Lens' LocalSecondaryIndexDescription (Maybe Text)
+lsidIndexName = lens _lsidIndexName (\ s a -> s{_lsidIndexName = a});
+
+instance FromJSON LocalSecondaryIndexDescription
+         where
+        parseJSON
+          = withObject "LocalSecondaryIndexDescription"
+              (\ x ->
+                 LocalSecondaryIndexDescription' <$>
+                   (x .:? "IndexSizeBytes") <*> (x .:? "IndexArn") <*>
+                     (x .:? "KeySchema")
+                     <*> (x .:? "Projection")
+                     <*> (x .:? "ItemCount")
+                     <*> (x .:? "IndexName"))
+
+-- | Represents attributes that are copied (projected) from the table into an
+-- index. These are in addition to the primary key attributes and index key
+-- attributes, which are automatically projected.
+--
+-- /See:/ 'projection' smart constructor.
+data Projection = Projection'
+    { _pProjectionType   :: !(Maybe ProjectionType)
+    , _pNonKeyAttributes :: !(Maybe (List1 Text))
+    } deriving (Eq,Read,Show,Data,Typeable,Generic)
+
+-- | Creates a value of 'Projection' with the minimum fields required to make a request.
+--
+-- Use one of the following lenses to modify other fields as desired:
+--
+-- * 'pProjectionType'
+--
+-- * 'pNonKeyAttributes'
+projection
+    :: Projection
+projection =
+    Projection'
+    { _pProjectionType = Nothing
+    , _pNonKeyAttributes = Nothing
+    }
+
+-- | The set of attributes that are projected into the index:
+--
+-- -   '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 are in
+--     /NonKeyAttributes/.
+--
+-- -   'ALL' - All of the table attributes are projected into the index.
+--
+pProjectionType :: Lens' Projection (Maybe ProjectionType)
+pProjectionType = lens _pProjectionType (\ s a -> s{_pProjectionType = a});
+
+-- | Represents the non-key attribute names which will be projected into the
+-- index.
+--
+-- For local secondary indexes, the total count of /NonKeyAttributes/
+-- summed across all of the local 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.
+pNonKeyAttributes :: Lens' Projection (Maybe (NonEmpty Text))
+pNonKeyAttributes = lens _pNonKeyAttributes (\ s a -> s{_pNonKeyAttributes = a}) . mapping _List1;
+
+instance FromJSON Projection where
+        parseJSON
+          = withObject "Projection"
+              (\ x ->
+                 Projection' <$>
+                   (x .:? "ProjectionType") <*>
+                     (x .:? "NonKeyAttributes"))
+
+instance ToJSON Projection where
+        toJSON Projection'{..}
+          = object
+              ["ProjectionType" .= _pProjectionType,
+               "NonKeyAttributes" .= _pNonKeyAttributes]
+
+-- | Represents the provisioned throughput settings for a specified table or
+-- index. The settings can be modified using the /UpdateTable/ operation.
+--
+-- For current minimum and maximum provisioned throughput values, see
+-- <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Limits.html Limits>
+-- in the /Amazon DynamoDB Developer Guide/.
+--
+-- /See:/ 'provisionedThroughput' smart constructor.
+data ProvisionedThroughput = ProvisionedThroughput'
+    { _ptReadCapacityUnits  :: !Nat
+    , _ptWriteCapacityUnits :: !Nat
+    } deriving (Eq,Read,Show,Data,Typeable,Generic)
+
+-- | Creates a value of 'ProvisionedThroughput' with the minimum fields required to make a request.
+--
+-- Use one of the following lenses to modify other fields as desired:
+--
+-- * 'ptReadCapacityUnits'
+--
+-- * 'ptWriteCapacityUnits'
+provisionedThroughput
+    :: Natural -- ^ 'ptReadCapacityUnits'
+    -> Natural -- ^ 'ptWriteCapacityUnits'
+    -> ProvisionedThroughput
+provisionedThroughput pReadCapacityUnits_ pWriteCapacityUnits_ =
+    ProvisionedThroughput'
+    { _ptReadCapacityUnits = _Nat # pReadCapacityUnits_
+    , _ptWriteCapacityUnits = _Nat # pWriteCapacityUnits_
+    }
+
+-- | The maximum number of strongly consistent reads consumed per second
+-- before DynamoDB returns a /ThrottlingException/. For more information,
+-- see
+-- <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithTables.html#ProvisionedThroughput Specifying Read and Write Requirements>
+-- in the /Amazon DynamoDB Developer Guide/.
+ptReadCapacityUnits :: Lens' ProvisionedThroughput Natural
+ptReadCapacityUnits = lens _ptReadCapacityUnits (\ s a -> s{_ptReadCapacityUnits = a}) . _Nat;
+
+-- | The maximum number of writes consumed per second before DynamoDB returns
+-- a /ThrottlingException/. For more information, see
+-- <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithTables.html#ProvisionedThroughput Specifying Read and Write Requirements>
+-- in the /Amazon DynamoDB Developer Guide/.
+ptWriteCapacityUnits :: Lens' ProvisionedThroughput Natural
+ptWriteCapacityUnits = lens _ptWriteCapacityUnits (\ s a -> s{_ptWriteCapacityUnits = a}) . _Nat;
+
+instance ToJSON ProvisionedThroughput where
+        toJSON ProvisionedThroughput'{..}
+          = object
+              ["ReadCapacityUnits" .= _ptReadCapacityUnits,
+               "WriteCapacityUnits" .= _ptWriteCapacityUnits]
+
+-- | Represents the provisioned throughput settings for the table, consisting
+-- of read and write capacity units, along with data about increases and
+-- decreases.
+--
+-- /See:/ 'provisionedThroughputDescription' smart constructor.
+data ProvisionedThroughputDescription = ProvisionedThroughputDescription'
+    { _ptdReadCapacityUnits      :: !(Maybe Nat)
+    , _ptdLastDecreaseDateTime   :: !(Maybe POSIX)
+    , _ptdWriteCapacityUnits     :: !(Maybe Nat)
+    , _ptdNumberOfDecreasesToday :: !(Maybe Nat)
+    , _ptdLastIncreaseDateTime   :: !(Maybe POSIX)
+    } deriving (Eq,Read,Show,Data,Typeable,Generic)
+
+-- | Creates a value of 'ProvisionedThroughputDescription' with the minimum fields required to make a request.
+--
+-- Use one of the following lenses to modify other fields as desired:
+--
+-- * 'ptdReadCapacityUnits'
+--
+-- * 'ptdLastDecreaseDateTime'
+--
+-- * 'ptdWriteCapacityUnits'
+--
+-- * 'ptdNumberOfDecreasesToday'
+--
+-- * 'ptdLastIncreaseDateTime'
+provisionedThroughputDescription
+    :: ProvisionedThroughputDescription
+provisionedThroughputDescription =
+    ProvisionedThroughputDescription'
+    { _ptdReadCapacityUnits = Nothing
+    , _ptdLastDecreaseDateTime = Nothing
+    , _ptdWriteCapacityUnits = Nothing
+    , _ptdNumberOfDecreasesToday = Nothing
+    , _ptdLastIncreaseDateTime = Nothing
+    }
+
+-- | The maximum number of strongly consistent reads consumed per second
+-- before DynamoDB returns a /ThrottlingException/. Eventually consistent
+-- reads require less effort than strongly consistent reads, so a setting
+-- of 50 /ReadCapacityUnits/ per second provides 100 eventually consistent
+-- /ReadCapacityUnits/ per second.
+ptdReadCapacityUnits :: Lens' ProvisionedThroughputDescription (Maybe Natural)
+ptdReadCapacityUnits = lens _ptdReadCapacityUnits (\ s a -> s{_ptdReadCapacityUnits = a}) . mapping _Nat;
+
+-- | The date and time of the last provisioned throughput decrease for this
+-- table.
+ptdLastDecreaseDateTime :: Lens' ProvisionedThroughputDescription (Maybe UTCTime)
+ptdLastDecreaseDateTime = lens _ptdLastDecreaseDateTime (\ s a -> s{_ptdLastDecreaseDateTime = a}) . mapping _Time;
+
+-- | The maximum number of writes consumed per second before DynamoDB returns
+-- a /ThrottlingException/.
+ptdWriteCapacityUnits :: Lens' ProvisionedThroughputDescription (Maybe Natural)
+ptdWriteCapacityUnits = lens _ptdWriteCapacityUnits (\ s a -> s{_ptdWriteCapacityUnits = a}) . mapping _Nat;
+
+-- | The number of provisioned throughput decreases for this table during
+-- this UTC calendar day. For current maximums on provisioned throughput
+-- decreases, see
+-- <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Limits.html Limits>
+-- in the /Amazon DynamoDB Developer Guide/.
+ptdNumberOfDecreasesToday :: Lens' ProvisionedThroughputDescription (Maybe Natural)
+ptdNumberOfDecreasesToday = lens _ptdNumberOfDecreasesToday (\ s a -> s{_ptdNumberOfDecreasesToday = a}) . mapping _Nat;
+
+-- | The date and time of the last provisioned throughput increase for this
+-- table.
+ptdLastIncreaseDateTime :: Lens' ProvisionedThroughputDescription (Maybe UTCTime)
+ptdLastIncreaseDateTime = lens _ptdLastIncreaseDateTime (\ s a -> s{_ptdLastIncreaseDateTime = a}) . mapping _Time;
+
+instance FromJSON ProvisionedThroughputDescription
+         where
+        parseJSON
+          = withObject "ProvisionedThroughputDescription"
+              (\ x ->
+                 ProvisionedThroughputDescription' <$>
+                   (x .:? "ReadCapacityUnits") <*>
+                     (x .:? "LastDecreaseDateTime")
+                     <*> (x .:? "WriteCapacityUnits")
+                     <*> (x .:? "NumberOfDecreasesToday")
+                     <*> (x .:? "LastIncreaseDateTime"))
+
+-- | Represents a request to perform a /PutItem/ operation on an item.
+--
+-- /See:/ 'putRequest' smart constructor.
+newtype PutRequest = PutRequest'
+    { _prItem :: Map Text AttributeValue
+    } deriving (Eq,Read,Show,Data,Typeable,Generic)
+
+-- | Creates a value of 'PutRequest' with the minimum fields required to make a request.
+--
+-- Use one of the following lenses to modify other fields as desired:
+--
+-- * 'prItem'
+putRequest
+    :: PutRequest
+putRequest =
+    PutRequest'
+    { _prItem = mempty
+    }
+
+-- | A map of attribute name to attribute values, representing the primary
+-- key of an item to be processed by /PutItem/. All of the table\'s primary
+-- key attributes must be specified, and their data types must match those
+-- of the table\'s key schema. If any attributes are present in the item
+-- which are part of an index key schema for the table, their types must
+-- match the index key schema.
+prItem :: Lens' PutRequest (HashMap Text AttributeValue)
+prItem = lens _prItem (\ s a -> s{_prItem = a}) . _Map;
+
+instance FromJSON PutRequest where
+        parseJSON
+          = withObject "PutRequest"
+              (\ x -> PutRequest' <$> (x .:? "Item" .!= mempty))
+
+instance ToJSON PutRequest where
+        toJSON PutRequest'{..} = object ["Item" .= _prItem]
+
+-- | Represents the DynamoDB Streams configuration for a table in DynamoDB.
+--
+-- /See:/ 'streamSpecification' smart constructor.
+data StreamSpecification = StreamSpecification'
+    { _ssStreamEnabled  :: !(Maybe Bool)
+    , _ssStreamViewType :: !(Maybe StreamViewType)
+    } deriving (Eq,Read,Show,Data,Typeable,Generic)
+
+-- | Creates a value of 'StreamSpecification' with the minimum fields required to make a request.
+--
+-- Use one of the following lenses to modify other fields as desired:
+--
+-- * 'ssStreamEnabled'
+--
+-- * 'ssStreamViewType'
+streamSpecification
+    :: StreamSpecification
+streamSpecification =
+    StreamSpecification'
+    { _ssStreamEnabled = Nothing
+    , _ssStreamViewType = Nothing
+    }
+
+-- | Indicates whether DynamoDB Streams is enabled (true) or disabled (false)
+-- on the table.
+ssStreamEnabled :: Lens' StreamSpecification (Maybe Bool)
+ssStreamEnabled = lens _ssStreamEnabled (\ s a -> s{_ssStreamEnabled = a});
+
+-- | The DynamoDB Streams settings for the table. These settings consist of:
+--
+-- -   /StreamEnabled/ - Indicates whether DynamoDB Streams is enabled
+--     (true) or disabled (false) on the table.
+--
+-- -   /StreamViewType/ - When an item in the table is modified,
+--     /StreamViewType/ determines what information is written to the
+--     stream for this table. Valid values for /StreamViewType/ are:
+--
+--     -   /KEYS_ONLY/ - Only the key attributes of the modified item are
+--         written to the stream.
+--
+--     -   /NEW_IMAGE/ - The entire item, as it appears after it was
+--         modified, is written to the stream.
+--
+--     -   /OLD_IMAGE/ - The entire item, as it appeared before it was
+--         modified, is written to the stream.
+--
+--     -   /NEW_AND_OLD_IMAGES/ - Both the new and the old item images of
+--         the item are written to the stream.
+--
+ssStreamViewType :: Lens' StreamSpecification (Maybe StreamViewType)
+ssStreamViewType = lens _ssStreamViewType (\ s a -> s{_ssStreamViewType = a});
+
+instance FromJSON StreamSpecification where
+        parseJSON
+          = withObject "StreamSpecification"
+              (\ x ->
+                 StreamSpecification' <$>
+                   (x .:? "StreamEnabled") <*> (x .:? "StreamViewType"))
+
+instance ToJSON StreamSpecification where
+        toJSON StreamSpecification'{..}
+          = object
+              ["StreamEnabled" .= _ssStreamEnabled,
+               "StreamViewType" .= _ssStreamViewType]
+
+-- | Represents the properties of a table.
+--
+-- /See:/ 'tableDescription' smart constructor.
+data TableDescription = TableDescription'
+    { _tdProvisionedThroughput  :: !(Maybe ProvisionedThroughputDescription)
+    , _tdAttributeDefinitions   :: !(Maybe [AttributeDefinition])
+    , _tdLatestStreamARN        :: !(Maybe Text)
+    , _tdTableSizeBytes         :: !(Maybe Integer)
+    , _tdTableStatus            :: !(Maybe TableStatus)
+    , _tdTableARN               :: !(Maybe Text)
+    , _tdKeySchema              :: !(Maybe (List1 KeySchemaElement))
+    , _tdLatestStreamLabel      :: !(Maybe Text)
+    , _tdGlobalSecondaryIndexes :: !(Maybe [GlobalSecondaryIndexDescription])
+    , _tdLocalSecondaryIndexes  :: !(Maybe [LocalSecondaryIndexDescription])
+    , _tdCreationDateTime       :: !(Maybe POSIX)
+    , _tdItemCount              :: !(Maybe Integer)
+    , _tdTableName              :: !(Maybe Text)
+    , _tdStreamSpecification    :: !(Maybe StreamSpecification)
+    } deriving (Eq,Read,Show,Data,Typeable,Generic)
+
+-- | Creates a value of 'TableDescription' with the minimum fields required to make a request.
+--
+-- Use one of the following lenses to modify other fields as desired:
+--
+-- * 'tdProvisionedThroughput'
+--
+-- * 'tdAttributeDefinitions'
+--
+-- * 'tdLatestStreamARN'
+--
+-- * 'tdTableSizeBytes'
+--
+-- * 'tdTableStatus'
+--
+-- * 'tdTableARN'
+--
+-- * 'tdKeySchema'
+--
+-- * 'tdLatestStreamLabel'
+--
+-- * 'tdGlobalSecondaryIndexes'
+--
+-- * 'tdLocalSecondaryIndexes'
+--
+-- * 'tdCreationDateTime'
+--
+-- * 'tdItemCount'
+--
+-- * 'tdTableName'
+--
+-- * 'tdStreamSpecification'
+tableDescription
+    :: TableDescription
+tableDescription =
+    TableDescription'
+    { _tdProvisionedThroughput = Nothing
+    , _tdAttributeDefinitions = Nothing
+    , _tdLatestStreamARN = Nothing
+    , _tdTableSizeBytes = Nothing
+    , _tdTableStatus = Nothing
+    , _tdTableARN = Nothing
+    , _tdKeySchema = Nothing
+    , _tdLatestStreamLabel = Nothing
+    , _tdGlobalSecondaryIndexes = Nothing
+    , _tdLocalSecondaryIndexes = Nothing
+    , _tdCreationDateTime = Nothing
+    , _tdItemCount = Nothing
+    , _tdTableName = Nothing
+    , _tdStreamSpecification = Nothing
+    }
+
+-- | The provisioned throughput settings for the table, consisting of read
+-- and write capacity units, along with data about increases and decreases.
+tdProvisionedThroughput :: Lens' TableDescription (Maybe ProvisionedThroughputDescription)
+tdProvisionedThroughput = lens _tdProvisionedThroughput (\ s a -> s{_tdProvisionedThroughput = a});
+
+-- | 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.
+--
+tdAttributeDefinitions :: Lens' TableDescription [AttributeDefinition]
+tdAttributeDefinitions = lens _tdAttributeDefinitions (\ s a -> s{_tdAttributeDefinitions = a}) . _Default . _Coerce;
+
+-- | The Amazon Resource Name (ARN) that uniquely identifies the latest
+-- stream for this table.
+tdLatestStreamARN :: Lens' TableDescription (Maybe Text)
+tdLatestStreamARN = lens _tdLatestStreamARN (\ s a -> s{_tdLatestStreamARN = a});
+
+-- | 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.
+tdTableSizeBytes :: Lens' TableDescription (Maybe Integer)
+tdTableSizeBytes = lens _tdTableSizeBytes (\ s a -> s{_tdTableSizeBytes = a});
+
+-- | 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.
+--
+tdTableStatus :: Lens' TableDescription (Maybe TableStatus)
+tdTableStatus = lens _tdTableStatus (\ s a -> s{_tdTableStatus = a});
+
+-- | The Amazon Resource Name (ARN) that uniquely identifies the table.
+tdTableARN :: Lens' TableDescription (Maybe Text)
+tdTableARN = lens _tdTableARN (\ s a -> s{_tdTableARN = a});
+
+-- | The primary key structure for the table. Each /KeySchemaElement/
+-- consists of:
+--
+-- -   /AttributeName/ - The name of the attribute.
+--
+-- -   /KeyType/ - The key type for the attribute. Can be either 'HASH' or
+--     'RANGE'.
+--
+-- For more information about primary keys, see
+-- <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DataModel.html#DataModelPrimaryKey Primary Key>
+-- in the /Amazon DynamoDB Developer Guide/.
+tdKeySchema :: Lens' TableDescription (Maybe (NonEmpty KeySchemaElement))
+tdKeySchema = lens _tdKeySchema (\ s a -> s{_tdKeySchema = a}) . mapping _List1;
+
+-- | 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:
+--
+-- -   the AWS customer ID.
+--
+-- -   the table name.
+--
+-- -   the /StreamLabel/.
+--
+tdLatestStreamLabel :: Lens' TableDescription (Maybe Text)
+tdLatestStreamLabel = lens _tdLatestStreamLabel (\ s a -> s{_tdLatestStreamLabel = a});
+
+-- | The global secondary indexes, if any, on the table. Each index is scoped
+-- to a given hash 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.)
+--
+-- -   /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 hash key
+--     attribute 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
+--             are 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.
+--
+-- -   /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.
+tdGlobalSecondaryIndexes :: Lens' TableDescription [GlobalSecondaryIndexDescription]
+tdGlobalSecondaryIndexes = lens _tdGlobalSecondaryIndexes (\ s a -> s{_tdGlobalSecondaryIndexes = a}) . _Default . _Coerce;
+
+-- | Represents one or more local secondary indexes on the table. Each index
+-- is scoped to a given hash 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 hash key
+--     attribute 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
+--             are 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.
+tdLocalSecondaryIndexes :: Lens' TableDescription [LocalSecondaryIndexDescription]
+tdLocalSecondaryIndexes = lens _tdLocalSecondaryIndexes (\ s a -> s{_tdLocalSecondaryIndexes = a}) . _Default . _Coerce;
+
+-- | The date and time when the table was created, in
+-- <http://www.epochconverter.com/ UNIX epoch time> format.
+tdCreationDateTime :: Lens' TableDescription (Maybe UTCTime)
+tdCreationDateTime = lens _tdCreationDateTime (\ s a -> s{_tdCreationDateTime = a}) . mapping _Time;
+
+-- | 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.
+tdItemCount :: Lens' TableDescription (Maybe Integer)
+tdItemCount = lens _tdItemCount (\ s a -> s{_tdItemCount = a});
+
+-- | The name of the table.
+tdTableName :: Lens' TableDescription (Maybe Text)
+tdTableName = lens _tdTableName (\ s a -> s{_tdTableName = a});
+
+-- | The current DynamoDB Streams configuration for the table.
+tdStreamSpecification :: Lens' TableDescription (Maybe StreamSpecification)
+tdStreamSpecification = lens _tdStreamSpecification (\ s a -> s{_tdStreamSpecification = a});
+
+instance FromJSON TableDescription where
+        parseJSON
+          = withObject "TableDescription"
+              (\ x ->
+                 TableDescription' <$>
+                   (x .:? "ProvisionedThroughput") <*>
+                     (x .:? "AttributeDefinitions" .!= mempty)
+                     <*> (x .:? "LatestStreamArn")
+                     <*> (x .:? "TableSizeBytes")
+                     <*> (x .:? "TableStatus")
+                     <*> (x .:? "TableArn")
+                     <*> (x .:? "KeySchema")
+                     <*> (x .:? "LatestStreamLabel")
+                     <*> (x .:? "GlobalSecondaryIndexes" .!= mempty)
+                     <*> (x .:? "LocalSecondaryIndexes" .!= mempty)
+                     <*> (x .:? "CreationDateTime")
+                     <*> (x .:? "ItemCount")
+                     <*> (x .:? "TableName")
+                     <*> (x .:? "StreamSpecification"))
+
+-- | Represents the new provisioned throughput settings to be applied to a
+-- global secondary index.
+--
+-- /See:/ 'updateGlobalSecondaryIndexAction' smart constructor.
+data UpdateGlobalSecondaryIndexAction = UpdateGlobalSecondaryIndexAction'
+    { _ugsiaIndexName             :: !Text
+    , _ugsiaProvisionedThroughput :: !ProvisionedThroughput
+    } deriving (Eq,Read,Show,Data,Typeable,Generic)
+
+-- | Creates a value of 'UpdateGlobalSecondaryIndexAction' with the minimum fields required to make a request.
+--
+-- Use one of the following lenses to modify other fields as desired:
+--
+-- * 'ugsiaIndexName'
+--
+-- * 'ugsiaProvisionedThroughput'
+updateGlobalSecondaryIndexAction
+    :: Text -- ^ 'ugsiaIndexName'
+    -> ProvisionedThroughput -- ^ 'ugsiaProvisionedThroughput'
+    -> UpdateGlobalSecondaryIndexAction
+updateGlobalSecondaryIndexAction pIndexName_ pProvisionedThroughput_ =
+    UpdateGlobalSecondaryIndexAction'
+    { _ugsiaIndexName = pIndexName_
+    , _ugsiaProvisionedThroughput = pProvisionedThroughput_
+    }
+
+-- | The name of the global secondary index to be updated.
+ugsiaIndexName :: Lens' UpdateGlobalSecondaryIndexAction Text
+ugsiaIndexName = lens _ugsiaIndexName (\ s a -> s{_ugsiaIndexName = a});
+
+-- | Undocumented member.
+ugsiaProvisionedThroughput :: Lens' UpdateGlobalSecondaryIndexAction ProvisionedThroughput
+ugsiaProvisionedThroughput = lens _ugsiaProvisionedThroughput (\ s a -> s{_ugsiaProvisionedThroughput = a});
+
+instance ToJSON UpdateGlobalSecondaryIndexAction
+         where
+        toJSON UpdateGlobalSecondaryIndexAction'{..}
+          = object
+              ["IndexName" .= _ugsiaIndexName,
+               "ProvisionedThroughput" .=
+                 _ugsiaProvisionedThroughput]
+
+-- | Represents an operation to perform - either /DeleteItem/ or /PutItem/.
+-- You can only request one of these operations, not both, in a single
+-- /WriteRequest/. If you do need to perform both of these operations, you
+-- will need to provide two separate /WriteRequest/ objects.
+--
+-- /See:/ 'writeRequest' smart constructor.
+data WriteRequest = WriteRequest'
+    { _wrPutRequest    :: !(Maybe PutRequest)
+    , _wrDeleteRequest :: !(Maybe DeleteRequest)
+    } deriving (Eq,Read,Show,Data,Typeable,Generic)
+
+-- | Creates a value of 'WriteRequest' with the minimum fields required to make a request.
+--
+-- Use one of the following lenses to modify other fields as desired:
+--
+-- * 'wrPutRequest'
+--
+-- * 'wrDeleteRequest'
+writeRequest
+    :: WriteRequest
+writeRequest =
+    WriteRequest'
+    { _wrPutRequest = Nothing
+    , _wrDeleteRequest = Nothing
+    }
+
+-- | A request to perform a /PutItem/ operation.
+wrPutRequest :: Lens' WriteRequest (Maybe PutRequest)
+wrPutRequest = lens _wrPutRequest (\ s a -> s{_wrPutRequest = a});
+
+-- | A request to perform a /DeleteItem/ operation.
+wrDeleteRequest :: Lens' WriteRequest (Maybe DeleteRequest)
+wrDeleteRequest = lens _wrDeleteRequest (\ s a -> s{_wrDeleteRequest = a});
+
+instance FromJSON WriteRequest where
+        parseJSON
+          = withObject "WriteRequest"
+              (\ x ->
+                 WriteRequest' <$>
+                   (x .:? "PutRequest") <*> (x .:? "DeleteRequest"))
+
+instance ToJSON WriteRequest where
+        toJSON WriteRequest'{..}
+          = object
+              ["PutRequest" .= _wrPutRequest,
+               "DeleteRequest" .= _wrDeleteRequest]
diff --git a/gen/Network/AWS/DynamoDB/Types/Sum.hs b/gen/Network/AWS/DynamoDB/Types/Sum.hs
new file mode 100644
--- /dev/null
+++ b/gen/Network/AWS/DynamoDB/Types/Sum.hs
@@ -0,0 +1,451 @@
+{-# LANGUAGE DeriveDataTypeable #-}
+{-# LANGUAGE DeriveGeneric      #-}
+{-# LANGUAGE LambdaCase         #-}
+{-# LANGUAGE OverloadedStrings  #-}
+
+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
+
+-- Derived from AWS service descriptions, licensed under Apache 2.0.
+
+-- |
+-- Module      : Network.AWS.DynamoDB.Types.Sum
+-- Copyright   : (c) 2013-2015 Brendan Hay
+-- License     : Mozilla Public License, v. 2.0.
+-- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com>
+-- Stability   : auto-generated
+-- Portability : non-portable (GHC extensions)
+--
+module Network.AWS.DynamoDB.Types.Sum where
+
+import           Network.AWS.Prelude
+
+data AttributeAction
+    = Add
+    | Delete
+    | Put
+    deriving (Eq,Ord,Read,Show,Enum,Data,Typeable,Generic)
+
+instance FromText AttributeAction where
+    parser = takeLowerText >>= \case
+        "add" -> pure Add
+        "delete" -> pure Delete
+        "put" -> pure Put
+        e -> fromTextError $ "Failure parsing AttributeAction from value: '" <> e
+           <> "'. Accepted values: add, delete, put"
+
+instance ToText AttributeAction where
+    toText = \case
+        Add -> "add"
+        Delete -> "delete"
+        Put -> "put"
+
+instance Hashable     AttributeAction
+instance ToByteString AttributeAction
+instance ToQuery      AttributeAction
+instance ToHeader     AttributeAction
+
+instance ToJSON AttributeAction where
+    toJSON = toJSONText
+
+data ComparisonOperator
+    = BeginsWith
+    | Between
+    | Contains
+    | EQ'
+    | GE
+    | GT'
+    | IN
+    | LE
+    | LT'
+    | NE
+    | NotContains
+    | NotNull
+    | Null
+    deriving (Eq,Ord,Read,Show,Enum,Data,Typeable,Generic)
+
+instance FromText ComparisonOperator where
+    parser = takeLowerText >>= \case
+        "begins_with" -> pure BeginsWith
+        "between" -> pure Between
+        "contains" -> pure Contains
+        "eq" -> pure EQ'
+        "ge" -> pure GE
+        "gt" -> pure GT'
+        "in" -> pure IN
+        "le" -> pure LE
+        "lt" -> pure LT'
+        "ne" -> pure NE
+        "not_contains" -> pure NotContains
+        "not_null" -> pure NotNull
+        "null" -> pure Null
+        e -> fromTextError $ "Failure parsing ComparisonOperator from value: '" <> e
+           <> "'. Accepted values: begins_with, between, contains, eq, ge, gt, in, le, lt, ne, not_contains, not_null, null"
+
+instance ToText ComparisonOperator where
+    toText = \case
+        BeginsWith -> "begins_with"
+        Between -> "between"
+        Contains -> "contains"
+        EQ' -> "eq"
+        GE -> "ge"
+        GT' -> "gt"
+        IN -> "in"
+        LE -> "le"
+        LT' -> "lt"
+        NE -> "ne"
+        NotContains -> "not_contains"
+        NotNull -> "not_null"
+        Null -> "null"
+
+instance Hashable     ComparisonOperator
+instance ToByteString ComparisonOperator
+instance ToQuery      ComparisonOperator
+instance ToHeader     ComparisonOperator
+
+instance ToJSON ComparisonOperator where
+    toJSON = toJSONText
+
+data ConditionalOperator
+    = And
+    | OR
+    deriving (Eq,Ord,Read,Show,Enum,Data,Typeable,Generic)
+
+instance FromText ConditionalOperator where
+    parser = takeLowerText >>= \case
+        "and" -> pure And
+        "or" -> pure OR
+        e -> fromTextError $ "Failure parsing ConditionalOperator from value: '" <> e
+           <> "'. Accepted values: and, or"
+
+instance ToText ConditionalOperator where
+    toText = \case
+        And -> "and"
+        OR -> "or"
+
+instance Hashable     ConditionalOperator
+instance ToByteString ConditionalOperator
+instance ToQuery      ConditionalOperator
+instance ToHeader     ConditionalOperator
+
+instance ToJSON ConditionalOperator where
+    toJSON = toJSONText
+
+data IndexStatus
+    = ISActive
+    | ISCreating
+    | ISDeleting
+    | ISUpdating
+    deriving (Eq,Ord,Read,Show,Enum,Data,Typeable,Generic)
+
+instance FromText IndexStatus where
+    parser = takeLowerText >>= \case
+        "active" -> pure ISActive
+        "creating" -> pure ISCreating
+        "deleting" -> pure ISDeleting
+        "updating" -> pure ISUpdating
+        e -> fromTextError $ "Failure parsing IndexStatus from value: '" <> e
+           <> "'. Accepted values: active, creating, deleting, updating"
+
+instance ToText IndexStatus where
+    toText = \case
+        ISActive -> "active"
+        ISCreating -> "creating"
+        ISDeleting -> "deleting"
+        ISUpdating -> "updating"
+
+instance Hashable     IndexStatus
+instance ToByteString IndexStatus
+instance ToQuery      IndexStatus
+instance ToHeader     IndexStatus
+
+instance FromJSON IndexStatus where
+    parseJSON = parseJSONText "IndexStatus"
+
+data KeyType
+    = Hash
+    | Range
+    deriving (Eq,Ord,Read,Show,Enum,Data,Typeable,Generic)
+
+instance FromText KeyType where
+    parser = takeLowerText >>= \case
+        "hash" -> pure Hash
+        "range" -> pure Range
+        e -> fromTextError $ "Failure parsing KeyType from value: '" <> e
+           <> "'. Accepted values: hash, range"
+
+instance ToText KeyType where
+    toText = \case
+        Hash -> "hash"
+        Range -> "range"
+
+instance Hashable     KeyType
+instance ToByteString KeyType
+instance ToQuery      KeyType
+instance ToHeader     KeyType
+
+instance ToJSON KeyType where
+    toJSON = toJSONText
+
+instance FromJSON KeyType where
+    parseJSON = parseJSONText "KeyType"
+
+data ProjectionType
+    = All
+    | Include
+    | KeysOnly
+    deriving (Eq,Ord,Read,Show,Enum,Data,Typeable,Generic)
+
+instance FromText ProjectionType where
+    parser = takeLowerText >>= \case
+        "all" -> pure All
+        "include" -> pure Include
+        "keys_only" -> pure KeysOnly
+        e -> fromTextError $ "Failure parsing ProjectionType from value: '" <> e
+           <> "'. Accepted values: all, include, keys_only"
+
+instance ToText ProjectionType where
+    toText = \case
+        All -> "all"
+        Include -> "include"
+        KeysOnly -> "keys_only"
+
+instance Hashable     ProjectionType
+instance ToByteString ProjectionType
+instance ToQuery      ProjectionType
+instance ToHeader     ProjectionType
+
+instance ToJSON ProjectionType where
+    toJSON = toJSONText
+
+instance FromJSON ProjectionType where
+    parseJSON = parseJSONText "ProjectionType"
+
+-- | Determines the level of detail about provisioned throughput consumption
+-- that is returned in the response:
+--
+-- -   /INDEXES/ - The response includes the aggregate /ConsumedCapacity/
+--     for the operation, together with /ConsumedCapacity/ for each table
+--     and secondary index that was accessed.
+--
+--     Note that some operations, such as /GetItem/ and /BatchGetItem/, do
+--     not access any indexes at all. In these cases, specifying /INDEXES/
+--     will only return /ConsumedCapacity/ information for table(s).
+--
+-- -   /TOTAL/ - The response includes only the aggregate
+--     /ConsumedCapacity/ for the operation.
+--
+-- -   /NONE/ - No /ConsumedCapacity/ details are included in the response.
+--
+data ReturnConsumedCapacity
+    = RCCIndexes
+    | RCCNone
+    | RCCTotal
+    deriving (Eq,Ord,Read,Show,Enum,Data,Typeable,Generic)
+
+instance FromText ReturnConsumedCapacity where
+    parser = takeLowerText >>= \case
+        "indexes" -> pure RCCIndexes
+        "none" -> pure RCCNone
+        "total" -> pure RCCTotal
+        e -> fromTextError $ "Failure parsing ReturnConsumedCapacity from value: '" <> e
+           <> "'. Accepted values: indexes, none, total"
+
+instance ToText ReturnConsumedCapacity where
+    toText = \case
+        RCCIndexes -> "indexes"
+        RCCNone -> "none"
+        RCCTotal -> "total"
+
+instance Hashable     ReturnConsumedCapacity
+instance ToByteString ReturnConsumedCapacity
+instance ToQuery      ReturnConsumedCapacity
+instance ToHeader     ReturnConsumedCapacity
+
+instance ToJSON ReturnConsumedCapacity where
+    toJSON = toJSONText
+
+data ReturnItemCollectionMetrics
+    = RICMNone
+    | RICMSize
+    deriving (Eq,Ord,Read,Show,Enum,Data,Typeable,Generic)
+
+instance FromText ReturnItemCollectionMetrics where
+    parser = takeLowerText >>= \case
+        "none" -> pure RICMNone
+        "size" -> pure RICMSize
+        e -> fromTextError $ "Failure parsing ReturnItemCollectionMetrics from value: '" <> e
+           <> "'. Accepted values: none, size"
+
+instance ToText ReturnItemCollectionMetrics where
+    toText = \case
+        RICMNone -> "none"
+        RICMSize -> "size"
+
+instance Hashable     ReturnItemCollectionMetrics
+instance ToByteString ReturnItemCollectionMetrics
+instance ToQuery      ReturnItemCollectionMetrics
+instance ToHeader     ReturnItemCollectionMetrics
+
+instance ToJSON ReturnItemCollectionMetrics where
+    toJSON = toJSONText
+
+data ReturnValue
+    = AllNew
+    | AllOld
+    | None
+    | UpdatedNew
+    | UpdatedOld
+    deriving (Eq,Ord,Read,Show,Enum,Data,Typeable,Generic)
+
+instance FromText ReturnValue where
+    parser = takeLowerText >>= \case
+        "all_new" -> pure AllNew
+        "all_old" -> pure AllOld
+        "none" -> pure None
+        "updated_new" -> pure UpdatedNew
+        "updated_old" -> pure UpdatedOld
+        e -> fromTextError $ "Failure parsing ReturnValue from value: '" <> e
+           <> "'. Accepted values: all_new, all_old, none, updated_new, updated_old"
+
+instance ToText ReturnValue where
+    toText = \case
+        AllNew -> "all_new"
+        AllOld -> "all_old"
+        None -> "none"
+        UpdatedNew -> "updated_new"
+        UpdatedOld -> "updated_old"
+
+instance Hashable     ReturnValue
+instance ToByteString ReturnValue
+instance ToQuery      ReturnValue
+instance ToHeader     ReturnValue
+
+instance ToJSON ReturnValue where
+    toJSON = toJSONText
+
+data ScalarAttributeType
+    = B
+    | N
+    | S
+    deriving (Eq,Ord,Read,Show,Enum,Data,Typeable,Generic)
+
+instance FromText ScalarAttributeType where
+    parser = takeLowerText >>= \case
+        "b" -> pure B
+        "n" -> pure N
+        "s" -> pure S
+        e -> fromTextError $ "Failure parsing ScalarAttributeType from value: '" <> e
+           <> "'. Accepted values: b, n, s"
+
+instance ToText ScalarAttributeType where
+    toText = \case
+        B -> "b"
+        N -> "n"
+        S -> "s"
+
+instance Hashable     ScalarAttributeType
+instance ToByteString ScalarAttributeType
+instance ToQuery      ScalarAttributeType
+instance ToHeader     ScalarAttributeType
+
+instance ToJSON ScalarAttributeType where
+    toJSON = toJSONText
+
+instance FromJSON ScalarAttributeType where
+    parseJSON = parseJSONText "ScalarAttributeType"
+
+data Select
+    = AllAttributes
+    | AllProjectedAttributes
+    | Count
+    | SpecificAttributes
+    deriving (Eq,Ord,Read,Show,Enum,Data,Typeable,Generic)
+
+instance FromText Select where
+    parser = takeLowerText >>= \case
+        "all_attributes" -> pure AllAttributes
+        "all_projected_attributes" -> pure AllProjectedAttributes
+        "count" -> pure Count
+        "specific_attributes" -> pure SpecificAttributes
+        e -> fromTextError $ "Failure parsing Select from value: '" <> e
+           <> "'. Accepted values: all_attributes, all_projected_attributes, count, specific_attributes"
+
+instance ToText Select where
+    toText = \case
+        AllAttributes -> "all_attributes"
+        AllProjectedAttributes -> "all_projected_attributes"
+        Count -> "count"
+        SpecificAttributes -> "specific_attributes"
+
+instance Hashable     Select
+instance ToByteString Select
+instance ToQuery      Select
+instance ToHeader     Select
+
+instance ToJSON Select where
+    toJSON = toJSONText
+
+data StreamViewType
+    = SVTKeysOnly
+    | SVTNewAndOldImages
+    | SVTNewImage
+    | SVTOldImage
+    deriving (Eq,Ord,Read,Show,Enum,Data,Typeable,Generic)
+
+instance FromText StreamViewType where
+    parser = takeLowerText >>= \case
+        "keys_only" -> pure SVTKeysOnly
+        "new_and_old_images" -> pure SVTNewAndOldImages
+        "new_image" -> pure SVTNewImage
+        "old_image" -> pure SVTOldImage
+        e -> fromTextError $ "Failure parsing StreamViewType from value: '" <> e
+           <> "'. Accepted values: keys_only, new_and_old_images, new_image, old_image"
+
+instance ToText StreamViewType where
+    toText = \case
+        SVTKeysOnly -> "keys_only"
+        SVTNewAndOldImages -> "new_and_old_images"
+        SVTNewImage -> "new_image"
+        SVTOldImage -> "old_image"
+
+instance Hashable     StreamViewType
+instance ToByteString StreamViewType
+instance ToQuery      StreamViewType
+instance ToHeader     StreamViewType
+
+instance ToJSON StreamViewType where
+    toJSON = toJSONText
+
+instance FromJSON StreamViewType where
+    parseJSON = parseJSONText "StreamViewType"
+
+data TableStatus
+    = Active
+    | Creating
+    | Deleting
+    | Updating
+    deriving (Eq,Ord,Read,Show,Enum,Data,Typeable,Generic)
+
+instance FromText TableStatus where
+    parser = takeLowerText >>= \case
+        "active" -> pure Active
+        "creating" -> pure Creating
+        "deleting" -> pure Deleting
+        "updating" -> pure Updating
+        e -> fromTextError $ "Failure parsing TableStatus from value: '" <> e
+           <> "'. Accepted values: active, creating, deleting, updating"
+
+instance ToText TableStatus where
+    toText = \case
+        Active -> "active"
+        Creating -> "creating"
+        Deleting -> "deleting"
+        Updating -> "updating"
+
+instance Hashable     TableStatus
+instance ToByteString TableStatus
+instance ToQuery      TableStatus
+instance ToHeader     TableStatus
+
+instance FromJSON TableStatus where
+    parseJSON = parseJSONText "TableStatus"
diff --git a/gen/Network/AWS/DynamoDB/UpdateItem.hs b/gen/Network/AWS/DynamoDB/UpdateItem.hs
--- a/gen/Network/AWS/DynamoDB/UpdateItem.hs
+++ b/gen/Network/AWS/DynamoDB/UpdateItem.hs
@@ -1,709 +1,796 @@
-{-# LANGUAGE DataKinds                   #-}
-{-# LANGUAGE DeriveGeneric               #-}
-{-# LANGUAGE FlexibleInstances           #-}
-{-# LANGUAGE GeneralizedNewtypeDeriving  #-}
-{-# LANGUAGE LambdaCase                  #-}
-{-# LANGUAGE NoImplicitPrelude           #-}
-{-# LANGUAGE OverloadedStrings           #-}
-{-# LANGUAGE RecordWildCards             #-}
-{-# LANGUAGE TypeFamilies                #-}
-
-{-# OPTIONS_GHC -fno-warn-unused-imports #-}
-
--- Module      : Network.AWS.DynamoDB.UpdateItem
--- Copyright   : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>
--- License     : This Source Code Form is subject to the terms of
---               the Mozilla Public License, v. 2.0.
---               A copy of the MPL can be found in the LICENSE file or
---               you can obtain it at http://mozilla.org/MPL/2.0/.
--- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com>
--- Stability   : experimental
--- Portability : non-portable (GHC extensions)
---
--- Derived from AWS service descriptions, licensed under Apache 2.0.
-
--- | Edits an existing item's attributes, or adds a new item to the table if it
--- does not already exist. You can put, delete, or add attribute values. You can
--- also perform a conditional update on an existing item (insert a new attribute
--- name-value pair if it doesn't exist, or replace an existing name-value pair
--- if it has certain expected attribute values). If conditions are specified and
--- the item does not exist, then the operation fails and a new item is not
--- created.
---
--- You can also return the item's attribute values in the same /UpdateItem/
--- operation using the /ReturnValues/ parameter.
---
--- <http://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_UpdateItem.html>
-module Network.AWS.DynamoDB.UpdateItem
-    (
-    -- * Request
-      UpdateItem
-    -- ** Request constructor
-    , updateItem
-    -- ** Request lenses
-    , uiAttributeUpdates
-    , uiConditionExpression
-    , uiConditionalOperator
-    , uiExpected
-    , uiExpressionAttributeNames
-    , uiExpressionAttributeValues
-    , uiKey
-    , uiReturnConsumedCapacity
-    , uiReturnItemCollectionMetrics
-    , uiReturnValues
-    , uiTableName
-    , uiUpdateExpression
-
-    -- * Response
-    , UpdateItemResponse
-    -- ** Response constructor
-    , updateItemResponse
-    -- ** Response lenses
-    , uirAttributes
-    , uirConsumedCapacity
-    , uirItemCollectionMetrics
-    ) where
-
-import Network.AWS.Data (Object)
-import Network.AWS.Prelude
-import Network.AWS.Request.JSON
-import Network.AWS.DynamoDB.Types
-import qualified GHC.Exts
-
-data UpdateItem = UpdateItem
-    { _uiAttributeUpdates            :: Map Text AttributeValueUpdate
-    , _uiConditionExpression         :: Maybe Text
-    , _uiConditionalOperator         :: Maybe ConditionalOperator
-    , _uiExpected                    :: Map Text ExpectedAttributeValue
-    , _uiExpressionAttributeNames    :: Map Text Text
-    , _uiExpressionAttributeValues   :: Map Text AttributeValue
-    , _uiKey                         :: Map Text AttributeValue
-    , _uiReturnConsumedCapacity      :: Maybe ReturnConsumedCapacity
-    , _uiReturnItemCollectionMetrics :: Maybe ReturnItemCollectionMetrics
-    , _uiReturnValues                :: Maybe ReturnValue
-    , _uiTableName                   :: Text
-    , _uiUpdateExpression            :: Maybe Text
-    } deriving (Eq, Read, Show)
-
--- | 'UpdateItem' constructor.
---
--- The fields accessible through corresponding lenses are:
---
--- * 'uiAttributeUpdates' @::@ 'HashMap' 'Text' 'AttributeValueUpdate'
---
--- * 'uiConditionExpression' @::@ 'Maybe' 'Text'
---
--- * 'uiConditionalOperator' @::@ 'Maybe' 'ConditionalOperator'
---
--- * 'uiExpected' @::@ 'HashMap' 'Text' 'ExpectedAttributeValue'
---
--- * 'uiExpressionAttributeNames' @::@ 'HashMap' 'Text' 'Text'
---
--- * 'uiExpressionAttributeValues' @::@ 'HashMap' 'Text' 'AttributeValue'
---
--- * 'uiKey' @::@ 'HashMap' 'Text' 'AttributeValue'
---
--- * 'uiReturnConsumedCapacity' @::@ 'Maybe' 'ReturnConsumedCapacity'
---
--- * 'uiReturnItemCollectionMetrics' @::@ 'Maybe' 'ReturnItemCollectionMetrics'
---
--- * 'uiReturnValues' @::@ 'Maybe' 'ReturnValue'
---
--- * 'uiTableName' @::@ 'Text'
---
--- * 'uiUpdateExpression' @::@ 'Maybe' 'Text'
---
-updateItem :: Text -- ^ 'uiTableName'
-           -> UpdateItem
-updateItem p1 = UpdateItem
-    { _uiTableName                   = p1
-    , _uiKey                         = mempty
-    , _uiAttributeUpdates            = mempty
-    , _uiExpected                    = mempty
-    , _uiConditionalOperator         = Nothing
-    , _uiReturnValues                = Nothing
-    , _uiReturnConsumedCapacity      = Nothing
-    , _uiReturnItemCollectionMetrics = Nothing
-    , _uiUpdateExpression            = Nothing
-    , _uiConditionExpression         = Nothing
-    , _uiExpressionAttributeNames    = mempty
-    , _uiExpressionAttributeValues   = mempty
-    }
-
--- | This is a legacy parameter, for backward compatibility. New applications
--- should use /UpdateExpression/ instead. Do not combine legacy parameters and
--- expression parameters in a single API call; otherwise, DynamoDB will return a /ValidationException/ exception.
---
--- This parameter can be used for modifying top-level attributes; however, it
--- does not support individual list or map elements.
---
--- The names of attributes to be modified, the action to perform on each, and
--- the new value for each. If you are updating an attribute that is an index key
--- attribute for any indexes on that table, the attribute type must match the
--- index key type defined in the /AttributesDefinition/ of the table description.
--- You can use /UpdateItem/ to update any nonkey attributes.
---
--- Attribute values cannot be null. String and Binary type attributes must have
--- lengths greater than zero. Set type attributes must not be empty. Requests
--- with empty values will be rejected with a /ValidationException/ exception.
---
--- Each /AttributeUpdates/ element consists of an attribute name to modify, along
--- with the following:
---
--- /Value/ - The new value, if applicable, for this attribute.
---
--- /Action/ - A value that specifies how to perform the update. This action is
--- only valid for an existing attribute whose data type is Number or is a set;
--- do not use 'ADD' for other data types.
---
--- If an item with the specified primary key is found in the table, the
--- following values perform the following actions:
---
--- 'PUT' - Adds the specified attribute to the item. If the attribute already
--- exists, it is replaced by the new value.
---
--- 'DELETE' - Removes the attribute and its value, if no value is specified for 'DELETE'. The data type of the specified value must match the existing value's
--- data type.
---
--- If a set of values is specified, then those values are subtracted from the
--- old set. For example, if the attribute value was the set '[a,b,c]' and the 'DELETE' action specifies '[a,c]', then the final attribute value is '[b]'. Specifying an
--- empty set is an error.
---
--- 'ADD' - Adds the specified value to the item, if the attribute does not
--- already exist. If the attribute does exist, then the behavior of 'ADD' depends
--- on the data type of the attribute:
---
--- If the existing attribute is a number, and if /Value/ is also a number, then /Value/ is mathematically added to the existing attribute. If /Value/ is a
--- negative number, then it is subtracted from the existing attribute.
---
--- If you use 'ADD' to increment or decrement a number value for an item that
--- doesn't exist before the update, DynamoDB uses 0 as the initial value.
---
--- Similarly, if you use 'ADD' for an existing item to increment or decrement an
--- attribute value that doesn't exist before the update, DynamoDB uses '0' as the
--- initial value. For example, suppose that the item you want to update doesn't
--- have an attribute named /itemcount/, but you decide to 'ADD' the number '3' to this
--- attribute anyway. DynamoDB will create the /itemcount/ attribute, set its
--- initial value to '0', and finally add '3' to it. The result will be a new /itemcount/ attribute, with a value of '3'.
---
--- If the existing data type is a set, and if /Value/ is also a set, then /Value/
--- is appended to the existing set. For example, if the attribute value is the
--- set '[1,2]', and the 'ADD' action specified '[3]', then the final attribute value
--- is '[1,2,3]'. An error occurs if an 'ADD' action is specified for a set attribute
--- and the attribute type specified does not match the existing set type.
---
--- Both sets must have the same primitive data type. For example, if the
--- existing data type is a set of strings, /Value/ must also be a set of strings.
---
--- If no item with the specified key is found in the table, the following
--- values perform the following actions:
---
--- 'PUT' - Causes DynamoDB to create a new item with the specified primary key,
--- and then adds the attribute.
---
--- 'DELETE' - Nothing happens, because attributes cannot be deleted from a
--- nonexistent item. The operation succeeds, but DynamoDB does not create a new
--- item.
---
--- 'ADD' - Causes DynamoDB to create an item with the supplied primary key and
--- number (or set of numbers) for the attribute value. The only data types
--- allowed are Number and Number Set.
---
--- If you provide any attributes that are part of an index key, then the
--- data types for those attributes must match those of the schema in the table's
--- attribute definition.
-uiAttributeUpdates :: Lens' UpdateItem (HashMap Text AttributeValueUpdate)
-uiAttributeUpdates =
-    lens _uiAttributeUpdates (\s a -> s { _uiAttributeUpdates = a })
-        . _Map
-
--- | A condition that must be satisfied in order for a conditional update to
--- succeed.
---
--- An expression can contain any of the following:
---
--- Boolean functions: 'attribute_exists | attribute_not_exists | contains |begins_with'
---
--- These function names are case-sensitive.
---
--- Comparison operators: ' = | <> | < | > | <= | >= | BETWEEN | IN'
---
--- Logical operators: 'AND | OR | NOT'
---
--- For more information on condition expressions, see <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.SpecifyingConditions.html Specifying Conditions>
--- in the /Amazon DynamoDB Developer Guide/.
---
--- /ConditionExpression/ replaces the legacy /ConditionalOperator/ and /Expected/
--- parameters.
---
-uiConditionExpression :: Lens' UpdateItem (Maybe Text)
-uiConditionExpression =
-    lens _uiConditionExpression (\s a -> s { _uiConditionExpression = a })
-
--- | This is a legacy parameter, for backward compatibility. New applications
--- should use /ConditionExpression/ instead. Do not combine legacy parameters and
--- expression parameters in a single API call; otherwise, DynamoDB will return a /ValidationException/ exception.
---
--- A logical operator to apply to the conditions in the /Expected/ map:
---
--- 'AND' - If all of the conditions evaluate to true, then the entire map
--- evaluates to true.
---
--- 'OR' - If at least one of the conditions evaluate to true, then the entire map
--- evaluates to true.
---
--- If you omit /ConditionalOperator/, then 'AND' is the default.
---
--- The operation will succeed only if the entire map evaluates to true.
---
--- This parameter does not support attributes of type List or Map.
---
-uiConditionalOperator :: Lens' UpdateItem (Maybe ConditionalOperator)
-uiConditionalOperator =
-    lens _uiConditionalOperator (\s a -> s { _uiConditionalOperator = a })
-
--- | This is a legacy parameter, for backward compatibility. New applications
--- should use / ConditionExpression / instead. Do not combine legacy parameters
--- and expression parameters in a single API call; otherwise, DynamoDB will
--- return a /ValidationException/ exception.
---
--- A map of attribute/condition pairs. /Expected/ provides a conditional block
--- for the /UpdateItem/ operation.
---
--- Each element of /Expected/ consists of an attribute name, a comparison
--- operator, and one or more values. DynamoDB compares the attribute with the
--- value(s) you supplied, using the comparison operator. For each /Expected/
--- element, the result of the evaluation is either true or false.
---
--- If you specify more than one element in the /Expected/ map, then by default
--- all of the conditions must evaluate to true. In other words, the conditions
--- are ANDed together. (You can use the /ConditionalOperator/ parameter to OR the
--- conditions instead. If you do this, then at least one of the conditions must
--- evaluate to true, rather than all of them.)
---
--- If the /Expected/ map evaluates to true, then the conditional operation
--- succeeds; otherwise, it fails.
---
--- /Expected/ contains the following:
---
--- /AttributeValueList/ - One or more values to evaluate against the supplied
--- attribute. The number of values in the list depends on the /ComparisonOperator/
--- being used.
---
--- For type Number, value comparisons are numeric.
---
--- String value comparisons for greater than, equals, or less than are based on
--- ASCII character code values. For example, 'a' is greater than 'A', and 'a' is
--- greater than 'B'. For a list of code values, see <http://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters http://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters>.
---
--- For type Binary, DynamoDB treats each byte of the binary data as unsigned
--- when it compares binary values.
---
--- /ComparisonOperator/ - A comparator for evaluating attributes in the /AttributeValueList/. When performing the comparison, DynamoDB uses strongly consistent reads.
---
--- The following comparison operators are available:
---
--- 'EQ | NE | LE | LT | GE | GT | NOT_NULL | NULL | CONTAINS | NOT_CONTAINS |BEGINS_WITH | IN | BETWEEN'
---
--- The following are descriptions of each comparison operator.
---
--- 'EQ' : Equal. 'EQ' is supported for all datatypes, including lists and maps.
---
--- /AttributeValueList/ can contain only one /AttributeValue/ element of type
--- String, Number, Binary, String Set, Number Set, or Binary Set. If an item
--- contains an /AttributeValue/ element of a different type than the one provided
--- in the request, the value does not match. For example, '{"S":"6"}' does not
--- equal '{"N":"6"}'. Also, '{"N":"6"}' does not equal '{"NS":["6", "2", "1"]}'.
---
---
---
--- 'NE' : Not equal. 'NE' is supported for all datatypes, including lists and
--- maps.
---
--- /AttributeValueList/ can contain only one /AttributeValue/ of type String,
--- Number, Binary, String Set, Number Set, or Binary Set. If an item contains an /AttributeValue/ of a different type than the one provided in the request, the
--- value does not match. For example, '{"S":"6"}' does not equal '{"N":"6"}'. Also, '{"N":"6"}' does not equal '{"NS":["6", "2", "1"]}'.
---
---
---
--- 'LE' : Less than or equal.
---
--- /AttributeValueList/ can contain only one /AttributeValue/ element of type
--- String, Number, or Binary (not a set type). If an item contains an /AttributeValue/ element of a different type than the one provided in the request, the value
--- does not match. For example, '{"S":"6"}' does not equal '{"N":"6"}'. Also, '{"N":"6"}' does not compare to '{"NS":["6", "2", "1"]}'.
---
---
---
--- 'LT' : Less than.
---
--- /AttributeValueList/ can contain only one /AttributeValue/ of type String,
--- Number, or Binary (not a set type). If an item contains an /AttributeValue/
--- element of a different type than the one provided in the request, the value
--- does not match. For example, '{"S":"6"}' does not equal '{"N":"6"}'. Also, '{"N":"6"}' does not compare to '{"NS":["6", "2", "1"]}'.
---
---
---
--- 'GE' : Greater than or equal.
---
--- /AttributeValueList/ can contain only one /AttributeValue/ element of type
--- String, Number, or Binary (not a set type). If an item contains an /AttributeValue/ element of a different type than the one provided in the request, the value
--- does not match. For example, '{"S":"6"}' does not equal '{"N":"6"}'. Also, '{"N":"6"}' does not compare to '{"NS":["6", "2", "1"]}'.
---
---
---
--- 'GT' : Greater than.
---
--- /AttributeValueList/ can contain only one /AttributeValue/ element of type
--- String, Number, or Binary (not a set type). If an item contains an /AttributeValue/ element of a different type than the one provided in the request, the value
--- does not match. For example, '{"S":"6"}' does not equal '{"N":"6"}'. Also, '{"N":"6"}' does not compare to '{"NS":["6", "2", "1"]}'.
---
---
---
--- 'NOT_NULL' : The attribute exists. 'NOT_NULL' is supported for all datatypes,
--- including lists and maps.
---
--- This operator tests for the existence of an attribute, not its data type. If
--- the data type of attribute "'a'" is null, and you evaluate it using 'NOT_NULL',
--- the result is a Boolean /true/. This result is because the attribute "'a'"
--- exists; its data type is not relevant to the 'NOT_NULL' comparison operator.
---
--- 'NULL' : The attribute does not exist. 'NULL' is supported for all datatypes,
--- including lists and maps.
---
--- This operator tests for the nonexistence of an attribute, not its data type.
--- If the data type of attribute "'a'" is null, and you evaluate it using 'NULL',
--- the result is a Boolean /false/. This is because the attribute "'a'" exists; its
--- data type is not relevant to the 'NULL' comparison operator.
---
--- 'CONTAINS' : Checks for a subsequence, or value in a set.
---
--- /AttributeValueList/ can contain only one /AttributeValue/ element of type
--- String, Number, or Binary (not a set type). If the target attribute of the
--- comparison is of type String, then the operator checks for a substring match.
--- If the target attribute of the comparison is of type Binary, then the
--- operator looks for a subsequence of the target that matches the input. If the
--- target attribute of the comparison is a set ("'SS'", "'NS'", or "'BS'"), then the
--- operator evaluates to true if it finds an exact match with any member of the
--- set.
---
--- CONTAINS is supported for lists: When evaluating "'a CONTAINS b'", "'a'" can be
--- a list; however, "'b'" cannot be a set, a map, or a list.
---
--- 'NOT_CONTAINS' : Checks for absence of a subsequence, or absence of a value
--- in a set.
---
--- /AttributeValueList/ can contain only one /AttributeValue/ element of type
--- String, Number, or Binary (not a set type). If the target attribute of the
--- comparison is a String, then the operator checks for the absence of a
--- substring match. If the target attribute of the comparison is Binary, then
--- the operator checks for the absence of a subsequence of the target that
--- matches the input. If the target attribute of the comparison is a set ("'SS'", "'NS'", or "'BS'"), then the operator evaluates to true if it /does not/ find an
--- exact match with any member of the set.
---
--- NOT_CONTAINS is supported for lists: When evaluating "'a NOT CONTAINS b'", "'a'"
--- can be a list; however, "'b'" cannot be a set, a map, or a list.
---
--- 'BEGINS_WITH' : Checks for a prefix.
---
--- /AttributeValueList/ can contain only one /AttributeValue/ of type String or
--- Binary (not a Number or a set type). The target attribute of the comparison
--- must be of type String or Binary (not a Number or a set type).
---
---
---
--- 'IN' : Checks for matching elements within two sets.
---
--- /AttributeValueList/ can contain one or more /AttributeValue/ elements of type
--- String, Number, or Binary (not a set type). These attributes are compared
--- against an existing set type attribute of an item. If any elements of the
--- input set are present in the item attribute, the expression evaluates to true.
---
--- 'BETWEEN' : Greater than or equal to the first value, and less than or equal
--- to the second value.
---
--- /AttributeValueList/ must contain two /AttributeValue/ elements of the same
--- type, either String, Number, or Binary (not a set type). A target attribute
--- matches if the target value is greater than, or equal to, the first element
--- and less than, or equal to, the second element. If an item contains an /AttributeValue/ element of a different type than the one provided in the request, the value
--- does not match. For example, '{"S":"6"}' does not compare to '{"N":"6"}'. Also, '{"N":"6"}' does not compare to '{"NS":["6", "2", "1"]}'
---
--- For usage examples of /AttributeValueList/ and /ComparisonOperator/, see <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.html Legacy Conditional Parameters> in the /Amazon DynamoDB Developer Guide/.
---
--- For backward compatibility with previous DynamoDB releases, the following
--- parameters can be used instead of /AttributeValueList/ and /ComparisonOperator/:
---
--- /Value/ - A value for DynamoDB to compare with an attribute.
---
--- /Exists/ - A Boolean value that causes DynamoDB to evaluate the value before
--- attempting the conditional operation:
---
--- If /Exists/ is 'true', DynamoDB will check to see if that attribute value
--- already exists in the table. If it is found, then the condition evaluates to
--- true; otherwise the condition evaluate to false.
---
--- If /Exists/ is 'false', DynamoDB assumes that the attribute value does /not/
--- exist in the table. If in fact the value does not exist, then the assumption
--- is valid and the condition evaluates to true. If the value is found, despite
--- the assumption that it does not exist, the condition evaluates to false.
---
--- Note that the default value for /Exists/ is 'true'.
---
--- The /Value/ and /Exists/ parameters are incompatible with /AttributeValueList/
--- and /ComparisonOperator/. Note that if you use both sets of parameters at once,
--- DynamoDB will return a /ValidationException/ exception.
---
--- This parameter does not support attributes of type List or Map.
---
-uiExpected :: Lens' UpdateItem (HashMap Text ExpectedAttributeValue)
-uiExpected = lens _uiExpected (\s a -> s { _uiExpected = a }) . _Map
-
--- | One or more substitution tokens for attribute names in an expression. The
--- following are some use cases for using /ExpressionAttributeNames/:
---
--- To access an attribute whose name conflicts with a DynamoDB reserved word.
---
--- To create a placeholder for repeating occurrences of an attribute name in
--- an expression.
---
--- To prevent special characters in an attribute name from being
--- misinterpreted in an expression.
---
--- Use the # character in an expression to dereference an attribute name. For
--- example, consider the following attribute name:
---
--- 'Percentile'
---
--- The name of this attribute conflicts with a reserved word, so it cannot be
--- used directly in an expression. (For the complete list of reserved words, see <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ReservedWords.html Reserved Words> in the /Amazon DynamoDB Developer Guide/). To work around this,
--- you could specify the following for /ExpressionAttributeNames/:
---
--- '{"#P":"Percentile"}'
---
--- You could then use this substitution in an expression, as in this example:
---
--- '#P = :val'
---
--- Tokens that begin with the : character are /expression attribute values/,
--- which are placeholders for the actual value at runtime.
---
--- For more information on expression attribute names, see <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ExpressionPlaceholders.html Using Placeholdersfor Attribute Names and Values> in the /Amazon DynamoDB Developer Guide/.
-uiExpressionAttributeNames :: Lens' UpdateItem (HashMap Text Text)
-uiExpressionAttributeNames =
-    lens _uiExpressionAttributeNames
-        (\s a -> s { _uiExpressionAttributeNames = a })
-            . _Map
-
--- | One or more values that can be substituted in an expression.
---
--- Use the : (colon) character in an expression to dereference an attribute
--- value. For example, suppose that you wanted to check whether the value of the /ProductStatus/ attribute was one of the following:
---
--- 'Available | Backordered | Discontinued'
---
--- You would first need to specify /ExpressionAttributeValues/ as follows:
---
--- '{ ":avail":{"S":"Available"}, ":back":{"S":"Backordered"},":disc":{"S":"Discontinued"} }'
---
--- You could then use these values in an expression, such as this:
---
--- 'ProductStatus IN (:avail, :back, :disc)'
---
--- For more information on expression attribute values, see <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.ExpressionPlaceholders.html Using Placeholdersfor Attribute Names and Values> in the /Amazon DynamoDB Developer Guide/.
-uiExpressionAttributeValues :: Lens' UpdateItem (HashMap Text AttributeValue)
-uiExpressionAttributeValues =
-    lens _uiExpressionAttributeValues
-        (\s a -> s { _uiExpressionAttributeValues = a })
-            . _Map
-
--- | The primary key of the item to be updated. Each element consists of an
--- attribute name and a value for that attribute.
---
--- For the primary key, you must provide all of the attributes. For example,
--- with a hash type primary key, you only need to provide the hash attribute.
--- For a hash-and-range type primary key, you must provide both the hash
--- attribute and the range attribute.
-uiKey :: Lens' UpdateItem (HashMap Text AttributeValue)
-uiKey = lens _uiKey (\s a -> s { _uiKey = a }) . _Map
-
-uiReturnConsumedCapacity :: Lens' UpdateItem (Maybe ReturnConsumedCapacity)
-uiReturnConsumedCapacity =
-    lens _uiReturnConsumedCapacity
-        (\s a -> s { _uiReturnConsumedCapacity = a })
-
--- | A value that if set to 'SIZE', the response includes statistics about item
--- collections, if any, that were modified during the operation are returned in
--- the response. If set to 'NONE' (the default), no statistics are returned.
-uiReturnItemCollectionMetrics :: Lens' UpdateItem (Maybe ReturnItemCollectionMetrics)
-uiReturnItemCollectionMetrics =
-    lens _uiReturnItemCollectionMetrics
-        (\s a -> s { _uiReturnItemCollectionMetrics = a })
-
--- | Use /ReturnValues/ if you want to get the item attributes as they appeared
--- either before or after they were updated. For /UpdateItem/, the valid values
--- are:
---
--- 'NONE' - If /ReturnValues/ is not specified, or if its value is 'NONE', then
--- nothing is returned. (This setting is the default for /ReturnValues/.)
---
--- 'ALL_OLD' - If /UpdateItem/ overwrote an attribute name-value pair, then the
--- content of the old item is returned.
---
--- 'UPDATED_OLD' - The old versions of only the updated attributes are returned.
---
--- 'ALL_NEW' - All of the attributes of the new version of the item are
--- returned.
---
--- 'UPDATED_NEW' - The new versions of only the updated attributes are returned.
---
---
-uiReturnValues :: Lens' UpdateItem (Maybe ReturnValue)
-uiReturnValues = lens _uiReturnValues (\s a -> s { _uiReturnValues = a })
-
--- | The name of the table containing the item to update.
-uiTableName :: Lens' UpdateItem Text
-uiTableName = lens _uiTableName (\s a -> s { _uiTableName = a })
-
--- | An expression that defines one or more attributes to be updated, the action
--- to be performed on them, and new value(s) for them.
---
--- The following action values are available for /UpdateExpression/.
---
--- 'SET' - Adds one or more attributes and values to an item. If any of these
--- attribute already exist, they are replaced by the new values. You can also
--- use 'SET' to add or subtract from an attribute that is of type Number.
---
--- 'SET' supports the following functions:
---
--- 'if_not_exists (path, operand)' - if the item does not contain an attribute
--- at the specified path, then 'if_not_exists' evaluates to operand; otherwise, it
--- evaluates to path. You can use this function to avoid overwriting an
--- attribute that may already be present in the item.
---
--- 'list_append (operand, operand)' - evaluates to a list with a new element
--- added to it. You can append the new element to the start or the end of the
--- list by reversing the order of the operands.
---
--- These function names are case-sensitive.
---
--- 'REMOVE' - Removes one or more attributes from an item.
---
--- 'ADD' - Adds the specified value to the item, if the attribute does not
--- already exist. If the attribute does exist, then the behavior of 'ADD' depends
--- on the data type of the attribute:
---
--- If the existing attribute is a number, and if /Value/ is also a number, then /Value/ is mathematically added to the existing attribute. If /Value/ is a
--- negative number, then it is subtracted from the existing attribute.
---
--- If you use 'ADD' to increment or decrement a number value for an item that
--- doesn't exist before the update, DynamoDB uses '0' as the initial value.
---
--- Similarly, if you use 'ADD' for an existing item to increment or decrement an
--- attribute value that doesn't exist before the update, DynamoDB uses '0' as the
--- initial value. For example, suppose that the item you want to update doesn't
--- have an attribute named /itemcount/, but you decide to 'ADD' the number '3' to this
--- attribute anyway. DynamoDB will create the /itemcount/ attribute, set its
--- initial value to '0', and finally add '3' to it. The result will be a new /itemcount/ attribute in the item, with a value of '3'.
---
--- If the existing data type is a set and if /Value/ is also a set, then /Value/
--- is added to the existing set. For example, if the attribute value is the set '[1,2]', and the 'ADD' action specified '[3]', then the final attribute value is '[1,2,3]'. An error occurs if an
--- 'ADD' action is specified for a set attribute and the attribute type specified
--- does not match the existing set type.
---
--- Both sets must have the same primitive data type. For example, if the
--- existing data type is a set of strings, the /Value/ must also be a set of
--- strings.
---
--- The 'ADD' action only supports Number and set data types. In addition, 'ADD'
--- can only be used on top-level attributes, not nested attributes.
---
--- 'DELETE' - Deletes an element from a set.
---
--- If a set of values is specified, then those values are subtracted from the
--- old set. For example, if the attribute value was the set '[a,b,c]' and the 'DELETE' action specifies '[a,c]', then the final attribute value is '[b]'. Specifying an
--- empty set is an error.
---
--- The 'DELETE' action only supports Number and set data types. In addition, 'DELETE' can only be used on top-level attributes, not nested attributes.
---
--- You can have many actions in a single expression, such as the following: 'SET a=:value1, b=:value2 DELETE :value3, :value4, :value5'
---
--- For more information on update expressions, see <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.Modifying.html Modifying Items andAttributes> in the /Amazon DynamoDB Developer Guide/.
---
--- /UpdateExpression/ replaces the legacy /AttributeUpdates/ parameter.
---
-uiUpdateExpression :: Lens' UpdateItem (Maybe Text)
-uiUpdateExpression =
-    lens _uiUpdateExpression (\s a -> s { _uiUpdateExpression = a })
-
-data UpdateItemResponse = UpdateItemResponse
-    { _uirAttributes            :: Map Text AttributeValue
-    , _uirConsumedCapacity      :: Maybe ConsumedCapacity
-    , _uirItemCollectionMetrics :: Maybe ItemCollectionMetrics
-    } deriving (Eq, Read, Show)
-
--- | 'UpdateItemResponse' constructor.
---
--- The fields accessible through corresponding lenses are:
---
--- * 'uirAttributes' @::@ 'HashMap' 'Text' 'AttributeValue'
---
--- * 'uirConsumedCapacity' @::@ 'Maybe' 'ConsumedCapacity'
---
--- * 'uirItemCollectionMetrics' @::@ 'Maybe' 'ItemCollectionMetrics'
---
-updateItemResponse :: UpdateItemResponse
-updateItemResponse = UpdateItemResponse
-    { _uirAttributes            = mempty
-    , _uirConsumedCapacity      = Nothing
-    , _uirItemCollectionMetrics = Nothing
-    }
-
--- | A map of attribute values as they appeared before the /UpdateItem/ operation.
--- This map only appears if /ReturnValues/ was specified as something other than 'NONE' in the request. Each element represents one attribute.
-uirAttributes :: Lens' UpdateItemResponse (HashMap Text AttributeValue)
-uirAttributes = lens _uirAttributes (\s a -> s { _uirAttributes = a }) . _Map
-
-uirConsumedCapacity :: Lens' UpdateItemResponse (Maybe ConsumedCapacity)
-uirConsumedCapacity =
-    lens _uirConsumedCapacity (\s a -> s { _uirConsumedCapacity = a })
-
-uirItemCollectionMetrics :: Lens' UpdateItemResponse (Maybe ItemCollectionMetrics)
-uirItemCollectionMetrics =
-    lens _uirItemCollectionMetrics
-        (\s a -> s { _uirItemCollectionMetrics = a })
-
-instance ToPath UpdateItem where
-    toPath = const "/"
-
-instance ToQuery UpdateItem where
-    toQuery = const mempty
-
-instance ToHeaders UpdateItem
-
-instance ToJSON UpdateItem where
-    toJSON UpdateItem{..} = object
-        [ "TableName"                   .= _uiTableName
-        , "Key"                         .= _uiKey
-        , "AttributeUpdates"            .= _uiAttributeUpdates
-        , "Expected"                    .= _uiExpected
-        , "ConditionalOperator"         .= _uiConditionalOperator
-        , "ReturnValues"                .= _uiReturnValues
-        , "ReturnConsumedCapacity"      .= _uiReturnConsumedCapacity
-        , "ReturnItemCollectionMetrics" .= _uiReturnItemCollectionMetrics
-        , "UpdateExpression"            .= _uiUpdateExpression
-        , "ConditionExpression"         .= _uiConditionExpression
-        , "ExpressionAttributeNames"    .= _uiExpressionAttributeNames
-        , "ExpressionAttributeValues"   .= _uiExpressionAttributeValues
-        ]
-
-instance AWSRequest UpdateItem where
-    type Sv UpdateItem = DynamoDB
-    type Rs UpdateItem = UpdateItemResponse
-
-    request  = post "UpdateItem"
-    response = jsonResponse
-
-instance FromJSON UpdateItemResponse where
-    parseJSON = withObject "UpdateItemResponse" $ \o -> UpdateItemResponse
-        <$> o .:? "Attributes" .!= mempty
-        <*> o .:? "ConsumedCapacity"
-        <*> o .:? "ItemCollectionMetrics"
+{-# LANGUAGE DeriveDataTypeable #-}
+{-# LANGUAGE DeriveGeneric      #-}
+{-# LANGUAGE OverloadedStrings  #-}
+{-# LANGUAGE RecordWildCards    #-}
+{-# LANGUAGE TypeFamilies       #-}
+
+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
+{-# OPTIONS_GHC -fno-warn-unused-binds   #-}
+{-# OPTIONS_GHC -fno-warn-unused-matches #-}
+
+-- Derived from AWS service descriptions, licensed under Apache 2.0.
+
+-- |
+-- Module      : Network.AWS.DynamoDB.UpdateItem
+-- Copyright   : (c) 2013-2015 Brendan Hay
+-- License     : Mozilla Public License, v. 2.0.
+-- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com>
+-- Stability   : auto-generated
+-- Portability : non-portable (GHC extensions)
+--
+-- Edits an existing item\'s attributes, or adds a new item to the table if
+-- it does not already exist. You can put, delete, or add attribute values.
+-- You can also perform a conditional update on an existing item (insert a
+-- new attribute name-value pair if it doesn\'t exist, or replace an
+-- existing name-value pair if it has certain expected attribute values).
+-- If conditions are specified and the item does not exist, then the
+-- operation fails and a new item is not created.
+--
+-- You can also return the item\'s attribute values in the same
+-- /UpdateItem/ operation using the /ReturnValues/ parameter.
+--
+-- /See:/ <http://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_UpdateItem.html AWS API Reference> for UpdateItem.
+module Network.AWS.DynamoDB.UpdateItem
+    (
+    -- * Creating a Request
+      updateItem
+    , UpdateItem
+    -- * Request Lenses
+    , uiReturnValues
+    , uiExpressionAttributeNames
+    , uiUpdateExpression
+    , uiAttributeUpdates
+    , uiReturnConsumedCapacity
+    , uiExpressionAttributeValues
+    , uiReturnItemCollectionMetrics
+    , uiConditionExpression
+    , uiConditionalOperator
+    , uiExpected
+    , uiTableName
+    , uiKey
+
+    -- * Destructuring the Response
+    , updateItemResponse
+    , UpdateItemResponse
+    -- * Response Lenses
+    , uirsConsumedCapacity
+    , uirsItemCollectionMetrics
+    , uirsAttributes
+    , uirsStatus
+    ) where
+
+import           Network.AWS.DynamoDB.Types
+import           Network.AWS.DynamoDB.Types.Product
+import           Network.AWS.Prelude
+import           Network.AWS.Request
+import           Network.AWS.Response
+
+-- | Represents the input of an /UpdateItem/ operation.
+--
+-- /See:/ 'updateItem' smart constructor.
+data UpdateItem = UpdateItem'
+    { _uiReturnValues                :: !(Maybe ReturnValue)
+    , _uiExpressionAttributeNames    :: !(Maybe (Map Text Text))
+    , _uiUpdateExpression            :: !(Maybe Text)
+    , _uiAttributeUpdates            :: !(Maybe (Map Text AttributeValueUpdate))
+    , _uiReturnConsumedCapacity      :: !(Maybe ReturnConsumedCapacity)
+    , _uiExpressionAttributeValues   :: !(Maybe (Map Text AttributeValue))
+    , _uiReturnItemCollectionMetrics :: !(Maybe ReturnItemCollectionMetrics)
+    , _uiConditionExpression         :: !(Maybe Text)
+    , _uiConditionalOperator         :: !(Maybe ConditionalOperator)
+    , _uiExpected                    :: !(Maybe (Map Text ExpectedAttributeValue))
+    , _uiTableName                   :: !Text
+    , _uiKey                         :: !(Map Text AttributeValue)
+    } deriving (Eq,Read,Show,Data,Typeable,Generic)
+
+-- | Creates a value of 'UpdateItem' with the minimum fields required to make a request.
+--
+-- Use one of the following lenses to modify other fields as desired:
+--
+-- * 'uiReturnValues'
+--
+-- * 'uiExpressionAttributeNames'
+--
+-- * 'uiUpdateExpression'
+--
+-- * 'uiAttributeUpdates'
+--
+-- * 'uiReturnConsumedCapacity'
+--
+-- * 'uiExpressionAttributeValues'
+--
+-- * 'uiReturnItemCollectionMetrics'
+--
+-- * 'uiConditionExpression'
+--
+-- * 'uiConditionalOperator'
+--
+-- * 'uiExpected'
+--
+-- * 'uiTableName'
+--
+-- * 'uiKey'
+updateItem
+    :: Text -- ^ 'uiTableName'
+    -> UpdateItem
+updateItem pTableName_ =
+    UpdateItem'
+    { _uiReturnValues = Nothing
+    , _uiExpressionAttributeNames = Nothing
+    , _uiUpdateExpression = Nothing
+    , _uiAttributeUpdates = Nothing
+    , _uiReturnConsumedCapacity = Nothing
+    , _uiExpressionAttributeValues = Nothing
+    , _uiReturnItemCollectionMetrics = Nothing
+    , _uiConditionExpression = Nothing
+    , _uiConditionalOperator = Nothing
+    , _uiExpected = Nothing
+    , _uiTableName = pTableName_
+    , _uiKey = mempty
+    }
+
+-- | Use /ReturnValues/ if you want to get the item attributes as they
+-- appeared either before or after they were updated. For /UpdateItem/, the
+-- valid values are:
+--
+-- -   'NONE' - If /ReturnValues/ is not specified, or if its value is
+--     'NONE', then nothing is returned. (This setting is the default for
+--     /ReturnValues/.)
+--
+-- -   'ALL_OLD' - If /UpdateItem/ overwrote an attribute name-value pair,
+--     then the content of the old item is returned.
+--
+-- -   'UPDATED_OLD' - The old versions of only the updated attributes are
+--     returned.
+--
+-- -   'ALL_NEW' - All of the attributes of the new version of the item are
+--     returned.
+--
+-- -   'UPDATED_NEW' - The new versions of only the updated attributes are
+--     returned.
+--
+uiReturnValues :: Lens' UpdateItem (Maybe ReturnValue)
+uiReturnValues = lens _uiReturnValues (\ s a -> s{_uiReturnValues = a});
+
+-- | One or more substitution tokens for attribute names in an expression.
+-- The following are some use cases for using /ExpressionAttributeNames/:
+--
+-- -   To access an attribute whose name conflicts with a DynamoDB reserved
+--     word.
+--
+-- -   To create a placeholder for repeating occurrences of an attribute
+--     name in an expression.
+--
+-- -   To prevent special characters in an attribute name from being
+--     misinterpreted in an expression.
+--
+-- Use the __#__ character in an expression to dereference an attribute
+-- name. For example, consider the following attribute name:
+--
+-- -   'Percentile'
+--
+-- The name of this attribute conflicts with a reserved word, so it cannot
+-- be used directly in an expression. (For the complete list of reserved
+-- words, see
+-- <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ReservedWords.html Reserved Words>
+-- in the /Amazon DynamoDB Developer Guide/). To work around this, you
+-- could specify the following for /ExpressionAttributeNames/:
+--
+-- -   '{\"#P\":\"Percentile\"}'
+--
+-- You could then use this substitution in an expression, as in this
+-- example:
+--
+-- -   '#P = :val'
+--
+-- Tokens that begin with the __:__ character are /expression attribute
+-- values/, which are placeholders for the actual value at runtime.
+--
+-- For more information on expression attribute names, see
+-- <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.AccessingItemAttributes.html Accessing Item Attributes>
+-- in the /Amazon DynamoDB Developer Guide/.
+uiExpressionAttributeNames :: Lens' UpdateItem (HashMap Text Text)
+uiExpressionAttributeNames = lens _uiExpressionAttributeNames (\ s a -> s{_uiExpressionAttributeNames = a}) . _Default . _Map;
+
+-- | An expression that defines one or more attributes to be updated, the
+-- action to be performed on them, and new value(s) for them.
+--
+-- The following action values are available for /UpdateExpression/.
+--
+-- -   'SET' - Adds one or more attributes and values to an item. If any of
+--     these attribute already exist, they are replaced by the new values.
+--     You can also use 'SET' to add or subtract from an attribute that is
+--     of type Number. For example: 'SET myNum = myNum + :val'
+--
+--     'SET' supports the following functions:
+--
+--     -   'if_not_exists (path, operand)' - if the item does not contain
+--         an attribute at the specified path, then 'if_not_exists'
+--         evaluates to operand; otherwise, it evaluates to path. You can
+--         use this function to avoid overwriting an attribute that may
+--         already be present in the item.
+--
+--     -   'list_append (operand, operand)' - evaluates to a list with a
+--         new element added to it. You can append the new element to the
+--         start or the end of the list by reversing the order of the
+--         operands.
+--
+--     These function names are case-sensitive.
+--
+-- -   'REMOVE' - Removes one or more attributes from an item.
+--
+-- -   'ADD' - Adds the specified value to the item, if the attribute does
+--     not already exist. If the attribute does exist, then the behavior of
+--     'ADD' depends on the data type of the attribute:
+--
+--     -   If the existing attribute is a number, and if /Value/ is also a
+--         number, then /Value/ is mathematically added to the existing
+--         attribute. If /Value/ is a negative number, then it is
+--         subtracted from the existing attribute.
+--
+--         If you use 'ADD' to increment or decrement a number value for an
+--         item that doesn\'t exist before the update, DynamoDB uses '0' as
+--         the initial value.
+--
+--         Similarly, if you use 'ADD' for an existing item to increment or
+--         decrement an attribute value that doesn\'t exist before the
+--         update, DynamoDB uses '0' as the initial value. For example,
+--         suppose that the item you want to update doesn\'t have an
+--         attribute named /itemcount/, but you decide to 'ADD' the number
+--         '3' to this attribute anyway. DynamoDB will create the
+--         /itemcount/ attribute, set its initial value to '0', and finally
+--         add '3' to it. The result will be a new /itemcount/ attribute in
+--         the item, with a value of '3'.
+--
+--     -   If the existing data type is a set and if /Value/ is also a set,
+--         then /Value/ is added to the existing set. For example, if the
+--         attribute value is the set '[1,2]', and the 'ADD' action
+--         specified '[3]', then the final attribute value is '[1,2,3]'. An
+--         error occurs if an 'ADD' action is specified for a set attribute
+--         and the attribute type specified does not match the existing set
+--         type.
+--
+--         Both sets must have the same primitive data type. For example,
+--         if the existing data type is a set of strings, the /Value/ must
+--         also be a set of strings.
+--
+--     The 'ADD' action only supports Number and set data types. In
+--     addition, 'ADD' can only be used on top-level attributes, not nested
+--     attributes.
+--
+-- -   'DELETE' - Deletes an element from a set.
+--
+--     If a set of values is specified, then those values are subtracted
+--     from the old set. For example, if the attribute value was the set
+--     '[a,b,c]' and the 'DELETE' action specifies '[a,c]', then the final
+--     attribute value is '[b]'. Specifying an empty set is an error.
+--
+--     The 'DELETE' action only supports set data types. In addition,
+--     'DELETE' can only be used on top-level attributes, not nested
+--     attributes.
+--
+-- You can have many actions in a single expression, such as the following:
+-- 'SET a=:value1, b=:value2 DELETE :value3, :value4, :value5'
+--
+-- For more information on update expressions, see
+-- <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.Modifying.html Modifying Items and Attributes>
+-- in the /Amazon DynamoDB Developer Guide/.
+--
+-- /UpdateExpression/ replaces the legacy /AttributeUpdates/ parameter.
+uiUpdateExpression :: Lens' UpdateItem (Maybe Text)
+uiUpdateExpression = lens _uiUpdateExpression (\ s a -> s{_uiUpdateExpression = a});
+
+-- | This is a legacy parameter, for backward compatibility. New applications
+-- should use /UpdateExpression/ instead. Do not combine legacy parameters
+-- and expression parameters in a single API call; otherwise, DynamoDB will
+-- return a /ValidationException/ exception.
+--
+-- This parameter can be used for modifying top-level attributes; however,
+-- it does not support individual list or map elements.
+--
+-- The names of attributes to be modified, the action to perform on each,
+-- and the new value for each. If you are updating an attribute that is an
+-- index key attribute for any indexes on that table, the attribute type
+-- must match the index key type defined in the /AttributesDefinition/ of
+-- the table description. You can use /UpdateItem/ to update any nonkey
+-- attributes.
+--
+-- Attribute values cannot be null. String and Binary type attributes must
+-- have lengths greater than zero. Set type attributes must not be empty.
+-- Requests with empty values will be rejected with a /ValidationException/
+-- exception.
+--
+-- Each /AttributeUpdates/ element consists of an attribute name to modify,
+-- along with the following:
+--
+-- -   /Value/ - The new value, if applicable, for this attribute.
+--
+-- -   /Action/ - A value that specifies how to perform the update. This
+--     action is only valid for an existing attribute whose data type is
+--     Number or is a set; do not use 'ADD' for other data types.
+--
+--     If an item with the specified primary key is found in the table, the
+--     following values perform the following actions:
+--
+--     -   'PUT' - Adds the specified attribute to the item. If the
+--         attribute already exists, it is replaced by the new value.
+--
+--     -   'DELETE' - Removes the attribute and its value, if no value is
+--         specified for 'DELETE'. The data type of the specified value
+--         must match the existing value\'s data type.
+--
+--         If a set of values is specified, then those values are
+--         subtracted from the old set. For example, if the attribute value
+--         was the set '[a,b,c]' and the 'DELETE' action specifies '[a,c]',
+--         then the final attribute value is '[b]'. Specifying an empty set
+--         is an error.
+--
+--     -   'ADD' - Adds the specified value to the item, if the attribute
+--         does not already exist. If the attribute does exist, then the
+--         behavior of 'ADD' depends on the data type of the attribute:
+--
+--         -   If the existing attribute is a number, and if /Value/ is
+--             also a number, then /Value/ is mathematically added to the
+--             existing attribute. If /Value/ is a negative number, then it
+--             is subtracted from the existing attribute.
+--
+--             If you use 'ADD' to increment or decrement a number value
+--             for an item that doesn\'t exist before the update, DynamoDB
+--             uses 0 as the initial value.
+--
+--             Similarly, if you use 'ADD' for an existing item to
+--             increment or decrement an attribute value that doesn\'t
+--             exist before the update, DynamoDB uses '0' as the initial
+--             value. For example, suppose that the item you want to update
+--             doesn\'t have an attribute named /itemcount/, but you decide
+--             to 'ADD' the number '3' to this attribute anyway. DynamoDB
+--             will create the /itemcount/ attribute, set its initial value
+--             to '0', and finally add '3' to it. The result will be a new
+--             /itemcount/ attribute, with a value of '3'.
+--
+--         -   If the existing data type is a set, and if /Value/ is also a
+--             set, then /Value/ is appended to the existing set. For
+--             example, if the attribute value is the set '[1,2]', and the
+--             'ADD' action specified '[3]', then the final attribute value
+--             is '[1,2,3]'. An error occurs if an 'ADD' action is
+--             specified for a set attribute and the attribute type
+--             specified does not match the existing set type.
+--
+--             Both sets must have the same primitive data type. For
+--             example, if the existing data type is a set of strings,
+--             /Value/ must also be a set of strings.
+--
+--     If no item with the specified key is found in the table, the
+--     following values perform the following actions:
+--
+--     -   'PUT' - Causes DynamoDB to create a new item with the specified
+--         primary key, and then adds the attribute.
+--
+--     -   'DELETE' - Nothing happens, because attributes cannot be deleted
+--         from a nonexistent item. The operation succeeds, but DynamoDB
+--         does not create a new item.
+--
+--     -   'ADD' - Causes DynamoDB to create an item with the supplied
+--         primary key and number (or set of numbers) for the attribute
+--         value. The only data types allowed are Number and Number Set.
+--
+-- If you provide any attributes that are part of an index key, then the
+-- data types for those attributes must match those of the schema in the
+-- table\'s attribute definition.
+uiAttributeUpdates :: Lens' UpdateItem (HashMap Text AttributeValueUpdate)
+uiAttributeUpdates = lens _uiAttributeUpdates (\ s a -> s{_uiAttributeUpdates = a}) . _Default . _Map;
+
+-- | Undocumented member.
+uiReturnConsumedCapacity :: Lens' UpdateItem (Maybe ReturnConsumedCapacity)
+uiReturnConsumedCapacity = lens _uiReturnConsumedCapacity (\ s a -> s{_uiReturnConsumedCapacity = a});
+
+-- | One or more values that can be substituted in an expression.
+--
+-- Use the __:__ (colon) character in an expression to dereference an
+-- attribute value. For example, suppose that you wanted to check whether
+-- the value of the /ProductStatus/ attribute was one of the following:
+--
+-- 'Available | Backordered | Discontinued'
+--
+-- You would first need to specify /ExpressionAttributeValues/ as follows:
+--
+-- '{ \":avail\":{\"S\":\"Available\"}, \":back\":{\"S\":\"Backordered\"}, \":disc\":{\"S\":\"Discontinued\"} }'
+--
+-- You could then use these values in an expression, such as this:
+--
+-- 'ProductStatus IN (:avail, :back, :disc)'
+--
+-- For more information on expression attribute values, see
+-- <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.SpecifyingConditions.html Specifying Conditions>
+-- in the /Amazon DynamoDB Developer Guide/.
+uiExpressionAttributeValues :: Lens' UpdateItem (HashMap Text AttributeValue)
+uiExpressionAttributeValues = lens _uiExpressionAttributeValues (\ s a -> s{_uiExpressionAttributeValues = a}) . _Default . _Map;
+
+-- | Determines whether item collection metrics are returned. If set to
+-- 'SIZE', the response includes statistics about item collections, if any,
+-- that were modified during the operation are returned in the response. If
+-- set to 'NONE' (the default), no statistics are returned.
+uiReturnItemCollectionMetrics :: Lens' UpdateItem (Maybe ReturnItemCollectionMetrics)
+uiReturnItemCollectionMetrics = lens _uiReturnItemCollectionMetrics (\ s a -> s{_uiReturnItemCollectionMetrics = a});
+
+-- | A condition that must be satisfied in order for a conditional update to
+-- succeed.
+--
+-- An expression can contain any of the following:
+--
+-- -   Functions:
+--     'attribute_exists | attribute_not_exists | attribute_type | contains | begins_with | size'
+--
+--     These function names are case-sensitive.
+--
+-- -   Comparison operators: ' = | \<> | \< | > | \<= | >= | BETWEEN | IN'
+--
+-- -   Logical operators: 'AND | OR | NOT'
+--
+-- For more information on condition expressions, see
+-- <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.SpecifyingConditions.html Specifying Conditions>
+-- in the /Amazon DynamoDB Developer Guide/.
+--
+-- /ConditionExpression/ replaces the legacy /ConditionalOperator/ and
+-- /Expected/ parameters.
+uiConditionExpression :: Lens' UpdateItem (Maybe Text)
+uiConditionExpression = lens _uiConditionExpression (\ s a -> s{_uiConditionExpression = a});
+
+-- | This is a legacy parameter, for backward compatibility. New applications
+-- should use /ConditionExpression/ instead. Do not combine legacy
+-- parameters and expression parameters in a single API call; otherwise,
+-- DynamoDB will return a /ValidationException/ exception.
+--
+-- A logical operator to apply to the conditions in the /Expected/ map:
+--
+-- -   'AND' - If all of the conditions evaluate to true, then the entire
+--     map evaluates to true.
+--
+-- -   'OR' - If at least one of the conditions evaluate to true, then the
+--     entire map evaluates to true.
+--
+-- If you omit /ConditionalOperator/, then 'AND' is the default.
+--
+-- The operation will succeed only if the entire map evaluates to true.
+--
+-- This parameter does not support attributes of type List or Map.
+uiConditionalOperator :: Lens' UpdateItem (Maybe ConditionalOperator)
+uiConditionalOperator = lens _uiConditionalOperator (\ s a -> s{_uiConditionalOperator = a});
+
+-- | This is a legacy parameter, for backward compatibility. New applications
+-- should use /ConditionExpression/ instead. Do not combine legacy
+-- parameters and expression parameters in a single API call; otherwise,
+-- DynamoDB will return a /ValidationException/ exception.
+--
+-- A map of attribute\/condition pairs. /Expected/ provides a conditional
+-- block for the /UpdateItem/ operation.
+--
+-- Each element of /Expected/ consists of an attribute name, a comparison
+-- operator, and one or more values. DynamoDB compares the attribute with
+-- the value(s) you supplied, using the comparison operator. For each
+-- /Expected/ element, the result of the evaluation is either true or
+-- false.
+--
+-- If you specify more than one element in the /Expected/ map, then by
+-- default all of the conditions must evaluate to true. In other words, the
+-- conditions are ANDed together. (You can use the /ConditionalOperator/
+-- parameter to OR the conditions instead. If you do this, then at least
+-- one of the conditions must evaluate to true, rather than all of them.)
+--
+-- If the /Expected/ map evaluates to true, then the conditional operation
+-- succeeds; otherwise, it fails.
+--
+-- /Expected/ contains the following:
+--
+-- -   /AttributeValueList/ - One or more values to evaluate against the
+--     supplied attribute. The number of values in the list depends on the
+--     /ComparisonOperator/ being used.
+--
+--     For type Number, value comparisons are numeric.
+--
+--     String value comparisons for greater than, equals, or less than are
+--     based on ASCII character code values. For example, 'a' is greater
+--     than 'A', and 'a' is greater than 'B'. For a list of code values,
+--     see <http://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters>.
+--
+--     For type Binary, DynamoDB treats each byte of the binary data as
+--     unsigned when it compares binary values.
+--
+-- -   /ComparisonOperator/ - A comparator for evaluating attributes in the
+--     /AttributeValueList/. When performing the comparison, DynamoDB uses
+--     strongly consistent reads.
+--
+--     The following comparison operators are available:
+--
+--     'EQ | NE | LE | LT | GE | GT | NOT_NULL | NULL | CONTAINS | NOT_CONTAINS | BEGINS_WITH | IN | BETWEEN'
+--
+--     The following are descriptions of each comparison operator.
+--
+--     -   'EQ' : Equal. 'EQ' is supported for all datatypes, including
+--         lists and maps.
+--
+--         /AttributeValueList/ can contain only one /AttributeValue/
+--         element of type String, Number, Binary, String Set, Number Set,
+--         or Binary Set. If an item contains an /AttributeValue/ element
+--         of a different type than the one provided in the request, the
+--         value does not match. For example, '{\"S\":\"6\"}' does not
+--         equal '{\"N\":\"6\"}'. Also, '{\"N\":\"6\"}' does not equal
+--         '{\"NS\":[\"6\", \"2\", \"1\"]}'.
+--
+--     -   'NE' : Not equal. 'NE' is supported for all datatypes, including
+--         lists and maps.
+--
+--         /AttributeValueList/ can contain only one /AttributeValue/ of
+--         type String, Number, Binary, String Set, Number Set, or Binary
+--         Set. If an item contains an /AttributeValue/ of a different type
+--         than the one provided in the request, the value does not match.
+--         For example, '{\"S\":\"6\"}' does not equal '{\"N\":\"6\"}'.
+--         Also, '{\"N\":\"6\"}' does not equal
+--         '{\"NS\":[\"6\", \"2\", \"1\"]}'.
+--
+--     -   'LE' : Less than or equal.
+--
+--         /AttributeValueList/ can contain only one /AttributeValue/
+--         element of type String, Number, or Binary (not a set type). If
+--         an item contains an /AttributeValue/ element of a different type
+--         than the one provided in the request, the value does not match.
+--         For example, '{\"S\":\"6\"}' does not equal '{\"N\":\"6\"}'.
+--         Also, '{\"N\":\"6\"}' does not compare to
+--         '{\"NS\":[\"6\", \"2\", \"1\"]}'.
+--
+--     -   'LT' : Less than.
+--
+--         /AttributeValueList/ can contain only one /AttributeValue/ of
+--         type String, Number, or Binary (not a set type). If an item
+--         contains an /AttributeValue/ element of a different type than
+--         the one provided in the request, the value does not match. For
+--         example, '{\"S\":\"6\"}' does not equal '{\"N\":\"6\"}'. Also,
+--         '{\"N\":\"6\"}' does not compare to
+--         '{\"NS\":[\"6\", \"2\", \"1\"]}'.
+--
+--     -   'GE' : Greater than or equal.
+--
+--         /AttributeValueList/ can contain only one /AttributeValue/
+--         element of type String, Number, or Binary (not a set type). If
+--         an item contains an /AttributeValue/ element of a different type
+--         than the one provided in the request, the value does not match.
+--         For example, '{\"S\":\"6\"}' does not equal '{\"N\":\"6\"}'.
+--         Also, '{\"N\":\"6\"}' does not compare to
+--         '{\"NS\":[\"6\", \"2\", \"1\"]}'.
+--
+--     -   'GT' : Greater than.
+--
+--         /AttributeValueList/ can contain only one /AttributeValue/
+--         element of type String, Number, or Binary (not a set type). If
+--         an item contains an /AttributeValue/ element of a different type
+--         than the one provided in the request, the value does not match.
+--         For example, '{\"S\":\"6\"}' does not equal '{\"N\":\"6\"}'.
+--         Also, '{\"N\":\"6\"}' does not compare to
+--         '{\"NS\":[\"6\", \"2\", \"1\"]}'.
+--
+--     -   'NOT_NULL' : The attribute exists. 'NOT_NULL' is supported for
+--         all datatypes, including lists and maps.
+--
+--         This operator tests for the existence of an attribute, not its
+--         data type. If the data type of attribute \"'a'\" is null, and
+--         you evaluate it using 'NOT_NULL', the result is a Boolean
+--         /true/. This result is because the attribute \"'a'\" exists; its
+--         data type is not relevant to the 'NOT_NULL' comparison operator.
+--
+--     -   'NULL' : The attribute does not exist. 'NULL' is supported for
+--         all datatypes, including lists and maps.
+--
+--         This operator tests for the nonexistence of an attribute, not
+--         its data type. If the data type of attribute \"'a'\" is null,
+--         and you evaluate it using 'NULL', the result is a Boolean
+--         /false/. This is because the attribute \"'a'\" exists; its data
+--         type is not relevant to the 'NULL' comparison operator.
+--
+--     -   'CONTAINS' : Checks for a subsequence, or value in a set.
+--
+--         /AttributeValueList/ can contain only one /AttributeValue/
+--         element of type String, Number, or Binary (not a set type). If
+--         the target attribute of the comparison is of type String, then
+--         the operator checks for a substring match. If the target
+--         attribute of the comparison is of type Binary, then the operator
+--         looks for a subsequence of the target that matches the input. If
+--         the target attribute of the comparison is a set (\"'SS'\",
+--         \"'NS'\", or \"'BS'\"), then the operator evaluates to true if
+--         it finds an exact match with any member of the set.
+--
+--         CONTAINS is supported for lists: When evaluating
+--         \"'a CONTAINS b'\", \"'a'\" can be a list; however, \"'b'\"
+--         cannot be a set, a map, or a list.
+--
+--     -   'NOT_CONTAINS' : Checks for absence of a subsequence, or absence
+--         of a value in a set.
+--
+--         /AttributeValueList/ can contain only one /AttributeValue/
+--         element of type String, Number, or Binary (not a set type). If
+--         the target attribute of the comparison is a String, then the
+--         operator checks for the absence of a substring match. If the
+--         target attribute of the comparison is Binary, then the operator
+--         checks for the absence of a subsequence of the target that
+--         matches the input. If the target attribute of the comparison is
+--         a set (\"'SS'\", \"'NS'\", or \"'BS'\"), then the operator
+--         evaluates to true if it /does not/ find an exact match with any
+--         member of the set.
+--
+--         NOT_CONTAINS is supported for lists: When evaluating
+--         \"'a NOT CONTAINS b'\", \"'a'\" can be a list; however, \"'b'\"
+--         cannot be a set, a map, or a list.
+--
+--     -   'BEGINS_WITH' : Checks for a prefix.
+--
+--         /AttributeValueList/ can contain only one /AttributeValue/ of
+--         type String or Binary (not a Number or a set type). The target
+--         attribute of the comparison must be of type String or Binary
+--         (not a Number or a set type).
+--
+--     -   'IN' : Checks for matching elements within two sets.
+--
+--         /AttributeValueList/ can contain one or more /AttributeValue/
+--         elements of type String, Number, or Binary (not a set type).
+--         These attributes are compared against an existing set type
+--         attribute of an item. If any elements of the input set are
+--         present in the item attribute, the expression evaluates to true.
+--
+--     -   'BETWEEN' : Greater than or equal to the first value, and less
+--         than or equal to the second value.
+--
+--         /AttributeValueList/ must contain two /AttributeValue/ elements
+--         of the same type, either String, Number, or Binary (not a set
+--         type). A target attribute matches if the target value is greater
+--         than, or equal to, the first element and less than, or equal to,
+--         the second element. If an item contains an /AttributeValue/
+--         element of a different type than the one provided in the
+--         request, the value does not match. For example, '{\"S\":\"6\"}'
+--         does not compare to '{\"N\":\"6\"}'. Also, '{\"N\":\"6\"}' does
+--         not compare to '{\"NS\":[\"6\", \"2\", \"1\"]}'
+--
+-- For usage examples of /AttributeValueList/ and /ComparisonOperator/, see
+-- <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.html Legacy Conditional Parameters>
+-- in the /Amazon DynamoDB Developer Guide/.
+--
+-- For backward compatibility with previous DynamoDB releases, the
+-- following parameters can be used instead of /AttributeValueList/ and
+-- /ComparisonOperator/:
+--
+-- -   /Value/ - A value for DynamoDB to compare with an attribute.
+--
+-- -   /Exists/ - A Boolean value that causes DynamoDB to evaluate the
+--     value before attempting the conditional operation:
+--
+--     -   If /Exists/ is 'true', DynamoDB will check to see if that
+--         attribute value already exists in the table. If it is found,
+--         then the condition evaluates to true; otherwise the condition
+--         evaluate to false.
+--
+--     -   If /Exists/ is 'false', DynamoDB assumes that the attribute
+--         value does /not/ exist in the table. If in fact the value does
+--         not exist, then the assumption is valid and the condition
+--         evaluates to true. If the value is found, despite the assumption
+--         that it does not exist, the condition evaluates to false.
+--
+--     Note that the default value for /Exists/ is 'true'.
+--
+-- The /Value/ and /Exists/ parameters are incompatible with
+-- /AttributeValueList/ and /ComparisonOperator/. Note that if you use both
+-- sets of parameters at once, DynamoDB will return a /ValidationException/
+-- exception.
+--
+-- This parameter does not support attributes of type List or Map.
+uiExpected :: Lens' UpdateItem (HashMap Text ExpectedAttributeValue)
+uiExpected = lens _uiExpected (\ s a -> s{_uiExpected = a}) . _Default . _Map;
+
+-- | The name of the table containing the item to update.
+uiTableName :: Lens' UpdateItem Text
+uiTableName = lens _uiTableName (\ s a -> s{_uiTableName = a});
+
+-- | The primary key of the item to be updated. Each element consists of an
+-- attribute name and a value for that attribute.
+--
+-- For the primary key, you must provide all of the attributes. For
+-- example, with a hash type primary key, you only need to provide the hash
+-- attribute. For a hash-and-range type primary key, you must provide both
+-- the hash attribute and the range attribute.
+uiKey :: Lens' UpdateItem (HashMap Text AttributeValue)
+uiKey = lens _uiKey (\ s a -> s{_uiKey = a}) . _Map;
+
+instance AWSRequest UpdateItem where
+        type Sv UpdateItem = DynamoDB
+        type Rs UpdateItem = UpdateItemResponse
+        request = postJSON
+        response
+          = receiveJSON
+              (\ s h x ->
+                 UpdateItemResponse' <$>
+                   (x .?> "ConsumedCapacity") <*>
+                     (x .?> "ItemCollectionMetrics")
+                     <*> (x .?> "Attributes" .!@ mempty)
+                     <*> (pure (fromEnum s)))
+
+instance ToHeaders UpdateItem where
+        toHeaders
+          = const
+              (mconcat
+                 ["X-Amz-Target" =#
+                    ("DynamoDB_20120810.UpdateItem" :: ByteString),
+                  "Content-Type" =#
+                    ("application/x-amz-json-1.0" :: ByteString)])
+
+instance ToJSON UpdateItem where
+        toJSON UpdateItem'{..}
+          = object
+              ["ReturnValues" .= _uiReturnValues,
+               "ExpressionAttributeNames" .=
+                 _uiExpressionAttributeNames,
+               "UpdateExpression" .= _uiUpdateExpression,
+               "AttributeUpdates" .= _uiAttributeUpdates,
+               "ReturnConsumedCapacity" .=
+                 _uiReturnConsumedCapacity,
+               "ExpressionAttributeValues" .=
+                 _uiExpressionAttributeValues,
+               "ReturnItemCollectionMetrics" .=
+                 _uiReturnItemCollectionMetrics,
+               "ConditionExpression" .= _uiConditionExpression,
+               "ConditionalOperator" .= _uiConditionalOperator,
+               "Expected" .= _uiExpected,
+               "TableName" .= _uiTableName, "Key" .= _uiKey]
+
+instance ToPath UpdateItem where
+        toPath = const "/"
+
+instance ToQuery UpdateItem where
+        toQuery = const mempty
+
+-- | Represents the output of an /UpdateItem/ operation.
+--
+-- /See:/ 'updateItemResponse' smart constructor.
+data UpdateItemResponse = UpdateItemResponse'
+    { _uirsConsumedCapacity      :: !(Maybe ConsumedCapacity)
+    , _uirsItemCollectionMetrics :: !(Maybe ItemCollectionMetrics)
+    , _uirsAttributes            :: !(Maybe (Map Text AttributeValue))
+    , _uirsStatus                :: !Int
+    } deriving (Eq,Read,Show,Data,Typeable,Generic)
+
+-- | Creates a value of 'UpdateItemResponse' with the minimum fields required to make a request.
+--
+-- Use one of the following lenses to modify other fields as desired:
+--
+-- * 'uirsConsumedCapacity'
+--
+-- * 'uirsItemCollectionMetrics'
+--
+-- * 'uirsAttributes'
+--
+-- * 'uirsStatus'
+updateItemResponse
+    :: Int -- ^ 'uirsStatus'
+    -> UpdateItemResponse
+updateItemResponse pStatus_ =
+    UpdateItemResponse'
+    { _uirsConsumedCapacity = Nothing
+    , _uirsItemCollectionMetrics = Nothing
+    , _uirsAttributes = Nothing
+    , _uirsStatus = pStatus_
+    }
+
+-- | Undocumented member.
+uirsConsumedCapacity :: Lens' UpdateItemResponse (Maybe ConsumedCapacity)
+uirsConsumedCapacity = lens _uirsConsumedCapacity (\ s a -> s{_uirsConsumedCapacity = a});
+
+-- | Undocumented member.
+uirsItemCollectionMetrics :: Lens' UpdateItemResponse (Maybe ItemCollectionMetrics)
+uirsItemCollectionMetrics = lens _uirsItemCollectionMetrics (\ s a -> s{_uirsItemCollectionMetrics = a});
+
+-- | A map of attribute values as they appeared before the /UpdateItem/
+-- operation. This map only appears if /ReturnValues/ was specified as
+-- something other than 'NONE' in the request. Each element represents one
+-- attribute.
+uirsAttributes :: Lens' UpdateItemResponse (HashMap Text AttributeValue)
+uirsAttributes = lens _uirsAttributes (\ s a -> s{_uirsAttributes = a}) . _Default . _Map;
+
+-- | The response status code.
+uirsStatus :: Lens' UpdateItemResponse Int
+uirsStatus = lens _uirsStatus (\ s a -> s{_uirsStatus = a});
diff --git a/gen/Network/AWS/DynamoDB/UpdateTable.hs b/gen/Network/AWS/DynamoDB/UpdateTable.hs
--- a/gen/Network/AWS/DynamoDB/UpdateTable.hs
+++ b/gen/Network/AWS/DynamoDB/UpdateTable.hs
@@ -1,171 +1,208 @@
-{-# LANGUAGE DataKinds                   #-}
-{-# LANGUAGE DeriveGeneric               #-}
-{-# LANGUAGE FlexibleInstances           #-}
-{-# LANGUAGE GeneralizedNewtypeDeriving  #-}
-{-# LANGUAGE LambdaCase                  #-}
-{-# LANGUAGE NoImplicitPrelude           #-}
-{-# LANGUAGE OverloadedStrings           #-}
-{-# LANGUAGE RecordWildCards             #-}
-{-# LANGUAGE TypeFamilies                #-}
+{-# LANGUAGE DeriveDataTypeable #-}
+{-# LANGUAGE DeriveGeneric      #-}
+{-# LANGUAGE OverloadedStrings  #-}
+{-# LANGUAGE RecordWildCards    #-}
+{-# LANGUAGE TypeFamilies       #-}
 
 {-# OPTIONS_GHC -fno-warn-unused-imports #-}
+{-# OPTIONS_GHC -fno-warn-unused-binds   #-}
+{-# OPTIONS_GHC -fno-warn-unused-matches #-}
 
+-- Derived from AWS service descriptions, licensed under Apache 2.0.
+
+-- |
 -- Module      : Network.AWS.DynamoDB.UpdateTable
--- Copyright   : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>
--- License     : This Source Code Form is subject to the terms of
---               the Mozilla Public License, v. 2.0.
---               A copy of the MPL can be found in the LICENSE file or
---               you can obtain it at http://mozilla.org/MPL/2.0/.
+-- Copyright   : (c) 2013-2015 Brendan Hay
+-- License     : Mozilla Public License, v. 2.0.
 -- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com>
--- Stability   : experimental
+-- Stability   : auto-generated
 -- Portability : non-portable (GHC extensions)
 --
--- Derived from AWS service descriptions, licensed under Apache 2.0.
-
--- | Updates the provisioned throughput for the given table, or manages the global
--- secondary indexes on the table.
+-- Modifies the provisioned throughput settings, global secondary indexes,
+-- or DynamoDB Streams settings for a given table.
 --
--- You can increase or decrease the table's provisioned throughput values
--- within the maximums and minimums listed in the <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Limits.html Limits> section in the /AmazonDynamoDB Developer Guide/.
+-- You can only perform one of the following operations at once:
 --
--- In addition, you can use /UpdateTable/ to add, modify or delete global
--- secondary indexes on the table. For more information, see <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/GSI.OnlineOps.html Managing GlobalSecondary Indexes> in the /Amazon DynamoDB Developer Guide/.
+-- -   Modify the provisioned throughput settings of the table.
 --
--- The table must be in the 'ACTIVE' state for /UpdateTable/ to succeed. /UpdateTable/
--- is an asynchronous operation; while executing the operation, the table is in
--- the 'UPDATING' state. While the table is in the 'UPDATING' state, the table still
--- has the provisioned throughput from before the call. The table's new
--- provisioned throughput settings go into effect when the table returns to the 'ACTIVE' state; at that point, the /UpdateTable/ operation is complete.
+-- -   Enable or disable Streams on the table.
 --
--- <http://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_UpdateTable.html>
+-- -   Remove a global secondary index from the table.
+--
+-- -   Create a new global secondary index on the table. Once the index
+--     begins backfilling, you can use /UpdateTable/ to perform other
+--     operations.
+--
+-- /UpdateTable/ is an asynchronous operation; while it is executing, the
+-- table status changes from 'ACTIVE' to 'UPDATING'. While it is
+-- 'UPDATING', you cannot issue another /UpdateTable/ request. When the
+-- table returns to the 'ACTIVE' state, the /UpdateTable/ operation is
+-- complete.
+--
+-- /See:/ <http://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_UpdateTable.html AWS API Reference> for UpdateTable.
 module Network.AWS.DynamoDB.UpdateTable
     (
-    -- * Request
-      UpdateTable
-    -- ** Request constructor
-    , updateTable
-    -- ** Request lenses
+    -- * Creating a Request
+      updateTable
+    , UpdateTable
+    -- * Request Lenses
+    , utProvisionedThroughput
     , utAttributeDefinitions
     , utGlobalSecondaryIndexUpdates
-    , utProvisionedThroughput
+    , utStreamSpecification
     , utTableName
 
-    -- * Response
-    , UpdateTableResponse
-    -- ** Response constructor
+    -- * Destructuring the Response
     , updateTableResponse
-    -- ** Response lenses
-    , utrTableDescription
+    , UpdateTableResponse
+    -- * Response Lenses
+    , utrsTableDescription
+    , utrsStatus
     ) where
 
-import Network.AWS.Data (Object)
-import Network.AWS.Prelude
-import Network.AWS.Request.JSON
-import Network.AWS.DynamoDB.Types
-import qualified GHC.Exts
+import           Network.AWS.DynamoDB.Types
+import           Network.AWS.DynamoDB.Types.Product
+import           Network.AWS.Prelude
+import           Network.AWS.Request
+import           Network.AWS.Response
 
-data UpdateTable = UpdateTable
-    { _utAttributeDefinitions        :: List "AttributeDefinitions" AttributeDefinition
-    , _utGlobalSecondaryIndexUpdates :: List "GlobalSecondaryIndexUpdates" GlobalSecondaryIndexUpdate
-    , _utProvisionedThroughput       :: Maybe ProvisionedThroughput
-    , _utTableName                   :: Text
-    } deriving (Eq, Read, Show)
+-- | Represents the input of an /UpdateTable/ operation.
+--
+-- /See:/ 'updateTable' smart constructor.
+data UpdateTable = UpdateTable'
+    { _utProvisionedThroughput       :: !(Maybe ProvisionedThroughput)
+    , _utAttributeDefinitions        :: !(Maybe [AttributeDefinition])
+    , _utGlobalSecondaryIndexUpdates :: !(Maybe [GlobalSecondaryIndexUpdate])
+    , _utStreamSpecification         :: !(Maybe StreamSpecification)
+    , _utTableName                   :: !Text
+    } deriving (Eq,Read,Show,Data,Typeable,Generic)
 
--- | 'UpdateTable' constructor.
+-- | Creates a value of 'UpdateTable' with the minimum fields required to make a request.
 --
--- The fields accessible through corresponding lenses are:
+-- Use one of the following lenses to modify other fields as desired:
 --
--- * 'utAttributeDefinitions' @::@ ['AttributeDefinition']
+-- * 'utProvisionedThroughput'
 --
--- * 'utGlobalSecondaryIndexUpdates' @::@ ['GlobalSecondaryIndexUpdate']
+-- * 'utAttributeDefinitions'
 --
--- * 'utProvisionedThroughput' @::@ 'Maybe' 'ProvisionedThroughput'
+-- * 'utGlobalSecondaryIndexUpdates'
 --
--- * 'utTableName' @::@ 'Text'
+-- * 'utStreamSpecification'
 --
-updateTable :: Text -- ^ 'utTableName'
-            -> UpdateTable
-updateTable p1 = UpdateTable
-    { _utTableName                   = p1
-    , _utAttributeDefinitions        = mempty
-    , _utProvisionedThroughput       = Nothing
-    , _utGlobalSecondaryIndexUpdates = mempty
+-- * 'utTableName'
+updateTable
+    :: Text -- ^ 'utTableName'
+    -> UpdateTable
+updateTable pTableName_ =
+    UpdateTable'
+    { _utProvisionedThroughput = Nothing
+    , _utAttributeDefinitions = Nothing
+    , _utGlobalSecondaryIndexUpdates = Nothing
+    , _utStreamSpecification = Nothing
+    , _utTableName = pTableName_
     }
 
+-- | Undocumented member.
+utProvisionedThroughput :: Lens' UpdateTable (Maybe ProvisionedThroughput)
+utProvisionedThroughput = lens _utProvisionedThroughput (\ s a -> s{_utProvisionedThroughput = a});
+
 -- | An array of attributes that describe the key schema for the table and
--- indexes. If you are adding a new global secondary index to the table, /AttributeDefinitions/ must include the key element(s) of the new index.
+-- indexes. If you are adding a new global secondary index to the table,
+-- /AttributeDefinitions/ must include the key element(s) of the new index.
 utAttributeDefinitions :: Lens' UpdateTable [AttributeDefinition]
-utAttributeDefinitions =
-    lens _utAttributeDefinitions (\s a -> s { _utAttributeDefinitions = a })
-        . _List
+utAttributeDefinitions = lens _utAttributeDefinitions (\ s a -> s{_utAttributeDefinitions = a}) . _Default . _Coerce;
 
 -- | An array of one or more global secondary indexes for the table. For each
 -- index in the array, you can request one action:
 --
--- /Create/ - add a new global secondary index to the table.
---
--- /Update/ - modify the provisioned throughput settings of an existing global
--- secondary index.
+-- -   /Create/ - add a new global secondary index to the table.
 --
--- /Delete/ - remove a global secondary index from the table.
+-- -   /Update/ - modify the provisioned throughput settings of an existing
+--     global secondary index.
 --
+-- -   /Delete/ - remove a global secondary index from the table.
 --
+-- For more information, see
+-- <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/GSI.OnlineOps.html Managing Global Secondary Indexes>
+-- in the /Amazon DynamoDB Developer Guide/.
 utGlobalSecondaryIndexUpdates :: Lens' UpdateTable [GlobalSecondaryIndexUpdate]
-utGlobalSecondaryIndexUpdates =
-    lens _utGlobalSecondaryIndexUpdates
-        (\s a -> s { _utGlobalSecondaryIndexUpdates = a })
-            . _List
+utGlobalSecondaryIndexUpdates = lens _utGlobalSecondaryIndexUpdates (\ s a -> s{_utGlobalSecondaryIndexUpdates = a}) . _Default . _Coerce;
 
-utProvisionedThroughput :: Lens' UpdateTable (Maybe ProvisionedThroughput)
-utProvisionedThroughput =
-    lens _utProvisionedThroughput (\s a -> s { _utProvisionedThroughput = a })
+-- | Represents the DynamoDB Streams configuration for the table.
+--
+-- You will receive a /ResourceInUseException/ if you attempt to enable a
+-- stream on a table that already has a stream, or if you attempt to
+-- disable a stream on a table which does not have a stream.
+utStreamSpecification :: Lens' UpdateTable (Maybe StreamSpecification)
+utStreamSpecification = lens _utStreamSpecification (\ s a -> s{_utStreamSpecification = a});
 
 -- | The name of the table to be updated.
 utTableName :: Lens' UpdateTable Text
-utTableName = lens _utTableName (\s a -> s { _utTableName = a })
+utTableName = lens _utTableName (\ s a -> s{_utTableName = a});
 
-newtype UpdateTableResponse = UpdateTableResponse
-    { _utrTableDescription :: Maybe TableDescription
-    } deriving (Eq, Read, Show)
+instance AWSRequest UpdateTable where
+        type Sv UpdateTable = DynamoDB
+        type Rs UpdateTable = UpdateTableResponse
+        request = postJSON
+        response
+          = receiveJSON
+              (\ s h x ->
+                 UpdateTableResponse' <$>
+                   (x .?> "TableDescription") <*> (pure (fromEnum s)))
 
--- | 'UpdateTableResponse' constructor.
---
--- The fields accessible through corresponding lenses are:
---
--- * 'utrTableDescription' @::@ 'Maybe' 'TableDescription'
---
-updateTableResponse :: UpdateTableResponse
-updateTableResponse = UpdateTableResponse
-    { _utrTableDescription = Nothing
-    }
+instance ToHeaders UpdateTable where
+        toHeaders
+          = const
+              (mconcat
+                 ["X-Amz-Target" =#
+                    ("DynamoDB_20120810.UpdateTable" :: ByteString),
+                  "Content-Type" =#
+                    ("application/x-amz-json-1.0" :: ByteString)])
 
-utrTableDescription :: Lens' UpdateTableResponse (Maybe TableDescription)
-utrTableDescription =
-    lens _utrTableDescription (\s a -> s { _utrTableDescription = a })
+instance ToJSON UpdateTable where
+        toJSON UpdateTable'{..}
+          = object
+              ["ProvisionedThroughput" .= _utProvisionedThroughput,
+               "AttributeDefinitions" .= _utAttributeDefinitions,
+               "GlobalSecondaryIndexUpdates" .=
+                 _utGlobalSecondaryIndexUpdates,
+               "StreamSpecification" .= _utStreamSpecification,
+               "TableName" .= _utTableName]
 
 instance ToPath UpdateTable where
-    toPath = const "/"
+        toPath = const "/"
 
 instance ToQuery UpdateTable where
-    toQuery = const mempty
-
-instance ToHeaders UpdateTable
+        toQuery = const mempty
 
-instance ToJSON UpdateTable where
-    toJSON UpdateTable{..} = object
-        [ "AttributeDefinitions"        .= _utAttributeDefinitions
-        , "TableName"                   .= _utTableName
-        , "ProvisionedThroughput"       .= _utProvisionedThroughput
-        , "GlobalSecondaryIndexUpdates" .= _utGlobalSecondaryIndexUpdates
-        ]
+-- | Represents the output of an /UpdateTable/ operation.
+--
+-- /See:/ 'updateTableResponse' smart constructor.
+data UpdateTableResponse = UpdateTableResponse'
+    { _utrsTableDescription :: !(Maybe TableDescription)
+    , _utrsStatus           :: !Int
+    } deriving (Eq,Read,Show,Data,Typeable,Generic)
 
-instance AWSRequest UpdateTable where
-    type Sv UpdateTable = DynamoDB
-    type Rs UpdateTable = UpdateTableResponse
+-- | Creates a value of 'UpdateTableResponse' with the minimum fields required to make a request.
+--
+-- Use one of the following lenses to modify other fields as desired:
+--
+-- * 'utrsTableDescription'
+--
+-- * 'utrsStatus'
+updateTableResponse
+    :: Int -- ^ 'utrsStatus'
+    -> UpdateTableResponse
+updateTableResponse pStatus_ =
+    UpdateTableResponse'
+    { _utrsTableDescription = Nothing
+    , _utrsStatus = pStatus_
+    }
 
-    request  = post "UpdateTable"
-    response = jsonResponse
+-- | Undocumented member.
+utrsTableDescription :: Lens' UpdateTableResponse (Maybe TableDescription)
+utrsTableDescription = lens _utrsTableDescription (\ s a -> s{_utrsTableDescription = a});
 
-instance FromJSON UpdateTableResponse where
-    parseJSON = withObject "UpdateTableResponse" $ \o -> UpdateTableResponse
-        <$> o .:? "TableDescription"
+-- | The response status code.
+utrsStatus :: Lens' UpdateTableResponse Int
+utrsStatus = lens _utrsStatus (\ s a -> s{_utrsStatus = a});
diff --git a/gen/Network/AWS/DynamoDB/Waiters.hs b/gen/Network/AWS/DynamoDB/Waiters.hs
--- a/gen/Network/AWS/DynamoDB/Waiters.hs
+++ b/gen/Network/AWS/DynamoDB/Waiters.hs
@@ -1,42 +1,49 @@
 {-# LANGUAGE OverloadedStrings #-}
 {-# LANGUAGE TypeFamilies      #-}
 
+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
+
+-- Derived from AWS service descriptions, licensed under Apache 2.0.
+
+-- |
 -- Module      : Network.AWS.DynamoDB.Waiters
--- Copyright   : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>
--- License     : This Source Code Form is subject to the terms of
---               the Mozilla Public License, v. 2.0.
---               A copy of the MPL can be found in the LICENSE file or
---               you can obtain it at http://mozilla.org/MPL/2.0/.
+-- Copyright   : (c) 2013-2015 Brendan Hay
+-- License     : Mozilla Public License, v. 2.0.
 -- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com>
--- Stability   : experimental
+-- Stability   : auto-generated
 -- Portability : non-portable (GHC extensions)
 --
--- Derived from AWS service descriptions, licensed under Apache 2.0.
-
 module Network.AWS.DynamoDB.Waiters where
 
-import Network.AWS.DynamoDB.DescribeTable
-import Network.AWS.DynamoDB.Types
-import Network.AWS.Waiters
+import           Network.AWS.DynamoDB.DescribeTable
+import           Network.AWS.DynamoDB.DescribeTable
+import           Network.AWS.DynamoDB.Types
+import           Network.AWS.Prelude
+import           Network.AWS.Waiter
 
-tableExists :: Wait DescribeTable
-tableExists = Wait
-    { _waitName      = "TableExists"
-    , _waitAttempts  = 25
-    , _waitDelay     = 20
-    , _waitAcceptors =
-        [ matchAll TSActive AcceptSuccess
-            (dtrTable . tdTableStatus)
-        , matchError "ResourceNotFoundException" AcceptRetry
-        ]
+-- | Polls 'Network.AWS.DynamoDB.DescribeTable' every 20 seconds until a
+-- successful state is reached. An error is returned after 25 failed checks.
+tableNotExists :: Wait DescribeTable
+tableNotExists =
+    Wait
+    { _waitName = "TableNotExists"
+    , _waitAttempts = 25
+    , _waitDelay = 20
+    , _waitAcceptors = [matchError "ResourceNotFoundException" AcceptSuccess]
     }
 
-tableNotExists :: Wait DescribeTable
-tableNotExists = Wait
-    { _waitName      = "TableNotExists"
-    , _waitAttempts  = 25
-    , _waitDelay     = 20
-    , _waitAcceptors =
-        [ matchError "ResourceNotFoundException" AcceptSuccess
-        ]
+-- | Polls 'Network.AWS.DynamoDB.DescribeTable' every 20 seconds until a
+-- successful state is reached. An error is returned after 25 failed checks.
+tableExists :: Wait DescribeTable
+tableExists =
+    Wait
+    { _waitName = "TableExists"
+    , _waitAttempts = 25
+    , _waitDelay = 20
+    , _waitAcceptors = [ matchAll
+                             "ACTIVE"
+                             AcceptSuccess
+                             (drsTable .
+                              _Just . tdTableStatus . _Just . to toTextCI)
+                       , matchError "ResourceNotFoundException" AcceptRetry]
     }
diff --git a/test/Main.hs b/test/Main.hs
new file mode 100644
--- /dev/null
+++ b/test/Main.hs
@@ -0,0 +1,21 @@
+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
+
+-- |
+-- Module      : Main
+-- Copyright   : (c) 2013-2015 Brendan Hay
+-- License     : Mozilla Public License, v. 2.0.
+-- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com>
+-- Stability   : auto-generated
+-- Portability : non-portable (GHC extensions)
+--
+module Main (main) where
+
+import Test.Tasty
+import Test.AWS.DynamoDB
+import Test.AWS.DynamoDB.Internal
+
+main :: IO ()
+main = defaultMain $ testGroup "DynamoDB"
+    [ testGroup "tests"    tests
+    , testGroup "fixtures" fixtures
+    ]
diff --git a/test/Test/AWS/DynamoDB.hs b/test/Test/AWS/DynamoDB.hs
new file mode 100644
--- /dev/null
+++ b/test/Test/AWS/DynamoDB.hs
@@ -0,0 +1,26 @@
+{-# LANGUAGE OverloadedStrings #-}
+
+-- Module      : Test.AWS.DynamoDB
+-- Copyright   : (c) 2013-2015 Brendan Hay
+-- License     : This Source Code Form is subject to the terms of
+--               the Mozilla Public License, v. 2.0.
+--               A copy of the MPL can be found in the LICENSE file or
+--               you can obtain it at http://mozilla.org/MPL/2.0/.
+-- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com>
+-- Stability   : experimental
+-- Portability : non-portable (GHC extensions)
+
+module Test.AWS.DynamoDB
+    ( tests
+    , fixtures
+    ) where
+
+import           Network.AWS.DynamoDB
+import           Test.AWS.Gen.DynamoDB
+import           Test.Tasty
+
+tests :: [TestTree]
+tests = []
+
+fixtures :: [TestTree]
+fixtures = []
diff --git a/test/Test/AWS/DynamoDB/Internal.hs b/test/Test/AWS/DynamoDB/Internal.hs
new file mode 100644
--- /dev/null
+++ b/test/Test/AWS/DynamoDB/Internal.hs
@@ -0,0 +1,16 @@
+{-# LANGUAGE OverloadedStrings #-}
+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
+
+-- Module      : Test.AWS.DynamoDB.Internal
+-- Copyright   : (c) 2013-2015 Brendan Hay
+-- License     : This Source Code Form is subject to the terms of
+--               the Mozilla Public License, v. 2.0.
+--               A copy of the MPL can be found in the LICENSE file or
+--               you can obtain it at http://mozilla.org/MPL/2.0/.
+-- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com>
+-- Stability   : experimental
+-- Portability : non-portable (GHC extensions)
+
+module Test.AWS.DynamoDB.Internal where
+
+import Test.AWS.Prelude
diff --git a/test/Test/AWS/Gen/DynamoDB.hs b/test/Test/AWS/Gen/DynamoDB.hs
new file mode 100644
--- /dev/null
+++ b/test/Test/AWS/Gen/DynamoDB.hs
@@ -0,0 +1,260 @@
+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
+{-# OPTIONS_GHC -fno-warn-orphans        #-}
+
+-- Derived from AWS service descriptions, licensed under Apache 2.0.
+
+-- |
+-- Module      : Test.AWS.Gen.DynamoDB
+-- Copyright   : (c) 2013-2015 Brendan Hay
+-- License     : Mozilla Public License, v. 2.0.
+-- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com>
+-- Stability   : auto-generated
+-- Portability : non-portable (GHC extensions)
+--
+module Test.AWS.Gen.DynamoDB where
+
+import Data.Proxy
+import Test.AWS.Fixture
+import Test.AWS.Prelude
+import Test.Tasty
+import Network.AWS.DynamoDB
+import Test.AWS.DynamoDB.Internal
+
+-- Auto-generated: the actual test selection needs to be manually placed into
+-- the top-level so that real test data can be incrementally added.
+--
+-- This commented snippet is what the entire set should look like:
+
+-- fixtures :: TestTree
+-- fixtures =
+--     [ testGroup "request"
+--         [ testUpdateItem $
+--             updateItem
+--
+--         , testDeleteItem $
+--             deleteItem
+--
+--         , testPutItem $
+--             putItem
+--
+--         , testDeleteTable $
+--             deleteTable
+--
+--         , testUpdateTable $
+--             updateTable
+--
+--         , testBatchGetItem $
+--             batchGetItem
+--
+--         , testDescribeTable $
+--             describeTable
+--
+--         , testGetItem $
+--             getItem
+--
+--         , testBatchWriteItem $
+--             batchWriteItem
+--
+--         , testScan $
+--             scan
+--
+--         , testListTables $
+--             listTables
+--
+--         , testQuery $
+--             query
+--
+--         , testCreateTable $
+--             createTable
+--
+--           ]
+
+--     , testGroup "response"
+--         [ testUpdateItemResponse $
+--             updateItemResponse
+--
+--         , testDeleteItemResponse $
+--             deleteItemResponse
+--
+--         , testPutItemResponse $
+--             putItemResponse
+--
+--         , testDeleteTableResponse $
+--             deleteTableResponse
+--
+--         , testUpdateTableResponse $
+--             updateTableResponse
+--
+--         , testBatchGetItemResponse $
+--             batchGetItemResponse
+--
+--         , testDescribeTableResponse $
+--             describeTableResponse
+--
+--         , testGetItemResponse $
+--             getItemResponse
+--
+--         , testBatchWriteItemResponse $
+--             batchWriteItemResponse
+--
+--         , testScanResponse $
+--             scanResponse
+--
+--         , testListTablesResponse $
+--             listTablesResponse
+--
+--         , testQueryResponse $
+--             queryResponse
+--
+--         , testCreateTableResponse $
+--             createTableResponse
+--
+--           ]
+--     ]
+
+-- Requests
+
+testUpdateItem :: UpdateItem -> TestTree
+testUpdateItem = req
+    "UpdateItem"
+    "fixture/UpdateItem"
+
+testDeleteItem :: DeleteItem -> TestTree
+testDeleteItem = req
+    "DeleteItem"
+    "fixture/DeleteItem"
+
+testPutItem :: PutItem -> TestTree
+testPutItem = req
+    "PutItem"
+    "fixture/PutItem"
+
+testDeleteTable :: DeleteTable -> TestTree
+testDeleteTable = req
+    "DeleteTable"
+    "fixture/DeleteTable"
+
+testUpdateTable :: UpdateTable -> TestTree
+testUpdateTable = req
+    "UpdateTable"
+    "fixture/UpdateTable"
+
+testBatchGetItem :: BatchGetItem -> TestTree
+testBatchGetItem = req
+    "BatchGetItem"
+    "fixture/BatchGetItem"
+
+testDescribeTable :: DescribeTable -> TestTree
+testDescribeTable = req
+    "DescribeTable"
+    "fixture/DescribeTable"
+
+testGetItem :: GetItem -> TestTree
+testGetItem = req
+    "GetItem"
+    "fixture/GetItem"
+
+testBatchWriteItem :: BatchWriteItem -> TestTree
+testBatchWriteItem = req
+    "BatchWriteItem"
+    "fixture/BatchWriteItem"
+
+testScan :: Scan -> TestTree
+testScan = req
+    "Scan"
+    "fixture/Scan"
+
+testListTables :: ListTables -> TestTree
+testListTables = req
+    "ListTables"
+    "fixture/ListTables"
+
+testQuery :: Query -> TestTree
+testQuery = req
+    "Query"
+    "fixture/Query"
+
+testCreateTable :: CreateTable -> TestTree
+testCreateTable = req
+    "CreateTable"
+    "fixture/CreateTable"
+
+-- Responses
+
+testUpdateItemResponse :: UpdateItemResponse -> TestTree
+testUpdateItemResponse = res
+    "UpdateItemResponse"
+    "fixture/UpdateItemResponse"
+    (Proxy :: Proxy UpdateItem)
+
+testDeleteItemResponse :: DeleteItemResponse -> TestTree
+testDeleteItemResponse = res
+    "DeleteItemResponse"
+    "fixture/DeleteItemResponse"
+    (Proxy :: Proxy DeleteItem)
+
+testPutItemResponse :: PutItemResponse -> TestTree
+testPutItemResponse = res
+    "PutItemResponse"
+    "fixture/PutItemResponse"
+    (Proxy :: Proxy PutItem)
+
+testDeleteTableResponse :: DeleteTableResponse -> TestTree
+testDeleteTableResponse = res
+    "DeleteTableResponse"
+    "fixture/DeleteTableResponse"
+    (Proxy :: Proxy DeleteTable)
+
+testUpdateTableResponse :: UpdateTableResponse -> TestTree
+testUpdateTableResponse = res
+    "UpdateTableResponse"
+    "fixture/UpdateTableResponse"
+    (Proxy :: Proxy UpdateTable)
+
+testBatchGetItemResponse :: BatchGetItemResponse -> TestTree
+testBatchGetItemResponse = res
+    "BatchGetItemResponse"
+    "fixture/BatchGetItemResponse"
+    (Proxy :: Proxy BatchGetItem)
+
+testDescribeTableResponse :: DescribeTableResponse -> TestTree
+testDescribeTableResponse = res
+    "DescribeTableResponse"
+    "fixture/DescribeTableResponse"
+    (Proxy :: Proxy DescribeTable)
+
+testGetItemResponse :: GetItemResponse -> TestTree
+testGetItemResponse = res
+    "GetItemResponse"
+    "fixture/GetItemResponse"
+    (Proxy :: Proxy GetItem)
+
+testBatchWriteItemResponse :: BatchWriteItemResponse -> TestTree
+testBatchWriteItemResponse = res
+    "BatchWriteItemResponse"
+    "fixture/BatchWriteItemResponse"
+    (Proxy :: Proxy BatchWriteItem)
+
+testScanResponse :: ScanResponse -> TestTree
+testScanResponse = res
+    "ScanResponse"
+    "fixture/ScanResponse"
+    (Proxy :: Proxy Scan)
+
+testListTablesResponse :: ListTablesResponse -> TestTree
+testListTablesResponse = res
+    "ListTablesResponse"
+    "fixture/ListTablesResponse"
+    (Proxy :: Proxy ListTables)
+
+testQueryResponse :: QueryResponse -> TestTree
+testQueryResponse = res
+    "QueryResponse"
+    "fixture/QueryResponse"
+    (Proxy :: Proxy Query)
+
+testCreateTableResponse :: CreateTableResponse -> TestTree
+testCreateTableResponse = res
+    "CreateTableResponse"
+    "fixture/CreateTableResponse"
+    (Proxy :: Proxy CreateTable)
