packages feed

amazonka-sdb (empty) → 0.0.0

raw patch · 16 files changed

+2229/−0 lines, 16 filesdep +amazonka-coredep +basesetup-changed

Dependencies added: amazonka-core, base

Files

+ LICENSE view
@@ -0,0 +1,373 @@+Mozilla Public License Version 2.0+==================================++1. Definitions+--------------++1.1. "Contributor"+    means each individual or legal entity that creates, contributes to+    the creation of, or owns Covered Software.++1.2. "Contributor Version"+    means the combination of the Contributions of others (if any) used+    by a Contributor and that particular Contributor's Contribution.++1.3. "Contribution"+    means Covered Software of a particular Contributor.++1.4. "Covered Software"+    means Source Code Form to which the initial Contributor has attached+    the notice in Exhibit A, the Executable Form of such Source Code+    Form, and Modifications of such Source Code Form, in each case+    including portions thereof.++1.5. "Incompatible With Secondary Licenses"+    means++    (a) that the initial Contributor has attached the notice described+        in Exhibit B to the Covered Software; or++    (b) that the Covered Software was made available under the terms of+        version 1.1 or earlier of the License, but not also under the+        terms of a Secondary License.++1.6. "Executable Form"+    means any form of the work other than Source Code Form.++1.7. "Larger Work"+    means a work that combines Covered Software with other material, in+    a separate file or files, that is not Covered Software.++1.8. "License"+    means this document.++1.9. "Licensable"+    means having the right to grant, to the maximum extent possible,+    whether at the time of the initial grant or subsequently, any and+    all of the rights conveyed by this License.++1.10. "Modifications"+    means any of the following:++    (a) any file in Source Code Form that results from an addition to,+        deletion from, or modification of the contents of Covered+        Software; or++    (b) any new file in Source Code Form that contains any Covered+        Software.++1.11. "Patent Claims" of a Contributor+    means any patent claim(s), including without limitation, method,+    process, and apparatus claims, in any patent Licensable by such+    Contributor that would be infringed, but for the grant of the+    License, by the making, using, selling, offering for sale, having+    made, import, or transfer of either its Contributions or its+    Contributor Version.++1.12. "Secondary License"+    means either the GNU General Public License, Version 2.0, the GNU+    Lesser General Public License, Version 2.1, the GNU Affero General+    Public License, Version 3.0, or any later versions of those+    licenses.++1.13. "Source Code Form"+    means the form of the work preferred for making modifications.++1.14. "You" (or "Your")+    means an individual or a legal entity exercising rights under this+    License. For legal entities, "You" includes any entity that+    controls, is controlled by, or is under common control with You. For+    purposes of this definition, "control" means (a) the power, direct+    or indirect, to cause the direction or management of such entity,+    whether by contract or otherwise, or (b) ownership of more than+    fifty percent (50%) of the outstanding shares or beneficial+    ownership of such entity.++2. License Grants and Conditions+--------------------------------++2.1. Grants++Each Contributor hereby grants You a world-wide, royalty-free,+non-exclusive license:++(a) under intellectual property rights (other than patent or trademark)+    Licensable by such Contributor to use, reproduce, make available,+    modify, display, perform, distribute, and otherwise exploit its+    Contributions, either on an unmodified basis, with Modifications, or+    as part of a Larger Work; and++(b) under Patent Claims of such Contributor to make, use, sell, offer+    for sale, have made, import, and otherwise transfer either its+    Contributions or its Contributor Version.++2.2. Effective Date++The licenses granted in Section 2.1 with respect to any Contribution+become effective for each Contribution on the date the Contributor first+distributes such Contribution.++2.3. Limitations on Grant Scope++The licenses granted in this Section 2 are the only rights granted under+this License. No additional rights or licenses will be implied from the+distribution or licensing of Covered Software under this License.+Notwithstanding Section 2.1(b) above, no patent license is granted by a+Contributor:++(a) for any code that a Contributor has removed from Covered Software;+    or++(b) for infringements caused by: (i) Your and any other third party's+    modifications of Covered Software, or (ii) the combination of its+    Contributions with other software (except as part of its Contributor+    Version); or++(c) under Patent Claims infringed by Covered Software in the absence of+    its Contributions.++This License does not grant any rights in the trademarks, service marks,+or logos of any Contributor (except as may be necessary to comply with+the notice requirements in Section 3.4).++2.4. Subsequent Licenses++No Contributor makes additional grants as a result of Your choice to+distribute the Covered Software under a subsequent version of this+License (see Section 10.2) or under the terms of a Secondary License (if+permitted under the terms of Section 3.3).++2.5. Representation++Each Contributor represents that the Contributor believes its+Contributions are its original creation(s) or it has sufficient rights+to grant the rights to its Contributions conveyed by this License.++2.6. Fair Use++This License is not intended to limit any rights You have under+applicable copyright doctrines of fair use, fair dealing, or other+equivalents.++2.7. Conditions++Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted+in Section 2.1.++3. Responsibilities+-------------------++3.1. Distribution of Source Form++All distribution of Covered Software in Source Code Form, including any+Modifications that You create or to which You contribute, must be under+the terms of this License. You must inform recipients that the Source+Code Form of the Covered Software is governed by the terms of this+License, and how they can obtain a copy of this License. You may not+attempt to alter or restrict the recipients' rights in the Source Code+Form.++3.2. Distribution of Executable Form++If You distribute Covered Software in Executable Form then:++(a) such Covered Software must also be made available in Source Code+    Form, as described in Section 3.1, and You must inform recipients of+    the Executable Form how they can obtain a copy of such Source Code+    Form by reasonable means in a timely manner, at a charge no more+    than the cost of distribution to the recipient; and++(b) You may distribute such Executable Form under the terms of this+    License, or sublicense it under different terms, provided that the+    license for the Executable Form does not attempt to limit or alter+    the recipients' rights in the Source Code Form under this License.++3.3. Distribution of a Larger Work++You may create and distribute a Larger Work under terms of Your choice,+provided that You also comply with the requirements of this License for+the Covered Software. If the Larger Work is a combination of Covered+Software with a work governed by one or more Secondary Licenses, and the+Covered Software is not Incompatible With Secondary Licenses, this+License permits You to additionally distribute such Covered Software+under the terms of such Secondary License(s), so that the recipient of+the Larger Work may, at their option, further distribute the Covered+Software under the terms of either this License or such Secondary+License(s).++3.4. Notices++You may not remove or alter the substance of any license notices+(including copyright notices, patent notices, disclaimers of warranty,+or limitations of liability) contained within the Source Code Form of+the Covered Software, except that You may alter any license notices to+the extent required to remedy known factual inaccuracies.++3.5. Application of Additional Terms++You may choose to offer, and to charge a fee for, warranty, support,+indemnity or liability obligations to one or more recipients of Covered+Software. However, You may do so only on Your own behalf, and not on+behalf of any Contributor. You must make it absolutely clear that any+such warranty, support, indemnity, or liability obligation is offered by+You alone, and You hereby agree to indemnify every Contributor for any+liability incurred by such Contributor as a result of warranty, support,+indemnity or liability terms You offer. You may include additional+disclaimers of warranty and limitations of liability specific to any+jurisdiction.++4. Inability to Comply Due to Statute or Regulation+---------------------------------------------------++If it is impossible for You to comply with any of the terms of this+License with respect to some or all of the Covered Software due to+statute, judicial order, or regulation then You must: (a) comply with+the terms of this License to the maximum extent possible; and (b)+describe the limitations and the code they affect. Such description must+be placed in a text file included with all distributions of the Covered+Software under this License. Except to the extent prohibited by statute+or regulation, such description must be sufficiently detailed for a+recipient of ordinary skill to be able to understand it.++5. Termination+--------------++5.1. The rights granted under this License will terminate automatically+if You fail to comply with any of its terms. However, if You become+compliant, then the rights granted under this License from a particular+Contributor are reinstated (a) provisionally, unless and until such+Contributor explicitly and finally terminates Your grants, and (b) on an+ongoing basis, if such Contributor fails to notify You of the+non-compliance by some reasonable means prior to 60 days after You have+come back into compliance. Moreover, Your grants from a particular+Contributor are reinstated on an ongoing basis if such Contributor+notifies You of the non-compliance by some reasonable means, this is the+first time You have received notice of non-compliance with this License+from such Contributor, and You become compliant prior to 30 days after+Your receipt of the notice.++5.2. If You initiate litigation against any entity by asserting a patent+infringement claim (excluding declaratory judgment actions,+counter-claims, and cross-claims) alleging that a Contributor Version+directly or indirectly infringes any patent, then the rights granted to+You by any and all Contributors for the Covered Software under Section+2.1 of this License shall terminate.++5.3. In the event of termination under Sections 5.1 or 5.2 above, all+end user license agreements (excluding distributors and resellers) which+have been validly granted by You or Your distributors under this License+prior to termination shall survive termination.++************************************************************************+*                                                                      *+*  6. Disclaimer of Warranty                                           *+*  -------------------------                                           *+*                                                                      *+*  Covered Software is provided under this License on an "as is"       *+*  basis, without warranty of any kind, either expressed, implied, or  *+*  statutory, including, without limitation, warranties that the       *+*  Covered Software is free of defects, merchantable, fit for a        *+*  particular purpose or non-infringing. The entire risk as to the     *+*  quality and performance of the Covered Software is with You.        *+*  Should any Covered Software prove defective in any respect, You     *+*  (not any Contributor) assume the cost of any necessary servicing,   *+*  repair, or correction. This disclaimer of warranty constitutes an   *+*  essential part of this License. No use of any Covered Software is   *+*  authorized under this License except under this disclaimer.         *+*                                                                      *+************************************************************************++************************************************************************+*                                                                      *+*  7. Limitation of Liability                                          *+*  --------------------------                                          *+*                                                                      *+*  Under no circumstances and under no legal theory, whether tort      *+*  (including negligence), contract, or otherwise, shall any           *+*  Contributor, or anyone who distributes Covered Software as          *+*  permitted above, be liable to You for any direct, indirect,         *+*  special, incidental, or consequential damages of any character      *+*  including, without limitation, damages for lost profits, loss of    *+*  goodwill, work stoppage, computer failure or malfunction, or any    *+*  and all other commercial damages or losses, even if such party      *+*  shall have been informed of the possibility of such damages. This   *+*  limitation of liability shall not apply to liability for death or   *+*  personal injury resulting from such party's negligence to the       *+*  extent applicable law prohibits such limitation. Some               *+*  jurisdictions do not allow the exclusion or limitation of           *+*  incidental or consequential damages, so this exclusion and          *+*  limitation may not apply to You.                                    *+*                                                                      *+************************************************************************++8. Litigation+-------------++Any litigation relating to this License may be brought only in the+courts of a jurisdiction where the defendant maintains its principal+place of business and such litigation shall be governed by laws of that+jurisdiction, without reference to its conflict-of-law provisions.+Nothing in this Section shall prevent a party's ability to bring+cross-claims or counter-claims.++9. Miscellaneous+----------------++This License represents the complete agreement concerning the subject+matter hereof. If any provision of this License is held to be+unenforceable, such provision shall be reformed only to the extent+necessary to make it enforceable. Any law or regulation which provides+that the language of a contract shall be construed against the drafter+shall not be used to construe this License against a Contributor.++10. Versions of the License+---------------------------++10.1. New Versions++Mozilla Foundation is the license steward. Except as provided in Section+10.3, no one other than the license steward has the right to modify or+publish new versions of this License. Each version will be given a+distinguishing version number.++10.2. Effect of New Versions++You may distribute the Covered Software under the terms of the version+of the License under which You originally received the Covered Software,+or under the terms of any subsequent version published by the license+steward.++10.3. Modified Versions++If you create software not governed by this License, and you want to+create a new license for such software, you may create and use a+modified version of this License if you rename the license and remove+any references to the name of the license steward (except to note that+such modified license differs from this License).++10.4. Distributing Source Code Form that is Incompatible With Secondary+Licenses++If You choose to distribute Source Code Form that is Incompatible With+Secondary Licenses under the terms of this version of the License, the+notice described in Exhibit B of this License must be attached.++Exhibit A - Source Code Form License Notice+-------------------------------------------++  This Source Code Form is subject to the terms of the Mozilla Public+  License, v. 2.0. If a copy of the MPL was not distributed with this+  file, You can obtain one at http://mozilla.org/MPL/2.0/.++If it is not possible or desirable to put the notice in a particular+file, then You may include the notice in a location (such as a LICENSE+file in a relevant directory) where a recipient would be likely to look+for such a notice.++You may add additional accurate notices of copyright ownership.++Exhibit B - "Incompatible With Secondary Licenses" Notice+---------------------------------------------------------++  This Source Code Form is "Incompatible With Secondary Licenses", as+  defined by the Mozilla Public License, v. 2.0.
+ README.md view
@@ -0,0 +1,26 @@+# Amazon SimpleDB SDK++> _Warning:_ This is an experimental preview release which is still under heavy development and not intended for public consumption, _caveat emptor_!++* [description](#description)+* [Contribute](#contribute)+* [Licence](#licence)++## Description++Amazon SimpleDB is a highly available and flexible non-relational data store that offloads the work of database administration. Developers simply store and query data items via web services requests and Amazon SimpleDB does the rest. Unbound by the strict requirements of a relational database, Amazon SimpleDB is optimized to provide high availability and flexibility, with little or no administrative burden. Behind the scenes, Amazon SimpleDB creates and manages multiple geographically distributed replicas of your data automatically to enable high availability and data durability. The service charges you only for the resources actually consumed in storing your data and serving your requests. You can change your data model on the fly, and data is automatically indexed for you. With Amazon SimpleDB, you can focus on application development without worrying about infrastructure provisioning, high availability, software maintenance, schema and index management, or performance tuning.++Documentation is available via [Hackage](http://hackage.haskell.org/package/amazonka-sdb)+and [AWS API Reference](http://docs.aws.amazon.com/AmazonSimpleDB/latest/DeveloperGuide/SDB_API.html).+++## Contribute++For any problems, comments, or feedback please create an issue [here on GitHub](https://github.com/brendanhay/amazonka/issues).++> _Note:_ this library is an auto-generated Haskell package. Please see `amazonka-gen` for more information.+++## Licence++`amazonka-sdb` is released under the [Mozilla Public License Version 2.0](http://www.mozilla.org/MPL/).
+ Setup.hs view
@@ -0,0 +1,2 @@+import Distribution.Simple+main = defaultMain
+ amazonka-sdb.cabal view
@@ -0,0 +1,65 @@+name:                  amazonka-sdb+version:               0.0.0+synopsis:              Amazon SimpleDB 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+category:              Network, AWS, Cloud+build-type:            Simple+extra-source-files:    README.md+cabal-version:         >= 1.10++description:+    Amazon SimpleDB is a highly available and flexible non-relational data+    store that offloads the work of database administration. Developers+    simply store and query data items via web services requests and Amazon+    SimpleDB does the rest. Unbound by the strict requirements of a+    relational database, Amazon SimpleDB is optimized to provide high+    availability and flexibility, with little or no administrative burden.+    Behind the scenes, Amazon SimpleDB creates and manages multiple+    geographically distributed replicas of your data automatically to+    enable high availability and data durability. The service charges you+    only for the resources actually consumed in storing your data and+    serving your requests. You can change your data model on the fly, and+    data is automatically indexed for you. With Amazon SimpleDB, you can+    focus on application development without worrying about infrastructure+    provisioning, high availability, software maintenance, schema and index+    management, or performance tuning.+    .+    /See:/ <http://docs.aws.amazon.com/AmazonSimpleDB/latest/DeveloperGuide/SDB_API.html AWS API Reference>+    .+    /Warning:/ This is an experimental preview release which is still under+    heavy development and not intended for public consumption, caveat emptor!++source-repository head+    type:     git+    location: git://github.com/brendanhay/amazonka.git++library+    default-language:  Haskell2010+    hs-source-dirs:    src gen++    ghc-options:       -Wall++    exposed-modules:+          Network.AWS.SDB+        , Network.AWS.SDB.BatchDeleteAttributes+        , Network.AWS.SDB.BatchPutAttributes+        , Network.AWS.SDB.CreateDomain+        , Network.AWS.SDB.DeleteAttributes+        , Network.AWS.SDB.DeleteDomain+        , Network.AWS.SDB.DomainMetadata+        , Network.AWS.SDB.GetAttributes+        , Network.AWS.SDB.ListDomains+        , Network.AWS.SDB.PutAttributes+        , Network.AWS.SDB.Select+        , Network.AWS.SDB.Types++    other-modules:++    build-depends:+          amazonka-core+        , base          >= 4.7 && < 5
+ gen/Network/AWS/SDB.hs view
@@ -0,0 +1,49 @@+-- Module      : Network.AWS.SDB+-- 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)++-- | Amazon SimpleDB is a highly available and flexible non-relational data+-- store that offloads the work of database administration. Developers simply+-- store and query data items via web services requests and Amazon SimpleDB+-- does the rest. Unbound by the strict requirements of a relational database,+-- Amazon SimpleDB is optimized to provide high availability and flexibility,+-- with little or no administrative burden. Behind the scenes, Amazon SimpleDB+-- creates and manages multiple geographically distributed replicas of your+-- data automatically to enable high availability and data durability. The+-- service charges you only for the resources actually consumed in storing+-- your data and serving your requests. You can change your data model on the+-- fly, and data is automatically indexed for you. With Amazon SimpleDB, you+-- can focus on application development without worrying about infrastructure+-- provisioning, high availability, software maintenance, schema and index+-- management, or performance tuning.+module Network.AWS.SDB+    ( module Network.AWS.SDB.BatchDeleteAttributes+    , module Network.AWS.SDB.BatchPutAttributes+    , module Network.AWS.SDB.CreateDomain+    , module Network.AWS.SDB.DeleteAttributes+    , module Network.AWS.SDB.DeleteDomain+    , module Network.AWS.SDB.DomainMetadata+    , module Network.AWS.SDB.GetAttributes+    , module Network.AWS.SDB.ListDomains+    , module Network.AWS.SDB.PutAttributes+    , module Network.AWS.SDB.Select+    , module Network.AWS.SDB.Types+    ) where++import Network.AWS.SDB.BatchDeleteAttributes+import Network.AWS.SDB.BatchPutAttributes+import Network.AWS.SDB.CreateDomain+import Network.AWS.SDB.DeleteAttributes+import Network.AWS.SDB.DeleteDomain+import Network.AWS.SDB.DomainMetadata+import Network.AWS.SDB.GetAttributes+import Network.AWS.SDB.ListDomains+import Network.AWS.SDB.PutAttributes+import Network.AWS.SDB.Select+import Network.AWS.SDB.Types
+ gen/Network/AWS/SDB/BatchDeleteAttributes.hs view
@@ -0,0 +1,103 @@+{-# 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.SDB.BatchDeleteAttributes+-- 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)++-- | Performs multiple DeleteAttributes operations in a single call, which+-- reduces round trips and latencies. This enables Amazon SimpleDB to optimize+-- requests, which generally yields better throughput. The following+-- limitations are enforced for this operation: 1 MB request size 25 item+-- limit per BatchDeleteAttributes operation.+--+-- <http://docs.aws.amazon.com/AmazonSimpleDB/latest/DeveloperGuide/SDB_API_BatchDeleteAttributes.html>+module Network.AWS.SDB.BatchDeleteAttributes+    (+    -- * Request+      BatchDeleteAttributes+    -- ** Request constructor+    , batchDeleteAttributes+    -- ** Request lenses+    , bdaDomainName+    , bdaItems++    -- * Response+    , BatchDeleteAttributesResponse+    -- ** Response constructor+    , batchDeleteAttributesResponse+    ) where++import Network.AWS.Prelude+import Network.AWS.Request.Query+import Network.AWS.SDB.Types+import qualified GHC.Exts++data BatchDeleteAttributes = BatchDeleteAttributes+    { _bdaDomainName :: Text+    , _bdaItems      :: List "Item" DeletableItem+    } deriving (Eq, Show)++-- | 'BatchDeleteAttributes' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'bdaDomainName' @::@ 'Text'+--+-- * 'bdaItems' @::@ ['DeletableItem']+--+batchDeleteAttributes :: Text -- ^ 'bdaDomainName'+                      -> [DeletableItem] -- ^ 'bdaItems'+                      -> BatchDeleteAttributes+batchDeleteAttributes p1 p2 = BatchDeleteAttributes+    { _bdaDomainName = p1+    , _bdaItems      = withIso _List (const id) p2+    }++-- | The name of the domain in which the attributes are being deleted.+bdaDomainName :: Lens' BatchDeleteAttributes Text+bdaDomainName = lens _bdaDomainName (\s a -> s { _bdaDomainName = a })++-- | A list of items on which to perform the operation.+bdaItems :: Lens' BatchDeleteAttributes [DeletableItem]+bdaItems = lens _bdaItems (\s a -> s { _bdaItems = a }) . _List++data BatchDeleteAttributesResponse = BatchDeleteAttributesResponse+    deriving (Eq, Ord, Show, Generic)++-- | 'BatchDeleteAttributesResponse' constructor.+batchDeleteAttributesResponse :: BatchDeleteAttributesResponse+batchDeleteAttributesResponse = BatchDeleteAttributesResponse++instance ToPath BatchDeleteAttributes where+    toPath = const "/"++instance ToQuery BatchDeleteAttributes where+    toQuery BatchDeleteAttributes{..} = mconcat+        [ "DomainName" =? _bdaDomainName+        , toQuery     _bdaItems+        ]++instance ToHeaders BatchDeleteAttributes++instance AWSRequest BatchDeleteAttributes where+    type Sv BatchDeleteAttributes = SDB+    type Rs BatchDeleteAttributes = BatchDeleteAttributesResponse++    request  = post "BatchDeleteAttributes"+    response = nullResponse BatchDeleteAttributesResponse
+ gen/Network/AWS/SDB/BatchPutAttributes.hs view
@@ -0,0 +1,131 @@+{-# 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.SDB.BatchPutAttributes+-- 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)++-- | The BatchPutAttributes operation creates or replaces attributes within one+-- or more items. By using this operation, the client can perform multiple+-- PutAttribute operation with a single call. This helps yield savings in+-- round trips and latencies, enabling Amazon SimpleDB to optimize requests+-- and generally produce better throughput. The client may specify the item+-- name with the Item.X.ItemName parameter. The client may specify new+-- attributes using a combination of the Item.X.Attribute.Y.Name and+-- Item.X.Attribute.Y.Value parameters. The client may specify the first+-- attribute for the first item using the parameters Item.0.Attribute.0.Name+-- and Item.0.Attribute.0.Value, and for the second attribute for the first+-- item by the parameters Item.0.Attribute.1.Name and+-- Item.0.Attribute.1.Value, and so on. Attributes are uniquely identified+-- within an item by their name/value combination. For example, a single item+-- can have the attributes { "first_name", "first_value" } and { "first_name",+-- "second_value" }. However, it cannot have two attribute instances where+-- both the Item.X.Attribute.Y.Name and Item.X.Attribute.Y.Value are the same.+-- Optionally, the requester can supply the Replace parameter for each+-- individual value. Setting this value to true will cause the new attribute+-- values to replace the existing attribute values. For example, if an item I+-- has the attributes { 'a', '1' }, { 'b', '2'} and { 'b', '3' } and the+-- requester does a BatchPutAttributes of {'I', 'b', '4' } with the Replace+-- parameter set to true, the final attributes of the item will be { 'a', '1'+-- } and { 'b', '4' }, replacing the previous values of the 'b' attribute with+-- the new value. This operation is vulnerable to exceeding the maximum URL+-- size when making a REST request using the HTTP GET method. This operation+-- does not support conditions using Expected.X.Name, Expected.X.Value, or+-- Expected.X.Exists. You can execute multiple BatchPutAttributes operations+-- and other operations in parallel. However, large numbers of concurrent+-- BatchPutAttributes calls can result in Service Unavailable (503) responses.+-- The following limitations are enforced for this operation: 256 attribute+-- name-value pairs per item 1 MB request size 1 billion attributes per domain+-- 10 GB of total user data storage per domain 25 item limit per+-- BatchPutAttributes operation.+--+-- <http://docs.aws.amazon.com/AmazonSimpleDB/latest/DeveloperGuide/SDB_API_BatchPutAttributes.html>+module Network.AWS.SDB.BatchPutAttributes+    (+    -- * Request+      BatchPutAttributes+    -- ** Request constructor+    , batchPutAttributes+    -- ** Request lenses+    , bpaDomainName+    , bpaItems++    -- * Response+    , BatchPutAttributesResponse+    -- ** Response constructor+    , batchPutAttributesResponse+    ) where++import Network.AWS.Prelude+import Network.AWS.Request.Query+import Network.AWS.SDB.Types+import qualified GHC.Exts++data BatchPutAttributes = BatchPutAttributes+    { _bpaDomainName :: Text+    , _bpaItems      :: List "Item" ReplaceableItem+    } deriving (Eq, Show)++-- | 'BatchPutAttributes' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'bpaDomainName' @::@ 'Text'+--+-- * 'bpaItems' @::@ ['ReplaceableItem']+--+batchPutAttributes :: Text -- ^ 'bpaDomainName'+                   -> [ReplaceableItem] -- ^ 'bpaItems'+                   -> BatchPutAttributes+batchPutAttributes p1 p2 = BatchPutAttributes+    { _bpaDomainName = p1+    , _bpaItems      = withIso _List (const id) p2+    }++-- | The name of the domain in which the attributes are being stored.+bpaDomainName :: Lens' BatchPutAttributes Text+bpaDomainName = lens _bpaDomainName (\s a -> s { _bpaDomainName = a })++-- | A list of items on which to perform the operation.+bpaItems :: Lens' BatchPutAttributes [ReplaceableItem]+bpaItems = lens _bpaItems (\s a -> s { _bpaItems = a }) . _List++data BatchPutAttributesResponse = BatchPutAttributesResponse+    deriving (Eq, Ord, Show, Generic)++-- | 'BatchPutAttributesResponse' constructor.+batchPutAttributesResponse :: BatchPutAttributesResponse+batchPutAttributesResponse = BatchPutAttributesResponse++instance ToPath BatchPutAttributes where+    toPath = const "/"++instance ToQuery BatchPutAttributes where+    toQuery BatchPutAttributes{..} = mconcat+        [ "DomainName" =? _bpaDomainName+        , toQuery     _bpaItems+        ]++instance ToHeaders BatchPutAttributes++instance AWSRequest BatchPutAttributes where+    type Sv BatchPutAttributes = SDB+    type Rs BatchPutAttributes = BatchPutAttributesResponse++    request  = post "BatchPutAttributes"+    response = nullResponse BatchPutAttributesResponse
+ gen/Network/AWS/SDB/CreateDomain.hs view
@@ -0,0 +1,95 @@+{-# 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.SDB.CreateDomain+-- 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)++-- | The CreateDomain operation creates a new domain. The domain name should be+-- unique among the domains associated with the Access Key ID provided in the+-- request. The CreateDomain operation may take 10 or more seconds to+-- complete. The client can create up to 100 domains per account. If the+-- client requires additional domains, go to+-- http://aws.amazon.com/contact-us/simpledb-limit-request/.+--+-- <http://docs.aws.amazon.com/AmazonSimpleDB/latest/DeveloperGuide/SDB_API_CreateDomain.html>+module Network.AWS.SDB.CreateDomain+    (+    -- * Request+      CreateDomain+    -- ** Request constructor+    , createDomain+    -- ** Request lenses+    , cdDomainName++    -- * Response+    , CreateDomainResponse+    -- ** Response constructor+    , createDomainResponse+    ) where++import Network.AWS.Prelude+import Network.AWS.Request.Query+import Network.AWS.SDB.Types+import qualified GHC.Exts++newtype CreateDomain = CreateDomain+    { _cdDomainName :: Text+    } deriving (Eq, Ord, Show, Monoid, IsString)++-- | 'CreateDomain' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'cdDomainName' @::@ 'Text'+--+createDomain :: Text -- ^ 'cdDomainName'+             -> CreateDomain+createDomain p1 = CreateDomain+    { _cdDomainName = p1+    }++-- | The name of the domain to create. The name can range between 3 and 255+-- characters and can contain the following characters: a-z, A-Z, 0-9, '_',+-- '-', and '.'.+cdDomainName :: Lens' CreateDomain Text+cdDomainName = lens _cdDomainName (\s a -> s { _cdDomainName = a })++data CreateDomainResponse = CreateDomainResponse+    deriving (Eq, Ord, Show, Generic)++-- | 'CreateDomainResponse' constructor.+createDomainResponse :: CreateDomainResponse+createDomainResponse = CreateDomainResponse++instance ToPath CreateDomain where+    toPath = const "/"++instance ToQuery CreateDomain where+    toQuery CreateDomain{..} = mconcat+        [ "DomainName" =? _cdDomainName+        ]++instance ToHeaders CreateDomain++instance AWSRequest CreateDomain where+    type Sv CreateDomain = SDB+    type Rs CreateDomain = CreateDomainResponse++    request  = post "CreateDomain"+    response = nullResponse CreateDomainResponse
+ gen/Network/AWS/SDB/DeleteAttributes.hs view
@@ -0,0 +1,132 @@+{-# 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.SDB.DeleteAttributes+-- 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)++-- | Deletes one or more attributes associated with an item. If all attributes+-- of the item are deleted, the item is deleted. DeleteAttributes is an+-- idempotent operation; running it multiple times on the same item or+-- attribute does not result in an error response. Because Amazon SimpleDB+-- makes multiple copies of item data and uses an eventual consistency update+-- model, performing a GetAttributes or Select operation (read) immediately+-- after a DeleteAttributes or PutAttributes operation (write) might not+-- return updated item data.+--+-- <http://docs.aws.amazon.com/AmazonSimpleDB/latest/DeveloperGuide/SDB_API_DeleteAttributes.html>+module Network.AWS.SDB.DeleteAttributes+    (+    -- * Request+      DeleteAttributes+    -- ** Request constructor+    , deleteAttributes+    -- ** Request lenses+    , daAttributes+    , daDomainName+    , daExpected+    , daItemName++    -- * Response+    , DeleteAttributesResponse+    -- ** Response constructor+    , deleteAttributesResponse+    ) where++import Network.AWS.Prelude+import Network.AWS.Request.Query+import Network.AWS.SDB.Types+import qualified GHC.Exts++data DeleteAttributes = DeleteAttributes+    { _daAttributes :: List "Attribute" Attribute+    , _daDomainName :: Text+    , _daExpected   :: Maybe UpdateCondition+    , _daItemName   :: Text+    } deriving (Eq, Show)++-- | 'DeleteAttributes' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'daAttributes' @::@ ['Attribute']+--+-- * 'daDomainName' @::@ 'Text'+--+-- * 'daExpected' @::@ 'Maybe' 'UpdateCondition'+--+-- * 'daItemName' @::@ 'Text'+--+deleteAttributes :: Text -- ^ 'daDomainName'+                 -> Text -- ^ 'daItemName'+                 -> [Attribute] -- ^ 'daAttributes'+                 -> DeleteAttributes+deleteAttributes p1 p2 p3 = DeleteAttributes+    { _daDomainName = p1+    , _daItemName   = p2+    , _daAttributes = withIso _List (const id) p3+    , _daExpected   = Nothing+    }++-- | A list of Attributes. Similar to columns on a spreadsheet, attributes+-- represent categories of data that can be assigned to items.+daAttributes :: Lens' DeleteAttributes [Attribute]+daAttributes = lens _daAttributes (\s a -> s { _daAttributes = a }) . _List++-- | The name of the domain in which to perform the operation.+daDomainName :: Lens' DeleteAttributes Text+daDomainName = lens _daDomainName (\s a -> s { _daDomainName = a })++-- | The update condition which, if specified, determines whether the+-- specified attributes will be deleted or not. The update condition must be+-- satisfied in order for this request to be processed and the attributes to+-- be deleted.+daExpected :: Lens' DeleteAttributes (Maybe UpdateCondition)+daExpected = lens _daExpected (\s a -> s { _daExpected = a })++-- | The name of the item. Similar to rows on a spreadsheet, items represent+-- individual objects that contain one or more value-attribute pairs.+daItemName :: Lens' DeleteAttributes Text+daItemName = lens _daItemName (\s a -> s { _daItemName = a })++data DeleteAttributesResponse = DeleteAttributesResponse+    deriving (Eq, Ord, Show, Generic)++-- | 'DeleteAttributesResponse' constructor.+deleteAttributesResponse :: DeleteAttributesResponse+deleteAttributesResponse = DeleteAttributesResponse++instance ToPath DeleteAttributes where+    toPath = const "/"++instance ToQuery DeleteAttributes where+    toQuery DeleteAttributes{..} = mconcat+        [ toQuery     _daAttributes+        , "DomainName" =? _daDomainName+        , "Expected"   =? _daExpected+        , "ItemName"   =? _daItemName+        ]++instance ToHeaders DeleteAttributes++instance AWSRequest DeleteAttributes where+    type Sv DeleteAttributes = SDB+    type Rs DeleteAttributes = DeleteAttributesResponse++    request  = post "DeleteAttributes"+    response = nullResponse DeleteAttributesResponse
+ gen/Network/AWS/SDB/DeleteDomain.hs view
@@ -0,0 +1,90 @@+{-# 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.SDB.DeleteDomain+-- 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)++-- | The DeleteDomain operation deletes a domain. Any items (and their+-- attributes) in the domain are deleted as well. The DeleteDomain operation+-- might take 10 or more seconds to complete.+--+-- <http://docs.aws.amazon.com/AmazonSimpleDB/latest/DeveloperGuide/SDB_API_DeleteDomain.html>+module Network.AWS.SDB.DeleteDomain+    (+    -- * Request+      DeleteDomain+    -- ** Request constructor+    , deleteDomain+    -- ** Request lenses+    , ddDomainName++    -- * Response+    , DeleteDomainResponse+    -- ** Response constructor+    , deleteDomainResponse+    ) where++import Network.AWS.Prelude+import Network.AWS.Request.Query+import Network.AWS.SDB.Types+import qualified GHC.Exts++newtype DeleteDomain = DeleteDomain+    { _ddDomainName :: Text+    } deriving (Eq, Ord, Show, Monoid, IsString)++-- | 'DeleteDomain' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'ddDomainName' @::@ 'Text'+--+deleteDomain :: Text -- ^ 'ddDomainName'+             -> DeleteDomain+deleteDomain p1 = DeleteDomain+    { _ddDomainName = p1+    }++-- | The name of the domain to delete.+ddDomainName :: Lens' DeleteDomain Text+ddDomainName = lens _ddDomainName (\s a -> s { _ddDomainName = a })++data DeleteDomainResponse = DeleteDomainResponse+    deriving (Eq, Ord, Show, Generic)++-- | 'DeleteDomainResponse' constructor.+deleteDomainResponse :: DeleteDomainResponse+deleteDomainResponse = DeleteDomainResponse++instance ToPath DeleteDomain where+    toPath = const "/"++instance ToQuery DeleteDomain where+    toQuery DeleteDomain{..} = mconcat+        [ "DomainName" =? _ddDomainName+        ]++instance ToHeaders DeleteDomain++instance AWSRequest DeleteDomain where+    type Sv DeleteDomain = SDB+    type Rs DeleteDomain = DeleteDomainResponse++    request  = post "DeleteDomain"+    response = nullResponse DeleteDomainResponse
+ gen/Network/AWS/SDB/DomainMetadata.hs view
@@ -0,0 +1,175 @@+{-# 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.SDB.DomainMetadata+-- 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)++-- | Returns information about the domain, including when the domain was+-- created, the number of items and attributes in the domain, and the size of+-- the attribute names and values.+--+-- <http://docs.aws.amazon.com/AmazonSimpleDB/latest/DeveloperGuide/SDB_API_DomainMetadata.html>+module Network.AWS.SDB.DomainMetadata+    (+    -- * Request+      DomainMetadata+    -- ** Request constructor+    , domainMetadata+    -- ** Request lenses+    , dmDomainName++    -- * Response+    , DomainMetadataResponse+    -- ** Response constructor+    , domainMetadataResponse+    -- ** Response lenses+    , dmrAttributeNameCount+    , dmrAttributeNamesSizeBytes+    , dmrAttributeValueCount+    , dmrAttributeValuesSizeBytes+    , dmrItemCount+    , dmrItemNamesSizeBytes+    , dmrTimestamp+    ) where++import Network.AWS.Prelude+import Network.AWS.Request.Query+import Network.AWS.SDB.Types+import qualified GHC.Exts++newtype DomainMetadata = DomainMetadata+    { _dmDomainName :: Text+    } deriving (Eq, Ord, Show, Monoid, IsString)++-- | 'DomainMetadata' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'dmDomainName' @::@ 'Text'+--+domainMetadata :: Text -- ^ 'dmDomainName'+               -> DomainMetadata+domainMetadata p1 = DomainMetadata+    { _dmDomainName = p1+    }++-- | The name of the domain for which to display the metadata of.+dmDomainName :: Lens' DomainMetadata Text+dmDomainName = lens _dmDomainName (\s a -> s { _dmDomainName = a })++data DomainMetadataResponse = DomainMetadataResponse+    { _dmrAttributeNameCount       :: Maybe Int+    , _dmrAttributeNamesSizeBytes  :: Maybe Integer+    , _dmrAttributeValueCount      :: Maybe Int+    , _dmrAttributeValuesSizeBytes :: Maybe Integer+    , _dmrItemCount                :: Maybe Int+    , _dmrItemNamesSizeBytes       :: Maybe Integer+    , _dmrTimestamp                :: Maybe Int+    } deriving (Eq, Ord, Show)++-- | 'DomainMetadataResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'dmrAttributeNameCount' @::@ 'Maybe' 'Int'+--+-- * 'dmrAttributeNamesSizeBytes' @::@ 'Maybe' 'Integer'+--+-- * 'dmrAttributeValueCount' @::@ 'Maybe' 'Int'+--+-- * 'dmrAttributeValuesSizeBytes' @::@ 'Maybe' 'Integer'+--+-- * 'dmrItemCount' @::@ 'Maybe' 'Int'+--+-- * 'dmrItemNamesSizeBytes' @::@ 'Maybe' 'Integer'+--+-- * 'dmrTimestamp' @::@ 'Maybe' 'Int'+--+domainMetadataResponse :: DomainMetadataResponse+domainMetadataResponse = DomainMetadataResponse+    { _dmrItemCount                = Nothing+    , _dmrItemNamesSizeBytes       = Nothing+    , _dmrAttributeNameCount       = Nothing+    , _dmrAttributeNamesSizeBytes  = Nothing+    , _dmrAttributeValueCount      = Nothing+    , _dmrAttributeValuesSizeBytes = Nothing+    , _dmrTimestamp                = Nothing+    }++-- | The number of unique attribute names in the domain.+dmrAttributeNameCount :: Lens' DomainMetadataResponse (Maybe Int)+dmrAttributeNameCount =+    lens _dmrAttributeNameCount (\s a -> s { _dmrAttributeNameCount = a })++-- | The total size of all unique attribute names in the domain, in bytes.+dmrAttributeNamesSizeBytes :: Lens' DomainMetadataResponse (Maybe Integer)+dmrAttributeNamesSizeBytes =+    lens _dmrAttributeNamesSizeBytes+        (\s a -> s { _dmrAttributeNamesSizeBytes = a })++-- | The number of all attribute name/value pairs in the domain.+dmrAttributeValueCount :: Lens' DomainMetadataResponse (Maybe Int)+dmrAttributeValueCount =+    lens _dmrAttributeValueCount (\s a -> s { _dmrAttributeValueCount = a })++-- | The total size of all attribute values in the domain, in bytes.+dmrAttributeValuesSizeBytes :: Lens' DomainMetadataResponse (Maybe Integer)+dmrAttributeValuesSizeBytes =+    lens _dmrAttributeValuesSizeBytes+        (\s a -> s { _dmrAttributeValuesSizeBytes = a })++-- | The number of all items in the domain.+dmrItemCount :: Lens' DomainMetadataResponse (Maybe Int)+dmrItemCount = lens _dmrItemCount (\s a -> s { _dmrItemCount = a })++-- | The total size of all item names in the domain, in bytes.+dmrItemNamesSizeBytes :: Lens' DomainMetadataResponse (Maybe Integer)+dmrItemNamesSizeBytes =+    lens _dmrItemNamesSizeBytes (\s a -> s { _dmrItemNamesSizeBytes = a })++-- | The data and time when metadata was calculated, in Epoch (UNIX) seconds.+dmrTimestamp :: Lens' DomainMetadataResponse (Maybe Int)+dmrTimestamp = lens _dmrTimestamp (\s a -> s { _dmrTimestamp = a })++instance ToPath DomainMetadata where+    toPath = const "/"++instance ToQuery DomainMetadata where+    toQuery DomainMetadata{..} = mconcat+        [ "DomainName" =? _dmDomainName+        ]++instance ToHeaders DomainMetadata++instance AWSRequest DomainMetadata where+    type Sv DomainMetadata = SDB+    type Rs DomainMetadata = DomainMetadataResponse++    request  = post "DomainMetadata"+    response = xmlResponse++instance FromXML DomainMetadataResponse where+    parseXML = withElement "DomainMetadataResult" $ \x -> DomainMetadataResponse+        <$> x .@? "AttributeNameCount"+        <*> x .@? "AttributeNamesSizeBytes"+        <*> x .@? "AttributeValueCount"+        <*> x .@? "AttributeValuesSizeBytes"+        <*> x .@? "ItemCount"+        <*> x .@? "ItemNamesSizeBytes"+        <*> x .@? "Timestamp"
+ gen/Network/AWS/SDB/GetAttributes.hs view
@@ -0,0 +1,148 @@+{-# 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.SDB.GetAttributes+-- 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)++-- | Returns all of the attributes associated with the specified item.+-- Optionally, the attributes returned can be limited to one or more+-- attributes by specifying an attribute name parameter. If the item does not+-- exist on the replica that was accessed for this operation, an empty set is+-- returned. The system does not return an error as it cannot guarantee the+-- item does not exist on other replicas.+--+-- <http://docs.aws.amazon.com/AmazonSimpleDB/latest/DeveloperGuide/SDB_API_GetAttributes.html>+module Network.AWS.SDB.GetAttributes+    (+    -- * Request+      GetAttributes+    -- ** Request constructor+    , getAttributes+    -- ** Request lenses+    , gaAttributeNames+    , gaConsistentRead+    , gaDomainName+    , gaItemName++    -- * Response+    , GetAttributesResponse+    -- ** Response constructor+    , getAttributesResponse+    -- ** Response lenses+    , garAttributes+    ) where++import Network.AWS.Prelude+import Network.AWS.Request.Query+import Network.AWS.SDB.Types+import qualified GHC.Exts++data GetAttributes = GetAttributes+    { _gaAttributeNames :: List "AttributeName" Text+    , _gaConsistentRead :: Maybe Bool+    , _gaDomainName     :: Text+    , _gaItemName       :: Text+    } deriving (Eq, Ord, Show)++-- | 'GetAttributes' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'gaAttributeNames' @::@ ['Text']+--+-- * 'gaConsistentRead' @::@ 'Maybe' 'Bool'+--+-- * 'gaDomainName' @::@ 'Text'+--+-- * 'gaItemName' @::@ 'Text'+--+getAttributes :: Text -- ^ 'gaDomainName'+              -> Text -- ^ 'gaItemName'+              -> [Text] -- ^ 'gaAttributeNames'+              -> GetAttributes+getAttributes p1 p2 p3 = GetAttributes+    { _gaDomainName     = p1+    , _gaItemName       = p2+    , _gaAttributeNames = withIso _List (const id) p3+    , _gaConsistentRead = Nothing+    }++-- | The names of the attributes.+gaAttributeNames :: Lens' GetAttributes [Text]+gaAttributeNames = lens _gaAttributeNames (\s a -> s { _gaAttributeNames = a }) . _List++-- | Determines whether or not strong consistency should be enforced when data+-- is read from SimpleDB. If true, any data previously written to SimpleDB+-- will be returned. Otherwise, results will be consistent eventually, and+-- the client may not see data that was written immediately before your+-- read.+gaConsistentRead :: Lens' GetAttributes (Maybe Bool)+gaConsistentRead = lens _gaConsistentRead (\s a -> s { _gaConsistentRead = a })++-- | The name of the domain in which to perform the operation.+gaDomainName :: Lens' GetAttributes Text+gaDomainName = lens _gaDomainName (\s a -> s { _gaDomainName = a })++-- | The name of the item.+gaItemName :: Lens' GetAttributes Text+gaItemName = lens _gaItemName (\s a -> s { _gaItemName = a })++newtype GetAttributesResponse = GetAttributesResponse+    { _garAttributes :: List "Attribute" Attribute+    } deriving (Eq, Show, Monoid, Semigroup)++-- | 'GetAttributesResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'garAttributes' @::@ ['Attribute']+--+getAttributesResponse :: [Attribute] -- ^ 'garAttributes'+                      -> GetAttributesResponse+getAttributesResponse p1 = GetAttributesResponse+    { _garAttributes = withIso _List (const id) p1+    }++-- | The list of attributes returned by the operation.+garAttributes :: Lens' GetAttributesResponse [Attribute]+garAttributes = lens _garAttributes (\s a -> s { _garAttributes = a }) . _List++instance ToPath GetAttributes where+    toPath = const "/"++instance ToQuery GetAttributes where+    toQuery GetAttributes{..} = mconcat+        [ toQuery         _gaAttributeNames+        , "ConsistentRead" =? _gaConsistentRead+        , "DomainName"     =? _gaDomainName+        , "ItemName"       =? _gaItemName+        ]++instance ToHeaders GetAttributes++instance AWSRequest GetAttributes where+    type Sv GetAttributes = SDB+    type Rs GetAttributes = GetAttributesResponse++    request  = post "GetAttributes"+    response = xmlResponse++instance FromXML GetAttributesResponse where+    parseXML = withElement "GetAttributesResult" $ \x -> GetAttributesResponse+        <$> parseXML x
+ gen/Network/AWS/SDB/ListDomains.hs view
@@ -0,0 +1,141 @@+{-# 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.SDB.ListDomains+-- 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)++-- | The ListDomains operation lists all domains associated with the Access Key+-- ID. It returns domain names up to the limit set by MaxNumberOfDomains. A+-- NextToken is returned if there are more than MaxNumberOfDomains domains.+-- Calling ListDomains successive times with the NextToken provided by the+-- operation returns up to MaxNumberOfDomains more domain names with each+-- successive operation call.+--+-- <http://docs.aws.amazon.com/AmazonSimpleDB/latest/DeveloperGuide/SDB_API_ListDomains.html>+module Network.AWS.SDB.ListDomains+    (+    -- * Request+      ListDomains+    -- ** Request constructor+    , listDomains+    -- ** Request lenses+    , ldMaxNumberOfDomains+    , ldNextToken++    -- * Response+    , ListDomainsResponse+    -- ** Response constructor+    , listDomainsResponse+    -- ** Response lenses+    , ldrDomainNames+    , ldrNextToken+    ) where++import Network.AWS.Prelude+import Network.AWS.Request.Query+import Network.AWS.SDB.Types+import qualified GHC.Exts++data ListDomains = ListDomains+    { _ldMaxNumberOfDomains :: Maybe Int+    , _ldNextToken          :: Maybe Text+    } deriving (Eq, Ord, Show)++-- | 'ListDomains' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'ldMaxNumberOfDomains' @::@ 'Maybe' 'Int'+--+-- * 'ldNextToken' @::@ 'Maybe' 'Text'+--+listDomains :: ListDomains+listDomains = ListDomains+    { _ldMaxNumberOfDomains = Nothing+    , _ldNextToken          = Nothing+    }++-- | The maximum number of domain names you want returned. The range is 1 to+-- 100. The default setting is 100.+ldMaxNumberOfDomains :: Lens' ListDomains (Maybe Int)+ldMaxNumberOfDomains =+    lens _ldMaxNumberOfDomains (\s a -> s { _ldMaxNumberOfDomains = a })++-- | A string informing Amazon SimpleDB where to start the next list of domain+-- names.+ldNextToken :: Lens' ListDomains (Maybe Text)+ldNextToken = lens _ldNextToken (\s a -> s { _ldNextToken = a })++data ListDomainsResponse = ListDomainsResponse+    { _ldrDomainNames :: List "DomainName" Text+    , _ldrNextToken   :: Maybe Text+    } deriving (Eq, Ord, Show)++-- | 'ListDomainsResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'ldrDomainNames' @::@ ['Text']+--+-- * 'ldrNextToken' @::@ 'Maybe' 'Text'+--+listDomainsResponse :: [Text] -- ^ 'ldrDomainNames'+                    -> ListDomainsResponse+listDomainsResponse p1 = ListDomainsResponse+    { _ldrDomainNames = withIso _List (const id) p1+    , _ldrNextToken   = Nothing+    }++-- | A list of domain names that match the expression.+ldrDomainNames :: Lens' ListDomainsResponse [Text]+ldrDomainNames = lens _ldrDomainNames (\s a -> s { _ldrDomainNames = a }) . _List++-- | An opaque token indicating that there are more domains than the specified+-- MaxNumberOfDomains still available.+ldrNextToken :: Lens' ListDomainsResponse (Maybe Text)+ldrNextToken = lens _ldrNextToken (\s a -> s { _ldrNextToken = a })++instance ToPath ListDomains where+    toPath = const "/"++instance ToQuery ListDomains where+    toQuery ListDomains{..} = mconcat+        [ "MaxNumberOfDomains" =? _ldMaxNumberOfDomains+        , "NextToken"          =? _ldNextToken+        ]++instance ToHeaders ListDomains++instance AWSRequest ListDomains where+    type Sv ListDomains = SDB+    type Rs ListDomains = ListDomainsResponse++    request  = post "ListDomains"+    response = xmlResponse++instance FromXML ListDomainsResponse where+    parseXML = withElement "ListDomainsResult" $ \x -> ListDomainsResponse+        <$> parseXML x+        <*> x .@? "NextToken"++instance AWSPager ListDomains where+    page rq rs+        | stop (rq ^. ldNextToken) = Nothing+        | otherwise = (\x -> rq & ldNextToken ?~ x)+            <$> (rs ^. ldrNextToken)
+ gen/Network/AWS/SDB/PutAttributes.hs view
@@ -0,0 +1,147 @@+{-# 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.SDB.PutAttributes+-- 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)++-- | The PutAttributes operation creates or replaces attributes in an item. The+-- client may specify new attributes using a combination of the+-- Attribute.X.Name and Attribute.X.Value parameters. The client specifies the+-- first attribute by the parameters Attribute.0.Name and Attribute.0.Value,+-- the second attribute by the parameters Attribute.1.Name and+-- Attribute.1.Value, and so on. Attributes are uniquely identified in an item+-- by their name/value combination. For example, a single item can have the+-- attributes { "first_name", "first_value" } and { "first_name",+-- second_value" }. However, it cannot have two attribute instances where both+-- the Attribute.X.Name and Attribute.X.Value are the same. Optionally, the+-- requestor can supply the Replace parameter for each individual attribute.+-- Setting this value to true causes the new attribute value to replace the+-- existing attribute value(s). For example, if an item has the attributes {+-- 'a', '1' }, { 'b', '2'} and { 'b', '3' } and the requestor calls+-- PutAttributes using the attributes { 'b', '4' } with the Replace parameter+-- set to true, the final attributes of the item are changed to { 'a', '1' }+-- and { 'b', '4' }, which replaces the previous values of the 'b' attribute+-- with the new value. You cannot specify an empty string as an attribute+-- name. Because Amazon SimpleDB makes multiple copies of client data and uses+-- an eventual consistency update model, an immediate GetAttributes or Select+-- operation (read) immediately after a PutAttributes or DeleteAttributes+-- operation (write) might not return the updated data. The following+-- limitations are enforced for this operation: 256 total attribute name-value+-- pairs per item One billion attributes per domain 10 GB of total user data+-- storage per domain.+--+-- <http://docs.aws.amazon.com/AmazonSimpleDB/latest/DeveloperGuide/SDB_API_PutAttributes.html>+module Network.AWS.SDB.PutAttributes+    (+    -- * Request+      PutAttributes+    -- ** Request constructor+    , putAttributes+    -- ** Request lenses+    , paAttributes+    , paDomainName+    , paExpected+    , paItemName++    -- * Response+    , PutAttributesResponse+    -- ** Response constructor+    , putAttributesResponse+    ) where++import Network.AWS.Prelude+import Network.AWS.Request.Query+import Network.AWS.SDB.Types+import qualified GHC.Exts++data PutAttributes = PutAttributes+    { _paAttributes :: List "Attribute" ReplaceableAttribute+    , _paDomainName :: Text+    , _paExpected   :: Maybe UpdateCondition+    , _paItemName   :: Text+    } deriving (Eq, Show)++-- | 'PutAttributes' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'paAttributes' @::@ ['ReplaceableAttribute']+--+-- * 'paDomainName' @::@ 'Text'+--+-- * 'paExpected' @::@ 'Maybe' 'UpdateCondition'+--+-- * 'paItemName' @::@ 'Text'+--+putAttributes :: Text -- ^ 'paDomainName'+              -> Text -- ^ 'paItemName'+              -> [ReplaceableAttribute] -- ^ 'paAttributes'+              -> PutAttributes+putAttributes p1 p2 p3 = PutAttributes+    { _paDomainName = p1+    , _paItemName   = p2+    , _paAttributes = withIso _List (const id) p3+    , _paExpected   = Nothing+    }++-- | The list of attributes.+paAttributes :: Lens' PutAttributes [ReplaceableAttribute]+paAttributes = lens _paAttributes (\s a -> s { _paAttributes = a }) . _List++-- | The name of the domain in which to perform the operation.+paDomainName :: Lens' PutAttributes Text+paDomainName = lens _paDomainName (\s a -> s { _paDomainName = a })++-- | The update condition which, if specified, determines whether the+-- specified attributes will be updated or not. The update condition must be+-- satisfied in order for this request to be processed and the attributes to+-- be updated.+paExpected :: Lens' PutAttributes (Maybe UpdateCondition)+paExpected = lens _paExpected (\s a -> s { _paExpected = a })++-- | The name of the item.+paItemName :: Lens' PutAttributes Text+paItemName = lens _paItemName (\s a -> s { _paItemName = a })++data PutAttributesResponse = PutAttributesResponse+    deriving (Eq, Ord, Show, Generic)++-- | 'PutAttributesResponse' constructor.+putAttributesResponse :: PutAttributesResponse+putAttributesResponse = PutAttributesResponse++instance ToPath PutAttributes where+    toPath = const "/"++instance ToQuery PutAttributes where+    toQuery PutAttributes{..} = mconcat+        [ toQuery     _paAttributes+        , "DomainName" =? _paDomainName+        , "Expected"   =? _paExpected+        , "ItemName"   =? _paItemName+        ]++instance ToHeaders PutAttributes++instance AWSRequest PutAttributes where+    type Sv PutAttributes = SDB+    type Rs PutAttributes = PutAttributesResponse++    request  = post "PutAttributes"+    response = nullResponse PutAttributesResponse
+ gen/Network/AWS/SDB/Select.hs view
@@ -0,0 +1,159 @@+{-# 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.SDB.Select+-- 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)++-- | The Select operation returns a set of attributes for ItemNames that match+-- the select expression. Select is similar to the standard SQL SELECT+-- statement. The total size of the response cannot exceed 1 MB in total size.+-- Amazon SimpleDB automatically adjusts the number of items returned per page+-- to enforce this limit. For example, if the client asks to retrieve 2500+-- items, but each individual item is 10 kB in size, the system returns 100+-- items and an appropriate NextToken so the client can access the next page+-- of results. For information on how to construct select expressions, see+-- Using Select to Create Amazon SimpleDB Queries in the Developer Guide.+--+-- <http://docs.aws.amazon.com/AmazonSimpleDB/latest/DeveloperGuide/SDB_API_Select.html>+module Network.AWS.SDB.Select+    (+    -- * Request+      Select+    -- ** Request constructor+    , select+    -- ** Request lenses+    , sConsistentRead+    , sNextToken+    , sSelectExpression++    -- * Response+    , SelectResponse+    -- ** Response constructor+    , selectResponse+    -- ** Response lenses+    , srItems+    , srNextToken+    ) where++import Network.AWS.Prelude+import Network.AWS.Request.Query+import Network.AWS.SDB.Types+import qualified GHC.Exts++data Select = Select+    { _sConsistentRead   :: Maybe Bool+    , _sNextToken        :: Maybe Text+    , _sSelectExpression :: Text+    } deriving (Eq, Ord, Show)++-- | 'Select' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'sConsistentRead' @::@ 'Maybe' 'Bool'+--+-- * 'sNextToken' @::@ 'Maybe' 'Text'+--+-- * 'sSelectExpression' @::@ 'Text'+--+select :: Text -- ^ 'sSelectExpression'+       -> Select+select p1 = Select+    { _sSelectExpression = p1+    , _sNextToken        = Nothing+    , _sConsistentRead   = Nothing+    }++-- | Determines whether or not strong consistency should be enforced when data+-- is read from SimpleDB. If true, any data previously written to SimpleDB+-- will be returned. Otherwise, results will be consistent eventually, and+-- the client may not see data that was written immediately before your+-- read.+sConsistentRead :: Lens' Select (Maybe Bool)+sConsistentRead = lens _sConsistentRead (\s a -> s { _sConsistentRead = a })++-- | A string informing Amazon SimpleDB where to start the next list of+-- ItemNames.+sNextToken :: Lens' Select (Maybe Text)+sNextToken = lens _sNextToken (\s a -> s { _sNextToken = a })++-- | The expression used to query the domain.+sSelectExpression :: Lens' Select Text+sSelectExpression =+    lens _sSelectExpression (\s a -> s { _sSelectExpression = a })++data SelectResponse = SelectResponse+    { _srItems     :: List "Item" Item+    , _srNextToken :: Maybe Text+    } deriving (Eq, Show)++-- | 'SelectResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'srItems' @::@ ['Item']+--+-- * 'srNextToken' @::@ 'Maybe' 'Text'+--+selectResponse :: [Item] -- ^ 'srItems'+               -> SelectResponse+selectResponse p1 = SelectResponse+    { _srItems     = withIso _List (const id) p1+    , _srNextToken = Nothing+    }++-- | A list of items that match the select expression.+srItems :: Lens' SelectResponse [Item]+srItems = lens _srItems (\s a -> s { _srItems = a }) . _List++-- | An opaque token indicating that more items than MaxNumberOfItems were+-- matched, the response size exceeded 1 megabyte, or the execution time+-- exceeded 5 seconds.+srNextToken :: Lens' SelectResponse (Maybe Text)+srNextToken = lens _srNextToken (\s a -> s { _srNextToken = a })++instance ToPath Select where+    toPath = const "/"++instance ToQuery Select where+    toQuery Select{..} = mconcat+        [ "ConsistentRead"   =? _sConsistentRead+        , "NextToken"        =? _sNextToken+        , "SelectExpression" =? _sSelectExpression+        ]++instance ToHeaders Select++instance AWSRequest Select where+    type Sv Select = SDB+    type Rs Select = SelectResponse++    request  = post "Select"+    response = xmlResponse++instance FromXML SelectResponse where+    parseXML = withElement "SelectResult" $ \x -> SelectResponse+        <$> parseXML x+        <*> x .@? "NextToken"++instance AWSPager Select where+    page rq rs+        | stop (rq ^. sNextToken) = Nothing+        | otherwise = (\x -> rq & sNextToken ?~ x)+            <$> (rs ^. srNextToken)
+ gen/Network/AWS/SDB/Types.hs view
@@ -0,0 +1,393 @@+{-# 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.SDB.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)++module Network.AWS.SDB.Types+    (+    -- * Service+      SDB+    -- ** Error+    , RESTError+    -- ** XML+    , ns++    -- * Attribute+    , Attribute+    , attribute+    , aAlternateNameEncoding+    , aAlternateValueEncoding+    , aName+    , aValue++    -- * DeletableItem+    , DeletableItem+    , deletableItem+    , diAttributes+    , diName++    -- * ReplaceableItem+    , ReplaceableItem+    , replaceableItem+    , riAttributes+    , riName++    -- * UpdateCondition+    , UpdateCondition+    , updateCondition+    , ucExists+    , ucName+    , ucValue++    -- * ReplaceableAttribute+    , ReplaceableAttribute+    , replaceableAttribute+    , raName+    , raReplace+    , raValue++    -- * Item+    , Item+    , item+    , iAlternateNameEncoding+    , iAttributes+    , iName+    ) where++import Network.AWS.Error+import Network.AWS.Prelude+import Network.AWS.Signing.V2+import qualified GHC.Exts++-- | Version @2009-04-15@ of the Amazon SimpleDB service.+data SDB++instance AWSService SDB where+    type Sg SDB = V2+    type Er SDB = RESTError++    service = Service+        { _svcEndpoint     = regional+        , _svcAbbrev       = "SDB"+        , _svcPrefix       = "sdb"+        , _svcVersion      = "2009-04-15"+        , _svcTargetPrefix = Nothing+        , _svcJSONVersion  = Nothing+        }++    handle = restError statusSuccess++ns :: Text+ns = "http://sdb.amazonaws.com/doc/2009-04-15/"++data Attribute = Attribute+    { _aAlternateNameEncoding  :: Maybe Text+    , _aAlternateValueEncoding :: Maybe Text+    , _aName                   :: Text+    , _aValue                  :: Text+    } deriving (Eq, Ord, Show)++-- | 'Attribute' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'aAlternateNameEncoding' @::@ 'Maybe' 'Text'+--+-- * 'aAlternateValueEncoding' @::@ 'Maybe' 'Text'+--+-- * 'aName' @::@ 'Text'+--+-- * 'aValue' @::@ 'Text'+--+attribute :: Text -- ^ 'aName'+          -> Text -- ^ 'aValue'+          -> Attribute+attribute p1 p2 = Attribute+    { _aName                   = p1+    , _aValue                  = p2+    , _aAlternateNameEncoding  = Nothing+    , _aAlternateValueEncoding = Nothing+    }++-- | +aAlternateNameEncoding :: Lens' Attribute (Maybe Text)+aAlternateNameEncoding =+    lens _aAlternateNameEncoding (\s a -> s { _aAlternateNameEncoding = a })++-- | +aAlternateValueEncoding :: Lens' Attribute (Maybe Text)+aAlternateValueEncoding =+    lens _aAlternateValueEncoding (\s a -> s { _aAlternateValueEncoding = a })++-- | The name of the attribute.+aName :: Lens' Attribute Text+aName = lens _aName (\s a -> s { _aName = a })++-- | The value of the attribute.+aValue :: Lens' Attribute Text+aValue = lens _aValue (\s a -> s { _aValue = a })++instance FromXML Attribute where+    parseXML x = Attribute+        <$> x .@? "AlternateNameEncoding"+        <*> x .@? "AlternateValueEncoding"+        <*> x .@  "Name"+        <*> x .@  "Value"++instance ToQuery Attribute where+    toQuery Attribute{..} = mconcat+        [ "AlternateNameEncoding"  =? _aAlternateNameEncoding+        , "AlternateValueEncoding" =? _aAlternateValueEncoding+        , "Name"                   =? _aName+        , "Value"                  =? _aValue+        ]++data DeletableItem = DeletableItem+    { _diAttributes :: List "Attribute" Attribute+    , _diName       :: Text+    } deriving (Eq, Show)++-- | 'DeletableItem' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'diAttributes' @::@ ['Attribute']+--+-- * 'diName' @::@ 'Text'+--+deletableItem :: Text -- ^ 'diName'+              -> [Attribute] -- ^ 'diAttributes'+              -> DeletableItem+deletableItem p1 p2 = DeletableItem+    { _diName       = p1+    , _diAttributes = withIso _List (const id) p2+    }++diAttributes :: Lens' DeletableItem [Attribute]+diAttributes = lens _diAttributes (\s a -> s { _diAttributes = a }) . _List++diName :: Lens' DeletableItem Text+diName = lens _diName (\s a -> s { _diName = a })++instance FromXML DeletableItem where+    parseXML x = DeletableItem+        <$> parseXML x+        <*> x .@  "ItemName"++instance ToQuery DeletableItem where+    toQuery DeletableItem{..} = mconcat+        [ toQuery     _diAttributes+        , "ItemName"   =? _diName+        ]++data ReplaceableItem = ReplaceableItem+    { _riAttributes :: List "Attribute" ReplaceableAttribute+    , _riName       :: Text+    } deriving (Eq, Show)++-- | 'ReplaceableItem' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'riAttributes' @::@ ['ReplaceableAttribute']+--+-- * 'riName' @::@ 'Text'+--+replaceableItem :: Text -- ^ 'riName'+                -> [ReplaceableAttribute] -- ^ 'riAttributes'+                -> ReplaceableItem+replaceableItem p1 p2 = ReplaceableItem+    { _riName       = p1+    , _riAttributes = withIso _List (const id) p2+    }++-- | The list of attributes for a replaceable item.+riAttributes :: Lens' ReplaceableItem [ReplaceableAttribute]+riAttributes = lens _riAttributes (\s a -> s { _riAttributes = a }) . _List++-- | The name of the replaceable item.+riName :: Lens' ReplaceableItem Text+riName = lens _riName (\s a -> s { _riName = a })++instance FromXML ReplaceableItem where+    parseXML x = ReplaceableItem+        <$> parseXML x+        <*> x .@  "ItemName"++instance ToQuery ReplaceableItem where+    toQuery ReplaceableItem{..} = mconcat+        [ toQuery     _riAttributes+        , "ItemName"   =? _riName+        ]++data UpdateCondition = UpdateCondition+    { _ucExists :: Maybe Bool+    , _ucName   :: Maybe Text+    , _ucValue  :: Maybe Text+    } deriving (Eq, Ord, Show)++-- | 'UpdateCondition' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'ucExists' @::@ 'Maybe' 'Bool'+--+-- * 'ucName' @::@ 'Maybe' 'Text'+--+-- * 'ucValue' @::@ 'Maybe' 'Text'+--+updateCondition :: UpdateCondition+updateCondition = UpdateCondition+    { _ucName   = Nothing+    , _ucValue  = Nothing+    , _ucExists = Nothing+    }++-- | A value specifying whether or not the specified attribute must exist with+-- the specified value in order for the update condition to be satisfied.+-- Specify true if the attribute must exist for the update condition to be+-- satisfied. Specify false if the attribute should not exist in order for+-- the update condition to be satisfied.+ucExists :: Lens' UpdateCondition (Maybe Bool)+ucExists = lens _ucExists (\s a -> s { _ucExists = a })++-- | The name of the attribute involved in the condition.+ucName :: Lens' UpdateCondition (Maybe Text)+ucName = lens _ucName (\s a -> s { _ucName = a })++-- | The value of an attribute. This value can only be specified when the+-- Exists parameter is equal to true.+ucValue :: Lens' UpdateCondition (Maybe Text)+ucValue = lens _ucValue (\s a -> s { _ucValue = a })++instance FromXML UpdateCondition where+    parseXML x = UpdateCondition+        <$> x .@? "Exists"+        <*> x .@? "Name"+        <*> x .@? "Value"++instance ToQuery UpdateCondition where+    toQuery UpdateCondition{..} = mconcat+        [ "Exists" =? _ucExists+        , "Name"   =? _ucName+        , "Value"  =? _ucValue+        ]++data ReplaceableAttribute = ReplaceableAttribute+    { _raName    :: Text+    , _raReplace :: Maybe Bool+    , _raValue   :: Text+    } deriving (Eq, Ord, Show)++-- | 'ReplaceableAttribute' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'raName' @::@ 'Text'+--+-- * 'raReplace' @::@ 'Maybe' 'Bool'+--+-- * 'raValue' @::@ 'Text'+--+replaceableAttribute :: Text -- ^ 'raName'+                     -> Text -- ^ 'raValue'+                     -> ReplaceableAttribute+replaceableAttribute p1 p2 = ReplaceableAttribute+    { _raName    = p1+    , _raValue   = p2+    , _raReplace = Nothing+    }++-- | The name of the replaceable attribute.+raName :: Lens' ReplaceableAttribute Text+raName = lens _raName (\s a -> s { _raName = a })++-- | A flag specifying whether or not to replace the attribute/value pair or+-- to add a new attribute/value pair. The default setting is false.+raReplace :: Lens' ReplaceableAttribute (Maybe Bool)+raReplace = lens _raReplace (\s a -> s { _raReplace = a })++-- | The value of the replaceable attribute.+raValue :: Lens' ReplaceableAttribute Text+raValue = lens _raValue (\s a -> s { _raValue = a })++instance FromXML ReplaceableAttribute where+    parseXML x = ReplaceableAttribute+        <$> x .@  "Name"+        <*> x .@? "Replace"+        <*> x .@  "Value"++instance ToQuery ReplaceableAttribute where+    toQuery ReplaceableAttribute{..} = mconcat+        [ "Name"    =? _raName+        , "Replace" =? _raReplace+        , "Value"   =? _raValue+        ]++data Item = Item+    { _iAlternateNameEncoding :: Maybe Text+    , _iAttributes            :: List "Attribute" Attribute+    , _iName                  :: Text+    } deriving (Eq, Show)++-- | 'Item' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'iAlternateNameEncoding' @::@ 'Maybe' 'Text'+--+-- * 'iAttributes' @::@ ['Attribute']+--+-- * 'iName' @::@ 'Text'+--+item :: Text -- ^ 'iName'+     -> [Attribute] -- ^ 'iAttributes'+     -> Item+item p1 p2 = Item+    { _iName                  = p1+    , _iAttributes            = withIso _List (const id) p2+    , _iAlternateNameEncoding = Nothing+    }++-- | +iAlternateNameEncoding :: Lens' Item (Maybe Text)+iAlternateNameEncoding =+    lens _iAlternateNameEncoding (\s a -> s { _iAlternateNameEncoding = a })++-- | A list of attributes.+iAttributes :: Lens' Item [Attribute]+iAttributes = lens _iAttributes (\s a -> s { _iAttributes = a }) . _List++-- | The name of the item.+iName :: Lens' Item Text+iName = lens _iName (\s a -> s { _iName = a })++instance FromXML Item where+    parseXML x = Item+        <$> x .@? "AlternateNameEncoding"+        <*> parseXML x+        <*> x .@  "Name"++instance ToQuery Item where+    toQuery Item{..} = mconcat+        [ "AlternateNameEncoding" =? _iAlternateNameEncoding+        , toQuery                _iAttributes+        , "Name"                  =? _iName+        ]