packages feed

amazonka-cognito-identity (empty) → 0.0.0

raw patch · 19 files changed

+2832/−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 Identity 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 is a web service that facilitates the delivery of scoped, temporary credentials to mobile devices or other untrusted environments. Amazon Cognito uniquely identifies a device or user and supplies the user with a consistent identity throughout the lifetime of an application. Amazon Cognito lets users authenticate with third-party identity providers (Facebook, Google, or Login with Amazon). As a developer, you decide which identity providers to trust. You can also choose to support unauthenticated access from your application. Your users are provided with Cognito tokens that uniquely identify their device and any information provided about third-party logins.++Documentation is available via [Hackage](http://hackage.haskell.org/package/amazonka-cognito-identity)+and [AWS API Reference](http://docs.aws.amazon.com/cognitoidentity/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-identity` 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-identity.cabal view
@@ -0,0 +1,63 @@+name:                  amazonka-cognito-identity+version:               0.0.0+synopsis:              Amazon Cognito Identity 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 is a web service that facilitates the delivery of+    scoped, temporary credentials to mobile devices or other untrusted+    environments. Amazon Cognito uniquely identifies a device or user and+    supplies the user with a consistent identity throughout the lifetime of+    an application. Amazon Cognito lets users authenticate with third-party+    identity providers (Facebook, Google, or Login with Amazon). As a+    developer, you decide which identity providers to trust. You can also+    choose to support unauthenticated access from your application. Your+    users are provided with Cognito tokens that uniquely identify their+    device and any information provided about third-party logins.+    .+    /See:/ <http://docs.aws.amazon.com/cognitoidentity/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.CognitoIdentity+        , Network.AWS.CognitoIdentity.CreateIdentityPool+        , Network.AWS.CognitoIdentity.DeleteIdentityPool+        , Network.AWS.CognitoIdentity.DescribeIdentityPool+        , Network.AWS.CognitoIdentity.GetId+        , Network.AWS.CognitoIdentity.GetOpenIdToken+        , Network.AWS.CognitoIdentity.GetOpenIdTokenForDeveloperIdentity+        , Network.AWS.CognitoIdentity.ListIdentities+        , Network.AWS.CognitoIdentity.ListIdentityPools+        , Network.AWS.CognitoIdentity.LookupDeveloperIdentity+        , Network.AWS.CognitoIdentity.MergeDeveloperIdentities+        , Network.AWS.CognitoIdentity.Types+        , Network.AWS.CognitoIdentity.UnlinkDeveloperIdentity+        , Network.AWS.CognitoIdentity.UnlinkIdentity+        , Network.AWS.CognitoIdentity.UpdateIdentityPool++    other-modules:++    build-depends:+          amazonka-core+        , base          >= 4.7 && < 5
+ gen/Network/AWS/CognitoIdentity.hs view
@@ -0,0 +1,51 @@+-- Module      : Network.AWS.CognitoIdentity+-- 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 is a web service that facilitates the delivery of scoped,+-- temporary credentials to mobile devices or other untrusted environments.+-- Amazon Cognito uniquely identifies a device or user and supplies the user+-- with a consistent identity throughout the lifetime of an application.+-- Amazon Cognito lets users authenticate with third-party identity providers+-- (Facebook, Google, or Login with Amazon). As a developer, you decide which+-- identity providers to trust. You can also choose to support unauthenticated+-- access from your application. Your users are provided with Cognito tokens+-- that uniquely identify their device and any information provided about+-- third-party logins.+module Network.AWS.CognitoIdentity+    ( module Network.AWS.CognitoIdentity.CreateIdentityPool+    , module Network.AWS.CognitoIdentity.DeleteIdentityPool+    , module Network.AWS.CognitoIdentity.DescribeIdentityPool+    , module Network.AWS.CognitoIdentity.GetId+    , module Network.AWS.CognitoIdentity.GetOpenIdToken+    , module Network.AWS.CognitoIdentity.GetOpenIdTokenForDeveloperIdentity+    , module Network.AWS.CognitoIdentity.ListIdentities+    , module Network.AWS.CognitoIdentity.ListIdentityPools+    , module Network.AWS.CognitoIdentity.LookupDeveloperIdentity+    , module Network.AWS.CognitoIdentity.MergeDeveloperIdentities+    , module Network.AWS.CognitoIdentity.Types+    , module Network.AWS.CognitoIdentity.UnlinkDeveloperIdentity+    , module Network.AWS.CognitoIdentity.UnlinkIdentity+    , module Network.AWS.CognitoIdentity.UpdateIdentityPool+    ) where++import Network.AWS.CognitoIdentity.CreateIdentityPool+import Network.AWS.CognitoIdentity.DeleteIdentityPool+import Network.AWS.CognitoIdentity.DescribeIdentityPool+import Network.AWS.CognitoIdentity.GetId+import Network.AWS.CognitoIdentity.GetOpenIdToken+import Network.AWS.CognitoIdentity.GetOpenIdTokenForDeveloperIdentity+import Network.AWS.CognitoIdentity.ListIdentities+import Network.AWS.CognitoIdentity.ListIdentityPools+import Network.AWS.CognitoIdentity.LookupDeveloperIdentity+import Network.AWS.CognitoIdentity.MergeDeveloperIdentities+import Network.AWS.CognitoIdentity.Types+import Network.AWS.CognitoIdentity.UnlinkDeveloperIdentity+import Network.AWS.CognitoIdentity.UnlinkIdentity+import Network.AWS.CognitoIdentity.UpdateIdentityPool
+ gen/Network/AWS/CognitoIdentity/CreateIdentityPool.hs view
@@ -0,0 +1,231 @@+{-# 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.CognitoIdentity.CreateIdentityPool+-- 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)++-- | Creates a new identity pool. The identity pool is a store of user identity+-- information that is specific to your AWS account. The limit on identity+-- pools is 60 per account.+--+-- <http://docs.aws.amazon.com/cognitoidentity/latest/APIReference/API_CreateIdentityPool.html>+module Network.AWS.CognitoIdentity.CreateIdentityPool+    (+    -- * Request+      CreateIdentityPool+    -- ** Request constructor+    , createIdentityPool+    -- ** Request lenses+    , cipAllowUnauthenticatedIdentities+    , cipDeveloperProviderName+    , cipIdentityPoolName+    , cipOpenIdConnectProviderARNs+    , cipSupportedLoginProviders++    -- * Response+    , CreateIdentityPoolResponse+    -- ** Response constructor+    , createIdentityPoolResponse+    -- ** Response lenses+    , ciprAllowUnauthenticatedIdentities+    , ciprDeveloperProviderName+    , ciprIdentityPoolId+    , ciprIdentityPoolName+    , ciprOpenIdConnectProviderARNs+    , ciprSupportedLoginProviders+    ) where++import Network.AWS.Prelude+import Network.AWS.Request.JSON+import Network.AWS.CognitoIdentity.Types+import qualified GHC.Exts++data CreateIdentityPool = CreateIdentityPool+    { _cipAllowUnauthenticatedIdentities :: Bool+    , _cipDeveloperProviderName          :: Maybe Text+    , _cipIdentityPoolName               :: Text+    , _cipOpenIdConnectProviderARNs      :: List "OpenIdConnectProviderARNs" Text+    , _cipSupportedLoginProviders        :: Map Text Text+    } deriving (Eq, Show)++-- | 'CreateIdentityPool' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'cipAllowUnauthenticatedIdentities' @::@ 'Bool'+--+-- * 'cipDeveloperProviderName' @::@ 'Maybe' 'Text'+--+-- * 'cipIdentityPoolName' @::@ 'Text'+--+-- * 'cipOpenIdConnectProviderARNs' @::@ ['Text']+--+-- * 'cipSupportedLoginProviders' @::@ 'HashMap' 'Text' 'Text'+--+createIdentityPool :: Text -- ^ 'cipIdentityPoolName'+                   -> Bool -- ^ 'cipAllowUnauthenticatedIdentities'+                   -> CreateIdentityPool+createIdentityPool p1 p2 = CreateIdentityPool+    { _cipIdentityPoolName               = p1+    , _cipAllowUnauthenticatedIdentities = p2+    , _cipSupportedLoginProviders        = mempty+    , _cipDeveloperProviderName          = Nothing+    , _cipOpenIdConnectProviderARNs      = mempty+    }++-- | TRUE if the identity pool supports unauthenticated logins.+cipAllowUnauthenticatedIdentities :: Lens' CreateIdentityPool Bool+cipAllowUnauthenticatedIdentities =+    lens _cipAllowUnauthenticatedIdentities+        (\s a -> s { _cipAllowUnauthenticatedIdentities = a })++-- | The "domain" by which Cognito will refer to your users. This name acts as+-- a placeholder that allows your backend and the Cognito service to+-- communicate about the developer provider. For the DeveloperProviderName,+-- you can use letters as well as period (.), underscore (_), and dash (-).+-- Once you have set a developer provider name, you cannot change it. Please+-- take care in setting this parameter.+cipDeveloperProviderName :: Lens' CreateIdentityPool (Maybe Text)+cipDeveloperProviderName =+    lens _cipDeveloperProviderName+        (\s a -> s { _cipDeveloperProviderName = a })++-- | A string that you provide.+cipIdentityPoolName :: Lens' CreateIdentityPool Text+cipIdentityPoolName =+    lens _cipIdentityPoolName (\s a -> s { _cipIdentityPoolName = a })++cipOpenIdConnectProviderARNs :: Lens' CreateIdentityPool [Text]+cipOpenIdConnectProviderARNs =+    lens _cipOpenIdConnectProviderARNs+        (\s a -> s { _cipOpenIdConnectProviderARNs = a })+            . _List++-- | Optional key:value pairs mapping provider names to provider app IDs.+cipSupportedLoginProviders :: Lens' CreateIdentityPool (HashMap Text Text)+cipSupportedLoginProviders =+    lens _cipSupportedLoginProviders+        (\s a -> s { _cipSupportedLoginProviders = a })+            . _Map++data CreateIdentityPoolResponse = CreateIdentityPoolResponse+    { _ciprAllowUnauthenticatedIdentities :: Bool+    , _ciprDeveloperProviderName          :: Maybe Text+    , _ciprIdentityPoolId                 :: Text+    , _ciprIdentityPoolName               :: Text+    , _ciprOpenIdConnectProviderARNs      :: List "OpenIdConnectProviderARNs" Text+    , _ciprSupportedLoginProviders        :: Map Text Text+    } deriving (Eq, Show)++-- | 'CreateIdentityPoolResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'ciprAllowUnauthenticatedIdentities' @::@ 'Bool'+--+-- * 'ciprDeveloperProviderName' @::@ 'Maybe' 'Text'+--+-- * 'ciprIdentityPoolId' @::@ 'Text'+--+-- * 'ciprIdentityPoolName' @::@ 'Text'+--+-- * 'ciprOpenIdConnectProviderARNs' @::@ ['Text']+--+-- * 'ciprSupportedLoginProviders' @::@ 'HashMap' 'Text' 'Text'+--+createIdentityPoolResponse :: Text -- ^ 'ciprIdentityPoolId'+                           -> Text -- ^ 'ciprIdentityPoolName'+                           -> Bool -- ^ 'ciprAllowUnauthenticatedIdentities'+                           -> CreateIdentityPoolResponse+createIdentityPoolResponse p1 p2 p3 = CreateIdentityPoolResponse+    { _ciprIdentityPoolId                 = p1+    , _ciprIdentityPoolName               = p2+    , _ciprAllowUnauthenticatedIdentities = p3+    , _ciprSupportedLoginProviders        = mempty+    , _ciprDeveloperProviderName          = Nothing+    , _ciprOpenIdConnectProviderARNs      = mempty+    }++-- | TRUE if the identity pool supports unauthenticated logins.+ciprAllowUnauthenticatedIdentities :: Lens' CreateIdentityPoolResponse Bool+ciprAllowUnauthenticatedIdentities =+    lens _ciprAllowUnauthenticatedIdentities+        (\s a -> s { _ciprAllowUnauthenticatedIdentities = a })++-- | The "domain" by which Cognito will refer to your users.+ciprDeveloperProviderName :: Lens' CreateIdentityPoolResponse (Maybe Text)+ciprDeveloperProviderName =+    lens _ciprDeveloperProviderName+        (\s a -> s { _ciprDeveloperProviderName = a })++-- | An identity pool ID in the format REGION:GUID.+ciprIdentityPoolId :: Lens' CreateIdentityPoolResponse Text+ciprIdentityPoolId =+    lens _ciprIdentityPoolId (\s a -> s { _ciprIdentityPoolId = a })++-- | A string that you provide.+ciprIdentityPoolName :: Lens' CreateIdentityPoolResponse Text+ciprIdentityPoolName =+    lens _ciprIdentityPoolName (\s a -> s { _ciprIdentityPoolName = a })++ciprOpenIdConnectProviderARNs :: Lens' CreateIdentityPoolResponse [Text]+ciprOpenIdConnectProviderARNs =+    lens _ciprOpenIdConnectProviderARNs+        (\s a -> s { _ciprOpenIdConnectProviderARNs = a })+            . _List++-- | Optional key:value pairs mapping provider names to provider app IDs.+ciprSupportedLoginProviders :: Lens' CreateIdentityPoolResponse (HashMap Text Text)+ciprSupportedLoginProviders =+    lens _ciprSupportedLoginProviders+        (\s a -> s { _ciprSupportedLoginProviders = a })+            . _Map++instance ToPath CreateIdentityPool where+    toPath = const "/"++instance ToQuery CreateIdentityPool where+    toQuery = const mempty++instance ToHeaders CreateIdentityPool++instance ToJSON CreateIdentityPool where+    toJSON CreateIdentityPool{..} = object+        [ "IdentityPoolName"               .= _cipIdentityPoolName+        , "AllowUnauthenticatedIdentities" .= _cipAllowUnauthenticatedIdentities+        , "SupportedLoginProviders"        .= _cipSupportedLoginProviders+        , "DeveloperProviderName"          .= _cipDeveloperProviderName+        , "OpenIdConnectProviderARNs"      .= _cipOpenIdConnectProviderARNs+        ]++instance AWSRequest CreateIdentityPool where+    type Sv CreateIdentityPool = CognitoIdentity+    type Rs CreateIdentityPool = CreateIdentityPoolResponse++    request  = post "CreateIdentityPool"+    response = jsonResponse++instance FromJSON CreateIdentityPoolResponse where+    parseJSON = withObject "CreateIdentityPoolResponse" $ \o -> CreateIdentityPoolResponse+        <$> o .:  "AllowUnauthenticatedIdentities"+        <*> o .:? "DeveloperProviderName"+        <*> o .:  "IdentityPoolId"+        <*> o .:  "IdentityPoolName"+        <*> o .:  "OpenIdConnectProviderARNs"+        <*> o .:  "SupportedLoginProviders"
+ gen/Network/AWS/CognitoIdentity/DeleteIdentityPool.hs view
@@ -0,0 +1,93 @@+{-# 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.CognitoIdentity.DeleteIdentityPool+-- 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 a user pool. Once a pool is deleted, users will not be able to+-- authenticate with the pool.+--+-- <http://docs.aws.amazon.com/cognitoidentity/latest/APIReference/API_DeleteIdentityPool.html>+module Network.AWS.CognitoIdentity.DeleteIdentityPool+    (+    -- * Request+      DeleteIdentityPool+    -- ** Request constructor+    , deleteIdentityPool+    -- ** Request lenses+    , dip1IdentityPoolId++    -- * Response+    , DeleteIdentityPoolResponse+    -- ** Response constructor+    , deleteIdentityPoolResponse+    ) where++import Network.AWS.Prelude+import Network.AWS.Request.JSON+import Network.AWS.CognitoIdentity.Types+import qualified GHC.Exts++newtype DeleteIdentityPool = DeleteIdentityPool+    { _dip1IdentityPoolId :: Text+    } deriving (Eq, Ord, Show, Monoid, IsString)++-- | 'DeleteIdentityPool' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'dip1IdentityPoolId' @::@ 'Text'+--+deleteIdentityPool :: Text -- ^ 'dip1IdentityPoolId'+                   -> DeleteIdentityPool+deleteIdentityPool p1 = DeleteIdentityPool+    { _dip1IdentityPoolId = p1+    }++-- | An identity pool ID in the format REGION:GUID.+dip1IdentityPoolId :: Lens' DeleteIdentityPool Text+dip1IdentityPoolId =+    lens _dip1IdentityPoolId (\s a -> s { _dip1IdentityPoolId = a })++data DeleteIdentityPoolResponse = DeleteIdentityPoolResponse+    deriving (Eq, Ord, Show, Generic)++-- | 'DeleteIdentityPoolResponse' constructor.+deleteIdentityPoolResponse :: DeleteIdentityPoolResponse+deleteIdentityPoolResponse = DeleteIdentityPoolResponse++instance ToPath DeleteIdentityPool where+    toPath = const "/"++instance ToQuery DeleteIdentityPool where+    toQuery = const mempty++instance ToHeaders DeleteIdentityPool++instance ToJSON DeleteIdentityPool where+    toJSON DeleteIdentityPool{..} = object+        [ "IdentityPoolId" .= _dip1IdentityPoolId+        ]++instance AWSRequest DeleteIdentityPool where+    type Sv DeleteIdentityPool = CognitoIdentity+    type Rs DeleteIdentityPool = DeleteIdentityPoolResponse++    request  = post "DeleteIdentityPool"+    response = nullResponse DeleteIdentityPoolResponse
+ gen/Network/AWS/CognitoIdentity/DescribeIdentityPool.hs view
@@ -0,0 +1,175 @@+{-# LANGUAGE DataKinds                   #-}+{-# LANGUAGE DeriveGeneric               #-}+{-# LANGUAGE FlexibleInstances           #-}+{-# LANGUAGE GeneralizedNewtypeDeriving  #-}+{-# LANGUAGE LambdaCase                  #-}+{-# LANGUAGE NoImplicitPrelude           #-}+{-# LANGUAGE OverloadedStrings           #-}+{-# LANGUAGE RecordWildCards             #-}+{-# LANGUAGE TypeFamilies                #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Module      : Network.AWS.CognitoIdentity.DescribeIdentityPool+-- 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 details about a particular identity pool, including the pool name, ID+-- description, creation date, and current number of users.+--+-- <http://docs.aws.amazon.com/cognitoidentity/latest/APIReference/API_DescribeIdentityPool.html>+module Network.AWS.CognitoIdentity.DescribeIdentityPool+    (+    -- * Request+      DescribeIdentityPool+    -- ** Request constructor+    , describeIdentityPool+    -- ** Request lenses+    , dipIdentityPoolId++    -- * Response+    , DescribeIdentityPoolResponse+    -- ** Response constructor+    , describeIdentityPoolResponse+    -- ** Response lenses+    , diprAllowUnauthenticatedIdentities+    , diprDeveloperProviderName+    , diprIdentityPoolId+    , diprIdentityPoolName+    , diprOpenIdConnectProviderARNs+    , diprSupportedLoginProviders+    ) where++import Network.AWS.Prelude+import Network.AWS.Request.JSON+import Network.AWS.CognitoIdentity.Types+import qualified GHC.Exts++newtype DescribeIdentityPool = DescribeIdentityPool+    { _dipIdentityPoolId :: Text+    } deriving (Eq, Ord, Show, Monoid, IsString)++-- | 'DescribeIdentityPool' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'dipIdentityPoolId' @::@ 'Text'+--+describeIdentityPool :: Text -- ^ 'dipIdentityPoolId'+                     -> DescribeIdentityPool+describeIdentityPool p1 = DescribeIdentityPool+    { _dipIdentityPoolId = p1+    }++-- | An identity pool ID in the format REGION:GUID.+dipIdentityPoolId :: Lens' DescribeIdentityPool Text+dipIdentityPoolId =+    lens _dipIdentityPoolId (\s a -> s { _dipIdentityPoolId = a })++data DescribeIdentityPoolResponse = DescribeIdentityPoolResponse+    { _diprAllowUnauthenticatedIdentities :: Bool+    , _diprDeveloperProviderName          :: Maybe Text+    , _diprIdentityPoolId                 :: Text+    , _diprIdentityPoolName               :: Text+    , _diprOpenIdConnectProviderARNs      :: List "OpenIdConnectProviderARNs" Text+    , _diprSupportedLoginProviders        :: Map Text Text+    } deriving (Eq, Show)++-- | 'DescribeIdentityPoolResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'diprAllowUnauthenticatedIdentities' @::@ 'Bool'+--+-- * 'diprDeveloperProviderName' @::@ 'Maybe' 'Text'+--+-- * 'diprIdentityPoolId' @::@ 'Text'+--+-- * 'diprIdentityPoolName' @::@ 'Text'+--+-- * 'diprOpenIdConnectProviderARNs' @::@ ['Text']+--+-- * 'diprSupportedLoginProviders' @::@ 'HashMap' 'Text' 'Text'+--+describeIdentityPoolResponse :: Text -- ^ 'diprIdentityPoolId'+                             -> Text -- ^ 'diprIdentityPoolName'+                             -> Bool -- ^ 'diprAllowUnauthenticatedIdentities'+                             -> DescribeIdentityPoolResponse+describeIdentityPoolResponse p1 p2 p3 = DescribeIdentityPoolResponse+    { _diprIdentityPoolId                 = p1+    , _diprIdentityPoolName               = p2+    , _diprAllowUnauthenticatedIdentities = p3+    , _diprSupportedLoginProviders        = mempty+    , _diprDeveloperProviderName          = Nothing+    , _diprOpenIdConnectProviderARNs      = mempty+    }++-- | TRUE if the identity pool supports unauthenticated logins.+diprAllowUnauthenticatedIdentities :: Lens' DescribeIdentityPoolResponse Bool+diprAllowUnauthenticatedIdentities =+    lens _diprAllowUnauthenticatedIdentities+        (\s a -> s { _diprAllowUnauthenticatedIdentities = a })++-- | The "domain" by which Cognito will refer to your users.+diprDeveloperProviderName :: Lens' DescribeIdentityPoolResponse (Maybe Text)+diprDeveloperProviderName =+    lens _diprDeveloperProviderName+        (\s a -> s { _diprDeveloperProviderName = a })++-- | An identity pool ID in the format REGION:GUID.+diprIdentityPoolId :: Lens' DescribeIdentityPoolResponse Text+diprIdentityPoolId =+    lens _diprIdentityPoolId (\s a -> s { _diprIdentityPoolId = a })++-- | A string that you provide.+diprIdentityPoolName :: Lens' DescribeIdentityPoolResponse Text+diprIdentityPoolName =+    lens _diprIdentityPoolName (\s a -> s { _diprIdentityPoolName = a })++diprOpenIdConnectProviderARNs :: Lens' DescribeIdentityPoolResponse [Text]+diprOpenIdConnectProviderARNs =+    lens _diprOpenIdConnectProviderARNs+        (\s a -> s { _diprOpenIdConnectProviderARNs = a })+            . _List++-- | Optional key:value pairs mapping provider names to provider app IDs.+diprSupportedLoginProviders :: Lens' DescribeIdentityPoolResponse (HashMap Text Text)+diprSupportedLoginProviders =+    lens _diprSupportedLoginProviders+        (\s a -> s { _diprSupportedLoginProviders = a })+            . _Map++instance ToPath DescribeIdentityPool where+    toPath = const "/"++instance ToQuery DescribeIdentityPool where+    toQuery = const mempty++instance ToHeaders DescribeIdentityPool++instance ToJSON DescribeIdentityPool where+    toJSON DescribeIdentityPool{..} = object+        [ "IdentityPoolId" .= _dipIdentityPoolId+        ]++instance AWSRequest DescribeIdentityPool where+    type Sv DescribeIdentityPool = CognitoIdentity+    type Rs DescribeIdentityPool = DescribeIdentityPoolResponse++    request  = post "DescribeIdentityPool"+    response = jsonResponse++instance FromJSON DescribeIdentityPoolResponse where+    parseJSON = withObject "DescribeIdentityPoolResponse" $ \o -> DescribeIdentityPoolResponse+        <$> o .:  "AllowUnauthenticatedIdentities"+        <*> o .:? "DeveloperProviderName"+        <*> o .:  "IdentityPoolId"+        <*> o .:  "IdentityPoolName"+        <*> o .:  "OpenIdConnectProviderARNs"+        <*> o .:  "SupportedLoginProviders"
+ gen/Network/AWS/CognitoIdentity/GetId.hs view
@@ -0,0 +1,133 @@+{-# 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.CognitoIdentity.GetId+-- 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)++-- | Generates (or retrieves) a Cognito ID. Supplying multiple logins will+-- create an implicit linked account.+--+-- <http://docs.aws.amazon.com/cognitoidentity/latest/APIReference/API_GetId.html>+module Network.AWS.CognitoIdentity.GetId+    (+    -- * Request+      GetId+    -- ** Request constructor+    , getId+    -- ** Request lenses+    , giAccountId+    , giIdentityPoolId+    , giLogins++    -- * Response+    , GetIdResponse+    -- ** Response constructor+    , getIdResponse+    -- ** Response lenses+    , girIdentityId+    ) where++import Network.AWS.Prelude+import Network.AWS.Request.JSON+import Network.AWS.CognitoIdentity.Types+import qualified GHC.Exts++data GetId = GetId+    { _giAccountId      :: Text+    , _giIdentityPoolId :: Text+    , _giLogins         :: Map Text Text+    } deriving (Eq, Show)++-- | 'GetId' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'giAccountId' @::@ 'Text'+--+-- * 'giIdentityPoolId' @::@ 'Text'+--+-- * 'giLogins' @::@ 'HashMap' 'Text' 'Text'+--+getId :: Text -- ^ 'giAccountId'+      -> Text -- ^ 'giIdentityPoolId'+      -> GetId+getId p1 p2 = GetId+    { _giAccountId      = p1+    , _giIdentityPoolId = p2+    , _giLogins         = mempty+    }++-- | A standard AWS account ID (9+ digits).+giAccountId :: Lens' GetId Text+giAccountId = lens _giAccountId (\s a -> s { _giAccountId = a })++-- | An identity pool ID in the format REGION:GUID.+giIdentityPoolId :: Lens' GetId Text+giIdentityPoolId = lens _giIdentityPoolId (\s a -> s { _giIdentityPoolId = a })++-- | A set of optional name-value pairs that map provider names to provider+-- tokens. The available provider names for Logins are as follows: Facebook:+-- graph.facebook.com Google: accounts.google.com Amazon: www.amazon.com.+giLogins :: Lens' GetId (HashMap Text Text)+giLogins = lens _giLogins (\s a -> s { _giLogins = a }) . _Map++newtype GetIdResponse = GetIdResponse+    { _girIdentityId :: Maybe Text+    } deriving (Eq, Ord, Show, Monoid)++-- | 'GetIdResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'girIdentityId' @::@ 'Maybe' 'Text'+--+getIdResponse :: GetIdResponse+getIdResponse = GetIdResponse+    { _girIdentityId = Nothing+    }++-- | A unique identifier in the format REGION:GUID.+girIdentityId :: Lens' GetIdResponse (Maybe Text)+girIdentityId = lens _girIdentityId (\s a -> s { _girIdentityId = a })++instance ToPath GetId where+    toPath = const "/"++instance ToQuery GetId where+    toQuery = const mempty++instance ToHeaders GetId++instance ToJSON GetId where+    toJSON GetId{..} = object+        [ "AccountId"      .= _giAccountId+        , "IdentityPoolId" .= _giIdentityPoolId+        , "Logins"         .= _giLogins+        ]++instance AWSRequest GetId where+    type Sv GetId = CognitoIdentity+    type Rs GetId = GetIdResponse++    request  = post "GetId"+    response = jsonResponse++instance FromJSON GetIdResponse where+    parseJSON = withObject "GetIdResponse" $ \o -> GetIdResponse+        <$> o .:? "IdentityId"
+ gen/Network/AWS/CognitoIdentity/GetOpenIdToken.hs view
@@ -0,0 +1,134 @@+{-# 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.CognitoIdentity.GetOpenIdToken+-- 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 an OpenID token, using a known Cognito ID. This known Cognito ID is+-- returned by GetId. You can optionally add additional logins for the+-- identity. Supplying multiple logins creates an implicit link. The OpenId+-- token is valid for 15 minutes.+--+-- <http://docs.aws.amazon.com/cognitoidentity/latest/APIReference/API_GetOpenIdToken.html>+module Network.AWS.CognitoIdentity.GetOpenIdToken+    (+    -- * Request+      GetOpenIdToken+    -- ** Request constructor+    , getOpenIdToken+    -- ** Request lenses+    , goitIdentityId+    , goitLogins++    -- * Response+    , GetOpenIdTokenResponse+    -- ** Response constructor+    , getOpenIdTokenResponse+    -- ** Response lenses+    , goitrIdentityId+    , goitrToken+    ) where++import Network.AWS.Prelude+import Network.AWS.Request.JSON+import Network.AWS.CognitoIdentity.Types+import qualified GHC.Exts++data GetOpenIdToken = GetOpenIdToken+    { _goitIdentityId :: Text+    , _goitLogins     :: Map Text Text+    } deriving (Eq, Show)++-- | 'GetOpenIdToken' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'goitIdentityId' @::@ 'Text'+--+-- * 'goitLogins' @::@ 'HashMap' 'Text' 'Text'+--+getOpenIdToken :: Text -- ^ 'goitIdentityId'+               -> GetOpenIdToken+getOpenIdToken p1 = GetOpenIdToken+    { _goitIdentityId = p1+    , _goitLogins     = mempty+    }++-- | A unique identifier in the format REGION:GUID.+goitIdentityId :: Lens' GetOpenIdToken Text+goitIdentityId = lens _goitIdentityId (\s a -> s { _goitIdentityId = a })++-- | A set of optional name-value pairs that map provider names to provider+-- tokens.+goitLogins :: Lens' GetOpenIdToken (HashMap Text Text)+goitLogins = lens _goitLogins (\s a -> s { _goitLogins = a }) . _Map++data GetOpenIdTokenResponse = GetOpenIdTokenResponse+    { _goitrIdentityId :: Maybe Text+    , _goitrToken      :: Maybe Text+    } deriving (Eq, Ord, Show)++-- | 'GetOpenIdTokenResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'goitrIdentityId' @::@ 'Maybe' 'Text'+--+-- * 'goitrToken' @::@ 'Maybe' 'Text'+--+getOpenIdTokenResponse :: GetOpenIdTokenResponse+getOpenIdTokenResponse = GetOpenIdTokenResponse+    { _goitrIdentityId = Nothing+    , _goitrToken      = Nothing+    }++-- | A unique identifier in the format REGION:GUID. Note that the IdentityId+-- returned may not match the one passed on input.+goitrIdentityId :: Lens' GetOpenIdTokenResponse (Maybe Text)+goitrIdentityId = lens _goitrIdentityId (\s a -> s { _goitrIdentityId = a })++-- | An OpenID token, valid for 15 minutes.+goitrToken :: Lens' GetOpenIdTokenResponse (Maybe Text)+goitrToken = lens _goitrToken (\s a -> s { _goitrToken = a })++instance ToPath GetOpenIdToken where+    toPath = const "/"++instance ToQuery GetOpenIdToken where+    toQuery = const mempty++instance ToHeaders GetOpenIdToken++instance ToJSON GetOpenIdToken where+    toJSON GetOpenIdToken{..} = object+        [ "IdentityId" .= _goitIdentityId+        , "Logins"     .= _goitLogins+        ]++instance AWSRequest GetOpenIdToken where+    type Sv GetOpenIdToken = CognitoIdentity+    type Rs GetOpenIdToken = GetOpenIdTokenResponse++    request  = post "GetOpenIdToken"+    response = jsonResponse++instance FromJSON GetOpenIdTokenResponse where+    parseJSON = withObject "GetOpenIdTokenResponse" $ \o -> GetOpenIdTokenResponse+        <$> o .:? "IdentityId"+        <*> o .:? "Token"
+ gen/Network/AWS/CognitoIdentity/GetOpenIdTokenForDeveloperIdentity.hs view
@@ -0,0 +1,182 @@+{-# 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.CognitoIdentity.GetOpenIdTokenForDeveloperIdentity+-- 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 (or retrieves) a Cognito IdentityId and an OpenID Connect token+-- for a user authenticated by your backend authentication process. Supplying+-- multiple logins will create an implicit linked account. You can only+-- specify one developer provider as part of the Logins map, which is linked+-- to the identity pool. The developer provider is the "domain" by which+-- Cognito will refer to your users. You can use+-- GetOpenIdTokenForDeveloperIdentity to create a new identity and to link new+-- logins (that is, user credentials issued by a public provider or developer+-- provider) to an existing identity. When you want to create a new identity,+-- the IdentityId should be null. When you want to associate a new login with+-- an existing authenticated/unauthenticated identity, you can do so by+-- providing the existing IdentityId. This API will create the identity in the+-- specified IdentityPoolId.+--+-- <http://docs.aws.amazon.com/cognitoidentity/latest/APIReference/API_GetOpenIdTokenForDeveloperIdentity.html>+module Network.AWS.CognitoIdentity.GetOpenIdTokenForDeveloperIdentity+    (+    -- * Request+      GetOpenIdTokenForDeveloperIdentity+    -- ** Request constructor+    , getOpenIdTokenForDeveloperIdentity+    -- ** Request lenses+    , goitfdiIdentityId+    , goitfdiIdentityPoolId+    , goitfdiLogins+    , goitfdiTokenDuration++    -- * Response+    , GetOpenIdTokenForDeveloperIdentityResponse+    -- ** Response constructor+    , getOpenIdTokenForDeveloperIdentityResponse+    -- ** Response lenses+    , goitfdirIdentityId+    , goitfdirToken+    ) where++import Network.AWS.Prelude+import Network.AWS.Request.JSON+import Network.AWS.CognitoIdentity.Types+import qualified GHC.Exts++data GetOpenIdTokenForDeveloperIdentity = GetOpenIdTokenForDeveloperIdentity+    { _goitfdiIdentityId     :: Maybe Text+    , _goitfdiIdentityPoolId :: Text+    , _goitfdiLogins         :: Map Text Text+    , _goitfdiTokenDuration  :: Maybe Nat+    } deriving (Eq, Show)++-- | 'GetOpenIdTokenForDeveloperIdentity' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'goitfdiIdentityId' @::@ 'Maybe' 'Text'+--+-- * 'goitfdiIdentityPoolId' @::@ 'Text'+--+-- * 'goitfdiLogins' @::@ 'HashMap' 'Text' 'Text'+--+-- * 'goitfdiTokenDuration' @::@ 'Maybe' 'Natural'+--+getOpenIdTokenForDeveloperIdentity :: Text -- ^ 'goitfdiIdentityPoolId'+                                   -> GetOpenIdTokenForDeveloperIdentity+getOpenIdTokenForDeveloperIdentity p1 = GetOpenIdTokenForDeveloperIdentity+    { _goitfdiIdentityPoolId = p1+    , _goitfdiIdentityId     = Nothing+    , _goitfdiLogins         = mempty+    , _goitfdiTokenDuration  = Nothing+    }++-- | A unique identifier in the format REGION:GUID.+goitfdiIdentityId :: Lens' GetOpenIdTokenForDeveloperIdentity (Maybe Text)+goitfdiIdentityId =+    lens _goitfdiIdentityId (\s a -> s { _goitfdiIdentityId = a })++-- | An identity pool ID in the format REGION:GUID.+goitfdiIdentityPoolId :: Lens' GetOpenIdTokenForDeveloperIdentity Text+goitfdiIdentityPoolId =+    lens _goitfdiIdentityPoolId (\s a -> s { _goitfdiIdentityPoolId = a })++-- | A set of optional name-value pairs that map provider names to provider+-- tokens. Each name-value pair represents a user from a public provider or+-- developer provider. If the user is from a developer provider, the+-- name-value pair will follow the syntax "developer_provider_name":+-- "developer_user_identifier". The developer provider is the "domain" by+-- which Cognito will refer to your users; you provided this domain while+-- creating/updating the identity pool. The developer user identifier is an+-- identifier from your backend that uniquely identifies a user. When you+-- create an identity pool, you can specify the supported logins.+goitfdiLogins :: Lens' GetOpenIdTokenForDeveloperIdentity (HashMap Text Text)+goitfdiLogins = lens _goitfdiLogins (\s a -> s { _goitfdiLogins = a }) . _Map++-- | The expiration time of the token, in seconds. You can specify a custom+-- expiration time for the token so that you can cache it. If you don't+-- provide an expiration time, the token is valid for 15 minutes. You can+-- exchange the token with Amazon STS for temporary AWS credentials, which+-- are valid for a maximum of one hour. The maximum token duration you can+-- set is 24 hours. You should take care in setting the expiration time for+-- a token, as there are significant security implications: an attacker+-- could use a leaked token to access your AWS resources for the token's+-- duration.+goitfdiTokenDuration :: Lens' GetOpenIdTokenForDeveloperIdentity (Maybe Natural)+goitfdiTokenDuration =+    lens _goitfdiTokenDuration (\s a -> s { _goitfdiTokenDuration = a })+        . mapping _Nat++data GetOpenIdTokenForDeveloperIdentityResponse = GetOpenIdTokenForDeveloperIdentityResponse+    { _goitfdirIdentityId :: Maybe Text+    , _goitfdirToken      :: Maybe Text+    } deriving (Eq, Ord, Show)++-- | 'GetOpenIdTokenForDeveloperIdentityResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'goitfdirIdentityId' @::@ 'Maybe' 'Text'+--+-- * 'goitfdirToken' @::@ 'Maybe' 'Text'+--+getOpenIdTokenForDeveloperIdentityResponse :: GetOpenIdTokenForDeveloperIdentityResponse+getOpenIdTokenForDeveloperIdentityResponse = GetOpenIdTokenForDeveloperIdentityResponse+    { _goitfdirIdentityId = Nothing+    , _goitfdirToken      = Nothing+    }++-- | A unique identifier in the format REGION:GUID.+goitfdirIdentityId :: Lens' GetOpenIdTokenForDeveloperIdentityResponse (Maybe Text)+goitfdirIdentityId =+    lens _goitfdirIdentityId (\s a -> s { _goitfdirIdentityId = a })++-- | An OpenID token.+goitfdirToken :: Lens' GetOpenIdTokenForDeveloperIdentityResponse (Maybe Text)+goitfdirToken = lens _goitfdirToken (\s a -> s { _goitfdirToken = a })++instance ToPath GetOpenIdTokenForDeveloperIdentity where+    toPath = const "/"++instance ToQuery GetOpenIdTokenForDeveloperIdentity where+    toQuery = const mempty++instance ToHeaders GetOpenIdTokenForDeveloperIdentity++instance ToJSON GetOpenIdTokenForDeveloperIdentity where+    toJSON GetOpenIdTokenForDeveloperIdentity{..} = object+        [ "IdentityPoolId" .= _goitfdiIdentityPoolId+        , "IdentityId"     .= _goitfdiIdentityId+        , "Logins"         .= _goitfdiLogins+        , "TokenDuration"  .= _goitfdiTokenDuration+        ]++instance AWSRequest GetOpenIdTokenForDeveloperIdentity where+    type Sv GetOpenIdTokenForDeveloperIdentity = CognitoIdentity+    type Rs GetOpenIdTokenForDeveloperIdentity = GetOpenIdTokenForDeveloperIdentityResponse++    request  = post "GetOpenIdTokenForDeveloperIdentity"+    response = jsonResponse++instance FromJSON GetOpenIdTokenForDeveloperIdentityResponse where+    parseJSON = withObject "GetOpenIdTokenForDeveloperIdentityResponse" $ \o -> GetOpenIdTokenForDeveloperIdentityResponse+        <$> o .:? "IdentityId"+        <*> o .:? "Token"
+ gen/Network/AWS/CognitoIdentity/ListIdentities.hs view
@@ -0,0 +1,151 @@+{-# 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.CognitoIdentity.ListIdentities+-- 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 the identities in a pool.+--+-- <http://docs.aws.amazon.com/cognitoidentity/latest/APIReference/API_ListIdentities.html>+module Network.AWS.CognitoIdentity.ListIdentities+    (+    -- * Request+      ListIdentities+    -- ** Request constructor+    , listIdentities+    -- ** Request lenses+    , liIdentityPoolId+    , liMaxResults+    , liNextToken++    -- * Response+    , ListIdentitiesResponse+    -- ** Response constructor+    , listIdentitiesResponse+    -- ** Response lenses+    , lirIdentities+    , lirIdentityPoolId+    , lirNextToken+    ) where++import Network.AWS.Prelude+import Network.AWS.Request.JSON+import Network.AWS.CognitoIdentity.Types+import qualified GHC.Exts++data ListIdentities = ListIdentities+    { _liIdentityPoolId :: Text+    , _liMaxResults     :: Nat+    , _liNextToken      :: Maybe Text+    } deriving (Eq, Ord, Show)++-- | 'ListIdentities' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'liIdentityPoolId' @::@ 'Text'+--+-- * 'liMaxResults' @::@ 'Natural'+--+-- * 'liNextToken' @::@ 'Maybe' 'Text'+--+listIdentities :: Text -- ^ 'liIdentityPoolId'+               -> Natural -- ^ 'liMaxResults'+               -> ListIdentities+listIdentities p1 p2 = ListIdentities+    { _liIdentityPoolId = p1+    , _liMaxResults     = withIso _Nat (const id) p2+    , _liNextToken      = Nothing+    }++-- | An identity pool ID in the format REGION:GUID.+liIdentityPoolId :: Lens' ListIdentities Text+liIdentityPoolId = lens _liIdentityPoolId (\s a -> s { _liIdentityPoolId = a })++-- | The maximum number of identities to return.+liMaxResults :: Lens' ListIdentities Natural+liMaxResults = lens _liMaxResults (\s a -> s { _liMaxResults = a }) . _Nat++-- | A pagination token.+liNextToken :: Lens' ListIdentities (Maybe Text)+liNextToken = lens _liNextToken (\s a -> s { _liNextToken = a })++data ListIdentitiesResponse = ListIdentitiesResponse+    { _lirIdentities     :: List "Identities" IdentityDescription+    , _lirIdentityPoolId :: Maybe Text+    , _lirNextToken      :: Maybe Text+    } deriving (Eq, Show)++-- | 'ListIdentitiesResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'lirIdentities' @::@ ['IdentityDescription']+--+-- * 'lirIdentityPoolId' @::@ 'Maybe' 'Text'+--+-- * 'lirNextToken' @::@ 'Maybe' 'Text'+--+listIdentitiesResponse :: ListIdentitiesResponse+listIdentitiesResponse = ListIdentitiesResponse+    { _lirIdentityPoolId = Nothing+    , _lirIdentities     = mempty+    , _lirNextToken      = Nothing+    }++-- | An object containing a set of identities and associated mappings.+lirIdentities :: Lens' ListIdentitiesResponse [IdentityDescription]+lirIdentities = lens _lirIdentities (\s a -> s { _lirIdentities = a }) . _List++-- | An identity pool ID in the format REGION:GUID.+lirIdentityPoolId :: Lens' ListIdentitiesResponse (Maybe Text)+lirIdentityPoolId =+    lens _lirIdentityPoolId (\s a -> s { _lirIdentityPoolId = a })++-- | A pagination token.+lirNextToken :: Lens' ListIdentitiesResponse (Maybe Text)+lirNextToken = lens _lirNextToken (\s a -> s { _lirNextToken = a })++instance ToPath ListIdentities where+    toPath = const "/"++instance ToQuery ListIdentities where+    toQuery = const mempty++instance ToHeaders ListIdentities++instance ToJSON ListIdentities where+    toJSON ListIdentities{..} = object+        [ "IdentityPoolId" .= _liIdentityPoolId+        , "MaxResults"     .= _liMaxResults+        , "NextToken"      .= _liNextToken+        ]++instance AWSRequest ListIdentities where+    type Sv ListIdentities = CognitoIdentity+    type Rs ListIdentities = ListIdentitiesResponse++    request  = post "ListIdentities"+    response = jsonResponse++instance FromJSON ListIdentitiesResponse where+    parseJSON = withObject "ListIdentitiesResponse" $ \o -> ListIdentitiesResponse+        <$> o .:  "Identities"+        <*> o .:? "IdentityPoolId"+        <*> o .:? "NextToken"
+ gen/Network/AWS/CognitoIdentity/ListIdentityPools.hs view
@@ -0,0 +1,131 @@+{-# LANGUAGE DataKinds                   #-}+{-# LANGUAGE DeriveGeneric               #-}+{-# LANGUAGE FlexibleInstances           #-}+{-# LANGUAGE GeneralizedNewtypeDeriving  #-}+{-# LANGUAGE LambdaCase                  #-}+{-# LANGUAGE NoImplicitPrelude           #-}+{-# LANGUAGE OverloadedStrings           #-}+{-# LANGUAGE RecordWildCards             #-}+{-# LANGUAGE TypeFamilies                #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Module      : Network.AWS.CognitoIdentity.ListIdentityPools+-- 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 all of the Cognito identity pools registered for your account.+--+-- <http://docs.aws.amazon.com/cognitoidentity/latest/APIReference/API_ListIdentityPools.html>+module Network.AWS.CognitoIdentity.ListIdentityPools+    (+    -- * Request+      ListIdentityPools+    -- ** Request constructor+    , listIdentityPools+    -- ** Request lenses+    , lipMaxResults+    , lipNextToken++    -- * Response+    , ListIdentityPoolsResponse+    -- ** Response constructor+    , listIdentityPoolsResponse+    -- ** Response lenses+    , liprIdentityPools+    , liprNextToken+    ) where++import Network.AWS.Prelude+import Network.AWS.Request.JSON+import Network.AWS.CognitoIdentity.Types+import qualified GHC.Exts++data ListIdentityPools = ListIdentityPools+    { _lipMaxResults :: Nat+    , _lipNextToken  :: Maybe Text+    } deriving (Eq, Ord, Show)++-- | 'ListIdentityPools' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'lipMaxResults' @::@ 'Natural'+--+-- * 'lipNextToken' @::@ 'Maybe' 'Text'+--+listIdentityPools :: Natural -- ^ 'lipMaxResults'+                  -> ListIdentityPools+listIdentityPools p1 = ListIdentityPools+    { _lipMaxResults = withIso _Nat (const id) p1+    , _lipNextToken  = Nothing+    }++-- | The maximum number of identities to return.+lipMaxResults :: Lens' ListIdentityPools Natural+lipMaxResults = lens _lipMaxResults (\s a -> s { _lipMaxResults = a }) . _Nat++-- | A pagination token.+lipNextToken :: Lens' ListIdentityPools (Maybe Text)+lipNextToken = lens _lipNextToken (\s a -> s { _lipNextToken = a })++data ListIdentityPoolsResponse = ListIdentityPoolsResponse+    { _liprIdentityPools :: List "IdentityPools" IdentityPoolShortDescription+    , _liprNextToken     :: Maybe Text+    } deriving (Eq, Show)++-- | 'ListIdentityPoolsResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'liprIdentityPools' @::@ ['IdentityPoolShortDescription']+--+-- * 'liprNextToken' @::@ 'Maybe' 'Text'+--+listIdentityPoolsResponse :: ListIdentityPoolsResponse+listIdentityPoolsResponse = ListIdentityPoolsResponse+    { _liprIdentityPools = mempty+    , _liprNextToken     = Nothing+    }++-- | The identity pools returned by the ListIdentityPools action.+liprIdentityPools :: Lens' ListIdentityPoolsResponse [IdentityPoolShortDescription]+liprIdentityPools =+    lens _liprIdentityPools (\s a -> s { _liprIdentityPools = a })+        . _List++-- | A pagination token.+liprNextToken :: Lens' ListIdentityPoolsResponse (Maybe Text)+liprNextToken = lens _liprNextToken (\s a -> s { _liprNextToken = a })++instance ToPath ListIdentityPools where+    toPath = const "/"++instance ToQuery ListIdentityPools where+    toQuery = const mempty++instance ToHeaders ListIdentityPools++instance ToJSON ListIdentityPools where+    toJSON ListIdentityPools{..} = object+        [ "MaxResults" .= _lipMaxResults+        , "NextToken"  .= _lipNextToken+        ]++instance AWSRequest ListIdentityPools where+    type Sv ListIdentityPools = CognitoIdentity+    type Rs ListIdentityPools = ListIdentityPoolsResponse++    request  = post "ListIdentityPools"+    response = jsonResponse++instance FromJSON ListIdentityPoolsResponse where+    parseJSON = withObject "ListIdentityPoolsResponse" $ \o -> ListIdentityPoolsResponse+        <$> o .:  "IdentityPools"+        <*> o .:? "NextToken"
+ gen/Network/AWS/CognitoIdentity/LookupDeveloperIdentity.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.CognitoIdentity.LookupDeveloperIdentity+-- 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)++-- | Retrieves the IdentityID associated with a DeveloperUserIdentifier or the+-- list of DeveloperUserIdentifiers associated with an IdentityId for an+-- existing identity. Either IdentityID or DeveloperUserIdentifier must not be+-- null. If you supply only one of these values, the other value will be+-- searched in the database and returned as a part of the response. If you+-- supply both, DeveloperUserIdentifier will be matched against IdentityID. If+-- the values are verified against the database, the response returns both+-- values and is the same as the request. Otherwise a+-- ResourceConflictException is thrown.+--+-- <http://docs.aws.amazon.com/cognitoidentity/latest/APIReference/API_LookupDeveloperIdentity.html>+module Network.AWS.CognitoIdentity.LookupDeveloperIdentity+    (+    -- * Request+      LookupDeveloperIdentity+    -- ** Request constructor+    , lookupDeveloperIdentity+    -- ** Request lenses+    , ldiDeveloperUserIdentifier+    , ldiIdentityId+    , ldiIdentityPoolId+    , ldiMaxResults+    , ldiNextToken++    -- * Response+    , LookupDeveloperIdentityResponse+    -- ** Response constructor+    , lookupDeveloperIdentityResponse+    -- ** Response lenses+    , ldirDeveloperUserIdentifierList+    , ldirIdentityId+    , ldirNextToken+    ) where++import Network.AWS.Prelude+import Network.AWS.Request.JSON+import Network.AWS.CognitoIdentity.Types+import qualified GHC.Exts++data LookupDeveloperIdentity = LookupDeveloperIdentity+    { _ldiDeveloperUserIdentifier :: Maybe Text+    , _ldiIdentityId              :: Maybe Text+    , _ldiIdentityPoolId          :: Text+    , _ldiMaxResults              :: Maybe Nat+    , _ldiNextToken               :: Maybe Text+    } deriving (Eq, Ord, Show)++-- | 'LookupDeveloperIdentity' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'ldiDeveloperUserIdentifier' @::@ 'Maybe' 'Text'+--+-- * 'ldiIdentityId' @::@ 'Maybe' 'Text'+--+-- * 'ldiIdentityPoolId' @::@ 'Text'+--+-- * 'ldiMaxResults' @::@ 'Maybe' 'Natural'+--+-- * 'ldiNextToken' @::@ 'Maybe' 'Text'+--+lookupDeveloperIdentity :: Text -- ^ 'ldiIdentityPoolId'+                        -> LookupDeveloperIdentity+lookupDeveloperIdentity p1 = LookupDeveloperIdentity+    { _ldiIdentityPoolId          = p1+    , _ldiIdentityId              = Nothing+    , _ldiDeveloperUserIdentifier = Nothing+    , _ldiMaxResults              = Nothing+    , _ldiNextToken               = Nothing+    }++-- | A unique ID used by your backend authentication process to identify a+-- user. Typically, a developer identity provider would issue many developer+-- user identifiers, in keeping with the number of users.+ldiDeveloperUserIdentifier :: Lens' LookupDeveloperIdentity (Maybe Text)+ldiDeveloperUserIdentifier =+    lens _ldiDeveloperUserIdentifier+        (\s a -> s { _ldiDeveloperUserIdentifier = a })++-- | A unique identifier in the format REGION:GUID.+ldiIdentityId :: Lens' LookupDeveloperIdentity (Maybe Text)+ldiIdentityId = lens _ldiIdentityId (\s a -> s { _ldiIdentityId = a })++-- | An identity pool ID in the format REGION:GUID.+ldiIdentityPoolId :: Lens' LookupDeveloperIdentity Text+ldiIdentityPoolId =+    lens _ldiIdentityPoolId (\s a -> s { _ldiIdentityPoolId = a })++-- | The maximum number of identities to return.+ldiMaxResults :: Lens' LookupDeveloperIdentity (Maybe Natural)+ldiMaxResults = lens _ldiMaxResults (\s a -> s { _ldiMaxResults = a }) . mapping _Nat++-- | A pagination token. The first call you make will have NextToken set to+-- null. After that the service will return NextToken values as needed. For+-- example, let's say you make a request with MaxResults set to 10, and+-- there are 20 matches in the database. The service will return a+-- pagination token as a part of the response. This token can be used to+-- call the API again and get results starting from the 11th match.+ldiNextToken :: Lens' LookupDeveloperIdentity (Maybe Text)+ldiNextToken = lens _ldiNextToken (\s a -> s { _ldiNextToken = a })++data LookupDeveloperIdentityResponse = LookupDeveloperIdentityResponse+    { _ldirDeveloperUserIdentifierList :: List "DeveloperUserIdentifierList" Text+    , _ldirIdentityId                  :: Maybe Text+    , _ldirNextToken                   :: Maybe Text+    } deriving (Eq, Ord, Show)++-- | 'LookupDeveloperIdentityResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'ldirDeveloperUserIdentifierList' @::@ ['Text']+--+-- * 'ldirIdentityId' @::@ 'Maybe' 'Text'+--+-- * 'ldirNextToken' @::@ 'Maybe' 'Text'+--+lookupDeveloperIdentityResponse :: LookupDeveloperIdentityResponse+lookupDeveloperIdentityResponse = LookupDeveloperIdentityResponse+    { _ldirIdentityId                  = Nothing+    , _ldirDeveloperUserIdentifierList = mempty+    , _ldirNextToken                   = Nothing+    }++-- | This is the list of developer user identifiers associated with an+-- identity ID. Cognito supports the association of multiple developer user+-- identifiers with an identity ID.+ldirDeveloperUserIdentifierList :: Lens' LookupDeveloperIdentityResponse [Text]+ldirDeveloperUserIdentifierList =+    lens _ldirDeveloperUserIdentifierList+        (\s a -> s { _ldirDeveloperUserIdentifierList = a })+            . _List++-- | A unique identifier in the format REGION:GUID.+ldirIdentityId :: Lens' LookupDeveloperIdentityResponse (Maybe Text)+ldirIdentityId = lens _ldirIdentityId (\s a -> s { _ldirIdentityId = a })++-- | A pagination token. The first call you make will have NextToken set to+-- null. After that the service will return NextToken values as needed. For+-- example, let's say you make a request with MaxResults set to 10, and+-- there are 20 matches in the database. The service will return a+-- pagination token as a part of the response. This token can be used to+-- call the API again and get results starting from the 11th match.+ldirNextToken :: Lens' LookupDeveloperIdentityResponse (Maybe Text)+ldirNextToken = lens _ldirNextToken (\s a -> s { _ldirNextToken = a })++instance ToPath LookupDeveloperIdentity where+    toPath = const "/"++instance ToQuery LookupDeveloperIdentity where+    toQuery = const mempty++instance ToHeaders LookupDeveloperIdentity++instance ToJSON LookupDeveloperIdentity where+    toJSON LookupDeveloperIdentity{..} = object+        [ "IdentityPoolId"          .= _ldiIdentityPoolId+        , "IdentityId"              .= _ldiIdentityId+        , "DeveloperUserIdentifier" .= _ldiDeveloperUserIdentifier+        , "MaxResults"              .= _ldiMaxResults+        , "NextToken"               .= _ldiNextToken+        ]++instance AWSRequest LookupDeveloperIdentity where+    type Sv LookupDeveloperIdentity = CognitoIdentity+    type Rs LookupDeveloperIdentity = LookupDeveloperIdentityResponse++    request  = post "LookupDeveloperIdentity"+    response = jsonResponse++instance FromJSON LookupDeveloperIdentityResponse where+    parseJSON = withObject "LookupDeveloperIdentityResponse" $ \o -> LookupDeveloperIdentityResponse+        <$> o .:  "DeveloperUserIdentifierList"+        <*> o .:? "IdentityId"+        <*> o .:? "NextToken"
+ gen/Network/AWS/CognitoIdentity/MergeDeveloperIdentities.hs view
@@ -0,0 +1,162 @@+{-# 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.CognitoIdentity.MergeDeveloperIdentities+-- 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)++-- | Merges two users having different IdentityIds, existing in the same+-- identity pool, and identified by the same developer provider. You can use+-- this action to request that discrete users be merged and identified as a+-- single user in the Cognito environment. Cognito associates the given source+-- user (SourceUserIdentifier) with the IdentityId of the+-- DestinationUserIdentifier. Only developer-authenticated users can be+-- merged. If the users to be merged are associated with the same public+-- provider, but as two different users, an exception will be thrown.+--+-- <http://docs.aws.amazon.com/cognitoidentity/latest/APIReference/API_MergeDeveloperIdentities.html>+module Network.AWS.CognitoIdentity.MergeDeveloperIdentities+    (+    -- * Request+      MergeDeveloperIdentities+    -- ** Request constructor+    , mergeDeveloperIdentities+    -- ** Request lenses+    , mdiDestinationUserIdentifier+    , mdiDeveloperProviderName+    , mdiIdentityPoolId+    , mdiSourceUserIdentifier++    -- * Response+    , MergeDeveloperIdentitiesResponse+    -- ** Response constructor+    , mergeDeveloperIdentitiesResponse+    -- ** Response lenses+    , mdirIdentityId+    ) where++import Network.AWS.Prelude+import Network.AWS.Request.JSON+import Network.AWS.CognitoIdentity.Types+import qualified GHC.Exts++data MergeDeveloperIdentities = MergeDeveloperIdentities+    { _mdiDestinationUserIdentifier :: Text+    , _mdiDeveloperProviderName     :: Text+    , _mdiIdentityPoolId            :: Text+    , _mdiSourceUserIdentifier      :: Text+    } deriving (Eq, Ord, Show)++-- | 'MergeDeveloperIdentities' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'mdiDestinationUserIdentifier' @::@ 'Text'+--+-- * 'mdiDeveloperProviderName' @::@ 'Text'+--+-- * 'mdiIdentityPoolId' @::@ 'Text'+--+-- * 'mdiSourceUserIdentifier' @::@ 'Text'+--+mergeDeveloperIdentities :: Text -- ^ 'mdiSourceUserIdentifier'+                         -> Text -- ^ 'mdiDestinationUserIdentifier'+                         -> Text -- ^ 'mdiDeveloperProviderName'+                         -> Text -- ^ 'mdiIdentityPoolId'+                         -> MergeDeveloperIdentities+mergeDeveloperIdentities p1 p2 p3 p4 = MergeDeveloperIdentities+    { _mdiSourceUserIdentifier      = p1+    , _mdiDestinationUserIdentifier = p2+    , _mdiDeveloperProviderName     = p3+    , _mdiIdentityPoolId            = p4+    }++-- | User identifier for the destination user. The value should be a+-- DeveloperUserIdentifier.+mdiDestinationUserIdentifier :: Lens' MergeDeveloperIdentities Text+mdiDestinationUserIdentifier =+    lens _mdiDestinationUserIdentifier+        (\s a -> s { _mdiDestinationUserIdentifier = a })++-- | The "domain" by which Cognito will refer to your users. This is a+-- (pseudo) domain name that you provide while creating an identity pool.+-- This name acts as a placeholder that allows your backend and the Cognito+-- service to communicate about the developer provider. For the+-- DeveloperProviderName, you can use letters as well as period (.),+-- underscore (_), and dash (-).+mdiDeveloperProviderName :: Lens' MergeDeveloperIdentities Text+mdiDeveloperProviderName =+    lens _mdiDeveloperProviderName+        (\s a -> s { _mdiDeveloperProviderName = a })++-- | An identity pool ID in the format REGION:GUID.+mdiIdentityPoolId :: Lens' MergeDeveloperIdentities Text+mdiIdentityPoolId =+    lens _mdiIdentityPoolId (\s a -> s { _mdiIdentityPoolId = a })++-- | User identifier for the source user. The value should be a+-- DeveloperUserIdentifier.+mdiSourceUserIdentifier :: Lens' MergeDeveloperIdentities Text+mdiSourceUserIdentifier =+    lens _mdiSourceUserIdentifier (\s a -> s { _mdiSourceUserIdentifier = a })++newtype MergeDeveloperIdentitiesResponse = MergeDeveloperIdentitiesResponse+    { _mdirIdentityId :: Maybe Text+    } deriving (Eq, Ord, Show, Monoid)++-- | 'MergeDeveloperIdentitiesResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'mdirIdentityId' @::@ 'Maybe' 'Text'+--+mergeDeveloperIdentitiesResponse :: MergeDeveloperIdentitiesResponse+mergeDeveloperIdentitiesResponse = MergeDeveloperIdentitiesResponse+    { _mdirIdentityId = Nothing+    }++-- | A unique identifier in the format REGION:GUID.+mdirIdentityId :: Lens' MergeDeveloperIdentitiesResponse (Maybe Text)+mdirIdentityId = lens _mdirIdentityId (\s a -> s { _mdirIdentityId = a })++instance ToPath MergeDeveloperIdentities where+    toPath = const "/"++instance ToQuery MergeDeveloperIdentities where+    toQuery = const mempty++instance ToHeaders MergeDeveloperIdentities++instance ToJSON MergeDeveloperIdentities where+    toJSON MergeDeveloperIdentities{..} = object+        [ "SourceUserIdentifier"      .= _mdiSourceUserIdentifier+        , "DestinationUserIdentifier" .= _mdiDestinationUserIdentifier+        , "DeveloperProviderName"     .= _mdiDeveloperProviderName+        , "IdentityPoolId"            .= _mdiIdentityPoolId+        ]++instance AWSRequest MergeDeveloperIdentities where+    type Sv MergeDeveloperIdentities = CognitoIdentity+    type Rs MergeDeveloperIdentities = MergeDeveloperIdentitiesResponse++    request  = post "MergeDeveloperIdentities"+    response = jsonResponse++instance FromJSON MergeDeveloperIdentitiesResponse where+    parseJSON = withObject "MergeDeveloperIdentitiesResponse" $ \o -> MergeDeveloperIdentitiesResponse+        <$> o .:? "IdentityId"
+ gen/Network/AWS/CognitoIdentity/Types.hs view
@@ -0,0 +1,244 @@+{-# 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.CognitoIdentity.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.CognitoIdentity.Types+    (+    -- * Service+      CognitoIdentity+    -- ** Error+    , JSONError++    -- * IdentityDescription+    , IdentityDescription+    , identityDescription+    , idIdentityId+    , idLogins++    -- * IdentityPool+    , IdentityPool+    , identityPool+    , ipAllowUnauthenticatedIdentities+    , ipDeveloperProviderName+    , ipIdentityPoolId+    , ipIdentityPoolName+    , ipOpenIdConnectProviderARNs+    , ipSupportedLoginProviders++    -- * IdentityPoolShortDescription+    , IdentityPoolShortDescription+    , identityPoolShortDescription+    , ipsdIdentityPoolId+    , ipsdIdentityPoolName+    ) 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 Identity service.+data CognitoIdentity++instance AWSService CognitoIdentity where+    type Sg CognitoIdentity = V4+    type Er CognitoIdentity = JSONError++    service = Service+        { _svcEndpoint     = regional+        , _svcAbbrev       = "CognitoIdentity"+        , _svcPrefix       = "cognito-identity"+        , _svcVersion      = "2014-06-30"+        , _svcTargetPrefix = Just "AWSCognitoIdentityService"+        , _svcJSONVersion  = Just "1.1"+        }++    handle = jsonError statusSuccess++data IdentityDescription = IdentityDescription+    { _idIdentityId :: Maybe Text+    , _idLogins     :: List "Logins" Text+    } deriving (Eq, Ord, Show)++-- | 'IdentityDescription' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'idIdentityId' @::@ 'Maybe' 'Text'+--+-- * 'idLogins' @::@ ['Text']+--+identityDescription :: IdentityDescription+identityDescription = IdentityDescription+    { _idIdentityId = Nothing+    , _idLogins     = mempty+    }++-- | A unique identifier in the format REGION:GUID.+idIdentityId :: Lens' IdentityDescription (Maybe Text)+idIdentityId = lens _idIdentityId (\s a -> s { _idIdentityId = a })++-- | A set of optional name-value pairs that map provider names to provider+-- tokens.+idLogins :: Lens' IdentityDescription [Text]+idLogins = lens _idLogins (\s a -> s { _idLogins = a }) . _List++instance FromJSON IdentityDescription where+    parseJSON = withObject "IdentityDescription" $ \o -> IdentityDescription+        <$> o .:? "IdentityId"+        <*> o .:  "Logins"++instance ToJSON IdentityDescription where+    toJSON IdentityDescription{..} = object+        [ "IdentityId" .= _idIdentityId+        , "Logins"     .= _idLogins+        ]++data IdentityPool = IdentityPool+    { _ipAllowUnauthenticatedIdentities :: Bool+    , _ipDeveloperProviderName          :: Maybe Text+    , _ipIdentityPoolId                 :: Text+    , _ipIdentityPoolName               :: Text+    , _ipOpenIdConnectProviderARNs      :: List "OpenIdConnectProviderARNs" Text+    , _ipSupportedLoginProviders        :: Map Text Text+    } deriving (Eq, Show)++-- | 'IdentityPool' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'ipAllowUnauthenticatedIdentities' @::@ 'Bool'+--+-- * 'ipDeveloperProviderName' @::@ 'Maybe' 'Text'+--+-- * 'ipIdentityPoolId' @::@ 'Text'+--+-- * 'ipIdentityPoolName' @::@ 'Text'+--+-- * 'ipOpenIdConnectProviderARNs' @::@ ['Text']+--+-- * 'ipSupportedLoginProviders' @::@ 'HashMap' 'Text' 'Text'+--+identityPool :: Text -- ^ 'ipIdentityPoolId'+             -> Text -- ^ 'ipIdentityPoolName'+             -> Bool -- ^ 'ipAllowUnauthenticatedIdentities'+             -> IdentityPool+identityPool p1 p2 p3 = IdentityPool+    { _ipIdentityPoolId                 = p1+    , _ipIdentityPoolName               = p2+    , _ipAllowUnauthenticatedIdentities = p3+    , _ipSupportedLoginProviders        = mempty+    , _ipDeveloperProviderName          = Nothing+    , _ipOpenIdConnectProviderARNs      = mempty+    }++-- | TRUE if the identity pool supports unauthenticated logins.+ipAllowUnauthenticatedIdentities :: Lens' IdentityPool Bool+ipAllowUnauthenticatedIdentities =+    lens _ipAllowUnauthenticatedIdentities+        (\s a -> s { _ipAllowUnauthenticatedIdentities = a })++-- | The "domain" by which Cognito will refer to your users.+ipDeveloperProviderName :: Lens' IdentityPool (Maybe Text)+ipDeveloperProviderName =+    lens _ipDeveloperProviderName (\s a -> s { _ipDeveloperProviderName = a })++-- | An identity pool ID in the format REGION:GUID.+ipIdentityPoolId :: Lens' IdentityPool Text+ipIdentityPoolId = lens _ipIdentityPoolId (\s a -> s { _ipIdentityPoolId = a })++-- | A string that you provide.+ipIdentityPoolName :: Lens' IdentityPool Text+ipIdentityPoolName =+    lens _ipIdentityPoolName (\s a -> s { _ipIdentityPoolName = a })++ipOpenIdConnectProviderARNs :: Lens' IdentityPool [Text]+ipOpenIdConnectProviderARNs =+    lens _ipOpenIdConnectProviderARNs+        (\s a -> s { _ipOpenIdConnectProviderARNs = a })+            . _List++-- | Optional key:value pairs mapping provider names to provider app IDs.+ipSupportedLoginProviders :: Lens' IdentityPool (HashMap Text Text)+ipSupportedLoginProviders =+    lens _ipSupportedLoginProviders+        (\s a -> s { _ipSupportedLoginProviders = a })+            . _Map++instance FromJSON IdentityPool where+    parseJSON = withObject "IdentityPool" $ \o -> IdentityPool+        <$> o .:  "AllowUnauthenticatedIdentities"+        <*> o .:? "DeveloperProviderName"+        <*> o .:  "IdentityPoolId"+        <*> o .:  "IdentityPoolName"+        <*> o .:  "OpenIdConnectProviderARNs"+        <*> o .:  "SupportedLoginProviders"++instance ToJSON IdentityPool where+    toJSON IdentityPool{..} = object+        [ "IdentityPoolId"                 .= _ipIdentityPoolId+        , "IdentityPoolName"               .= _ipIdentityPoolName+        , "AllowUnauthenticatedIdentities" .= _ipAllowUnauthenticatedIdentities+        , "SupportedLoginProviders"        .= _ipSupportedLoginProviders+        , "DeveloperProviderName"          .= _ipDeveloperProviderName+        , "OpenIdConnectProviderARNs"      .= _ipOpenIdConnectProviderARNs+        ]++data IdentityPoolShortDescription = IdentityPoolShortDescription+    { _ipsdIdentityPoolId   :: Maybe Text+    , _ipsdIdentityPoolName :: Maybe Text+    } deriving (Eq, Ord, Show)++-- | 'IdentityPoolShortDescription' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'ipsdIdentityPoolId' @::@ 'Maybe' 'Text'+--+-- * 'ipsdIdentityPoolName' @::@ 'Maybe' 'Text'+--+identityPoolShortDescription :: IdentityPoolShortDescription+identityPoolShortDescription = IdentityPoolShortDescription+    { _ipsdIdentityPoolId   = Nothing+    , _ipsdIdentityPoolName = Nothing+    }++-- | An identity pool ID in the format REGION:GUID.+ipsdIdentityPoolId :: Lens' IdentityPoolShortDescription (Maybe Text)+ipsdIdentityPoolId =+    lens _ipsdIdentityPoolId (\s a -> s { _ipsdIdentityPoolId = a })++-- | A string that you provide.+ipsdIdentityPoolName :: Lens' IdentityPoolShortDescription (Maybe Text)+ipsdIdentityPoolName =+    lens _ipsdIdentityPoolName (\s a -> s { _ipsdIdentityPoolName = a })++instance FromJSON IdentityPoolShortDescription where+    parseJSON = withObject "IdentityPoolShortDescription" $ \o -> IdentityPoolShortDescription+        <$> o .:? "IdentityPoolId"+        <*> o .:? "IdentityPoolName"++instance ToJSON IdentityPoolShortDescription where+    toJSON IdentityPoolShortDescription{..} = object+        [ "IdentityPoolId"   .= _ipsdIdentityPoolId+        , "IdentityPoolName" .= _ipsdIdentityPoolName+        ]
+ gen/Network/AWS/CognitoIdentity/UnlinkDeveloperIdentity.hs view
@@ -0,0 +1,134 @@+{-# 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.CognitoIdentity.UnlinkDeveloperIdentity+-- 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)++-- | Unlinks a DeveloperUserIdentifier from an existing identity. Unlinked+-- developer users will be considered new identities next time they are seen.+-- If, for a given Cognito identity, you remove all federated identities as+-- well as the developer user identifier, the Cognito identity becomes+-- inaccessible.+--+-- <http://docs.aws.amazon.com/cognitoidentity/latest/APIReference/API_UnlinkDeveloperIdentity.html>+module Network.AWS.CognitoIdentity.UnlinkDeveloperIdentity+    (+    -- * Request+      UnlinkDeveloperIdentity+    -- ** Request constructor+    , unlinkDeveloperIdentity+    -- ** Request lenses+    , udiDeveloperProviderName+    , udiDeveloperUserIdentifier+    , udiIdentityId+    , udiIdentityPoolId++    -- * Response+    , UnlinkDeveloperIdentityResponse+    -- ** Response constructor+    , unlinkDeveloperIdentityResponse+    ) where++import Network.AWS.Prelude+import Network.AWS.Request.JSON+import Network.AWS.CognitoIdentity.Types+import qualified GHC.Exts++data UnlinkDeveloperIdentity = UnlinkDeveloperIdentity+    { _udiDeveloperProviderName   :: Text+    , _udiDeveloperUserIdentifier :: Text+    , _udiIdentityId              :: Text+    , _udiIdentityPoolId          :: Text+    } deriving (Eq, Ord, Show)++-- | 'UnlinkDeveloperIdentity' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'udiDeveloperProviderName' @::@ 'Text'+--+-- * 'udiDeveloperUserIdentifier' @::@ 'Text'+--+-- * 'udiIdentityId' @::@ 'Text'+--+-- * 'udiIdentityPoolId' @::@ 'Text'+--+unlinkDeveloperIdentity :: Text -- ^ 'udiIdentityId'+                        -> Text -- ^ 'udiIdentityPoolId'+                        -> Text -- ^ 'udiDeveloperProviderName'+                        -> Text -- ^ 'udiDeveloperUserIdentifier'+                        -> UnlinkDeveloperIdentity+unlinkDeveloperIdentity p1 p2 p3 p4 = UnlinkDeveloperIdentity+    { _udiIdentityId              = p1+    , _udiIdentityPoolId          = p2+    , _udiDeveloperProviderName   = p3+    , _udiDeveloperUserIdentifier = p4+    }++-- | The "domain" by which Cognito will refer to your users.+udiDeveloperProviderName :: Lens' UnlinkDeveloperIdentity Text+udiDeveloperProviderName =+    lens _udiDeveloperProviderName+        (\s a -> s { _udiDeveloperProviderName = a })++-- | A unique ID used by your backend authentication process to identify a+-- user.+udiDeveloperUserIdentifier :: Lens' UnlinkDeveloperIdentity Text+udiDeveloperUserIdentifier =+    lens _udiDeveloperUserIdentifier+        (\s a -> s { _udiDeveloperUserIdentifier = a })++-- | A unique identifier in the format REGION:GUID.+udiIdentityId :: Lens' UnlinkDeveloperIdentity Text+udiIdentityId = lens _udiIdentityId (\s a -> s { _udiIdentityId = a })++-- | An identity pool ID in the format REGION:GUID.+udiIdentityPoolId :: Lens' UnlinkDeveloperIdentity Text+udiIdentityPoolId =+    lens _udiIdentityPoolId (\s a -> s { _udiIdentityPoolId = a })++data UnlinkDeveloperIdentityResponse = UnlinkDeveloperIdentityResponse+    deriving (Eq, Ord, Show, Generic)++-- | 'UnlinkDeveloperIdentityResponse' constructor.+unlinkDeveloperIdentityResponse :: UnlinkDeveloperIdentityResponse+unlinkDeveloperIdentityResponse = UnlinkDeveloperIdentityResponse++instance ToPath UnlinkDeveloperIdentity where+    toPath = const "/"++instance ToQuery UnlinkDeveloperIdentity where+    toQuery = const mempty++instance ToHeaders UnlinkDeveloperIdentity++instance ToJSON UnlinkDeveloperIdentity where+    toJSON UnlinkDeveloperIdentity{..} = object+        [ "IdentityId"              .= _udiIdentityId+        , "IdentityPoolId"          .= _udiIdentityPoolId+        , "DeveloperProviderName"   .= _udiDeveloperProviderName+        , "DeveloperUserIdentifier" .= _udiDeveloperUserIdentifier+        ]++instance AWSRequest UnlinkDeveloperIdentity where+    type Sv UnlinkDeveloperIdentity = CognitoIdentity+    type Rs UnlinkDeveloperIdentity = UnlinkDeveloperIdentityResponse++    request  = post "UnlinkDeveloperIdentity"+    response = nullResponse UnlinkDeveloperIdentityResponse
+ gen/Network/AWS/CognitoIdentity/UnlinkIdentity.hs view
@@ -0,0 +1,114 @@+{-# 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.CognitoIdentity.UnlinkIdentity+-- 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)++-- | Unlinks a federated identity from an existing account. Unlinked logins will+-- be considered new identities next time they are seen. Removing the last+-- linked login will make this identity inaccessible.+--+-- <http://docs.aws.amazon.com/cognitoidentity/latest/APIReference/API_UnlinkIdentity.html>+module Network.AWS.CognitoIdentity.UnlinkIdentity+    (+    -- * Request+      UnlinkIdentity+    -- ** Request constructor+    , unlinkIdentity+    -- ** Request lenses+    , uiIdentityId+    , uiLogins+    , uiLoginsToRemove++    -- * Response+    , UnlinkIdentityResponse+    -- ** Response constructor+    , unlinkIdentityResponse+    ) where++import Network.AWS.Prelude+import Network.AWS.Request.JSON+import Network.AWS.CognitoIdentity.Types+import qualified GHC.Exts++data UnlinkIdentity = UnlinkIdentity+    { _uiIdentityId     :: Text+    , _uiLogins         :: Map Text Text+    , _uiLoginsToRemove :: List "Logins" Text+    } deriving (Eq, Show)++-- | 'UnlinkIdentity' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'uiIdentityId' @::@ 'Text'+--+-- * 'uiLogins' @::@ 'HashMap' 'Text' 'Text'+--+-- * 'uiLoginsToRemove' @::@ ['Text']+--+unlinkIdentity :: Text -- ^ 'uiIdentityId'+               -> UnlinkIdentity+unlinkIdentity p1 = UnlinkIdentity+    { _uiIdentityId     = p1+    , _uiLogins         = mempty+    , _uiLoginsToRemove = mempty+    }++-- | A unique identifier in the format REGION:GUID.+uiIdentityId :: Lens' UnlinkIdentity Text+uiIdentityId = lens _uiIdentityId (\s a -> s { _uiIdentityId = a })++-- | A set of optional name-value pairs that map provider names to provider+-- tokens.+uiLogins :: Lens' UnlinkIdentity (HashMap Text Text)+uiLogins = lens _uiLogins (\s a -> s { _uiLogins = a }) . _Map++-- | Provider names to unlink from this identity.+uiLoginsToRemove :: Lens' UnlinkIdentity [Text]+uiLoginsToRemove = lens _uiLoginsToRemove (\s a -> s { _uiLoginsToRemove = a }) . _List++data UnlinkIdentityResponse = UnlinkIdentityResponse+    deriving (Eq, Ord, Show, Generic)++-- | 'UnlinkIdentityResponse' constructor.+unlinkIdentityResponse :: UnlinkIdentityResponse+unlinkIdentityResponse = UnlinkIdentityResponse++instance ToPath UnlinkIdentity where+    toPath = const "/"++instance ToQuery UnlinkIdentity where+    toQuery = const mempty++instance ToHeaders UnlinkIdentity++instance ToJSON UnlinkIdentity where+    toJSON UnlinkIdentity{..} = object+        [ "IdentityId"     .= _uiIdentityId+        , "Logins"         .= _uiLogins+        , "LoginsToRemove" .= _uiLoginsToRemove+        ]++instance AWSRequest UnlinkIdentity where+    type Sv UnlinkIdentity = CognitoIdentity+    type Rs UnlinkIdentity = UnlinkIdentityResponse++    request  = post "UnlinkIdentity"+    response = nullResponse UnlinkIdentityResponse
+ gen/Network/AWS/CognitoIdentity/UpdateIdentityPool.hs view
@@ -0,0 +1,236 @@+{-# 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.CognitoIdentity.UpdateIdentityPool+-- 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)++-- | Updates a user pool.+--+-- <http://docs.aws.amazon.com/cognitoidentity/latest/APIReference/API_UpdateIdentityPool.html>+module Network.AWS.CognitoIdentity.UpdateIdentityPool+    (+    -- * Request+      UpdateIdentityPool+    -- ** Request constructor+    , updateIdentityPool+    -- ** Request lenses+    , uipAllowUnauthenticatedIdentities+    , uipDeveloperProviderName+    , uipIdentityPoolId+    , uipIdentityPoolName+    , uipOpenIdConnectProviderARNs+    , uipSupportedLoginProviders++    -- * Response+    , UpdateIdentityPoolResponse+    -- ** Response constructor+    , updateIdentityPoolResponse+    -- ** Response lenses+    , uiprAllowUnauthenticatedIdentities+    , uiprDeveloperProviderName+    , uiprIdentityPoolId+    , uiprIdentityPoolName+    , uiprOpenIdConnectProviderARNs+    , uiprSupportedLoginProviders+    ) where++import Network.AWS.Prelude+import Network.AWS.Request.JSON+import Network.AWS.CognitoIdentity.Types+import qualified GHC.Exts++data UpdateIdentityPool = UpdateIdentityPool+    { _uipAllowUnauthenticatedIdentities :: Bool+    , _uipDeveloperProviderName          :: Maybe Text+    , _uipIdentityPoolId                 :: Text+    , _uipIdentityPoolName               :: Text+    , _uipOpenIdConnectProviderARNs      :: List "OpenIdConnectProviderARNs" Text+    , _uipSupportedLoginProviders        :: Map Text Text+    } deriving (Eq, Show)++-- | 'UpdateIdentityPool' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'uipAllowUnauthenticatedIdentities' @::@ 'Bool'+--+-- * 'uipDeveloperProviderName' @::@ 'Maybe' 'Text'+--+-- * 'uipIdentityPoolId' @::@ 'Text'+--+-- * 'uipIdentityPoolName' @::@ 'Text'+--+-- * 'uipOpenIdConnectProviderARNs' @::@ ['Text']+--+-- * 'uipSupportedLoginProviders' @::@ 'HashMap' 'Text' 'Text'+--+updateIdentityPool :: Text -- ^ 'uipIdentityPoolId'+                   -> Text -- ^ 'uipIdentityPoolName'+                   -> Bool -- ^ 'uipAllowUnauthenticatedIdentities'+                   -> UpdateIdentityPool+updateIdentityPool p1 p2 p3 = UpdateIdentityPool+    { _uipIdentityPoolId                 = p1+    , _uipIdentityPoolName               = p2+    , _uipAllowUnauthenticatedIdentities = p3+    , _uipSupportedLoginProviders        = mempty+    , _uipDeveloperProviderName          = Nothing+    , _uipOpenIdConnectProviderARNs      = mempty+    }++-- | TRUE if the identity pool supports unauthenticated logins.+uipAllowUnauthenticatedIdentities :: Lens' UpdateIdentityPool Bool+uipAllowUnauthenticatedIdentities =+    lens _uipAllowUnauthenticatedIdentities+        (\s a -> s { _uipAllowUnauthenticatedIdentities = a })++-- | The "domain" by which Cognito will refer to your users.+uipDeveloperProviderName :: Lens' UpdateIdentityPool (Maybe Text)+uipDeveloperProviderName =+    lens _uipDeveloperProviderName+        (\s a -> s { _uipDeveloperProviderName = a })++-- | An identity pool ID in the format REGION:GUID.+uipIdentityPoolId :: Lens' UpdateIdentityPool Text+uipIdentityPoolId =+    lens _uipIdentityPoolId (\s a -> s { _uipIdentityPoolId = a })++-- | A string that you provide.+uipIdentityPoolName :: Lens' UpdateIdentityPool Text+uipIdentityPoolName =+    lens _uipIdentityPoolName (\s a -> s { _uipIdentityPoolName = a })++uipOpenIdConnectProviderARNs :: Lens' UpdateIdentityPool [Text]+uipOpenIdConnectProviderARNs =+    lens _uipOpenIdConnectProviderARNs+        (\s a -> s { _uipOpenIdConnectProviderARNs = a })+            . _List++-- | Optional key:value pairs mapping provider names to provider app IDs.+uipSupportedLoginProviders :: Lens' UpdateIdentityPool (HashMap Text Text)+uipSupportedLoginProviders =+    lens _uipSupportedLoginProviders+        (\s a -> s { _uipSupportedLoginProviders = a })+            . _Map++data UpdateIdentityPoolResponse = UpdateIdentityPoolResponse+    { _uiprAllowUnauthenticatedIdentities :: Bool+    , _uiprDeveloperProviderName          :: Maybe Text+    , _uiprIdentityPoolId                 :: Text+    , _uiprIdentityPoolName               :: Text+    , _uiprOpenIdConnectProviderARNs      :: List "OpenIdConnectProviderARNs" Text+    , _uiprSupportedLoginProviders        :: Map Text Text+    } deriving (Eq, Show)++-- | 'UpdateIdentityPoolResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'uiprAllowUnauthenticatedIdentities' @::@ 'Bool'+--+-- * 'uiprDeveloperProviderName' @::@ 'Maybe' 'Text'+--+-- * 'uiprIdentityPoolId' @::@ 'Text'+--+-- * 'uiprIdentityPoolName' @::@ 'Text'+--+-- * 'uiprOpenIdConnectProviderARNs' @::@ ['Text']+--+-- * 'uiprSupportedLoginProviders' @::@ 'HashMap' 'Text' 'Text'+--+updateIdentityPoolResponse :: Text -- ^ 'uiprIdentityPoolId'+                           -> Text -- ^ 'uiprIdentityPoolName'+                           -> Bool -- ^ 'uiprAllowUnauthenticatedIdentities'+                           -> UpdateIdentityPoolResponse+updateIdentityPoolResponse p1 p2 p3 = UpdateIdentityPoolResponse+    { _uiprIdentityPoolId                 = p1+    , _uiprIdentityPoolName               = p2+    , _uiprAllowUnauthenticatedIdentities = p3+    , _uiprSupportedLoginProviders        = mempty+    , _uiprDeveloperProviderName          = Nothing+    , _uiprOpenIdConnectProviderARNs      = mempty+    }++-- | TRUE if the identity pool supports unauthenticated logins.+uiprAllowUnauthenticatedIdentities :: Lens' UpdateIdentityPoolResponse Bool+uiprAllowUnauthenticatedIdentities =+    lens _uiprAllowUnauthenticatedIdentities+        (\s a -> s { _uiprAllowUnauthenticatedIdentities = a })++-- | The "domain" by which Cognito will refer to your users.+uiprDeveloperProviderName :: Lens' UpdateIdentityPoolResponse (Maybe Text)+uiprDeveloperProviderName =+    lens _uiprDeveloperProviderName+        (\s a -> s { _uiprDeveloperProviderName = a })++-- | An identity pool ID in the format REGION:GUID.+uiprIdentityPoolId :: Lens' UpdateIdentityPoolResponse Text+uiprIdentityPoolId =+    lens _uiprIdentityPoolId (\s a -> s { _uiprIdentityPoolId = a })++-- | A string that you provide.+uiprIdentityPoolName :: Lens' UpdateIdentityPoolResponse Text+uiprIdentityPoolName =+    lens _uiprIdentityPoolName (\s a -> s { _uiprIdentityPoolName = a })++uiprOpenIdConnectProviderARNs :: Lens' UpdateIdentityPoolResponse [Text]+uiprOpenIdConnectProviderARNs =+    lens _uiprOpenIdConnectProviderARNs+        (\s a -> s { _uiprOpenIdConnectProviderARNs = a })+            . _List++-- | Optional key:value pairs mapping provider names to provider app IDs.+uiprSupportedLoginProviders :: Lens' UpdateIdentityPoolResponse (HashMap Text Text)+uiprSupportedLoginProviders =+    lens _uiprSupportedLoginProviders+        (\s a -> s { _uiprSupportedLoginProviders = a })+            . _Map++instance ToPath UpdateIdentityPool where+    toPath = const "/"++instance ToQuery UpdateIdentityPool where+    toQuery = const mempty++instance ToHeaders UpdateIdentityPool++instance ToJSON UpdateIdentityPool where+    toJSON UpdateIdentityPool{..} = object+        [ "IdentityPoolId"                 .= _uipIdentityPoolId+        , "IdentityPoolName"               .= _uipIdentityPoolName+        , "AllowUnauthenticatedIdentities" .= _uipAllowUnauthenticatedIdentities+        , "SupportedLoginProviders"        .= _uipSupportedLoginProviders+        , "DeveloperProviderName"          .= _uipDeveloperProviderName+        , "OpenIdConnectProviderARNs"      .= _uipOpenIdConnectProviderARNs+        ]++instance AWSRequest UpdateIdentityPool where+    type Sv UpdateIdentityPool = CognitoIdentity+    type Rs UpdateIdentityPool = UpdateIdentityPoolResponse++    request  = post "UpdateIdentityPool"+    response = jsonResponse++instance FromJSON UpdateIdentityPoolResponse where+    parseJSON = withObject "UpdateIdentityPoolResponse" $ \o -> UpdateIdentityPoolResponse+        <$> o .:  "AllowUnauthenticatedIdentities"+        <*> o .:? "DeveloperProviderName"+        <*> o .:  "IdentityPoolId"+        <*> o .:  "IdentityPoolName"+        <*> o .:  "OpenIdConnectProviderARNs"+        <*> o .:  "SupportedLoginProviders"