packages feed

amazonka-cognito-sync (empty) → 0.0.0

raw patch · 19 files changed

+3111/−0 lines, 19 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 Cognito Sync 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 Cognito Sync provides an AWS service and client library that enable cross-device syncing of application-related user data. High-level client libraries are available for both iOS and Android. You can use these libraries to persist data locally so that it's available even if the device is offline. Developer credentials don't need to be stored on the mobile device to access the service. You can use Amazon Cognito to obtain a normalized user ID and credentials. User data is persisted in a dataset that can store up to 1 MB of key-value pairs, and you can have up to 20 datasets per user identity.++Documentation is available via [Hackage](http://hackage.haskell.org/package/amazonka-cognito-sync)+and [AWS API Reference](http://docs.aws.amazon.com/cognitosync/latest/APIReference/Welcome.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-cognito-sync` 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-cognito-sync.cabal view
@@ -0,0 +1,62 @@+name:                  amazonka-cognito-sync+version:               0.0.0+synopsis:              Amazon Cognito Sync 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 Cognito Sync provides an AWS service and client library that+    enable cross-device syncing of application-related user data.+    High-level client libraries are available for both iOS and Android. You+    can use these libraries to persist data locally so that it's available+    even if the device is offline. Developer credentials don't need to be+    stored on the mobile device to access the service. You can use Amazon+    Cognito to obtain a normalized user ID and credentials. User data is+    persisted in a dataset that can store up to 1 MB of key-value pairs,+    and you can have up to 20 datasets per user identity.+    .+    /See:/ <http://docs.aws.amazon.com/cognitosync/latest/APIReference/Welcome.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.CognitoSync+        , Network.AWS.CognitoSync.DeleteDataset+        , Network.AWS.CognitoSync.DescribeDataset+        , Network.AWS.CognitoSync.DescribeIdentityPoolUsage+        , Network.AWS.CognitoSync.DescribeIdentityUsage+        , Network.AWS.CognitoSync.GetIdentityPoolConfiguration+        , Network.AWS.CognitoSync.ListDatasets+        , Network.AWS.CognitoSync.ListIdentityPoolUsage+        , Network.AWS.CognitoSync.ListRecords+        , Network.AWS.CognitoSync.RegisterDevice+        , Network.AWS.CognitoSync.SetIdentityPoolConfiguration+        , Network.AWS.CognitoSync.SubscribeToDataset+        , Network.AWS.CognitoSync.Types+        , Network.AWS.CognitoSync.UnsubscribeFromDataset+        , Network.AWS.CognitoSync.UpdateRecords++    other-modules:++    build-depends:+          amazonka-core+        , base          >= 4.7 && < 5
+ gen/Network/AWS/CognitoSync.hs view
@@ -0,0 +1,50 @@+-- Module      : Network.AWS.CognitoSync+-- 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 Cognito Sync provides an AWS service and client library that enable+-- cross-device syncing of application-related user data. High-level client+-- libraries are available for both iOS and Android. You can use these+-- libraries to persist data locally so that it's available even if the device+-- is offline. Developer credentials don't need to be stored on the mobile+-- device to access the service. You can use Amazon Cognito to obtain a+-- normalized user ID and credentials. User data is persisted in a dataset+-- that can store up to 1 MB of key-value pairs, and you can have up to 20+-- datasets per user identity.+module Network.AWS.CognitoSync+    ( module Network.AWS.CognitoSync.DeleteDataset+    , module Network.AWS.CognitoSync.DescribeDataset+    , module Network.AWS.CognitoSync.DescribeIdentityPoolUsage+    , module Network.AWS.CognitoSync.DescribeIdentityUsage+    , module Network.AWS.CognitoSync.GetIdentityPoolConfiguration+    , module Network.AWS.CognitoSync.ListDatasets+    , module Network.AWS.CognitoSync.ListIdentityPoolUsage+    , module Network.AWS.CognitoSync.ListRecords+    , module Network.AWS.CognitoSync.RegisterDevice+    , module Network.AWS.CognitoSync.SetIdentityPoolConfiguration+    , module Network.AWS.CognitoSync.SubscribeToDataset+    , module Network.AWS.CognitoSync.Types+    , module Network.AWS.CognitoSync.UnsubscribeFromDataset+    , module Network.AWS.CognitoSync.UpdateRecords+    ) where++import Network.AWS.CognitoSync.DeleteDataset+import Network.AWS.CognitoSync.DescribeDataset+import Network.AWS.CognitoSync.DescribeIdentityPoolUsage+import Network.AWS.CognitoSync.DescribeIdentityUsage+import Network.AWS.CognitoSync.GetIdentityPoolConfiguration+import Network.AWS.CognitoSync.ListDatasets+import Network.AWS.CognitoSync.ListIdentityPoolUsage+import Network.AWS.CognitoSync.ListRecords+import Network.AWS.CognitoSync.RegisterDevice+import Network.AWS.CognitoSync.SetIdentityPoolConfiguration+import Network.AWS.CognitoSync.SubscribeToDataset+import Network.AWS.CognitoSync.Types+import Network.AWS.CognitoSync.UnsubscribeFromDataset+import Network.AWS.CognitoSync.UpdateRecords
+ gen/Network/AWS/CognitoSync/DeleteDataset.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.CognitoSync.DeleteDataset+-- 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 the specific dataset. The dataset will be deleted permanently, and+-- the action can't be undone. Datasets that this dataset was merged with will+-- no longer report the merge. Any consequent operation on this dataset will+-- result in a ResourceNotFoundException.+--+-- <http://docs.aws.amazon.com/cognitosync/latest/APIReference/API_DeleteDataset.html>+module Network.AWS.CognitoSync.DeleteDataset+    (+    -- * Request+      DeleteDataset+    -- ** Request constructor+    , deleteDataset+    -- ** Request lenses+    , dd1DatasetName+    , dd1IdentityId+    , dd1IdentityPoolId++    -- * Response+    , DeleteDatasetResponse+    -- ** Response constructor+    , deleteDatasetResponse+    -- ** Response lenses+    , ddr1Dataset+    ) where++import Network.AWS.Prelude+import Network.AWS.Request.RestJSON+import Network.AWS.CognitoSync.Types+import qualified GHC.Exts++data DeleteDataset = DeleteDataset+    { _dd1DatasetName    :: Text+    , _dd1IdentityId     :: Text+    , _dd1IdentityPoolId :: Text+    } deriving (Eq, Ord, Show)++-- | 'DeleteDataset' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'dd1DatasetName' @::@ 'Text'+--+-- * 'dd1IdentityId' @::@ 'Text'+--+-- * 'dd1IdentityPoolId' @::@ 'Text'+--+deleteDataset :: Text -- ^ 'dd1IdentityPoolId'+              -> Text -- ^ 'dd1IdentityId'+              -> Text -- ^ 'dd1DatasetName'+              -> DeleteDataset+deleteDataset p1 p2 p3 = DeleteDataset+    { _dd1IdentityPoolId = p1+    , _dd1IdentityId     = p2+    , _dd1DatasetName    = p3+    }++-- | A string of up to 128 characters. Allowed characters are a-z, A-Z, 0-9,+-- '_' (underscore), '-' (dash), and '.' (dot).+dd1DatasetName :: Lens' DeleteDataset Text+dd1DatasetName = lens _dd1DatasetName (\s a -> s { _dd1DatasetName = a })++-- | A name-spaced GUID (for example,+-- us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon+-- Cognito. GUID generation is unique within a region.+dd1IdentityId :: Lens' DeleteDataset Text+dd1IdentityId = lens _dd1IdentityId (\s a -> s { _dd1IdentityId = a })++-- | A name-spaced GUID (for example,+-- us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon+-- Cognito. GUID generation is unique within a region.+dd1IdentityPoolId :: Lens' DeleteDataset Text+dd1IdentityPoolId =+    lens _dd1IdentityPoolId (\s a -> s { _dd1IdentityPoolId = a })++newtype DeleteDatasetResponse = DeleteDatasetResponse+    { _ddr1Dataset :: Maybe Dataset+    } deriving (Eq, Show)++-- | 'DeleteDatasetResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'ddr1Dataset' @::@ 'Maybe' 'Dataset'+--+deleteDatasetResponse :: DeleteDatasetResponse+deleteDatasetResponse = DeleteDatasetResponse+    { _ddr1Dataset = Nothing+    }++-- | A collection of data for an identity pool. An identity pool can have+-- multiple datasets. A dataset is per identity and can be general or+-- associated with a particular entity in an application (like a saved+-- game). Datasets are automatically created if they don't exist. Data is+-- synced by dataset, and a dataset can hold up to 1MB of key-value pairs.+ddr1Dataset :: Lens' DeleteDatasetResponse (Maybe Dataset)+ddr1Dataset = lens _ddr1Dataset (\s a -> s { _ddr1Dataset = a })++instance ToPath DeleteDataset where+    toPath DeleteDataset{..} = mconcat+        [ "/identitypools/"+        , toText _dd1IdentityPoolId+        , "/identities/"+        , toText _dd1IdentityId+        , "/datasets/"+        , toText _dd1DatasetName+        ]++instance ToQuery DeleteDataset where+    toQuery = const mempty++instance ToHeaders DeleteDataset++instance ToJSON DeleteDataset where+    toJSON = const (toJSON Empty)++instance AWSRequest DeleteDataset where+    type Sv DeleteDataset = CognitoSync+    type Rs DeleteDataset = DeleteDatasetResponse++    request  = delete+    response = jsonResponse++instance FromJSON DeleteDatasetResponse where+    parseJSON = withObject "DeleteDatasetResponse" $ \o -> DeleteDatasetResponse+        <$> o .:? "Dataset"
+ gen/Network/AWS/CognitoSync/DescribeDataset.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.CognitoSync.DescribeDataset+-- 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)++-- | Gets metadata about a dataset by identity and dataset name. The credentials+-- used to make this API call need to have access to the identity data. With+-- Amazon Cognito Sync, each identity has access only to its own data. You+-- should use Amazon Cognito Identity service to retrieve the credentials+-- necessary to make this API call.+--+-- <http://docs.aws.amazon.com/cognitosync/latest/APIReference/API_DescribeDataset.html>+module Network.AWS.CognitoSync.DescribeDataset+    (+    -- * Request+      DescribeDataset+    -- ** Request constructor+    , describeDataset+    -- ** Request lenses+    , ddDatasetName+    , ddIdentityId+    , ddIdentityPoolId++    -- * Response+    , DescribeDatasetResponse+    -- ** Response constructor+    , describeDatasetResponse+    -- ** Response lenses+    , ddrDataset+    ) where++import Network.AWS.Prelude+import Network.AWS.Request.RestJSON+import Network.AWS.CognitoSync.Types+import qualified GHC.Exts++data DescribeDataset = DescribeDataset+    { _ddDatasetName    :: Text+    , _ddIdentityId     :: Text+    , _ddIdentityPoolId :: Text+    } deriving (Eq, Ord, Show)++-- | 'DescribeDataset' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'ddDatasetName' @::@ 'Text'+--+-- * 'ddIdentityId' @::@ 'Text'+--+-- * 'ddIdentityPoolId' @::@ 'Text'+--+describeDataset :: Text -- ^ 'ddIdentityPoolId'+                -> Text -- ^ 'ddIdentityId'+                -> Text -- ^ 'ddDatasetName'+                -> DescribeDataset+describeDataset p1 p2 p3 = DescribeDataset+    { _ddIdentityPoolId = p1+    , _ddIdentityId     = p2+    , _ddDatasetName    = p3+    }++-- | A string of up to 128 characters. Allowed characters are a-z, A-Z, 0-9,+-- '_' (underscore), '-' (dash), and '.' (dot).+ddDatasetName :: Lens' DescribeDataset Text+ddDatasetName = lens _ddDatasetName (\s a -> s { _ddDatasetName = a })++-- | A name-spaced GUID (for example,+-- us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon+-- Cognito. GUID generation is unique within a region.+ddIdentityId :: Lens' DescribeDataset Text+ddIdentityId = lens _ddIdentityId (\s a -> s { _ddIdentityId = a })++-- | A name-spaced GUID (for example,+-- us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon+-- Cognito. GUID generation is unique within a region.+ddIdentityPoolId :: Lens' DescribeDataset Text+ddIdentityPoolId = lens _ddIdentityPoolId (\s a -> s { _ddIdentityPoolId = a })++newtype DescribeDatasetResponse = DescribeDatasetResponse+    { _ddrDataset :: Maybe Dataset+    } deriving (Eq, Show)++-- | 'DescribeDatasetResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'ddrDataset' @::@ 'Maybe' 'Dataset'+--+describeDatasetResponse :: DescribeDatasetResponse+describeDatasetResponse = DescribeDatasetResponse+    { _ddrDataset = Nothing+    }++-- | Metadata for a collection of data for an identity. An identity can have+-- multiple datasets. A dataset can be general or associated with a+-- particular entity in an application (like a saved game). Datasets are+-- automatically created if they don't exist. Data is synced by dataset, and+-- a dataset can hold up to 1MB of key-value pairs.+ddrDataset :: Lens' DescribeDatasetResponse (Maybe Dataset)+ddrDataset = lens _ddrDataset (\s a -> s { _ddrDataset = a })++instance ToPath DescribeDataset where+    toPath DescribeDataset{..} = mconcat+        [ "/identitypools/"+        , toText _ddIdentityPoolId+        , "/identities/"+        , toText _ddIdentityId+        , "/datasets/"+        , toText _ddDatasetName+        ]++instance ToQuery DescribeDataset where+    toQuery = const mempty++instance ToHeaders DescribeDataset++instance ToJSON DescribeDataset where+    toJSON = const (toJSON Empty)++instance AWSRequest DescribeDataset where+    type Sv DescribeDataset = CognitoSync+    type Rs DescribeDataset = DescribeDatasetResponse++    request  = get+    response = jsonResponse++instance FromJSON DescribeDatasetResponse where+    parseJSON = withObject "DescribeDatasetResponse" $ \o -> DescribeDatasetResponse+        <$> o .:? "Dataset"
+ gen/Network/AWS/CognitoSync/DescribeIdentityPoolUsage.hs view
@@ -0,0 +1,115 @@+{-# 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.CognitoSync.DescribeIdentityPoolUsage+-- 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)++-- | Gets usage details (for example, data storage) about a particular identity+-- pool.+--+-- <http://docs.aws.amazon.com/cognitosync/latest/APIReference/API_DescribeIdentityPoolUsage.html>+module Network.AWS.CognitoSync.DescribeIdentityPoolUsage+    (+    -- * Request+      DescribeIdentityPoolUsage+    -- ** Request constructor+    , describeIdentityPoolUsage+    -- ** Request lenses+    , dipuIdentityPoolId++    -- * Response+    , DescribeIdentityPoolUsageResponse+    -- ** Response constructor+    , describeIdentityPoolUsageResponse+    -- ** Response lenses+    , dipurIdentityPoolUsage+    ) where++import Network.AWS.Prelude+import Network.AWS.Request.RestJSON+import Network.AWS.CognitoSync.Types+import qualified GHC.Exts++newtype DescribeIdentityPoolUsage = DescribeIdentityPoolUsage+    { _dipuIdentityPoolId :: Text+    } deriving (Eq, Ord, Show, Monoid, IsString)++-- | 'DescribeIdentityPoolUsage' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'dipuIdentityPoolId' @::@ 'Text'+--+describeIdentityPoolUsage :: Text -- ^ 'dipuIdentityPoolId'+                          -> DescribeIdentityPoolUsage+describeIdentityPoolUsage p1 = DescribeIdentityPoolUsage+    { _dipuIdentityPoolId = p1+    }++-- | A name-spaced GUID (for example,+-- us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon+-- Cognito. GUID generation is unique within a region.+dipuIdentityPoolId :: Lens' DescribeIdentityPoolUsage Text+dipuIdentityPoolId =+    lens _dipuIdentityPoolId (\s a -> s { _dipuIdentityPoolId = a })++newtype DescribeIdentityPoolUsageResponse = DescribeIdentityPoolUsageResponse+    { _dipurIdentityPoolUsage :: Maybe IdentityPoolUsage+    } deriving (Eq, Show)++-- | 'DescribeIdentityPoolUsageResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'dipurIdentityPoolUsage' @::@ 'Maybe' 'IdentityPoolUsage'+--+describeIdentityPoolUsageResponse :: DescribeIdentityPoolUsageResponse+describeIdentityPoolUsageResponse = DescribeIdentityPoolUsageResponse+    { _dipurIdentityPoolUsage = Nothing+    }++-- | Information about the usage of the identity pool.+dipurIdentityPoolUsage :: Lens' DescribeIdentityPoolUsageResponse (Maybe IdentityPoolUsage)+dipurIdentityPoolUsage =+    lens _dipurIdentityPoolUsage (\s a -> s { _dipurIdentityPoolUsage = a })++instance ToPath DescribeIdentityPoolUsage where+    toPath DescribeIdentityPoolUsage{..} = mconcat+        [ "/identitypools/"+        , toText _dipuIdentityPoolId+        ]++instance ToQuery DescribeIdentityPoolUsage where+    toQuery = const mempty++instance ToHeaders DescribeIdentityPoolUsage++instance ToJSON DescribeIdentityPoolUsage where+    toJSON = const (toJSON Empty)++instance AWSRequest DescribeIdentityPoolUsage where+    type Sv DescribeIdentityPoolUsage = CognitoSync+    type Rs DescribeIdentityPoolUsage = DescribeIdentityPoolUsageResponse++    request  = get+    response = jsonResponse++instance FromJSON DescribeIdentityPoolUsageResponse where+    parseJSON = withObject "DescribeIdentityPoolUsageResponse" $ \o -> DescribeIdentityPoolUsageResponse+        <$> o .:? "IdentityPoolUsage"
+ gen/Network/AWS/CognitoSync/DescribeIdentityUsage.hs view
@@ -0,0 +1,129 @@+{-# 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.CognitoSync.DescribeIdentityUsage+-- 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)++-- | Gets usage information for an identity, including number of datasets and+-- data usage.+--+-- <http://docs.aws.amazon.com/cognitosync/latest/APIReference/API_DescribeIdentityUsage.html>+module Network.AWS.CognitoSync.DescribeIdentityUsage+    (+    -- * Request+      DescribeIdentityUsage+    -- ** Request constructor+    , describeIdentityUsage+    -- ** Request lenses+    , diuIdentityId+    , diuIdentityPoolId++    -- * Response+    , DescribeIdentityUsageResponse+    -- ** Response constructor+    , describeIdentityUsageResponse+    -- ** Response lenses+    , diurIdentityUsage+    ) where++import Network.AWS.Prelude+import Network.AWS.Request.RestJSON+import Network.AWS.CognitoSync.Types+import qualified GHC.Exts++data DescribeIdentityUsage = DescribeIdentityUsage+    { _diuIdentityId     :: Text+    , _diuIdentityPoolId :: Text+    } deriving (Eq, Ord, Show)++-- | 'DescribeIdentityUsage' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'diuIdentityId' @::@ 'Text'+--+-- * 'diuIdentityPoolId' @::@ 'Text'+--+describeIdentityUsage :: Text -- ^ 'diuIdentityPoolId'+                      -> Text -- ^ 'diuIdentityId'+                      -> DescribeIdentityUsage+describeIdentityUsage p1 p2 = DescribeIdentityUsage+    { _diuIdentityPoolId = p1+    , _diuIdentityId     = p2+    }++-- | A name-spaced GUID (for example,+-- us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon+-- Cognito. GUID generation is unique within a region.+diuIdentityId :: Lens' DescribeIdentityUsage Text+diuIdentityId = lens _diuIdentityId (\s a -> s { _diuIdentityId = a })++-- | A name-spaced GUID (for example,+-- us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon+-- Cognito. GUID generation is unique within a region.+diuIdentityPoolId :: Lens' DescribeIdentityUsage Text+diuIdentityPoolId =+    lens _diuIdentityPoolId (\s a -> s { _diuIdentityPoolId = a })++newtype DescribeIdentityUsageResponse = DescribeIdentityUsageResponse+    { _diurIdentityUsage :: Maybe IdentityUsage+    } deriving (Eq, Show)++-- | 'DescribeIdentityUsageResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'diurIdentityUsage' @::@ 'Maybe' 'IdentityUsage'+--+describeIdentityUsageResponse :: DescribeIdentityUsageResponse+describeIdentityUsageResponse = DescribeIdentityUsageResponse+    { _diurIdentityUsage = Nothing+    }++-- | Usage information for the identity.+diurIdentityUsage :: Lens' DescribeIdentityUsageResponse (Maybe IdentityUsage)+diurIdentityUsage =+    lens _diurIdentityUsage (\s a -> s { _diurIdentityUsage = a })++instance ToPath DescribeIdentityUsage where+    toPath DescribeIdentityUsage{..} = mconcat+        [ "/identitypools/"+        , toText _diuIdentityPoolId+        , "/identities/"+        , toText _diuIdentityId+        ]++instance ToQuery DescribeIdentityUsage where+    toQuery = const mempty++instance ToHeaders DescribeIdentityUsage++instance ToJSON DescribeIdentityUsage where+    toJSON = const (toJSON Empty)++instance AWSRequest DescribeIdentityUsage where+    type Sv DescribeIdentityUsage = CognitoSync+    type Rs DescribeIdentityUsage = DescribeIdentityUsageResponse++    request  = get+    response = jsonResponse++instance FromJSON DescribeIdentityUsageResponse where+    parseJSON = withObject "DescribeIdentityUsageResponse" $ \o -> DescribeIdentityUsageResponse+        <$> o .:? "IdentityUsage"
+ gen/Network/AWS/CognitoSync/GetIdentityPoolConfiguration.hs view
@@ -0,0 +1,127 @@+{-# 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.CognitoSync.GetIdentityPoolConfiguration+-- 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)++-- | Gets the configuration settings of an identity pool.+--+-- <http://docs.aws.amazon.com/cognitosync/latest/APIReference/API_GetIdentityPoolConfiguration.html>+module Network.AWS.CognitoSync.GetIdentityPoolConfiguration+    (+    -- * Request+      GetIdentityPoolConfiguration+    -- ** Request constructor+    , getIdentityPoolConfiguration+    -- ** Request lenses+    , gipcIdentityPoolId++    -- * Response+    , GetIdentityPoolConfigurationResponse+    -- ** Response constructor+    , getIdentityPoolConfigurationResponse+    -- ** Response lenses+    , gipcrIdentityPoolId+    , gipcrPushSync+    ) where++import Network.AWS.Prelude+import Network.AWS.Request.RestJSON+import Network.AWS.CognitoSync.Types+import qualified GHC.Exts++newtype GetIdentityPoolConfiguration = GetIdentityPoolConfiguration+    { _gipcIdentityPoolId :: Text+    } deriving (Eq, Ord, Show, Monoid, IsString)++-- | 'GetIdentityPoolConfiguration' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'gipcIdentityPoolId' @::@ 'Text'+--+getIdentityPoolConfiguration :: Text -- ^ 'gipcIdentityPoolId'+                             -> GetIdentityPoolConfiguration+getIdentityPoolConfiguration p1 = GetIdentityPoolConfiguration+    { _gipcIdentityPoolId = p1+    }++-- | A name-spaced GUID (for example,+-- us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon+-- Cognito. This is the ID of the pool for which to return a configuration.+gipcIdentityPoolId :: Lens' GetIdentityPoolConfiguration Text+gipcIdentityPoolId =+    lens _gipcIdentityPoolId (\s a -> s { _gipcIdentityPoolId = a })++data GetIdentityPoolConfigurationResponse = GetIdentityPoolConfigurationResponse+    { _gipcrIdentityPoolId :: Maybe Text+    , _gipcrPushSync       :: Maybe PushSync+    } deriving (Eq, Show)++-- | 'GetIdentityPoolConfigurationResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'gipcrIdentityPoolId' @::@ 'Maybe' 'Text'+--+-- * 'gipcrPushSync' @::@ 'Maybe' 'PushSync'+--+getIdentityPoolConfigurationResponse :: GetIdentityPoolConfigurationResponse+getIdentityPoolConfigurationResponse = GetIdentityPoolConfigurationResponse+    { _gipcrIdentityPoolId = Nothing+    , _gipcrPushSync       = Nothing+    }++-- | A name-spaced GUID (for example,+-- us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon+-- Cognito.+gipcrIdentityPoolId :: Lens' GetIdentityPoolConfigurationResponse (Maybe Text)+gipcrIdentityPoolId =+    lens _gipcrIdentityPoolId (\s a -> s { _gipcrIdentityPoolId = a })++-- | Configuration options applied to the identity pool.+gipcrPushSync :: Lens' GetIdentityPoolConfigurationResponse (Maybe PushSync)+gipcrPushSync = lens _gipcrPushSync (\s a -> s { _gipcrPushSync = a })++instance ToPath GetIdentityPoolConfiguration where+    toPath GetIdentityPoolConfiguration{..} = mconcat+        [ "/identitypools/"+        , toText _gipcIdentityPoolId+        , "/configuration"+        ]++instance ToQuery GetIdentityPoolConfiguration where+    toQuery = const mempty++instance ToHeaders GetIdentityPoolConfiguration++instance ToJSON GetIdentityPoolConfiguration where+    toJSON = const (toJSON Empty)++instance AWSRequest GetIdentityPoolConfiguration where+    type Sv GetIdentityPoolConfiguration = CognitoSync+    type Rs GetIdentityPoolConfiguration = GetIdentityPoolConfigurationResponse++    request  = get+    response = jsonResponse++instance FromJSON GetIdentityPoolConfigurationResponse where+    parseJSON = withObject "GetIdentityPoolConfigurationResponse" $ \o -> GetIdentityPoolConfigurationResponse+        <$> o .:? "IdentityPoolId"+        <*> o .:? "PushSync"
+ gen/Network/AWS/CognitoSync/ListDatasets.hs view
@@ -0,0 +1,172 @@+{-# 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.CognitoSync.ListDatasets+-- 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)++-- | Lists datasets for an identity. The credentials used to make this API call+-- need to have access to the identity data. With Amazon Cognito Sync, each+-- identity has access only to its own data. You should use Amazon Cognito+-- Identity service to retrieve the credentials necessary to make this API+-- call.+--+-- <http://docs.aws.amazon.com/cognitosync/latest/APIReference/API_ListDatasets.html>+module Network.AWS.CognitoSync.ListDatasets+    (+    -- * Request+      ListDatasets+    -- ** Request constructor+    , listDatasets+    -- ** Request lenses+    , ldIdentityId+    , ldIdentityPoolId+    , ldMaxResults+    , ldNextToken++    -- * Response+    , ListDatasetsResponse+    -- ** Response constructor+    , listDatasetsResponse+    -- ** Response lenses+    , ldrCount+    , ldrDatasets+    , ldrNextToken+    ) where++import Network.AWS.Prelude+import Network.AWS.Request.RestJSON+import Network.AWS.CognitoSync.Types+import qualified GHC.Exts++data ListDatasets = ListDatasets+    { _ldIdentityId     :: Text+    , _ldIdentityPoolId :: Text+    , _ldMaxResults     :: Maybe Int+    , _ldNextToken      :: Maybe Text+    } deriving (Eq, Ord, Show)++-- | 'ListDatasets' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'ldIdentityId' @::@ 'Text'+--+-- * 'ldIdentityPoolId' @::@ 'Text'+--+-- * 'ldMaxResults' @::@ 'Maybe' 'Int'+--+-- * 'ldNextToken' @::@ 'Maybe' 'Text'+--+listDatasets :: Text -- ^ 'ldIdentityPoolId'+             -> Text -- ^ 'ldIdentityId'+             -> ListDatasets+listDatasets p1 p2 = ListDatasets+    { _ldIdentityPoolId = p1+    , _ldIdentityId     = p2+    , _ldNextToken      = Nothing+    , _ldMaxResults     = Nothing+    }++-- | A name-spaced GUID (for example,+-- us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon+-- Cognito. GUID generation is unique within a region.+ldIdentityId :: Lens' ListDatasets Text+ldIdentityId = lens _ldIdentityId (\s a -> s { _ldIdentityId = a })++-- | A name-spaced GUID (for example,+-- us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon+-- Cognito. GUID generation is unique within a region.+ldIdentityPoolId :: Lens' ListDatasets Text+ldIdentityPoolId = lens _ldIdentityPoolId (\s a -> s { _ldIdentityPoolId = a })++-- | The maximum number of results to be returned.+ldMaxResults :: Lens' ListDatasets (Maybe Int)+ldMaxResults = lens _ldMaxResults (\s a -> s { _ldMaxResults = a })++-- | A pagination token for obtaining the next page of results.+ldNextToken :: Lens' ListDatasets (Maybe Text)+ldNextToken = lens _ldNextToken (\s a -> s { _ldNextToken = a })++data ListDatasetsResponse = ListDatasetsResponse+    { _ldrCount     :: Maybe Int+    , _ldrDatasets  :: List "Datasets" Dataset+    , _ldrNextToken :: Maybe Text+    } deriving (Eq, Show)++-- | 'ListDatasetsResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'ldrCount' @::@ 'Maybe' 'Int'+--+-- * 'ldrDatasets' @::@ ['Dataset']+--+-- * 'ldrNextToken' @::@ 'Maybe' 'Text'+--+listDatasetsResponse :: ListDatasetsResponse+listDatasetsResponse = ListDatasetsResponse+    { _ldrDatasets  = mempty+    , _ldrCount     = Nothing+    , _ldrNextToken = Nothing+    }++-- | Number of datasets returned.+ldrCount :: Lens' ListDatasetsResponse (Maybe Int)+ldrCount = lens _ldrCount (\s a -> s { _ldrCount = a })++-- | A set of datasets.+ldrDatasets :: Lens' ListDatasetsResponse [Dataset]+ldrDatasets = lens _ldrDatasets (\s a -> s { _ldrDatasets = a }) . _List++-- | A pagination token for obtaining the next page of results.+ldrNextToken :: Lens' ListDatasetsResponse (Maybe Text)+ldrNextToken = lens _ldrNextToken (\s a -> s { _ldrNextToken = a })++instance ToPath ListDatasets where+    toPath ListDatasets{..} = mconcat+        [ "/identitypools/"+        , toText _ldIdentityPoolId+        , "/identities/"+        , toText _ldIdentityId+        , "/datasets"+        ]++instance ToQuery ListDatasets where+    toQuery ListDatasets{..} = mconcat+        [ "nextToken"  =? _ldNextToken+        , "maxResults" =? _ldMaxResults+        ]++instance ToHeaders ListDatasets++instance ToJSON ListDatasets where+    toJSON = const (toJSON Empty)++instance AWSRequest ListDatasets where+    type Sv ListDatasets = CognitoSync+    type Rs ListDatasets = ListDatasetsResponse++    request  = get+    response = jsonResponse++instance FromJSON ListDatasetsResponse where+    parseJSON = withObject "ListDatasetsResponse" $ \o -> ListDatasetsResponse+        <$> o .:? "Count"+        <*> o .:  "Datasets"+        <*> o .:? "NextToken"
+ gen/Network/AWS/CognitoSync/ListIdentityPoolUsage.hs view
@@ -0,0 +1,150 @@+{-# 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.CognitoSync.ListIdentityPoolUsage+-- 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)++-- | Gets a list of identity pools registered with Cognito.+--+-- <http://docs.aws.amazon.com/cognitosync/latest/APIReference/API_ListIdentityPoolUsage.html>+module Network.AWS.CognitoSync.ListIdentityPoolUsage+    (+    -- * Request+      ListIdentityPoolUsage+    -- ** Request constructor+    , listIdentityPoolUsage+    -- ** Request lenses+    , lipuMaxResults+    , lipuNextToken++    -- * Response+    , ListIdentityPoolUsageResponse+    -- ** Response constructor+    , listIdentityPoolUsageResponse+    -- ** Response lenses+    , lipurCount+    , lipurIdentityPoolUsages+    , lipurMaxResults+    , lipurNextToken+    ) where++import Network.AWS.Prelude+import Network.AWS.Request.RestJSON+import Network.AWS.CognitoSync.Types+import qualified GHC.Exts++data ListIdentityPoolUsage = ListIdentityPoolUsage+    { _lipuMaxResults :: Maybe Int+    , _lipuNextToken  :: Maybe Text+    } deriving (Eq, Ord, Show)++-- | 'ListIdentityPoolUsage' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'lipuMaxResults' @::@ 'Maybe' 'Int'+--+-- * 'lipuNextToken' @::@ 'Maybe' 'Text'+--+listIdentityPoolUsage :: ListIdentityPoolUsage+listIdentityPoolUsage = ListIdentityPoolUsage+    { _lipuNextToken  = Nothing+    , _lipuMaxResults = Nothing+    }++-- | The maximum number of results to be returned.+lipuMaxResults :: Lens' ListIdentityPoolUsage (Maybe Int)+lipuMaxResults = lens _lipuMaxResults (\s a -> s { _lipuMaxResults = a })++-- | A pagination token for obtaining the next page of results.+lipuNextToken :: Lens' ListIdentityPoolUsage (Maybe Text)+lipuNextToken = lens _lipuNextToken (\s a -> s { _lipuNextToken = a })++data ListIdentityPoolUsageResponse = ListIdentityPoolUsageResponse+    { _lipurCount              :: Maybe Int+    , _lipurIdentityPoolUsages :: List "IdentityPoolUsages" IdentityPoolUsage+    , _lipurMaxResults         :: Maybe Int+    , _lipurNextToken          :: Maybe Text+    } deriving (Eq, Show)++-- | 'ListIdentityPoolUsageResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'lipurCount' @::@ 'Maybe' 'Int'+--+-- * 'lipurIdentityPoolUsages' @::@ ['IdentityPoolUsage']+--+-- * 'lipurMaxResults' @::@ 'Maybe' 'Int'+--+-- * 'lipurNextToken' @::@ 'Maybe' 'Text'+--+listIdentityPoolUsageResponse :: ListIdentityPoolUsageResponse+listIdentityPoolUsageResponse = ListIdentityPoolUsageResponse+    { _lipurIdentityPoolUsages = mempty+    , _lipurMaxResults         = Nothing+    , _lipurCount              = Nothing+    , _lipurNextToken          = Nothing+    }++-- | Total number of identities for the identity pool.+lipurCount :: Lens' ListIdentityPoolUsageResponse (Maybe Int)+lipurCount = lens _lipurCount (\s a -> s { _lipurCount = a })++-- | Usage information for the identity pools.+lipurIdentityPoolUsages :: Lens' ListIdentityPoolUsageResponse [IdentityPoolUsage]+lipurIdentityPoolUsages =+    lens _lipurIdentityPoolUsages (\s a -> s { _lipurIdentityPoolUsages = a })+        . _List++-- | The maximum number of results to be returned.+lipurMaxResults :: Lens' ListIdentityPoolUsageResponse (Maybe Int)+lipurMaxResults = lens _lipurMaxResults (\s a -> s { _lipurMaxResults = a })++-- | A pagination token for obtaining the next page of results.+lipurNextToken :: Lens' ListIdentityPoolUsageResponse (Maybe Text)+lipurNextToken = lens _lipurNextToken (\s a -> s { _lipurNextToken = a })++instance ToPath ListIdentityPoolUsage where+    toPath = const "/identitypools"++instance ToQuery ListIdentityPoolUsage where+    toQuery ListIdentityPoolUsage{..} = mconcat+        [ "maxResults" =? _lipuMaxResults+        , "nextToken"  =? _lipuNextToken+        ]++instance ToHeaders ListIdentityPoolUsage++instance ToJSON ListIdentityPoolUsage where+    toJSON = const (toJSON Empty)++instance AWSRequest ListIdentityPoolUsage where+    type Sv ListIdentityPoolUsage = CognitoSync+    type Rs ListIdentityPoolUsage = ListIdentityPoolUsageResponse++    request  = get+    response = jsonResponse++instance FromJSON ListIdentityPoolUsageResponse where+    parseJSON = withObject "ListIdentityPoolUsageResponse" $ \o -> ListIdentityPoolUsageResponse+        <$> o .:? "Count"+        <*> o .:  "IdentityPoolUsages"+        <*> o .:? "MaxResults"+        <*> o .:? "NextToken"
+ gen/Network/AWS/CognitoSync/ListRecords.hs view
@@ -0,0 +1,274 @@+{-# 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.CognitoSync.ListRecords+-- 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)++-- | Gets paginated records, optionally changed after a particular sync count+-- for a dataset and identity. The credentials used to make this API call need+-- to have access to the identity data. With Amazon Cognito Sync, each+-- identity has access only to its own data. You should use Amazon Cognito+-- Identity service to retrieve the credentials necessary to make this API+-- call.+--+-- <http://docs.aws.amazon.com/cognitosync/latest/APIReference/API_ListRecords.html>+module Network.AWS.CognitoSync.ListRecords+    (+    -- * Request+      ListRecords+    -- ** Request constructor+    , listRecords+    -- ** Request lenses+    , lrDatasetName+    , lrIdentityId+    , lrIdentityPoolId+    , lrLastSyncCount+    , lrMaxResults+    , lrNextToken+    , lrSyncSessionToken++    -- * Response+    , ListRecordsResponse+    -- ** Response constructor+    , listRecordsResponse+    -- ** Response lenses+    , lrrCount+    , lrrDatasetDeletedAfterRequestedSyncCount+    , lrrDatasetExists+    , lrrDatasetSyncCount+    , lrrLastModifiedBy+    , lrrMergedDatasetNames+    , lrrNextToken+    , lrrRecords+    , lrrSyncSessionToken+    ) where++import Network.AWS.Prelude+import Network.AWS.Request.RestJSON+import Network.AWS.CognitoSync.Types+import qualified GHC.Exts++data ListRecords = ListRecords+    { _lrDatasetName      :: Text+    , _lrIdentityId       :: Text+    , _lrIdentityPoolId   :: Text+    , _lrLastSyncCount    :: Maybe Integer+    , _lrMaxResults       :: Maybe Int+    , _lrNextToken        :: Maybe Text+    , _lrSyncSessionToken :: Maybe Text+    } deriving (Eq, Ord, Show)++-- | 'ListRecords' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'lrDatasetName' @::@ 'Text'+--+-- * 'lrIdentityId' @::@ 'Text'+--+-- * 'lrIdentityPoolId' @::@ 'Text'+--+-- * 'lrLastSyncCount' @::@ 'Maybe' 'Integer'+--+-- * 'lrMaxResults' @::@ 'Maybe' 'Int'+--+-- * 'lrNextToken' @::@ 'Maybe' 'Text'+--+-- * 'lrSyncSessionToken' @::@ 'Maybe' 'Text'+--+listRecords :: Text -- ^ 'lrIdentityPoolId'+            -> Text -- ^ 'lrIdentityId'+            -> Text -- ^ 'lrDatasetName'+            -> ListRecords+listRecords p1 p2 p3 = ListRecords+    { _lrIdentityPoolId   = p1+    , _lrIdentityId       = p2+    , _lrDatasetName      = p3+    , _lrLastSyncCount    = Nothing+    , _lrNextToken        = Nothing+    , _lrMaxResults       = Nothing+    , _lrSyncSessionToken = Nothing+    }++-- | A string of up to 128 characters. Allowed characters are a-z, A-Z, 0-9,+-- '_' (underscore), '-' (dash), and '.' (dot).+lrDatasetName :: Lens' ListRecords Text+lrDatasetName = lens _lrDatasetName (\s a -> s { _lrDatasetName = a })++-- | A name-spaced GUID (for example,+-- us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon+-- Cognito. GUID generation is unique within a region.+lrIdentityId :: Lens' ListRecords Text+lrIdentityId = lens _lrIdentityId (\s a -> s { _lrIdentityId = a })++-- | A name-spaced GUID (for example,+-- us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon+-- Cognito. GUID generation is unique within a region.+lrIdentityPoolId :: Lens' ListRecords Text+lrIdentityPoolId = lens _lrIdentityPoolId (\s a -> s { _lrIdentityPoolId = a })++-- | The last server sync count for this record.+lrLastSyncCount :: Lens' ListRecords (Maybe Integer)+lrLastSyncCount = lens _lrLastSyncCount (\s a -> s { _lrLastSyncCount = a })++-- | The maximum number of results to be returned.+lrMaxResults :: Lens' ListRecords (Maybe Int)+lrMaxResults = lens _lrMaxResults (\s a -> s { _lrMaxResults = a })++-- | A pagination token for obtaining the next page of results.+lrNextToken :: Lens' ListRecords (Maybe Text)+lrNextToken = lens _lrNextToken (\s a -> s { _lrNextToken = a })++-- | A token containing a session ID, identity ID, and expiration.+lrSyncSessionToken :: Lens' ListRecords (Maybe Text)+lrSyncSessionToken =+    lens _lrSyncSessionToken (\s a -> s { _lrSyncSessionToken = a })++data ListRecordsResponse = ListRecordsResponse+    { _lrrCount                                 :: Maybe Int+    , _lrrDatasetDeletedAfterRequestedSyncCount :: Maybe Bool+    , _lrrDatasetExists                         :: Maybe Bool+    , _lrrDatasetSyncCount                      :: Maybe Integer+    , _lrrLastModifiedBy                        :: Maybe Text+    , _lrrMergedDatasetNames                    :: List "MergedDatasetNames" Text+    , _lrrNextToken                             :: Maybe Text+    , _lrrRecords                               :: List "Records" Record+    , _lrrSyncSessionToken                      :: Maybe Text+    } deriving (Eq, Show)++-- | 'ListRecordsResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'lrrCount' @::@ 'Maybe' 'Int'+--+-- * 'lrrDatasetDeletedAfterRequestedSyncCount' @::@ 'Maybe' 'Bool'+--+-- * 'lrrDatasetExists' @::@ 'Maybe' 'Bool'+--+-- * 'lrrDatasetSyncCount' @::@ 'Maybe' 'Integer'+--+-- * 'lrrLastModifiedBy' @::@ 'Maybe' 'Text'+--+-- * 'lrrMergedDatasetNames' @::@ ['Text']+--+-- * 'lrrNextToken' @::@ 'Maybe' 'Text'+--+-- * 'lrrRecords' @::@ ['Record']+--+-- * 'lrrSyncSessionToken' @::@ 'Maybe' 'Text'+--+listRecordsResponse :: ListRecordsResponse+listRecordsResponse = ListRecordsResponse+    { _lrrRecords                               = mempty+    , _lrrNextToken                             = Nothing+    , _lrrCount                                 = Nothing+    , _lrrDatasetSyncCount                      = Nothing+    , _lrrLastModifiedBy                        = Nothing+    , _lrrMergedDatasetNames                    = mempty+    , _lrrDatasetExists                         = Nothing+    , _lrrDatasetDeletedAfterRequestedSyncCount = Nothing+    , _lrrSyncSessionToken                      = Nothing+    }++-- | Total number of records.+lrrCount :: Lens' ListRecordsResponse (Maybe Int)+lrrCount = lens _lrrCount (\s a -> s { _lrrCount = a })++-- | A boolean value specifying whether to delete the dataset locally.+lrrDatasetDeletedAfterRequestedSyncCount :: Lens' ListRecordsResponse (Maybe Bool)+lrrDatasetDeletedAfterRequestedSyncCount =+    lens _lrrDatasetDeletedAfterRequestedSyncCount+        (\s a -> s { _lrrDatasetDeletedAfterRequestedSyncCount = a })++-- | Indicates whether the dataset exists.+lrrDatasetExists :: Lens' ListRecordsResponse (Maybe Bool)+lrrDatasetExists = lens _lrrDatasetExists (\s a -> s { _lrrDatasetExists = a })++-- | Server sync count for this dataset.+lrrDatasetSyncCount :: Lens' ListRecordsResponse (Maybe Integer)+lrrDatasetSyncCount =+    lens _lrrDatasetSyncCount (\s a -> s { _lrrDatasetSyncCount = a })++-- | The user/device that made the last change to this record.+lrrLastModifiedBy :: Lens' ListRecordsResponse (Maybe Text)+lrrLastModifiedBy =+    lens _lrrLastModifiedBy (\s a -> s { _lrrLastModifiedBy = a })++-- | Names of merged datasets.+lrrMergedDatasetNames :: Lens' ListRecordsResponse [Text]+lrrMergedDatasetNames =+    lens _lrrMergedDatasetNames (\s a -> s { _lrrMergedDatasetNames = a })+        . _List++-- | A pagination token for obtaining the next page of results.+lrrNextToken :: Lens' ListRecordsResponse (Maybe Text)+lrrNextToken = lens _lrrNextToken (\s a -> s { _lrrNextToken = a })++-- | A list of all records.+lrrRecords :: Lens' ListRecordsResponse [Record]+lrrRecords = lens _lrrRecords (\s a -> s { _lrrRecords = a }) . _List++-- | A token containing a session ID, identity ID, and expiration.+lrrSyncSessionToken :: Lens' ListRecordsResponse (Maybe Text)+lrrSyncSessionToken =+    lens _lrrSyncSessionToken (\s a -> s { _lrrSyncSessionToken = a })++instance ToPath ListRecords where+    toPath ListRecords{..} = mconcat+        [ "/identitypools/"+        , toText _lrIdentityPoolId+        , "/identities/"+        , toText _lrIdentityId+        , "/datasets/"+        , toText _lrDatasetName+        , "/records"+        ]++instance ToQuery ListRecords where+    toQuery ListRecords{..} = mconcat+        [ "lastSyncCount"    =? _lrLastSyncCount+        , "nextToken"        =? _lrNextToken+        , "maxResults"       =? _lrMaxResults+        , "syncSessionToken" =? _lrSyncSessionToken+        ]++instance ToHeaders ListRecords++instance ToJSON ListRecords where+    toJSON = const (toJSON Empty)++instance AWSRequest ListRecords where+    type Sv ListRecords = CognitoSync+    type Rs ListRecords = ListRecordsResponse++    request  = get+    response = jsonResponse++instance FromJSON ListRecordsResponse where+    parseJSON = withObject "ListRecordsResponse" $ \o -> ListRecordsResponse+        <$> o .:? "Count"+        <*> o .:? "DatasetDeletedAfterRequestedSyncCount"+        <*> o .:? "DatasetExists"+        <*> o .:? "DatasetSyncCount"+        <*> o .:? "LastModifiedBy"+        <*> o .:  "MergedDatasetNames"+        <*> o .:? "NextToken"+        <*> o .:  "Records"+        <*> o .:? "SyncSessionToken"
+ gen/Network/AWS/CognitoSync/RegisterDevice.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.CognitoSync.RegisterDevice+-- 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)++-- | Registers a device to receive push sync notifications.+--+-- <http://docs.aws.amazon.com/cognitosync/latest/APIReference/API_RegisterDevice.html>+module Network.AWS.CognitoSync.RegisterDevice+    (+    -- * Request+      RegisterDevice+    -- ** Request constructor+    , registerDevice+    -- ** Request lenses+    , rdIdentityId+    , rdIdentityPoolId+    , rdPlatform+    , rdToken++    -- * Response+    , RegisterDeviceResponse+    -- ** Response constructor+    , registerDeviceResponse+    -- ** Response lenses+    , rdrDeviceId+    ) where++import Network.AWS.Prelude+import Network.AWS.Request.RestJSON+import Network.AWS.CognitoSync.Types+import qualified GHC.Exts++data RegisterDevice = RegisterDevice+    { _rdIdentityId     :: Text+    , _rdIdentityPoolId :: Text+    , _rdPlatform       :: Text+    , _rdToken          :: Text+    } deriving (Eq, Ord, Show)++-- | 'RegisterDevice' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'rdIdentityId' @::@ 'Text'+--+-- * 'rdIdentityPoolId' @::@ 'Text'+--+-- * 'rdPlatform' @::@ 'Text'+--+-- * 'rdToken' @::@ 'Text'+--+registerDevice :: Text -- ^ 'rdIdentityPoolId'+               -> Text -- ^ 'rdIdentityId'+               -> Text -- ^ 'rdPlatform'+               -> Text -- ^ 'rdToken'+               -> RegisterDevice+registerDevice p1 p2 p3 p4 = RegisterDevice+    { _rdIdentityPoolId = p1+    , _rdIdentityId     = p2+    , _rdPlatform       = p3+    , _rdToken          = p4+    }++-- | The unique ID for this identity.+rdIdentityId :: Lens' RegisterDevice Text+rdIdentityId = lens _rdIdentityId (\s a -> s { _rdIdentityId = a })++-- | A name-spaced GUID (for example,+-- us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon+-- Cognito. Here, the ID of the pool that the identity belongs to.+rdIdentityPoolId :: Lens' RegisterDevice Text+rdIdentityPoolId = lens _rdIdentityPoolId (\s a -> s { _rdIdentityPoolId = a })++-- | The SNS platform type (e.g. GCM, SDM, APNS, APNS_SANDBOX).+rdPlatform :: Lens' RegisterDevice Text+rdPlatform = lens _rdPlatform (\s a -> s { _rdPlatform = a })++-- | The push token.+rdToken :: Lens' RegisterDevice Text+rdToken = lens _rdToken (\s a -> s { _rdToken = a })++newtype RegisterDeviceResponse = RegisterDeviceResponse+    { _rdrDeviceId :: Maybe Text+    } deriving (Eq, Ord, Show, Monoid)++-- | 'RegisterDeviceResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'rdrDeviceId' @::@ 'Maybe' 'Text'+--+registerDeviceResponse :: RegisterDeviceResponse+registerDeviceResponse = RegisterDeviceResponse+    { _rdrDeviceId = Nothing+    }++-- | The unique ID generated for this device by Cognito.+rdrDeviceId :: Lens' RegisterDeviceResponse (Maybe Text)+rdrDeviceId = lens _rdrDeviceId (\s a -> s { _rdrDeviceId = a })++instance ToPath RegisterDevice where+    toPath RegisterDevice{..} = mconcat+        [ "/identitypools/"+        , toText _rdIdentityPoolId+        , "/identity/"+        , toText _rdIdentityId+        , "/device"+        ]++instance ToQuery RegisterDevice where+    toQuery = const mempty++instance ToHeaders RegisterDevice++instance ToJSON RegisterDevice where+    toJSON RegisterDevice{..} = object+        [ "Platform" .= _rdPlatform+        , "Token"    .= _rdToken+        ]++instance AWSRequest RegisterDevice where+    type Sv RegisterDevice = CognitoSync+    type Rs RegisterDevice = RegisterDeviceResponse++    request  = post+    response = jsonResponse++instance FromJSON RegisterDeviceResponse where+    parseJSON = withObject "RegisterDeviceResponse" $ \o -> RegisterDeviceResponse+        <$> o .:? "DeviceId"
+ gen/Network/AWS/CognitoSync/SetIdentityPoolConfiguration.hs view
@@ -0,0 +1,138 @@+{-# 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.CognitoSync.SetIdentityPoolConfiguration+-- 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)++-- | Sets the necessary configuration for push sync.+--+-- <http://docs.aws.amazon.com/cognitosync/latest/APIReference/API_SetIdentityPoolConfiguration.html>+module Network.AWS.CognitoSync.SetIdentityPoolConfiguration+    (+    -- * Request+      SetIdentityPoolConfiguration+    -- ** Request constructor+    , setIdentityPoolConfiguration+    -- ** Request lenses+    , sipcIdentityPoolId+    , sipcPushSync++    -- * Response+    , SetIdentityPoolConfigurationResponse+    -- ** Response constructor+    , setIdentityPoolConfigurationResponse+    -- ** Response lenses+    , sipcrIdentityPoolId+    , sipcrPushSync+    ) where++import Network.AWS.Prelude+import Network.AWS.Request.RestJSON+import Network.AWS.CognitoSync.Types+import qualified GHC.Exts++data SetIdentityPoolConfiguration = SetIdentityPoolConfiguration+    { _sipcIdentityPoolId :: Text+    , _sipcPushSync       :: Maybe PushSync+    } deriving (Eq, Show)++-- | 'SetIdentityPoolConfiguration' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'sipcIdentityPoolId' @::@ 'Text'+--+-- * 'sipcPushSync' @::@ 'Maybe' 'PushSync'+--+setIdentityPoolConfiguration :: Text -- ^ 'sipcIdentityPoolId'+                             -> SetIdentityPoolConfiguration+setIdentityPoolConfiguration p1 = SetIdentityPoolConfiguration+    { _sipcIdentityPoolId = p1+    , _sipcPushSync       = Nothing+    }++-- | A name-spaced GUID (for example,+-- us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon+-- Cognito. This is the ID of the pool to modify.+sipcIdentityPoolId :: Lens' SetIdentityPoolConfiguration Text+sipcIdentityPoolId =+    lens _sipcIdentityPoolId (\s a -> s { _sipcIdentityPoolId = a })++-- | Configuration options to be applied to the identity pool.+sipcPushSync :: Lens' SetIdentityPoolConfiguration (Maybe PushSync)+sipcPushSync = lens _sipcPushSync (\s a -> s { _sipcPushSync = a })++data SetIdentityPoolConfigurationResponse = SetIdentityPoolConfigurationResponse+    { _sipcrIdentityPoolId :: Maybe Text+    , _sipcrPushSync       :: Maybe PushSync+    } deriving (Eq, Show)++-- | 'SetIdentityPoolConfigurationResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'sipcrIdentityPoolId' @::@ 'Maybe' 'Text'+--+-- * 'sipcrPushSync' @::@ 'Maybe' 'PushSync'+--+setIdentityPoolConfigurationResponse :: SetIdentityPoolConfigurationResponse+setIdentityPoolConfigurationResponse = SetIdentityPoolConfigurationResponse+    { _sipcrIdentityPoolId = Nothing+    , _sipcrPushSync       = Nothing+    }++-- | A name-spaced GUID (for example,+-- us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon+-- Cognito.+sipcrIdentityPoolId :: Lens' SetIdentityPoolConfigurationResponse (Maybe Text)+sipcrIdentityPoolId =+    lens _sipcrIdentityPoolId (\s a -> s { _sipcrIdentityPoolId = a })++-- | Configuration options applied to the identity pool.+sipcrPushSync :: Lens' SetIdentityPoolConfigurationResponse (Maybe PushSync)+sipcrPushSync = lens _sipcrPushSync (\s a -> s { _sipcrPushSync = a })++instance ToPath SetIdentityPoolConfiguration where+    toPath SetIdentityPoolConfiguration{..} = mconcat+        [ "/identitypools/"+        , toText _sipcIdentityPoolId+        , "/configuration"+        ]++instance ToQuery SetIdentityPoolConfiguration where+    toQuery = const mempty++instance ToHeaders SetIdentityPoolConfiguration++instance ToJSON SetIdentityPoolConfiguration where+    toJSON SetIdentityPoolConfiguration{..} = object+        [ "PushSync" .= _sipcPushSync+        ]++instance AWSRequest SetIdentityPoolConfiguration where+    type Sv SetIdentityPoolConfiguration = CognitoSync+    type Rs SetIdentityPoolConfiguration = SetIdentityPoolConfigurationResponse++    request  = post+    response = jsonResponse++instance FromJSON SetIdentityPoolConfigurationResponse where+    parseJSON = withObject "SetIdentityPoolConfigurationResponse" $ \o -> SetIdentityPoolConfigurationResponse+        <$> o .:? "IdentityPoolId"+        <*> o .:? "PushSync"
+ gen/Network/AWS/CognitoSync/SubscribeToDataset.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.CognitoSync.SubscribeToDataset+-- 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)++-- | Subscribes to receive notifications when a dataset is modified by another+-- device.+--+-- <http://docs.aws.amazon.com/cognitosync/latest/APIReference/API_SubscribeToDataset.html>+module Network.AWS.CognitoSync.SubscribeToDataset+    (+    -- * Request+      SubscribeToDataset+    -- ** Request constructor+    , subscribeToDataset+    -- ** Request lenses+    , stdDatasetName+    , stdDeviceId+    , stdIdentityId+    , stdIdentityPoolId++    -- * Response+    , SubscribeToDatasetResponse+    -- ** Response constructor+    , subscribeToDatasetResponse+    ) where++import Network.AWS.Prelude+import Network.AWS.Request.RestJSON+import Network.AWS.CognitoSync.Types+import qualified GHC.Exts++data SubscribeToDataset = SubscribeToDataset+    { _stdDatasetName    :: Text+    , _stdDeviceId       :: Text+    , _stdIdentityId     :: Text+    , _stdIdentityPoolId :: Text+    } deriving (Eq, Ord, Show)++-- | 'SubscribeToDataset' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'stdDatasetName' @::@ 'Text'+--+-- * 'stdDeviceId' @::@ 'Text'+--+-- * 'stdIdentityId' @::@ 'Text'+--+-- * 'stdIdentityPoolId' @::@ 'Text'+--+subscribeToDataset :: Text -- ^ 'stdIdentityPoolId'+                   -> Text -- ^ 'stdIdentityId'+                   -> Text -- ^ 'stdDatasetName'+                   -> Text -- ^ 'stdDeviceId'+                   -> SubscribeToDataset+subscribeToDataset p1 p2 p3 p4 = SubscribeToDataset+    { _stdIdentityPoolId = p1+    , _stdIdentityId     = p2+    , _stdDatasetName    = p3+    , _stdDeviceId       = p4+    }++-- | The name of the dataset to subcribe to.+stdDatasetName :: Lens' SubscribeToDataset Text+stdDatasetName = lens _stdDatasetName (\s a -> s { _stdDatasetName = a })++-- | The unique ID generated for this device by Cognito.+stdDeviceId :: Lens' SubscribeToDataset Text+stdDeviceId = lens _stdDeviceId (\s a -> s { _stdDeviceId = a })++-- | Unique ID for this identity.+stdIdentityId :: Lens' SubscribeToDataset Text+stdIdentityId = lens _stdIdentityId (\s a -> s { _stdIdentityId = a })++-- | A name-spaced GUID (for example,+-- us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon+-- Cognito. The ID of the pool to which the identity belongs.+stdIdentityPoolId :: Lens' SubscribeToDataset Text+stdIdentityPoolId =+    lens _stdIdentityPoolId (\s a -> s { _stdIdentityPoolId = a })++data SubscribeToDatasetResponse = SubscribeToDatasetResponse+    deriving (Eq, Ord, Show, Generic)++-- | 'SubscribeToDatasetResponse' constructor.+subscribeToDatasetResponse :: SubscribeToDatasetResponse+subscribeToDatasetResponse = SubscribeToDatasetResponse++instance ToPath SubscribeToDataset where+    toPath SubscribeToDataset{..} = mconcat+        [ "/identitypools/"+        , toText _stdIdentityPoolId+        , "/identities/"+        , toText _stdIdentityId+        , "/datasets/"+        , toText _stdDatasetName+        , "/subscriptions/"+        , toText _stdDeviceId+        ]++instance ToQuery SubscribeToDataset where+    toQuery = const mempty++instance ToHeaders SubscribeToDataset++instance ToJSON SubscribeToDataset where+    toJSON = const (toJSON Empty)++instance AWSRequest SubscribeToDataset where+    type Sv SubscribeToDataset = CognitoSync+    type Rs SubscribeToDataset = SubscribeToDatasetResponse++    request  = post+    response = nullResponse SubscribeToDatasetResponse
+ gen/Network/AWS/CognitoSync/Types.hs view
@@ -0,0 +1,590 @@+{-# 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.CognitoSync.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.CognitoSync.Types+    (+    -- * Service+      CognitoSync+    -- ** Error+    , RESTError++    -- * IdentityPoolUsage+    , IdentityPoolUsage+    , identityPoolUsage+    , ipuDataStorage+    , ipuIdentityPoolId+    , ipuLastModifiedDate+    , ipuSyncSessionsCount++    -- * Platform+    , Platform (..)++    -- * Dataset+    , Dataset+    , dataset+    , dCreationDate+    , dDataStorage+    , dDatasetName+    , dIdentityId+    , dLastModifiedBy+    , dLastModifiedDate+    , dNumRecords++    -- * Operation+    , Operation (..)++    -- * Record+    , Record+    , record+    , rDeviceLastModifiedDate+    , rKey+    , rLastModifiedBy+    , rLastModifiedDate+    , rSyncCount+    , rValue++    -- * IdentityUsage+    , IdentityUsage+    , identityUsage+    , iuDataStorage+    , iuDatasetCount+    , iuIdentityId+    , iuIdentityPoolId+    , iuLastModifiedDate++    -- * RecordPatch+    , RecordPatch+    , recordPatch+    , rpDeviceLastModifiedDate+    , rpKey+    , rpOp+    , rpSyncCount+    , rpValue++    -- * PushSync+    , PushSync+    , pushSync+    , psApplicationArns+    , psRoleArn+    ) where++import Data.Char (isUpper)+import Network.AWS.Error+import Network.AWS.Prelude+import Network.AWS.Signing.V4+import qualified GHC.Exts++-- | Version @2014-06-30@ of the Amazon Cognito Sync service.+data CognitoSync++instance AWSService CognitoSync where+    type Sg CognitoSync = V4+    type Er CognitoSync = RESTError++    service = Service+        { _svcEndpoint     = regional+        , _svcAbbrev       = "CognitoSync"+        , _svcPrefix       = "cognito-sync"+        , _svcVersion      = "2014-06-30"+        , _svcTargetPrefix = Nothing+        , _svcJSONVersion  = Just "1.1"+        }++    handle = restError statusSuccess++data IdentityPoolUsage = IdentityPoolUsage+    { _ipuDataStorage       :: Maybe Integer+    , _ipuIdentityPoolId    :: Maybe Text+    , _ipuLastModifiedDate  :: Maybe RFC822+    , _ipuSyncSessionsCount :: Maybe Integer+    } deriving (Eq, Ord, Show)++-- | 'IdentityPoolUsage' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'ipuDataStorage' @::@ 'Maybe' 'Integer'+--+-- * 'ipuIdentityPoolId' @::@ 'Maybe' 'Text'+--+-- * 'ipuLastModifiedDate' @::@ 'Maybe' 'UTCTime'+--+-- * 'ipuSyncSessionsCount' @::@ 'Maybe' 'Integer'+--+identityPoolUsage :: IdentityPoolUsage+identityPoolUsage = IdentityPoolUsage+    { _ipuIdentityPoolId    = Nothing+    , _ipuSyncSessionsCount = Nothing+    , _ipuDataStorage       = Nothing+    , _ipuLastModifiedDate  = Nothing+    }++-- | Data storage information for the identity pool.+ipuDataStorage :: Lens' IdentityPoolUsage (Maybe Integer)+ipuDataStorage = lens _ipuDataStorage (\s a -> s { _ipuDataStorage = a })++-- | A name-spaced GUID (for example,+-- us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon+-- Cognito. GUID generation is unique within a region.+ipuIdentityPoolId :: Lens' IdentityPoolUsage (Maybe Text)+ipuIdentityPoolId =+    lens _ipuIdentityPoolId (\s a -> s { _ipuIdentityPoolId = a })++-- | Date on which the identity pool was last modified.+ipuLastModifiedDate :: Lens' IdentityPoolUsage (Maybe UTCTime)+ipuLastModifiedDate =+    lens _ipuLastModifiedDate (\s a -> s { _ipuLastModifiedDate = a })+        . mapping _Time++-- | Number of sync sessions for the identity pool.+ipuSyncSessionsCount :: Lens' IdentityPoolUsage (Maybe Integer)+ipuSyncSessionsCount =+    lens _ipuSyncSessionsCount (\s a -> s { _ipuSyncSessionsCount = a })++instance FromJSON IdentityPoolUsage where+    parseJSON = withObject "IdentityPoolUsage" $ \o -> IdentityPoolUsage+        <$> o .:? "DataStorage"+        <*> o .:? "IdentityPoolId"+        <*> o .:? "LastModifiedDate"+        <*> o .:? "SyncSessionsCount"++instance ToJSON IdentityPoolUsage where+    toJSON IdentityPoolUsage{..} = object+        [ "IdentityPoolId"    .= _ipuIdentityPoolId+        , "SyncSessionsCount" .= _ipuSyncSessionsCount+        , "DataStorage"       .= _ipuDataStorage+        , "LastModifiedDate"  .= _ipuLastModifiedDate+        ]++data Platform+    = Adm         -- ^ ADM+    | Apns        -- ^ APNS+    | ApnsSandbox -- ^ APNS_SANDBOX+    | Gcm         -- ^ GCM+      deriving (Eq, Ord, Show, Generic, Enum)++instance Hashable Platform++instance FromText Platform where+    parser = match "ADM"          Adm+         <|> match "APNS"         Apns+         <|> match "APNS_SANDBOX" ApnsSandbox+         <|> match "GCM"          Gcm++instance ToText Platform where+    toText = \case+        Adm         -> "ADM"+        Apns        -> "APNS"+        ApnsSandbox -> "APNS_SANDBOX"+        Gcm         -> "GCM"++instance FromJSON Platform where+    parseJSON = parseJSONText "Platform"++instance ToJSON Platform where+    toJSON = toJSONText++data Dataset = Dataset+    { _dCreationDate     :: Maybe RFC822+    , _dDataStorage      :: Maybe Integer+    , _dDatasetName      :: Maybe Text+    , _dIdentityId       :: Maybe Text+    , _dLastModifiedBy   :: Maybe Text+    , _dLastModifiedDate :: Maybe RFC822+    , _dNumRecords       :: Maybe Integer+    } deriving (Eq, Ord, Show)++-- | 'Dataset' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'dCreationDate' @::@ 'Maybe' 'UTCTime'+--+-- * 'dDataStorage' @::@ 'Maybe' 'Integer'+--+-- * 'dDatasetName' @::@ 'Maybe' 'Text'+--+-- * 'dIdentityId' @::@ 'Maybe' 'Text'+--+-- * 'dLastModifiedBy' @::@ 'Maybe' 'Text'+--+-- * 'dLastModifiedDate' @::@ 'Maybe' 'UTCTime'+--+-- * 'dNumRecords' @::@ 'Maybe' 'Integer'+--+dataset :: Dataset+dataset = Dataset+    { _dIdentityId       = Nothing+    , _dDatasetName      = Nothing+    , _dCreationDate     = Nothing+    , _dLastModifiedDate = Nothing+    , _dLastModifiedBy   = Nothing+    , _dDataStorage      = Nothing+    , _dNumRecords       = Nothing+    }++-- | Date on which the dataset was created.+dCreationDate :: Lens' Dataset (Maybe UTCTime)+dCreationDate = lens _dCreationDate (\s a -> s { _dCreationDate = a }) . mapping _Time++-- | Total size in bytes of the records in this dataset.+dDataStorage :: Lens' Dataset (Maybe Integer)+dDataStorage = lens _dDataStorage (\s a -> s { _dDataStorage = a })++-- | A string of up to 128 characters. Allowed characters are a-z, A-Z, 0-9,+-- '_' (underscore), '-' (dash), and '.' (dot).+dDatasetName :: Lens' Dataset (Maybe Text)+dDatasetName = lens _dDatasetName (\s a -> s { _dDatasetName = a })++-- | A name-spaced GUID (for example,+-- us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon+-- Cognito. GUID generation is unique within a region.+dIdentityId :: Lens' Dataset (Maybe Text)+dIdentityId = lens _dIdentityId (\s a -> s { _dIdentityId = a })++-- | The device that made the last change to this dataset.+dLastModifiedBy :: Lens' Dataset (Maybe Text)+dLastModifiedBy = lens _dLastModifiedBy (\s a -> s { _dLastModifiedBy = a })++-- | Date when the dataset was last modified.+dLastModifiedDate :: Lens' Dataset (Maybe UTCTime)+dLastModifiedDate =+    lens _dLastModifiedDate (\s a -> s { _dLastModifiedDate = a })+        . mapping _Time++-- | Number of records in this dataset.+dNumRecords :: Lens' Dataset (Maybe Integer)+dNumRecords = lens _dNumRecords (\s a -> s { _dNumRecords = a })++instance FromJSON Dataset where+    parseJSON = withObject "Dataset" $ \o -> Dataset+        <$> o .:? "CreationDate"+        <*> o .:? "DataStorage"+        <*> o .:? "DatasetName"+        <*> o .:? "IdentityId"+        <*> o .:? "LastModifiedBy"+        <*> o .:? "LastModifiedDate"+        <*> o .:? "NumRecords"++instance ToJSON Dataset where+    toJSON Dataset{..} = object+        [ "IdentityId"       .= _dIdentityId+        , "DatasetName"      .= _dDatasetName+        , "CreationDate"     .= _dCreationDate+        , "LastModifiedDate" .= _dLastModifiedDate+        , "LastModifiedBy"   .= _dLastModifiedBy+        , "DataStorage"      .= _dDataStorage+        , "NumRecords"       .= _dNumRecords+        ]++data Operation+    = Remove  -- ^ remove+    | Replace -- ^ replace+      deriving (Eq, Ord, Show, Generic, Enum)++instance Hashable Operation++instance FromText Operation where+    parser = match "remove"  Remove+         <|> match "replace" Replace++instance ToText Operation where+    toText = \case+        Remove  -> "remove"+        Replace -> "replace"++instance FromJSON Operation where+    parseJSON = parseJSONText "Operation"++instance ToJSON Operation where+    toJSON = toJSONText++data Record = Record+    { _rDeviceLastModifiedDate :: Maybe RFC822+    , _rKey                    :: Maybe Text+    , _rLastModifiedBy         :: Maybe Text+    , _rLastModifiedDate       :: Maybe RFC822+    , _rSyncCount              :: Maybe Integer+    , _rValue                  :: Maybe Text+    } deriving (Eq, Ord, Show)++-- | 'Record' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'rDeviceLastModifiedDate' @::@ 'Maybe' 'UTCTime'+--+-- * 'rKey' @::@ 'Maybe' 'Text'+--+-- * 'rLastModifiedBy' @::@ 'Maybe' 'Text'+--+-- * 'rLastModifiedDate' @::@ 'Maybe' 'UTCTime'+--+-- * 'rSyncCount' @::@ 'Maybe' 'Integer'+--+-- * 'rValue' @::@ 'Maybe' 'Text'+--+record :: Record+record = Record+    { _rKey                    = Nothing+    , _rValue                  = Nothing+    , _rSyncCount              = Nothing+    , _rLastModifiedDate       = Nothing+    , _rLastModifiedBy         = Nothing+    , _rDeviceLastModifiedDate = Nothing+    }++-- | The last modified date of the client device.+rDeviceLastModifiedDate :: Lens' Record (Maybe UTCTime)+rDeviceLastModifiedDate =+    lens _rDeviceLastModifiedDate (\s a -> s { _rDeviceLastModifiedDate = a })+        . mapping _Time++-- | The key for the record.+rKey :: Lens' Record (Maybe Text)+rKey = lens _rKey (\s a -> s { _rKey = a })++-- | The user/device that made the last change to this record.+rLastModifiedBy :: Lens' Record (Maybe Text)+rLastModifiedBy = lens _rLastModifiedBy (\s a -> s { _rLastModifiedBy = a })++-- | The date on which the record was last modified.+rLastModifiedDate :: Lens' Record (Maybe UTCTime)+rLastModifiedDate =+    lens _rLastModifiedDate (\s a -> s { _rLastModifiedDate = a })+        . mapping _Time++-- | The server sync count for this record.+rSyncCount :: Lens' Record (Maybe Integer)+rSyncCount = lens _rSyncCount (\s a -> s { _rSyncCount = a })++-- | The value for the record.+rValue :: Lens' Record (Maybe Text)+rValue = lens _rValue (\s a -> s { _rValue = a })++instance FromJSON Record where+    parseJSON = withObject "Record" $ \o -> Record+        <$> o .:? "DeviceLastModifiedDate"+        <*> o .:? "Key"+        <*> o .:? "LastModifiedBy"+        <*> o .:? "LastModifiedDate"+        <*> o .:? "SyncCount"+        <*> o .:? "Value"++instance ToJSON Record where+    toJSON Record{..} = object+        [ "Key"                    .= _rKey+        , "Value"                  .= _rValue+        , "SyncCount"              .= _rSyncCount+        , "LastModifiedDate"       .= _rLastModifiedDate+        , "LastModifiedBy"         .= _rLastModifiedBy+        , "DeviceLastModifiedDate" .= _rDeviceLastModifiedDate+        ]++data IdentityUsage = IdentityUsage+    { _iuDataStorage      :: Maybe Integer+    , _iuDatasetCount     :: Maybe Int+    , _iuIdentityId       :: Maybe Text+    , _iuIdentityPoolId   :: Maybe Text+    , _iuLastModifiedDate :: Maybe RFC822+    } deriving (Eq, Ord, Show)++-- | 'IdentityUsage' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'iuDataStorage' @::@ 'Maybe' 'Integer'+--+-- * 'iuDatasetCount' @::@ 'Maybe' 'Int'+--+-- * 'iuIdentityId' @::@ 'Maybe' 'Text'+--+-- * 'iuIdentityPoolId' @::@ 'Maybe' 'Text'+--+-- * 'iuLastModifiedDate' @::@ 'Maybe' 'UTCTime'+--+identityUsage :: IdentityUsage+identityUsage = IdentityUsage+    { _iuIdentityId       = Nothing+    , _iuIdentityPoolId   = Nothing+    , _iuLastModifiedDate = Nothing+    , _iuDatasetCount     = Nothing+    , _iuDataStorage      = Nothing+    }++-- | Total data storage for this identity.+iuDataStorage :: Lens' IdentityUsage (Maybe Integer)+iuDataStorage = lens _iuDataStorage (\s a -> s { _iuDataStorage = a })++-- | Number of datasets for the identity.+iuDatasetCount :: Lens' IdentityUsage (Maybe Int)+iuDatasetCount = lens _iuDatasetCount (\s a -> s { _iuDatasetCount = a })++-- | A name-spaced GUID (for example,+-- us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon+-- Cognito. GUID generation is unique within a region.+iuIdentityId :: Lens' IdentityUsage (Maybe Text)+iuIdentityId = lens _iuIdentityId (\s a -> s { _iuIdentityId = a })++-- | A name-spaced GUID (for example,+-- us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon+-- Cognito. GUID generation is unique within a region.+iuIdentityPoolId :: Lens' IdentityUsage (Maybe Text)+iuIdentityPoolId = lens _iuIdentityPoolId (\s a -> s { _iuIdentityPoolId = a })++-- | Date on which the identity was last modified.+iuLastModifiedDate :: Lens' IdentityUsage (Maybe UTCTime)+iuLastModifiedDate =+    lens _iuLastModifiedDate (\s a -> s { _iuLastModifiedDate = a })+        . mapping _Time++instance FromJSON IdentityUsage where+    parseJSON = withObject "IdentityUsage" $ \o -> IdentityUsage+        <$> o .:? "DataStorage"+        <*> o .:? "DatasetCount"+        <*> o .:? "IdentityId"+        <*> o .:? "IdentityPoolId"+        <*> o .:? "LastModifiedDate"++instance ToJSON IdentityUsage where+    toJSON IdentityUsage{..} = object+        [ "IdentityId"       .= _iuIdentityId+        , "IdentityPoolId"   .= _iuIdentityPoolId+        , "LastModifiedDate" .= _iuLastModifiedDate+        , "DatasetCount"     .= _iuDatasetCount+        , "DataStorage"      .= _iuDataStorage+        ]++data RecordPatch = RecordPatch+    { _rpDeviceLastModifiedDate :: Maybe RFC822+    , _rpKey                    :: Text+    , _rpOp                     :: Text+    , _rpSyncCount              :: Integer+    , _rpValue                  :: Maybe Text+    } deriving (Eq, Ord, Show)++-- | 'RecordPatch' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'rpDeviceLastModifiedDate' @::@ 'Maybe' 'UTCTime'+--+-- * 'rpKey' @::@ 'Text'+--+-- * 'rpOp' @::@ 'Text'+--+-- * 'rpSyncCount' @::@ 'Integer'+--+-- * 'rpValue' @::@ 'Maybe' 'Text'+--+recordPatch :: Text -- ^ 'rpOp'+            -> Text -- ^ 'rpKey'+            -> Integer -- ^ 'rpSyncCount'+            -> RecordPatch+recordPatch p1 p2 p3 = RecordPatch+    { _rpOp                     = p1+    , _rpKey                    = p2+    , _rpSyncCount              = p3+    , _rpValue                  = Nothing+    , _rpDeviceLastModifiedDate = Nothing+    }++-- | The last modified date of the client device.+rpDeviceLastModifiedDate :: Lens' RecordPatch (Maybe UTCTime)+rpDeviceLastModifiedDate =+    lens _rpDeviceLastModifiedDate+        (\s a -> s { _rpDeviceLastModifiedDate = a })+            . mapping _Time++-- | The key associated with the record patch.+rpKey :: Lens' RecordPatch Text+rpKey = lens _rpKey (\s a -> s { _rpKey = a })++-- | An operation, either replace or remove.+rpOp :: Lens' RecordPatch Text+rpOp = lens _rpOp (\s a -> s { _rpOp = a })++-- | Last known server sync count for this record. Set to 0 if unknown.+rpSyncCount :: Lens' RecordPatch Integer+rpSyncCount = lens _rpSyncCount (\s a -> s { _rpSyncCount = a })++-- | The value associated with the record patch.+rpValue :: Lens' RecordPatch (Maybe Text)+rpValue = lens _rpValue (\s a -> s { _rpValue = a })++instance FromJSON RecordPatch where+    parseJSON = withObject "RecordPatch" $ \o -> RecordPatch+        <$> o .:? "DeviceLastModifiedDate"+        <*> o .:  "Key"+        <*> o .:  "Op"+        <*> o .:  "SyncCount"+        <*> o .:? "Value"++instance ToJSON RecordPatch where+    toJSON RecordPatch{..} = object+        [ "Op"                     .= _rpOp+        , "Key"                    .= _rpKey+        , "Value"                  .= _rpValue+        , "SyncCount"              .= _rpSyncCount+        , "DeviceLastModifiedDate" .= _rpDeviceLastModifiedDate+        ]++data PushSync = PushSync+    { _psApplicationArns :: List "ApplicationArns" Text+    , _psRoleArn         :: Maybe Text+    } deriving (Eq, Ord, Show)++-- | 'PushSync' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'psApplicationArns' @::@ ['Text']+--+-- * 'psRoleArn' @::@ 'Maybe' 'Text'+--+pushSync :: PushSync+pushSync = PushSync+    { _psApplicationArns = mempty+    , _psRoleArn         = Nothing+    }++-- | List of SNS platform application ARNs that could be used by clients.+psApplicationArns :: Lens' PushSync [Text]+psApplicationArns =+    lens _psApplicationArns (\s a -> s { _psApplicationArns = a })+        . _List++-- | A role configured to allow Cognito to call SNS on behalf of the+-- developer.+psRoleArn :: Lens' PushSync (Maybe Text)+psRoleArn = lens _psRoleArn (\s a -> s { _psRoleArn = a })++instance FromJSON PushSync where+    parseJSON = withObject "PushSync" $ \o -> PushSync+        <$> o .:  "ApplicationArns"+        <*> o .:? "RoleArn"++instance ToJSON PushSync where+    toJSON PushSync{..} = object+        [ "ApplicationArns" .= _psApplicationArns+        , "RoleArn"         .= _psRoleArn+        ]
+ gen/Network/AWS/CognitoSync/UnsubscribeFromDataset.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.CognitoSync.UnsubscribeFromDataset+-- 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)++-- | Unsubscribe from receiving notifications when a dataset is modified by+-- another device.+--+-- <http://docs.aws.amazon.com/cognitosync/latest/APIReference/API_UnsubscribeFromDataset.html>+module Network.AWS.CognitoSync.UnsubscribeFromDataset+    (+    -- * Request+      UnsubscribeFromDataset+    -- ** Request constructor+    , unsubscribeFromDataset+    -- ** Request lenses+    , ufdDatasetName+    , ufdDeviceId+    , ufdIdentityId+    , ufdIdentityPoolId++    -- * Response+    , UnsubscribeFromDatasetResponse+    -- ** Response constructor+    , unsubscribeFromDatasetResponse+    ) where++import Network.AWS.Prelude+import Network.AWS.Request.RestJSON+import Network.AWS.CognitoSync.Types+import qualified GHC.Exts++data UnsubscribeFromDataset = UnsubscribeFromDataset+    { _ufdDatasetName    :: Text+    , _ufdDeviceId       :: Text+    , _ufdIdentityId     :: Text+    , _ufdIdentityPoolId :: Text+    } deriving (Eq, Ord, Show)++-- | 'UnsubscribeFromDataset' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'ufdDatasetName' @::@ 'Text'+--+-- * 'ufdDeviceId' @::@ 'Text'+--+-- * 'ufdIdentityId' @::@ 'Text'+--+-- * 'ufdIdentityPoolId' @::@ 'Text'+--+unsubscribeFromDataset :: Text -- ^ 'ufdIdentityPoolId'+                       -> Text -- ^ 'ufdIdentityId'+                       -> Text -- ^ 'ufdDatasetName'+                       -> Text -- ^ 'ufdDeviceId'+                       -> UnsubscribeFromDataset+unsubscribeFromDataset p1 p2 p3 p4 = UnsubscribeFromDataset+    { _ufdIdentityPoolId = p1+    , _ufdIdentityId     = p2+    , _ufdDatasetName    = p3+    , _ufdDeviceId       = p4+    }++-- | The name of the dataset from which to unsubcribe.+ufdDatasetName :: Lens' UnsubscribeFromDataset Text+ufdDatasetName = lens _ufdDatasetName (\s a -> s { _ufdDatasetName = a })++-- | The unique ID generated for this device by Cognito.+ufdDeviceId :: Lens' UnsubscribeFromDataset Text+ufdDeviceId = lens _ufdDeviceId (\s a -> s { _ufdDeviceId = a })++-- | Unique ID for this identity.+ufdIdentityId :: Lens' UnsubscribeFromDataset Text+ufdIdentityId = lens _ufdIdentityId (\s a -> s { _ufdIdentityId = a })++-- | A name-spaced GUID (for example,+-- us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon+-- Cognito. The ID of the pool to which this identity belongs.+ufdIdentityPoolId :: Lens' UnsubscribeFromDataset Text+ufdIdentityPoolId =+    lens _ufdIdentityPoolId (\s a -> s { _ufdIdentityPoolId = a })++data UnsubscribeFromDatasetResponse = UnsubscribeFromDatasetResponse+    deriving (Eq, Ord, Show, Generic)++-- | 'UnsubscribeFromDatasetResponse' constructor.+unsubscribeFromDatasetResponse :: UnsubscribeFromDatasetResponse+unsubscribeFromDatasetResponse = UnsubscribeFromDatasetResponse++instance ToPath UnsubscribeFromDataset where+    toPath UnsubscribeFromDataset{..} = mconcat+        [ "/identitypools/"+        , toText _ufdIdentityPoolId+        , "/identities/"+        , toText _ufdIdentityId+        , "/datasets/"+        , toText _ufdDatasetName+        , "/subscriptions/"+        , toText _ufdDeviceId+        ]++instance ToQuery UnsubscribeFromDataset where+    toQuery = const mempty++instance ToHeaders UnsubscribeFromDataset++instance ToJSON UnsubscribeFromDataset where+    toJSON = const (toJSON Empty)++instance AWSRequest UnsubscribeFromDataset where+    type Sv UnsubscribeFromDataset = CognitoSync+    type Rs UnsubscribeFromDataset = UnsubscribeFromDatasetResponse++    request  = delete+    response = nullResponse UnsubscribeFromDatasetResponse
+ gen/Network/AWS/CognitoSync/UpdateRecords.hs view
@@ -0,0 +1,197 @@+{-# 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.CognitoSync.UpdateRecords+-- 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)++-- | Posts updates to records and add and delete records for a dataset and user.+-- The credentials used to make this API call need to have access to the+-- identity data. With Amazon Cognito Sync, each identity has access only to+-- its own data. You should use Amazon Cognito Identity service to retrieve+-- the credentials necessary to make this API call.+--+-- <http://docs.aws.amazon.com/cognitosync/latest/APIReference/API_UpdateRecords.html>+module Network.AWS.CognitoSync.UpdateRecords+    (+    -- * Request+      UpdateRecords+    -- ** Request constructor+    , updateRecords+    -- ** Request lenses+    , urClientContext+    , urDatasetName+    , urDeviceId+    , urIdentityId+    , urIdentityPoolId+    , urRecordPatches+    , urSyncSessionToken++    -- * Response+    , UpdateRecordsResponse+    -- ** Response constructor+    , updateRecordsResponse+    -- ** Response lenses+    , urrRecords+    ) where++import Network.AWS.Prelude+import Network.AWS.Request.RestJSON+import Network.AWS.CognitoSync.Types+import qualified GHC.Exts++data UpdateRecords = UpdateRecords+    { _urClientContext    :: Maybe Text+    , _urDatasetName      :: Text+    , _urDeviceId         :: Maybe Text+    , _urIdentityId       :: Text+    , _urIdentityPoolId   :: Text+    , _urRecordPatches    :: List "RecordPatches" RecordPatch+    , _urSyncSessionToken :: Text+    } deriving (Eq, Show)++-- | 'UpdateRecords' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'urClientContext' @::@ 'Maybe' 'Text'+--+-- * 'urDatasetName' @::@ 'Text'+--+-- * 'urDeviceId' @::@ 'Maybe' 'Text'+--+-- * 'urIdentityId' @::@ 'Text'+--+-- * 'urIdentityPoolId' @::@ 'Text'+--+-- * 'urRecordPatches' @::@ ['RecordPatch']+--+-- * 'urSyncSessionToken' @::@ 'Text'+--+updateRecords :: Text -- ^ 'urIdentityPoolId'+              -> Text -- ^ 'urIdentityId'+              -> Text -- ^ 'urDatasetName'+              -> Text -- ^ 'urSyncSessionToken'+              -> UpdateRecords+updateRecords p1 p2 p3 p4 = UpdateRecords+    { _urIdentityPoolId   = p1+    , _urIdentityId       = p2+    , _urDatasetName      = p3+    , _urSyncSessionToken = p4+    , _urDeviceId         = Nothing+    , _urRecordPatches    = mempty+    , _urClientContext    = Nothing+    }++-- | Intended to supply a device ID that will populate the lastModifiedBy+-- field referenced in other methods. The ClientContext field is not yet+-- implemented.+urClientContext :: Lens' UpdateRecords (Maybe Text)+urClientContext = lens _urClientContext (\s a -> s { _urClientContext = a })++-- | A string of up to 128 characters. Allowed characters are a-z, A-Z, 0-9,+-- '_' (underscore), '-' (dash), and '.' (dot).+urDatasetName :: Lens' UpdateRecords Text+urDatasetName = lens _urDatasetName (\s a -> s { _urDatasetName = a })++-- | The unique ID generated for this device by Cognito.+urDeviceId :: Lens' UpdateRecords (Maybe Text)+urDeviceId = lens _urDeviceId (\s a -> s { _urDeviceId = a })++-- | A name-spaced GUID (for example,+-- us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon+-- Cognito. GUID generation is unique within a region.+urIdentityId :: Lens' UpdateRecords Text+urIdentityId = lens _urIdentityId (\s a -> s { _urIdentityId = a })++-- | A name-spaced GUID (for example,+-- us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon+-- Cognito. GUID generation is unique within a region.+urIdentityPoolId :: Lens' UpdateRecords Text+urIdentityPoolId = lens _urIdentityPoolId (\s a -> s { _urIdentityPoolId = a })++-- | A list of patch operations.+urRecordPatches :: Lens' UpdateRecords [RecordPatch]+urRecordPatches = lens _urRecordPatches (\s a -> s { _urRecordPatches = a }) . _List++-- | The SyncSessionToken returned by a previous call to ListRecords for this+-- dataset and identity.+urSyncSessionToken :: Lens' UpdateRecords Text+urSyncSessionToken =+    lens _urSyncSessionToken (\s a -> s { _urSyncSessionToken = a })++newtype UpdateRecordsResponse = UpdateRecordsResponse+    { _urrRecords :: List "Records" Record+    } deriving (Eq, Show, Monoid, Semigroup)++instance GHC.Exts.IsList UpdateRecordsResponse where+    type Item UpdateRecordsResponse = Record++    fromList = UpdateRecordsResponse . GHC.Exts.fromList+    toList   = GHC.Exts.toList . _urrRecords++-- | 'UpdateRecordsResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'urrRecords' @::@ ['Record']+--+updateRecordsResponse :: UpdateRecordsResponse+updateRecordsResponse = UpdateRecordsResponse+    { _urrRecords = mempty+    }++-- | A list of records that have been updated.+urrRecords :: Lens' UpdateRecordsResponse [Record]+urrRecords = lens _urrRecords (\s a -> s { _urrRecords = a }) . _List++instance ToPath UpdateRecords where+    toPath UpdateRecords{..} = mconcat+        [ "/identitypools/"+        , toText _urIdentityPoolId+        , "/identities/"+        , toText _urIdentityId+        , "/datasets/"+        , toText _urDatasetName+        ]++instance ToQuery UpdateRecords where+    toQuery = const mempty++instance ToHeaders UpdateRecords where+    toHeaders UpdateRecords{..} = mconcat+        [ "x-amz-Client-Context" =: _urClientContext+        ]++instance ToJSON UpdateRecords where+    toJSON UpdateRecords{..} = object+        [ "DeviceId"         .= _urDeviceId+        , "RecordPatches"    .= _urRecordPatches+        , "SyncSessionToken" .= _urSyncSessionToken+        ]++instance AWSRequest UpdateRecords where+    type Sv UpdateRecords = CognitoSync+    type Rs UpdateRecords = UpdateRecordsResponse++    request  = post+    response = jsonResponse++instance FromJSON UpdateRecordsResponse where+    parseJSON = withObject "UpdateRecordsResponse" $ \o -> UpdateRecordsResponse+        <$> o .:  "Records"