packages feed

amazonka-ml (empty) → 0.3.4

raw patch · 31 files changed

+7491/−0 lines, 31 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,31 @@+# Amazon Machine Learning 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 Machine Learning (Amazon ML) is a robust machine learning platform+that allows software developers to build and train predictive applications+and host those applications in a scalable AWS cloud solution.++Documentation is available via [Hackage](http://hackage.haskell.org/package/amazonka-ml)+and the [AWS API Reference](http://docs.aws.amazon.com/machine-learning/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-ml` is released under the [Mozilla Public License Version 2.0](http://www.mozilla.org/MPL/).++Parts of the code are derived from AWS service descriptions, licensed under Apache 2.0.+Source files subject to this contain an additional licensing clause in their header.
+ Setup.hs view
@@ -0,0 +1,2 @@+import Distribution.Simple+main = defaultMain
+ amazonka-ml.cabal view
@@ -0,0 +1,69 @@+name:                  amazonka-ml+version:               0.3.4+synopsis:              Amazon Machine Learning 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, Distributed Computing+build-type:            Simple+extra-source-files:    README.md+cabal-version:         >= 1.10++description:+    Amazon Machine Learning (Amazon ML) is a robust machine learning platform+    that allows software developers to build and train predictive applications+    and host those applications in a scalable AWS cloud solution.++    .+    /See:/ <http://docs.aws.amazon.com/machine-learning/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.MachineLearning+        , Network.AWS.MachineLearning.CreateBatchPrediction+        , Network.AWS.MachineLearning.CreateDataSourceFromRDS+        , Network.AWS.MachineLearning.CreateDataSourceFromRedshift+        , Network.AWS.MachineLearning.CreateDataSourceFromS+        , Network.AWS.MachineLearning.CreateEvaluation+        , Network.AWS.MachineLearning.CreateMLModel+        , Network.AWS.MachineLearning.CreateRealtimeEndpoint+        , Network.AWS.MachineLearning.DeleteBatchPrediction+        , Network.AWS.MachineLearning.DeleteDataSource+        , Network.AWS.MachineLearning.DeleteEvaluation+        , Network.AWS.MachineLearning.DeleteMLModel+        , Network.AWS.MachineLearning.DeleteRealtimeEndpoint+        , Network.AWS.MachineLearning.DescribeBatchPredictions+        , Network.AWS.MachineLearning.DescribeDataSources+        , Network.AWS.MachineLearning.DescribeEvaluations+        , Network.AWS.MachineLearning.DescribeMLModels+        , Network.AWS.MachineLearning.GetBatchPrediction+        , Network.AWS.MachineLearning.GetDataSource+        , Network.AWS.MachineLearning.GetEvaluation+        , Network.AWS.MachineLearning.GetMLModel+        , Network.AWS.MachineLearning.Predict+        , Network.AWS.MachineLearning.Types+        , Network.AWS.MachineLearning.UpdateBatchPrediction+        , Network.AWS.MachineLearning.UpdateDataSource+        , Network.AWS.MachineLearning.UpdateEvaluation+        , Network.AWS.MachineLearning.UpdateMLModel++    other-modules:++    build-depends:+          amazonka-core == 0.3.4.*+        , base          >= 4.7     && < 5
+ gen/Network/AWS/MachineLearning.hs view
@@ -0,0 +1,70 @@+-- Module      : Network.AWS.MachineLearning+-- Copyright   : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>+-- License     : This Source Code Form is subject to the terms of+--               the Mozilla Public License, v. 2.0.+--               A copy of the MPL can be found in the LICENSE file or+--               you can obtain it at http://mozilla.org/MPL/2.0/.+-- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability   : experimental+-- Portability : non-portable (GHC extensions)+--+-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- | Amazon Machine Learning (Amazon ML) is a robust machine learning platform+-- that allows software developers to build and train predictive applications+-- and host those applications in a scalable AWS cloud solution.+module Network.AWS.MachineLearning+    ( module Network.AWS.MachineLearning.CreateBatchPrediction+    , module Network.AWS.MachineLearning.CreateDataSourceFromRDS+    , module Network.AWS.MachineLearning.CreateDataSourceFromRedshift+    , module Network.AWS.MachineLearning.CreateDataSourceFromS+    , module Network.AWS.MachineLearning.CreateEvaluation+    , module Network.AWS.MachineLearning.CreateMLModel+    , module Network.AWS.MachineLearning.CreateRealtimeEndpoint+    , module Network.AWS.MachineLearning.DeleteBatchPrediction+    , module Network.AWS.MachineLearning.DeleteDataSource+    , module Network.AWS.MachineLearning.DeleteEvaluation+    , module Network.AWS.MachineLearning.DeleteMLModel+    , module Network.AWS.MachineLearning.DeleteRealtimeEndpoint+    , module Network.AWS.MachineLearning.DescribeBatchPredictions+    , module Network.AWS.MachineLearning.DescribeDataSources+    , module Network.AWS.MachineLearning.DescribeEvaluations+    , module Network.AWS.MachineLearning.DescribeMLModels+    , module Network.AWS.MachineLearning.GetBatchPrediction+    , module Network.AWS.MachineLearning.GetDataSource+    , module Network.AWS.MachineLearning.GetEvaluation+    , module Network.AWS.MachineLearning.GetMLModel+    , module Network.AWS.MachineLearning.Predict+    , module Network.AWS.MachineLearning.Types+    , module Network.AWS.MachineLearning.UpdateBatchPrediction+    , module Network.AWS.MachineLearning.UpdateDataSource+    , module Network.AWS.MachineLearning.UpdateEvaluation+    , module Network.AWS.MachineLearning.UpdateMLModel+    ) where++import Network.AWS.MachineLearning.CreateBatchPrediction+import Network.AWS.MachineLearning.CreateDataSourceFromRDS+import Network.AWS.MachineLearning.CreateDataSourceFromRedshift+import Network.AWS.MachineLearning.CreateDataSourceFromS+import Network.AWS.MachineLearning.CreateEvaluation+import Network.AWS.MachineLearning.CreateMLModel+import Network.AWS.MachineLearning.CreateRealtimeEndpoint+import Network.AWS.MachineLearning.DeleteBatchPrediction+import Network.AWS.MachineLearning.DeleteDataSource+import Network.AWS.MachineLearning.DeleteEvaluation+import Network.AWS.MachineLearning.DeleteMLModel+import Network.AWS.MachineLearning.DeleteRealtimeEndpoint+import Network.AWS.MachineLearning.DescribeBatchPredictions+import Network.AWS.MachineLearning.DescribeDataSources+import Network.AWS.MachineLearning.DescribeEvaluations+import Network.AWS.MachineLearning.DescribeMLModels+import Network.AWS.MachineLearning.GetBatchPrediction+import Network.AWS.MachineLearning.GetDataSource+import Network.AWS.MachineLearning.GetEvaluation+import Network.AWS.MachineLearning.GetMLModel+import Network.AWS.MachineLearning.Predict+import Network.AWS.MachineLearning.Types+import Network.AWS.MachineLearning.UpdateBatchPrediction+import Network.AWS.MachineLearning.UpdateDataSource+import Network.AWS.MachineLearning.UpdateEvaluation+import Network.AWS.MachineLearning.UpdateMLModel
+ gen/Network/AWS/MachineLearning/CreateBatchPrediction.hs view
@@ -0,0 +1,179 @@+{-# 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.MachineLearning.CreateBatchPrediction+-- Copyright   : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>+-- License     : This Source Code Form is subject to the terms of+--               the Mozilla Public License, v. 2.0.+--               A copy of the MPL can be found in the LICENSE file or+--               you can obtain it at http://mozilla.org/MPL/2.0/.+-- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability   : experimental+-- Portability : non-portable (GHC extensions)+--+-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- | Generates predictions for a group of observations. The observations to+-- process exist in one or more data files referenced by a 'DataSource'. This+-- operation creates a new 'BatchPrediction', and uses an 'MLModel' and the data+-- files referenced by the 'DataSource' as information sources.+--+-- 'CreateBatchPrediction' is an asynchronous operation. In response to 'CreateBatchPrediction', Amazon Machine Learning (Amazon ML) immediately returns and sets the 'BatchPrediction' status to 'PENDING'. After the 'BatchPrediction' completes, Amazon ML sets the+-- status to 'COMPLETED'.+--+-- You can poll for status updates by using the 'GetBatchPrediction' operation+-- and checking the 'Status' parameter of the result. After the 'COMPLETED' status+-- appears, the results are available in the location specified by the 'OutputUri'+-- parameter.+--+-- <http://http://docs.aws.amazon.com/machine-learning/latest/APIReference/API_CreateBatchPrediction.html>+module Network.AWS.MachineLearning.CreateBatchPrediction+    (+    -- * Request+      CreateBatchPrediction+    -- ** Request constructor+    , createBatchPrediction+    -- ** Request lenses+    , cbpBatchPredictionDataSourceId+    , cbpBatchPredictionId+    , cbpBatchPredictionName+    , cbpMLModelId+    , cbpOutputUri++    -- * Response+    , CreateBatchPredictionResponse+    -- ** Response constructor+    , createBatchPredictionResponse+    -- ** Response lenses+    , cbprBatchPredictionId+    ) where++import Network.AWS.Data (Object)+import Network.AWS.Prelude+import Network.AWS.Request.JSON+import Network.AWS.MachineLearning.Types+import qualified GHC.Exts++data CreateBatchPrediction = CreateBatchPrediction+    { _cbpBatchPredictionDataSourceId :: Text+    , _cbpBatchPredictionId           :: Text+    , _cbpBatchPredictionName         :: Maybe Text+    , _cbpMLModelId                   :: Text+    , _cbpOutputUri                   :: Text+    } deriving (Eq, Ord, Read, Show)++-- | 'CreateBatchPrediction' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'cbpBatchPredictionDataSourceId' @::@ 'Text'+--+-- * 'cbpBatchPredictionId' @::@ 'Text'+--+-- * 'cbpBatchPredictionName' @::@ 'Maybe' 'Text'+--+-- * 'cbpMLModelId' @::@ 'Text'+--+-- * 'cbpOutputUri' @::@ 'Text'+--+createBatchPrediction :: Text -- ^ 'cbpBatchPredictionId'+                      -> Text -- ^ 'cbpMLModelId'+                      -> Text -- ^ 'cbpBatchPredictionDataSourceId'+                      -> Text -- ^ 'cbpOutputUri'+                      -> CreateBatchPrediction+createBatchPrediction p1 p2 p3 p4 = CreateBatchPrediction+    { _cbpBatchPredictionId           = p1+    , _cbpMLModelId                   = p2+    , _cbpBatchPredictionDataSourceId = p3+    , _cbpOutputUri                   = p4+    , _cbpBatchPredictionName         = Nothing+    }++-- | The ID of the 'DataSource' that points to the group of observations to predict.+cbpBatchPredictionDataSourceId :: Lens' CreateBatchPrediction Text+cbpBatchPredictionDataSourceId =+    lens _cbpBatchPredictionDataSourceId+        (\s a -> s { _cbpBatchPredictionDataSourceId = a })++-- | A user-supplied ID that uniquely identifies the 'BatchPrediction'.+cbpBatchPredictionId :: Lens' CreateBatchPrediction Text+cbpBatchPredictionId =+    lens _cbpBatchPredictionId (\s a -> s { _cbpBatchPredictionId = a })++-- | A user-supplied name or description of the 'BatchPrediction'. 'BatchPredictionName' can only use the UTF-8 character set.+cbpBatchPredictionName :: Lens' CreateBatchPrediction (Maybe Text)+cbpBatchPredictionName =+    lens _cbpBatchPredictionName (\s a -> s { _cbpBatchPredictionName = a })++-- | The ID of the 'MLModel' that will generate predictions for the group of+-- observations.+cbpMLModelId :: Lens' CreateBatchPrediction Text+cbpMLModelId = lens _cbpMLModelId (\s a -> s { _cbpMLModelId = a })++-- | The location of an Amazon Simple Storage Service (Amazon S3) bucket or+-- directory to store the batch prediction results. The following substrings are+-- not allowed in the s3 key portion of the "outputURI" field: ':', '//', '/./',+-- '/../'.+--+-- Amazon ML needs permissions to store and retrieve the logs on your behalf.+-- For information about how to set permissions, see the <http://docs.aws.amazon.com/machine-learning/latest/dg Amazon Machine LearningDeveloper Guide>.+cbpOutputUri :: Lens' CreateBatchPrediction Text+cbpOutputUri = lens _cbpOutputUri (\s a -> s { _cbpOutputUri = a })++newtype CreateBatchPredictionResponse = CreateBatchPredictionResponse+    { _cbprBatchPredictionId :: Maybe Text+    } deriving (Eq, Ord, Read, Show, Monoid)++-- | 'CreateBatchPredictionResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'cbprBatchPredictionId' @::@ 'Maybe' 'Text'+--+createBatchPredictionResponse :: CreateBatchPredictionResponse+createBatchPredictionResponse = CreateBatchPredictionResponse+    { _cbprBatchPredictionId = Nothing+    }++-- | A user-supplied ID that uniquely identifies the 'BatchPrediction'. This value+-- is identical to the value of the 'BatchPredictionId' in the request.+cbprBatchPredictionId :: Lens' CreateBatchPredictionResponse (Maybe Text)+cbprBatchPredictionId =+    lens _cbprBatchPredictionId (\s a -> s { _cbprBatchPredictionId = a })++instance ToPath CreateBatchPrediction where+    toPath = const "/"++instance ToQuery CreateBatchPrediction where+    toQuery = const mempty++instance ToHeaders CreateBatchPrediction++instance ToJSON CreateBatchPrediction where+    toJSON CreateBatchPrediction{..} = object+        [ "BatchPredictionId"           .= _cbpBatchPredictionId+        , "BatchPredictionName"         .= _cbpBatchPredictionName+        , "MLModelId"                   .= _cbpMLModelId+        , "BatchPredictionDataSourceId" .= _cbpBatchPredictionDataSourceId+        , "OutputUri"                   .= _cbpOutputUri+        ]++instance AWSRequest CreateBatchPrediction where+    type Sv CreateBatchPrediction = MachineLearning+    type Rs CreateBatchPrediction = CreateBatchPredictionResponse++    request  = post "CreateBatchPrediction"+    response = jsonResponse++instance FromJSON CreateBatchPredictionResponse where+    parseJSON = withObject "CreateBatchPredictionResponse" $ \o -> CreateBatchPredictionResponse+        <$> o .:? "BatchPredictionId"
+ gen/Network/AWS/MachineLearning/CreateDataSourceFromRDS.hs view
@@ -0,0 +1,212 @@+{-# 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.MachineLearning.CreateDataSourceFromRDS+-- Copyright   : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>+-- License     : This Source Code Form is subject to the terms of+--               the Mozilla Public License, v. 2.0.+--               A copy of the MPL can be found in the LICENSE file or+--               you can obtain it at http://mozilla.org/MPL/2.0/.+-- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability   : experimental+-- Portability : non-portable (GHC extensions)+--+-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- | Creates a 'DataSource' object from an <http://aws.amazon.com/rds/  Amazon Relational Database Service>+-- (Amazon RDS). A 'DataSource' references data that can be used to perform 'CreateMLModel', 'CreateEvaluation', or 'CreateBatchPrediction' operations.+--+-- 'CreateDataSourceFromRDS' is an asynchronous operation. In response to 'CreateDataSourceFromRDS', Amazon Machine Learning (Amazon ML) immediately returns and sets the 'DataSource' status to 'PENDING'. After the 'DataSource' is created and ready for use, Amazon+-- ML sets the 'Status' parameter to 'COMPLETED'. 'DataSource' in 'COMPLETED' or 'PENDING'+-- status can only be used to perform 'CreateMLModel', 'CreateEvaluation', or 'CreateBatchPrediction' operations.+--+-- If Amazon ML cannot accept the input source, it sets the 'Status' parameter+-- to 'FAILED' and includes an error message in the 'Message' attribute of the 'GetDataSource' operation response.+--+-- <http://http://docs.aws.amazon.com/machine-learning/latest/APIReference/API_CreateDataSourceFromRDS.html>+module Network.AWS.MachineLearning.CreateDataSourceFromRDS+    (+    -- * Request+      CreateDataSourceFromRDS+    -- ** Request constructor+    , createDataSourceFromRDS+    -- ** Request lenses+    , cdsfrdsComputeStatistics+    , cdsfrdsDataSourceId+    , cdsfrdsDataSourceName+    , cdsfrdsRDSData+    , cdsfrdsRoleARN++    -- * Response+    , CreateDataSourceFromRDSResponse+    -- ** Response constructor+    , createDataSourceFromRDSResponse+    -- ** Response lenses+    , cdsfrdsrDataSourceId+    ) where++import Network.AWS.Data (Object)+import Network.AWS.Prelude+import Network.AWS.Request.JSON+import Network.AWS.MachineLearning.Types+import qualified GHC.Exts++data CreateDataSourceFromRDS = CreateDataSourceFromRDS+    { _cdsfrdsComputeStatistics :: Maybe Bool+    , _cdsfrdsDataSourceId      :: Text+    , _cdsfrdsDataSourceName    :: Maybe Text+    , _cdsfrdsRDSData           :: RDSDataSpec+    , _cdsfrdsRoleARN           :: Text+    } deriving (Eq, Read, Show)++-- | 'CreateDataSourceFromRDS' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'cdsfrdsComputeStatistics' @::@ 'Maybe' 'Bool'+--+-- * 'cdsfrdsDataSourceId' @::@ 'Text'+--+-- * 'cdsfrdsDataSourceName' @::@ 'Maybe' 'Text'+--+-- * 'cdsfrdsRDSData' @::@ 'RDSDataSpec'+--+-- * 'cdsfrdsRoleARN' @::@ 'Text'+--+createDataSourceFromRDS :: Text -- ^ 'cdsfrdsDataSourceId'+                        -> RDSDataSpec -- ^ 'cdsfrdsRDSData'+                        -> Text -- ^ 'cdsfrdsRoleARN'+                        -> CreateDataSourceFromRDS+createDataSourceFromRDS p1 p2 p3 = CreateDataSourceFromRDS+    { _cdsfrdsDataSourceId      = p1+    , _cdsfrdsRDSData           = p2+    , _cdsfrdsRoleARN           = p3+    , _cdsfrdsDataSourceName    = Nothing+    , _cdsfrdsComputeStatistics = Nothing+    }++-- | The compute statistics for a 'DataSource'. The statistics are generated from+-- the observation data referenced by a 'DataSource'. Amazon ML uses the+-- statistics internally during an 'MLModel' training. This parameter must be set+-- to 'true' if the ''DataSource'' needs to be used for 'MLModel' training.+cdsfrdsComputeStatistics :: Lens' CreateDataSourceFromRDS (Maybe Bool)+cdsfrdsComputeStatistics =+    lens _cdsfrdsComputeStatistics+        (\s a -> s { _cdsfrdsComputeStatistics = a })++-- | A user-supplied ID that uniquely identifies the 'DataSource'. Typically, an+-- Amazon Resource Number (ARN) becomes the ID for a 'DataSource'.+cdsfrdsDataSourceId :: Lens' CreateDataSourceFromRDS Text+cdsfrdsDataSourceId =+    lens _cdsfrdsDataSourceId (\s a -> s { _cdsfrdsDataSourceId = a })++-- | A user-supplied name or description of the 'DataSource'.+cdsfrdsDataSourceName :: Lens' CreateDataSourceFromRDS (Maybe Text)+cdsfrdsDataSourceName =+    lens _cdsfrdsDataSourceName (\s a -> s { _cdsfrdsDataSourceName = a })++-- | The data specification of an Amazon RDS 'DataSource':+--+-- DatabaseInformation -   'DatabaseName ' - Name of the Amazon RDS database.  'InstanceIdentifier ' - Unique identifier for the Amazon RDS database instance.+--+--+-- DatabaseCredentials - AWS Identity and Access Management (IAM) credentials+-- that are used to connect to the Amazon RDS database.+--+-- ResourceRole - Role (DataPipelineDefaultResourceRole) assumed by an Amazon+-- Elastic Compute Cloud (EC2) instance to carry out the copy task from Amazon+-- RDS to Amazon S3. For more information, see <http://docs.aws.amazon.com/datapipeline/latest/DeveloperGuide/dp-iam-roles.html Role templates> for data pipelines.+--+-- ServiceRole - Role (DataPipelineDefaultRole) assumed by the AWS Data+-- Pipeline service to monitor the progress of the copy task from Amazon RDS to+-- Amazon Simple Storage Service (S3). For more information, see <http://docs.aws.amazon.com/datapipeline/latest/DeveloperGuide/dp-iam-roles.html Role templates>+-- for data pipelines.+--+-- SecurityInfo - Security information to use to access an Amazon RDS instance.+-- You need to set up appropriate ingress rules for the security entity IDs+-- provided to allow access to the Amazon RDS instance. Specify a ['SubnetId', 'SecurityGroupIds'] pair for a VPC-based Amazon RDS instance.+--+-- SelectSqlQuery - Query that is used to retrieve the observation data for the 'Datasource'.+--+-- S3StagingLocation - Amazon S3 location for staging RDS data. The data+-- retrieved from Amazon RDS using 'SelectSqlQuery' is stored in this location.+--+-- DataSchemaUri - Amazon S3 location of the 'DataSchema'.+--+-- DataSchema - A JSON string representing the schema. This is not required if 'DataSchemaUri' is specified.+--+-- DataRearrangement - A JSON string representing the splitting requirement of+-- a 'Datasource'.+--+--+-- Sample - ' "{\"randomSeed\":\"some-random-seed\",\"splitting\":{\"percentBegin\":10,\"percentEnd\":60}}"'+--+--+cdsfrdsRDSData :: Lens' CreateDataSourceFromRDS RDSDataSpec+cdsfrdsRDSData = lens _cdsfrdsRDSData (\s a -> s { _cdsfrdsRDSData = a })++-- | The role that Amazon ML assumes on behalf of the user to create and activate+-- a data pipeline in the user’s account and copy data (using the 'SelectSqlQuery') query from Amazon RDS to Amazon S3.+--+--+--+cdsfrdsRoleARN :: Lens' CreateDataSourceFromRDS Text+cdsfrdsRoleARN = lens _cdsfrdsRoleARN (\s a -> s { _cdsfrdsRoleARN = a })++newtype CreateDataSourceFromRDSResponse = CreateDataSourceFromRDSResponse+    { _cdsfrdsrDataSourceId :: Maybe Text+    } deriving (Eq, Ord, Read, Show, Monoid)++-- | 'CreateDataSourceFromRDSResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'cdsfrdsrDataSourceId' @::@ 'Maybe' 'Text'+--+createDataSourceFromRDSResponse :: CreateDataSourceFromRDSResponse+createDataSourceFromRDSResponse = CreateDataSourceFromRDSResponse+    { _cdsfrdsrDataSourceId = Nothing+    }++-- | A user-supplied ID that uniquely identifies the datasource. This value should+-- be identical to the value of the 'DataSourceID' in the request.+cdsfrdsrDataSourceId :: Lens' CreateDataSourceFromRDSResponse (Maybe Text)+cdsfrdsrDataSourceId =+    lens _cdsfrdsrDataSourceId (\s a -> s { _cdsfrdsrDataSourceId = a })++instance ToPath CreateDataSourceFromRDS where+    toPath = const "/"++instance ToQuery CreateDataSourceFromRDS where+    toQuery = const mempty++instance ToHeaders CreateDataSourceFromRDS++instance ToJSON CreateDataSourceFromRDS where+    toJSON CreateDataSourceFromRDS{..} = object+        [ "DataSourceId"      .= _cdsfrdsDataSourceId+        , "DataSourceName"    .= _cdsfrdsDataSourceName+        , "RDSData"           .= _cdsfrdsRDSData+        , "RoleARN"           .= _cdsfrdsRoleARN+        , "ComputeStatistics" .= _cdsfrdsComputeStatistics+        ]++instance AWSRequest CreateDataSourceFromRDS where+    type Sv CreateDataSourceFromRDS = MachineLearning+    type Rs CreateDataSourceFromRDS = CreateDataSourceFromRDSResponse++    request  = post "CreateDataSourceFromRDS"+    response = jsonResponse++instance FromJSON CreateDataSourceFromRDSResponse where+    parseJSON = withObject "CreateDataSourceFromRDSResponse" $ \o -> CreateDataSourceFromRDSResponse+        <$> o .:? "DataSourceId"
+ gen/Network/AWS/MachineLearning/CreateDataSourceFromRedshift.hs view
@@ -0,0 +1,214 @@+{-# 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.MachineLearning.CreateDataSourceFromRedshift+-- Copyright   : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>+-- License     : This Source Code Form is subject to the terms of+--               the Mozilla Public License, v. 2.0.+--               A copy of the MPL can be found in the LICENSE file or+--               you can obtain it at http://mozilla.org/MPL/2.0/.+-- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability   : experimental+-- Portability : non-portable (GHC extensions)+--+-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- | Creates a 'DataSource' from <http://aws.amazon.com/redshift/ Amazon Redshift>. A 'DataSource' references data that+-- can be used to perform either 'CreateMLModel', 'CreateEvaluation' or 'CreateBatchPrediction' operations.+--+-- 'CreateDataSourceFromRedshift' is an asynchronous operation. In response to 'CreateDataSourceFromRedshift', Amazon Machine Learning (Amazon ML) immediately returns and sets the 'DataSource' status to 'PENDING'. After the 'DataSource' is created and ready for use, Amazon+-- ML sets the 'Status' parameter to 'COMPLETED'. 'DataSource' in 'COMPLETED' or 'PENDING'+-- status can only be used to perform 'CreateMLModel', 'CreateEvaluation', or 'CreateBatchPrediction' operations.+--+-- If Amazon ML cannot accept the input source, it sets the 'Status' parameter+-- to 'FAILED' and includes an error message in the 'Message' attribute of the 'GetDataSource' operation response.+--+-- The observations should exist in the database hosted on an Amazon Redshift+-- cluster and should be specified by a 'SelectSqlQuery'. Amazon ML executes <http://docs.aws.amazon.com/redshift/latest/dg/t_Unloading_tables.html Unload> command in Amazon Redshift to transfer the result set of 'SelectSqlQuery'+-- to 'S3StagingLocation.'+--+-- After the 'DataSource' is created, it's ready for use in evaluations and batch+-- predictions. If you plan to use the 'DataSource' to train an 'MLModel', the 'DataSource' requires another item -- a recipe. A recipe describes the observation+-- variables that participate in training an 'MLModel'. A recipe describes how+-- each input variable will be used in training. Will the variable be included+-- or excluded from training? Will the variable be manipulated, for example,+-- combined with another variable or split apart into word combinations? The+-- recipe provides answers to these questions. For more information, see the+-- Amazon Machine Learning Developer Guide.+--+-- <http://http://docs.aws.amazon.com/machine-learning/latest/APIReference/API_CreateDataSourceFromRedshift.html>+module Network.AWS.MachineLearning.CreateDataSourceFromRedshift+    (+    -- * Request+      CreateDataSourceFromRedshift+    -- ** Request constructor+    , createDataSourceFromRedshift+    -- ** Request lenses+    , cdsfrComputeStatistics+    , cdsfrDataSourceId+    , cdsfrDataSourceName+    , cdsfrDataSpec+    , cdsfrRoleARN++    -- * Response+    , CreateDataSourceFromRedshiftResponse+    -- ** Response constructor+    , createDataSourceFromRedshiftResponse+    -- ** Response lenses+    , cdsfrrDataSourceId+    ) where++import Network.AWS.Data (Object)+import Network.AWS.Prelude+import Network.AWS.Request.JSON+import Network.AWS.MachineLearning.Types+import qualified GHC.Exts++data CreateDataSourceFromRedshift = CreateDataSourceFromRedshift+    { _cdsfrComputeStatistics :: Maybe Bool+    , _cdsfrDataSourceId      :: Text+    , _cdsfrDataSourceName    :: Maybe Text+    , _cdsfrDataSpec          :: RedshiftDataSpec+    , _cdsfrRoleARN           :: Text+    } deriving (Eq, Read, Show)++-- | 'CreateDataSourceFromRedshift' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'cdsfrComputeStatistics' @::@ 'Maybe' 'Bool'+--+-- * 'cdsfrDataSourceId' @::@ 'Text'+--+-- * 'cdsfrDataSourceName' @::@ 'Maybe' 'Text'+--+-- * 'cdsfrDataSpec' @::@ 'RedshiftDataSpec'+--+-- * 'cdsfrRoleARN' @::@ 'Text'+--+createDataSourceFromRedshift :: Text -- ^ 'cdsfrDataSourceId'+                             -> RedshiftDataSpec -- ^ 'cdsfrDataSpec'+                             -> Text -- ^ 'cdsfrRoleARN'+                             -> CreateDataSourceFromRedshift+createDataSourceFromRedshift p1 p2 p3 = CreateDataSourceFromRedshift+    { _cdsfrDataSourceId      = p1+    , _cdsfrDataSpec          = p2+    , _cdsfrRoleARN           = p3+    , _cdsfrDataSourceName    = Nothing+    , _cdsfrComputeStatistics = Nothing+    }++-- | The compute statistics for a 'DataSource'. The statistics are generated from+-- the observation data referenced by a 'DataSource'. Amazon ML uses the+-- statistics internally during 'MLModel' training. This parameter must be set to 'true' if the ''DataSource'' needs to be used for 'MLModel' training+cdsfrComputeStatistics :: Lens' CreateDataSourceFromRedshift (Maybe Bool)+cdsfrComputeStatistics =+    lens _cdsfrComputeStatistics (\s a -> s { _cdsfrComputeStatistics = a })++-- | A user-supplied ID that uniquely identifies the 'DataSource'.+cdsfrDataSourceId :: Lens' CreateDataSourceFromRedshift Text+cdsfrDataSourceId =+    lens _cdsfrDataSourceId (\s a -> s { _cdsfrDataSourceId = a })++-- | A user-supplied name or description of the 'DataSource'.+cdsfrDataSourceName :: Lens' CreateDataSourceFromRedshift (Maybe Text)+cdsfrDataSourceName =+    lens _cdsfrDataSourceName (\s a -> s { _cdsfrDataSourceName = a })++-- | The data specification of an Amazon Redshift 'DataSource':+--+-- DatabaseInformation -   'DatabaseName ' - Name of the Amazon Redshift+-- database.   ' ClusterIdentifier ' - Unique ID for the Amazon Redshift cluster.+--+-- DatabaseCredentials - AWS Identity abd Access Management (IAM) credentials+-- that are used to connect to the Amazon Redshift database.+--+-- SelectSqlQuery - Query that is used to retrieve the observation data for the 'Datasource'.+--+-- S3StagingLocation - Amazon Simple Storage Service (Amazon S3) location for+-- staging Amazon Redshift data. The data retrieved from Amazon Relational+-- Database Service (Amazon RDS) using 'SelectSqlQuery' is stored in this location.+--+-- DataSchemaUri - Amazon S3 location of the 'DataSchema'.+--+-- DataSchema - A JSON string representing the schema. This is not required if 'DataSchemaUri' is specified.+--+-- DataRearrangement - A JSON string representing the splitting requirement of+-- a 'Datasource'.+--+--+-- Sample - ' "{\"randomSeed\":\"some-random-seed\",\"splitting\":{\"percentBegin\":10,\"percentEnd\":60}}"'+--+--+cdsfrDataSpec :: Lens' CreateDataSourceFromRedshift RedshiftDataSpec+cdsfrDataSpec = lens _cdsfrDataSpec (\s a -> s { _cdsfrDataSpec = a })++-- | A fully specified role Amazon Resource Name (ARN). Amazon ML assumes the role+-- on behalf of the user to create the following:+--+-- A security group to allow Amazon ML to execute the 'SelectSqlQuery' query on+-- an Amazon Redshift cluster+--+-- An Amazon S3 bucket policy to grant Amazon ML read/write permissions on the 'S3StagingLocation'+--+--+cdsfrRoleARN :: Lens' CreateDataSourceFromRedshift Text+cdsfrRoleARN = lens _cdsfrRoleARN (\s a -> s { _cdsfrRoleARN = a })++newtype CreateDataSourceFromRedshiftResponse = CreateDataSourceFromRedshiftResponse+    { _cdsfrrDataSourceId :: Maybe Text+    } deriving (Eq, Ord, Read, Show, Monoid)++-- | 'CreateDataSourceFromRedshiftResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'cdsfrrDataSourceId' @::@ 'Maybe' 'Text'+--+createDataSourceFromRedshiftResponse :: CreateDataSourceFromRedshiftResponse+createDataSourceFromRedshiftResponse = CreateDataSourceFromRedshiftResponse+    { _cdsfrrDataSourceId = Nothing+    }++-- | A user-supplied ID that uniquely identifies the datasource. This value should+-- be identical to the value of the 'DataSourceID' in the request.+cdsfrrDataSourceId :: Lens' CreateDataSourceFromRedshiftResponse (Maybe Text)+cdsfrrDataSourceId =+    lens _cdsfrrDataSourceId (\s a -> s { _cdsfrrDataSourceId = a })++instance ToPath CreateDataSourceFromRedshift where+    toPath = const "/"++instance ToQuery CreateDataSourceFromRedshift where+    toQuery = const mempty++instance ToHeaders CreateDataSourceFromRedshift++instance ToJSON CreateDataSourceFromRedshift where+    toJSON CreateDataSourceFromRedshift{..} = object+        [ "DataSourceId"      .= _cdsfrDataSourceId+        , "DataSourceName"    .= _cdsfrDataSourceName+        , "DataSpec"          .= _cdsfrDataSpec+        , "RoleARN"           .= _cdsfrRoleARN+        , "ComputeStatistics" .= _cdsfrComputeStatistics+        ]++instance AWSRequest CreateDataSourceFromRedshift where+    type Sv CreateDataSourceFromRedshift = MachineLearning+    type Rs CreateDataSourceFromRedshift = CreateDataSourceFromRedshiftResponse++    request  = post "CreateDataSourceFromRedshift"+    response = jsonResponse++instance FromJSON CreateDataSourceFromRedshiftResponse where+    parseJSON = withObject "CreateDataSourceFromRedshiftResponse" $ \o -> CreateDataSourceFromRedshiftResponse+        <$> o .:? "DataSourceId"
+ gen/Network/AWS/MachineLearning/CreateDataSourceFromS.hs view
@@ -0,0 +1,190 @@+{-# 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.MachineLearning.CreateDataSourceFromS+-- Copyright   : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>+-- License     : This Source Code Form is subject to the terms of+--               the Mozilla Public License, v. 2.0.+--               A copy of the MPL can be found in the LICENSE file or+--               you can obtain it at http://mozilla.org/MPL/2.0/.+-- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability   : experimental+-- Portability : non-portable (GHC extensions)+--+-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- | Creates a 'DataSource' object. A 'DataSource' references data that can be used to+-- perform 'CreateMLModel', 'CreateEvaluation', or 'CreateBatchPrediction' operations.+--+-- 'CreateDataSourceFromS3' is an asynchronous operation. In response to 'CreateDataSourceFromS3', Amazon Machine Learning (Amazon ML) immediately returns and sets the 'DataSource' status to 'PENDING'. After the 'DataSource' is created and ready for use, Amazon+-- ML sets the 'Status' parameter to 'COMPLETED'. 'DataSource' in 'COMPLETED' or 'PENDING'+-- status can only be used to perform 'CreateMLModel', 'CreateEvaluation' or 'CreateBatchPrediction' operations.+--+-- If Amazon ML cannot accept the input source, it sets the 'Status' parameter+-- to 'FAILED' and includes an error message in the 'Message' attribute of the 'GetDataSource' operation response.+--+-- The observation data used in a 'DataSource' should be ready to use; that is,+-- it should have a consistent structure, and missing data values should be kept+-- to a minimum. The observation data must reside in one or more CSV files in an+-- Amazon Simple Storage Service (Amazon S3) bucket, along with a schema that+-- describes the data items by name and type. The same schema must be used for+-- all of the data files referenced by the 'DataSource'.+--+-- After the 'DataSource' has been created, it's ready to use in evaluations and+-- batch predictions. If you plan to use the 'DataSource' to train an 'MLModel', the 'DataSource' requires another item: a recipe. A recipe describes the+-- observation variables that participate in training an 'MLModel'. A recipe+-- describes how each input variable will be used in training. Will the variable+-- be included or excluded from training? Will the variable be manipulated, for+-- example, combined with another variable, or split apart into word+-- combinations? The recipe provides answers to these questions. For more+-- information, see the <http://docs.aws.amazon.com/machine-learning/latest/dg Amazon Machine Learning Developer Guide>.+--+-- <http://http://docs.aws.amazon.com/machine-learning/latest/APIReference/API_CreateDataSourceFromS3.html>+module Network.AWS.MachineLearning.CreateDataSourceFromS+    (+    -- * Request+      CreateDataSourceFromS3+    -- ** Request constructor+    , createDataSourceFromS3+    -- ** Request lenses+    , cdsfsComputeStatistics+    , cdsfsDataSourceId+    , cdsfsDataSourceName+    , cdsfsDataSpec++    -- * Response+    , CreateDataSourceFromS3Response+    -- ** Response constructor+    , createDataSourceFromS3Response+    -- ** Response lenses+    , cdsfsrDataSourceId+    ) where++import Network.AWS.Data (Object)+import Network.AWS.Prelude+import Network.AWS.Request.JSON+import Network.AWS.MachineLearning.Types+import qualified GHC.Exts++data CreateDataSourceFromS3 = CreateDataSourceFromS3+    { _cdsfsComputeStatistics :: Maybe Bool+    , _cdsfsDataSourceId      :: Text+    , _cdsfsDataSourceName    :: Maybe Text+    , _cdsfsDataSpec          :: S3DataSpec+    } deriving (Eq, Read, Show)++-- | 'CreateDataSourceFromS3' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'cdsfsComputeStatistics' @::@ 'Maybe' 'Bool'+--+-- * 'cdsfsDataSourceId' @::@ 'Text'+--+-- * 'cdsfsDataSourceName' @::@ 'Maybe' 'Text'+--+-- * 'cdsfsDataSpec' @::@ 'S3DataSpec'+--+createDataSourceFromS3 :: Text -- ^ 'cdsfsDataSourceId'+                       -> S3DataSpec -- ^ 'cdsfsDataSpec'+                       -> CreateDataSourceFromS3+createDataSourceFromS3 p1 p2 = CreateDataSourceFromS3+    { _cdsfsDataSourceId      = p1+    , _cdsfsDataSpec          = p2+    , _cdsfsDataSourceName    = Nothing+    , _cdsfsComputeStatistics = Nothing+    }++-- | The compute statistics for a 'DataSource'. The statistics are generated from+-- the observation data referenced by a 'DataSource'. Amazon ML uses the+-- statistics internally during an 'MLModel' training. This parameter must be set+-- to 'true' if the ''DataSource'' needs to be used for 'MLModel' training+cdsfsComputeStatistics :: Lens' CreateDataSourceFromS3 (Maybe Bool)+cdsfsComputeStatistics =+    lens _cdsfsComputeStatistics (\s a -> s { _cdsfsComputeStatistics = a })++-- | A user-supplied identifier that uniquely identifies the 'DataSource'.+cdsfsDataSourceId :: Lens' CreateDataSourceFromS3 Text+cdsfsDataSourceId =+    lens _cdsfsDataSourceId (\s a -> s { _cdsfsDataSourceId = a })++-- | A user-supplied name or description of the 'DataSource'.+cdsfsDataSourceName :: Lens' CreateDataSourceFromS3 (Maybe Text)+cdsfsDataSourceName =+    lens _cdsfsDataSourceName (\s a -> s { _cdsfsDataSourceName = a })++-- | The data specification of a 'DataSource':+--+-- DataLocationS3 - Amazon Simple Storage Service (Amazon S3) location of the+-- observation data.+--+-- DataSchemaLocationS3 - Amazon S3 location of the 'DataSchema'.+--+-- DataSchema - A JSON string representing the schema. This is not required if 'DataSchemaUri' is specified.+--+-- DataRearrangement - A JSON string representing the splitting requirement of+-- a 'Datasource'.+--+--+-- Sample - ' "{\"randomSeed\":\"some-random-seed\",\"splitting\":{\"percentBegin\":10,\"percentEnd\":60}}"'+--+--+cdsfsDataSpec :: Lens' CreateDataSourceFromS3 S3DataSpec+cdsfsDataSpec = lens _cdsfsDataSpec (\s a -> s { _cdsfsDataSpec = a })++newtype CreateDataSourceFromS3Response = CreateDataSourceFromS3Response+    { _cdsfsrDataSourceId :: Maybe Text+    } deriving (Eq, Ord, Read, Show, Monoid)++-- | 'CreateDataSourceFromS3Response' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'cdsfsrDataSourceId' @::@ 'Maybe' 'Text'+--+createDataSourceFromS3Response :: CreateDataSourceFromS3Response+createDataSourceFromS3Response = CreateDataSourceFromS3Response+    { _cdsfsrDataSourceId = Nothing+    }++-- | A user-supplied ID that uniquely identifies the datasource. This value should+-- be identical to the value of the 'DataSourceID' in the request.+cdsfsrDataSourceId :: Lens' CreateDataSourceFromS3Response (Maybe Text)+cdsfsrDataSourceId =+    lens _cdsfsrDataSourceId (\s a -> s { _cdsfsrDataSourceId = a })++instance ToPath CreateDataSourceFromS3 where+    toPath = const "/"++instance ToQuery CreateDataSourceFromS3 where+    toQuery = const mempty++instance ToHeaders CreateDataSourceFromS3++instance ToJSON CreateDataSourceFromS3 where+    toJSON CreateDataSourceFromS3{..} = object+        [ "DataSourceId"      .= _cdsfsDataSourceId+        , "DataSourceName"    .= _cdsfsDataSourceName+        , "DataSpec"          .= _cdsfsDataSpec+        , "ComputeStatistics" .= _cdsfsComputeStatistics+        ]++instance AWSRequest CreateDataSourceFromS3 where+    type Sv CreateDataSourceFromS3 = MachineLearning+    type Rs CreateDataSourceFromS3 = CreateDataSourceFromS3Response++    request  = post "CreateDataSourceFromS3"+    response = jsonResponse++instance FromJSON CreateDataSourceFromS3Response where+    parseJSON = withObject "CreateDataSourceFromS3Response" $ \o -> CreateDataSourceFromS3Response+        <$> o .:? "DataSourceId"
+ gen/Network/AWS/MachineLearning/CreateEvaluation.hs view
@@ -0,0 +1,163 @@+{-# 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.MachineLearning.CreateEvaluation+-- Copyright   : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>+-- License     : This Source Code Form is subject to the terms of+--               the Mozilla Public License, v. 2.0.+--               A copy of the MPL can be found in the LICENSE file or+--               you can obtain it at http://mozilla.org/MPL/2.0/.+-- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability   : experimental+-- Portability : non-portable (GHC extensions)+--+-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- | Creates a new 'Evaluation' of an 'MLModel'. An 'MLModel' is evaluated on a set of+-- observations associated to a 'DataSource'. Like a 'DataSource' for an 'MLModel',+-- the 'DataSource' for an 'Evaluation' contains values for the Target Variable. The 'Evaluation' compares the predicted result for each observation to the actual+-- outcome and provides a summary so that you know how effective the 'MLModel'+-- functions on the test data. Evaluation generates a relevant performance+-- metric such as BinaryAUC, RegressionRMSE or MulticlassAvgFScore based on the+-- corresponding 'MLModelType': 'BINARY', 'REGRESSION' or 'MULTICLASS'.+--+-- 'CreateEvaluation' is an asynchronous operation. In response to 'CreateEvaluation', Amazon Machine Learning (Amazon ML) immediately returns and sets the+-- evaluation status to 'PENDING'. After the 'Evaluation' is created and ready for+-- use, Amazon ML sets the status to 'COMPLETED'.+--+-- You can use the 'GetEvaluation' operation to check progress of the evaluation+-- during the creation operation.+--+-- <http://http://docs.aws.amazon.com/machine-learning/latest/APIReference/API_CreateEvaluation.html>+module Network.AWS.MachineLearning.CreateEvaluation+    (+    -- * Request+      CreateEvaluation+    -- ** Request constructor+    , createEvaluation+    -- ** Request lenses+    , ceEvaluationDataSourceId+    , ceEvaluationId+    , ceEvaluationName+    , ceMLModelId++    -- * Response+    , CreateEvaluationResponse+    -- ** Response constructor+    , createEvaluationResponse+    -- ** Response lenses+    , cerEvaluationId+    ) where++import Network.AWS.Data (Object)+import Network.AWS.Prelude+import Network.AWS.Request.JSON+import Network.AWS.MachineLearning.Types+import qualified GHC.Exts++data CreateEvaluation = CreateEvaluation+    { _ceEvaluationDataSourceId :: Text+    , _ceEvaluationId           :: Text+    , _ceEvaluationName         :: Maybe Text+    , _ceMLModelId              :: Text+    } deriving (Eq, Ord, Read, Show)++-- | 'CreateEvaluation' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'ceEvaluationDataSourceId' @::@ 'Text'+--+-- * 'ceEvaluationId' @::@ 'Text'+--+-- * 'ceEvaluationName' @::@ 'Maybe' 'Text'+--+-- * 'ceMLModelId' @::@ 'Text'+--+createEvaluation :: Text -- ^ 'ceEvaluationId'+                 -> Text -- ^ 'ceMLModelId'+                 -> Text -- ^ 'ceEvaluationDataSourceId'+                 -> CreateEvaluation+createEvaluation p1 p2 p3 = CreateEvaluation+    { _ceEvaluationId           = p1+    , _ceMLModelId              = p2+    , _ceEvaluationDataSourceId = p3+    , _ceEvaluationName         = Nothing+    }++-- | The ID of the 'DataSource' for the evaluation. The schema of the 'DataSource'+-- must match the schema used to create the 'MLModel'.+ceEvaluationDataSourceId :: Lens' CreateEvaluation Text+ceEvaluationDataSourceId =+    lens _ceEvaluationDataSourceId+        (\s a -> s { _ceEvaluationDataSourceId = a })++-- | A user-supplied ID that uniquely identifies the 'Evaluation'.+ceEvaluationId :: Lens' CreateEvaluation Text+ceEvaluationId = lens _ceEvaluationId (\s a -> s { _ceEvaluationId = a })++-- | A user-supplied name or description of the 'Evaluation'.+ceEvaluationName :: Lens' CreateEvaluation (Maybe Text)+ceEvaluationName = lens _ceEvaluationName (\s a -> s { _ceEvaluationName = a })++-- | The ID of the 'MLModel' to evaluate.+--+-- The schema used in creating the 'MLModel' must match the schema of the 'DataSource' used in the 'Evaluation'.+ceMLModelId :: Lens' CreateEvaluation Text+ceMLModelId = lens _ceMLModelId (\s a -> s { _ceMLModelId = a })++newtype CreateEvaluationResponse = CreateEvaluationResponse+    { _cerEvaluationId :: Maybe Text+    } deriving (Eq, Ord, Read, Show, Monoid)++-- | 'CreateEvaluationResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'cerEvaluationId' @::@ 'Maybe' 'Text'+--+createEvaluationResponse :: CreateEvaluationResponse+createEvaluationResponse = CreateEvaluationResponse+    { _cerEvaluationId = Nothing+    }++-- | The user-supplied ID that uniquely identifies the 'Evaluation'. This value+-- should be identical to the value of the 'EvaluationId' in the request.+cerEvaluationId :: Lens' CreateEvaluationResponse (Maybe Text)+cerEvaluationId = lens _cerEvaluationId (\s a -> s { _cerEvaluationId = a })++instance ToPath CreateEvaluation where+    toPath = const "/"++instance ToQuery CreateEvaluation where+    toQuery = const mempty++instance ToHeaders CreateEvaluation++instance ToJSON CreateEvaluation where+    toJSON CreateEvaluation{..} = object+        [ "EvaluationId"           .= _ceEvaluationId+        , "EvaluationName"         .= _ceEvaluationName+        , "MLModelId"              .= _ceMLModelId+        , "EvaluationDataSourceId" .= _ceEvaluationDataSourceId+        ]++instance AWSRequest CreateEvaluation where+    type Sv CreateEvaluation = MachineLearning+    type Rs CreateEvaluation = CreateEvaluationResponse++    request  = post "CreateEvaluation"+    response = jsonResponse++instance FromJSON CreateEvaluationResponse where+    parseJSON = withObject "CreateEvaluationResponse" $ \o -> CreateEvaluationResponse+        <$> o .:? "EvaluationId"
+ gen/Network/AWS/MachineLearning/CreateMLModel.hs view
@@ -0,0 +1,235 @@+{-# 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.MachineLearning.CreateMLModel+-- Copyright   : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>+-- License     : This Source Code Form is subject to the terms of+--               the Mozilla Public License, v. 2.0.+--               A copy of the MPL can be found in the LICENSE file or+--               you can obtain it at http://mozilla.org/MPL/2.0/.+-- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability   : experimental+-- Portability : non-portable (GHC extensions)+--+-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- | Creates a new 'MLModel' using the data files and the recipe as information+-- sources.+--+-- An 'MLModel' is nearly immutable. Users can only update the 'MLModelName' and+-- the 'ScoreThreshold' in an 'MLModel' without creating a new 'MLModel'.+--+-- 'CreateMLModel' is an asynchronous operation. In response to 'CreateMLModel',+-- Amazon Machine Learning (Amazon ML) immediately returns and sets the 'MLModel'+-- status to 'PENDING'. After the 'MLModel' is created and ready for use, Amazon ML+-- sets the status to 'COMPLETED'.+--+-- You can use the 'GetMLModel' operation to check progress of the 'MLModel' during+-- the creation operation.+--+-- 'CreateMLModel' requires a 'DataSource' with computed statistics, which can be+-- created by setting 'ComputeStatistics' to 'true' in 'CreateDataSourceFromRDS', 'CreateDataSourceFromS3', or 'CreateDataSourceFromRedshift' operations.+--+-- <http://http://docs.aws.amazon.com/machine-learning/latest/APIReference/API_CreateMLModel.html>+module Network.AWS.MachineLearning.CreateMLModel+    (+    -- * Request+      CreateMLModel+    -- ** Request constructor+    , createMLModel+    -- ** Request lenses+    , cmlmMLModelId+    , cmlmMLModelName+    , cmlmMLModelType+    , cmlmParameters+    , cmlmRecipe+    , cmlmRecipeUri+    , cmlmTrainingDataSourceId++    -- * Response+    , CreateMLModelResponse+    -- ** Response constructor+    , createMLModelResponse+    -- ** Response lenses+    , cmlmrMLModelId+    ) where++import Network.AWS.Data (Object)+import Network.AWS.Prelude+import Network.AWS.Request.JSON+import Network.AWS.MachineLearning.Types+import qualified GHC.Exts++data CreateMLModel = CreateMLModel+    { _cmlmMLModelId            :: Text+    , _cmlmMLModelName          :: Maybe Text+    , _cmlmMLModelType          :: MLModelType+    , _cmlmParameters           :: Map Text Text+    , _cmlmRecipe               :: Maybe Text+    , _cmlmRecipeUri            :: Maybe Text+    , _cmlmTrainingDataSourceId :: Text+    } deriving (Eq, Read, Show)++-- | 'CreateMLModel' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'cmlmMLModelId' @::@ 'Text'+--+-- * 'cmlmMLModelName' @::@ 'Maybe' 'Text'+--+-- * 'cmlmMLModelType' @::@ 'MLModelType'+--+-- * 'cmlmParameters' @::@ 'HashMap' 'Text' 'Text'+--+-- * 'cmlmRecipe' @::@ 'Maybe' 'Text'+--+-- * 'cmlmRecipeUri' @::@ 'Maybe' 'Text'+--+-- * 'cmlmTrainingDataSourceId' @::@ 'Text'+--+createMLModel :: Text -- ^ 'cmlmMLModelId'+              -> MLModelType -- ^ 'cmlmMLModelType'+              -> Text -- ^ 'cmlmTrainingDataSourceId'+              -> CreateMLModel+createMLModel p1 p2 p3 = CreateMLModel+    { _cmlmMLModelId            = p1+    , _cmlmMLModelType          = p2+    , _cmlmTrainingDataSourceId = p3+    , _cmlmMLModelName          = Nothing+    , _cmlmParameters           = mempty+    , _cmlmRecipe               = Nothing+    , _cmlmRecipeUri            = Nothing+    }++-- | A user-supplied ID that uniquely identifies the 'MLModel'.+cmlmMLModelId :: Lens' CreateMLModel Text+cmlmMLModelId = lens _cmlmMLModelId (\s a -> s { _cmlmMLModelId = a })++-- | A user-supplied name or description of the 'MLModel'.+cmlmMLModelName :: Lens' CreateMLModel (Maybe Text)+cmlmMLModelName = lens _cmlmMLModelName (\s a -> s { _cmlmMLModelName = a })++-- | The category of supervised learning that this 'MLModel' will address. Choose+-- from the following types:+--+-- Choose 'REGRESSION' if the 'MLModel' will be used to predict a numeric value. Choose+-- 'BINARY' if the 'MLModel' result has two possible values. Choose 'MULTICLASS' if+-- the 'MLModel' result has a limited number of values.    For more information,+-- see the <http://docs.aws.amazon.com/machine-learning/latest/dg Amazon Machine Learning Developer Guide>.+cmlmMLModelType :: Lens' CreateMLModel MLModelType+cmlmMLModelType = lens _cmlmMLModelType (\s a -> s { _cmlmMLModelType = a })++-- | A list of the training parameters in the 'MLModel'. The list is implemented as+-- a map of key/value pairs.+--+-- The following is the current set of training parameters:+--+-- 'sgd.l1RegularizationAmount' - Coefficient regularization L1 norm. It+-- controls overfitting the data by penalizing large coefficients. This tends to+-- drive coefficients to zero, resulting in sparse feature set. If you use this+-- parameter, start by specifying a small value such as 1.0E-08.+--+-- The value is a double that ranges from 0 to MAX_DOUBLE. The default is not+-- to use L1 normalization. The parameter cannot be used when 'L2' is specified.+-- Use this parameter sparingly.+--+-- 'sgd.l2RegularizationAmount' - Coefficient regularization L2 norm. It+-- controls overfitting the data by penalizing large coefficients. This tends to+-- drive coefficients to small, nonzero values. If you use this parameter, start+-- by specifying a small value such as 1.0E-08.+--+-- The valuseis a double that ranges from 0 to MAX_DOUBLE. The default is not+-- to use L2 normalization. This cannot be used when 'L1' is specified. Use this+-- parameter sparingly.+--+-- 'sgd.maxPasses' - Number of times that the training process traverses the+-- observations to build the 'MLModel'. The value is an integer that ranges from 1+-- to 10000. The default value is 10.+--+-- 'sgd.maxMLModelSizeInBytes' - Maximum allowed size of the model. Depending on+-- the input data, the size of the model might affect its performance.+--+-- The value is an integer that ranges from 100000 to 2147483648. The default+-- value is 33554432.+--+--+cmlmParameters :: Lens' CreateMLModel (HashMap Text Text)+cmlmParameters = lens _cmlmParameters (\s a -> s { _cmlmParameters = a }) . _Map++-- | The data recipe for creating 'MLModel'. You must specify either the recipe or+-- its URI. If you don’t specify a recipe or its URI, Amazon ML creates a+-- default.+cmlmRecipe :: Lens' CreateMLModel (Maybe Text)+cmlmRecipe = lens _cmlmRecipe (\s a -> s { _cmlmRecipe = a })++-- | The Amazon Simple Storage Service (Amazon S3) location and file name that+-- contains the 'MLModel' recipe. You must specify either the recipe or its URI.+-- If you don’t specify a recipe or its URI, Amazon ML creates a default.+cmlmRecipeUri :: Lens' CreateMLModel (Maybe Text)+cmlmRecipeUri = lens _cmlmRecipeUri (\s a -> s { _cmlmRecipeUri = a })++-- | The 'DataSource' that points to the training data.+cmlmTrainingDataSourceId :: Lens' CreateMLModel Text+cmlmTrainingDataSourceId =+    lens _cmlmTrainingDataSourceId+        (\s a -> s { _cmlmTrainingDataSourceId = a })++newtype CreateMLModelResponse = CreateMLModelResponse+    { _cmlmrMLModelId :: Maybe Text+    } deriving (Eq, Ord, Read, Show, Monoid)++-- | 'CreateMLModelResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'cmlmrMLModelId' @::@ 'Maybe' 'Text'+--+createMLModelResponse :: CreateMLModelResponse+createMLModelResponse = CreateMLModelResponse+    { _cmlmrMLModelId = Nothing+    }++-- | A user-supplied ID that uniquely identifies the 'MLModel'. This value should be+-- identical to the value of the 'MLModelId' in the request.+cmlmrMLModelId :: Lens' CreateMLModelResponse (Maybe Text)+cmlmrMLModelId = lens _cmlmrMLModelId (\s a -> s { _cmlmrMLModelId = a })++instance ToPath CreateMLModel where+    toPath = const "/"++instance ToQuery CreateMLModel where+    toQuery = const mempty++instance ToHeaders CreateMLModel++instance ToJSON CreateMLModel where+    toJSON CreateMLModel{..} = object+        [ "MLModelId"            .= _cmlmMLModelId+        , "MLModelName"          .= _cmlmMLModelName+        , "MLModelType"          .= _cmlmMLModelType+        , "Parameters"           .= _cmlmParameters+        , "TrainingDataSourceId" .= _cmlmTrainingDataSourceId+        , "Recipe"               .= _cmlmRecipe+        , "RecipeUri"            .= _cmlmRecipeUri+        ]++instance AWSRequest CreateMLModel where+    type Sv CreateMLModel = MachineLearning+    type Rs CreateMLModel = CreateMLModelResponse++    request  = post "CreateMLModel"+    response = jsonResponse++instance FromJSON CreateMLModelResponse where+    parseJSON = withObject "CreateMLModelResponse" $ \o -> CreateMLModelResponse+        <$> o .:? "MLModelId"
+ gen/Network/AWS/MachineLearning/CreateRealtimeEndpoint.hs view
@@ -0,0 +1,127 @@+{-# LANGUAGE DataKinds                   #-}+{-# LANGUAGE DeriveGeneric               #-}+{-# LANGUAGE FlexibleInstances           #-}+{-# LANGUAGE GeneralizedNewtypeDeriving  #-}+{-# LANGUAGE LambdaCase                  #-}+{-# LANGUAGE NoImplicitPrelude           #-}+{-# LANGUAGE OverloadedStrings           #-}+{-# LANGUAGE RecordWildCards             #-}+{-# LANGUAGE TypeFamilies                #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Module      : Network.AWS.MachineLearning.CreateRealtimeEndpoint+-- Copyright   : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>+-- License     : This Source Code Form is subject to the terms of+--               the Mozilla Public License, v. 2.0.+--               A copy of the MPL can be found in the LICENSE file or+--               you can obtain it at http://mozilla.org/MPL/2.0/.+-- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability   : experimental+-- Portability : non-portable (GHC extensions)+--+-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- | Creates a real-time endpoint for the 'MLModel'. The endpoint contains the URI+-- of the 'MLModel'; that is, the location to send real-time prediction requests+-- for the specified 'MLModel'.+--+-- <http://http://docs.aws.amazon.com/machine-learning/latest/APIReference/API_CreateRealtimeEndpoint.html>+module Network.AWS.MachineLearning.CreateRealtimeEndpoint+    (+    -- * Request+      CreateRealtimeEndpoint+    -- ** Request constructor+    , createRealtimeEndpoint+    -- ** Request lenses+    , creMLModelId++    -- * Response+    , CreateRealtimeEndpointResponse+    -- ** Response constructor+    , createRealtimeEndpointResponse+    -- ** Response lenses+    , crerMLModelId+    , crerRealtimeEndpointInfo+    ) where++import Network.AWS.Data (Object)+import Network.AWS.Prelude+import Network.AWS.Request.JSON+import Network.AWS.MachineLearning.Types+import qualified GHC.Exts++newtype CreateRealtimeEndpoint = CreateRealtimeEndpoint+    { _creMLModelId :: Text+    } deriving (Eq, Ord, Read, Show, Monoid, IsString)++-- | 'CreateRealtimeEndpoint' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'creMLModelId' @::@ 'Text'+--+createRealtimeEndpoint :: Text -- ^ 'creMLModelId'+                       -> CreateRealtimeEndpoint+createRealtimeEndpoint p1 = CreateRealtimeEndpoint+    { _creMLModelId = p1+    }++-- | The ID assigned to the 'MLModel' during creation.+creMLModelId :: Lens' CreateRealtimeEndpoint Text+creMLModelId = lens _creMLModelId (\s a -> s { _creMLModelId = a })++data CreateRealtimeEndpointResponse = CreateRealtimeEndpointResponse+    { _crerMLModelId            :: Maybe Text+    , _crerRealtimeEndpointInfo :: Maybe RealtimeEndpointInfo+    } deriving (Eq, Read, Show)++-- | 'CreateRealtimeEndpointResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'crerMLModelId' @::@ 'Maybe' 'Text'+--+-- * 'crerRealtimeEndpointInfo' @::@ 'Maybe' 'RealtimeEndpointInfo'+--+createRealtimeEndpointResponse :: CreateRealtimeEndpointResponse+createRealtimeEndpointResponse = CreateRealtimeEndpointResponse+    { _crerMLModelId            = Nothing+    , _crerRealtimeEndpointInfo = Nothing+    }++-- | A user-supplied ID that uniquely identifies the 'MLModel'. This value should be+-- identical to the value of the 'MLModelId' in the request.+crerMLModelId :: Lens' CreateRealtimeEndpointResponse (Maybe Text)+crerMLModelId = lens _crerMLModelId (\s a -> s { _crerMLModelId = a })++-- | The endpoint information of the 'MLModel'+crerRealtimeEndpointInfo :: Lens' CreateRealtimeEndpointResponse (Maybe RealtimeEndpointInfo)+crerRealtimeEndpointInfo =+    lens _crerRealtimeEndpointInfo+        (\s a -> s { _crerRealtimeEndpointInfo = a })++instance ToPath CreateRealtimeEndpoint where+    toPath = const "/"++instance ToQuery CreateRealtimeEndpoint where+    toQuery = const mempty++instance ToHeaders CreateRealtimeEndpoint++instance ToJSON CreateRealtimeEndpoint where+    toJSON CreateRealtimeEndpoint{..} = object+        [ "MLModelId" .= _creMLModelId+        ]++instance AWSRequest CreateRealtimeEndpoint where+    type Sv CreateRealtimeEndpoint = MachineLearning+    type Rs CreateRealtimeEndpoint = CreateRealtimeEndpointResponse++    request  = post "CreateRealtimeEndpoint"+    response = jsonResponse++instance FromJSON CreateRealtimeEndpointResponse where+    parseJSON = withObject "CreateRealtimeEndpointResponse" $ \o -> CreateRealtimeEndpointResponse+        <$> o .:? "MLModelId"+        <*> o .:? "RealtimeEndpointInfo"
+ gen/Network/AWS/MachineLearning/DeleteBatchPrediction.hs view
@@ -0,0 +1,121 @@+{-# 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.MachineLearning.DeleteBatchPrediction+-- Copyright   : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>+-- License     : This Source Code Form is subject to the terms of+--               the Mozilla Public License, v. 2.0.+--               A copy of the MPL can be found in the LICENSE file or+--               you can obtain it at http://mozilla.org/MPL/2.0/.+-- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability   : experimental+-- Portability : non-portable (GHC extensions)+--+-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- | Assigns the DELETED status to a 'BatchPrediction', rendering it unusable.+--+-- After using the 'DeleteBatchPrediction' operation, you can use the 'GetBatchPrediction' operation to verify that the status of the 'BatchPrediction' changed to+-- DELETED.+--+-- Caution The result of the 'DeleteBatchPrediction' operation is irreversible.+--+--+-- <http://http://docs.aws.amazon.com/machine-learning/latest/APIReference/API_DeleteBatchPrediction.html>+module Network.AWS.MachineLearning.DeleteBatchPrediction+    (+    -- * Request+      DeleteBatchPrediction+    -- ** Request constructor+    , deleteBatchPrediction+    -- ** Request lenses+    , dbpBatchPredictionId++    -- * Response+    , DeleteBatchPredictionResponse+    -- ** Response constructor+    , deleteBatchPredictionResponse+    -- ** Response lenses+    , dbprBatchPredictionId+    ) where++import Network.AWS.Data (Object)+import Network.AWS.Prelude+import Network.AWS.Request.JSON+import Network.AWS.MachineLearning.Types+import qualified GHC.Exts++newtype DeleteBatchPrediction = DeleteBatchPrediction+    { _dbpBatchPredictionId :: Text+    } deriving (Eq, Ord, Read, Show, Monoid, IsString)++-- | 'DeleteBatchPrediction' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'dbpBatchPredictionId' @::@ 'Text'+--+deleteBatchPrediction :: Text -- ^ 'dbpBatchPredictionId'+                      -> DeleteBatchPrediction+deleteBatchPrediction p1 = DeleteBatchPrediction+    { _dbpBatchPredictionId = p1+    }++-- | A user-supplied ID that uniquely identifies the 'BatchPrediction'.+dbpBatchPredictionId :: Lens' DeleteBatchPrediction Text+dbpBatchPredictionId =+    lens _dbpBatchPredictionId (\s a -> s { _dbpBatchPredictionId = a })++newtype DeleteBatchPredictionResponse = DeleteBatchPredictionResponse+    { _dbprBatchPredictionId :: Maybe Text+    } deriving (Eq, Ord, Read, Show, Monoid)++-- | 'DeleteBatchPredictionResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'dbprBatchPredictionId' @::@ 'Maybe' 'Text'+--+deleteBatchPredictionResponse :: DeleteBatchPredictionResponse+deleteBatchPredictionResponse = DeleteBatchPredictionResponse+    { _dbprBatchPredictionId = Nothing+    }++-- | A user-supplied ID that uniquely identifies the 'BatchPrediction'. This value+-- should be identical to the value of the 'BatchPredictionID' in the request.+dbprBatchPredictionId :: Lens' DeleteBatchPredictionResponse (Maybe Text)+dbprBatchPredictionId =+    lens _dbprBatchPredictionId (\s a -> s { _dbprBatchPredictionId = a })++instance ToPath DeleteBatchPrediction where+    toPath = const "/"++instance ToQuery DeleteBatchPrediction where+    toQuery = const mempty++instance ToHeaders DeleteBatchPrediction++instance ToJSON DeleteBatchPrediction where+    toJSON DeleteBatchPrediction{..} = object+        [ "BatchPredictionId" .= _dbpBatchPredictionId+        ]++instance AWSRequest DeleteBatchPrediction where+    type Sv DeleteBatchPrediction = MachineLearning+    type Rs DeleteBatchPrediction = DeleteBatchPredictionResponse++    request  = post "DeleteBatchPrediction"+    response = jsonResponse++instance FromJSON DeleteBatchPredictionResponse where+    parseJSON = withObject "DeleteBatchPredictionResponse" $ \o -> DeleteBatchPredictionResponse+        <$> o .:? "BatchPredictionId"
+ gen/Network/AWS/MachineLearning/DeleteDataSource.hs view
@@ -0,0 +1,119 @@+{-# 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.MachineLearning.DeleteDataSource+-- Copyright   : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>+-- License     : This Source Code Form is subject to the terms of+--               the Mozilla Public License, v. 2.0.+--               A copy of the MPL can be found in the LICENSE file or+--               you can obtain it at http://mozilla.org/MPL/2.0/.+-- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability   : experimental+-- Portability : non-portable (GHC extensions)+--+-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- | Assigns the DELETED status to a 'DataSource', rendering it unusable.+--+-- After using the 'DeleteDataSource' operation, you can use the 'GetDataSource'+-- operation to verify that the status of the 'DataSource' changed to DELETED.+--+-- Caution The results of the 'DeleteDataSource' operation are irreversible.+--+--+-- <http://http://docs.aws.amazon.com/machine-learning/latest/APIReference/API_DeleteDataSource.html>+module Network.AWS.MachineLearning.DeleteDataSource+    (+    -- * Request+      DeleteDataSource+    -- ** Request constructor+    , deleteDataSource+    -- ** Request lenses+    , ddsDataSourceId++    -- * Response+    , DeleteDataSourceResponse+    -- ** Response constructor+    , deleteDataSourceResponse+    -- ** Response lenses+    , ddsrDataSourceId+    ) where++import Network.AWS.Data (Object)+import Network.AWS.Prelude+import Network.AWS.Request.JSON+import Network.AWS.MachineLearning.Types+import qualified GHC.Exts++newtype DeleteDataSource = DeleteDataSource+    { _ddsDataSourceId :: Text+    } deriving (Eq, Ord, Read, Show, Monoid, IsString)++-- | 'DeleteDataSource' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'ddsDataSourceId' @::@ 'Text'+--+deleteDataSource :: Text -- ^ 'ddsDataSourceId'+                 -> DeleteDataSource+deleteDataSource p1 = DeleteDataSource+    { _ddsDataSourceId = p1+    }++-- | A user-supplied ID that uniquely identifies the 'DataSource'.+ddsDataSourceId :: Lens' DeleteDataSource Text+ddsDataSourceId = lens _ddsDataSourceId (\s a -> s { _ddsDataSourceId = a })++newtype DeleteDataSourceResponse = DeleteDataSourceResponse+    { _ddsrDataSourceId :: Maybe Text+    } deriving (Eq, Ord, Read, Show, Monoid)++-- | 'DeleteDataSourceResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'ddsrDataSourceId' @::@ 'Maybe' 'Text'+--+deleteDataSourceResponse :: DeleteDataSourceResponse+deleteDataSourceResponse = DeleteDataSourceResponse+    { _ddsrDataSourceId = Nothing+    }++-- | A user-supplied ID that uniquely identifies the 'DataSource'. This value should+-- be identical to the value of the 'DataSourceID' in the request.+ddsrDataSourceId :: Lens' DeleteDataSourceResponse (Maybe Text)+ddsrDataSourceId = lens _ddsrDataSourceId (\s a -> s { _ddsrDataSourceId = a })++instance ToPath DeleteDataSource where+    toPath = const "/"++instance ToQuery DeleteDataSource where+    toQuery = const mempty++instance ToHeaders DeleteDataSource++instance ToJSON DeleteDataSource where+    toJSON DeleteDataSource{..} = object+        [ "DataSourceId" .= _ddsDataSourceId+        ]++instance AWSRequest DeleteDataSource where+    type Sv DeleteDataSource = MachineLearning+    type Rs DeleteDataSource = DeleteDataSourceResponse++    request  = post "DeleteDataSource"+    response = jsonResponse++instance FromJSON DeleteDataSourceResponse where+    parseJSON = withObject "DeleteDataSourceResponse" $ \o -> DeleteDataSourceResponse+        <$> o .:? "DataSourceId"
+ gen/Network/AWS/MachineLearning/DeleteEvaluation.hs view
@@ -0,0 +1,119 @@+{-# 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.MachineLearning.DeleteEvaluation+-- Copyright   : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>+-- License     : This Source Code Form is subject to the terms of+--               the Mozilla Public License, v. 2.0.+--               A copy of the MPL can be found in the LICENSE file or+--               you can obtain it at http://mozilla.org/MPL/2.0/.+-- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability   : experimental+-- Portability : non-portable (GHC extensions)+--+-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- | Assigns the 'DELETED' status to an 'Evaluation', rendering it unusable.+--+-- After invoking the 'DeleteEvaluation' operation, you can use the 'GetEvaluation'+-- operation to verify that the status of the 'Evaluation' changed to 'DELETED'.+--+-- Caution The results of the 'DeleteEvaluation' operation are irreversible.+--+--+-- <http://http://docs.aws.amazon.com/machine-learning/latest/APIReference/API_DeleteEvaluation.html>+module Network.AWS.MachineLearning.DeleteEvaluation+    (+    -- * Request+      DeleteEvaluation+    -- ** Request constructor+    , deleteEvaluation+    -- ** Request lenses+    , deEvaluationId++    -- * Response+    , DeleteEvaluationResponse+    -- ** Response constructor+    , deleteEvaluationResponse+    -- ** Response lenses+    , derEvaluationId+    ) where++import Network.AWS.Data (Object)+import Network.AWS.Prelude+import Network.AWS.Request.JSON+import Network.AWS.MachineLearning.Types+import qualified GHC.Exts++newtype DeleteEvaluation = DeleteEvaluation+    { _deEvaluationId :: Text+    } deriving (Eq, Ord, Read, Show, Monoid, IsString)++-- | 'DeleteEvaluation' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'deEvaluationId' @::@ 'Text'+--+deleteEvaluation :: Text -- ^ 'deEvaluationId'+                 -> DeleteEvaluation+deleteEvaluation p1 = DeleteEvaluation+    { _deEvaluationId = p1+    }++-- | A user-supplied ID that uniquely identifies the 'Evaluation' to delete.+deEvaluationId :: Lens' DeleteEvaluation Text+deEvaluationId = lens _deEvaluationId (\s a -> s { _deEvaluationId = a })++newtype DeleteEvaluationResponse = DeleteEvaluationResponse+    { _derEvaluationId :: Maybe Text+    } deriving (Eq, Ord, Read, Show, Monoid)++-- | 'DeleteEvaluationResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'derEvaluationId' @::@ 'Maybe' 'Text'+--+deleteEvaluationResponse :: DeleteEvaluationResponse+deleteEvaluationResponse = DeleteEvaluationResponse+    { _derEvaluationId = Nothing+    }++-- | A user-supplied ID that uniquely identifies the 'Evaluation'. This value should+-- be identical to the value of the 'EvaluationId' in the request.+derEvaluationId :: Lens' DeleteEvaluationResponse (Maybe Text)+derEvaluationId = lens _derEvaluationId (\s a -> s { _derEvaluationId = a })++instance ToPath DeleteEvaluation where+    toPath = const "/"++instance ToQuery DeleteEvaluation where+    toQuery = const mempty++instance ToHeaders DeleteEvaluation++instance ToJSON DeleteEvaluation where+    toJSON DeleteEvaluation{..} = object+        [ "EvaluationId" .= _deEvaluationId+        ]++instance AWSRequest DeleteEvaluation where+    type Sv DeleteEvaluation = MachineLearning+    type Rs DeleteEvaluation = DeleteEvaluationResponse++    request  = post "DeleteEvaluation"+    response = jsonResponse++instance FromJSON DeleteEvaluationResponse where+    parseJSON = withObject "DeleteEvaluationResponse" $ \o -> DeleteEvaluationResponse+        <$> o .:? "EvaluationId"
+ gen/Network/AWS/MachineLearning/DeleteMLModel.hs view
@@ -0,0 +1,119 @@+{-# 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.MachineLearning.DeleteMLModel+-- Copyright   : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>+-- License     : This Source Code Form is subject to the terms of+--               the Mozilla Public License, v. 2.0.+--               A copy of the MPL can be found in the LICENSE file or+--               you can obtain it at http://mozilla.org/MPL/2.0/.+-- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability   : experimental+-- Portability : non-portable (GHC extensions)+--+-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- | Assigns the DELETED status to an 'MLModel', rendering it unusable.+--+-- After using the 'DeleteMLModel' operation, you can use the 'GetMLModel'+-- operation to verify that the status of the 'MLModel' changed to DELETED.+--+-- Caution The result of the 'DeleteMLModel' operation is irreversible.+--+--+-- <http://http://docs.aws.amazon.com/machine-learning/latest/APIReference/API_DeleteMLModel.html>+module Network.AWS.MachineLearning.DeleteMLModel+    (+    -- * Request+      DeleteMLModel+    -- ** Request constructor+    , deleteMLModel+    -- ** Request lenses+    , dmlmMLModelId++    -- * Response+    , DeleteMLModelResponse+    -- ** Response constructor+    , deleteMLModelResponse+    -- ** Response lenses+    , dmlmrMLModelId+    ) where++import Network.AWS.Data (Object)+import Network.AWS.Prelude+import Network.AWS.Request.JSON+import Network.AWS.MachineLearning.Types+import qualified GHC.Exts++newtype DeleteMLModel = DeleteMLModel+    { _dmlmMLModelId :: Text+    } deriving (Eq, Ord, Read, Show, Monoid, IsString)++-- | 'DeleteMLModel' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'dmlmMLModelId' @::@ 'Text'+--+deleteMLModel :: Text -- ^ 'dmlmMLModelId'+              -> DeleteMLModel+deleteMLModel p1 = DeleteMLModel+    { _dmlmMLModelId = p1+    }++-- | A user-supplied ID that uniquely identifies the 'MLModel'.+dmlmMLModelId :: Lens' DeleteMLModel Text+dmlmMLModelId = lens _dmlmMLModelId (\s a -> s { _dmlmMLModelId = a })++newtype DeleteMLModelResponse = DeleteMLModelResponse+    { _dmlmrMLModelId :: Maybe Text+    } deriving (Eq, Ord, Read, Show, Monoid)++-- | 'DeleteMLModelResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'dmlmrMLModelId' @::@ 'Maybe' 'Text'+--+deleteMLModelResponse :: DeleteMLModelResponse+deleteMLModelResponse = DeleteMLModelResponse+    { _dmlmrMLModelId = Nothing+    }++-- | A user-supplied ID that uniquely identifies the 'MLModel'. This value should be+-- identical to the value of the 'MLModelID' in the request.+dmlmrMLModelId :: Lens' DeleteMLModelResponse (Maybe Text)+dmlmrMLModelId = lens _dmlmrMLModelId (\s a -> s { _dmlmrMLModelId = a })++instance ToPath DeleteMLModel where+    toPath = const "/"++instance ToQuery DeleteMLModel where+    toQuery = const mempty++instance ToHeaders DeleteMLModel++instance ToJSON DeleteMLModel where+    toJSON DeleteMLModel{..} = object+        [ "MLModelId" .= _dmlmMLModelId+        ]++instance AWSRequest DeleteMLModel where+    type Sv DeleteMLModel = MachineLearning+    type Rs DeleteMLModel = DeleteMLModelResponse++    request  = post "DeleteMLModel"+    response = jsonResponse++instance FromJSON DeleteMLModelResponse where+    parseJSON = withObject "DeleteMLModelResponse" $ \o -> DeleteMLModelResponse+        <$> o .:? "MLModelId"
+ gen/Network/AWS/MachineLearning/DeleteRealtimeEndpoint.hs view
@@ -0,0 +1,125 @@+{-# 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.MachineLearning.DeleteRealtimeEndpoint+-- Copyright   : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>+-- License     : This Source Code Form is subject to the terms of+--               the Mozilla Public License, v. 2.0.+--               A copy of the MPL can be found in the LICENSE file or+--               you can obtain it at http://mozilla.org/MPL/2.0/.+-- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability   : experimental+-- Portability : non-portable (GHC extensions)+--+-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- | Deletes a real time endpoint of an 'MLModel'.+--+-- <http://http://docs.aws.amazon.com/machine-learning/latest/APIReference/API_DeleteRealtimeEndpoint.html>+module Network.AWS.MachineLearning.DeleteRealtimeEndpoint+    (+    -- * Request+      DeleteRealtimeEndpoint+    -- ** Request constructor+    , deleteRealtimeEndpoint+    -- ** Request lenses+    , dreMLModelId++    -- * Response+    , DeleteRealtimeEndpointResponse+    -- ** Response constructor+    , deleteRealtimeEndpointResponse+    -- ** Response lenses+    , drerMLModelId+    , drerRealtimeEndpointInfo+    ) where++import Network.AWS.Data (Object)+import Network.AWS.Prelude+import Network.AWS.Request.JSON+import Network.AWS.MachineLearning.Types+import qualified GHC.Exts++newtype DeleteRealtimeEndpoint = DeleteRealtimeEndpoint+    { _dreMLModelId :: Text+    } deriving (Eq, Ord, Read, Show, Monoid, IsString)++-- | 'DeleteRealtimeEndpoint' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'dreMLModelId' @::@ 'Text'+--+deleteRealtimeEndpoint :: Text -- ^ 'dreMLModelId'+                       -> DeleteRealtimeEndpoint+deleteRealtimeEndpoint p1 = DeleteRealtimeEndpoint+    { _dreMLModelId = p1+    }++-- | The ID assigned to the 'MLModel' during creation.+dreMLModelId :: Lens' DeleteRealtimeEndpoint Text+dreMLModelId = lens _dreMLModelId (\s a -> s { _dreMLModelId = a })++data DeleteRealtimeEndpointResponse = DeleteRealtimeEndpointResponse+    { _drerMLModelId            :: Maybe Text+    , _drerRealtimeEndpointInfo :: Maybe RealtimeEndpointInfo+    } deriving (Eq, Read, Show)++-- | 'DeleteRealtimeEndpointResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'drerMLModelId' @::@ 'Maybe' 'Text'+--+-- * 'drerRealtimeEndpointInfo' @::@ 'Maybe' 'RealtimeEndpointInfo'+--+deleteRealtimeEndpointResponse :: DeleteRealtimeEndpointResponse+deleteRealtimeEndpointResponse = DeleteRealtimeEndpointResponse+    { _drerMLModelId            = Nothing+    , _drerRealtimeEndpointInfo = Nothing+    }++-- | A user-supplied ID that uniquely identifies the 'MLModel'. This value should be+-- identical to the value of the 'MLModelId' in the request.+drerMLModelId :: Lens' DeleteRealtimeEndpointResponse (Maybe Text)+drerMLModelId = lens _drerMLModelId (\s a -> s { _drerMLModelId = a })++-- | The endpoint information of the 'MLModel'+drerRealtimeEndpointInfo :: Lens' DeleteRealtimeEndpointResponse (Maybe RealtimeEndpointInfo)+drerRealtimeEndpointInfo =+    lens _drerRealtimeEndpointInfo+        (\s a -> s { _drerRealtimeEndpointInfo = a })++instance ToPath DeleteRealtimeEndpoint where+    toPath = const "/"++instance ToQuery DeleteRealtimeEndpoint where+    toQuery = const mempty++instance ToHeaders DeleteRealtimeEndpoint++instance ToJSON DeleteRealtimeEndpoint where+    toJSON DeleteRealtimeEndpoint{..} = object+        [ "MLModelId" .= _dreMLModelId+        ]++instance AWSRequest DeleteRealtimeEndpoint where+    type Sv DeleteRealtimeEndpoint = MachineLearning+    type Rs DeleteRealtimeEndpoint = DeleteRealtimeEndpointResponse++    request  = post "DeleteRealtimeEndpoint"+    response = jsonResponse++instance FromJSON DeleteRealtimeEndpointResponse where+    parseJSON = withObject "DeleteRealtimeEndpointResponse" $ \o -> DeleteRealtimeEndpointResponse+        <$> o .:? "MLModelId"+        <*> o .:? "RealtimeEndpointInfo"
+ gen/Network/AWS/MachineLearning/DescribeBatchPredictions.hs view
@@ -0,0 +1,252 @@+{-# 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.MachineLearning.DescribeBatchPredictions+-- Copyright   : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>+-- License     : This Source Code Form is subject to the terms of+--               the Mozilla Public License, v. 2.0.+--               A copy of the MPL can be found in the LICENSE file or+--               you can obtain it at http://mozilla.org/MPL/2.0/.+-- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability   : experimental+-- Portability : non-portable (GHC extensions)+--+-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- | Returns a list of 'BatchPrediction' operations that match the search criteria+-- in the request.+--+-- <http://http://docs.aws.amazon.com/machine-learning/latest/APIReference/API_DescribeBatchPredictions.html>+module Network.AWS.MachineLearning.DescribeBatchPredictions+    (+    -- * Request+      DescribeBatchPredictions+    -- ** Request constructor+    , describeBatchPredictions+    -- ** Request lenses+    , dbpEQ+    , dbpFilterVariable+    , dbpGE+    , dbpGT+    , dbpLE+    , dbpLT+    , dbpLimit+    , dbpNE+    , dbpNextToken+    , dbpPrefix+    , dbpSortOrder++    -- * Response+    , DescribeBatchPredictionsResponse+    -- ** Response constructor+    , describeBatchPredictionsResponse+    -- ** Response lenses+    , dbprNextToken+    , dbprResults+    ) where++import Network.AWS.Data (Object)+import Network.AWS.Prelude+import Network.AWS.Request.JSON+import Network.AWS.MachineLearning.Types+import qualified GHC.Exts++data DescribeBatchPredictions = DescribeBatchPredictions+    { _dbpEQ             :: Maybe Text+    , _dbpFilterVariable :: Maybe BatchPredictionFilterVariable+    , _dbpGE             :: Maybe Text+    , _dbpGT             :: Maybe Text+    , _dbpLE             :: Maybe Text+    , _dbpLT             :: Maybe Text+    , _dbpLimit          :: Maybe Nat+    , _dbpNE             :: Maybe Text+    , _dbpNextToken      :: Maybe Text+    , _dbpPrefix         :: Maybe Text+    , _dbpSortOrder      :: Maybe SortOrder+    } deriving (Eq, Read, Show)++-- | 'DescribeBatchPredictions' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'dbpEQ' @::@ 'Maybe' 'Text'+--+-- * 'dbpFilterVariable' @::@ 'Maybe' 'BatchPredictionFilterVariable'+--+-- * 'dbpGE' @::@ 'Maybe' 'Text'+--+-- * 'dbpGT' @::@ 'Maybe' 'Text'+--+-- * 'dbpLE' @::@ 'Maybe' 'Text'+--+-- * 'dbpLT' @::@ 'Maybe' 'Text'+--+-- * 'dbpLimit' @::@ 'Maybe' 'Natural'+--+-- * 'dbpNE' @::@ 'Maybe' 'Text'+--+-- * 'dbpNextToken' @::@ 'Maybe' 'Text'+--+-- * 'dbpPrefix' @::@ 'Maybe' 'Text'+--+-- * 'dbpSortOrder' @::@ 'Maybe' 'SortOrder'+--+describeBatchPredictions :: DescribeBatchPredictions+describeBatchPredictions = DescribeBatchPredictions+    { _dbpFilterVariable = Nothing+    , _dbpEQ             = Nothing+    , _dbpGT             = Nothing+    , _dbpLT             = Nothing+    , _dbpGE             = Nothing+    , _dbpLE             = Nothing+    , _dbpNE             = Nothing+    , _dbpPrefix         = Nothing+    , _dbpSortOrder      = Nothing+    , _dbpNextToken      = Nothing+    , _dbpLimit          = Nothing+    }++-- | The equal to operator. The 'BatchPrediction' results will have 'FilterVariable'+-- values that exactly match the value specified with 'EQ'.+dbpEQ :: Lens' DescribeBatchPredictions (Maybe Text)+dbpEQ = lens _dbpEQ (\s a -> s { _dbpEQ = a })++-- | Use one of the following variables to filter a list of 'BatchPrediction':+--+-- 'CreatedAt' - Sets the search criteria to the 'BatchPrediction' creation date.+-- 'Status' - Sets the search criteria to the 'BatchPrediction' status.  'Name' -+-- Sets the search criteria to the contents of the 'BatchPrediction'  'Name'.  'IAMUser' - Sets the search criteria to the user account that invoked the 'BatchPrediction' creation.  'MLModelId' - Sets the search criteria to the 'MLModel' used in the 'BatchPrediction'.  'DataSourceId' - Sets the search criteria to the 'DataSource' used in the 'BatchPrediction'.  'DataURI' - Sets the search criteria to the data file(s) used in the 'BatchPrediction'. The URL can identify either a file or an Amazon Simple Storage Solution+-- (Amazon S3) bucket or directory.+dbpFilterVariable :: Lens' DescribeBatchPredictions (Maybe BatchPredictionFilterVariable)+dbpFilterVariable =+    lens _dbpFilterVariable (\s a -> s { _dbpFilterVariable = a })++-- | The greater than or equal to operator. The 'BatchPrediction' results will have 'FilterVariable' values that are greater than or equal to the value specified with 'GE'.+dbpGE :: Lens' DescribeBatchPredictions (Maybe Text)+dbpGE = lens _dbpGE (\s a -> s { _dbpGE = a })++-- | The greater than operator. The 'BatchPrediction' results will have 'FilterVariable' values that are greater than the value specified with 'GT'.+dbpGT :: Lens' DescribeBatchPredictions (Maybe Text)+dbpGT = lens _dbpGT (\s a -> s { _dbpGT = a })++-- | The less than or equal to operator. The 'BatchPrediction' results will have 'FilterVariable' values that are less than or equal to the value specified with 'LE'.+dbpLE :: Lens' DescribeBatchPredictions (Maybe Text)+dbpLE = lens _dbpLE (\s a -> s { _dbpLE = a })++-- | The less than operator. The 'BatchPrediction' results will have 'FilterVariable'+-- values that are less than the value specified with 'LT'.+dbpLT :: Lens' DescribeBatchPredictions (Maybe Text)+dbpLT = lens _dbpLT (\s a -> s { _dbpLT = a })++-- | The number of pages of information to include in the result. The range of+-- acceptable values is 1 through 100. The default value is 100.+dbpLimit :: Lens' DescribeBatchPredictions (Maybe Natural)+dbpLimit = lens _dbpLimit (\s a -> s { _dbpLimit = a }) . mapping _Nat++-- | The not equal to operator. The 'BatchPrediction' results will have 'FilterVariable' values not equal to the value specified with 'NE'.+dbpNE :: Lens' DescribeBatchPredictions (Maybe Text)+dbpNE = lens _dbpNE (\s a -> s { _dbpNE = a })++-- | An ID of the page in the paginated results.+dbpNextToken :: Lens' DescribeBatchPredictions (Maybe Text)+dbpNextToken = lens _dbpNextToken (\s a -> s { _dbpNextToken = a })++-- | A string that is found at the beginning of a variable, such as 'Name' or 'Id'.+--+-- For example, a 'Batch Prediction' operation could have the 'Name' '2014-09-09-HolidayGiftMailer'. To search for this 'BatchPrediction', select 'Name' for the 'FilterVariable' and+-- any of the following strings for the 'Prefix':+--+-- 2014-09+--+-- 2014-09-09+--+-- 2014-09-09-Holiday+--+--+dbpPrefix :: Lens' DescribeBatchPredictions (Maybe Text)+dbpPrefix = lens _dbpPrefix (\s a -> s { _dbpPrefix = a })++-- | A two-value parameter that determines the sequence of the resulting list of 'MLModel's.+--+-- 'asc' - Arranges the list in ascending order (A-Z, 0-9).  'dsc' - Arranges the+-- list in descending order (Z-A, 9-0).  Results are sorted by 'FilterVariable'.+dbpSortOrder :: Lens' DescribeBatchPredictions (Maybe SortOrder)+dbpSortOrder = lens _dbpSortOrder (\s a -> s { _dbpSortOrder = a })++data DescribeBatchPredictionsResponse = DescribeBatchPredictionsResponse+    { _dbprNextToken :: Maybe Text+    , _dbprResults   :: List "Results" BatchPrediction+    } deriving (Eq, Read, Show)++-- | 'DescribeBatchPredictionsResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'dbprNextToken' @::@ 'Maybe' 'Text'+--+-- * 'dbprResults' @::@ ['BatchPrediction']+--+describeBatchPredictionsResponse :: DescribeBatchPredictionsResponse+describeBatchPredictionsResponse = DescribeBatchPredictionsResponse+    { _dbprResults   = mempty+    , _dbprNextToken = Nothing+    }++-- | The ID of the next page in the paginated results that indicates at least one+-- more page follows.+dbprNextToken :: Lens' DescribeBatchPredictionsResponse (Maybe Text)+dbprNextToken = lens _dbprNextToken (\s a -> s { _dbprNextToken = a })++-- | A list of 'BatchPrediction' objects that meet the search criteria.+dbprResults :: Lens' DescribeBatchPredictionsResponse [BatchPrediction]+dbprResults = lens _dbprResults (\s a -> s { _dbprResults = a }) . _List++instance ToPath DescribeBatchPredictions where+    toPath = const "/"++instance ToQuery DescribeBatchPredictions where+    toQuery = const mempty++instance ToHeaders DescribeBatchPredictions++instance ToJSON DescribeBatchPredictions where+    toJSON DescribeBatchPredictions{..} = object+        [ "FilterVariable" .= _dbpFilterVariable+        , "EQ"             .= _dbpEQ+        , "GT"             .= _dbpGT+        , "LT"             .= _dbpLT+        , "GE"             .= _dbpGE+        , "LE"             .= _dbpLE+        , "NE"             .= _dbpNE+        , "Prefix"         .= _dbpPrefix+        , "SortOrder"      .= _dbpSortOrder+        , "NextToken"      .= _dbpNextToken+        , "Limit"          .= _dbpLimit+        ]++instance AWSRequest DescribeBatchPredictions where+    type Sv DescribeBatchPredictions = MachineLearning+    type Rs DescribeBatchPredictions = DescribeBatchPredictionsResponse++    request  = post "DescribeBatchPredictions"+    response = jsonResponse++instance FromJSON DescribeBatchPredictionsResponse where+    parseJSON = withObject "DescribeBatchPredictionsResponse" $ \o -> DescribeBatchPredictionsResponse+        <$> o .:? "NextToken"+        <*> o .:? "Results" .!= mempty++instance AWSPager DescribeBatchPredictions where+    page rq rs+        | stop (rs ^. dbprNextToken) = Nothing+        | otherwise = (\x -> rq & dbpNextToken ?~ x)+            <$> (rs ^. dbprNextToken)
+ gen/Network/AWS/MachineLearning/DescribeDataSources.hs view
@@ -0,0 +1,256 @@+{-# 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.MachineLearning.DescribeDataSources+-- Copyright   : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>+-- License     : This Source Code Form is subject to the terms of+--               the Mozilla Public License, v. 2.0.+--               A copy of the MPL can be found in the LICENSE file or+--               you can obtain it at http://mozilla.org/MPL/2.0/.+-- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability   : experimental+-- Portability : non-portable (GHC extensions)+--+-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- | Returns a list of 'DataSource' that match the search criteria in the request.+--+-- <http://http://docs.aws.amazon.com/machine-learning/latest/APIReference/API_DescribeDataSources.html>+module Network.AWS.MachineLearning.DescribeDataSources+    (+    -- * Request+      DescribeDataSources+    -- ** Request constructor+    , describeDataSources+    -- ** Request lenses+    , ddsEQ+    , ddsFilterVariable+    , ddsGE+    , ddsGT+    , ddsLE+    , ddsLT+    , ddsLimit+    , ddsNE+    , ddsNextToken+    , ddsPrefix+    , ddsSortOrder++    -- * Response+    , DescribeDataSourcesResponse+    -- ** Response constructor+    , describeDataSourcesResponse+    -- ** Response lenses+    , ddsrNextToken+    , ddsrResults+    ) where++import Network.AWS.Data (Object)+import Network.AWS.Prelude+import Network.AWS.Request.JSON+import Network.AWS.MachineLearning.Types+import qualified GHC.Exts++data DescribeDataSources = DescribeDataSources+    { _ddsEQ             :: Maybe Text+    , _ddsFilterVariable :: Maybe DataSourceFilterVariable+    , _ddsGE             :: Maybe Text+    , _ddsGT             :: Maybe Text+    , _ddsLE             :: Maybe Text+    , _ddsLT             :: Maybe Text+    , _ddsLimit          :: Maybe Nat+    , _ddsNE             :: Maybe Text+    , _ddsNextToken      :: Maybe Text+    , _ddsPrefix         :: Maybe Text+    , _ddsSortOrder      :: Maybe SortOrder+    } deriving (Eq, Read, Show)++-- | 'DescribeDataSources' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'ddsEQ' @::@ 'Maybe' 'Text'+--+-- * 'ddsFilterVariable' @::@ 'Maybe' 'DataSourceFilterVariable'+--+-- * 'ddsGE' @::@ 'Maybe' 'Text'+--+-- * 'ddsGT' @::@ 'Maybe' 'Text'+--+-- * 'ddsLE' @::@ 'Maybe' 'Text'+--+-- * 'ddsLT' @::@ 'Maybe' 'Text'+--+-- * 'ddsLimit' @::@ 'Maybe' 'Natural'+--+-- * 'ddsNE' @::@ 'Maybe' 'Text'+--+-- * 'ddsNextToken' @::@ 'Maybe' 'Text'+--+-- * 'ddsPrefix' @::@ 'Maybe' 'Text'+--+-- * 'ddsSortOrder' @::@ 'Maybe' 'SortOrder'+--+describeDataSources :: DescribeDataSources+describeDataSources = DescribeDataSources+    { _ddsFilterVariable = Nothing+    , _ddsEQ             = Nothing+    , _ddsGT             = Nothing+    , _ddsLT             = Nothing+    , _ddsGE             = Nothing+    , _ddsLE             = Nothing+    , _ddsNE             = Nothing+    , _ddsPrefix         = Nothing+    , _ddsSortOrder      = Nothing+    , _ddsNextToken      = Nothing+    , _ddsLimit          = Nothing+    }++-- | The equal to operator. The 'DataSource' results will have 'FilterVariable' values+-- that exactly match the value specified with 'EQ'.+ddsEQ :: Lens' DescribeDataSources (Maybe Text)+ddsEQ = lens _ddsEQ (\s a -> s { _ddsEQ = a })++-- | Use one of the following variables to filter a list of 'DataSource':+--+-- 'CreatedAt' - Sets the search criteria to 'DataSource' creation dates.  'Status'+-- - Sets the search criteria to 'DataSource' statuses.  'Name' - Sets the search+-- criteria to the contents of 'DataSource'   'Name'.  'DataUri' - Sets the search+-- criteria to the URI of data files used to create the 'DataSource'. The URI can+-- identify either a file or an Amazon Simple Storage Service (Amazon S3) bucket+-- or directory.  'IAMUser' - Sets the search criteria to the user account that+-- invoked the 'DataSource' creation.+ddsFilterVariable :: Lens' DescribeDataSources (Maybe DataSourceFilterVariable)+ddsFilterVariable =+    lens _ddsFilterVariable (\s a -> s { _ddsFilterVariable = a })++-- | The greater than or equal to operator. The 'DataSource' results will have 'FilterVariable' values that are greater than or equal to the value specified with 'GE'.+ddsGE :: Lens' DescribeDataSources (Maybe Text)+ddsGE = lens _ddsGE (\s a -> s { _ddsGE = a })++-- | The greater than operator. The 'DataSource' results will have 'FilterVariable'+-- values that are greater than the value specified with 'GT'.+ddsGT :: Lens' DescribeDataSources (Maybe Text)+ddsGT = lens _ddsGT (\s a -> s { _ddsGT = a })++-- | The less than or equal to operator. The 'DataSource' results will have 'FilterVariable' values that are less than or equal to the value specified with 'LE'.+ddsLE :: Lens' DescribeDataSources (Maybe Text)+ddsLE = lens _ddsLE (\s a -> s { _ddsLE = a })++-- | The less than operator. The 'DataSource' results will have 'FilterVariable'+-- values that are less than the value specified with 'LT'.+ddsLT :: Lens' DescribeDataSources (Maybe Text)+ddsLT = lens _ddsLT (\s a -> s { _ddsLT = a })++-- | The maximum number of 'DataSource' to include in the result.+ddsLimit :: Lens' DescribeDataSources (Maybe Natural)+ddsLimit = lens _ddsLimit (\s a -> s { _ddsLimit = a }) . mapping _Nat++-- | The not equal to operator. The 'DataSource' results will have 'FilterVariable'+-- values not equal to the value specified with 'NE'.+ddsNE :: Lens' DescribeDataSources (Maybe Text)+ddsNE = lens _ddsNE (\s a -> s { _ddsNE = a })++-- | The ID of the page in the paginated results.+ddsNextToken :: Lens' DescribeDataSources (Maybe Text)+ddsNextToken = lens _ddsNextToken (\s a -> s { _ddsNextToken = a })++-- | A string that is found at the beginning of a variable, such as 'Name' or 'Id'.+--+-- For example, a 'DataSource' could have the 'Name' '2014-09-09-HolidayGiftMailer'.+-- To search for this 'DataSource', select 'Name' for the 'FilterVariable' and any of+-- the following strings for the 'Prefix':+--+-- 2014-09+--+-- 2014-09-09+--+-- 2014-09-09-Holiday+--+--+ddsPrefix :: Lens' DescribeDataSources (Maybe Text)+ddsPrefix = lens _ddsPrefix (\s a -> s { _ddsPrefix = a })++-- | A two-value parameter that determines the sequence of the resulting list of 'DataSource'.+--+-- 'asc' - Arranges the list in ascending order (A-Z, 0-9).  'dsc' - Arranges the+-- list in descending order (Z-A, 9-0).  Results are sorted by 'FilterVariable'.+ddsSortOrder :: Lens' DescribeDataSources (Maybe SortOrder)+ddsSortOrder = lens _ddsSortOrder (\s a -> s { _ddsSortOrder = a })++data DescribeDataSourcesResponse = DescribeDataSourcesResponse+    { _ddsrNextToken :: Maybe Text+    , _ddsrResults   :: List "Results" DataSource+    } deriving (Eq, Read, Show)++-- | 'DescribeDataSourcesResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'ddsrNextToken' @::@ 'Maybe' 'Text'+--+-- * 'ddsrResults' @::@ ['DataSource']+--+describeDataSourcesResponse :: DescribeDataSourcesResponse+describeDataSourcesResponse = DescribeDataSourcesResponse+    { _ddsrResults   = mempty+    , _ddsrNextToken = Nothing+    }++-- | An ID of the next page in the paginated results that indicates at least one+-- more page follows.+ddsrNextToken :: Lens' DescribeDataSourcesResponse (Maybe Text)+ddsrNextToken = lens _ddsrNextToken (\s a -> s { _ddsrNextToken = a })++-- | A list of 'DataSource' that meet the search criteria.+ddsrResults :: Lens' DescribeDataSourcesResponse [DataSource]+ddsrResults = lens _ddsrResults (\s a -> s { _ddsrResults = a }) . _List++instance ToPath DescribeDataSources where+    toPath = const "/"++instance ToQuery DescribeDataSources where+    toQuery = const mempty++instance ToHeaders DescribeDataSources++instance ToJSON DescribeDataSources where+    toJSON DescribeDataSources{..} = object+        [ "FilterVariable" .= _ddsFilterVariable+        , "EQ"             .= _ddsEQ+        , "GT"             .= _ddsGT+        , "LT"             .= _ddsLT+        , "GE"             .= _ddsGE+        , "LE"             .= _ddsLE+        , "NE"             .= _ddsNE+        , "Prefix"         .= _ddsPrefix+        , "SortOrder"      .= _ddsSortOrder+        , "NextToken"      .= _ddsNextToken+        , "Limit"          .= _ddsLimit+        ]++instance AWSRequest DescribeDataSources where+    type Sv DescribeDataSources = MachineLearning+    type Rs DescribeDataSources = DescribeDataSourcesResponse++    request  = post "DescribeDataSources"+    response = jsonResponse++instance FromJSON DescribeDataSourcesResponse where+    parseJSON = withObject "DescribeDataSourcesResponse" $ \o -> DescribeDataSourcesResponse+        <$> o .:? "NextToken"+        <*> o .:? "Results" .!= mempty++instance AWSPager DescribeDataSources where+    page rq rs+        | stop (rs ^. ddsrNextToken) = Nothing+        | otherwise = (\x -> rq & ddsNextToken ?~ x)+            <$> (rs ^. ddsrNextToken)
+ gen/Network/AWS/MachineLearning/DescribeEvaluations.hs view
@@ -0,0 +1,257 @@+{-# 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.MachineLearning.DescribeEvaluations+-- Copyright   : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>+-- License     : This Source Code Form is subject to the terms of+--               the Mozilla Public License, v. 2.0.+--               A copy of the MPL can be found in the LICENSE file or+--               you can obtain it at http://mozilla.org/MPL/2.0/.+-- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability   : experimental+-- Portability : non-portable (GHC extensions)+--+-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- | Returns a list of 'DescribeEvaluations' that match the search criteria in the+-- request.+--+-- <http://http://docs.aws.amazon.com/machine-learning/latest/APIReference/API_DescribeEvaluations.html>+module Network.AWS.MachineLearning.DescribeEvaluations+    (+    -- * Request+      DescribeEvaluations+    -- ** Request constructor+    , describeEvaluations+    -- ** Request lenses+    , deEQ+    , deFilterVariable+    , deGE+    , deGT+    , deLE+    , deLT+    , deLimit+    , deNE+    , deNextToken+    , dePrefix+    , deSortOrder++    -- * Response+    , DescribeEvaluationsResponse+    -- ** Response constructor+    , describeEvaluationsResponse+    -- ** Response lenses+    , derNextToken+    , derResults+    ) where++import Network.AWS.Data (Object)+import Network.AWS.Prelude+import Network.AWS.Request.JSON+import Network.AWS.MachineLearning.Types+import qualified GHC.Exts++data DescribeEvaluations = DescribeEvaluations+    { _deEQ             :: Maybe Text+    , _deFilterVariable :: Maybe EvaluationFilterVariable+    , _deGE             :: Maybe Text+    , _deGT             :: Maybe Text+    , _deLE             :: Maybe Text+    , _deLT             :: Maybe Text+    , _deLimit          :: Maybe Nat+    , _deNE             :: Maybe Text+    , _deNextToken      :: Maybe Text+    , _dePrefix         :: Maybe Text+    , _deSortOrder      :: Maybe SortOrder+    } deriving (Eq, Read, Show)++-- | 'DescribeEvaluations' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'deEQ' @::@ 'Maybe' 'Text'+--+-- * 'deFilterVariable' @::@ 'Maybe' 'EvaluationFilterVariable'+--+-- * 'deGE' @::@ 'Maybe' 'Text'+--+-- * 'deGT' @::@ 'Maybe' 'Text'+--+-- * 'deLE' @::@ 'Maybe' 'Text'+--+-- * 'deLT' @::@ 'Maybe' 'Text'+--+-- * 'deLimit' @::@ 'Maybe' 'Natural'+--+-- * 'deNE' @::@ 'Maybe' 'Text'+--+-- * 'deNextToken' @::@ 'Maybe' 'Text'+--+-- * 'dePrefix' @::@ 'Maybe' 'Text'+--+-- * 'deSortOrder' @::@ 'Maybe' 'SortOrder'+--+describeEvaluations :: DescribeEvaluations+describeEvaluations = DescribeEvaluations+    { _deFilterVariable = Nothing+    , _deEQ             = Nothing+    , _deGT             = Nothing+    , _deLT             = Nothing+    , _deGE             = Nothing+    , _deLE             = Nothing+    , _deNE             = Nothing+    , _dePrefix         = Nothing+    , _deSortOrder      = Nothing+    , _deNextToken      = Nothing+    , _deLimit          = Nothing+    }++-- | The equal to operator. The 'Evaluation' results will have 'FilterVariable' values+-- that exactly match the value specified with 'EQ'.+deEQ :: Lens' DescribeEvaluations (Maybe Text)+deEQ = lens _deEQ (\s a -> s { _deEQ = a })++-- | Use one of the following variable to filter a list of 'Evaluation' objects:+--+-- 'CreatedAt' - Sets the search criteria to the 'Evaluation' creation date.  'Status' - Sets the search criteria to the 'Evaluation' status.  'Name' - Sets the search+-- criteria to the contents of 'Evaluation'   'Name'.  'IAMUser' - Sets the search+-- criteria to the user account that invoked an 'Evaluation'.  'MLModelId' - Sets+-- the search criteria to the 'MLModel' that was evaluated.  'DataSourceId' - Sets+-- the search criteria to the 'DataSource' used in 'Evaluation'.  'DataUri' - Sets the+-- search criteria to the data file(s) used in 'Evaluation'. The URL can identify+-- either a file or an Amazon Simple Storage Solution (Amazon S3) bucket or+-- directory.+deFilterVariable :: Lens' DescribeEvaluations (Maybe EvaluationFilterVariable)+deFilterVariable = lens _deFilterVariable (\s a -> s { _deFilterVariable = a })++-- | The greater than or equal to operator. The 'Evaluation' results will have 'FilterVariable' values that are greater than or equal to the value specified with 'GE'.+deGE :: Lens' DescribeEvaluations (Maybe Text)+deGE = lens _deGE (\s a -> s { _deGE = a })++-- | The greater than operator. The 'Evaluation' results will have 'FilterVariable'+-- values that are greater than the value specified with 'GT'.+deGT :: Lens' DescribeEvaluations (Maybe Text)+deGT = lens _deGT (\s a -> s { _deGT = a })++-- | The less than or equal to operator. The 'Evaluation' results will have 'FilterVariable' values that are less than or equal to the value specified with 'LE'.+deLE :: Lens' DescribeEvaluations (Maybe Text)+deLE = lens _deLE (\s a -> s { _deLE = a })++-- | The less than operator. The 'Evaluation' results will have 'FilterVariable'+-- values that are less than the value specified with 'LT'.+deLT :: Lens' DescribeEvaluations (Maybe Text)+deLT = lens _deLT (\s a -> s { _deLT = a })++-- | The maximum number of 'Evaluation' to include in the result.+deLimit :: Lens' DescribeEvaluations (Maybe Natural)+deLimit = lens _deLimit (\s a -> s { _deLimit = a }) . mapping _Nat++-- | The not equal to operator. The 'Evaluation' results will have 'FilterVariable'+-- values not equal to the value specified with 'NE'.+deNE :: Lens' DescribeEvaluations (Maybe Text)+deNE = lens _deNE (\s a -> s { _deNE = a })++-- | The ID of the page in the paginated results.+deNextToken :: Lens' DescribeEvaluations (Maybe Text)+deNextToken = lens _deNextToken (\s a -> s { _deNextToken = a })++-- | A string that is found at the beginning of a variable, such as 'Name' or 'Id'.+--+-- For example, an 'Evaluation' could have the 'Name' '2014-09-09-HolidayGiftMailer'.+-- To search for this 'Evaluation', select 'Name' for the 'FilterVariable' and any of+-- the following strings for the 'Prefix':+--+-- 2014-09+--+-- 2014-09-09+--+-- 2014-09-09-Holiday+--+--+dePrefix :: Lens' DescribeEvaluations (Maybe Text)+dePrefix = lens _dePrefix (\s a -> s { _dePrefix = a })++-- | A two-value parameter that determines the sequence of the resulting list of 'Evaluation'.+--+-- 'asc' - Arranges the list in ascending order (A-Z, 0-9).  'dsc' - Arranges the+-- list in descending order (Z-A, 9-0).  Results are sorted by 'FilterVariable'.+deSortOrder :: Lens' DescribeEvaluations (Maybe SortOrder)+deSortOrder = lens _deSortOrder (\s a -> s { _deSortOrder = a })++data DescribeEvaluationsResponse = DescribeEvaluationsResponse+    { _derNextToken :: Maybe Text+    , _derResults   :: List "Results" Evaluation+    } deriving (Eq, Read, Show)++-- | 'DescribeEvaluationsResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'derNextToken' @::@ 'Maybe' 'Text'+--+-- * 'derResults' @::@ ['Evaluation']+--+describeEvaluationsResponse :: DescribeEvaluationsResponse+describeEvaluationsResponse = DescribeEvaluationsResponse+    { _derResults   = mempty+    , _derNextToken = Nothing+    }++-- | The ID of the next page in the paginated results that indicates at least one+-- more page follows.+derNextToken :: Lens' DescribeEvaluationsResponse (Maybe Text)+derNextToken = lens _derNextToken (\s a -> s { _derNextToken = a })++-- | A list of 'Evaluation' that meet the search criteria.+derResults :: Lens' DescribeEvaluationsResponse [Evaluation]+derResults = lens _derResults (\s a -> s { _derResults = a }) . _List++instance ToPath DescribeEvaluations where+    toPath = const "/"++instance ToQuery DescribeEvaluations where+    toQuery = const mempty++instance ToHeaders DescribeEvaluations++instance ToJSON DescribeEvaluations where+    toJSON DescribeEvaluations{..} = object+        [ "FilterVariable" .= _deFilterVariable+        , "EQ"             .= _deEQ+        , "GT"             .= _deGT+        , "LT"             .= _deLT+        , "GE"             .= _deGE+        , "LE"             .= _deLE+        , "NE"             .= _deNE+        , "Prefix"         .= _dePrefix+        , "SortOrder"      .= _deSortOrder+        , "NextToken"      .= _deNextToken+        , "Limit"          .= _deLimit+        ]++instance AWSRequest DescribeEvaluations where+    type Sv DescribeEvaluations = MachineLearning+    type Rs DescribeEvaluations = DescribeEvaluationsResponse++    request  = post "DescribeEvaluations"+    response = jsonResponse++instance FromJSON DescribeEvaluationsResponse where+    parseJSON = withObject "DescribeEvaluationsResponse" $ \o -> DescribeEvaluationsResponse+        <$> o .:? "NextToken"+        <*> o .:? "Results" .!= mempty++instance AWSPager DescribeEvaluations where+    page rq rs+        | stop (rs ^. derNextToken) = Nothing+        | otherwise = (\x -> rq & deNextToken ?~ x)+            <$> (rs ^. derNextToken)
+ gen/Network/AWS/MachineLearning/DescribeMLModels.hs view
@@ -0,0 +1,258 @@+{-# 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.MachineLearning.DescribeMLModels+-- Copyright   : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>+-- License     : This Source Code Form is subject to the terms of+--               the Mozilla Public License, v. 2.0.+--               A copy of the MPL can be found in the LICENSE file or+--               you can obtain it at http://mozilla.org/MPL/2.0/.+-- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability   : experimental+-- Portability : non-portable (GHC extensions)+--+-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- | Returns a list of 'MLModel' that match the search criteria in the request.+--+-- <http://http://docs.aws.amazon.com/machine-learning/latest/APIReference/API_DescribeMLModels.html>+module Network.AWS.MachineLearning.DescribeMLModels+    (+    -- * Request+      DescribeMLModels+    -- ** Request constructor+    , describeMLModels+    -- ** Request lenses+    , dmlmEQ+    , dmlmFilterVariable+    , dmlmGE+    , dmlmGT+    , dmlmLE+    , dmlmLT+    , dmlmLimit+    , dmlmNE+    , dmlmNextToken+    , dmlmPrefix+    , dmlmSortOrder++    -- * Response+    , DescribeMLModelsResponse+    -- ** Response constructor+    , describeMLModelsResponse+    -- ** Response lenses+    , dmlmrNextToken+    , dmlmrResults+    ) where++import Network.AWS.Data (Object)+import Network.AWS.Prelude+import Network.AWS.Request.JSON+import Network.AWS.MachineLearning.Types+import qualified GHC.Exts++data DescribeMLModels = DescribeMLModels+    { _dmlmEQ             :: Maybe Text+    , _dmlmFilterVariable :: Maybe MLModelFilterVariable+    , _dmlmGE             :: Maybe Text+    , _dmlmGT             :: Maybe Text+    , _dmlmLE             :: Maybe Text+    , _dmlmLT             :: Maybe Text+    , _dmlmLimit          :: Maybe Nat+    , _dmlmNE             :: Maybe Text+    , _dmlmNextToken      :: Maybe Text+    , _dmlmPrefix         :: Maybe Text+    , _dmlmSortOrder      :: Maybe SortOrder+    } deriving (Eq, Read, Show)++-- | 'DescribeMLModels' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'dmlmEQ' @::@ 'Maybe' 'Text'+--+-- * 'dmlmFilterVariable' @::@ 'Maybe' 'MLModelFilterVariable'+--+-- * 'dmlmGE' @::@ 'Maybe' 'Text'+--+-- * 'dmlmGT' @::@ 'Maybe' 'Text'+--+-- * 'dmlmLE' @::@ 'Maybe' 'Text'+--+-- * 'dmlmLT' @::@ 'Maybe' 'Text'+--+-- * 'dmlmLimit' @::@ 'Maybe' 'Natural'+--+-- * 'dmlmNE' @::@ 'Maybe' 'Text'+--+-- * 'dmlmNextToken' @::@ 'Maybe' 'Text'+--+-- * 'dmlmPrefix' @::@ 'Maybe' 'Text'+--+-- * 'dmlmSortOrder' @::@ 'Maybe' 'SortOrder'+--+describeMLModels :: DescribeMLModels+describeMLModels = DescribeMLModels+    { _dmlmFilterVariable = Nothing+    , _dmlmEQ             = Nothing+    , _dmlmGT             = Nothing+    , _dmlmLT             = Nothing+    , _dmlmGE             = Nothing+    , _dmlmLE             = Nothing+    , _dmlmNE             = Nothing+    , _dmlmPrefix         = Nothing+    , _dmlmSortOrder      = Nothing+    , _dmlmNextToken      = Nothing+    , _dmlmLimit          = Nothing+    }++-- | The equal to operator. The 'MLModel' results will have 'FilterVariable' values+-- that exactly match the value specified with 'EQ'.+dmlmEQ :: Lens' DescribeMLModels (Maybe Text)+dmlmEQ = lens _dmlmEQ (\s a -> s { _dmlmEQ = a })++-- | Use one of the following variables to filter a list of 'MLModel':+--+-- 'CreatedAt' - Sets the search criteria to 'MLModel' creation date.  'Status' -+-- Sets the search criteria to 'MLModel' status.  'Name' - Sets the search criteria+-- to the contents of 'MLModel'  'Name'.  'IAMUser' - Sets the search criteria to the+-- user account that invoked the 'MLModel' creation.  'TrainingDataSourceId' - Sets+-- the search criteria to the 'DataSource' used to train one or more 'MLModel'.  'RealtimeEndpointStatus' - Sets the search criteria to the 'MLModel' real-time endpoint status.  'MLModelType' - Sets the search criteria to 'MLModel' type: binary, regression, or+-- multi-class.  'Algorithm' - Sets the search criteria to the algorithm that the 'MLModel' uses.  'TrainingDataURI' - Sets the search criteria to the data file(s) used+-- in training a 'MLModel'. The URL can identify either a file or an Amazon Simple+-- Storage Service (Amazon S3) bucket or directory.+dmlmFilterVariable :: Lens' DescribeMLModels (Maybe MLModelFilterVariable)+dmlmFilterVariable =+    lens _dmlmFilterVariable (\s a -> s { _dmlmFilterVariable = a })++-- | The greater than or equal to operator. The 'MLModel' results will have 'FilterVariable' values that are greater than or equal to the value specified with 'GE'.+dmlmGE :: Lens' DescribeMLModels (Maybe Text)+dmlmGE = lens _dmlmGE (\s a -> s { _dmlmGE = a })++-- | The greater than operator. The 'MLModel' results will have 'FilterVariable'+-- values that are greater than the value specified with 'GT'.+dmlmGT :: Lens' DescribeMLModels (Maybe Text)+dmlmGT = lens _dmlmGT (\s a -> s { _dmlmGT = a })++-- | The less than or equal to operator. The 'MLModel' results will have 'FilterVariable' values that are less than or equal to the value specified with 'LE'.+dmlmLE :: Lens' DescribeMLModels (Maybe Text)+dmlmLE = lens _dmlmLE (\s a -> s { _dmlmLE = a })++-- | The less than operator. The 'MLModel' results will have 'FilterVariable' values+-- that are less than the value specified with 'LT'.+dmlmLT :: Lens' DescribeMLModels (Maybe Text)+dmlmLT = lens _dmlmLT (\s a -> s { _dmlmLT = a })++-- | The number of pages of information to include in the result. The range of+-- acceptable values is 1 through 100. The default value is 100.+dmlmLimit :: Lens' DescribeMLModels (Maybe Natural)+dmlmLimit = lens _dmlmLimit (\s a -> s { _dmlmLimit = a }) . mapping _Nat++-- | The not equal to operator. The 'MLModel' results will have 'FilterVariable'+-- values not equal to the value specified with 'NE'.+dmlmNE :: Lens' DescribeMLModels (Maybe Text)+dmlmNE = lens _dmlmNE (\s a -> s { _dmlmNE = a })++-- | The ID of the page in the paginated results.+dmlmNextToken :: Lens' DescribeMLModels (Maybe Text)+dmlmNextToken = lens _dmlmNextToken (\s a -> s { _dmlmNextToken = a })++-- | A string that is found at the beginning of a variable, such as 'Name' or 'Id'.+--+-- For example, an 'MLModel' could have the 'Name' '2014-09-09-HolidayGiftMailer'. To+-- search for this 'MLModel', select 'Name' for the 'FilterVariable' and any of the+-- following strings for the 'Prefix':+--+-- 2014-09+--+-- 2014-09-09+--+-- 2014-09-09-Holiday+--+--+dmlmPrefix :: Lens' DescribeMLModels (Maybe Text)+dmlmPrefix = lens _dmlmPrefix (\s a -> s { _dmlmPrefix = a })++-- | A two-value parameter that determines the sequence of the resulting list of 'MLModel'.+--+-- 'asc' - Arranges the list in ascending order (A-Z, 0-9).  'dsc' - Arranges the+-- list in descending order (Z-A, 9-0).  Results are sorted by 'FilterVariable'.+dmlmSortOrder :: Lens' DescribeMLModels (Maybe SortOrder)+dmlmSortOrder = lens _dmlmSortOrder (\s a -> s { _dmlmSortOrder = a })++data DescribeMLModelsResponse = DescribeMLModelsResponse+    { _dmlmrNextToken :: Maybe Text+    , _dmlmrResults   :: List "Results" MLModel+    } deriving (Eq, Read, Show)++-- | 'DescribeMLModelsResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'dmlmrNextToken' @::@ 'Maybe' 'Text'+--+-- * 'dmlmrResults' @::@ ['MLModel']+--+describeMLModelsResponse :: DescribeMLModelsResponse+describeMLModelsResponse = DescribeMLModelsResponse+    { _dmlmrResults   = mempty+    , _dmlmrNextToken = Nothing+    }++-- | The ID of the next page in the paginated results that indicates at least one+-- more page follows.+dmlmrNextToken :: Lens' DescribeMLModelsResponse (Maybe Text)+dmlmrNextToken = lens _dmlmrNextToken (\s a -> s { _dmlmrNextToken = a })++-- | A list of 'MLModel' that meet the search criteria.+dmlmrResults :: Lens' DescribeMLModelsResponse [MLModel]+dmlmrResults = lens _dmlmrResults (\s a -> s { _dmlmrResults = a }) . _List++instance ToPath DescribeMLModels where+    toPath = const "/"++instance ToQuery DescribeMLModels where+    toQuery = const mempty++instance ToHeaders DescribeMLModels++instance ToJSON DescribeMLModels where+    toJSON DescribeMLModels{..} = object+        [ "FilterVariable" .= _dmlmFilterVariable+        , "EQ"             .= _dmlmEQ+        , "GT"             .= _dmlmGT+        , "LT"             .= _dmlmLT+        , "GE"             .= _dmlmGE+        , "LE"             .= _dmlmLE+        , "NE"             .= _dmlmNE+        , "Prefix"         .= _dmlmPrefix+        , "SortOrder"      .= _dmlmSortOrder+        , "NextToken"      .= _dmlmNextToken+        , "Limit"          .= _dmlmLimit+        ]++instance AWSRequest DescribeMLModels where+    type Sv DescribeMLModels = MachineLearning+    type Rs DescribeMLModels = DescribeMLModelsResponse++    request  = post "DescribeMLModels"+    response = jsonResponse++instance FromJSON DescribeMLModelsResponse where+    parseJSON = withObject "DescribeMLModelsResponse" $ \o -> DescribeMLModelsResponse+        <$> o .:? "NextToken"+        <*> o .:? "Results" .!= mempty++instance AWSPager DescribeMLModels where+    page rq rs+        | stop (rs ^. dmlmrNextToken) = Nothing+        | otherwise = (\x -> rq & dmlmNextToken ?~ x)+            <$> (rs ^. dmlmrNextToken)
+ gen/Network/AWS/MachineLearning/GetBatchPrediction.hs view
@@ -0,0 +1,247 @@+{-# 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.MachineLearning.GetBatchPrediction+-- Copyright   : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>+-- License     : This Source Code Form is subject to the terms of+--               the Mozilla Public License, v. 2.0.+--               A copy of the MPL can be found in the LICENSE file or+--               you can obtain it at http://mozilla.org/MPL/2.0/.+-- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability   : experimental+-- Portability : non-portable (GHC extensions)+--+-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- | Returns a 'BatchPrediction' that includes detailed metadata, status, and data+-- file information for a 'Batch Prediction' request.+--+-- <http://http://docs.aws.amazon.com/machine-learning/latest/APIReference/API_GetBatchPrediction.html>+module Network.AWS.MachineLearning.GetBatchPrediction+    (+    -- * Request+      GetBatchPrediction+    -- ** Request constructor+    , getBatchPrediction+    -- ** Request lenses+    , gbpBatchPredictionId++    -- * Response+    , GetBatchPredictionResponse+    -- ** Response constructor+    , getBatchPredictionResponse+    -- ** Response lenses+    , gbprBatchPredictionDataSourceId+    , gbprBatchPredictionId+    , gbprCreatedAt+    , gbprCreatedByIamUser+    , gbprInputDataLocationS3+    , gbprLastUpdatedAt+    , gbprLogUri+    , gbprMLModelId+    , gbprMessage+    , gbprName+    , gbprOutputUri+    , gbprStatus+    ) where++import Network.AWS.Data (Object)+import Network.AWS.Prelude+import Network.AWS.Request.JSON+import Network.AWS.MachineLearning.Types+import qualified GHC.Exts++newtype GetBatchPrediction = GetBatchPrediction+    { _gbpBatchPredictionId :: Text+    } deriving (Eq, Ord, Read, Show, Monoid, IsString)++-- | 'GetBatchPrediction' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'gbpBatchPredictionId' @::@ 'Text'+--+getBatchPrediction :: Text -- ^ 'gbpBatchPredictionId'+                   -> GetBatchPrediction+getBatchPrediction p1 = GetBatchPrediction+    { _gbpBatchPredictionId = p1+    }++-- | An ID assigned to the 'BatchPrediction' at creation.+gbpBatchPredictionId :: Lens' GetBatchPrediction Text+gbpBatchPredictionId =+    lens _gbpBatchPredictionId (\s a -> s { _gbpBatchPredictionId = a })++data GetBatchPredictionResponse = GetBatchPredictionResponse+    { _gbprBatchPredictionDataSourceId :: Maybe Text+    , _gbprBatchPredictionId           :: Maybe Text+    , _gbprCreatedAt                   :: Maybe POSIX+    , _gbprCreatedByIamUser            :: Maybe Text+    , _gbprInputDataLocationS3         :: Maybe Text+    , _gbprLastUpdatedAt               :: Maybe POSIX+    , _gbprLogUri                      :: Maybe Text+    , _gbprMLModelId                   :: Maybe Text+    , _gbprMessage                     :: Maybe Text+    , _gbprName                        :: Maybe Text+    , _gbprOutputUri                   :: Maybe Text+    , _gbprStatus                      :: Maybe EntityStatus+    } deriving (Eq, Read, Show)++-- | 'GetBatchPredictionResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'gbprBatchPredictionDataSourceId' @::@ 'Maybe' 'Text'+--+-- * 'gbprBatchPredictionId' @::@ 'Maybe' 'Text'+--+-- * 'gbprCreatedAt' @::@ 'Maybe' 'UTCTime'+--+-- * 'gbprCreatedByIamUser' @::@ 'Maybe' 'Text'+--+-- * 'gbprInputDataLocationS3' @::@ 'Maybe' 'Text'+--+-- * 'gbprLastUpdatedAt' @::@ 'Maybe' 'UTCTime'+--+-- * 'gbprLogUri' @::@ 'Maybe' 'Text'+--+-- * 'gbprMLModelId' @::@ 'Maybe' 'Text'+--+-- * 'gbprMessage' @::@ 'Maybe' 'Text'+--+-- * 'gbprName' @::@ 'Maybe' 'Text'+--+-- * 'gbprOutputUri' @::@ 'Maybe' 'Text'+--+-- * 'gbprStatus' @::@ 'Maybe' 'EntityStatus'+--+getBatchPredictionResponse :: GetBatchPredictionResponse+getBatchPredictionResponse = GetBatchPredictionResponse+    { _gbprBatchPredictionId           = Nothing+    , _gbprMLModelId                   = Nothing+    , _gbprBatchPredictionDataSourceId = Nothing+    , _gbprInputDataLocationS3         = Nothing+    , _gbprCreatedByIamUser            = Nothing+    , _gbprCreatedAt                   = Nothing+    , _gbprLastUpdatedAt               = Nothing+    , _gbprName                        = Nothing+    , _gbprStatus                      = Nothing+    , _gbprOutputUri                   = Nothing+    , _gbprLogUri                      = Nothing+    , _gbprMessage                     = Nothing+    }++-- | The ID of the 'DataSource' that was used to create the 'BatchPrediction'.+gbprBatchPredictionDataSourceId :: Lens' GetBatchPredictionResponse (Maybe Text)+gbprBatchPredictionDataSourceId =+    lens _gbprBatchPredictionDataSourceId+        (\s a -> s { _gbprBatchPredictionDataSourceId = a })++-- | An ID assigned to the 'BatchPrediction' at creation. This value should be+-- identical to the value of the 'BatchPredictionID' in the request.+gbprBatchPredictionId :: Lens' GetBatchPredictionResponse (Maybe Text)+gbprBatchPredictionId =+    lens _gbprBatchPredictionId (\s a -> s { _gbprBatchPredictionId = a })++-- | The time when the 'BatchPrediction' was created. The time is expressed in epoch+-- time.+gbprCreatedAt :: Lens' GetBatchPredictionResponse (Maybe UTCTime)+gbprCreatedAt = lens _gbprCreatedAt (\s a -> s { _gbprCreatedAt = a }) . mapping _Time++-- | The AWS user account that invoked the 'BatchPrediction'. The account type can+-- be either an AWS root account or an AWS Identity and Access Management (IAM)+-- user account.+gbprCreatedByIamUser :: Lens' GetBatchPredictionResponse (Maybe Text)+gbprCreatedByIamUser =+    lens _gbprCreatedByIamUser (\s a -> s { _gbprCreatedByIamUser = a })++-- | The location of the data file or directory in Amazon Simple Storage Service+-- (Amazon S3).+gbprInputDataLocationS3 :: Lens' GetBatchPredictionResponse (Maybe Text)+gbprInputDataLocationS3 =+    lens _gbprInputDataLocationS3 (\s a -> s { _gbprInputDataLocationS3 = a })++-- | The time of the most recent edit to 'BatchPrediction'. The time is expressed in+-- epoch time.+gbprLastUpdatedAt :: Lens' GetBatchPredictionResponse (Maybe UTCTime)+gbprLastUpdatedAt =+    lens _gbprLastUpdatedAt (\s a -> s { _gbprLastUpdatedAt = a })+        . mapping _Time++-- | A link to the file that contains logs of the 'CreateBatchPrediction' operation.+gbprLogUri :: Lens' GetBatchPredictionResponse (Maybe Text)+gbprLogUri = lens _gbprLogUri (\s a -> s { _gbprLogUri = a })++-- | The ID of the 'MLModel' that generated predictions for the 'BatchPrediction'+-- request.+gbprMLModelId :: Lens' GetBatchPredictionResponse (Maybe Text)+gbprMLModelId = lens _gbprMLModelId (\s a -> s { _gbprMLModelId = a })++-- | A description of the most recent details about processing the batch+-- prediction request.+gbprMessage :: Lens' GetBatchPredictionResponse (Maybe Text)+gbprMessage = lens _gbprMessage (\s a -> s { _gbprMessage = a })++-- | A user-supplied name or description of the 'BatchPrediction'.+gbprName :: Lens' GetBatchPredictionResponse (Maybe Text)+gbprName = lens _gbprName (\s a -> s { _gbprName = a })++-- | The location of an Amazon S3 bucket or directory to receive the operation+-- results.+gbprOutputUri :: Lens' GetBatchPredictionResponse (Maybe Text)+gbprOutputUri = lens _gbprOutputUri (\s a -> s { _gbprOutputUri = a })++-- | The status of the 'BatchPrediction', which can be one of the following values:+--+-- 'PENDING' - Amazon Machine Learning (Amazon ML) submitted a request to+-- generate batch predictions.  'INPROGRESS' - The batch predictions are in+-- progress.  'FAILED' - The request to perform a batch prediction did not run to+-- completion. It is not usable.  'COMPLETED' - The batch prediction process+-- completed successfully.  'DELETED' - The 'BatchPrediction' is marked as deleted.+-- It is not usable.+gbprStatus :: Lens' GetBatchPredictionResponse (Maybe EntityStatus)+gbprStatus = lens _gbprStatus (\s a -> s { _gbprStatus = a })++instance ToPath GetBatchPrediction where+    toPath = const "/"++instance ToQuery GetBatchPrediction where+    toQuery = const mempty++instance ToHeaders GetBatchPrediction++instance ToJSON GetBatchPrediction where+    toJSON GetBatchPrediction{..} = object+        [ "BatchPredictionId" .= _gbpBatchPredictionId+        ]++instance AWSRequest GetBatchPrediction where+    type Sv GetBatchPrediction = MachineLearning+    type Rs GetBatchPrediction = GetBatchPredictionResponse++    request  = post "GetBatchPrediction"+    response = jsonResponse++instance FromJSON GetBatchPredictionResponse where+    parseJSON = withObject "GetBatchPredictionResponse" $ \o -> GetBatchPredictionResponse+        <$> o .:? "BatchPredictionDataSourceId"+        <*> o .:? "BatchPredictionId"+        <*> o .:? "CreatedAt"+        <*> o .:? "CreatedByIamUser"+        <*> o .:? "InputDataLocationS3"+        <*> o .:? "LastUpdatedAt"+        <*> o .:? "LogUri"+        <*> o .:? "MLModelId"+        <*> o .:? "Message"+        <*> o .:? "Name"+        <*> o .:? "OutputUri"+        <*> o .:? "Status"
+ gen/Network/AWS/MachineLearning/GetDataSource.hs view
@@ -0,0 +1,314 @@+{-# 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.MachineLearning.GetDataSource+-- Copyright   : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>+-- License     : This Source Code Form is subject to the terms of+--               the Mozilla Public License, v. 2.0.+--               A copy of the MPL can be found in the LICENSE file or+--               you can obtain it at http://mozilla.org/MPL/2.0/.+-- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability   : experimental+-- Portability : non-portable (GHC extensions)+--+-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- | Returns a 'DataSource' that includes metadata and data file information, as+-- well as the current status of the 'DataSource'.+--+-- 'GetDataSource' provides results in normal or verbose format. The verbose+-- format adds the schema description and the list of files pointed to by the+-- DataSource to the normal format.+--+-- <http://http://docs.aws.amazon.com/machine-learning/latest/APIReference/API_GetDataSource.html>+module Network.AWS.MachineLearning.GetDataSource+    (+    -- * Request+      GetDataSource+    -- ** Request constructor+    , getDataSource+    -- ** Request lenses+    , gdsDataSourceId+    , gdsVerbose++    -- * Response+    , GetDataSourceResponse+    -- ** Response constructor+    , getDataSourceResponse+    -- ** Response lenses+    , gdsrComputeStatistics+    , gdsrCreatedAt+    , gdsrCreatedByIamUser+    , gdsrDataLocationS3+    , gdsrDataRearrangement+    , gdsrDataSizeInBytes+    , gdsrDataSourceId+    , gdsrDataSourceSchema+    , gdsrLastUpdatedAt+    , gdsrLogUri+    , gdsrMessage+    , gdsrName+    , gdsrNumberOfFiles+    , gdsrRDSMetadata+    , gdsrRedshiftMetadata+    , gdsrRoleARN+    , gdsrStatus+    ) where++import Network.AWS.Data (Object)+import Network.AWS.Prelude+import Network.AWS.Request.JSON+import Network.AWS.MachineLearning.Types+import qualified GHC.Exts++data GetDataSource = GetDataSource+    { _gdsDataSourceId :: Text+    , _gdsVerbose      :: Maybe Bool+    } deriving (Eq, Ord, Read, Show)++-- | 'GetDataSource' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'gdsDataSourceId' @::@ 'Text'+--+-- * 'gdsVerbose' @::@ 'Maybe' 'Bool'+--+getDataSource :: Text -- ^ 'gdsDataSourceId'+              -> GetDataSource+getDataSource p1 = GetDataSource+    { _gdsDataSourceId = p1+    , _gdsVerbose      = Nothing+    }++-- | The ID assigned to the 'DataSource' at creation.+gdsDataSourceId :: Lens' GetDataSource Text+gdsDataSourceId = lens _gdsDataSourceId (\s a -> s { _gdsDataSourceId = a })++-- | Specifies whether the 'GetDataSource' operation should return 'DataSourceSchema'.+--+-- If true, 'DataSourceSchema' is returned.+--+-- If false, 'DataSourceSchema' is not returned.+gdsVerbose :: Lens' GetDataSource (Maybe Bool)+gdsVerbose = lens _gdsVerbose (\s a -> s { _gdsVerbose = a })++data GetDataSourceResponse = GetDataSourceResponse+    { _gdsrComputeStatistics :: Maybe Bool+    , _gdsrCreatedAt         :: Maybe POSIX+    , _gdsrCreatedByIamUser  :: Maybe Text+    , _gdsrDataLocationS3    :: Maybe Text+    , _gdsrDataRearrangement :: Maybe Text+    , _gdsrDataSizeInBytes   :: Maybe Integer+    , _gdsrDataSourceId      :: Maybe Text+    , _gdsrDataSourceSchema  :: Maybe Text+    , _gdsrLastUpdatedAt     :: Maybe POSIX+    , _gdsrLogUri            :: Maybe Text+    , _gdsrMessage           :: Maybe Text+    , _gdsrName              :: Maybe Text+    , _gdsrNumberOfFiles     :: Maybe Integer+    , _gdsrRDSMetadata       :: Maybe RDSMetadata+    , _gdsrRedshiftMetadata  :: Maybe RedshiftMetadata+    , _gdsrRoleARN           :: Maybe Text+    , _gdsrStatus            :: Maybe EntityStatus+    } deriving (Eq, Read, Show)++-- | 'GetDataSourceResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'gdsrComputeStatistics' @::@ 'Maybe' 'Bool'+--+-- * 'gdsrCreatedAt' @::@ 'Maybe' 'UTCTime'+--+-- * 'gdsrCreatedByIamUser' @::@ 'Maybe' 'Text'+--+-- * 'gdsrDataLocationS3' @::@ 'Maybe' 'Text'+--+-- * 'gdsrDataRearrangement' @::@ 'Maybe' 'Text'+--+-- * 'gdsrDataSizeInBytes' @::@ 'Maybe' 'Integer'+--+-- * 'gdsrDataSourceId' @::@ 'Maybe' 'Text'+--+-- * 'gdsrDataSourceSchema' @::@ 'Maybe' 'Text'+--+-- * 'gdsrLastUpdatedAt' @::@ 'Maybe' 'UTCTime'+--+-- * 'gdsrLogUri' @::@ 'Maybe' 'Text'+--+-- * 'gdsrMessage' @::@ 'Maybe' 'Text'+--+-- * 'gdsrName' @::@ 'Maybe' 'Text'+--+-- * 'gdsrNumberOfFiles' @::@ 'Maybe' 'Integer'+--+-- * 'gdsrRDSMetadata' @::@ 'Maybe' 'RDSMetadata'+--+-- * 'gdsrRedshiftMetadata' @::@ 'Maybe' 'RedshiftMetadata'+--+-- * 'gdsrRoleARN' @::@ 'Maybe' 'Text'+--+-- * 'gdsrStatus' @::@ 'Maybe' 'EntityStatus'+--+getDataSourceResponse :: GetDataSourceResponse+getDataSourceResponse = GetDataSourceResponse+    { _gdsrDataSourceId      = Nothing+    , _gdsrDataLocationS3    = Nothing+    , _gdsrDataRearrangement = Nothing+    , _gdsrCreatedByIamUser  = Nothing+    , _gdsrCreatedAt         = Nothing+    , _gdsrLastUpdatedAt     = Nothing+    , _gdsrDataSizeInBytes   = Nothing+    , _gdsrNumberOfFiles     = Nothing+    , _gdsrName              = Nothing+    , _gdsrStatus            = Nothing+    , _gdsrLogUri            = Nothing+    , _gdsrMessage           = Nothing+    , _gdsrRedshiftMetadata  = Nothing+    , _gdsrRDSMetadata       = Nothing+    , _gdsrRoleARN           = Nothing+    , _gdsrComputeStatistics = Nothing+    , _gdsrDataSourceSchema  = Nothing+    }++-- | The parameter is 'true' if statistics need to be generated from the+-- observation data.+gdsrComputeStatistics :: Lens' GetDataSourceResponse (Maybe Bool)+gdsrComputeStatistics =+    lens _gdsrComputeStatistics (\s a -> s { _gdsrComputeStatistics = a })++-- | The time that the 'DataSource' was created. The time is expressed in epoch time.+gdsrCreatedAt :: Lens' GetDataSourceResponse (Maybe UTCTime)+gdsrCreatedAt = lens _gdsrCreatedAt (\s a -> s { _gdsrCreatedAt = a }) . mapping _Time++-- | The AWS user account from which the 'DataSource' was created. The account type+-- can be either an AWS root account or an AWS Identity and Access Management+-- (IAM) user account.+gdsrCreatedByIamUser :: Lens' GetDataSourceResponse (Maybe Text)+gdsrCreatedByIamUser =+    lens _gdsrCreatedByIamUser (\s a -> s { _gdsrCreatedByIamUser = a })++-- | The location of the data file or directory in Amazon Simple Storage Service+-- (Amazon S3).+gdsrDataLocationS3 :: Lens' GetDataSourceResponse (Maybe Text)+gdsrDataLocationS3 =+    lens _gdsrDataLocationS3 (\s a -> s { _gdsrDataLocationS3 = a })++-- | A JSON string that captures the splitting rearrangement requirement of the 'DataSource'.+gdsrDataRearrangement :: Lens' GetDataSourceResponse (Maybe Text)+gdsrDataRearrangement =+    lens _gdsrDataRearrangement (\s a -> s { _gdsrDataRearrangement = a })++-- | The total size of observations in the data files.+gdsrDataSizeInBytes :: Lens' GetDataSourceResponse (Maybe Integer)+gdsrDataSizeInBytes =+    lens _gdsrDataSizeInBytes (\s a -> s { _gdsrDataSizeInBytes = a })++-- | The ID assigned to the 'DataSource' at creation. This value should be identical+-- to the value of the 'DataSourceId' in the request.+gdsrDataSourceId :: Lens' GetDataSourceResponse (Maybe Text)+gdsrDataSourceId = lens _gdsrDataSourceId (\s a -> s { _gdsrDataSourceId = a })++-- | The schema used by all of the data files of this 'DataSource'.+--+-- Note This parameter is provided as part of the verbose format.+--+gdsrDataSourceSchema :: Lens' GetDataSourceResponse (Maybe Text)+gdsrDataSourceSchema =+    lens _gdsrDataSourceSchema (\s a -> s { _gdsrDataSourceSchema = a })++-- | The time of the most recent edit to the 'DataSource'. The time is expressed in+-- epoch time.+gdsrLastUpdatedAt :: Lens' GetDataSourceResponse (Maybe UTCTime)+gdsrLastUpdatedAt =+    lens _gdsrLastUpdatedAt (\s a -> s { _gdsrLastUpdatedAt = a })+        . mapping _Time++-- | A link to the file containining logs of either create 'DataSource' operation.+gdsrLogUri :: Lens' GetDataSourceResponse (Maybe Text)+gdsrLogUri = lens _gdsrLogUri (\s a -> s { _gdsrLogUri = a })++-- | The description of the most recent details about creating the 'DataSource'.+gdsrMessage :: Lens' GetDataSourceResponse (Maybe Text)+gdsrMessage = lens _gdsrMessage (\s a -> s { _gdsrMessage = a })++-- | A user-supplied name or description of the 'DataSource'.+gdsrName :: Lens' GetDataSourceResponse (Maybe Text)+gdsrName = lens _gdsrName (\s a -> s { _gdsrName = a })++-- | The number of data files referenced by the 'DataSource'.+gdsrNumberOfFiles :: Lens' GetDataSourceResponse (Maybe Integer)+gdsrNumberOfFiles =+    lens _gdsrNumberOfFiles (\s a -> s { _gdsrNumberOfFiles = a })++gdsrRDSMetadata :: Lens' GetDataSourceResponse (Maybe RDSMetadata)+gdsrRDSMetadata = lens _gdsrRDSMetadata (\s a -> s { _gdsrRDSMetadata = a })++gdsrRedshiftMetadata :: Lens' GetDataSourceResponse (Maybe RedshiftMetadata)+gdsrRedshiftMetadata =+    lens _gdsrRedshiftMetadata (\s a -> s { _gdsrRedshiftMetadata = a })++gdsrRoleARN :: Lens' GetDataSourceResponse (Maybe Text)+gdsrRoleARN = lens _gdsrRoleARN (\s a -> s { _gdsrRoleARN = a })++-- | The current status of the 'DataSource'. This element can have one of the+-- following values:+--+-- 'PENDING' - Amazon Machine Language (Amazon ML) submitted a request to+-- create a 'DataSource'.  'INPROGRESS' - The creation process is underway.  'FAILED'+-- - The request to create a 'DataSource' did not run to completion. It is not+-- usable.  'COMPLETED' - The creation process completed successfully.  'DELETED' -+-- The 'DataSource' is marked as deleted. It is not usable.+gdsrStatus :: Lens' GetDataSourceResponse (Maybe EntityStatus)+gdsrStatus = lens _gdsrStatus (\s a -> s { _gdsrStatus = a })++instance ToPath GetDataSource where+    toPath = const "/"++instance ToQuery GetDataSource where+    toQuery = const mempty++instance ToHeaders GetDataSource++instance ToJSON GetDataSource where+    toJSON GetDataSource{..} = object+        [ "DataSourceId" .= _gdsDataSourceId+        , "Verbose"      .= _gdsVerbose+        ]++instance AWSRequest GetDataSource where+    type Sv GetDataSource = MachineLearning+    type Rs GetDataSource = GetDataSourceResponse++    request  = post "GetDataSource"+    response = jsonResponse++instance FromJSON GetDataSourceResponse where+    parseJSON = withObject "GetDataSourceResponse" $ \o -> GetDataSourceResponse+        <$> o .:? "ComputeStatistics"+        <*> o .:? "CreatedAt"+        <*> o .:? "CreatedByIamUser"+        <*> o .:? "DataLocationS3"+        <*> o .:? "DataRearrangement"+        <*> o .:? "DataSizeInBytes"+        <*> o .:? "DataSourceId"+        <*> o .:? "DataSourceSchema"+        <*> o .:? "LastUpdatedAt"+        <*> o .:? "LogUri"+        <*> o .:? "Message"+        <*> o .:? "Name"+        <*> o .:? "NumberOfFiles"+        <*> o .:? "RDSMetadata"+        <*> o .:? "RedshiftMetadata"+        <*> o .:? "RoleARN"+        <*> o .:? "Status"
+ gen/Network/AWS/MachineLearning/GetEvaluation.hs view
@@ -0,0 +1,253 @@+{-# 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.MachineLearning.GetEvaluation+-- Copyright   : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>+-- License     : This Source Code Form is subject to the terms of+--               the Mozilla Public License, v. 2.0.+--               A copy of the MPL can be found in the LICENSE file or+--               you can obtain it at http://mozilla.org/MPL/2.0/.+-- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability   : experimental+-- Portability : non-portable (GHC extensions)+--+-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- | Returns an 'Evaluation' that includes metadata as well as the current status of+-- the 'Evaluation'.+--+-- <http://http://docs.aws.amazon.com/machine-learning/latest/APIReference/API_GetEvaluation.html>+module Network.AWS.MachineLearning.GetEvaluation+    (+    -- * Request+      GetEvaluation+    -- ** Request constructor+    , getEvaluation+    -- ** Request lenses+    , geEvaluationId++    -- * Response+    , GetEvaluationResponse+    -- ** Response constructor+    , getEvaluationResponse+    -- ** Response lenses+    , gerCreatedAt+    , gerCreatedByIamUser+    , gerEvaluationDataSourceId+    , gerEvaluationId+    , gerInputDataLocationS3+    , gerLastUpdatedAt+    , gerLogUri+    , gerMLModelId+    , gerMessage+    , gerName+    , gerPerformanceMetrics+    , gerStatus+    ) where++import Network.AWS.Data (Object)+import Network.AWS.Prelude+import Network.AWS.Request.JSON+import Network.AWS.MachineLearning.Types+import qualified GHC.Exts++newtype GetEvaluation = GetEvaluation+    { _geEvaluationId :: Text+    } deriving (Eq, Ord, Read, Show, Monoid, IsString)++-- | 'GetEvaluation' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'geEvaluationId' @::@ 'Text'+--+getEvaluation :: Text -- ^ 'geEvaluationId'+              -> GetEvaluation+getEvaluation p1 = GetEvaluation+    { _geEvaluationId = p1+    }++-- | The ID of the 'Evaluation' to retrieve. The evaluation of each 'MLModel' is+-- recorded and cataloged. The ID provides the means to access the information.+geEvaluationId :: Lens' GetEvaluation Text+geEvaluationId = lens _geEvaluationId (\s a -> s { _geEvaluationId = a })++data GetEvaluationResponse = GetEvaluationResponse+    { _gerCreatedAt              :: Maybe POSIX+    , _gerCreatedByIamUser       :: Maybe Text+    , _gerEvaluationDataSourceId :: Maybe Text+    , _gerEvaluationId           :: Maybe Text+    , _gerInputDataLocationS3    :: Maybe Text+    , _gerLastUpdatedAt          :: Maybe POSIX+    , _gerLogUri                 :: Maybe Text+    , _gerMLModelId              :: Maybe Text+    , _gerMessage                :: Maybe Text+    , _gerName                   :: Maybe Text+    , _gerPerformanceMetrics     :: Maybe PerformanceMetrics+    , _gerStatus                 :: Maybe EntityStatus+    } deriving (Eq, Read, Show)++-- | 'GetEvaluationResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'gerCreatedAt' @::@ 'Maybe' 'UTCTime'+--+-- * 'gerCreatedByIamUser' @::@ 'Maybe' 'Text'+--+-- * 'gerEvaluationDataSourceId' @::@ 'Maybe' 'Text'+--+-- * 'gerEvaluationId' @::@ 'Maybe' 'Text'+--+-- * 'gerInputDataLocationS3' @::@ 'Maybe' 'Text'+--+-- * 'gerLastUpdatedAt' @::@ 'Maybe' 'UTCTime'+--+-- * 'gerLogUri' @::@ 'Maybe' 'Text'+--+-- * 'gerMLModelId' @::@ 'Maybe' 'Text'+--+-- * 'gerMessage' @::@ 'Maybe' 'Text'+--+-- * 'gerName' @::@ 'Maybe' 'Text'+--+-- * 'gerPerformanceMetrics' @::@ 'Maybe' 'PerformanceMetrics'+--+-- * 'gerStatus' @::@ 'Maybe' 'EntityStatus'+--+getEvaluationResponse :: GetEvaluationResponse+getEvaluationResponse = GetEvaluationResponse+    { _gerEvaluationId           = Nothing+    , _gerMLModelId              = Nothing+    , _gerEvaluationDataSourceId = Nothing+    , _gerInputDataLocationS3    = Nothing+    , _gerCreatedByIamUser       = Nothing+    , _gerCreatedAt              = Nothing+    , _gerLastUpdatedAt          = Nothing+    , _gerName                   = Nothing+    , _gerStatus                 = Nothing+    , _gerPerformanceMetrics     = Nothing+    , _gerLogUri                 = Nothing+    , _gerMessage                = Nothing+    }++-- | The time that the 'Evaluation' was created. The time is expressed in epoch time.+gerCreatedAt :: Lens' GetEvaluationResponse (Maybe UTCTime)+gerCreatedAt = lens _gerCreatedAt (\s a -> s { _gerCreatedAt = a }) . mapping _Time++-- | The AWS user account that invoked the evaluation. The account type can be+-- either an AWS root account or an AWS Identity and Access Management (IAM)+-- user account.+gerCreatedByIamUser :: Lens' GetEvaluationResponse (Maybe Text)+gerCreatedByIamUser =+    lens _gerCreatedByIamUser (\s a -> s { _gerCreatedByIamUser = a })++-- | The 'DataSource' used for this evaluation.+gerEvaluationDataSourceId :: Lens' GetEvaluationResponse (Maybe Text)+gerEvaluationDataSourceId =+    lens _gerEvaluationDataSourceId+        (\s a -> s { _gerEvaluationDataSourceId = a })++-- | The evaluation ID which is same as the 'EvaluationId' in the request.+gerEvaluationId :: Lens' GetEvaluationResponse (Maybe Text)+gerEvaluationId = lens _gerEvaluationId (\s a -> s { _gerEvaluationId = a })++-- | The location of the data file or directory in Amazon Simple Storage Service+-- (Amazon S3).+gerInputDataLocationS3 :: Lens' GetEvaluationResponse (Maybe Text)+gerInputDataLocationS3 =+    lens _gerInputDataLocationS3 (\s a -> s { _gerInputDataLocationS3 = a })++-- | The time of the most recent edit to the 'BatchPrediction'. The time is+-- expressed in epoch time.+gerLastUpdatedAt :: Lens' GetEvaluationResponse (Maybe UTCTime)+gerLastUpdatedAt = lens _gerLastUpdatedAt (\s a -> s { _gerLastUpdatedAt = a }) . mapping _Time++-- | A link to the file that contains logs of the 'CreateEvaluation' operation.+gerLogUri :: Lens' GetEvaluationResponse (Maybe Text)+gerLogUri = lens _gerLogUri (\s a -> s { _gerLogUri = a })++-- | The ID of the 'MLModel' that was the focus of the evaluation.+gerMLModelId :: Lens' GetEvaluationResponse (Maybe Text)+gerMLModelId = lens _gerMLModelId (\s a -> s { _gerMLModelId = a })++-- | A description of the most recent details about evaluating the 'MLModel'.+gerMessage :: Lens' GetEvaluationResponse (Maybe Text)+gerMessage = lens _gerMessage (\s a -> s { _gerMessage = a })++-- | A user-supplied name or description of the 'Evaluation'.+gerName :: Lens' GetEvaluationResponse (Maybe Text)+gerName = lens _gerName (\s a -> s { _gerName = a })++-- | Measurements of how well the 'MLModel' performed using observations referenced+-- by the 'DataSource'. One of the following metric is returned based on the type+-- of the 'MLModel':+--+-- BinaryAUC: A binary 'MLModel' uses the Area Under the Curve (AUC) technique+-- to measure performance.+--+-- RegressionRMSE: A regression 'MLModel' uses the Root Mean Square Error+-- (RMSE) technique to measure performance. RMSE measures the difference between+-- predicted and actual values for a single variable.+--+-- MulticlassAvgFScore: A multiclass 'MLModel' uses the F1 score technique to+-- measure performance.+--+-- For more information about performance metrics, please see the <http://docs.aws.amazon.com/machine-learning/latest/dg AmazonMachine Learning Developer Guide>.+gerPerformanceMetrics :: Lens' GetEvaluationResponse (Maybe PerformanceMetrics)+gerPerformanceMetrics =+    lens _gerPerformanceMetrics (\s a -> s { _gerPerformanceMetrics = a })++-- | The status of the evaluation. This element can have one of the following+-- values:+--+-- 'PENDING' - Amazon Machine Language (Amazon ML) submitted a request to+-- evaluate an 'MLModel'.  'INPROGRESS' - The evaluation is underway.  'FAILED' - The+-- request to evaluate an 'MLModel' did not run to completion. It is not usable.  'COMPLETED' - The evaluation process completed successfully.  'DELETED' - The 'Evaluation'+-- is marked as deleted. It is not usable.+gerStatus :: Lens' GetEvaluationResponse (Maybe EntityStatus)+gerStatus = lens _gerStatus (\s a -> s { _gerStatus = a })++instance ToPath GetEvaluation where+    toPath = const "/"++instance ToQuery GetEvaluation where+    toQuery = const mempty++instance ToHeaders GetEvaluation++instance ToJSON GetEvaluation where+    toJSON GetEvaluation{..} = object+        [ "EvaluationId" .= _geEvaluationId+        ]++instance AWSRequest GetEvaluation where+    type Sv GetEvaluation = MachineLearning+    type Rs GetEvaluation = GetEvaluationResponse++    request  = post "GetEvaluation"+    response = jsonResponse++instance FromJSON GetEvaluationResponse where+    parseJSON = withObject "GetEvaluationResponse" $ \o -> GetEvaluationResponse+        <$> o .:? "CreatedAt"+        <*> o .:? "CreatedByIamUser"+        <*> o .:? "EvaluationDataSourceId"+        <*> o .:? "EvaluationId"+        <*> o .:? "InputDataLocationS3"+        <*> o .:? "LastUpdatedAt"+        <*> o .:? "LogUri"+        <*> o .:? "MLModelId"+        <*> o .:? "Message"+        <*> o .:? "Name"+        <*> o .:? "PerformanceMetrics"+        <*> o .:? "Status"
+ gen/Network/AWS/MachineLearning/GetMLModel.hs view
@@ -0,0 +1,376 @@+{-# 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.MachineLearning.GetMLModel+-- Copyright   : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>+-- License     : This Source Code Form is subject to the terms of+--               the Mozilla Public License, v. 2.0.+--               A copy of the MPL can be found in the LICENSE file or+--               you can obtain it at http://mozilla.org/MPL/2.0/.+-- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability   : experimental+-- Portability : non-portable (GHC extensions)+--+-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- | Returns an 'MLModel' that includes detailed metadata, and data source+-- information as well as the current status of the 'MLModel'.+--+-- 'GetMLModel' provides results in normal or verbose format.+--+-- <http://http://docs.aws.amazon.com/machine-learning/latest/APIReference/API_GetMLModel.html>+module Network.AWS.MachineLearning.GetMLModel+    (+    -- * Request+      GetMLModel+    -- ** Request constructor+    , getMLModel+    -- ** Request lenses+    , gmlmMLModelId+    , gmlmVerbose++    -- * Response+    , GetMLModelResponse+    -- ** Response constructor+    , getMLModelResponse+    -- ** Response lenses+    , gmlmrCreatedAt+    , gmlmrCreatedByIamUser+    , gmlmrEndpointInfo+    , gmlmrInputDataLocationS3+    , gmlmrLastUpdatedAt+    , gmlmrLogUri+    , gmlmrMLModelId+    , gmlmrMLModelType+    , gmlmrMessage+    , gmlmrName+    , gmlmrRecipe+    , gmlmrSchema+    , gmlmrScoreThreshold+    , gmlmrScoreThresholdLastUpdatedAt+    , gmlmrSizeInBytes+    , gmlmrStatus+    , gmlmrTrainingDataSourceId+    , gmlmrTrainingParameters+    ) where++import Network.AWS.Data (Object)+import Network.AWS.Prelude+import Network.AWS.Request.JSON+import Network.AWS.MachineLearning.Types+import qualified GHC.Exts++data GetMLModel = GetMLModel+    { _gmlmMLModelId :: Text+    , _gmlmVerbose   :: Maybe Bool+    } deriving (Eq, Ord, Read, Show)++-- | 'GetMLModel' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'gmlmMLModelId' @::@ 'Text'+--+-- * 'gmlmVerbose' @::@ 'Maybe' 'Bool'+--+getMLModel :: Text -- ^ 'gmlmMLModelId'+           -> GetMLModel+getMLModel p1 = GetMLModel+    { _gmlmMLModelId = p1+    , _gmlmVerbose   = Nothing+    }++-- | The ID assigned to the 'MLModel' at creation.+gmlmMLModelId :: Lens' GetMLModel Text+gmlmMLModelId = lens _gmlmMLModelId (\s a -> s { _gmlmMLModelId = a })++-- | Specifies whether the 'GetMLModel' operation should return 'Recipe'.+--+-- If true, 'Recipe' is returned.+--+-- If false, 'Recipe' is not returned.+gmlmVerbose :: Lens' GetMLModel (Maybe Bool)+gmlmVerbose = lens _gmlmVerbose (\s a -> s { _gmlmVerbose = a })++data GetMLModelResponse = GetMLModelResponse+    { _gmlmrCreatedAt                   :: Maybe POSIX+    , _gmlmrCreatedByIamUser            :: Maybe Text+    , _gmlmrEndpointInfo                :: Maybe RealtimeEndpointInfo+    , _gmlmrInputDataLocationS3         :: Maybe Text+    , _gmlmrLastUpdatedAt               :: Maybe POSIX+    , _gmlmrLogUri                      :: Maybe Text+    , _gmlmrMLModelId                   :: Maybe Text+    , _gmlmrMLModelType                 :: Maybe MLModelType+    , _gmlmrMessage                     :: Maybe Text+    , _gmlmrName                        :: Maybe Text+    , _gmlmrRecipe                      :: Maybe Text+    , _gmlmrSchema                      :: Maybe Text+    , _gmlmrScoreThreshold              :: Maybe Double+    , _gmlmrScoreThresholdLastUpdatedAt :: Maybe POSIX+    , _gmlmrSizeInBytes                 :: Maybe Integer+    , _gmlmrStatus                      :: Maybe EntityStatus+    , _gmlmrTrainingDataSourceId        :: Maybe Text+    , _gmlmrTrainingParameters          :: Map Text Text+    } deriving (Eq, Read, Show)++-- | 'GetMLModelResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'gmlmrCreatedAt' @::@ 'Maybe' 'UTCTime'+--+-- * 'gmlmrCreatedByIamUser' @::@ 'Maybe' 'Text'+--+-- * 'gmlmrEndpointInfo' @::@ 'Maybe' 'RealtimeEndpointInfo'+--+-- * 'gmlmrInputDataLocationS3' @::@ 'Maybe' 'Text'+--+-- * 'gmlmrLastUpdatedAt' @::@ 'Maybe' 'UTCTime'+--+-- * 'gmlmrLogUri' @::@ 'Maybe' 'Text'+--+-- * 'gmlmrMLModelId' @::@ 'Maybe' 'Text'+--+-- * 'gmlmrMLModelType' @::@ 'Maybe' 'MLModelType'+--+-- * 'gmlmrMessage' @::@ 'Maybe' 'Text'+--+-- * 'gmlmrName' @::@ 'Maybe' 'Text'+--+-- * 'gmlmrRecipe' @::@ 'Maybe' 'Text'+--+-- * 'gmlmrSchema' @::@ 'Maybe' 'Text'+--+-- * 'gmlmrScoreThreshold' @::@ 'Maybe' 'Double'+--+-- * 'gmlmrScoreThresholdLastUpdatedAt' @::@ 'Maybe' 'UTCTime'+--+-- * 'gmlmrSizeInBytes' @::@ 'Maybe' 'Integer'+--+-- * 'gmlmrStatus' @::@ 'Maybe' 'EntityStatus'+--+-- * 'gmlmrTrainingDataSourceId' @::@ 'Maybe' 'Text'+--+-- * 'gmlmrTrainingParameters' @::@ 'HashMap' 'Text' 'Text'+--+getMLModelResponse :: GetMLModelResponse+getMLModelResponse = GetMLModelResponse+    { _gmlmrMLModelId                   = Nothing+    , _gmlmrTrainingDataSourceId        = Nothing+    , _gmlmrCreatedByIamUser            = Nothing+    , _gmlmrCreatedAt                   = Nothing+    , _gmlmrLastUpdatedAt               = Nothing+    , _gmlmrName                        = Nothing+    , _gmlmrStatus                      = Nothing+    , _gmlmrSizeInBytes                 = Nothing+    , _gmlmrEndpointInfo                = Nothing+    , _gmlmrTrainingParameters          = mempty+    , _gmlmrInputDataLocationS3         = Nothing+    , _gmlmrMLModelType                 = Nothing+    , _gmlmrScoreThreshold              = Nothing+    , _gmlmrScoreThresholdLastUpdatedAt = Nothing+    , _gmlmrLogUri                      = Nothing+    , _gmlmrMessage                     = Nothing+    , _gmlmrRecipe                      = Nothing+    , _gmlmrSchema                      = Nothing+    }++-- | The time that the 'MLModel' was created. The time is expressed in epoch time.+gmlmrCreatedAt :: Lens' GetMLModelResponse (Maybe UTCTime)+gmlmrCreatedAt = lens _gmlmrCreatedAt (\s a -> s { _gmlmrCreatedAt = a }) . mapping _Time++-- | The AWS user account from which the 'MLModel' was created. The account type can+-- be either an AWS root account or an AWS Identity and Access Management (IAM)+-- user account.+gmlmrCreatedByIamUser :: Lens' GetMLModelResponse (Maybe Text)+gmlmrCreatedByIamUser =+    lens _gmlmrCreatedByIamUser (\s a -> s { _gmlmrCreatedByIamUser = a })++-- | The current endpoint of the 'MLModel'+gmlmrEndpointInfo :: Lens' GetMLModelResponse (Maybe RealtimeEndpointInfo)+gmlmrEndpointInfo =+    lens _gmlmrEndpointInfo (\s a -> s { _gmlmrEndpointInfo = a })++-- | The location of the data file or directory in Amazon Simple Storage Service+-- (Amazon S3).+gmlmrInputDataLocationS3 :: Lens' GetMLModelResponse (Maybe Text)+gmlmrInputDataLocationS3 =+    lens _gmlmrInputDataLocationS3+        (\s a -> s { _gmlmrInputDataLocationS3 = a })++-- | The time of the most recent edit to the 'MLModel'. The time is expressed in+-- epoch time.+gmlmrLastUpdatedAt :: Lens' GetMLModelResponse (Maybe UTCTime)+gmlmrLastUpdatedAt =+    lens _gmlmrLastUpdatedAt (\s a -> s { _gmlmrLastUpdatedAt = a })+        . mapping _Time++-- | A link to the file that contains logs of the 'CreateMLModel' operation.+gmlmrLogUri :: Lens' GetMLModelResponse (Maybe Text)+gmlmrLogUri = lens _gmlmrLogUri (\s a -> s { _gmlmrLogUri = a })++-- | The MLModel ID which is same as the 'MLModelId' in the request.+gmlmrMLModelId :: Lens' GetMLModelResponse (Maybe Text)+gmlmrMLModelId = lens _gmlmrMLModelId (\s a -> s { _gmlmrMLModelId = a })++-- | Identifies the 'MLModel' category. The following are the available types:+--+-- REGRESSION -- Produces a numeric result. For example, "What listing price+-- should a house have?" BINARY -- Produces one of two possible results. For+-- example, "Is this an e-commerce website?" MULTICLASS -- Produces more than+-- two possible results. For example, "Is this a HIGH, LOW or MEDIUM risk trade?"+--+gmlmrMLModelType :: Lens' GetMLModelResponse (Maybe MLModelType)+gmlmrMLModelType = lens _gmlmrMLModelType (\s a -> s { _gmlmrMLModelType = a })++-- | Description of the most recent details about accessing the 'MLModel'.+gmlmrMessage :: Lens' GetMLModelResponse (Maybe Text)+gmlmrMessage = lens _gmlmrMessage (\s a -> s { _gmlmrMessage = a })++-- | A user-supplied name or description of the 'MLModel'.+gmlmrName :: Lens' GetMLModelResponse (Maybe Text)+gmlmrName = lens _gmlmrName (\s a -> s { _gmlmrName = a })++-- | The recipe to use when training the 'MLModel'. The 'Recipe' provides detailed+-- information about the observation data to use during training, as well as+-- manipulations to perform on the observation data during training.+--+-- Note This parameter is provided as part of the verbose format.+--+gmlmrRecipe :: Lens' GetMLModelResponse (Maybe Text)+gmlmrRecipe = lens _gmlmrRecipe (\s a -> s { _gmlmrRecipe = a })++-- | The schema used by all of the data files referenced by the 'DataSource'.+--+-- Note This parameter is provided as part of the verbose format.+--+gmlmrSchema :: Lens' GetMLModelResponse (Maybe Text)+gmlmrSchema = lens _gmlmrSchema (\s a -> s { _gmlmrSchema = a })++-- | The scoring threshold is used in binary classification 'MLModel's, and marks+-- the boundary between a positive prediction and a negative prediction.+--+-- Output values greater than or equal to the threshold receive a positive+-- result from the MLModel, such as 'true'. Output values less than the threshold+-- receive a negative response from the MLModel, such as 'false'.+gmlmrScoreThreshold :: Lens' GetMLModelResponse (Maybe Double)+gmlmrScoreThreshold =+    lens _gmlmrScoreThreshold (\s a -> s { _gmlmrScoreThreshold = a })++-- | The time of the most recent edit to the 'ScoreThreshold'. The time is expressed+-- in epoch time.+gmlmrScoreThresholdLastUpdatedAt :: Lens' GetMLModelResponse (Maybe UTCTime)+gmlmrScoreThresholdLastUpdatedAt =+    lens _gmlmrScoreThresholdLastUpdatedAt+        (\s a -> s { _gmlmrScoreThresholdLastUpdatedAt = a })+            . mapping _Time++gmlmrSizeInBytes :: Lens' GetMLModelResponse (Maybe Integer)+gmlmrSizeInBytes = lens _gmlmrSizeInBytes (\s a -> s { _gmlmrSizeInBytes = a })++-- | The current status of the 'MLModel'. This element can have one of the following+-- values:+--+-- 'PENDING' - Amazon Machine Learning (Amazon ML) submitted a request to+-- describe a 'MLModel'.  'INPROGRESS' - The request is processing.  'FAILED' - The+-- request did not run to completion. It is not usable.  'COMPLETED' - The request+-- completed successfully.  'DELETED' - The 'MLModel' is marked as deleted. It is+-- not usable.+gmlmrStatus :: Lens' GetMLModelResponse (Maybe EntityStatus)+gmlmrStatus = lens _gmlmrStatus (\s a -> s { _gmlmrStatus = a })++-- | The ID of the training 'DataSource'.+gmlmrTrainingDataSourceId :: Lens' GetMLModelResponse (Maybe Text)+gmlmrTrainingDataSourceId =+    lens _gmlmrTrainingDataSourceId+        (\s a -> s { _gmlmrTrainingDataSourceId = a })++-- | A list of the training parameters in the 'MLModel'. The list is implemented as+-- a map of key/value pairs.+--+-- The following is the current set of training parameters:+--+-- 'sgd.l1RegularizationAmount' - Coefficient regularization L1 norm. It+-- controls overfitting the data by penalizing large coefficients. This tends to+-- drive coefficients to zero, resulting in a sparse feature set. If you use+-- this parameter, specify a small value, such as 1.0E-04 or 1.0E-08.+--+-- The value is a double that ranges from 0 to MAX_DOUBLE. The default is not+-- to use L1 normalization. The parameter cannot be used when 'L2' is specified.+-- Use this parameter sparingly.+--+-- 'sgd.l2RegularizationAmount' - Coefficient regularization L2 norm. It+-- controls overfitting the data by penalizing large coefficients. This tends to+-- drive coefficients to small, nonzero values. If you use this parameter,+-- specify a small value, such as 1.0E-04 or 1.0E-08.+--+-- The value is a double that ranges from 0 to MAX_DOUBLE. The default is not+-- to use L2 normalization. This parameter cannot be used when 'L1' is specified.+-- Use this parameter sparingly.+--+-- 'sgd.maxPasses' - The number of times that the training process traverses the+-- observations to build the 'MLModel'. The value is an integer that ranges from 1+-- to 10000. The default value is 10.+--+-- 'sgd.maxMLModelSizeInBytes' - The maximum allowed size of the model.+-- Depending on the input data, the model size might affect performance.+--+-- The value is an integer that ranges from 100000 to 2147483648. The default+-- value is 33554432.+--+--+gmlmrTrainingParameters :: Lens' GetMLModelResponse (HashMap Text Text)+gmlmrTrainingParameters =+    lens _gmlmrTrainingParameters (\s a -> s { _gmlmrTrainingParameters = a })+        . _Map++instance ToPath GetMLModel where+    toPath = const "/"++instance ToQuery GetMLModel where+    toQuery = const mempty++instance ToHeaders GetMLModel++instance ToJSON GetMLModel where+    toJSON GetMLModel{..} = object+        [ "MLModelId" .= _gmlmMLModelId+        , "Verbose"   .= _gmlmVerbose+        ]++instance AWSRequest GetMLModel where+    type Sv GetMLModel = MachineLearning+    type Rs GetMLModel = GetMLModelResponse++    request  = post "GetMLModel"+    response = jsonResponse++instance FromJSON GetMLModelResponse where+    parseJSON = withObject "GetMLModelResponse" $ \o -> GetMLModelResponse+        <$> o .:? "CreatedAt"+        <*> o .:? "CreatedByIamUser"+        <*> o .:? "EndpointInfo"+        <*> o .:? "InputDataLocationS3"+        <*> o .:? "LastUpdatedAt"+        <*> o .:? "LogUri"+        <*> o .:? "MLModelId"+        <*> o .:? "MLModelType"+        <*> o .:? "Message"+        <*> o .:? "Name"+        <*> o .:? "Recipe"+        <*> o .:? "Schema"+        <*> o .:? "ScoreThreshold"+        <*> o .:? "ScoreThresholdLastUpdatedAt"+        <*> o .:? "SizeInBytes"+        <*> o .:? "Status"+        <*> o .:? "TrainingDataSourceId"+        <*> o .:? "TrainingParameters" .!= mempty
+ gen/Network/AWS/MachineLearning/Predict.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.MachineLearning.Predict+-- Copyright   : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>+-- License     : This Source Code Form is subject to the terms of+--               the Mozilla Public License, v. 2.0.+--               A copy of the MPL can be found in the LICENSE file or+--               you can obtain it at http://mozilla.org/MPL/2.0/.+-- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability   : experimental+-- Portability : non-portable (GHC extensions)+--+-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- | Generates a prediction for the observation using the specified 'MLModel'.+--+-- Note Not all response parameters will be populated because this is dependent+-- on the type of requested model.+--+--+-- <http://http://docs.aws.amazon.com/machine-learning/latest/APIReference/API_Predict.html>+module Network.AWS.MachineLearning.Predict+    (+    -- * Request+      Predict+    -- ** Request constructor+    , predict+    -- ** Request lenses+    , pMLModelId+    , pPredictEndpoint+    , pRecord++    -- * Response+    , PredictResponse+    -- ** Response constructor+    , predictResponse+    -- ** Response lenses+    , prPrediction+    ) where++import Network.AWS.Data (Object)+import Network.AWS.Prelude+import Network.AWS.Request.JSON+import Network.AWS.MachineLearning.Types+import qualified GHC.Exts++data Predict = Predict+    { _pMLModelId       :: Text+    , _pPredictEndpoint :: Text+    , _pRecord          :: Map Text Text+    } deriving (Eq, Read, Show)++-- | 'Predict' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'pMLModelId' @::@ 'Text'+--+-- * 'pPredictEndpoint' @::@ 'Text'+--+-- * 'pRecord' @::@ 'HashMap' 'Text' 'Text'+--+predict :: Text -- ^ 'pMLModelId'+        -> Text -- ^ 'pPredictEndpoint'+        -> Predict+predict p1 p2 = Predict+    { _pMLModelId       = p1+    , _pPredictEndpoint = p2+    , _pRecord          = mempty+    }++-- | A unique identifier of the 'MLModel'.+pMLModelId :: Lens' Predict Text+pMLModelId = lens _pMLModelId (\s a -> s { _pMLModelId = a })++pPredictEndpoint :: Lens' Predict Text+pPredictEndpoint = lens _pPredictEndpoint (\s a -> s { _pPredictEndpoint = a })++pRecord :: Lens' Predict (HashMap Text Text)+pRecord = lens _pRecord (\s a -> s { _pRecord = a }) . _Map++newtype PredictResponse = PredictResponse+    { _prPrediction :: Maybe Prediction+    } deriving (Eq, Read, Show)++-- | 'PredictResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'prPrediction' @::@ 'Maybe' 'Prediction'+--+predictResponse :: PredictResponse+predictResponse = PredictResponse+    { _prPrediction = Nothing+    }++prPrediction :: Lens' PredictResponse (Maybe Prediction)+prPrediction = lens _prPrediction (\s a -> s { _prPrediction = a })++instance ToPath Predict where+    toPath = const "/"++instance ToQuery Predict where+    toQuery = const mempty++instance ToHeaders Predict++instance ToJSON Predict where+    toJSON Predict{..} = object+        [ "MLModelId"       .= _pMLModelId+        , "Record"          .= _pRecord+        , "PredictEndpoint" .= _pPredictEndpoint+        ]++instance AWSRequest Predict where+    type Sv Predict = MachineLearning+    type Rs Predict = PredictResponse++    request  = post "Predict"+    response = jsonResponse++instance FromJSON PredictResponse where+    parseJSON = withObject "PredictResponse" $ \o -> PredictResponse+        <$> o .:? "Prediction"
+ gen/Network/AWS/MachineLearning/Types.hs view
@@ -0,0 +1,2148 @@+{-# LANGUAGE DataKinds                   #-}+{-# LANGUAGE DeriveGeneric               #-}+{-# LANGUAGE FlexibleInstances           #-}+{-# LANGUAGE GeneralizedNewtypeDeriving  #-}+{-# LANGUAGE LambdaCase                  #-}+{-# LANGUAGE NoImplicitPrelude           #-}+{-# LANGUAGE OverloadedStrings           #-}+{-# LANGUAGE RecordWildCards             #-}+{-# LANGUAGE TypeFamilies                #-}+{-# LANGUAGE ViewPatterns                #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Module      : Network.AWS.MachineLearning.Types+-- Copyright   : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>+-- License     : This Source Code Form is subject to the terms of+--               the Mozilla Public License, v. 2.0.+--               A copy of the MPL can be found in the LICENSE file or+--               you can obtain it at http://mozilla.org/MPL/2.0/.+-- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability   : experimental+-- Portability : non-portable (GHC extensions)+--+-- Derived from AWS service descriptions, licensed under Apache 2.0.++module Network.AWS.MachineLearning.Types+    (+    -- * Service+      MachineLearning+    -- ** Error+    , JSONError++    -- * BatchPredictionFilterVariable+    , BatchPredictionFilterVariable (..)++    -- * PerformanceMetrics+    , PerformanceMetrics+    , performanceMetrics+    , pmProperties++    -- * RealtimeEndpointInfo+    , RealtimeEndpointInfo+    , realtimeEndpointInfo+    , reiCreatedAt+    , reiEndpointStatus+    , reiEndpointUrl+    , reiPeakRequestsPerSecond++    -- * Prediction+    , Prediction+    , prediction+    , pDetails+    , pPredictedLabel+    , pPredictedScores+    , pPredictedValue++    -- * S3DataSpec+    , S3DataSpec+    , s3DataSpec+    , sdsDataLocationS3+    , sdsDataRearrangement+    , sdsDataSchema+    , sdsDataSchemaLocationS3++    -- * DetailsAttributes+    , DetailsAttributes (..)++    -- * EvaluationFilterVariable+    , EvaluationFilterVariable (..)++    -- * RealtimeEndpointStatus+    , RealtimeEndpointStatus (..)++    -- * RDSDataSpec+    , RDSDataSpec+    , rdsdataSpec+    , rdsdsDataRearrangement+    , rdsdsDataSchema+    , rdsdsDataSchemaUri+    , rdsdsDatabaseCredentials+    , rdsdsDatabaseInformation+    , rdsdsResourceRole+    , rdsdsS3StagingLocation+    , rdsdsSecurityGroupIds+    , rdsdsSelectSqlQuery+    , rdsdsServiceRole+    , rdsdsSubnetId++    -- * RDSMetadata+    , RDSMetadata+    , rdsmetadata+    , rdsmDataPipelineId+    , rdsmDatabase+    , rdsmDatabaseUserName+    , rdsmResourceRole+    , rdsmSelectSqlQuery+    , rdsmServiceRole++    -- * RedshiftDatabase+    , RedshiftDatabase+    , redshiftDatabase+    , rdClusterIdentifier+    , rdDatabaseName++    -- * RedshiftDatabaseCredentials+    , RedshiftDatabaseCredentials+    , redshiftDatabaseCredentials+    , rdcPassword+    , rdcUsername++    -- * MLModel+    , MLModel+    , mlmodel+    , mlmAlgorithm+    , mlmCreatedAt+    , mlmCreatedByIamUser+    , mlmEndpointInfo+    , mlmInputDataLocationS3+    , mlmLastUpdatedAt+    , mlmMLModelId+    , mlmMLModelType+    , mlmMessage+    , mlmName+    , mlmScoreThreshold+    , mlmScoreThresholdLastUpdatedAt+    , mlmSizeInBytes+    , mlmStatus+    , mlmTrainingDataSourceId+    , mlmTrainingParameters++    -- * BatchPrediction+    , BatchPrediction+    , batchPrediction+    , bpBatchPredictionDataSourceId+    , bpBatchPredictionId+    , bpCreatedAt+    , bpCreatedByIamUser+    , bpInputDataLocationS3+    , bpLastUpdatedAt+    , bpMLModelId+    , bpMessage+    , bpName+    , bpOutputUri+    , bpStatus++    -- * SortOrder+    , SortOrder (..)++    -- * Algorithm+    , Algorithm (..)++    -- * EntityStatus+    , EntityStatus (..)++    -- * DataSource+    , DataSource+    , dataSource+    , dsComputeStatistics+    , dsCreatedAt+    , dsCreatedByIamUser+    , dsDataLocationS3+    , dsDataRearrangement+    , dsDataSizeInBytes+    , dsDataSourceId+    , dsLastUpdatedAt+    , dsMessage+    , dsName+    , dsNumberOfFiles+    , dsRDSMetadata+    , dsRedshiftMetadata+    , dsRoleARN+    , dsStatus++    -- * RDSDatabase+    , RDSDatabase+    , rdsdatabase+    , rdsdDatabaseName+    , rdsdInstanceIdentifier++    -- * RDSDatabaseCredentials+    , RDSDatabaseCredentials+    , rdsdatabaseCredentials+    , rdsdcPassword+    , rdsdcUsername++    -- * MLModelFilterVariable+    , MLModelFilterVariable (..)++    -- * DataSourceFilterVariable+    , DataSourceFilterVariable (..)++    -- * RedshiftDataSpec+    , RedshiftDataSpec+    , redshiftDataSpec+    , rdsDataRearrangement+    , rdsDataSchema+    , rdsDataSchemaUri+    , rdsDatabaseCredentials+    , rdsDatabaseInformation+    , rdsS3StagingLocation+    , rdsSelectSqlQuery++    -- * Evaluation+    , Evaluation+    , evaluation+    , eCreatedAt+    , eCreatedByIamUser+    , eEvaluationDataSourceId+    , eEvaluationId+    , eInputDataLocationS3+    , eLastUpdatedAt+    , eMLModelId+    , eMessage+    , eName+    , ePerformanceMetrics+    , eStatus++    -- * RedshiftMetadata+    , RedshiftMetadata+    , redshiftMetadata+    , rmDatabaseUserName+    , rmRedshiftDatabase+    , rmSelectSqlQuery++    -- * MLModelType+    , MLModelType (..)+    ) where++import Network.AWS.Prelude+import Network.AWS.Signing+import qualified GHC.Exts++-- | Version @2014-12-12@ of the Amazon Machine Learning service.+data MachineLearning++instance AWSService MachineLearning where+    type Sg MachineLearning = V4+    type Er MachineLearning = JSONError++    service = service'+      where+        service' :: Service MachineLearning+        service' = Service+            { _svcAbbrev       = "MachineLearning"+            , _svcPrefix       = "machinelearning"+            , _svcVersion      = "2014-12-12"+            , _svcTargetPrefix = Just "AmazonML_20141212"+            , _svcJSONVersion  = Just "1.1"+            , _svcHandle       = handle+            , _svcRetry        = retry+            }++        handle :: Status+               -> Maybe (LazyByteString -> ServiceError JSONError)+        handle = jsonError statusSuccess service'++        retry :: Retry MachineLearning+        retry = Exponential+            { _retryBase     = 0.05+            , _retryGrowth   = 2+            , _retryAttempts = 5+            , _retryCheck    = check+            }++        check :: Status+              -> JSONError+              -> Bool+        check (statusCode -> s) (awsErrorCode -> e)+            | s == 500  = True -- General Server Error+            | s == 509  = True -- Limit Exceeded+            | s == 503  = True -- Service Unavailable+            | otherwise = False++data BatchPredictionFilterVariable+    = BatchCreatedAt     -- ^ CreatedAt+    | BatchDataSourceId  -- ^ DataSourceId+    | BatchDataURI       -- ^ DataURI+    | BatchIAMUser       -- ^ IAMUser+    | BatchLastUpdatedAt -- ^ LastUpdatedAt+    | BatchMLModelId     -- ^ MLModelId+    | BatchName          -- ^ Name+    | BatchStatus        -- ^ Status+      deriving (Eq, Ord, Read, Show, Generic, Enum)++instance Hashable BatchPredictionFilterVariable++instance FromText BatchPredictionFilterVariable where+    parser = takeLowerText >>= \case+        "createdat"     -> pure BatchCreatedAt+        "datasourceid"  -> pure BatchDataSourceId+        "datauri"       -> pure BatchDataURI+        "iamuser"       -> pure BatchIAMUser+        "lastupdatedat" -> pure BatchLastUpdatedAt+        "mlmodelid"     -> pure BatchMLModelId+        "name"          -> pure BatchName+        "status"        -> pure BatchStatus+        e               -> fail $+            "Failure parsing BatchPredictionFilterVariable from " ++ show e++instance ToText BatchPredictionFilterVariable where+    toText = \case+        BatchCreatedAt     -> "CreatedAt"+        BatchDataSourceId  -> "DataSourceId"+        BatchDataURI       -> "DataURI"+        BatchIAMUser       -> "IAMUser"+        BatchLastUpdatedAt -> "LastUpdatedAt"+        BatchMLModelId     -> "MLModelId"+        BatchName          -> "Name"+        BatchStatus        -> "Status"++instance ToByteString BatchPredictionFilterVariable+instance ToHeader     BatchPredictionFilterVariable+instance ToQuery      BatchPredictionFilterVariable++instance FromJSON BatchPredictionFilterVariable where+    parseJSON = parseJSONText "BatchPredictionFilterVariable"++instance ToJSON BatchPredictionFilterVariable where+    toJSON = toJSONText++newtype PerformanceMetrics = PerformanceMetrics+    { _pmProperties :: Map Text Text+    } deriving (Eq, Read, Show, Monoid, Semigroup)++-- | 'PerformanceMetrics' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'pmProperties' @::@ 'HashMap' 'Text' 'Text'+--+performanceMetrics :: PerformanceMetrics+performanceMetrics = PerformanceMetrics+    { _pmProperties = mempty+    }++pmProperties :: Lens' PerformanceMetrics (HashMap Text Text)+pmProperties = lens _pmProperties (\s a -> s { _pmProperties = a }) . _Map++instance FromJSON PerformanceMetrics where+    parseJSON = withObject "PerformanceMetrics" $ \o -> PerformanceMetrics+        <$> o .:? "Properties" .!= mempty++instance ToJSON PerformanceMetrics where+    toJSON PerformanceMetrics{..} = object+        [ "Properties" .= _pmProperties+        ]++data RealtimeEndpointInfo = RealtimeEndpointInfo+    { _reiCreatedAt             :: Maybe POSIX+    , _reiEndpointStatus        :: Maybe RealtimeEndpointStatus+    , _reiEndpointUrl           :: Maybe Text+    , _reiPeakRequestsPerSecond :: Maybe Int+    } deriving (Eq, Read, Show)++-- | 'RealtimeEndpointInfo' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'reiCreatedAt' @::@ 'Maybe' 'UTCTime'+--+-- * 'reiEndpointStatus' @::@ 'Maybe' 'RealtimeEndpointStatus'+--+-- * 'reiEndpointUrl' @::@ 'Maybe' 'Text'+--+-- * 'reiPeakRequestsPerSecond' @::@ 'Maybe' 'Int'+--+realtimeEndpointInfo :: RealtimeEndpointInfo+realtimeEndpointInfo = RealtimeEndpointInfo+    { _reiPeakRequestsPerSecond = Nothing+    , _reiCreatedAt             = Nothing+    , _reiEndpointUrl           = Nothing+    , _reiEndpointStatus        = Nothing+    }++-- | The time that the request to create the real-time endpoint for the 'MLModel'+-- was received. The time is expressed in epoch time.+reiCreatedAt :: Lens' RealtimeEndpointInfo (Maybe UTCTime)+reiCreatedAt = lens _reiCreatedAt (\s a -> s { _reiCreatedAt = a }) . mapping _Time++-- | The current status of the real-time endpoint for the 'MLModel'. This element+-- can have one of the following values:+--+-- NONE - Endpoint does not exist or was previously deleted. READY - Endpoint+-- is ready to be used for real-time predictions. UPDATING - Updating/creating+-- the endpoint.+reiEndpointStatus :: Lens' RealtimeEndpointInfo (Maybe RealtimeEndpointStatus)+reiEndpointStatus =+    lens _reiEndpointStatus (\s a -> s { _reiEndpointStatus = a })++-- | The URI that specifies where to send real-time prediction requests for the 'MLModel'.+--+-- Note The application must wait until the real-time endpoint is ready before+-- using this URI.+--+--+reiEndpointUrl :: Lens' RealtimeEndpointInfo (Maybe Text)+reiEndpointUrl = lens _reiEndpointUrl (\s a -> s { _reiEndpointUrl = a })++-- | The maximum processing rate for the real-time endpoint for 'MLModel', measured+-- in incoming requests per second.+reiPeakRequestsPerSecond :: Lens' RealtimeEndpointInfo (Maybe Int)+reiPeakRequestsPerSecond =+    lens _reiPeakRequestsPerSecond+        (\s a -> s { _reiPeakRequestsPerSecond = a })++instance FromJSON RealtimeEndpointInfo where+    parseJSON = withObject "RealtimeEndpointInfo" $ \o -> RealtimeEndpointInfo+        <$> o .:? "CreatedAt"+        <*> o .:? "EndpointStatus"+        <*> o .:? "EndpointUrl"+        <*> o .:? "PeakRequestsPerSecond"++instance ToJSON RealtimeEndpointInfo where+    toJSON RealtimeEndpointInfo{..} = object+        [ "PeakRequestsPerSecond" .= _reiPeakRequestsPerSecond+        , "CreatedAt"             .= _reiCreatedAt+        , "EndpointUrl"           .= _reiEndpointUrl+        , "EndpointStatus"        .= _reiEndpointStatus+        ]++data Prediction = Prediction+    { _pDetails         :: Map DetailsAttributes Text+    , _pPredictedLabel  :: Maybe Text+    , _pPredictedScores :: Map Text Double+    , _pPredictedValue  :: Maybe Double+    } deriving (Eq, Read, Show)++-- | 'Prediction' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'pDetails' @::@ 'HashMap' 'DetailsAttributes' 'Text'+--+-- * 'pPredictedLabel' @::@ 'Maybe' 'Text'+--+-- * 'pPredictedScores' @::@ 'HashMap' 'Text' 'Double'+--+-- * 'pPredictedValue' @::@ 'Maybe' 'Double'+--+prediction :: Prediction+prediction = Prediction+    { _pPredictedLabel  = Nothing+    , _pPredictedValue  = Nothing+    , _pPredictedScores = mempty+    , _pDetails         = mempty+    }++pDetails :: Lens' Prediction (HashMap DetailsAttributes Text)+pDetails = lens _pDetails (\s a -> s { _pDetails = a }) . _Map++-- | The prediction label for either a BINARY or MULTICLASS 'MLModel'.+pPredictedLabel :: Lens' Prediction (Maybe Text)+pPredictedLabel = lens _pPredictedLabel (\s a -> s { _pPredictedLabel = a })++pPredictedScores :: Lens' Prediction (HashMap Text Double)+pPredictedScores = lens _pPredictedScores (\s a -> s { _pPredictedScores = a }) . _Map++-- | The prediction value for REGRESSION 'MLModel'.+pPredictedValue :: Lens' Prediction (Maybe Double)+pPredictedValue = lens _pPredictedValue (\s a -> s { _pPredictedValue = a })++instance FromJSON Prediction where+    parseJSON = withObject "Prediction" $ \o -> Prediction+        <$> o .:? "details" .!= mempty+        <*> o .:? "predictedLabel"+        <*> o .:? "predictedScores" .!= mempty+        <*> o .:? "predictedValue"++instance ToJSON Prediction where+    toJSON Prediction{..} = object+        [ "predictedLabel"  .= _pPredictedLabel+        , "predictedValue"  .= _pPredictedValue+        , "predictedScores" .= _pPredictedScores+        , "details"         .= _pDetails+        ]++data S3DataSpec = S3DataSpec+    { _sdsDataLocationS3       :: Text+    , _sdsDataRearrangement    :: Maybe Text+    , _sdsDataSchema           :: Maybe Text+    , _sdsDataSchemaLocationS3 :: Maybe Text+    } deriving (Eq, Ord, Read, Show)++-- | 'S3DataSpec' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'sdsDataLocationS3' @::@ 'Text'+--+-- * 'sdsDataRearrangement' @::@ 'Maybe' 'Text'+--+-- * 'sdsDataSchema' @::@ 'Maybe' 'Text'+--+-- * 'sdsDataSchemaLocationS3' @::@ 'Maybe' 'Text'+--+s3DataSpec :: Text -- ^ 'sdsDataLocationS3'+           -> S3DataSpec+s3DataSpec p1 = S3DataSpec+    { _sdsDataLocationS3       = p1+    , _sdsDataRearrangement    = Nothing+    , _sdsDataSchema           = Nothing+    , _sdsDataSchemaLocationS3 = Nothing+    }++-- | The location of the data file(s) used by a 'DataSource'. The URI specifies a+-- data file or an Amazon Simple Storage Service (Amazon S3) directory or bucket+-- containing data files.+sdsDataLocationS3 :: Lens' S3DataSpec Text+sdsDataLocationS3 =+    lens _sdsDataLocationS3 (\s a -> s { _sdsDataLocationS3 = a })++-- | Describes the splitting requirement of a 'Datasource'.+sdsDataRearrangement :: Lens' S3DataSpec (Maybe Text)+sdsDataRearrangement =+    lens _sdsDataRearrangement (\s a -> s { _sdsDataRearrangement = a })++-- | Describes the schema for an Amazon S3 'DataSource'.+sdsDataSchema :: Lens' S3DataSpec (Maybe Text)+sdsDataSchema = lens _sdsDataSchema (\s a -> s { _sdsDataSchema = a })++-- | Describes the schema Location in Amazon S3.+sdsDataSchemaLocationS3 :: Lens' S3DataSpec (Maybe Text)+sdsDataSchemaLocationS3 =+    lens _sdsDataSchemaLocationS3 (\s a -> s { _sdsDataSchemaLocationS3 = a })++instance FromJSON S3DataSpec where+    parseJSON = withObject "S3DataSpec" $ \o -> S3DataSpec+        <$> o .:  "DataLocationS3"+        <*> o .:? "DataRearrangement"+        <*> o .:? "DataSchema"+        <*> o .:? "DataSchemaLocationS3"++instance ToJSON S3DataSpec where+    toJSON S3DataSpec{..} = object+        [ "DataLocationS3"       .= _sdsDataLocationS3+        , "DataRearrangement"    .= _sdsDataRearrangement+        , "DataSchema"           .= _sdsDataSchema+        , "DataSchemaLocationS3" .= _sdsDataSchemaLocationS3+        ]++data DetailsAttributes+    = DAAlgorithm           -- ^ Algorithm+    | DAPredictiveModelType -- ^ PredictiveModelType+      deriving (Eq, Ord, Read, Show, Generic, Enum)++instance Hashable DetailsAttributes++instance FromText DetailsAttributes where+    parser = takeLowerText >>= \case+        "algorithm"           -> pure DAAlgorithm+        "predictivemodeltype" -> pure DAPredictiveModelType+        e                     -> fail $+            "Failure parsing DetailsAttributes from " ++ show e++instance ToText DetailsAttributes where+    toText = \case+        DAAlgorithm           -> "Algorithm"+        DAPredictiveModelType -> "PredictiveModelType"++instance ToByteString DetailsAttributes+instance ToHeader     DetailsAttributes+instance ToQuery      DetailsAttributes++instance FromJSON DetailsAttributes where+    parseJSON = parseJSONText "DetailsAttributes"++instance ToJSON DetailsAttributes where+    toJSON = toJSONText++data EvaluationFilterVariable+    = EvalCreatedAt     -- ^ CreatedAt+    | EvalDataSourceId  -- ^ DataSourceId+    | EvalDataURI       -- ^ DataURI+    | EvalIAMUser       -- ^ IAMUser+    | EvalLastUpdatedAt -- ^ LastUpdatedAt+    | EvalMLModelId     -- ^ MLModelId+    | EvalName          -- ^ Name+    | EvalStatus        -- ^ Status+      deriving (Eq, Ord, Read, Show, Generic, Enum)++instance Hashable EvaluationFilterVariable++instance FromText EvaluationFilterVariable where+    parser = takeLowerText >>= \case+        "createdat"     -> pure EvalCreatedAt+        "datasourceid"  -> pure EvalDataSourceId+        "datauri"       -> pure EvalDataURI+        "iamuser"       -> pure EvalIAMUser+        "lastupdatedat" -> pure EvalLastUpdatedAt+        "mlmodelid"     -> pure EvalMLModelId+        "name"          -> pure EvalName+        "status"        -> pure EvalStatus+        e               -> fail $+            "Failure parsing EvaluationFilterVariable from " ++ show e++instance ToText EvaluationFilterVariable where+    toText = \case+        EvalCreatedAt     -> "CreatedAt"+        EvalDataSourceId  -> "DataSourceId"+        EvalDataURI       -> "DataURI"+        EvalIAMUser       -> "IAMUser"+        EvalLastUpdatedAt -> "LastUpdatedAt"+        EvalMLModelId     -> "MLModelId"+        EvalName          -> "Name"+        EvalStatus        -> "Status"++instance ToByteString EvaluationFilterVariable+instance ToHeader     EvaluationFilterVariable+instance ToQuery      EvaluationFilterVariable++instance FromJSON EvaluationFilterVariable where+    parseJSON = parseJSONText "EvaluationFilterVariable"++instance ToJSON EvaluationFilterVariable where+    toJSON = toJSONText++data RealtimeEndpointStatus+    = Failed   -- ^ FAILED+    | None     -- ^ NONE+    | Ready    -- ^ READY+    | Updating -- ^ UPDATING+      deriving (Eq, Ord, Read, Show, Generic, Enum)++instance Hashable RealtimeEndpointStatus++instance FromText RealtimeEndpointStatus where+    parser = takeLowerText >>= \case+        "failed"   -> pure Failed+        "none"     -> pure None+        "ready"    -> pure Ready+        "updating" -> pure Updating+        e          -> fail $+            "Failure parsing RealtimeEndpointStatus from " ++ show e++instance ToText RealtimeEndpointStatus where+    toText = \case+        Failed   -> "FAILED"+        None     -> "NONE"+        Ready    -> "READY"+        Updating -> "UPDATING"++instance ToByteString RealtimeEndpointStatus+instance ToHeader     RealtimeEndpointStatus+instance ToQuery      RealtimeEndpointStatus++instance FromJSON RealtimeEndpointStatus where+    parseJSON = parseJSONText "RealtimeEndpointStatus"++instance ToJSON RealtimeEndpointStatus where+    toJSON = toJSONText++data RDSDataSpec = RDSDataSpec+    { _rdsdsDataRearrangement   :: Maybe Text+    , _rdsdsDataSchema          :: Maybe Text+    , _rdsdsDataSchemaUri       :: Maybe Text+    , _rdsdsDatabaseCredentials :: RDSDatabaseCredentials+    , _rdsdsDatabaseInformation :: RDSDatabase+    , _rdsdsResourceRole        :: Text+    , _rdsdsS3StagingLocation   :: Text+    , _rdsdsSecurityGroupIds    :: List "SecurityGroupIds" Text+    , _rdsdsSelectSqlQuery      :: Text+    , _rdsdsServiceRole         :: Text+    , _rdsdsSubnetId            :: Text+    } deriving (Eq, Read, Show)++-- | 'RDSDataSpec' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'rdsdsDataRearrangement' @::@ 'Maybe' 'Text'+--+-- * 'rdsdsDataSchema' @::@ 'Maybe' 'Text'+--+-- * 'rdsdsDataSchemaUri' @::@ 'Maybe' 'Text'+--+-- * 'rdsdsDatabaseCredentials' @::@ 'RDSDatabaseCredentials'+--+-- * 'rdsdsDatabaseInformation' @::@ 'RDSDatabase'+--+-- * 'rdsdsResourceRole' @::@ 'Text'+--+-- * 'rdsdsS3StagingLocation' @::@ 'Text'+--+-- * 'rdsdsSecurityGroupIds' @::@ ['Text']+--+-- * 'rdsdsSelectSqlQuery' @::@ 'Text'+--+-- * 'rdsdsServiceRole' @::@ 'Text'+--+-- * 'rdsdsSubnetId' @::@ 'Text'+--+rdsdataSpec :: RDSDatabase -- ^ 'rdsdsDatabaseInformation'+            -> Text -- ^ 'rdsdsSelectSqlQuery'+            -> RDSDatabaseCredentials -- ^ 'rdsdsDatabaseCredentials'+            -> Text -- ^ 'rdsdsS3StagingLocation'+            -> Text -- ^ 'rdsdsResourceRole'+            -> Text -- ^ 'rdsdsServiceRole'+            -> Text -- ^ 'rdsdsSubnetId'+            -> RDSDataSpec+rdsdataSpec p1 p2 p3 p4 p5 p6 p7 = RDSDataSpec+    { _rdsdsDatabaseInformation = p1+    , _rdsdsSelectSqlQuery      = p2+    , _rdsdsDatabaseCredentials = p3+    , _rdsdsS3StagingLocation   = p4+    , _rdsdsResourceRole        = p5+    , _rdsdsServiceRole         = p6+    , _rdsdsSubnetId            = p7+    , _rdsdsDataRearrangement   = Nothing+    , _rdsdsDataSchema          = Nothing+    , _rdsdsDataSchemaUri       = Nothing+    , _rdsdsSecurityGroupIds    = mempty+    }++-- | DataRearrangement - A JSON string that represents the splitting requirement+-- of a 'DataSource'.+--+--+-- Sample - ' "{\"randomSeed\":\"some-random-seed\",\"splitting\":{\"percentBegin\":10,\"percentEnd\":60}}"'+rdsdsDataRearrangement :: Lens' RDSDataSpec (Maybe Text)+rdsdsDataRearrangement =+    lens _rdsdsDataRearrangement (\s a -> s { _rdsdsDataRearrangement = a })++-- | A JSON string that represents the schema. This is not required if 'DataSchemaUri' is specified.+rdsdsDataSchema :: Lens' RDSDataSpec (Maybe Text)+rdsdsDataSchema = lens _rdsdsDataSchema (\s a -> s { _rdsdsDataSchema = a })++-- | The Amazon S3 location of the 'DataSchema'.+rdsdsDataSchemaUri :: Lens' RDSDataSpec (Maybe Text)+rdsdsDataSchemaUri =+    lens _rdsdsDataSchemaUri (\s a -> s { _rdsdsDataSchemaUri = a })++-- | The AWS Identity and Access Management (IAM) credentials that are used+-- connect to the Amazon RDS database.+rdsdsDatabaseCredentials :: Lens' RDSDataSpec RDSDatabaseCredentials+rdsdsDatabaseCredentials =+    lens _rdsdsDatabaseCredentials+        (\s a -> s { _rdsdsDatabaseCredentials = a })++-- | Describes the 'DatabaseName' and 'InstanceIdentifier' of an an Amazon RDS+-- database.+rdsdsDatabaseInformation :: Lens' RDSDataSpec RDSDatabase+rdsdsDatabaseInformation =+    lens _rdsdsDatabaseInformation+        (\s a -> s { _rdsdsDatabaseInformation = a })++-- | The role (DataPipelineDefaultResourceRole) assumed by an Amazon Elastic+-- Compute Cloud (Amazon EC2) instance to carry out the copy operation from+-- Amazon RDS to an Amazon S3 task. For more information, see <http://docs.aws.amazon.com/datapipeline/latest/DeveloperGuide/dp-iam-roles.html Role templates> for+-- data pipelines.+rdsdsResourceRole :: Lens' RDSDataSpec Text+rdsdsResourceRole =+    lens _rdsdsResourceRole (\s a -> s { _rdsdsResourceRole = a })++-- | The Amazon S3 location for staging Amazon RDS data. The data retrieved from+-- Amazon RDS using 'SelectSqlQuery' is stored in this location.+rdsdsS3StagingLocation :: Lens' RDSDataSpec Text+rdsdsS3StagingLocation =+    lens _rdsdsS3StagingLocation (\s a -> s { _rdsdsS3StagingLocation = a })++-- | The security group IDs to be used to access a VPC-based RDS DB instance.+-- Ensure that there are appropriate ingress rules set up to allow access to the+-- RDS DB instance. This attribute is used by Data Pipeline to carry out the+-- copy operation from Amazon RDS to an Amazon S3 task.+rdsdsSecurityGroupIds :: Lens' RDSDataSpec [Text]+rdsdsSecurityGroupIds =+    lens _rdsdsSecurityGroupIds (\s a -> s { _rdsdsSecurityGroupIds = a })+        . _List++-- | The query that is used to retrieve the observation data for the 'DataSource'.+rdsdsSelectSqlQuery :: Lens' RDSDataSpec Text+rdsdsSelectSqlQuery =+    lens _rdsdsSelectSqlQuery (\s a -> s { _rdsdsSelectSqlQuery = a })++-- | The role (DataPipelineDefaultRole) assumed by AWS Data Pipeline service to+-- monitor the progress of the copy task from Amazon RDS to Amazon S3. For more+-- information, see <http://docs.aws.amazon.com/datapipeline/latest/DeveloperGuide/dp-iam-roles.html Role templates> for data pipelines.+rdsdsServiceRole :: Lens' RDSDataSpec Text+rdsdsServiceRole = lens _rdsdsServiceRole (\s a -> s { _rdsdsServiceRole = a })++-- | The subnet ID to be used to access a VPC-based RDS DB instance. This+-- attribute is used by Data Pipeline to carry out the copy task from Amazon RDS+-- to Amazon S3.+rdsdsSubnetId :: Lens' RDSDataSpec Text+rdsdsSubnetId = lens _rdsdsSubnetId (\s a -> s { _rdsdsSubnetId = a })++instance FromJSON RDSDataSpec where+    parseJSON = withObject "RDSDataSpec" $ \o -> RDSDataSpec+        <$> o .:? "DataRearrangement"+        <*> o .:? "DataSchema"+        <*> o .:? "DataSchemaUri"+        <*> o .:  "DatabaseCredentials"+        <*> o .:  "DatabaseInformation"+        <*> o .:  "ResourceRole"+        <*> o .:  "S3StagingLocation"+        <*> o .:? "SecurityGroupIds" .!= mempty+        <*> o .:  "SelectSqlQuery"+        <*> o .:  "ServiceRole"+        <*> o .:  "SubnetId"++instance ToJSON RDSDataSpec where+    toJSON RDSDataSpec{..} = object+        [ "DatabaseInformation" .= _rdsdsDatabaseInformation+        , "SelectSqlQuery"      .= _rdsdsSelectSqlQuery+        , "DatabaseCredentials" .= _rdsdsDatabaseCredentials+        , "S3StagingLocation"   .= _rdsdsS3StagingLocation+        , "DataRearrangement"   .= _rdsdsDataRearrangement+        , "DataSchema"          .= _rdsdsDataSchema+        , "DataSchemaUri"       .= _rdsdsDataSchemaUri+        , "ResourceRole"        .= _rdsdsResourceRole+        , "ServiceRole"         .= _rdsdsServiceRole+        , "SubnetId"            .= _rdsdsSubnetId+        , "SecurityGroupIds"    .= _rdsdsSecurityGroupIds+        ]++data RDSMetadata = RDSMetadata+    { _rdsmDataPipelineId   :: Maybe Text+    , _rdsmDatabase         :: Maybe RDSDatabase+    , _rdsmDatabaseUserName :: Maybe Text+    , _rdsmResourceRole     :: Maybe Text+    , _rdsmSelectSqlQuery   :: Maybe Text+    , _rdsmServiceRole      :: Maybe Text+    } deriving (Eq, Read, Show)++-- | 'RDSMetadata' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'rdsmDataPipelineId' @::@ 'Maybe' 'Text'+--+-- * 'rdsmDatabase' @::@ 'Maybe' 'RDSDatabase'+--+-- * 'rdsmDatabaseUserName' @::@ 'Maybe' 'Text'+--+-- * 'rdsmResourceRole' @::@ 'Maybe' 'Text'+--+-- * 'rdsmSelectSqlQuery' @::@ 'Maybe' 'Text'+--+-- * 'rdsmServiceRole' @::@ 'Maybe' 'Text'+--+rdsmetadata :: RDSMetadata+rdsmetadata = RDSMetadata+    { _rdsmDatabase         = Nothing+    , _rdsmDatabaseUserName = Nothing+    , _rdsmSelectSqlQuery   = Nothing+    , _rdsmResourceRole     = Nothing+    , _rdsmServiceRole      = Nothing+    , _rdsmDataPipelineId   = Nothing+    }++-- | The ID of the Data Pipeline instance that is used to carry to copy data from+-- Amazon RDS to Amazon S3. You can use the ID to find details about the+-- instance in the Data Pipeline console.+rdsmDataPipelineId :: Lens' RDSMetadata (Maybe Text)+rdsmDataPipelineId =+    lens _rdsmDataPipelineId (\s a -> s { _rdsmDataPipelineId = a })++-- | The database details required to connect to an Amazon RDS.+rdsmDatabase :: Lens' RDSMetadata (Maybe RDSDatabase)+rdsmDatabase = lens _rdsmDatabase (\s a -> s { _rdsmDatabase = a })++rdsmDatabaseUserName :: Lens' RDSMetadata (Maybe Text)+rdsmDatabaseUserName =+    lens _rdsmDatabaseUserName (\s a -> s { _rdsmDatabaseUserName = a })++-- | The role (DataPipelineDefaultResourceRole) assumed by an Amazon EC2 instance+-- to carry out the copy task from Amazon RDS to Amazon S3. For more+-- information, see <http://docs.aws.amazon.com/datapipeline/latest/DeveloperGuide/dp-iam-roles.html Role templates> for data pipelines.+rdsmResourceRole :: Lens' RDSMetadata (Maybe Text)+rdsmResourceRole = lens _rdsmResourceRole (\s a -> s { _rdsmResourceRole = a })++-- | The SQL query that is supplied during 'CreateDataSourceFromRDS'. Returns only+-- if 'Verbose' is true in 'GetDataSourceInput'.+rdsmSelectSqlQuery :: Lens' RDSMetadata (Maybe Text)+rdsmSelectSqlQuery =+    lens _rdsmSelectSqlQuery (\s a -> s { _rdsmSelectSqlQuery = a })++-- | The role (DataPipelineDefaultRole) assumed by the Data Pipeline service to+-- monitor the progress of the copy task from Amazon RDS to Amazon S3. For more+-- information, see <http://docs.aws.amazon.com/datapipeline/latest/DeveloperGuide/dp-iam-roles.html Role templates> for data pipelines.+rdsmServiceRole :: Lens' RDSMetadata (Maybe Text)+rdsmServiceRole = lens _rdsmServiceRole (\s a -> s { _rdsmServiceRole = a })++instance FromJSON RDSMetadata where+    parseJSON = withObject "RDSMetadata" $ \o -> RDSMetadata+        <$> o .:? "DataPipelineId"+        <*> o .:? "Database"+        <*> o .:? "DatabaseUserName"+        <*> o .:? "ResourceRole"+        <*> o .:? "SelectSqlQuery"+        <*> o .:? "ServiceRole"++instance ToJSON RDSMetadata where+    toJSON RDSMetadata{..} = object+        [ "Database"         .= _rdsmDatabase+        , "DatabaseUserName" .= _rdsmDatabaseUserName+        , "SelectSqlQuery"   .= _rdsmSelectSqlQuery+        , "ResourceRole"     .= _rdsmResourceRole+        , "ServiceRole"      .= _rdsmServiceRole+        , "DataPipelineId"   .= _rdsmDataPipelineId+        ]++data RedshiftDatabase = RedshiftDatabase+    { _rdClusterIdentifier :: Text+    , _rdDatabaseName      :: Text+    } deriving (Eq, Ord, Read, Show)++-- | 'RedshiftDatabase' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'rdClusterIdentifier' @::@ 'Text'+--+-- * 'rdDatabaseName' @::@ 'Text'+--+redshiftDatabase :: Text -- ^ 'rdDatabaseName'+                 -> Text -- ^ 'rdClusterIdentifier'+                 -> RedshiftDatabase+redshiftDatabase p1 p2 = RedshiftDatabase+    { _rdDatabaseName      = p1+    , _rdClusterIdentifier = p2+    }++rdClusterIdentifier :: Lens' RedshiftDatabase Text+rdClusterIdentifier =+    lens _rdClusterIdentifier (\s a -> s { _rdClusterIdentifier = a })++rdDatabaseName :: Lens' RedshiftDatabase Text+rdDatabaseName = lens _rdDatabaseName (\s a -> s { _rdDatabaseName = a })++instance FromJSON RedshiftDatabase where+    parseJSON = withObject "RedshiftDatabase" $ \o -> RedshiftDatabase+        <$> o .:  "ClusterIdentifier"+        <*> o .:  "DatabaseName"++instance ToJSON RedshiftDatabase where+    toJSON RedshiftDatabase{..} = object+        [ "DatabaseName"      .= _rdDatabaseName+        , "ClusterIdentifier" .= _rdClusterIdentifier+        ]++data RedshiftDatabaseCredentials = RedshiftDatabaseCredentials+    { _rdcPassword :: Text+    , _rdcUsername :: Text+    } deriving (Eq, Ord, Read, Show)++-- | 'RedshiftDatabaseCredentials' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'rdcPassword' @::@ 'Text'+--+-- * 'rdcUsername' @::@ 'Text'+--+redshiftDatabaseCredentials :: Text -- ^ 'rdcUsername'+                            -> Text -- ^ 'rdcPassword'+                            -> RedshiftDatabaseCredentials+redshiftDatabaseCredentials p1 p2 = RedshiftDatabaseCredentials+    { _rdcUsername = p1+    , _rdcPassword = p2+    }++rdcPassword :: Lens' RedshiftDatabaseCredentials Text+rdcPassword = lens _rdcPassword (\s a -> s { _rdcPassword = a })++rdcUsername :: Lens' RedshiftDatabaseCredentials Text+rdcUsername = lens _rdcUsername (\s a -> s { _rdcUsername = a })++instance FromJSON RedshiftDatabaseCredentials where+    parseJSON = withObject "RedshiftDatabaseCredentials" $ \o -> RedshiftDatabaseCredentials+        <$> o .:  "Password"+        <*> o .:  "Username"++instance ToJSON RedshiftDatabaseCredentials where+    toJSON RedshiftDatabaseCredentials{..} = object+        [ "Username" .= _rdcUsername+        , "Password" .= _rdcPassword+        ]++data MLModel = MLModel+    { _mlmAlgorithm                   :: Maybe Algorithm+    , _mlmCreatedAt                   :: Maybe POSIX+    , _mlmCreatedByIamUser            :: Maybe Text+    , _mlmEndpointInfo                :: Maybe RealtimeEndpointInfo+    , _mlmInputDataLocationS3         :: Maybe Text+    , _mlmLastUpdatedAt               :: Maybe POSIX+    , _mlmMLModelId                   :: Maybe Text+    , _mlmMLModelType                 :: Maybe MLModelType+    , _mlmMessage                     :: Maybe Text+    , _mlmName                        :: Maybe Text+    , _mlmScoreThreshold              :: Maybe Double+    , _mlmScoreThresholdLastUpdatedAt :: Maybe POSIX+    , _mlmSizeInBytes                 :: Maybe Integer+    , _mlmStatus                      :: Maybe EntityStatus+    , _mlmTrainingDataSourceId        :: Maybe Text+    , _mlmTrainingParameters          :: Map Text Text+    } deriving (Eq, Read, Show)++-- | 'MLModel' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'mlmAlgorithm' @::@ 'Maybe' 'Algorithm'+--+-- * 'mlmCreatedAt' @::@ 'Maybe' 'UTCTime'+--+-- * 'mlmCreatedByIamUser' @::@ 'Maybe' 'Text'+--+-- * 'mlmEndpointInfo' @::@ 'Maybe' 'RealtimeEndpointInfo'+--+-- * 'mlmInputDataLocationS3' @::@ 'Maybe' 'Text'+--+-- * 'mlmLastUpdatedAt' @::@ 'Maybe' 'UTCTime'+--+-- * 'mlmMLModelId' @::@ 'Maybe' 'Text'+--+-- * 'mlmMLModelType' @::@ 'Maybe' 'MLModelType'+--+-- * 'mlmMessage' @::@ 'Maybe' 'Text'+--+-- * 'mlmName' @::@ 'Maybe' 'Text'+--+-- * 'mlmScoreThreshold' @::@ 'Maybe' 'Double'+--+-- * 'mlmScoreThresholdLastUpdatedAt' @::@ 'Maybe' 'UTCTime'+--+-- * 'mlmSizeInBytes' @::@ 'Maybe' 'Integer'+--+-- * 'mlmStatus' @::@ 'Maybe' 'EntityStatus'+--+-- * 'mlmTrainingDataSourceId' @::@ 'Maybe' 'Text'+--+-- * 'mlmTrainingParameters' @::@ 'HashMap' 'Text' 'Text'+--+mlmodel :: MLModel+mlmodel = MLModel+    { _mlmMLModelId                   = Nothing+    , _mlmTrainingDataSourceId        = Nothing+    , _mlmCreatedByIamUser            = Nothing+    , _mlmCreatedAt                   = Nothing+    , _mlmLastUpdatedAt               = Nothing+    , _mlmName                        = Nothing+    , _mlmStatus                      = Nothing+    , _mlmSizeInBytes                 = Nothing+    , _mlmEndpointInfo                = Nothing+    , _mlmTrainingParameters          = mempty+    , _mlmInputDataLocationS3         = Nothing+    , _mlmAlgorithm                   = Nothing+    , _mlmMLModelType                 = Nothing+    , _mlmScoreThreshold              = Nothing+    , _mlmScoreThresholdLastUpdatedAt = Nothing+    , _mlmMessage                     = Nothing+    }++-- | The algorithm used to train the 'MLModel'. The following algorithm is supported:+--+-- SGD -- Stochastic gradient descent. The goal of SGD is to minimize the+-- gradient of the loss function.+mlmAlgorithm :: Lens' MLModel (Maybe Algorithm)+mlmAlgorithm = lens _mlmAlgorithm (\s a -> s { _mlmAlgorithm = a })++-- | The time that the 'MLModel' was created. The time is expressed in epoch time.+mlmCreatedAt :: Lens' MLModel (Maybe UTCTime)+mlmCreatedAt = lens _mlmCreatedAt (\s a -> s { _mlmCreatedAt = a }) . mapping _Time++-- | The AWS user account from which the 'MLModel' was created. The account type can+-- be either an AWS root account or an AWS Identity and Access Management (IAM)+-- user account.+mlmCreatedByIamUser :: Lens' MLModel (Maybe Text)+mlmCreatedByIamUser =+    lens _mlmCreatedByIamUser (\s a -> s { _mlmCreatedByIamUser = a })++-- | The current endpoint of the 'MLModel'.+mlmEndpointInfo :: Lens' MLModel (Maybe RealtimeEndpointInfo)+mlmEndpointInfo = lens _mlmEndpointInfo (\s a -> s { _mlmEndpointInfo = a })++-- | The location of the data file or directory in Amazon Simple Storage Service+-- (Amazon S3).+mlmInputDataLocationS3 :: Lens' MLModel (Maybe Text)+mlmInputDataLocationS3 =+    lens _mlmInputDataLocationS3 (\s a -> s { _mlmInputDataLocationS3 = a })++-- | The time of the most recent edit to the 'MLModel'. The time is expressed in+-- epoch time.+mlmLastUpdatedAt :: Lens' MLModel (Maybe UTCTime)+mlmLastUpdatedAt = lens _mlmLastUpdatedAt (\s a -> s { _mlmLastUpdatedAt = a }) . mapping _Time++-- | The ID assigned to the 'MLModel' at creation.+mlmMLModelId :: Lens' MLModel (Maybe Text)+mlmMLModelId = lens _mlmMLModelId (\s a -> s { _mlmMLModelId = a })++-- | Identifies the 'MLModel' category. The following are the available types:+--+-- REGRESSION - Produces a numeric result. For example, "What listing price+-- should a house have?". BINARY - Produces one of two possible results. For+-- example, "Is this a child-friendly web site?". MULTICLASS - Produces more+-- than two possible results. For example, "Is this a HIGH, LOW or MEDIUM risk+-- trade?".+mlmMLModelType :: Lens' MLModel (Maybe MLModelType)+mlmMLModelType = lens _mlmMLModelType (\s a -> s { _mlmMLModelType = a })++-- | A description of the most recent details about accessing the 'MLModel'.+mlmMessage :: Lens' MLModel (Maybe Text)+mlmMessage = lens _mlmMessage (\s a -> s { _mlmMessage = a })++-- | A user-supplied name or description of the 'MLModel'.+mlmName :: Lens' MLModel (Maybe Text)+mlmName = lens _mlmName (\s a -> s { _mlmName = a })++mlmScoreThreshold :: Lens' MLModel (Maybe Double)+mlmScoreThreshold =+    lens _mlmScoreThreshold (\s a -> s { _mlmScoreThreshold = a })++-- | The time of the most recent edit to the 'ScoreThreshold'. The time is expressed+-- in epoch time.+mlmScoreThresholdLastUpdatedAt :: Lens' MLModel (Maybe UTCTime)+mlmScoreThresholdLastUpdatedAt =+    lens _mlmScoreThresholdLastUpdatedAt+        (\s a -> s { _mlmScoreThresholdLastUpdatedAt = a })+            . mapping _Time++mlmSizeInBytes :: Lens' MLModel (Maybe Integer)+mlmSizeInBytes = lens _mlmSizeInBytes (\s a -> s { _mlmSizeInBytes = a })++-- | The current status of an 'MLModel'. This element can have one of the following+-- values:+--+-- PENDING - Amazon Machine Learning (Amazon ML) submitted a request to create+-- an 'MLModel'. INPROGRESS - The creation process is underway. FAILED - The+-- request to create an 'MLModel' did not run to completion. It is not usable. COMPLETED - The creation process completed successfully.+-- DELETED - The 'MLModel' is marked as deleted. It is not usable.+mlmStatus :: Lens' MLModel (Maybe EntityStatus)+mlmStatus = lens _mlmStatus (\s a -> s { _mlmStatus = a })++-- | The ID of the training 'DataSource'. The 'CreateMLModel' operation uses the 'TrainingDataSourceId'.+mlmTrainingDataSourceId :: Lens' MLModel (Maybe Text)+mlmTrainingDataSourceId =+    lens _mlmTrainingDataSourceId (\s a -> s { _mlmTrainingDataSourceId = a })++-- | A list of the training parameters in the 'MLModel'. The list is implemented as+-- a map of key/value pairs.+--+-- The following is the current set of training parameters:+--+-- 'sgd.l1RegularizationAmount' - Coefficient regularization L1 norm. It+-- controls overfitting the data by penalizing large coefficients. This tends to+-- drive coefficients to zero, resulting in a sparse feature set. If you use+-- this parameter, specify a small value, such as 1.0E-04 or 1.0E-08.+--+-- The value is a double that ranges from 0 to MAX_DOUBLE. The default is not+-- to use L1 normalization. The parameter cannot be used when 'L2' is specified.+-- Use this parameter sparingly.+--+-- 'sgd.l2RegularizationAmount' - Coefficient regularization L2 norm. It+-- controls overfitting the data by penalizing large coefficients. This tends to+-- drive coefficients to small, nonzero values. If you use this parameter,+-- specify a small value, such as 1.0E-04 or 1.0E-08.+--+-- The valus is a double that ranges from 0 to MAX_DOUBLE. The default is not+-- to use L2 normalization. This cannot be used when 'L1' is specified. Use this+-- parameter sparingly.+--+-- 'sgd.maxPasses' - Number of times that the training process traverses the+-- observations to build the 'MLModel'. The value is an integer that ranges from 1+-- to 10000. The default value is 10.+--+-- 'sgd.maxMLModelSizeInBytes' - Maximum allowed size of the model. Depending on+-- the input data, the model size might affect performance.+--+-- The value is an integer that ranges from 100000 to 2147483648. The default+-- value is 33554432.+--+--+mlmTrainingParameters :: Lens' MLModel (HashMap Text Text)+mlmTrainingParameters =+    lens _mlmTrainingParameters (\s a -> s { _mlmTrainingParameters = a })+        . _Map++instance FromJSON MLModel where+    parseJSON = withObject "MLModel" $ \o -> MLModel+        <$> o .:? "Algorithm"+        <*> o .:? "CreatedAt"+        <*> o .:? "CreatedByIamUser"+        <*> o .:? "EndpointInfo"+        <*> o .:? "InputDataLocationS3"+        <*> o .:? "LastUpdatedAt"+        <*> o .:? "MLModelId"+        <*> o .:? "MLModelType"+        <*> o .:? "Message"+        <*> o .:? "Name"+        <*> o .:? "ScoreThreshold"+        <*> o .:? "ScoreThresholdLastUpdatedAt"+        <*> o .:? "SizeInBytes"+        <*> o .:? "Status"+        <*> o .:? "TrainingDataSourceId"+        <*> o .:? "TrainingParameters" .!= mempty++instance ToJSON MLModel where+    toJSON MLModel{..} = object+        [ "MLModelId"                   .= _mlmMLModelId+        , "TrainingDataSourceId"        .= _mlmTrainingDataSourceId+        , "CreatedByIamUser"            .= _mlmCreatedByIamUser+        , "CreatedAt"                   .= _mlmCreatedAt+        , "LastUpdatedAt"               .= _mlmLastUpdatedAt+        , "Name"                        .= _mlmName+        , "Status"                      .= _mlmStatus+        , "SizeInBytes"                 .= _mlmSizeInBytes+        , "EndpointInfo"                .= _mlmEndpointInfo+        , "TrainingParameters"          .= _mlmTrainingParameters+        , "InputDataLocationS3"         .= _mlmInputDataLocationS3+        , "Algorithm"                   .= _mlmAlgorithm+        , "MLModelType"                 .= _mlmMLModelType+        , "ScoreThreshold"              .= _mlmScoreThreshold+        , "ScoreThresholdLastUpdatedAt" .= _mlmScoreThresholdLastUpdatedAt+        , "Message"                     .= _mlmMessage+        ]++data BatchPrediction = BatchPrediction+    { _bpBatchPredictionDataSourceId :: Maybe Text+    , _bpBatchPredictionId           :: Maybe Text+    , _bpCreatedAt                   :: Maybe POSIX+    , _bpCreatedByIamUser            :: Maybe Text+    , _bpInputDataLocationS3         :: Maybe Text+    , _bpLastUpdatedAt               :: Maybe POSIX+    , _bpMLModelId                   :: Maybe Text+    , _bpMessage                     :: Maybe Text+    , _bpName                        :: Maybe Text+    , _bpOutputUri                   :: Maybe Text+    , _bpStatus                      :: Maybe EntityStatus+    } deriving (Eq, Read, Show)++-- | 'BatchPrediction' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'bpBatchPredictionDataSourceId' @::@ 'Maybe' 'Text'+--+-- * 'bpBatchPredictionId' @::@ 'Maybe' 'Text'+--+-- * 'bpCreatedAt' @::@ 'Maybe' 'UTCTime'+--+-- * 'bpCreatedByIamUser' @::@ 'Maybe' 'Text'+--+-- * 'bpInputDataLocationS3' @::@ 'Maybe' 'Text'+--+-- * 'bpLastUpdatedAt' @::@ 'Maybe' 'UTCTime'+--+-- * 'bpMLModelId' @::@ 'Maybe' 'Text'+--+-- * 'bpMessage' @::@ 'Maybe' 'Text'+--+-- * 'bpName' @::@ 'Maybe' 'Text'+--+-- * 'bpOutputUri' @::@ 'Maybe' 'Text'+--+-- * 'bpStatus' @::@ 'Maybe' 'EntityStatus'+--+batchPrediction :: BatchPrediction+batchPrediction = BatchPrediction+    { _bpBatchPredictionId           = Nothing+    , _bpMLModelId                   = Nothing+    , _bpBatchPredictionDataSourceId = Nothing+    , _bpInputDataLocationS3         = Nothing+    , _bpCreatedByIamUser            = Nothing+    , _bpCreatedAt                   = Nothing+    , _bpLastUpdatedAt               = Nothing+    , _bpName                        = Nothing+    , _bpStatus                      = Nothing+    , _bpOutputUri                   = Nothing+    , _bpMessage                     = Nothing+    }++-- | The ID of the 'DataSource' that points to the group of observations to predict.+bpBatchPredictionDataSourceId :: Lens' BatchPrediction (Maybe Text)+bpBatchPredictionDataSourceId =+    lens _bpBatchPredictionDataSourceId+        (\s a -> s { _bpBatchPredictionDataSourceId = a })++-- | The ID assigned to the 'BatchPrediction' at creation. This value should be+-- identical to the value of the 'BatchPredictionID' in the request.+bpBatchPredictionId :: Lens' BatchPrediction (Maybe Text)+bpBatchPredictionId =+    lens _bpBatchPredictionId (\s a -> s { _bpBatchPredictionId = a })++-- | The time that the 'BatchPrediction' was created. The time is expressed in epoch+-- time.+bpCreatedAt :: Lens' BatchPrediction (Maybe UTCTime)+bpCreatedAt = lens _bpCreatedAt (\s a -> s { _bpCreatedAt = a }) . mapping _Time++-- | The AWS user account that invoked the 'BatchPrediction'. The account type can+-- be either an AWS root account or an AWS Identity and Access Management (IAM)+-- user account.+bpCreatedByIamUser :: Lens' BatchPrediction (Maybe Text)+bpCreatedByIamUser =+    lens _bpCreatedByIamUser (\s a -> s { _bpCreatedByIamUser = a })++-- | The location of the data file or directory in Amazon Simple Storage Service+-- (Amazon S3).+bpInputDataLocationS3 :: Lens' BatchPrediction (Maybe Text)+bpInputDataLocationS3 =+    lens _bpInputDataLocationS3 (\s a -> s { _bpInputDataLocationS3 = a })++-- | The time of the most recent edit to the 'BatchPrediction'. The time is+-- expressed in epoch time.+bpLastUpdatedAt :: Lens' BatchPrediction (Maybe UTCTime)+bpLastUpdatedAt = lens _bpLastUpdatedAt (\s a -> s { _bpLastUpdatedAt = a }) . mapping _Time++-- | The ID of the 'MLModel' that generated predictions for the 'BatchPrediction'+-- request.+bpMLModelId :: Lens' BatchPrediction (Maybe Text)+bpMLModelId = lens _bpMLModelId (\s a -> s { _bpMLModelId = a })++-- | A description of the most recent details about processing the batch+-- prediction request.+bpMessage :: Lens' BatchPrediction (Maybe Text)+bpMessage = lens _bpMessage (\s a -> s { _bpMessage = a })++-- | A user-supplied name or description of the 'BatchPrediction'.+bpName :: Lens' BatchPrediction (Maybe Text)+bpName = lens _bpName (\s a -> s { _bpName = a })++-- | The location of an Amazon S3 bucket or directory to receive the operation+-- results. The following substrings are not allowed in the s3 key portion of+-- the "outputURI" field: ':', '//', '/./', '/../'.+bpOutputUri :: Lens' BatchPrediction (Maybe Text)+bpOutputUri = lens _bpOutputUri (\s a -> s { _bpOutputUri = a })++-- | The status of the 'BatchPrediction'. This element can have one of the following+-- values:+--+-- 'PENDING' - Amazon Machine Learning (Amazon ML) submitted a request to+-- generate predictions for a batch of observations.  'INPROGRESS' - The process+-- is underway.  'FAILED' - The request to peform a batch prediction did not run+-- to completion. It is not usable.  'COMPLETED' - The batch prediction process+-- completed successfully.  'DELETED' - The 'BatchPrediction' is marked as deleted.+-- It is not usable.+bpStatus :: Lens' BatchPrediction (Maybe EntityStatus)+bpStatus = lens _bpStatus (\s a -> s { _bpStatus = a })++instance FromJSON BatchPrediction where+    parseJSON = withObject "BatchPrediction" $ \o -> BatchPrediction+        <$> o .:? "BatchPredictionDataSourceId"+        <*> o .:? "BatchPredictionId"+        <*> o .:? "CreatedAt"+        <*> o .:? "CreatedByIamUser"+        <*> o .:? "InputDataLocationS3"+        <*> o .:? "LastUpdatedAt"+        <*> o .:? "MLModelId"+        <*> o .:? "Message"+        <*> o .:? "Name"+        <*> o .:? "OutputUri"+        <*> o .:? "Status"++instance ToJSON BatchPrediction where+    toJSON BatchPrediction{..} = object+        [ "BatchPredictionId"           .= _bpBatchPredictionId+        , "MLModelId"                   .= _bpMLModelId+        , "BatchPredictionDataSourceId" .= _bpBatchPredictionDataSourceId+        , "InputDataLocationS3"         .= _bpInputDataLocationS3+        , "CreatedByIamUser"            .= _bpCreatedByIamUser+        , "CreatedAt"                   .= _bpCreatedAt+        , "LastUpdatedAt"               .= _bpLastUpdatedAt+        , "Name"                        .= _bpName+        , "Status"                      .= _bpStatus+        , "OutputUri"                   .= _bpOutputUri+        , "Message"                     .= _bpMessage+        ]++data SortOrder+    = Asc -- ^ asc+    | Dsc -- ^ dsc+      deriving (Eq, Ord, Read, Show, Generic, Enum)++instance Hashable SortOrder++instance FromText SortOrder where+    parser = takeLowerText >>= \case+        "asc" -> pure Asc+        "dsc" -> pure Dsc+        e     -> fail $+            "Failure parsing SortOrder from " ++ show e++instance ToText SortOrder where+    toText = \case+        Asc -> "asc"+        Dsc -> "dsc"++instance ToByteString SortOrder+instance ToHeader     SortOrder+instance ToQuery      SortOrder++instance FromJSON SortOrder where+    parseJSON = parseJSONText "SortOrder"++instance ToJSON SortOrder where+    toJSON = toJSONText++data Algorithm+    = Sgd -- ^ sgd+      deriving (Eq, Ord, Read, Show, Generic, Enum)++instance Hashable Algorithm++instance FromText Algorithm where+    parser = takeLowerText >>= \case+        "sgd" -> pure Sgd+        e     -> fail $+            "Failure parsing Algorithm from " ++ show e++instance ToText Algorithm where+    toText Sgd = "sgd"++instance ToByteString Algorithm+instance ToHeader     Algorithm+instance ToQuery      Algorithm++instance FromJSON Algorithm where+    parseJSON = parseJSONText "Algorithm"++instance ToJSON Algorithm where+    toJSON = toJSONText++data EntityStatus+    = ESCompleted  -- ^ COMPLETED+    | ESDeleted    -- ^ DELETED+    | ESFailed     -- ^ FAILED+    | ESInprogress -- ^ INPROGRESS+    | ESPending    -- ^ PENDING+      deriving (Eq, Ord, Read, Show, Generic, Enum)++instance Hashable EntityStatus++instance FromText EntityStatus where+    parser = takeLowerText >>= \case+        "completed"  -> pure ESCompleted+        "deleted"    -> pure ESDeleted+        "failed"     -> pure ESFailed+        "inprogress" -> pure ESInprogress+        "pending"    -> pure ESPending+        e            -> fail $+            "Failure parsing EntityStatus from " ++ show e++instance ToText EntityStatus where+    toText = \case+        ESCompleted  -> "COMPLETED"+        ESDeleted    -> "DELETED"+        ESFailed     -> "FAILED"+        ESInprogress -> "INPROGRESS"+        ESPending    -> "PENDING"++instance ToByteString EntityStatus+instance ToHeader     EntityStatus+instance ToQuery      EntityStatus++instance FromJSON EntityStatus where+    parseJSON = parseJSONText "EntityStatus"++instance ToJSON EntityStatus where+    toJSON = toJSONText++data DataSource = DataSource+    { _dsComputeStatistics :: Maybe Bool+    , _dsCreatedAt         :: Maybe POSIX+    , _dsCreatedByIamUser  :: Maybe Text+    , _dsDataLocationS3    :: Maybe Text+    , _dsDataRearrangement :: Maybe Text+    , _dsDataSizeInBytes   :: Maybe Integer+    , _dsDataSourceId      :: Maybe Text+    , _dsLastUpdatedAt     :: Maybe POSIX+    , _dsMessage           :: Maybe Text+    , _dsName              :: Maybe Text+    , _dsNumberOfFiles     :: Maybe Integer+    , _dsRDSMetadata       :: Maybe RDSMetadata+    , _dsRedshiftMetadata  :: Maybe RedshiftMetadata+    , _dsRoleARN           :: Maybe Text+    , _dsStatus            :: Maybe EntityStatus+    } deriving (Eq, Read, Show)++-- | 'DataSource' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'dsComputeStatistics' @::@ 'Maybe' 'Bool'+--+-- * 'dsCreatedAt' @::@ 'Maybe' 'UTCTime'+--+-- * 'dsCreatedByIamUser' @::@ 'Maybe' 'Text'+--+-- * 'dsDataLocationS3' @::@ 'Maybe' 'Text'+--+-- * 'dsDataRearrangement' @::@ 'Maybe' 'Text'+--+-- * 'dsDataSizeInBytes' @::@ 'Maybe' 'Integer'+--+-- * 'dsDataSourceId' @::@ 'Maybe' 'Text'+--+-- * 'dsLastUpdatedAt' @::@ 'Maybe' 'UTCTime'+--+-- * 'dsMessage' @::@ 'Maybe' 'Text'+--+-- * 'dsName' @::@ 'Maybe' 'Text'+--+-- * 'dsNumberOfFiles' @::@ 'Maybe' 'Integer'+--+-- * 'dsRDSMetadata' @::@ 'Maybe' 'RDSMetadata'+--+-- * 'dsRedshiftMetadata' @::@ 'Maybe' 'RedshiftMetadata'+--+-- * 'dsRoleARN' @::@ 'Maybe' 'Text'+--+-- * 'dsStatus' @::@ 'Maybe' 'EntityStatus'+--+dataSource :: DataSource+dataSource = DataSource+    { _dsDataSourceId      = Nothing+    , _dsDataLocationS3    = Nothing+    , _dsDataRearrangement = Nothing+    , _dsCreatedByIamUser  = Nothing+    , _dsCreatedAt         = Nothing+    , _dsLastUpdatedAt     = Nothing+    , _dsDataSizeInBytes   = Nothing+    , _dsNumberOfFiles     = Nothing+    , _dsName              = Nothing+    , _dsStatus            = Nothing+    , _dsMessage           = Nothing+    , _dsRedshiftMetadata  = Nothing+    , _dsRDSMetadata       = Nothing+    , _dsRoleARN           = Nothing+    , _dsComputeStatistics = Nothing+    }++-- | The parameter is 'true' if statistics need to be generated from the+-- observation data.+dsComputeStatistics :: Lens' DataSource (Maybe Bool)+dsComputeStatistics =+    lens _dsComputeStatistics (\s a -> s { _dsComputeStatistics = a })++-- | The time that the 'DataSource' was created. The time is expressed in epoch time.+dsCreatedAt :: Lens' DataSource (Maybe UTCTime)+dsCreatedAt = lens _dsCreatedAt (\s a -> s { _dsCreatedAt = a }) . mapping _Time++-- | The AWS user account from which the 'DataSource' was created. The account type+-- can be either an AWS root account or an AWS Identity and Access Management+-- (IAM) user account.+dsCreatedByIamUser :: Lens' DataSource (Maybe Text)+dsCreatedByIamUser =+    lens _dsCreatedByIamUser (\s a -> s { _dsCreatedByIamUser = a })++-- | The location and name of the data in Amazon Simple Storage Service (Amazon+-- S3) that is used by a 'DataSource'.+dsDataLocationS3 :: Lens' DataSource (Maybe Text)+dsDataLocationS3 = lens _dsDataLocationS3 (\s a -> s { _dsDataLocationS3 = a })++-- | A JSON string that represents the splitting requirement of a 'Datasource'.+dsDataRearrangement :: Lens' DataSource (Maybe Text)+dsDataRearrangement =+    lens _dsDataRearrangement (\s a -> s { _dsDataRearrangement = a })++-- | The total number of observations contained in the data files that the 'DataSource' references.+dsDataSizeInBytes :: Lens' DataSource (Maybe Integer)+dsDataSizeInBytes =+    lens _dsDataSizeInBytes (\s a -> s { _dsDataSizeInBytes = a })++-- | The ID that is assigned to the 'DataSource' during creation.+dsDataSourceId :: Lens' DataSource (Maybe Text)+dsDataSourceId = lens _dsDataSourceId (\s a -> s { _dsDataSourceId = a })++-- | The time of the most recent edit to the 'BatchPrediction'. The time is+-- expressed in epoch time.+dsLastUpdatedAt :: Lens' DataSource (Maybe UTCTime)+dsLastUpdatedAt = lens _dsLastUpdatedAt (\s a -> s { _dsLastUpdatedAt = a }) . mapping _Time++-- | A description of the most recent details about creating the 'DataSource'.+dsMessage :: Lens' DataSource (Maybe Text)+dsMessage = lens _dsMessage (\s a -> s { _dsMessage = a })++-- | A user-supplied name or description of the 'DataSource'.+dsName :: Lens' DataSource (Maybe Text)+dsName = lens _dsName (\s a -> s { _dsName = a })++-- | The number of data files referenced by the 'DataSource'.+dsNumberOfFiles :: Lens' DataSource (Maybe Integer)+dsNumberOfFiles = lens _dsNumberOfFiles (\s a -> s { _dsNumberOfFiles = a })++dsRDSMetadata :: Lens' DataSource (Maybe RDSMetadata)+dsRDSMetadata = lens _dsRDSMetadata (\s a -> s { _dsRDSMetadata = a })++dsRedshiftMetadata :: Lens' DataSource (Maybe RedshiftMetadata)+dsRedshiftMetadata =+    lens _dsRedshiftMetadata (\s a -> s { _dsRedshiftMetadata = a })++dsRoleARN :: Lens' DataSource (Maybe Text)+dsRoleARN = lens _dsRoleARN (\s a -> s { _dsRoleARN = a })++-- | The current status of the 'DataSource'. This element can have one of the+-- following values:+--+-- PENDING - Amazon Machine Learning (Amazon ML) submitted a request to create+-- a 'DataSource'. INPROGRESS - The creation process is underway. FAILED - The+-- request to create a 'DataSource' did not run to completion. It is not usable. COMPLETED - The creation process completed successfully.+-- DELETED - The 'DataSource' is marked as deleted. It is not usable.+dsStatus :: Lens' DataSource (Maybe EntityStatus)+dsStatus = lens _dsStatus (\s a -> s { _dsStatus = a })++instance FromJSON DataSource where+    parseJSON = withObject "DataSource" $ \o -> DataSource+        <$> o .:? "ComputeStatistics"+        <*> o .:? "CreatedAt"+        <*> o .:? "CreatedByIamUser"+        <*> o .:? "DataLocationS3"+        <*> o .:? "DataRearrangement"+        <*> o .:? "DataSizeInBytes"+        <*> o .:? "DataSourceId"+        <*> o .:? "LastUpdatedAt"+        <*> o .:? "Message"+        <*> o .:? "Name"+        <*> o .:? "NumberOfFiles"+        <*> o .:? "RDSMetadata"+        <*> o .:? "RedshiftMetadata"+        <*> o .:? "RoleARN"+        <*> o .:? "Status"++instance ToJSON DataSource where+    toJSON DataSource{..} = object+        [ "DataSourceId"      .= _dsDataSourceId+        , "DataLocationS3"    .= _dsDataLocationS3+        , "DataRearrangement" .= _dsDataRearrangement+        , "CreatedByIamUser"  .= _dsCreatedByIamUser+        , "CreatedAt"         .= _dsCreatedAt+        , "LastUpdatedAt"     .= _dsLastUpdatedAt+        , "DataSizeInBytes"   .= _dsDataSizeInBytes+        , "NumberOfFiles"     .= _dsNumberOfFiles+        , "Name"              .= _dsName+        , "Status"            .= _dsStatus+        , "Message"           .= _dsMessage+        , "RedshiftMetadata"  .= _dsRedshiftMetadata+        , "RDSMetadata"       .= _dsRDSMetadata+        , "RoleARN"           .= _dsRoleARN+        , "ComputeStatistics" .= _dsComputeStatistics+        ]++data RDSDatabase = RDSDatabase+    { _rdsdDatabaseName       :: Text+    , _rdsdInstanceIdentifier :: Text+    } deriving (Eq, Ord, Read, Show)++-- | 'RDSDatabase' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'rdsdDatabaseName' @::@ 'Text'+--+-- * 'rdsdInstanceIdentifier' @::@ 'Text'+--+rdsdatabase :: Text -- ^ 'rdsdInstanceIdentifier'+            -> Text -- ^ 'rdsdDatabaseName'+            -> RDSDatabase+rdsdatabase p1 p2 = RDSDatabase+    { _rdsdInstanceIdentifier = p1+    , _rdsdDatabaseName       = p2+    }++rdsdDatabaseName :: Lens' RDSDatabase Text+rdsdDatabaseName = lens _rdsdDatabaseName (\s a -> s { _rdsdDatabaseName = a })++-- | The ID of an RDS DB instance.+rdsdInstanceIdentifier :: Lens' RDSDatabase Text+rdsdInstanceIdentifier =+    lens _rdsdInstanceIdentifier (\s a -> s { _rdsdInstanceIdentifier = a })++instance FromJSON RDSDatabase where+    parseJSON = withObject "RDSDatabase" $ \o -> RDSDatabase+        <$> o .:  "DatabaseName"+        <*> o .:  "InstanceIdentifier"++instance ToJSON RDSDatabase where+    toJSON RDSDatabase{..} = object+        [ "InstanceIdentifier" .= _rdsdInstanceIdentifier+        , "DatabaseName"       .= _rdsdDatabaseName+        ]++data RDSDatabaseCredentials = RDSDatabaseCredentials+    { _rdsdcPassword :: Text+    , _rdsdcUsername :: Text+    } deriving (Eq, Ord, Read, Show)++-- | 'RDSDatabaseCredentials' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'rdsdcPassword' @::@ 'Text'+--+-- * 'rdsdcUsername' @::@ 'Text'+--+rdsdatabaseCredentials :: Text -- ^ 'rdsdcUsername'+                       -> Text -- ^ 'rdsdcPassword'+                       -> RDSDatabaseCredentials+rdsdatabaseCredentials p1 p2 = RDSDatabaseCredentials+    { _rdsdcUsername = p1+    , _rdsdcPassword = p2+    }++rdsdcPassword :: Lens' RDSDatabaseCredentials Text+rdsdcPassword = lens _rdsdcPassword (\s a -> s { _rdsdcPassword = a })++rdsdcUsername :: Lens' RDSDatabaseCredentials Text+rdsdcUsername = lens _rdsdcUsername (\s a -> s { _rdsdcUsername = a })++instance FromJSON RDSDatabaseCredentials where+    parseJSON = withObject "RDSDatabaseCredentials" $ \o -> RDSDatabaseCredentials+        <$> o .:  "Password"+        <*> o .:  "Username"++instance ToJSON RDSDatabaseCredentials where+    toJSON RDSDatabaseCredentials{..} = object+        [ "Username" .= _rdsdcUsername+        , "Password" .= _rdsdcPassword+        ]++data MLModelFilterVariable+    = MLMFVAlgorithm              -- ^ Algorithm+    | MLMFVCreatedAt              -- ^ CreatedAt+    | MLMFVIAMUser                -- ^ IAMUser+    | MLMFVLastUpdatedAt          -- ^ LastUpdatedAt+    | MLMFVMLModelType            -- ^ MLModelType+    | MLMFVName                   -- ^ Name+    | MLMFVRealtimeEndpointStatus -- ^ RealtimeEndpointStatus+    | MLMFVStatus                 -- ^ Status+    | MLMFVTrainingDataSourceId   -- ^ TrainingDataSourceId+    | MLMFVTrainingDataURI        -- ^ TrainingDataURI+      deriving (Eq, Ord, Read, Show, Generic, Enum)++instance Hashable MLModelFilterVariable++instance FromText MLModelFilterVariable where+    parser = takeLowerText >>= \case+        "algorithm"              -> pure MLMFVAlgorithm+        "createdat"              -> pure MLMFVCreatedAt+        "iamuser"                -> pure MLMFVIAMUser+        "lastupdatedat"          -> pure MLMFVLastUpdatedAt+        "mlmodeltype"            -> pure MLMFVMLModelType+        "name"                   -> pure MLMFVName+        "realtimeendpointstatus" -> pure MLMFVRealtimeEndpointStatus+        "status"                 -> pure MLMFVStatus+        "trainingdatasourceid"   -> pure MLMFVTrainingDataSourceId+        "trainingdatauri"        -> pure MLMFVTrainingDataURI+        e                        -> fail $+            "Failure parsing MLModelFilterVariable from " ++ show e++instance ToText MLModelFilterVariable where+    toText = \case+        MLMFVAlgorithm              -> "Algorithm"+        MLMFVCreatedAt              -> "CreatedAt"+        MLMFVIAMUser                -> "IAMUser"+        MLMFVLastUpdatedAt          -> "LastUpdatedAt"+        MLMFVMLModelType            -> "MLModelType"+        MLMFVName                   -> "Name"+        MLMFVRealtimeEndpointStatus -> "RealtimeEndpointStatus"+        MLMFVStatus                 -> "Status"+        MLMFVTrainingDataSourceId   -> "TrainingDataSourceId"+        MLMFVTrainingDataURI        -> "TrainingDataURI"++instance ToByteString MLModelFilterVariable+instance ToHeader     MLModelFilterVariable+instance ToQuery      MLModelFilterVariable++instance FromJSON MLModelFilterVariable where+    parseJSON = parseJSONText "MLModelFilterVariable"++instance ToJSON MLModelFilterVariable where+    toJSON = toJSONText++data DataSourceFilterVariable+    = DataCreatedAt      -- ^ CreatedAt+    | DataDataLocationS3 -- ^ DataLocationS3+    | DataIAMUser        -- ^ IAMUser+    | DataLastUpdatedAt  -- ^ LastUpdatedAt+    | DataName           -- ^ Name+    | DataStatus         -- ^ Status+      deriving (Eq, Ord, Read, Show, Generic, Enum)++instance Hashable DataSourceFilterVariable++instance FromText DataSourceFilterVariable where+    parser = takeLowerText >>= \case+        "createdat"      -> pure DataCreatedAt+        "datalocations3" -> pure DataDataLocationS3+        "iamuser"        -> pure DataIAMUser+        "lastupdatedat"  -> pure DataLastUpdatedAt+        "name"           -> pure DataName+        "status"         -> pure DataStatus+        e                -> fail $+            "Failure parsing DataSourceFilterVariable from " ++ show e++instance ToText DataSourceFilterVariable where+    toText = \case+        DataCreatedAt      -> "CreatedAt"+        DataDataLocationS3 -> "DataLocationS3"+        DataIAMUser        -> "IAMUser"+        DataLastUpdatedAt  -> "LastUpdatedAt"+        DataName           -> "Name"+        DataStatus         -> "Status"++instance ToByteString DataSourceFilterVariable+instance ToHeader     DataSourceFilterVariable+instance ToQuery      DataSourceFilterVariable++instance FromJSON DataSourceFilterVariable where+    parseJSON = parseJSONText "DataSourceFilterVariable"++instance ToJSON DataSourceFilterVariable where+    toJSON = toJSONText++data RedshiftDataSpec = RedshiftDataSpec+    { _rdsDataRearrangement   :: Maybe Text+    , _rdsDataSchema          :: Maybe Text+    , _rdsDataSchemaUri       :: Maybe Text+    , _rdsDatabaseCredentials :: RedshiftDatabaseCredentials+    , _rdsDatabaseInformation :: RedshiftDatabase+    , _rdsS3StagingLocation   :: Text+    , _rdsSelectSqlQuery      :: Text+    } deriving (Eq, Read, Show)++-- | 'RedshiftDataSpec' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'rdsDataRearrangement' @::@ 'Maybe' 'Text'+--+-- * 'rdsDataSchema' @::@ 'Maybe' 'Text'+--+-- * 'rdsDataSchemaUri' @::@ 'Maybe' 'Text'+--+-- * 'rdsDatabaseCredentials' @::@ 'RedshiftDatabaseCredentials'+--+-- * 'rdsDatabaseInformation' @::@ 'RedshiftDatabase'+--+-- * 'rdsS3StagingLocation' @::@ 'Text'+--+-- * 'rdsSelectSqlQuery' @::@ 'Text'+--+redshiftDataSpec :: RedshiftDatabase -- ^ 'rdsDatabaseInformation'+                 -> Text -- ^ 'rdsSelectSqlQuery'+                 -> RedshiftDatabaseCredentials -- ^ 'rdsDatabaseCredentials'+                 -> Text -- ^ 'rdsS3StagingLocation'+                 -> RedshiftDataSpec+redshiftDataSpec p1 p2 p3 p4 = RedshiftDataSpec+    { _rdsDatabaseInformation = p1+    , _rdsSelectSqlQuery      = p2+    , _rdsDatabaseCredentials = p3+    , _rdsS3StagingLocation   = p4+    , _rdsDataRearrangement   = Nothing+    , _rdsDataSchema          = Nothing+    , _rdsDataSchemaUri       = Nothing+    }++-- | Describes the splitting specifications for a 'DataSource'.+rdsDataRearrangement :: Lens' RedshiftDataSpec (Maybe Text)+rdsDataRearrangement =+    lens _rdsDataRearrangement (\s a -> s { _rdsDataRearrangement = a })++-- | Describes the schema for an Amazon Redshift 'DataSource'.+rdsDataSchema :: Lens' RedshiftDataSpec (Maybe Text)+rdsDataSchema = lens _rdsDataSchema (\s a -> s { _rdsDataSchema = a })++-- | Describes the schema location for an Amazon Redshift 'DataSource'.+rdsDataSchemaUri :: Lens' RedshiftDataSpec (Maybe Text)+rdsDataSchemaUri = lens _rdsDataSchemaUri (\s a -> s { _rdsDataSchemaUri = a })++-- | Describes AWS Identity and Access Management (IAM) credentials that are used+-- connect to the Amazon Redshift database.+rdsDatabaseCredentials :: Lens' RedshiftDataSpec RedshiftDatabaseCredentials+rdsDatabaseCredentials =+    lens _rdsDatabaseCredentials (\s a -> s { _rdsDatabaseCredentials = a })++-- | Describes the 'DatabaseName' and 'ClusterIdentifier' for an Amazon Redshift 'DataSource'.+rdsDatabaseInformation :: Lens' RedshiftDataSpec RedshiftDatabase+rdsDatabaseInformation =+    lens _rdsDatabaseInformation (\s a -> s { _rdsDatabaseInformation = a })++-- | Describes an Amazon S3 location to store the result set of the 'SelectSqlQuery'+-- query.+rdsS3StagingLocation :: Lens' RedshiftDataSpec Text+rdsS3StagingLocation =+    lens _rdsS3StagingLocation (\s a -> s { _rdsS3StagingLocation = a })++-- | Describes the SQL Query to execute on an Amazon Redshift database for an+-- Amazon Redshift 'DataSource'.+rdsSelectSqlQuery :: Lens' RedshiftDataSpec Text+rdsSelectSqlQuery =+    lens _rdsSelectSqlQuery (\s a -> s { _rdsSelectSqlQuery = a })++instance FromJSON RedshiftDataSpec where+    parseJSON = withObject "RedshiftDataSpec" $ \o -> RedshiftDataSpec+        <$> o .:? "DataRearrangement"+        <*> o .:? "DataSchema"+        <*> o .:? "DataSchemaUri"+        <*> o .:  "DatabaseCredentials"+        <*> o .:  "DatabaseInformation"+        <*> o .:  "S3StagingLocation"+        <*> o .:  "SelectSqlQuery"++instance ToJSON RedshiftDataSpec where+    toJSON RedshiftDataSpec{..} = object+        [ "DatabaseInformation" .= _rdsDatabaseInformation+        , "SelectSqlQuery"      .= _rdsSelectSqlQuery+        , "DatabaseCredentials" .= _rdsDatabaseCredentials+        , "S3StagingLocation"   .= _rdsS3StagingLocation+        , "DataRearrangement"   .= _rdsDataRearrangement+        , "DataSchema"          .= _rdsDataSchema+        , "DataSchemaUri"       .= _rdsDataSchemaUri+        ]++data Evaluation = Evaluation+    { _eCreatedAt              :: Maybe POSIX+    , _eCreatedByIamUser       :: Maybe Text+    , _eEvaluationDataSourceId :: Maybe Text+    , _eEvaluationId           :: Maybe Text+    , _eInputDataLocationS3    :: Maybe Text+    , _eLastUpdatedAt          :: Maybe POSIX+    , _eMLModelId              :: Maybe Text+    , _eMessage                :: Maybe Text+    , _eName                   :: Maybe Text+    , _ePerformanceMetrics     :: Maybe PerformanceMetrics+    , _eStatus                 :: Maybe EntityStatus+    } deriving (Eq, Read, Show)++-- | 'Evaluation' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'eCreatedAt' @::@ 'Maybe' 'UTCTime'+--+-- * 'eCreatedByIamUser' @::@ 'Maybe' 'Text'+--+-- * 'eEvaluationDataSourceId' @::@ 'Maybe' 'Text'+--+-- * 'eEvaluationId' @::@ 'Maybe' 'Text'+--+-- * 'eInputDataLocationS3' @::@ 'Maybe' 'Text'+--+-- * 'eLastUpdatedAt' @::@ 'Maybe' 'UTCTime'+--+-- * 'eMLModelId' @::@ 'Maybe' 'Text'+--+-- * 'eMessage' @::@ 'Maybe' 'Text'+--+-- * 'eName' @::@ 'Maybe' 'Text'+--+-- * 'ePerformanceMetrics' @::@ 'Maybe' 'PerformanceMetrics'+--+-- * 'eStatus' @::@ 'Maybe' 'EntityStatus'+--+evaluation :: Evaluation+evaluation = Evaluation+    { _eEvaluationId           = Nothing+    , _eMLModelId              = Nothing+    , _eEvaluationDataSourceId = Nothing+    , _eInputDataLocationS3    = Nothing+    , _eCreatedByIamUser       = Nothing+    , _eCreatedAt              = Nothing+    , _eLastUpdatedAt          = Nothing+    , _eName                   = Nothing+    , _eStatus                 = Nothing+    , _ePerformanceMetrics     = Nothing+    , _eMessage                = Nothing+    }++-- | The time that the 'Evaluation' was created. The time is expressed in epoch time.+eCreatedAt :: Lens' Evaluation (Maybe UTCTime)+eCreatedAt = lens _eCreatedAt (\s a -> s { _eCreatedAt = a }) . mapping _Time++-- | The AWS user account that invoked the evaluation. The account type can be+-- either an AWS root account or an AWS Identity and Access Management (IAM)+-- user account.+eCreatedByIamUser :: Lens' Evaluation (Maybe Text)+eCreatedByIamUser =+    lens _eCreatedByIamUser (\s a -> s { _eCreatedByIamUser = a })++-- | The ID of the 'DataSource' that is used to evaluate the 'MLModel'.+eEvaluationDataSourceId :: Lens' Evaluation (Maybe Text)+eEvaluationDataSourceId =+    lens _eEvaluationDataSourceId (\s a -> s { _eEvaluationDataSourceId = a })++-- | The ID that is assigned to the 'Evaluation' at creation.+eEvaluationId :: Lens' Evaluation (Maybe Text)+eEvaluationId = lens _eEvaluationId (\s a -> s { _eEvaluationId = a })++-- | The location and name of the data in Amazon Simple Storage Server (Amazon S3)+-- that is used in the evaluation.+eInputDataLocationS3 :: Lens' Evaluation (Maybe Text)+eInputDataLocationS3 =+    lens _eInputDataLocationS3 (\s a -> s { _eInputDataLocationS3 = a })++-- | The time of the most recent edit to the 'Evaluation'. The time is expressed in+-- epoch time.+eLastUpdatedAt :: Lens' Evaluation (Maybe UTCTime)+eLastUpdatedAt = lens _eLastUpdatedAt (\s a -> s { _eLastUpdatedAt = a }) . mapping _Time++-- | The ID of the 'MLModel' that is the focus of the evaluation.+eMLModelId :: Lens' Evaluation (Maybe Text)+eMLModelId = lens _eMLModelId (\s a -> s { _eMLModelId = a })++-- | A description of the most recent details about evaluating the 'MLModel'.+eMessage :: Lens' Evaluation (Maybe Text)+eMessage = lens _eMessage (\s a -> s { _eMessage = a })++-- | A user-supplied name or description of the 'Evaluation'.+eName :: Lens' Evaluation (Maybe Text)+eName = lens _eName (\s a -> s { _eName = a })++-- | Measurements of how well the 'MLModel' performed, using observations referenced+-- by the 'DataSource'. One of the following metrics is returned, based on the+-- type of the MLModel:+--+-- BinaryAUC: A binary 'MLModel' uses the Area Under the Curve (AUC) technique+-- to measure performance.+--+-- RegressionRMSE: A regression 'MLModel' uses the Root Mean Square Error+-- (RMSE) technique to measure performance. RMSE measures the difference between+-- predicted and actual values for a single variable.+--+-- MulticlassAvgFScore: A multiclass 'MLModel' uses the F1 score technique to+-- measure performance.+--+-- For more information about performance metrics, please see the <http://docs.aws.amazon.com/machine-learning/latest/dg AmazonMachine Learning Developer Guide>.+ePerformanceMetrics :: Lens' Evaluation (Maybe PerformanceMetrics)+ePerformanceMetrics =+    lens _ePerformanceMetrics (\s a -> s { _ePerformanceMetrics = a })++-- | The status of the evaluation. This element can have one of the following+-- values:+--+-- 'PENDING' - Amazon Machine Learning (Amazon ML) submitted a request to+-- evaluate an 'MLModel'.  'INPROGRESS' - The evaluation is underway.  'FAILED' - The+-- request to evaluate an 'MLModel' did not run to completion. It is not usable.  'COMPLETED' - The evaluation process completed successfully.  'DELETED' - The 'Evaluation'+-- is marked as deleted. It is not usable.+eStatus :: Lens' Evaluation (Maybe EntityStatus)+eStatus = lens _eStatus (\s a -> s { _eStatus = a })++instance FromJSON Evaluation where+    parseJSON = withObject "Evaluation" $ \o -> Evaluation+        <$> o .:? "CreatedAt"+        <*> o .:? "CreatedByIamUser"+        <*> o .:? "EvaluationDataSourceId"+        <*> o .:? "EvaluationId"+        <*> o .:? "InputDataLocationS3"+        <*> o .:? "LastUpdatedAt"+        <*> o .:? "MLModelId"+        <*> o .:? "Message"+        <*> o .:? "Name"+        <*> o .:? "PerformanceMetrics"+        <*> o .:? "Status"++instance ToJSON Evaluation where+    toJSON Evaluation{..} = object+        [ "EvaluationId"           .= _eEvaluationId+        , "MLModelId"              .= _eMLModelId+        , "EvaluationDataSourceId" .= _eEvaluationDataSourceId+        , "InputDataLocationS3"    .= _eInputDataLocationS3+        , "CreatedByIamUser"       .= _eCreatedByIamUser+        , "CreatedAt"              .= _eCreatedAt+        , "LastUpdatedAt"          .= _eLastUpdatedAt+        , "Name"                   .= _eName+        , "Status"                 .= _eStatus+        , "PerformanceMetrics"     .= _ePerformanceMetrics+        , "Message"                .= _eMessage+        ]++data RedshiftMetadata = RedshiftMetadata+    { _rmDatabaseUserName :: Maybe Text+    , _rmRedshiftDatabase :: Maybe RedshiftDatabase+    , _rmSelectSqlQuery   :: Maybe Text+    } deriving (Eq, Read, Show)++-- | 'RedshiftMetadata' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'rmDatabaseUserName' @::@ 'Maybe' 'Text'+--+-- * 'rmRedshiftDatabase' @::@ 'Maybe' 'RedshiftDatabase'+--+-- * 'rmSelectSqlQuery' @::@ 'Maybe' 'Text'+--+redshiftMetadata :: RedshiftMetadata+redshiftMetadata = RedshiftMetadata+    { _rmRedshiftDatabase = Nothing+    , _rmDatabaseUserName = Nothing+    , _rmSelectSqlQuery   = Nothing+    }++rmDatabaseUserName :: Lens' RedshiftMetadata (Maybe Text)+rmDatabaseUserName =+    lens _rmDatabaseUserName (\s a -> s { _rmDatabaseUserName = a })++rmRedshiftDatabase :: Lens' RedshiftMetadata (Maybe RedshiftDatabase)+rmRedshiftDatabase =+    lens _rmRedshiftDatabase (\s a -> s { _rmRedshiftDatabase = a })++-- | The SQL query that is specified during 'CreateDataSourceFromRedshift'. Returns+-- only if 'Verbose' is true in GetDataSourceInput.+rmSelectSqlQuery :: Lens' RedshiftMetadata (Maybe Text)+rmSelectSqlQuery = lens _rmSelectSqlQuery (\s a -> s { _rmSelectSqlQuery = a })++instance FromJSON RedshiftMetadata where+    parseJSON = withObject "RedshiftMetadata" $ \o -> RedshiftMetadata+        <$> o .:? "DatabaseUserName"+        <*> o .:? "RedshiftDatabase"+        <*> o .:? "SelectSqlQuery"++instance ToJSON RedshiftMetadata where+    toJSON RedshiftMetadata{..} = object+        [ "RedshiftDatabase" .= _rmRedshiftDatabase+        , "DatabaseUserName" .= _rmDatabaseUserName+        , "SelectSqlQuery"   .= _rmSelectSqlQuery+        ]++data MLModelType+    = Binary     -- ^ BINARY+    | Multiclass -- ^ MULTICLASS+    | Regression -- ^ REGRESSION+      deriving (Eq, Ord, Read, Show, Generic, Enum)++instance Hashable MLModelType++instance FromText MLModelType where+    parser = takeLowerText >>= \case+        "binary"     -> pure Binary+        "multiclass" -> pure Multiclass+        "regression" -> pure Regression+        e            -> fail $+            "Failure parsing MLModelType from " ++ show e++instance ToText MLModelType where+    toText = \case+        Binary     -> "BINARY"+        Multiclass -> "MULTICLASS"+        Regression -> "REGRESSION"++instance ToByteString MLModelType+instance ToHeader     MLModelType+instance ToQuery      MLModelType++instance FromJSON MLModelType where+    parseJSON = parseJSONText "MLModelType"++instance ToJSON MLModelType where+    toJSON = toJSONText
+ gen/Network/AWS/MachineLearning/UpdateBatchPrediction.hs view
@@ -0,0 +1,130 @@+{-# 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.MachineLearning.UpdateBatchPrediction+-- Copyright   : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>+-- License     : This Source Code Form is subject to the terms of+--               the Mozilla Public License, v. 2.0.+--               A copy of the MPL can be found in the LICENSE file or+--               you can obtain it at http://mozilla.org/MPL/2.0/.+-- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability   : experimental+-- Portability : non-portable (GHC extensions)+--+-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- | Updates the 'BatchPredictionName' of a 'BatchPrediction'.+--+-- You can use the 'GetBatchPrediction' operation to view the contents of the+-- updated data element.+--+-- <http://http://docs.aws.amazon.com/machine-learning/latest/APIReference/API_UpdateBatchPrediction.html>+module Network.AWS.MachineLearning.UpdateBatchPrediction+    (+    -- * Request+      UpdateBatchPrediction+    -- ** Request constructor+    , updateBatchPrediction+    -- ** Request lenses+    , ubpBatchPredictionId+    , ubpBatchPredictionName++    -- * Response+    , UpdateBatchPredictionResponse+    -- ** Response constructor+    , updateBatchPredictionResponse+    -- ** Response lenses+    , ubprBatchPredictionId+    ) where++import Network.AWS.Data (Object)+import Network.AWS.Prelude+import Network.AWS.Request.JSON+import Network.AWS.MachineLearning.Types+import qualified GHC.Exts++data UpdateBatchPrediction = UpdateBatchPrediction+    { _ubpBatchPredictionId   :: Text+    , _ubpBatchPredictionName :: Text+    } deriving (Eq, Ord, Read, Show)++-- | 'UpdateBatchPrediction' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'ubpBatchPredictionId' @::@ 'Text'+--+-- * 'ubpBatchPredictionName' @::@ 'Text'+--+updateBatchPrediction :: Text -- ^ 'ubpBatchPredictionId'+                      -> Text -- ^ 'ubpBatchPredictionName'+                      -> UpdateBatchPrediction+updateBatchPrediction p1 p2 = UpdateBatchPrediction+    { _ubpBatchPredictionId   = p1+    , _ubpBatchPredictionName = p2+    }++-- | The ID assigned to the 'BatchPrediction' during creation.+ubpBatchPredictionId :: Lens' UpdateBatchPrediction Text+ubpBatchPredictionId =+    lens _ubpBatchPredictionId (\s a -> s { _ubpBatchPredictionId = a })++-- | A new user-supplied name or description of the 'BatchPrediction'.+ubpBatchPredictionName :: Lens' UpdateBatchPrediction Text+ubpBatchPredictionName =+    lens _ubpBatchPredictionName (\s a -> s { _ubpBatchPredictionName = a })++newtype UpdateBatchPredictionResponse = UpdateBatchPredictionResponse+    { _ubprBatchPredictionId :: Maybe Text+    } deriving (Eq, Ord, Read, Show, Monoid)++-- | 'UpdateBatchPredictionResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'ubprBatchPredictionId' @::@ 'Maybe' 'Text'+--+updateBatchPredictionResponse :: UpdateBatchPredictionResponse+updateBatchPredictionResponse = UpdateBatchPredictionResponse+    { _ubprBatchPredictionId = Nothing+    }++-- | The ID assigned to the 'BatchPrediction' during creation. This value should be+-- identical to the value of the 'BatchPredictionId' in the request.+ubprBatchPredictionId :: Lens' UpdateBatchPredictionResponse (Maybe Text)+ubprBatchPredictionId =+    lens _ubprBatchPredictionId (\s a -> s { _ubprBatchPredictionId = a })++instance ToPath UpdateBatchPrediction where+    toPath = const "/"++instance ToQuery UpdateBatchPrediction where+    toQuery = const mempty++instance ToHeaders UpdateBatchPrediction++instance ToJSON UpdateBatchPrediction where+    toJSON UpdateBatchPrediction{..} = object+        [ "BatchPredictionId"   .= _ubpBatchPredictionId+        , "BatchPredictionName" .= _ubpBatchPredictionName+        ]++instance AWSRequest UpdateBatchPrediction where+    type Sv UpdateBatchPrediction = MachineLearning+    type Rs UpdateBatchPrediction = UpdateBatchPredictionResponse++    request  = post "UpdateBatchPrediction"+    response = jsonResponse++instance FromJSON UpdateBatchPredictionResponse where+    parseJSON = withObject "UpdateBatchPredictionResponse" $ \o -> UpdateBatchPredictionResponse+        <$> o .:? "BatchPredictionId"
+ gen/Network/AWS/MachineLearning/UpdateDataSource.hs view
@@ -0,0 +1,129 @@+{-# LANGUAGE DataKinds                   #-}+{-# LANGUAGE DeriveGeneric               #-}+{-# LANGUAGE FlexibleInstances           #-}+{-# LANGUAGE GeneralizedNewtypeDeriving  #-}+{-# LANGUAGE LambdaCase                  #-}+{-# LANGUAGE NoImplicitPrelude           #-}+{-# LANGUAGE OverloadedStrings           #-}+{-# LANGUAGE RecordWildCards             #-}+{-# LANGUAGE TypeFamilies                #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Module      : Network.AWS.MachineLearning.UpdateDataSource+-- Copyright   : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>+-- License     : This Source Code Form is subject to the terms of+--               the Mozilla Public License, v. 2.0.+--               A copy of the MPL can be found in the LICENSE file or+--               you can obtain it at http://mozilla.org/MPL/2.0/.+-- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability   : experimental+-- Portability : non-portable (GHC extensions)+--+-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- | Updates the 'DataSourceName' of a 'DataSource'.+--+-- You can use the 'GetDataSource' operation to view the contents of the updated+-- data element.+--+-- <http://http://docs.aws.amazon.com/machine-learning/latest/APIReference/API_UpdateDataSource.html>+module Network.AWS.MachineLearning.UpdateDataSource+    (+    -- * Request+      UpdateDataSource+    -- ** Request constructor+    , updateDataSource+    -- ** Request lenses+    , udsDataSourceId+    , udsDataSourceName++    -- * Response+    , UpdateDataSourceResponse+    -- ** Response constructor+    , updateDataSourceResponse+    -- ** Response lenses+    , udsrDataSourceId+    ) where++import Network.AWS.Data (Object)+import Network.AWS.Prelude+import Network.AWS.Request.JSON+import Network.AWS.MachineLearning.Types+import qualified GHC.Exts++data UpdateDataSource = UpdateDataSource+    { _udsDataSourceId   :: Text+    , _udsDataSourceName :: Text+    } deriving (Eq, Ord, Read, Show)++-- | 'UpdateDataSource' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'udsDataSourceId' @::@ 'Text'+--+-- * 'udsDataSourceName' @::@ 'Text'+--+updateDataSource :: Text -- ^ 'udsDataSourceId'+                 -> Text -- ^ 'udsDataSourceName'+                 -> UpdateDataSource+updateDataSource p1 p2 = UpdateDataSource+    { _udsDataSourceId   = p1+    , _udsDataSourceName = p2+    }++-- | The ID assigned to the 'DataSource' during creation.+udsDataSourceId :: Lens' UpdateDataSource Text+udsDataSourceId = lens _udsDataSourceId (\s a -> s { _udsDataSourceId = a })++-- | A new user-supplied name or description of the 'DataSource' that will replace+-- the current description.+udsDataSourceName :: Lens' UpdateDataSource Text+udsDataSourceName =+    lens _udsDataSourceName (\s a -> s { _udsDataSourceName = a })++newtype UpdateDataSourceResponse = UpdateDataSourceResponse+    { _udsrDataSourceId :: Maybe Text+    } deriving (Eq, Ord, Read, Show, Monoid)++-- | 'UpdateDataSourceResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'udsrDataSourceId' @::@ 'Maybe' 'Text'+--+updateDataSourceResponse :: UpdateDataSourceResponse+updateDataSourceResponse = UpdateDataSourceResponse+    { _udsrDataSourceId = Nothing+    }++-- | The ID assigned to the 'DataSource' during creation. This value should be+-- identical to the value of the 'DataSourceID' in the request.+udsrDataSourceId :: Lens' UpdateDataSourceResponse (Maybe Text)+udsrDataSourceId = lens _udsrDataSourceId (\s a -> s { _udsrDataSourceId = a })++instance ToPath UpdateDataSource where+    toPath = const "/"++instance ToQuery UpdateDataSource where+    toQuery = const mempty++instance ToHeaders UpdateDataSource++instance ToJSON UpdateDataSource where+    toJSON UpdateDataSource{..} = object+        [ "DataSourceId"   .= _udsDataSourceId+        , "DataSourceName" .= _udsDataSourceName+        ]++instance AWSRequest UpdateDataSource where+    type Sv UpdateDataSource = MachineLearning+    type Rs UpdateDataSource = UpdateDataSourceResponse++    request  = post "UpdateDataSource"+    response = jsonResponse++instance FromJSON UpdateDataSourceResponse where+    parseJSON = withObject "UpdateDataSourceResponse" $ \o -> UpdateDataSourceResponse+        <$> o .:? "DataSourceId"
+ gen/Network/AWS/MachineLearning/UpdateEvaluation.hs view
@@ -0,0 +1,128 @@+{-# 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.MachineLearning.UpdateEvaluation+-- Copyright   : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>+-- License     : This Source Code Form is subject to the terms of+--               the Mozilla Public License, v. 2.0.+--               A copy of the MPL can be found in the LICENSE file or+--               you can obtain it at http://mozilla.org/MPL/2.0/.+-- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability   : experimental+-- Portability : non-portable (GHC extensions)+--+-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- | Updates the 'EvaluationName' of an 'Evaluation'.+--+-- You can use the 'GetEvaluation' operation to view the contents of the updated+-- data element.+--+-- <http://http://docs.aws.amazon.com/machine-learning/latest/APIReference/API_UpdateEvaluation.html>+module Network.AWS.MachineLearning.UpdateEvaluation+    (+    -- * Request+      UpdateEvaluation+    -- ** Request constructor+    , updateEvaluation+    -- ** Request lenses+    , ueEvaluationId+    , ueEvaluationName++    -- * Response+    , UpdateEvaluationResponse+    -- ** Response constructor+    , updateEvaluationResponse+    -- ** Response lenses+    , uerEvaluationId+    ) where++import Network.AWS.Data (Object)+import Network.AWS.Prelude+import Network.AWS.Request.JSON+import Network.AWS.MachineLearning.Types+import qualified GHC.Exts++data UpdateEvaluation = UpdateEvaluation+    { _ueEvaluationId   :: Text+    , _ueEvaluationName :: Text+    } deriving (Eq, Ord, Read, Show)++-- | 'UpdateEvaluation' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'ueEvaluationId' @::@ 'Text'+--+-- * 'ueEvaluationName' @::@ 'Text'+--+updateEvaluation :: Text -- ^ 'ueEvaluationId'+                 -> Text -- ^ 'ueEvaluationName'+                 -> UpdateEvaluation+updateEvaluation p1 p2 = UpdateEvaluation+    { _ueEvaluationId   = p1+    , _ueEvaluationName = p2+    }++-- | The ID assigned to the 'Evaluation' during creation.+ueEvaluationId :: Lens' UpdateEvaluation Text+ueEvaluationId = lens _ueEvaluationId (\s a -> s { _ueEvaluationId = a })++-- | A new user-supplied name or description of the 'Evaluation' that will replace+-- the current content.+ueEvaluationName :: Lens' UpdateEvaluation Text+ueEvaluationName = lens _ueEvaluationName (\s a -> s { _ueEvaluationName = a })++newtype UpdateEvaluationResponse = UpdateEvaluationResponse+    { _uerEvaluationId :: Maybe Text+    } deriving (Eq, Ord, Read, Show, Monoid)++-- | 'UpdateEvaluationResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'uerEvaluationId' @::@ 'Maybe' 'Text'+--+updateEvaluationResponse :: UpdateEvaluationResponse+updateEvaluationResponse = UpdateEvaluationResponse+    { _uerEvaluationId = Nothing+    }++-- | The ID assigned to the 'Evaluation' during creation. This value should be+-- identical to the value of the 'Evaluation' in the request.+uerEvaluationId :: Lens' UpdateEvaluationResponse (Maybe Text)+uerEvaluationId = lens _uerEvaluationId (\s a -> s { _uerEvaluationId = a })++instance ToPath UpdateEvaluation where+    toPath = const "/"++instance ToQuery UpdateEvaluation where+    toQuery = const mempty++instance ToHeaders UpdateEvaluation++instance ToJSON UpdateEvaluation where+    toJSON UpdateEvaluation{..} = object+        [ "EvaluationId"   .= _ueEvaluationId+        , "EvaluationName" .= _ueEvaluationName+        ]++instance AWSRequest UpdateEvaluation where+    type Sv UpdateEvaluation = MachineLearning+    type Rs UpdateEvaluation = UpdateEvaluationResponse++    request  = post "UpdateEvaluation"+    response = jsonResponse++instance FromJSON UpdateEvaluationResponse where+    parseJSON = withObject "UpdateEvaluationResponse" $ \o -> UpdateEvaluationResponse+        <$> o .:? "EvaluationId"
+ gen/Network/AWS/MachineLearning/UpdateMLModel.hs view
@@ -0,0 +1,141 @@+{-# LANGUAGE DataKinds                   #-}+{-# LANGUAGE DeriveGeneric               #-}+{-# LANGUAGE FlexibleInstances           #-}+{-# LANGUAGE GeneralizedNewtypeDeriving  #-}+{-# LANGUAGE LambdaCase                  #-}+{-# LANGUAGE NoImplicitPrelude           #-}+{-# LANGUAGE OverloadedStrings           #-}+{-# LANGUAGE RecordWildCards             #-}+{-# LANGUAGE TypeFamilies                #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Module      : Network.AWS.MachineLearning.UpdateMLModel+-- Copyright   : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>+-- License     : This Source Code Form is subject to the terms of+--               the Mozilla Public License, v. 2.0.+--               A copy of the MPL can be found in the LICENSE file or+--               you can obtain it at http://mozilla.org/MPL/2.0/.+-- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability   : experimental+-- Portability : non-portable (GHC extensions)+--+-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- | Updates the 'MLModelName' and the 'ScoreThreshold' of an 'MLModel'.+--+-- You can use the 'GetMLModel' operation to view the contents of the updated+-- data element.+--+-- <http://http://docs.aws.amazon.com/machine-learning/latest/APIReference/API_UpdateMLModel.html>+module Network.AWS.MachineLearning.UpdateMLModel+    (+    -- * Request+      UpdateMLModel+    -- ** Request constructor+    , updateMLModel+    -- ** Request lenses+    , umlmMLModelId+    , umlmMLModelName+    , umlmScoreThreshold++    -- * Response+    , UpdateMLModelResponse+    -- ** Response constructor+    , updateMLModelResponse+    -- ** Response lenses+    , umlmrMLModelId+    ) where++import Network.AWS.Data (Object)+import Network.AWS.Prelude+import Network.AWS.Request.JSON+import Network.AWS.MachineLearning.Types+import qualified GHC.Exts++data UpdateMLModel = UpdateMLModel+    { _umlmMLModelId      :: Text+    , _umlmMLModelName    :: Maybe Text+    , _umlmScoreThreshold :: Maybe Double+    } deriving (Eq, Ord, Read, Show)++-- | 'UpdateMLModel' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'umlmMLModelId' @::@ 'Text'+--+-- * 'umlmMLModelName' @::@ 'Maybe' 'Text'+--+-- * 'umlmScoreThreshold' @::@ 'Maybe' 'Double'+--+updateMLModel :: Text -- ^ 'umlmMLModelId'+              -> UpdateMLModel+updateMLModel p1 = UpdateMLModel+    { _umlmMLModelId      = p1+    , _umlmMLModelName    = Nothing+    , _umlmScoreThreshold = Nothing+    }++-- | The ID assigned to the 'MLModel' during creation.+umlmMLModelId :: Lens' UpdateMLModel Text+umlmMLModelId = lens _umlmMLModelId (\s a -> s { _umlmMLModelId = a })++-- | A user-supplied name or description of the 'MLModel'.+umlmMLModelName :: Lens' UpdateMLModel (Maybe Text)+umlmMLModelName = lens _umlmMLModelName (\s a -> s { _umlmMLModelName = a })++-- | The 'ScoreThreshold' used in binary classification 'MLModel' that marks the+-- boundary between a positive prediction and a negative prediction.+--+-- Output values greater than or equal to the 'ScoreThreshold' receive a positive+-- result from the 'MLModel', such as 'true'. Output values less than the 'ScoreThreshold' receive a negative response from the 'MLModel', such as 'false'.+umlmScoreThreshold :: Lens' UpdateMLModel (Maybe Double)+umlmScoreThreshold =+    lens _umlmScoreThreshold (\s a -> s { _umlmScoreThreshold = a })++newtype UpdateMLModelResponse = UpdateMLModelResponse+    { _umlmrMLModelId :: Maybe Text+    } deriving (Eq, Ord, Read, Show, Monoid)++-- | 'UpdateMLModelResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'umlmrMLModelId' @::@ 'Maybe' 'Text'+--+updateMLModelResponse :: UpdateMLModelResponse+updateMLModelResponse = UpdateMLModelResponse+    { _umlmrMLModelId = Nothing+    }++-- | The ID assigned to the 'MLModel' during creation. This value should be+-- identical to the value of the 'MLModelID' in the request.+umlmrMLModelId :: Lens' UpdateMLModelResponse (Maybe Text)+umlmrMLModelId = lens _umlmrMLModelId (\s a -> s { _umlmrMLModelId = a })++instance ToPath UpdateMLModel where+    toPath = const "/"++instance ToQuery UpdateMLModel where+    toQuery = const mempty++instance ToHeaders UpdateMLModel++instance ToJSON UpdateMLModel where+    toJSON UpdateMLModel{..} = object+        [ "MLModelId"      .= _umlmMLModelId+        , "MLModelName"    .= _umlmMLModelName+        , "ScoreThreshold" .= _umlmScoreThreshold+        ]++instance AWSRequest UpdateMLModel where+    type Sv UpdateMLModel = MachineLearning+    type Rs UpdateMLModel = UpdateMLModelResponse++    request  = post "UpdateMLModel"+    response = jsonResponse++instance FromJSON UpdateMLModelResponse where+    parseJSON = withObject "UpdateMLModelResponse" $ \o -> UpdateMLModelResponse+        <$> o .:? "MLModelId"