amazonka-sms (empty) → 1.4.5
raw patch · 47 files changed
+3845/−0 lines, 47 filesdep +amazonka-coredep +amazonka-smsdep +amazonka-testsetup-changed
Dependencies added: amazonka-core, amazonka-sms, amazonka-test, base, bytestring, tasty, tasty-hunit, text, time, unordered-containers
Files
- LICENSE +367/−0
- README.md +45/−0
- Setup.hs +2/−0
- amazonka-sms.cabal +91/−0
- fixture/CreateReplicationJob.yaml +10/−0
- fixture/CreateReplicationJobResponse.proto +0/−0
- fixture/DeleteReplicationJob.yaml +10/−0
- fixture/DeleteReplicationJobResponse.proto +0/−0
- fixture/DeleteServerCatalog.yaml +10/−0
- fixture/DeleteServerCatalogResponse.proto +0/−0
- fixture/DisassociateConnector.yaml +10/−0
- fixture/DisassociateConnectorResponse.proto +0/−0
- fixture/GetConnectors.yaml +10/−0
- fixture/GetConnectorsResponse.proto +0/−0
- fixture/GetReplicationJobs.yaml +10/−0
- fixture/GetReplicationJobsResponse.proto +0/−0
- fixture/GetReplicationRuns.yaml +10/−0
- fixture/GetReplicationRunsResponse.proto +0/−0
- fixture/GetServers.yaml +10/−0
- fixture/GetServersResponse.proto +0/−0
- fixture/ImportServerCatalog.yaml +10/−0
- fixture/ImportServerCatalogResponse.proto +0/−0
- fixture/StartOnDemandReplicationRun.yaml +10/−0
- fixture/StartOnDemandReplicationRunResponse.proto +0/−0
- fixture/UpdateReplicationJob.yaml +10/−0
- fixture/UpdateReplicationJobResponse.proto +0/−0
- gen/Network/AWS/SMS.hs +232/−0
- gen/Network/AWS/SMS/CreateReplicationJob.hs +186/−0
- gen/Network/AWS/SMS/DeleteReplicationJob.hs +124/−0
- gen/Network/AWS/SMS/DeleteServerCatalog.hs +107/−0
- gen/Network/AWS/SMS/DisassociateConnector.hs +123/−0
- gen/Network/AWS/SMS/GetConnectors.hs +152/−0
- gen/Network/AWS/SMS/GetReplicationJobs.hs +163/−0
- gen/Network/AWS/SMS/GetReplicationRuns.hs +173/−0
- gen/Network/AWS/SMS/GetServers.hs +172/−0
- gen/Network/AWS/SMS/ImportServerCatalog.hs +107/−0
- gen/Network/AWS/SMS/StartOnDemandReplicationRun.hs +143/−0
- gen/Network/AWS/SMS/Types.hs +213/−0
- gen/Network/AWS/SMS/Types/Product.hs +562/−0
- gen/Network/AWS/SMS/Types/Sum.hs +290/−0
- gen/Network/AWS/SMS/UpdateReplicationJob.hs +175/−0
- gen/Network/AWS/SMS/Waiters.hs +21/−0
- src/.gitkeep +0/−0
- test/Main.hs +21/−0
- test/Test/AWS/Gen/SMS.hs +237/−0
- test/Test/AWS/SMS.hs +20/−0
- test/Test/AWS/SMS/Internal.hs +9/−0
+ LICENSE view
@@ -0,0 +1,367 @@+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.
+ README.md view
@@ -0,0 +1,45 @@+# Amazon Server Migration Service SDK++* [Version](#version)+* [Description](#description)+* [Contribute](#contribute)+* [Licence](#licence)+++## Version++`1.4.5`+++## Description++Documentation is available via [Hackage](http://hackage.haskell.org/package/amazonka-sms)+and the [AWS API Reference](https://aws.amazon.com/documentation/).++The types from this library are intended to be used with [amazonka](http://hackage.haskell.org/package/amazonka),+which provides mechanisms for specifying AuthN/AuthZ information, sending requests,+and receiving responses.++Lenses are used for constructing and manipulating types,+due to the depth of nesting of AWS types and transparency regarding+de/serialisation into more palatable Haskell values.+The provided lenses should be compatible with any of the major lens libraries+[lens](http://hackage.haskell.org/package/lens) or [lens-family-core](http://hackage.haskell.org/package/lens-family-core).++See [Network.AWS.SMS](http://hackage.haskell.org/package/amazonka-sms/docs/Network-AWS-SMS.html)+or [the AWS documentation](https://aws.amazon.com/documentation/) to get started.+++## 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-sms` 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-sms.cabal view
@@ -0,0 +1,91 @@+name: amazonka-sms+version: 1.4.5+synopsis: Amazon Server Migration Service SDK.+homepage: https://github.com/brendanhay/amazonka+bug-reports: https://github.com/brendanhay/amazonka/issues+license: OtherLicense+license-file: LICENSE+author: Brendan Hay+maintainer: Brendan Hay <brendan.g.hay@gmail.com>+copyright: Copyright (c) 2013-2016 Brendan Hay+category: Network, AWS, Cloud, Distributed Computing+build-type: Simple+cabal-version: >= 1.10+extra-source-files: README.md fixture/*.yaml fixture/*.proto src/.gitkeep+description:+ The types from this library are intended to be used with+ <http://hackage.haskell.org/package/amazonka amazonka>, which provides+ mechanisms for specifying AuthN/AuthZ information, sending requests,+ and receiving responses.+ .+ Lenses are used for constructing and manipulating types,+ due to the depth of nesting of AWS types and transparency regarding+ de/serialisation into more palatable Haskell values.+ The provided lenses should be compatible with any of the major lens libraries+ such as <http://hackage.haskell.org/package/lens lens> or+ <http://hackage.haskell.org/package/lens-family-core lens-family-core>.+ .+ See "Network.AWS.SMS" or <https://aws.amazon.com/documentation/ the AWS documentation>+ to get started.++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.SMS+ , Network.AWS.SMS.CreateReplicationJob+ , Network.AWS.SMS.DeleteReplicationJob+ , Network.AWS.SMS.DeleteServerCatalog+ , Network.AWS.SMS.DisassociateConnector+ , Network.AWS.SMS.GetConnectors+ , Network.AWS.SMS.GetReplicationJobs+ , Network.AWS.SMS.GetReplicationRuns+ , Network.AWS.SMS.GetServers+ , Network.AWS.SMS.ImportServerCatalog+ , Network.AWS.SMS.StartOnDemandReplicationRun+ , Network.AWS.SMS.Types+ , Network.AWS.SMS.UpdateReplicationJob+ , Network.AWS.SMS.Waiters++ other-modules:+ Network.AWS.SMS.Types.Product+ , Network.AWS.SMS.Types.Sum++ build-depends:+ amazonka-core == 1.4.5.*+ , base >= 4.7 && < 5++test-suite amazonka-sms-test+ type: exitcode-stdio-1.0+ default-language: Haskell2010+ hs-source-dirs: test+ main-is: Main.hs++ ghc-options: -Wall -threaded++ -- This section is encoded by the template and any modules added by+ -- hand outside these namespaces will not correctly be added to the+ -- distribution package.+ other-modules:+ Test.AWS.SMS+ , Test.AWS.Gen.SMS+ , Test.AWS.SMS.Internal++ build-depends:+ amazonka-core == 1.4.5.*+ , amazonka-test == 1.4.5.*+ , amazonka-sms == 1.4.5.*+ , base+ , bytestring+ , tasty+ , tasty-hunit+ , text+ , time+ , unordered-containers
+ fixture/CreateReplicationJob.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/sms/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: sms.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/CreateReplicationJobResponse.proto view
+ fixture/DeleteReplicationJob.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/sms/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: sms.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/DeleteReplicationJobResponse.proto view
+ fixture/DeleteServerCatalog.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/sms/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: sms.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/DeleteServerCatalogResponse.proto view
+ fixture/DisassociateConnector.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/sms/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: sms.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/DisassociateConnectorResponse.proto view
+ fixture/GetConnectors.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/sms/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: sms.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/GetConnectorsResponse.proto view
+ fixture/GetReplicationJobs.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/sms/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: sms.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/GetReplicationJobsResponse.proto view
+ fixture/GetReplicationRuns.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/sms/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: sms.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/GetReplicationRunsResponse.proto view
+ fixture/GetServers.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/sms/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: sms.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/GetServersResponse.proto view
+ fixture/ImportServerCatalog.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/sms/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: sms.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/ImportServerCatalogResponse.proto view
+ fixture/StartOnDemandReplicationRun.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/sms/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: sms.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/StartOnDemandReplicationRunResponse.proto view
+ fixture/UpdateReplicationJob.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/sms/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: sms.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/UpdateReplicationJobResponse.proto view
+ gen/Network/AWS/SMS.hs view
@@ -0,0 +1,232 @@+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.SMS+-- Copyright : (c) 2013-2016 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Amazon Server Migration Service automates the process of migrating servers to EC2.+module Network.AWS.SMS+ (+ -- * Service Configuration+ sms++ -- * Errors+ -- $errors++ -- ** ReplicationRunLimitExceededException+ , _ReplicationRunLimitExceededException++ -- ** InvalidParameterException+ , _InvalidParameterException++ -- ** NoConnectorsAvailableException+ , _NoConnectorsAvailableException++ -- ** ReplicationJobNotFoundException+ , _ReplicationJobNotFoundException++ -- ** ServerCannotBeReplicatedException+ , _ServerCannotBeReplicatedException++ -- ** InternalError+ , _InternalError++ -- ** ReplicationJobAlreadyExistsException+ , _ReplicationJobAlreadyExistsException++ -- ** OperationNotPermittedException+ , _OperationNotPermittedException++ -- ** MissingRequiredParameterException+ , _MissingRequiredParameterException++ -- ** UnauthorizedOperationException+ , _UnauthorizedOperationException++ -- * Waiters+ -- $waiters++ -- * Operations+ -- $operations++ -- ** DeleteServerCatalog+ , module Network.AWS.SMS.DeleteServerCatalog++ -- ** GetReplicationRuns+ , module Network.AWS.SMS.GetReplicationRuns++ -- ** GetServers+ , module Network.AWS.SMS.GetServers++ -- ** ImportServerCatalog+ , module Network.AWS.SMS.ImportServerCatalog++ -- ** GetConnectors+ , module Network.AWS.SMS.GetConnectors++ -- ** GetReplicationJobs+ , module Network.AWS.SMS.GetReplicationJobs++ -- ** DisassociateConnector+ , module Network.AWS.SMS.DisassociateConnector++ -- ** CreateReplicationJob+ , module Network.AWS.SMS.CreateReplicationJob++ -- ** UpdateReplicationJob+ , module Network.AWS.SMS.UpdateReplicationJob++ -- ** DeleteReplicationJob+ , module Network.AWS.SMS.DeleteReplicationJob++ -- ** StartOnDemandReplicationRun+ , module Network.AWS.SMS.StartOnDemandReplicationRun++ -- * Types++ -- ** ConnectorCapability+ , ConnectorCapability (..)++ -- ** ConnectorStatus+ , ConnectorStatus (..)++ -- ** LicenseType+ , LicenseType (..)++ -- ** ReplicationJobState+ , ReplicationJobState (..)++ -- ** ReplicationRunState+ , ReplicationRunState (..)++ -- ** ReplicationRunType+ , ReplicationRunType (..)++ -- ** ServerCatalogStatus+ , ServerCatalogStatus (..)++ -- ** ServerType+ , ServerType (..)++ -- ** VMManagerType+ , VMManagerType (..)++ -- ** Connector+ , Connector+ , connector+ , cStatus+ , cVmManagerName+ , cIpAddress+ , cVmManagerId+ , cVmManagerType+ , cConnectorId+ , cAssociatedOn+ , cMacAddress+ , cVersion+ , cCapabilityList++ -- ** ReplicationJob+ , ReplicationJob+ , replicationJob+ , rjFrequency+ , rjState+ , rjServerType+ , rjServerId+ , rjLicenseType+ , rjRoleName+ , rjVmServer+ , rjReplicationJobId+ , rjReplicationRunList+ , rjNextReplicationRunStartTime+ , rjStatusMessage+ , rjLatestAMIId+ , rjSeedReplicationTime+ , rjDescription++ -- ** ReplicationRun+ , ReplicationRun+ , replicationRun+ , rrState+ , rrReplicationRunId+ , rrScheduledStartTime+ , rrStatusMessage+ , rrCompletedTime+ , rrAmiId+ , rrType+ , rrDescription++ -- ** Server+ , Server+ , server+ , sServerType+ , sServerId+ , sReplicationJobTerminated+ , sVmServer+ , sReplicationJobId++ -- ** VMServer+ , VMServer+ , vMServer+ , vmsVmManagerName+ , vmsVmManagerType+ , vmsVmServerAddress+ , vmsVmName+ , vmsVmPath++ -- ** VMServerAddress+ , VMServerAddress+ , vMServerAddress+ , vmsaVmManagerId+ , vmsaVmId+ ) where++import Network.AWS.SMS.CreateReplicationJob+import Network.AWS.SMS.DeleteReplicationJob+import Network.AWS.SMS.DeleteServerCatalog+import Network.AWS.SMS.DisassociateConnector+import Network.AWS.SMS.GetConnectors+import Network.AWS.SMS.GetReplicationJobs+import Network.AWS.SMS.GetReplicationRuns+import Network.AWS.SMS.GetServers+import Network.AWS.SMS.ImportServerCatalog+import Network.AWS.SMS.StartOnDemandReplicationRun+import Network.AWS.SMS.Types+import Network.AWS.SMS.UpdateReplicationJob+import Network.AWS.SMS.Waiters++{- $errors+Error matchers are designed for use with the functions provided by+<http://hackage.haskell.org/package/lens/docs/Control-Exception-Lens.html Control.Exception.Lens>.+This allows catching (and rethrowing) service specific errors returned+by 'SMS'.+-}++{- $operations+Some AWS operations return results that are incomplete and require subsequent+requests in order to obtain the entire result set. The process of sending+subsequent requests to continue where a previous request left off is called+pagination. For example, the 'ListObjects' operation of Amazon S3 returns up to+1000 objects at a time, and you must send subsequent requests with the+appropriate Marker in order to retrieve the next page of results.++Operations that have an 'AWSPager' instance can transparently perform subsequent+requests, correctly setting Markers and other request facets to iterate through+the entire result set of a truncated API operation. Operations which support+this have an additional note in the documentation.++Many operations have the ability to filter results on the server side. See the+individual operation parameters for details.+-}++{- $waiters+Waiters poll by repeatedly sending a request until some remote success condition+configured by the 'Wait' specification is fulfilled. The 'Wait' specification+determines how many attempts should be made, in addition to delay and retry strategies.+-}
+ gen/Network/AWS/SMS/CreateReplicationJob.hs view
@@ -0,0 +1,186 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.SMS.CreateReplicationJob+-- Copyright : (c) 2013-2016 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- The CreateReplicationJob API is used to create a ReplicationJob to replicate a server on AWS. Call this API to first create a ReplicationJob, which will then schedule periodic ReplicationRuns to replicate your server to AWS. Each ReplicationRun will result in the creation of an AWS AMI.+module Network.AWS.SMS.CreateReplicationJob+ (+ -- * Creating a Request+ createReplicationJob+ , CreateReplicationJob+ -- * Request Lenses+ , crjLicenseType+ , crjRoleName+ , crjDescription+ , crjServerId+ , crjSeedReplicationTime+ , crjFrequency++ -- * Destructuring the Response+ , createReplicationJobResponse+ , CreateReplicationJobResponse+ -- * Response Lenses+ , crjrsReplicationJobId+ , crjrsResponseStatus+ ) where++import Network.AWS.Lens+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response+import Network.AWS.SMS.Types+import Network.AWS.SMS.Types.Product++-- | /See:/ 'createReplicationJob' smart constructor.+data CreateReplicationJob = CreateReplicationJob'+ { _crjLicenseType :: !(Maybe LicenseType)+ , _crjRoleName :: !(Maybe Text)+ , _crjDescription :: !(Maybe Text)+ , _crjServerId :: !Text+ , _crjSeedReplicationTime :: !POSIX+ , _crjFrequency :: !Int+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'CreateReplicationJob' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'crjLicenseType' - Undocumented member.+--+-- * 'crjRoleName' - Undocumented member.+--+-- * 'crjDescription' - Undocumented member.+--+-- * 'crjServerId' - Undocumented member.+--+-- * 'crjSeedReplicationTime' - Undocumented member.+--+-- * 'crjFrequency' - Undocumented member.+createReplicationJob+ :: Text -- ^ 'crjServerId'+ -> UTCTime -- ^ 'crjSeedReplicationTime'+ -> Int -- ^ 'crjFrequency'+ -> CreateReplicationJob+createReplicationJob pServerId_ pSeedReplicationTime_ pFrequency_ =+ CreateReplicationJob'+ { _crjLicenseType = Nothing+ , _crjRoleName = Nothing+ , _crjDescription = Nothing+ , _crjServerId = pServerId_+ , _crjSeedReplicationTime = _Time # pSeedReplicationTime_+ , _crjFrequency = pFrequency_+ }++-- | Undocumented member.+crjLicenseType :: Lens' CreateReplicationJob (Maybe LicenseType)+crjLicenseType = lens _crjLicenseType (\ s a -> s{_crjLicenseType = a});++-- | Undocumented member.+crjRoleName :: Lens' CreateReplicationJob (Maybe Text)+crjRoleName = lens _crjRoleName (\ s a -> s{_crjRoleName = a});++-- | Undocumented member.+crjDescription :: Lens' CreateReplicationJob (Maybe Text)+crjDescription = lens _crjDescription (\ s a -> s{_crjDescription = a});++-- | Undocumented member.+crjServerId :: Lens' CreateReplicationJob Text+crjServerId = lens _crjServerId (\ s a -> s{_crjServerId = a});++-- | Undocumented member.+crjSeedReplicationTime :: Lens' CreateReplicationJob UTCTime+crjSeedReplicationTime = lens _crjSeedReplicationTime (\ s a -> s{_crjSeedReplicationTime = a}) . _Time;++-- | Undocumented member.+crjFrequency :: Lens' CreateReplicationJob Int+crjFrequency = lens _crjFrequency (\ s a -> s{_crjFrequency = a});++instance AWSRequest CreateReplicationJob where+ type Rs CreateReplicationJob =+ CreateReplicationJobResponse+ request = postJSON sms+ response+ = receiveJSON+ (\ s h x ->+ CreateReplicationJobResponse' <$>+ (x .?> "replicationJobId") <*> (pure (fromEnum s)))++instance Hashable CreateReplicationJob++instance NFData CreateReplicationJob++instance ToHeaders CreateReplicationJob where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("AWSServerMigrationService_V2016_10_24.CreateReplicationJob"+ :: ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON CreateReplicationJob where+ toJSON CreateReplicationJob'{..}+ = object+ (catMaybes+ [("licenseType" .=) <$> _crjLicenseType,+ ("roleName" .=) <$> _crjRoleName,+ ("description" .=) <$> _crjDescription,+ Just ("serverId" .= _crjServerId),+ Just+ ("seedReplicationTime" .= _crjSeedReplicationTime),+ Just ("frequency" .= _crjFrequency)])++instance ToPath CreateReplicationJob where+ toPath = const "/"++instance ToQuery CreateReplicationJob where+ toQuery = const mempty++-- | /See:/ 'createReplicationJobResponse' smart constructor.+data CreateReplicationJobResponse = CreateReplicationJobResponse'+ { _crjrsReplicationJobId :: !(Maybe Text)+ , _crjrsResponseStatus :: !Int+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'CreateReplicationJobResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'crjrsReplicationJobId' - Undocumented member.+--+-- * 'crjrsResponseStatus' - -- | The response status code.+createReplicationJobResponse+ :: Int -- ^ 'crjrsResponseStatus'+ -> CreateReplicationJobResponse+createReplicationJobResponse pResponseStatus_ =+ CreateReplicationJobResponse'+ { _crjrsReplicationJobId = Nothing+ , _crjrsResponseStatus = pResponseStatus_+ }++-- | Undocumented member.+crjrsReplicationJobId :: Lens' CreateReplicationJobResponse (Maybe Text)+crjrsReplicationJobId = lens _crjrsReplicationJobId (\ s a -> s{_crjrsReplicationJobId = a});++-- | -- | The response status code.+crjrsResponseStatus :: Lens' CreateReplicationJobResponse Int+crjrsResponseStatus = lens _crjrsResponseStatus (\ s a -> s{_crjrsResponseStatus = a});++instance NFData CreateReplicationJobResponse
+ gen/Network/AWS/SMS/DeleteReplicationJob.hs view
@@ -0,0 +1,124 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.SMS.DeleteReplicationJob+-- Copyright : (c) 2013-2016 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- The DeleteReplicationJob API is used to delete a ReplicationJob, resulting in no further ReplicationRuns. This will delete the contents of the S3 bucket used to store SMS artifacts, but will not delete any AMIs created by the SMS service.+module Network.AWS.SMS.DeleteReplicationJob+ (+ -- * Creating a Request+ deleteReplicationJob+ , DeleteReplicationJob+ -- * Request Lenses+ , drjReplicationJobId++ -- * Destructuring the Response+ , deleteReplicationJobResponse+ , DeleteReplicationJobResponse+ -- * Response Lenses+ , drjrsResponseStatus+ ) where++import Network.AWS.Lens+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response+import Network.AWS.SMS.Types+import Network.AWS.SMS.Types.Product++-- | /See:/ 'deleteReplicationJob' smart constructor.+newtype DeleteReplicationJob = DeleteReplicationJob'+ { _drjReplicationJobId :: Text+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'DeleteReplicationJob' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'drjReplicationJobId' - Undocumented member.+deleteReplicationJob+ :: Text -- ^ 'drjReplicationJobId'+ -> DeleteReplicationJob+deleteReplicationJob pReplicationJobId_ =+ DeleteReplicationJob'+ { _drjReplicationJobId = pReplicationJobId_+ }++-- | Undocumented member.+drjReplicationJobId :: Lens' DeleteReplicationJob Text+drjReplicationJobId = lens _drjReplicationJobId (\ s a -> s{_drjReplicationJobId = a});++instance AWSRequest DeleteReplicationJob where+ type Rs DeleteReplicationJob =+ DeleteReplicationJobResponse+ request = postJSON sms+ response+ = receiveEmpty+ (\ s h x ->+ DeleteReplicationJobResponse' <$>+ (pure (fromEnum s)))++instance Hashable DeleteReplicationJob++instance NFData DeleteReplicationJob++instance ToHeaders DeleteReplicationJob where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("AWSServerMigrationService_V2016_10_24.DeleteReplicationJob"+ :: ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON DeleteReplicationJob where+ toJSON DeleteReplicationJob'{..}+ = object+ (catMaybes+ [Just ("replicationJobId" .= _drjReplicationJobId)])++instance ToPath DeleteReplicationJob where+ toPath = const "/"++instance ToQuery DeleteReplicationJob where+ toQuery = const mempty++-- | /See:/ 'deleteReplicationJobResponse' smart constructor.+newtype DeleteReplicationJobResponse = DeleteReplicationJobResponse'+ { _drjrsResponseStatus :: Int+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'DeleteReplicationJobResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'drjrsResponseStatus' - -- | The response status code.+deleteReplicationJobResponse+ :: Int -- ^ 'drjrsResponseStatus'+ -> DeleteReplicationJobResponse+deleteReplicationJobResponse pResponseStatus_ =+ DeleteReplicationJobResponse'+ { _drjrsResponseStatus = pResponseStatus_+ }++-- | -- | The response status code.+drjrsResponseStatus :: Lens' DeleteReplicationJobResponse Int+drjrsResponseStatus = lens _drjrsResponseStatus (\ s a -> s{_drjrsResponseStatus = a});++instance NFData DeleteReplicationJobResponse
+ gen/Network/AWS/SMS/DeleteServerCatalog.hs view
@@ -0,0 +1,107 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.SMS.DeleteServerCatalog+-- Copyright : (c) 2013-2016 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- The DeleteServerCatalog API clears all servers from your server catalog. This means that these servers will no longer be accessible to the Server Migration Service.+module Network.AWS.SMS.DeleteServerCatalog+ (+ -- * Creating a Request+ deleteServerCatalog+ , DeleteServerCatalog++ -- * Destructuring the Response+ , deleteServerCatalogResponse+ , DeleteServerCatalogResponse+ -- * Response Lenses+ , dscrsResponseStatus+ ) where++import Network.AWS.Lens+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response+import Network.AWS.SMS.Types+import Network.AWS.SMS.Types.Product++-- | /See:/ 'deleteServerCatalog' smart constructor.+data DeleteServerCatalog =+ DeleteServerCatalog'+ deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'DeleteServerCatalog' with the minimum fields required to make a request.+--+deleteServerCatalog+ :: DeleteServerCatalog+deleteServerCatalog = DeleteServerCatalog'++instance AWSRequest DeleteServerCatalog where+ type Rs DeleteServerCatalog =+ DeleteServerCatalogResponse+ request = postJSON sms+ response+ = receiveEmpty+ (\ s h x ->+ DeleteServerCatalogResponse' <$> (pure (fromEnum s)))++instance Hashable DeleteServerCatalog++instance NFData DeleteServerCatalog++instance ToHeaders DeleteServerCatalog where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("AWSServerMigrationService_V2016_10_24.DeleteServerCatalog"+ :: ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON DeleteServerCatalog where+ toJSON = const (Object mempty)++instance ToPath DeleteServerCatalog where+ toPath = const "/"++instance ToQuery DeleteServerCatalog where+ toQuery = const mempty++-- | /See:/ 'deleteServerCatalogResponse' smart constructor.+newtype DeleteServerCatalogResponse = DeleteServerCatalogResponse'+ { _dscrsResponseStatus :: Int+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'DeleteServerCatalogResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'dscrsResponseStatus' - -- | The response status code.+deleteServerCatalogResponse+ :: Int -- ^ 'dscrsResponseStatus'+ -> DeleteServerCatalogResponse+deleteServerCatalogResponse pResponseStatus_ =+ DeleteServerCatalogResponse'+ { _dscrsResponseStatus = pResponseStatus_+ }++-- | -- | The response status code.+dscrsResponseStatus :: Lens' DeleteServerCatalogResponse Int+dscrsResponseStatus = lens _dscrsResponseStatus (\ s a -> s{_dscrsResponseStatus = a});++instance NFData DeleteServerCatalogResponse
+ gen/Network/AWS/SMS/DisassociateConnector.hs view
@@ -0,0 +1,123 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.SMS.DisassociateConnector+-- Copyright : (c) 2013-2016 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- The DisassociateConnector API will disassociate a connector from the Server Migration Service, rendering it unavailable to support replication jobs.+module Network.AWS.SMS.DisassociateConnector+ (+ -- * Creating a Request+ disassociateConnector+ , DisassociateConnector+ -- * Request Lenses+ , dcConnectorId++ -- * Destructuring the Response+ , disassociateConnectorResponse+ , DisassociateConnectorResponse+ -- * Response Lenses+ , dcrsResponseStatus+ ) where++import Network.AWS.Lens+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response+import Network.AWS.SMS.Types+import Network.AWS.SMS.Types.Product++-- | /See:/ 'disassociateConnector' smart constructor.+newtype DisassociateConnector = DisassociateConnector'+ { _dcConnectorId :: Text+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'DisassociateConnector' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'dcConnectorId' - Undocumented member.+disassociateConnector+ :: Text -- ^ 'dcConnectorId'+ -> DisassociateConnector+disassociateConnector pConnectorId_ =+ DisassociateConnector'+ { _dcConnectorId = pConnectorId_+ }++-- | Undocumented member.+dcConnectorId :: Lens' DisassociateConnector Text+dcConnectorId = lens _dcConnectorId (\ s a -> s{_dcConnectorId = a});++instance AWSRequest DisassociateConnector where+ type Rs DisassociateConnector =+ DisassociateConnectorResponse+ request = postJSON sms+ response+ = receiveEmpty+ (\ s h x ->+ DisassociateConnectorResponse' <$>+ (pure (fromEnum s)))++instance Hashable DisassociateConnector++instance NFData DisassociateConnector++instance ToHeaders DisassociateConnector where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("AWSServerMigrationService_V2016_10_24.DisassociateConnector"+ :: ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON DisassociateConnector where+ toJSON DisassociateConnector'{..}+ = object+ (catMaybes [Just ("connectorId" .= _dcConnectorId)])++instance ToPath DisassociateConnector where+ toPath = const "/"++instance ToQuery DisassociateConnector where+ toQuery = const mempty++-- | /See:/ 'disassociateConnectorResponse' smart constructor.+newtype DisassociateConnectorResponse = DisassociateConnectorResponse'+ { _dcrsResponseStatus :: Int+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'DisassociateConnectorResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'dcrsResponseStatus' - -- | The response status code.+disassociateConnectorResponse+ :: Int -- ^ 'dcrsResponseStatus'+ -> DisassociateConnectorResponse+disassociateConnectorResponse pResponseStatus_ =+ DisassociateConnectorResponse'+ { _dcrsResponseStatus = pResponseStatus_+ }++-- | -- | The response status code.+dcrsResponseStatus :: Lens' DisassociateConnectorResponse Int+dcrsResponseStatus = lens _dcrsResponseStatus (\ s a -> s{_dcrsResponseStatus = a});++instance NFData DisassociateConnectorResponse
+ gen/Network/AWS/SMS/GetConnectors.hs view
@@ -0,0 +1,152 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.SMS.GetConnectors+-- Copyright : (c) 2013-2016 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- The GetConnectors API returns a list of connectors that are registered with the Server Migration Service.+module Network.AWS.SMS.GetConnectors+ (+ -- * Creating a Request+ getConnectors+ , GetConnectors+ -- * Request Lenses+ , gcNextToken+ , gcMaxResults++ -- * Destructuring the Response+ , getConnectorsResponse+ , GetConnectorsResponse+ -- * Response Lenses+ , gcrsConnectorList+ , gcrsNextToken+ , gcrsResponseStatus+ ) where++import Network.AWS.Lens+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response+import Network.AWS.SMS.Types+import Network.AWS.SMS.Types.Product++-- | /See:/ 'getConnectors' smart constructor.+data GetConnectors = GetConnectors'+ { _gcNextToken :: !(Maybe Text)+ , _gcMaxResults :: !(Maybe Int)+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'GetConnectors' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'gcNextToken' - Undocumented member.+--+-- * 'gcMaxResults' - Undocumented member.+getConnectors+ :: GetConnectors+getConnectors =+ GetConnectors'+ { _gcNextToken = Nothing+ , _gcMaxResults = Nothing+ }++-- | Undocumented member.+gcNextToken :: Lens' GetConnectors (Maybe Text)+gcNextToken = lens _gcNextToken (\ s a -> s{_gcNextToken = a});++-- | Undocumented member.+gcMaxResults :: Lens' GetConnectors (Maybe Int)+gcMaxResults = lens _gcMaxResults (\ s a -> s{_gcMaxResults = a});++instance AWSRequest GetConnectors where+ type Rs GetConnectors = GetConnectorsResponse+ request = postJSON sms+ response+ = receiveJSON+ (\ s h x ->+ GetConnectorsResponse' <$>+ (x .?> "connectorList" .!@ mempty) <*>+ (x .?> "nextToken")+ <*> (pure (fromEnum s)))++instance Hashable GetConnectors++instance NFData GetConnectors++instance ToHeaders GetConnectors where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("AWSServerMigrationService_V2016_10_24.GetConnectors"+ :: ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON GetConnectors where+ toJSON GetConnectors'{..}+ = object+ (catMaybes+ [("nextToken" .=) <$> _gcNextToken,+ ("maxResults" .=) <$> _gcMaxResults])++instance ToPath GetConnectors where+ toPath = const "/"++instance ToQuery GetConnectors where+ toQuery = const mempty++-- | /See:/ 'getConnectorsResponse' smart constructor.+data GetConnectorsResponse = GetConnectorsResponse'+ { _gcrsConnectorList :: !(Maybe [Connector])+ , _gcrsNextToken :: !(Maybe Text)+ , _gcrsResponseStatus :: !Int+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'GetConnectorsResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'gcrsConnectorList' - Undocumented member.+--+-- * 'gcrsNextToken' - Undocumented member.+--+-- * 'gcrsResponseStatus' - -- | The response status code.+getConnectorsResponse+ :: Int -- ^ 'gcrsResponseStatus'+ -> GetConnectorsResponse+getConnectorsResponse pResponseStatus_ =+ GetConnectorsResponse'+ { _gcrsConnectorList = Nothing+ , _gcrsNextToken = Nothing+ , _gcrsResponseStatus = pResponseStatus_+ }++-- | Undocumented member.+gcrsConnectorList :: Lens' GetConnectorsResponse [Connector]+gcrsConnectorList = lens _gcrsConnectorList (\ s a -> s{_gcrsConnectorList = a}) . _Default . _Coerce;++-- | Undocumented member.+gcrsNextToken :: Lens' GetConnectorsResponse (Maybe Text)+gcrsNextToken = lens _gcrsNextToken (\ s a -> s{_gcrsNextToken = a});++-- | -- | The response status code.+gcrsResponseStatus :: Lens' GetConnectorsResponse Int+gcrsResponseStatus = lens _gcrsResponseStatus (\ s a -> s{_gcrsResponseStatus = a});++instance NFData GetConnectorsResponse
+ gen/Network/AWS/SMS/GetReplicationJobs.hs view
@@ -0,0 +1,163 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.SMS.GetReplicationJobs+-- Copyright : (c) 2013-2016 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- The GetReplicationJobs API will return all of your ReplicationJobs and their details. This API returns a paginated list, that may be consecutively called with nextToken to retrieve all ReplicationJobs.+module Network.AWS.SMS.GetReplicationJobs+ (+ -- * Creating a Request+ getReplicationJobs+ , GetReplicationJobs+ -- * Request Lenses+ , grjReplicationJobId+ , grjNextToken+ , grjMaxResults++ -- * Destructuring the Response+ , getReplicationJobsResponse+ , GetReplicationJobsResponse+ -- * Response Lenses+ , grjrsReplicationJobList+ , grjrsNextToken+ , grjrsResponseStatus+ ) where++import Network.AWS.Lens+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response+import Network.AWS.SMS.Types+import Network.AWS.SMS.Types.Product++-- | /See:/ 'getReplicationJobs' smart constructor.+data GetReplicationJobs = GetReplicationJobs'+ { _grjReplicationJobId :: !(Maybe Text)+ , _grjNextToken :: !(Maybe Text)+ , _grjMaxResults :: !(Maybe Int)+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'GetReplicationJobs' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'grjReplicationJobId' - Undocumented member.+--+-- * 'grjNextToken' - Undocumented member.+--+-- * 'grjMaxResults' - Undocumented member.+getReplicationJobs+ :: GetReplicationJobs+getReplicationJobs =+ GetReplicationJobs'+ { _grjReplicationJobId = Nothing+ , _grjNextToken = Nothing+ , _grjMaxResults = Nothing+ }++-- | Undocumented member.+grjReplicationJobId :: Lens' GetReplicationJobs (Maybe Text)+grjReplicationJobId = lens _grjReplicationJobId (\ s a -> s{_grjReplicationJobId = a});++-- | Undocumented member.+grjNextToken :: Lens' GetReplicationJobs (Maybe Text)+grjNextToken = lens _grjNextToken (\ s a -> s{_grjNextToken = a});++-- | Undocumented member.+grjMaxResults :: Lens' GetReplicationJobs (Maybe Int)+grjMaxResults = lens _grjMaxResults (\ s a -> s{_grjMaxResults = a});++instance AWSRequest GetReplicationJobs where+ type Rs GetReplicationJobs =+ GetReplicationJobsResponse+ request = postJSON sms+ response+ = receiveJSON+ (\ s h x ->+ GetReplicationJobsResponse' <$>+ (x .?> "replicationJobList" .!@ mempty) <*>+ (x .?> "nextToken")+ <*> (pure (fromEnum s)))++instance Hashable GetReplicationJobs++instance NFData GetReplicationJobs++instance ToHeaders GetReplicationJobs where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("AWSServerMigrationService_V2016_10_24.GetReplicationJobs"+ :: ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON GetReplicationJobs where+ toJSON GetReplicationJobs'{..}+ = object+ (catMaybes+ [("replicationJobId" .=) <$> _grjReplicationJobId,+ ("nextToken" .=) <$> _grjNextToken,+ ("maxResults" .=) <$> _grjMaxResults])++instance ToPath GetReplicationJobs where+ toPath = const "/"++instance ToQuery GetReplicationJobs where+ toQuery = const mempty++-- | /See:/ 'getReplicationJobsResponse' smart constructor.+data GetReplicationJobsResponse = GetReplicationJobsResponse'+ { _grjrsReplicationJobList :: !(Maybe [ReplicationJob])+ , _grjrsNextToken :: !(Maybe Text)+ , _grjrsResponseStatus :: !Int+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'GetReplicationJobsResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'grjrsReplicationJobList' - Undocumented member.+--+-- * 'grjrsNextToken' - Undocumented member.+--+-- * 'grjrsResponseStatus' - -- | The response status code.+getReplicationJobsResponse+ :: Int -- ^ 'grjrsResponseStatus'+ -> GetReplicationJobsResponse+getReplicationJobsResponse pResponseStatus_ =+ GetReplicationJobsResponse'+ { _grjrsReplicationJobList = Nothing+ , _grjrsNextToken = Nothing+ , _grjrsResponseStatus = pResponseStatus_+ }++-- | Undocumented member.+grjrsReplicationJobList :: Lens' GetReplicationJobsResponse [ReplicationJob]+grjrsReplicationJobList = lens _grjrsReplicationJobList (\ s a -> s{_grjrsReplicationJobList = a}) . _Default . _Coerce;++-- | Undocumented member.+grjrsNextToken :: Lens' GetReplicationJobsResponse (Maybe Text)+grjrsNextToken = lens _grjrsNextToken (\ s a -> s{_grjrsNextToken = a});++-- | -- | The response status code.+grjrsResponseStatus :: Lens' GetReplicationJobsResponse Int+grjrsResponseStatus = lens _grjrsResponseStatus (\ s a -> s{_grjrsResponseStatus = a});++instance NFData GetReplicationJobsResponse
+ gen/Network/AWS/SMS/GetReplicationRuns.hs view
@@ -0,0 +1,173 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.SMS.GetReplicationRuns+-- Copyright : (c) 2013-2016 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- The GetReplicationRuns API will return all ReplicationRuns for a given ReplicationJob. This API returns a paginated list, that may be consecutively called with nextToken to retrieve all ReplicationRuns for a ReplicationJob.+module Network.AWS.SMS.GetReplicationRuns+ (+ -- * Creating a Request+ getReplicationRuns+ , GetReplicationRuns+ -- * Request Lenses+ , grrNextToken+ , grrMaxResults+ , grrReplicationJobId++ -- * Destructuring the Response+ , getReplicationRunsResponse+ , GetReplicationRunsResponse+ -- * Response Lenses+ , grrrsReplicationJob+ , grrrsNextToken+ , grrrsReplicationRunList+ , grrrsResponseStatus+ ) where++import Network.AWS.Lens+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response+import Network.AWS.SMS.Types+import Network.AWS.SMS.Types.Product++-- | /See:/ 'getReplicationRuns' smart constructor.+data GetReplicationRuns = GetReplicationRuns'+ { _grrNextToken :: !(Maybe Text)+ , _grrMaxResults :: !(Maybe Int)+ , _grrReplicationJobId :: !Text+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'GetReplicationRuns' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'grrNextToken' - Undocumented member.+--+-- * 'grrMaxResults' - Undocumented member.+--+-- * 'grrReplicationJobId' - Undocumented member.+getReplicationRuns+ :: Text -- ^ 'grrReplicationJobId'+ -> GetReplicationRuns+getReplicationRuns pReplicationJobId_ =+ GetReplicationRuns'+ { _grrNextToken = Nothing+ , _grrMaxResults = Nothing+ , _grrReplicationJobId = pReplicationJobId_+ }++-- | Undocumented member.+grrNextToken :: Lens' GetReplicationRuns (Maybe Text)+grrNextToken = lens _grrNextToken (\ s a -> s{_grrNextToken = a});++-- | Undocumented member.+grrMaxResults :: Lens' GetReplicationRuns (Maybe Int)+grrMaxResults = lens _grrMaxResults (\ s a -> s{_grrMaxResults = a});++-- | Undocumented member.+grrReplicationJobId :: Lens' GetReplicationRuns Text+grrReplicationJobId = lens _grrReplicationJobId (\ s a -> s{_grrReplicationJobId = a});++instance AWSRequest GetReplicationRuns where+ type Rs GetReplicationRuns =+ GetReplicationRunsResponse+ request = postJSON sms+ response+ = receiveJSON+ (\ s h x ->+ GetReplicationRunsResponse' <$>+ (x .?> "replicationJob") <*> (x .?> "nextToken") <*>+ (x .?> "replicationRunList" .!@ mempty)+ <*> (pure (fromEnum s)))++instance Hashable GetReplicationRuns++instance NFData GetReplicationRuns++instance ToHeaders GetReplicationRuns where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("AWSServerMigrationService_V2016_10_24.GetReplicationRuns"+ :: ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON GetReplicationRuns where+ toJSON GetReplicationRuns'{..}+ = object+ (catMaybes+ [("nextToken" .=) <$> _grrNextToken,+ ("maxResults" .=) <$> _grrMaxResults,+ Just ("replicationJobId" .= _grrReplicationJobId)])++instance ToPath GetReplicationRuns where+ toPath = const "/"++instance ToQuery GetReplicationRuns where+ toQuery = const mempty++-- | /See:/ 'getReplicationRunsResponse' smart constructor.+data GetReplicationRunsResponse = GetReplicationRunsResponse'+ { _grrrsReplicationJob :: !(Maybe ReplicationJob)+ , _grrrsNextToken :: !(Maybe Text)+ , _grrrsReplicationRunList :: !(Maybe [ReplicationRun])+ , _grrrsResponseStatus :: !Int+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'GetReplicationRunsResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'grrrsReplicationJob' - Undocumented member.+--+-- * 'grrrsNextToken' - Undocumented member.+--+-- * 'grrrsReplicationRunList' - Undocumented member.+--+-- * 'grrrsResponseStatus' - -- | The response status code.+getReplicationRunsResponse+ :: Int -- ^ 'grrrsResponseStatus'+ -> GetReplicationRunsResponse+getReplicationRunsResponse pResponseStatus_ =+ GetReplicationRunsResponse'+ { _grrrsReplicationJob = Nothing+ , _grrrsNextToken = Nothing+ , _grrrsReplicationRunList = Nothing+ , _grrrsResponseStatus = pResponseStatus_+ }++-- | Undocumented member.+grrrsReplicationJob :: Lens' GetReplicationRunsResponse (Maybe ReplicationJob)+grrrsReplicationJob = lens _grrrsReplicationJob (\ s a -> s{_grrrsReplicationJob = a});++-- | Undocumented member.+grrrsNextToken :: Lens' GetReplicationRunsResponse (Maybe Text)+grrrsNextToken = lens _grrrsNextToken (\ s a -> s{_grrrsNextToken = a});++-- | Undocumented member.+grrrsReplicationRunList :: Lens' GetReplicationRunsResponse [ReplicationRun]+grrrsReplicationRunList = lens _grrrsReplicationRunList (\ s a -> s{_grrrsReplicationRunList = a}) . _Default . _Coerce;++-- | -- | The response status code.+grrrsResponseStatus :: Lens' GetReplicationRunsResponse Int+grrrsResponseStatus = lens _grrrsResponseStatus (\ s a -> s{_grrrsResponseStatus = a});++instance NFData GetReplicationRunsResponse
+ gen/Network/AWS/SMS/GetServers.hs view
@@ -0,0 +1,172 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.SMS.GetServers+-- Copyright : (c) 2013-2016 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- The GetServers API returns a list of all servers in your server catalog. For this call to succeed, you must previously have called ImportServerCatalog.+module Network.AWS.SMS.GetServers+ (+ -- * Creating a Request+ getServers+ , GetServers+ -- * Request Lenses+ , gsNextToken+ , gsMaxResults++ -- * Destructuring the Response+ , getServersResponse+ , GetServersResponse+ -- * Response Lenses+ , gsrsServerCatalogStatus+ , gsrsLastModifiedOn+ , gsrsNextToken+ , gsrsServerList+ , gsrsResponseStatus+ ) where++import Network.AWS.Lens+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response+import Network.AWS.SMS.Types+import Network.AWS.SMS.Types.Product++-- | /See:/ 'getServers' smart constructor.+data GetServers = GetServers'+ { _gsNextToken :: !(Maybe Text)+ , _gsMaxResults :: !(Maybe Int)+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'GetServers' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'gsNextToken' - Undocumented member.+--+-- * 'gsMaxResults' - Undocumented member.+getServers+ :: GetServers+getServers =+ GetServers'+ { _gsNextToken = Nothing+ , _gsMaxResults = Nothing+ }++-- | Undocumented member.+gsNextToken :: Lens' GetServers (Maybe Text)+gsNextToken = lens _gsNextToken (\ s a -> s{_gsNextToken = a});++-- | Undocumented member.+gsMaxResults :: Lens' GetServers (Maybe Int)+gsMaxResults = lens _gsMaxResults (\ s a -> s{_gsMaxResults = a});++instance AWSRequest GetServers where+ type Rs GetServers = GetServersResponse+ request = postJSON sms+ response+ = receiveJSON+ (\ s h x ->+ GetServersResponse' <$>+ (x .?> "serverCatalogStatus") <*>+ (x .?> "lastModifiedOn")+ <*> (x .?> "nextToken")+ <*> (x .?> "serverList" .!@ mempty)+ <*> (pure (fromEnum s)))++instance Hashable GetServers++instance NFData GetServers++instance ToHeaders GetServers where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("AWSServerMigrationService_V2016_10_24.GetServers"+ :: ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON GetServers where+ toJSON GetServers'{..}+ = object+ (catMaybes+ [("nextToken" .=) <$> _gsNextToken,+ ("maxResults" .=) <$> _gsMaxResults])++instance ToPath GetServers where+ toPath = const "/"++instance ToQuery GetServers where+ toQuery = const mempty++-- | /See:/ 'getServersResponse' smart constructor.+data GetServersResponse = GetServersResponse'+ { _gsrsServerCatalogStatus :: !(Maybe ServerCatalogStatus)+ , _gsrsLastModifiedOn :: !(Maybe POSIX)+ , _gsrsNextToken :: !(Maybe Text)+ , _gsrsServerList :: !(Maybe [Server])+ , _gsrsResponseStatus :: !Int+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'GetServersResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'gsrsServerCatalogStatus' - Undocumented member.+--+-- * 'gsrsLastModifiedOn' - Undocumented member.+--+-- * 'gsrsNextToken' - Undocumented member.+--+-- * 'gsrsServerList' - Undocumented member.+--+-- * 'gsrsResponseStatus' - -- | The response status code.+getServersResponse+ :: Int -- ^ 'gsrsResponseStatus'+ -> GetServersResponse+getServersResponse pResponseStatus_ =+ GetServersResponse'+ { _gsrsServerCatalogStatus = Nothing+ , _gsrsLastModifiedOn = Nothing+ , _gsrsNextToken = Nothing+ , _gsrsServerList = Nothing+ , _gsrsResponseStatus = pResponseStatus_+ }++-- | Undocumented member.+gsrsServerCatalogStatus :: Lens' GetServersResponse (Maybe ServerCatalogStatus)+gsrsServerCatalogStatus = lens _gsrsServerCatalogStatus (\ s a -> s{_gsrsServerCatalogStatus = a});++-- | Undocumented member.+gsrsLastModifiedOn :: Lens' GetServersResponse (Maybe UTCTime)+gsrsLastModifiedOn = lens _gsrsLastModifiedOn (\ s a -> s{_gsrsLastModifiedOn = a}) . mapping _Time;++-- | Undocumented member.+gsrsNextToken :: Lens' GetServersResponse (Maybe Text)+gsrsNextToken = lens _gsrsNextToken (\ s a -> s{_gsrsNextToken = a});++-- | Undocumented member.+gsrsServerList :: Lens' GetServersResponse [Server]+gsrsServerList = lens _gsrsServerList (\ s a -> s{_gsrsServerList = a}) . _Default . _Coerce;++-- | -- | The response status code.+gsrsResponseStatus :: Lens' GetServersResponse Int+gsrsResponseStatus = lens _gsrsResponseStatus (\ s a -> s{_gsrsResponseStatus = a});++instance NFData GetServersResponse
+ gen/Network/AWS/SMS/ImportServerCatalog.hs view
@@ -0,0 +1,107 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.SMS.ImportServerCatalog+-- Copyright : (c) 2013-2016 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- The ImportServerCatalog API is used to gather the complete list of on-premises servers on your premises. This API call requires connectors to be installed and monitoring all servers you would like imported. This API call returns immediately, but may take some time to retrieve all of the servers.+module Network.AWS.SMS.ImportServerCatalog+ (+ -- * Creating a Request+ importServerCatalog+ , ImportServerCatalog++ -- * Destructuring the Response+ , importServerCatalogResponse+ , ImportServerCatalogResponse+ -- * Response Lenses+ , iscrsResponseStatus+ ) where++import Network.AWS.Lens+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response+import Network.AWS.SMS.Types+import Network.AWS.SMS.Types.Product++-- | /See:/ 'importServerCatalog' smart constructor.+data ImportServerCatalog =+ ImportServerCatalog'+ deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'ImportServerCatalog' with the minimum fields required to make a request.+--+importServerCatalog+ :: ImportServerCatalog+importServerCatalog = ImportServerCatalog'++instance AWSRequest ImportServerCatalog where+ type Rs ImportServerCatalog =+ ImportServerCatalogResponse+ request = postJSON sms+ response+ = receiveEmpty+ (\ s h x ->+ ImportServerCatalogResponse' <$> (pure (fromEnum s)))++instance Hashable ImportServerCatalog++instance NFData ImportServerCatalog++instance ToHeaders ImportServerCatalog where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("AWSServerMigrationService_V2016_10_24.ImportServerCatalog"+ :: ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON ImportServerCatalog where+ toJSON = const (Object mempty)++instance ToPath ImportServerCatalog where+ toPath = const "/"++instance ToQuery ImportServerCatalog where+ toQuery = const mempty++-- | /See:/ 'importServerCatalogResponse' smart constructor.+newtype ImportServerCatalogResponse = ImportServerCatalogResponse'+ { _iscrsResponseStatus :: Int+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'ImportServerCatalogResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'iscrsResponseStatus' - -- | The response status code.+importServerCatalogResponse+ :: Int -- ^ 'iscrsResponseStatus'+ -> ImportServerCatalogResponse+importServerCatalogResponse pResponseStatus_ =+ ImportServerCatalogResponse'+ { _iscrsResponseStatus = pResponseStatus_+ }++-- | -- | The response status code.+iscrsResponseStatus :: Lens' ImportServerCatalogResponse Int+iscrsResponseStatus = lens _iscrsResponseStatus (\ s a -> s{_iscrsResponseStatus = a});++instance NFData ImportServerCatalogResponse
+ gen/Network/AWS/SMS/StartOnDemandReplicationRun.hs view
@@ -0,0 +1,143 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.SMS.StartOnDemandReplicationRun+-- Copyright : (c) 2013-2016 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- The StartOnDemandReplicationRun API is used to start a ReplicationRun on demand (in addition to those that are scheduled based on your frequency). This ReplicationRun will start immediately. StartOnDemandReplicationRun is subject to limits on how many on demand ReplicationRuns you may call per 24-hour period.+module Network.AWS.SMS.StartOnDemandReplicationRun+ (+ -- * Creating a Request+ startOnDemandReplicationRun+ , StartOnDemandReplicationRun+ -- * Request Lenses+ , sodrrDescription+ , sodrrReplicationJobId++ -- * Destructuring the Response+ , startOnDemandReplicationRunResponse+ , StartOnDemandReplicationRunResponse+ -- * Response Lenses+ , sodrrrsReplicationRunId+ , sodrrrsResponseStatus+ ) where++import Network.AWS.Lens+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response+import Network.AWS.SMS.Types+import Network.AWS.SMS.Types.Product++-- | /See:/ 'startOnDemandReplicationRun' smart constructor.+data StartOnDemandReplicationRun = StartOnDemandReplicationRun'+ { _sodrrDescription :: !(Maybe Text)+ , _sodrrReplicationJobId :: !Text+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'StartOnDemandReplicationRun' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'sodrrDescription' - Undocumented member.+--+-- * 'sodrrReplicationJobId' - Undocumented member.+startOnDemandReplicationRun+ :: Text -- ^ 'sodrrReplicationJobId'+ -> StartOnDemandReplicationRun+startOnDemandReplicationRun pReplicationJobId_ =+ StartOnDemandReplicationRun'+ { _sodrrDescription = Nothing+ , _sodrrReplicationJobId = pReplicationJobId_+ }++-- | Undocumented member.+sodrrDescription :: Lens' StartOnDemandReplicationRun (Maybe Text)+sodrrDescription = lens _sodrrDescription (\ s a -> s{_sodrrDescription = a});++-- | Undocumented member.+sodrrReplicationJobId :: Lens' StartOnDemandReplicationRun Text+sodrrReplicationJobId = lens _sodrrReplicationJobId (\ s a -> s{_sodrrReplicationJobId = a});++instance AWSRequest StartOnDemandReplicationRun where+ type Rs StartOnDemandReplicationRun =+ StartOnDemandReplicationRunResponse+ request = postJSON sms+ response+ = receiveJSON+ (\ s h x ->+ StartOnDemandReplicationRunResponse' <$>+ (x .?> "replicationRunId") <*> (pure (fromEnum s)))++instance Hashable StartOnDemandReplicationRun++instance NFData StartOnDemandReplicationRun++instance ToHeaders StartOnDemandReplicationRun where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("AWSServerMigrationService_V2016_10_24.StartOnDemandReplicationRun"+ :: ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON StartOnDemandReplicationRun where+ toJSON StartOnDemandReplicationRun'{..}+ = object+ (catMaybes+ [("description" .=) <$> _sodrrDescription,+ Just ("replicationJobId" .= _sodrrReplicationJobId)])++instance ToPath StartOnDemandReplicationRun where+ toPath = const "/"++instance ToQuery StartOnDemandReplicationRun where+ toQuery = const mempty++-- | /See:/ 'startOnDemandReplicationRunResponse' smart constructor.+data StartOnDemandReplicationRunResponse = StartOnDemandReplicationRunResponse'+ { _sodrrrsReplicationRunId :: !(Maybe Text)+ , _sodrrrsResponseStatus :: !Int+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'StartOnDemandReplicationRunResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'sodrrrsReplicationRunId' - Undocumented member.+--+-- * 'sodrrrsResponseStatus' - -- | The response status code.+startOnDemandReplicationRunResponse+ :: Int -- ^ 'sodrrrsResponseStatus'+ -> StartOnDemandReplicationRunResponse+startOnDemandReplicationRunResponse pResponseStatus_ =+ StartOnDemandReplicationRunResponse'+ { _sodrrrsReplicationRunId = Nothing+ , _sodrrrsResponseStatus = pResponseStatus_+ }++-- | Undocumented member.+sodrrrsReplicationRunId :: Lens' StartOnDemandReplicationRunResponse (Maybe Text)+sodrrrsReplicationRunId = lens _sodrrrsReplicationRunId (\ s a -> s{_sodrrrsReplicationRunId = a});++-- | -- | The response status code.+sodrrrsResponseStatus :: Lens' StartOnDemandReplicationRunResponse Int+sodrrrsResponseStatus = lens _sodrrrsResponseStatus (\ s a -> s{_sodrrrsResponseStatus = a});++instance NFData StartOnDemandReplicationRunResponse
+ gen/Network/AWS/SMS/Types.hs view
@@ -0,0 +1,213 @@+{-# LANGUAGE OverloadedStrings #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.SMS.Types+-- Copyright : (c) 2013-2016 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+module Network.AWS.SMS.Types+ (+ -- * Service Configuration+ sms++ -- * Errors+ , _ReplicationRunLimitExceededException+ , _InvalidParameterException+ , _NoConnectorsAvailableException+ , _ReplicationJobNotFoundException+ , _ServerCannotBeReplicatedException+ , _InternalError+ , _ReplicationJobAlreadyExistsException+ , _OperationNotPermittedException+ , _MissingRequiredParameterException+ , _UnauthorizedOperationException++ -- * ConnectorCapability+ , ConnectorCapability (..)++ -- * ConnectorStatus+ , ConnectorStatus (..)++ -- * LicenseType+ , LicenseType (..)++ -- * ReplicationJobState+ , ReplicationJobState (..)++ -- * ReplicationRunState+ , ReplicationRunState (..)++ -- * ReplicationRunType+ , ReplicationRunType (..)++ -- * ServerCatalogStatus+ , ServerCatalogStatus (..)++ -- * ServerType+ , ServerType (..)++ -- * VMManagerType+ , VMManagerType (..)++ -- * Connector+ , Connector+ , connector+ , cStatus+ , cVmManagerName+ , cIpAddress+ , cVmManagerId+ , cVmManagerType+ , cConnectorId+ , cAssociatedOn+ , cMacAddress+ , cVersion+ , cCapabilityList++ -- * ReplicationJob+ , ReplicationJob+ , replicationJob+ , rjFrequency+ , rjState+ , rjServerType+ , rjServerId+ , rjLicenseType+ , rjRoleName+ , rjVmServer+ , rjReplicationJobId+ , rjReplicationRunList+ , rjNextReplicationRunStartTime+ , rjStatusMessage+ , rjLatestAMIId+ , rjSeedReplicationTime+ , rjDescription++ -- * ReplicationRun+ , ReplicationRun+ , replicationRun+ , rrState+ , rrReplicationRunId+ , rrScheduledStartTime+ , rrStatusMessage+ , rrCompletedTime+ , rrAmiId+ , rrType+ , rrDescription++ -- * Server+ , Server+ , server+ , sServerType+ , sServerId+ , sReplicationJobTerminated+ , sVmServer+ , sReplicationJobId++ -- * VMServer+ , VMServer+ , vMServer+ , vmsVmManagerName+ , vmsVmManagerType+ , vmsVmServerAddress+ , vmsVmName+ , vmsVmPath++ -- * VMServerAddress+ , VMServerAddress+ , vMServerAddress+ , vmsaVmManagerId+ , vmsaVmId+ ) where++import Network.AWS.Lens+import Network.AWS.Prelude+import Network.AWS.Sign.V4+import Network.AWS.SMS.Types.Product+import Network.AWS.SMS.Types.Sum++-- | API version @2016-10-24@ of the Amazon Server Migration Service SDK configuration.+sms :: Service+sms =+ Service+ { _svcAbbrev = "SMS"+ , _svcSigner = v4+ , _svcPrefix = "sms"+ , _svcVersion = "2016-10-24"+ , _svcEndpoint = defaultEndpoint sms+ , _svcTimeout = Just 70+ , _svcCheck = statusSuccess+ , _svcError = parseJSONError "SMS"+ , _svcRetry = retry+ }+ where+ retry =+ Exponential+ { _retryBase = 5.0e-2+ , _retryGrowth = 2+ , _retryAttempts = 5+ , _retryCheck = check+ }+ check e+ | has (hasStatus 429) e = Just "too_many_requests"+ | has (hasCode "ThrottlingException" . hasStatus 400) e =+ Just "throttling_exception"+ | has (hasCode "Throttling" . hasStatus 400) e = Just "throttling"+ | has (hasStatus 504) e = Just "gateway_timeout"+ | has (hasStatus 502) e = Just "bad_gateway"+ | has (hasStatus 503) e = Just "service_unavailable"+ | has (hasStatus 500) e = Just "general_server_error"+ | has (hasStatus 509) e = Just "limit_exceeded"+ | otherwise = Nothing++-- | This user has exceeded the maximum allowed Replication Run limit.+_ReplicationRunLimitExceededException :: AsError a => Getting (First ServiceError) a ServiceError+_ReplicationRunLimitExceededException =+ _ServiceError . hasCode "ReplicationRunLimitExceededException"++-- | A parameter specified in the request is not valid, is unsupported, or cannot be used.+_InvalidParameterException :: AsError a => Getting (First ServiceError) a ServiceError+_InvalidParameterException =+ _ServiceError . hasCode "InvalidParameterException"++-- | No connectors are available to handle this request. Please associate connector(s) and verify any existing connectors are healthy and can respond to requests.+_NoConnectorsAvailableException :: AsError a => Getting (First ServiceError) a ServiceError+_NoConnectorsAvailableException =+ _ServiceError . hasCode "NoConnectorsAvailableException"++-- | The specified Replication Job cannot be found.+_ReplicationJobNotFoundException :: AsError a => Getting (First ServiceError) a ServiceError+_ReplicationJobNotFoundException =+ _ServiceError . hasCode "ReplicationJobNotFoundException"++-- | The provided server cannot be replicated.+_ServerCannotBeReplicatedException :: AsError a => Getting (First ServiceError) a ServiceError+_ServerCannotBeReplicatedException =+ _ServiceError . hasCode "ServerCannotBeReplicatedException"++-- | An internal error has occured.+_InternalError :: AsError a => Getting (First ServiceError) a ServiceError+_InternalError = _ServiceError . hasCode "InternalError"++-- | An active Replication Job already exists for the specified server.+_ReplicationJobAlreadyExistsException :: AsError a => Getting (First ServiceError) a ServiceError+_ReplicationJobAlreadyExistsException =+ _ServiceError . hasCode "ReplicationJobAlreadyExistsException"++-- | The specified operation is not allowed. This error can occur for a number of reasons; for example, you might be trying to start a Replication Run before seed Replication Run.+_OperationNotPermittedException :: AsError a => Getting (First ServiceError) a ServiceError+_OperationNotPermittedException =+ _ServiceError . hasCode "OperationNotPermittedException"++-- | The request is missing a required parameter. Ensure that you have supplied all the required parameters for the request.+_MissingRequiredParameterException :: AsError a => Getting (First ServiceError) a ServiceError+_MissingRequiredParameterException =+ _ServiceError . hasCode "MissingRequiredParameterException"++-- | This user does not have permissions to perform this operation.+_UnauthorizedOperationException :: AsError a => Getting (First ServiceError) a ServiceError+_UnauthorizedOperationException =+ _ServiceError . hasCode "UnauthorizedOperationException"
+ gen/Network/AWS/SMS/Types/Product.hs view
@@ -0,0 +1,562 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.SMS.Types.Product+-- Copyright : (c) 2013-2016 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+module Network.AWS.SMS.Types.Product where++import Network.AWS.Lens+import Network.AWS.Prelude+import Network.AWS.SMS.Types.Sum++-- | Object representing a Connector+--+-- /See:/ 'connector' smart constructor.+data Connector = Connector'+ { _cStatus :: !(Maybe ConnectorStatus)+ , _cVmManagerName :: !(Maybe Text)+ , _cIpAddress :: !(Maybe Text)+ , _cVmManagerId :: !(Maybe Text)+ , _cVmManagerType :: !(Maybe VMManagerType)+ , _cConnectorId :: !(Maybe Text)+ , _cAssociatedOn :: !(Maybe POSIX)+ , _cMacAddress :: !(Maybe Text)+ , _cVersion :: !(Maybe Text)+ , _cCapabilityList :: !(Maybe [ConnectorCapability])+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'Connector' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'cStatus' - Undocumented member.+--+-- * 'cVmManagerName' - Undocumented member.+--+-- * 'cIpAddress' - Undocumented member.+--+-- * 'cVmManagerId' - Undocumented member.+--+-- * 'cVmManagerType' - Undocumented member.+--+-- * 'cConnectorId' - Undocumented member.+--+-- * 'cAssociatedOn' - Undocumented member.+--+-- * 'cMacAddress' - Undocumented member.+--+-- * 'cVersion' - Undocumented member.+--+-- * 'cCapabilityList' - Undocumented member.+connector+ :: Connector+connector =+ Connector'+ { _cStatus = Nothing+ , _cVmManagerName = Nothing+ , _cIpAddress = Nothing+ , _cVmManagerId = Nothing+ , _cVmManagerType = Nothing+ , _cConnectorId = Nothing+ , _cAssociatedOn = Nothing+ , _cMacAddress = Nothing+ , _cVersion = Nothing+ , _cCapabilityList = Nothing+ }++-- | Undocumented member.+cStatus :: Lens' Connector (Maybe ConnectorStatus)+cStatus = lens _cStatus (\ s a -> s{_cStatus = a});++-- | Undocumented member.+cVmManagerName :: Lens' Connector (Maybe Text)+cVmManagerName = lens _cVmManagerName (\ s a -> s{_cVmManagerName = a});++-- | Undocumented member.+cIpAddress :: Lens' Connector (Maybe Text)+cIpAddress = lens _cIpAddress (\ s a -> s{_cIpAddress = a});++-- | Undocumented member.+cVmManagerId :: Lens' Connector (Maybe Text)+cVmManagerId = lens _cVmManagerId (\ s a -> s{_cVmManagerId = a});++-- | Undocumented member.+cVmManagerType :: Lens' Connector (Maybe VMManagerType)+cVmManagerType = lens _cVmManagerType (\ s a -> s{_cVmManagerType = a});++-- | Undocumented member.+cConnectorId :: Lens' Connector (Maybe Text)+cConnectorId = lens _cConnectorId (\ s a -> s{_cConnectorId = a});++-- | Undocumented member.+cAssociatedOn :: Lens' Connector (Maybe UTCTime)+cAssociatedOn = lens _cAssociatedOn (\ s a -> s{_cAssociatedOn = a}) . mapping _Time;++-- | Undocumented member.+cMacAddress :: Lens' Connector (Maybe Text)+cMacAddress = lens _cMacAddress (\ s a -> s{_cMacAddress = a});++-- | Undocumented member.+cVersion :: Lens' Connector (Maybe Text)+cVersion = lens _cVersion (\ s a -> s{_cVersion = a});++-- | Undocumented member.+cCapabilityList :: Lens' Connector [ConnectorCapability]+cCapabilityList = lens _cCapabilityList (\ s a -> s{_cCapabilityList = a}) . _Default . _Coerce;++instance FromJSON Connector where+ parseJSON+ = withObject "Connector"+ (\ x ->+ Connector' <$>+ (x .:? "status") <*> (x .:? "vmManagerName") <*>+ (x .:? "ipAddress")+ <*> (x .:? "vmManagerId")+ <*> (x .:? "vmManagerType")+ <*> (x .:? "connectorId")+ <*> (x .:? "associatedOn")+ <*> (x .:? "macAddress")+ <*> (x .:? "version")+ <*> (x .:? "capabilityList" .!= mempty))++instance Hashable Connector++instance NFData Connector++-- | Object representing a Replication Job+--+-- /See:/ 'replicationJob' smart constructor.+data ReplicationJob = ReplicationJob'+ { _rjFrequency :: !(Maybe Int)+ , _rjState :: !(Maybe ReplicationJobState)+ , _rjServerType :: !(Maybe ServerType)+ , _rjServerId :: !(Maybe Text)+ , _rjLicenseType :: !(Maybe LicenseType)+ , _rjRoleName :: !(Maybe Text)+ , _rjVmServer :: !(Maybe VMServer)+ , _rjReplicationJobId :: !(Maybe Text)+ , _rjReplicationRunList :: !(Maybe [ReplicationRun])+ , _rjNextReplicationRunStartTime :: !(Maybe POSIX)+ , _rjStatusMessage :: !(Maybe Text)+ , _rjLatestAMIId :: !(Maybe Text)+ , _rjSeedReplicationTime :: !(Maybe POSIX)+ , _rjDescription :: !(Maybe Text)+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'ReplicationJob' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'rjFrequency' - Undocumented member.+--+-- * 'rjState' - Undocumented member.+--+-- * 'rjServerType' - Undocumented member.+--+-- * 'rjServerId' - Undocumented member.+--+-- * 'rjLicenseType' - Undocumented member.+--+-- * 'rjRoleName' - Undocumented member.+--+-- * 'rjVmServer' - Undocumented member.+--+-- * 'rjReplicationJobId' - Undocumented member.+--+-- * 'rjReplicationRunList' - Undocumented member.+--+-- * 'rjNextReplicationRunStartTime' - Undocumented member.+--+-- * 'rjStatusMessage' - Undocumented member.+--+-- * 'rjLatestAMIId' - Undocumented member.+--+-- * 'rjSeedReplicationTime' - Undocumented member.+--+-- * 'rjDescription' - Undocumented member.+replicationJob+ :: ReplicationJob+replicationJob =+ ReplicationJob'+ { _rjFrequency = Nothing+ , _rjState = Nothing+ , _rjServerType = Nothing+ , _rjServerId = Nothing+ , _rjLicenseType = Nothing+ , _rjRoleName = Nothing+ , _rjVmServer = Nothing+ , _rjReplicationJobId = Nothing+ , _rjReplicationRunList = Nothing+ , _rjNextReplicationRunStartTime = Nothing+ , _rjStatusMessage = Nothing+ , _rjLatestAMIId = Nothing+ , _rjSeedReplicationTime = Nothing+ , _rjDescription = Nothing+ }++-- | Undocumented member.+rjFrequency :: Lens' ReplicationJob (Maybe Int)+rjFrequency = lens _rjFrequency (\ s a -> s{_rjFrequency = a});++-- | Undocumented member.+rjState :: Lens' ReplicationJob (Maybe ReplicationJobState)+rjState = lens _rjState (\ s a -> s{_rjState = a});++-- | Undocumented member.+rjServerType :: Lens' ReplicationJob (Maybe ServerType)+rjServerType = lens _rjServerType (\ s a -> s{_rjServerType = a});++-- | Undocumented member.+rjServerId :: Lens' ReplicationJob (Maybe Text)+rjServerId = lens _rjServerId (\ s a -> s{_rjServerId = a});++-- | Undocumented member.+rjLicenseType :: Lens' ReplicationJob (Maybe LicenseType)+rjLicenseType = lens _rjLicenseType (\ s a -> s{_rjLicenseType = a});++-- | Undocumented member.+rjRoleName :: Lens' ReplicationJob (Maybe Text)+rjRoleName = lens _rjRoleName (\ s a -> s{_rjRoleName = a});++-- | Undocumented member.+rjVmServer :: Lens' ReplicationJob (Maybe VMServer)+rjVmServer = lens _rjVmServer (\ s a -> s{_rjVmServer = a});++-- | Undocumented member.+rjReplicationJobId :: Lens' ReplicationJob (Maybe Text)+rjReplicationJobId = lens _rjReplicationJobId (\ s a -> s{_rjReplicationJobId = a});++-- | Undocumented member.+rjReplicationRunList :: Lens' ReplicationJob [ReplicationRun]+rjReplicationRunList = lens _rjReplicationRunList (\ s a -> s{_rjReplicationRunList = a}) . _Default . _Coerce;++-- | Undocumented member.+rjNextReplicationRunStartTime :: Lens' ReplicationJob (Maybe UTCTime)+rjNextReplicationRunStartTime = lens _rjNextReplicationRunStartTime (\ s a -> s{_rjNextReplicationRunStartTime = a}) . mapping _Time;++-- | Undocumented member.+rjStatusMessage :: Lens' ReplicationJob (Maybe Text)+rjStatusMessage = lens _rjStatusMessage (\ s a -> s{_rjStatusMessage = a});++-- | Undocumented member.+rjLatestAMIId :: Lens' ReplicationJob (Maybe Text)+rjLatestAMIId = lens _rjLatestAMIId (\ s a -> s{_rjLatestAMIId = a});++-- | Undocumented member.+rjSeedReplicationTime :: Lens' ReplicationJob (Maybe UTCTime)+rjSeedReplicationTime = lens _rjSeedReplicationTime (\ s a -> s{_rjSeedReplicationTime = a}) . mapping _Time;++-- | Undocumented member.+rjDescription :: Lens' ReplicationJob (Maybe Text)+rjDescription = lens _rjDescription (\ s a -> s{_rjDescription = a});++instance FromJSON ReplicationJob where+ parseJSON+ = withObject "ReplicationJob"+ (\ x ->+ ReplicationJob' <$>+ (x .:? "frequency") <*> (x .:? "state") <*>+ (x .:? "serverType")+ <*> (x .:? "serverId")+ <*> (x .:? "licenseType")+ <*> (x .:? "roleName")+ <*> (x .:? "vmServer")+ <*> (x .:? "replicationJobId")+ <*> (x .:? "replicationRunList" .!= mempty)+ <*> (x .:? "nextReplicationRunStartTime")+ <*> (x .:? "statusMessage")+ <*> (x .:? "latestAmiId")+ <*> (x .:? "seedReplicationTime")+ <*> (x .:? "description"))++instance Hashable ReplicationJob++instance NFData ReplicationJob++-- | Object representing a Replication Run+--+-- /See:/ 'replicationRun' smart constructor.+data ReplicationRun = ReplicationRun'+ { _rrState :: !(Maybe ReplicationRunState)+ , _rrReplicationRunId :: !(Maybe Text)+ , _rrScheduledStartTime :: !(Maybe POSIX)+ , _rrStatusMessage :: !(Maybe Text)+ , _rrCompletedTime :: !(Maybe POSIX)+ , _rrAmiId :: !(Maybe Text)+ , _rrType :: !(Maybe ReplicationRunType)+ , _rrDescription :: !(Maybe Text)+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'ReplicationRun' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'rrState' - Undocumented member.+--+-- * 'rrReplicationRunId' - Undocumented member.+--+-- * 'rrScheduledStartTime' - Undocumented member.+--+-- * 'rrStatusMessage' - Undocumented member.+--+-- * 'rrCompletedTime' - Undocumented member.+--+-- * 'rrAmiId' - Undocumented member.+--+-- * 'rrType' - Undocumented member.+--+-- * 'rrDescription' - Undocumented member.+replicationRun+ :: ReplicationRun+replicationRun =+ ReplicationRun'+ { _rrState = Nothing+ , _rrReplicationRunId = Nothing+ , _rrScheduledStartTime = Nothing+ , _rrStatusMessage = Nothing+ , _rrCompletedTime = Nothing+ , _rrAmiId = Nothing+ , _rrType = Nothing+ , _rrDescription = Nothing+ }++-- | Undocumented member.+rrState :: Lens' ReplicationRun (Maybe ReplicationRunState)+rrState = lens _rrState (\ s a -> s{_rrState = a});++-- | Undocumented member.+rrReplicationRunId :: Lens' ReplicationRun (Maybe Text)+rrReplicationRunId = lens _rrReplicationRunId (\ s a -> s{_rrReplicationRunId = a});++-- | Undocumented member.+rrScheduledStartTime :: Lens' ReplicationRun (Maybe UTCTime)+rrScheduledStartTime = lens _rrScheduledStartTime (\ s a -> s{_rrScheduledStartTime = a}) . mapping _Time;++-- | Undocumented member.+rrStatusMessage :: Lens' ReplicationRun (Maybe Text)+rrStatusMessage = lens _rrStatusMessage (\ s a -> s{_rrStatusMessage = a});++-- | Undocumented member.+rrCompletedTime :: Lens' ReplicationRun (Maybe UTCTime)+rrCompletedTime = lens _rrCompletedTime (\ s a -> s{_rrCompletedTime = a}) . mapping _Time;++-- | Undocumented member.+rrAmiId :: Lens' ReplicationRun (Maybe Text)+rrAmiId = lens _rrAmiId (\ s a -> s{_rrAmiId = a});++-- | Undocumented member.+rrType :: Lens' ReplicationRun (Maybe ReplicationRunType)+rrType = lens _rrType (\ s a -> s{_rrType = a});++-- | Undocumented member.+rrDescription :: Lens' ReplicationRun (Maybe Text)+rrDescription = lens _rrDescription (\ s a -> s{_rrDescription = a});++instance FromJSON ReplicationRun where+ parseJSON+ = withObject "ReplicationRun"+ (\ x ->+ ReplicationRun' <$>+ (x .:? "state") <*> (x .:? "replicationRunId") <*>+ (x .:? "scheduledStartTime")+ <*> (x .:? "statusMessage")+ <*> (x .:? "completedTime")+ <*> (x .:? "amiId")+ <*> (x .:? "type")+ <*> (x .:? "description"))++instance Hashable ReplicationRun++instance NFData ReplicationRun++-- | Object representing a server+--+-- /See:/ 'server' smart constructor.+data Server = Server'+ { _sServerType :: !(Maybe ServerType)+ , _sServerId :: !(Maybe Text)+ , _sReplicationJobTerminated :: !(Maybe Bool)+ , _sVmServer :: !(Maybe VMServer)+ , _sReplicationJobId :: !(Maybe Text)+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'Server' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'sServerType' - Undocumented member.+--+-- * 'sServerId' - Undocumented member.+--+-- * 'sReplicationJobTerminated' - Undocumented member.+--+-- * 'sVmServer' - Undocumented member.+--+-- * 'sReplicationJobId' - Undocumented member.+server+ :: Server+server =+ Server'+ { _sServerType = Nothing+ , _sServerId = Nothing+ , _sReplicationJobTerminated = Nothing+ , _sVmServer = Nothing+ , _sReplicationJobId = Nothing+ }++-- | Undocumented member.+sServerType :: Lens' Server (Maybe ServerType)+sServerType = lens _sServerType (\ s a -> s{_sServerType = a});++-- | Undocumented member.+sServerId :: Lens' Server (Maybe Text)+sServerId = lens _sServerId (\ s a -> s{_sServerId = a});++-- | Undocumented member.+sReplicationJobTerminated :: Lens' Server (Maybe Bool)+sReplicationJobTerminated = lens _sReplicationJobTerminated (\ s a -> s{_sReplicationJobTerminated = a});++-- | Undocumented member.+sVmServer :: Lens' Server (Maybe VMServer)+sVmServer = lens _sVmServer (\ s a -> s{_sVmServer = a});++-- | Undocumented member.+sReplicationJobId :: Lens' Server (Maybe Text)+sReplicationJobId = lens _sReplicationJobId (\ s a -> s{_sReplicationJobId = a});++instance FromJSON Server where+ parseJSON+ = withObject "Server"+ (\ x ->+ Server' <$>+ (x .:? "serverType") <*> (x .:? "serverId") <*>+ (x .:? "replicationJobTerminated")+ <*> (x .:? "vmServer")+ <*> (x .:? "replicationJobId"))++instance Hashable Server++instance NFData Server++-- | Object representing a VM server+--+-- /See:/ 'vMServer' smart constructor.+data VMServer = VMServer'+ { _vmsVmManagerName :: !(Maybe Text)+ , _vmsVmManagerType :: !(Maybe VMManagerType)+ , _vmsVmServerAddress :: !(Maybe VMServerAddress)+ , _vmsVmName :: !(Maybe Text)+ , _vmsVmPath :: !(Maybe Text)+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'VMServer' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'vmsVmManagerName' - Undocumented member.+--+-- * 'vmsVmManagerType' - Undocumented member.+--+-- * 'vmsVmServerAddress' - Undocumented member.+--+-- * 'vmsVmName' - Undocumented member.+--+-- * 'vmsVmPath' - Undocumented member.+vMServer+ :: VMServer+vMServer =+ VMServer'+ { _vmsVmManagerName = Nothing+ , _vmsVmManagerType = Nothing+ , _vmsVmServerAddress = Nothing+ , _vmsVmName = Nothing+ , _vmsVmPath = Nothing+ }++-- | Undocumented member.+vmsVmManagerName :: Lens' VMServer (Maybe Text)+vmsVmManagerName = lens _vmsVmManagerName (\ s a -> s{_vmsVmManagerName = a});++-- | Undocumented member.+vmsVmManagerType :: Lens' VMServer (Maybe VMManagerType)+vmsVmManagerType = lens _vmsVmManagerType (\ s a -> s{_vmsVmManagerType = a});++-- | Undocumented member.+vmsVmServerAddress :: Lens' VMServer (Maybe VMServerAddress)+vmsVmServerAddress = lens _vmsVmServerAddress (\ s a -> s{_vmsVmServerAddress = a});++-- | Undocumented member.+vmsVmName :: Lens' VMServer (Maybe Text)+vmsVmName = lens _vmsVmName (\ s a -> s{_vmsVmName = a});++-- | Undocumented member.+vmsVmPath :: Lens' VMServer (Maybe Text)+vmsVmPath = lens _vmsVmPath (\ s a -> s{_vmsVmPath = a});++instance FromJSON VMServer where+ parseJSON+ = withObject "VMServer"+ (\ x ->+ VMServer' <$>+ (x .:? "vmManagerName") <*> (x .:? "vmManagerType")+ <*> (x .:? "vmServerAddress")+ <*> (x .:? "vmName")+ <*> (x .:? "vmPath"))++instance Hashable VMServer++instance NFData VMServer++-- | Object representing a server's location+--+-- /See:/ 'vMServerAddress' smart constructor.+data VMServerAddress = VMServerAddress'+ { _vmsaVmManagerId :: !(Maybe Text)+ , _vmsaVmId :: !(Maybe Text)+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'VMServerAddress' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'vmsaVmManagerId' - Undocumented member.+--+-- * 'vmsaVmId' - Undocumented member.+vMServerAddress+ :: VMServerAddress+vMServerAddress =+ VMServerAddress'+ { _vmsaVmManagerId = Nothing+ , _vmsaVmId = Nothing+ }++-- | Undocumented member.+vmsaVmManagerId :: Lens' VMServerAddress (Maybe Text)+vmsaVmManagerId = lens _vmsaVmManagerId (\ s a -> s{_vmsaVmManagerId = a});++-- | Undocumented member.+vmsaVmId :: Lens' VMServerAddress (Maybe Text)+vmsaVmId = lens _vmsaVmId (\ s a -> s{_vmsaVmId = a});++instance FromJSON VMServerAddress where+ parseJSON+ = withObject "VMServerAddress"+ (\ x ->+ VMServerAddress' <$>+ (x .:? "vmManagerId") <*> (x .:? "vmId"))++instance Hashable VMServerAddress++instance NFData VMServerAddress
+ gen/Network/AWS/SMS/Types/Sum.hs view
@@ -0,0 +1,290 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE OverloadedStrings #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.SMS.Types.Sum+-- Copyright : (c) 2013-2016 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+module Network.AWS.SMS.Types.Sum where++import Network.AWS.Prelude++-- | Capabilities for a Connector+data ConnectorCapability =+ CCVsphere+ deriving (Eq,Ord,Read,Show,Enum,Bounded,Data,Typeable,Generic)++instance FromText ConnectorCapability where+ parser = takeLowerText >>= \case+ "vsphere" -> pure CCVsphere+ e -> fromTextError $ "Failure parsing ConnectorCapability from value: '" <> e+ <> "'. Accepted values: vsphere"++instance ToText ConnectorCapability where+ toText = \case+ CCVsphere -> "VSPHERE"++instance Hashable ConnectorCapability+instance NFData ConnectorCapability+instance ToByteString ConnectorCapability+instance ToQuery ConnectorCapability+instance ToHeader ConnectorCapability++instance FromJSON ConnectorCapability where+ parseJSON = parseJSONText "ConnectorCapability"++-- | Status of on-premise Connector+data ConnectorStatus+ = Healthy+ | Unhealthy+ deriving (Eq,Ord,Read,Show,Enum,Bounded,Data,Typeable,Generic)++instance FromText ConnectorStatus where+ parser = takeLowerText >>= \case+ "healthy" -> pure Healthy+ "unhealthy" -> pure Unhealthy+ e -> fromTextError $ "Failure parsing ConnectorStatus from value: '" <> e+ <> "'. Accepted values: healthy, unhealthy"++instance ToText ConnectorStatus where+ toText = \case+ Healthy -> "HEALTHY"+ Unhealthy -> "UNHEALTHY"++instance Hashable ConnectorStatus+instance NFData ConnectorStatus+instance ToByteString ConnectorStatus+instance ToQuery ConnectorStatus+instance ToHeader ConnectorStatus++instance FromJSON ConnectorStatus where+ parseJSON = parseJSONText "ConnectorStatus"++-- | The license type to be used for the Amazon Machine Image (AMI) created after a successful ReplicationRun.+data LicenseType+ = AWS+ | Byol+ deriving (Eq,Ord,Read,Show,Enum,Bounded,Data,Typeable,Generic)++instance FromText LicenseType where+ parser = takeLowerText >>= \case+ "aws" -> pure AWS+ "byol" -> pure Byol+ e -> fromTextError $ "Failure parsing LicenseType from value: '" <> e+ <> "'. Accepted values: aws, byol"++instance ToText LicenseType where+ toText = \case+ AWS -> "AWS"+ Byol -> "BYOL"++instance Hashable LicenseType+instance NFData LicenseType+instance ToByteString LicenseType+instance ToQuery LicenseType+instance ToHeader LicenseType++instance ToJSON LicenseType where+ toJSON = toJSONText++instance FromJSON LicenseType where+ parseJSON = parseJSONText "LicenseType"++-- | Current state of Replication Job+data ReplicationJobState+ = RJSActive+ | RJSDeleted+ | RJSDeleting+ | RJSFailed+ | RJSPending+ deriving (Eq,Ord,Read,Show,Enum,Bounded,Data,Typeable,Generic)++instance FromText ReplicationJobState where+ parser = takeLowerText >>= \case+ "active" -> pure RJSActive+ "deleted" -> pure RJSDeleted+ "deleting" -> pure RJSDeleting+ "failed" -> pure RJSFailed+ "pending" -> pure RJSPending+ e -> fromTextError $ "Failure parsing ReplicationJobState from value: '" <> e+ <> "'. Accepted values: active, deleted, deleting, failed, pending"++instance ToText ReplicationJobState where+ toText = \case+ RJSActive -> "ACTIVE"+ RJSDeleted -> "DELETED"+ RJSDeleting -> "DELETING"+ RJSFailed -> "FAILED"+ RJSPending -> "PENDING"++instance Hashable ReplicationJobState+instance NFData ReplicationJobState+instance ToByteString ReplicationJobState+instance ToQuery ReplicationJobState+instance ToHeader ReplicationJobState++instance FromJSON ReplicationJobState where+ parseJSON = parseJSONText "ReplicationJobState"++-- | Current state of Replication Run+data ReplicationRunState+ = RRSActive+ | RRSCompleted+ | RRSDeleted+ | RRSDeleting+ | RRSFailed+ | RRSMissed+ | RRSPending+ deriving (Eq,Ord,Read,Show,Enum,Bounded,Data,Typeable,Generic)++instance FromText ReplicationRunState where+ parser = takeLowerText >>= \case+ "active" -> pure RRSActive+ "completed" -> pure RRSCompleted+ "deleted" -> pure RRSDeleted+ "deleting" -> pure RRSDeleting+ "failed" -> pure RRSFailed+ "missed" -> pure RRSMissed+ "pending" -> pure RRSPending+ e -> fromTextError $ "Failure parsing ReplicationRunState from value: '" <> e+ <> "'. Accepted values: active, completed, deleted, deleting, failed, missed, pending"++instance ToText ReplicationRunState where+ toText = \case+ RRSActive -> "ACTIVE"+ RRSCompleted -> "COMPLETED"+ RRSDeleted -> "DELETED"+ RRSDeleting -> "DELETING"+ RRSFailed -> "FAILED"+ RRSMissed -> "MISSED"+ RRSPending -> "PENDING"++instance Hashable ReplicationRunState+instance NFData ReplicationRunState+instance ToByteString ReplicationRunState+instance ToQuery ReplicationRunState+instance ToHeader ReplicationRunState++instance FromJSON ReplicationRunState where+ parseJSON = parseJSONText "ReplicationRunState"++-- | Type of Replication Run+data ReplicationRunType+ = Automatic+ | OnDemand+ deriving (Eq,Ord,Read,Show,Enum,Bounded,Data,Typeable,Generic)++instance FromText ReplicationRunType where+ parser = takeLowerText >>= \case+ "automatic" -> pure Automatic+ "on_demand" -> pure OnDemand+ e -> fromTextError $ "Failure parsing ReplicationRunType from value: '" <> e+ <> "'. Accepted values: automatic, on_demand"++instance ToText ReplicationRunType where+ toText = \case+ Automatic -> "AUTOMATIC"+ OnDemand -> "ON_DEMAND"++instance Hashable ReplicationRunType+instance NFData ReplicationRunType+instance ToByteString ReplicationRunType+instance ToQuery ReplicationRunType+instance ToHeader ReplicationRunType++instance FromJSON ReplicationRunType where+ parseJSON = parseJSONText "ReplicationRunType"++-- | Status of Server catalog+data ServerCatalogStatus+ = Available+ | Deleted+ | Expired+ | Importing+ | NotImported+ deriving (Eq,Ord,Read,Show,Enum,Bounded,Data,Typeable,Generic)++instance FromText ServerCatalogStatus where+ parser = takeLowerText >>= \case+ "available" -> pure Available+ "deleted" -> pure Deleted+ "expired" -> pure Expired+ "importing" -> pure Importing+ "not_imported" -> pure NotImported+ e -> fromTextError $ "Failure parsing ServerCatalogStatus from value: '" <> e+ <> "'. Accepted values: available, deleted, expired, importing, not_imported"++instance ToText ServerCatalogStatus where+ toText = \case+ Available -> "AVAILABLE"+ Deleted -> "DELETED"+ Expired -> "EXPIRED"+ Importing -> "IMPORTING"+ NotImported -> "NOT_IMPORTED"++instance Hashable ServerCatalogStatus+instance NFData ServerCatalogStatus+instance ToByteString ServerCatalogStatus+instance ToQuery ServerCatalogStatus+instance ToHeader ServerCatalogStatus++instance FromJSON ServerCatalogStatus where+ parseJSON = parseJSONText "ServerCatalogStatus"++-- | Type of server.+data ServerType =+ VirtualMachine+ deriving (Eq,Ord,Read,Show,Enum,Bounded,Data,Typeable,Generic)++instance FromText ServerType where+ parser = takeLowerText >>= \case+ "virtual_machine" -> pure VirtualMachine+ e -> fromTextError $ "Failure parsing ServerType from value: '" <> e+ <> "'. Accepted values: virtual_machine"++instance ToText ServerType where+ toText = \case+ VirtualMachine -> "VIRTUAL_MACHINE"++instance Hashable ServerType+instance NFData ServerType+instance ToByteString ServerType+instance ToQuery ServerType+instance ToHeader ServerType++instance FromJSON ServerType where+ parseJSON = parseJSONText "ServerType"++-- | VM Management Product+data VMManagerType =+ Vsphere+ deriving (Eq,Ord,Read,Show,Enum,Bounded,Data,Typeable,Generic)++instance FromText VMManagerType where+ parser = takeLowerText >>= \case+ "vsphere" -> pure Vsphere+ e -> fromTextError $ "Failure parsing VMManagerType from value: '" <> e+ <> "'. Accepted values: vsphere"++instance ToText VMManagerType where+ toText = \case+ Vsphere -> "VSPHERE"++instance Hashable VMManagerType+instance NFData VMManagerType+instance ToByteString VMManagerType+instance ToQuery VMManagerType+instance ToHeader VMManagerType++instance FromJSON VMManagerType where+ parseJSON = parseJSONText "VMManagerType"
+ gen/Network/AWS/SMS/UpdateReplicationJob.hs view
@@ -0,0 +1,175 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.SMS.UpdateReplicationJob+-- Copyright : (c) 2013-2016 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- The UpdateReplicationJob API is used to change the settings of your existing ReplicationJob created using CreateReplicationJob. Calling this API will affect the next scheduled ReplicationRun.+module Network.AWS.SMS.UpdateReplicationJob+ (+ -- * Creating a Request+ updateReplicationJob+ , UpdateReplicationJob+ -- * Request Lenses+ , urjFrequency+ , urjLicenseType+ , urjRoleName+ , urjNextReplicationRunStartTime+ , urjDescription+ , urjReplicationJobId++ -- * Destructuring the Response+ , updateReplicationJobResponse+ , UpdateReplicationJobResponse+ -- * Response Lenses+ , urjrsResponseStatus+ ) where++import Network.AWS.Lens+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response+import Network.AWS.SMS.Types+import Network.AWS.SMS.Types.Product++-- | /See:/ 'updateReplicationJob' smart constructor.+data UpdateReplicationJob = UpdateReplicationJob'+ { _urjFrequency :: !(Maybe Int)+ , _urjLicenseType :: !(Maybe LicenseType)+ , _urjRoleName :: !(Maybe Text)+ , _urjNextReplicationRunStartTime :: !(Maybe POSIX)+ , _urjDescription :: !(Maybe Text)+ , _urjReplicationJobId :: !Text+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'UpdateReplicationJob' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'urjFrequency' - Undocumented member.+--+-- * 'urjLicenseType' - Undocumented member.+--+-- * 'urjRoleName' - Undocumented member.+--+-- * 'urjNextReplicationRunStartTime' - Undocumented member.+--+-- * 'urjDescription' - Undocumented member.+--+-- * 'urjReplicationJobId' - Undocumented member.+updateReplicationJob+ :: Text -- ^ 'urjReplicationJobId'+ -> UpdateReplicationJob+updateReplicationJob pReplicationJobId_ =+ UpdateReplicationJob'+ { _urjFrequency = Nothing+ , _urjLicenseType = Nothing+ , _urjRoleName = Nothing+ , _urjNextReplicationRunStartTime = Nothing+ , _urjDescription = Nothing+ , _urjReplicationJobId = pReplicationJobId_+ }++-- | Undocumented member.+urjFrequency :: Lens' UpdateReplicationJob (Maybe Int)+urjFrequency = lens _urjFrequency (\ s a -> s{_urjFrequency = a});++-- | Undocumented member.+urjLicenseType :: Lens' UpdateReplicationJob (Maybe LicenseType)+urjLicenseType = lens _urjLicenseType (\ s a -> s{_urjLicenseType = a});++-- | Undocumented member.+urjRoleName :: Lens' UpdateReplicationJob (Maybe Text)+urjRoleName = lens _urjRoleName (\ s a -> s{_urjRoleName = a});++-- | Undocumented member.+urjNextReplicationRunStartTime :: Lens' UpdateReplicationJob (Maybe UTCTime)+urjNextReplicationRunStartTime = lens _urjNextReplicationRunStartTime (\ s a -> s{_urjNextReplicationRunStartTime = a}) . mapping _Time;++-- | Undocumented member.+urjDescription :: Lens' UpdateReplicationJob (Maybe Text)+urjDescription = lens _urjDescription (\ s a -> s{_urjDescription = a});++-- | Undocumented member.+urjReplicationJobId :: Lens' UpdateReplicationJob Text+urjReplicationJobId = lens _urjReplicationJobId (\ s a -> s{_urjReplicationJobId = a});++instance AWSRequest UpdateReplicationJob where+ type Rs UpdateReplicationJob =+ UpdateReplicationJobResponse+ request = postJSON sms+ response+ = receiveEmpty+ (\ s h x ->+ UpdateReplicationJobResponse' <$>+ (pure (fromEnum s)))++instance Hashable UpdateReplicationJob++instance NFData UpdateReplicationJob++instance ToHeaders UpdateReplicationJob where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("AWSServerMigrationService_V2016_10_24.UpdateReplicationJob"+ :: ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON UpdateReplicationJob where+ toJSON UpdateReplicationJob'{..}+ = object+ (catMaybes+ [("frequency" .=) <$> _urjFrequency,+ ("licenseType" .=) <$> _urjLicenseType,+ ("roleName" .=) <$> _urjRoleName,+ ("nextReplicationRunStartTime" .=) <$>+ _urjNextReplicationRunStartTime,+ ("description" .=) <$> _urjDescription,+ Just ("replicationJobId" .= _urjReplicationJobId)])++instance ToPath UpdateReplicationJob where+ toPath = const "/"++instance ToQuery UpdateReplicationJob where+ toQuery = const mempty++-- | /See:/ 'updateReplicationJobResponse' smart constructor.+newtype UpdateReplicationJobResponse = UpdateReplicationJobResponse'+ { _urjrsResponseStatus :: Int+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'UpdateReplicationJobResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'urjrsResponseStatus' - -- | The response status code.+updateReplicationJobResponse+ :: Int -- ^ 'urjrsResponseStatus'+ -> UpdateReplicationJobResponse+updateReplicationJobResponse pResponseStatus_ =+ UpdateReplicationJobResponse'+ { _urjrsResponseStatus = pResponseStatus_+ }++-- | -- | The response status code.+urjrsResponseStatus :: Lens' UpdateReplicationJobResponse Int+urjrsResponseStatus = lens _urjrsResponseStatus (\ s a -> s{_urjrsResponseStatus = a});++instance NFData UpdateReplicationJobResponse
+ gen/Network/AWS/SMS/Waiters.hs view
@@ -0,0 +1,21 @@+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.SMS.Waiters+-- Copyright : (c) 2013-2016 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+module Network.AWS.SMS.Waiters where++import Network.AWS.Lens+import Network.AWS.Prelude+import Network.AWS.SMS.Types+import Network.AWS.Waiter
+ src/.gitkeep view
+ test/Main.hs view
@@ -0,0 +1,21 @@+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- |+-- Module : Main+-- Copyright : (c) 2013-2016 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+module Main (main) where++import Test.Tasty+import Test.AWS.SMS+import Test.AWS.SMS.Internal++main :: IO ()+main = defaultMain $ testGroup "SMS"+ [ testGroup "tests" tests+ , testGroup "fixtures" fixtures+ ]
+ test/Test/AWS/Gen/SMS.hs view
@@ -0,0 +1,237 @@+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-orphans #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Test.AWS.Gen.SMS+-- Copyright : (c) 2013-2016 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+module Test.AWS.Gen.SMS where++import Data.Proxy+import Test.AWS.Fixture+import Test.AWS.Prelude+import Test.Tasty+import Network.AWS.SMS+import Test.AWS.SMS.Internal++-- Auto-generated: the actual test selection needs to be manually placed into+-- the top-level so that real test data can be incrementally added.+--+-- This commented snippet is what the entire set should look like:++-- fixtures :: TestTree+-- fixtures =+-- [ testGroup "request"+-- [ requestDeleteServerCatalog $+-- deleteServerCatalog+--+-- , requestGetReplicationRuns $+-- getReplicationRuns+--+-- , requestGetServers $+-- getServers+--+-- , requestImportServerCatalog $+-- importServerCatalog+--+-- , requestGetConnectors $+-- getConnectors+--+-- , requestGetReplicationJobs $+-- getReplicationJobs+--+-- , requestDisassociateConnector $+-- disassociateConnector+--+-- , requestCreateReplicationJob $+-- createReplicationJob+--+-- , requestUpdateReplicationJob $+-- updateReplicationJob+--+-- , requestDeleteReplicationJob $+-- deleteReplicationJob+--+-- , requestStartOnDemandReplicationRun $+-- startOnDemandReplicationRun+--+-- ]++-- , testGroup "response"+-- [ responseDeleteServerCatalog $+-- deleteServerCatalogResponse+--+-- , responseGetReplicationRuns $+-- getReplicationRunsResponse+--+-- , responseGetServers $+-- getServersResponse+--+-- , responseImportServerCatalog $+-- importServerCatalogResponse+--+-- , responseGetConnectors $+-- getConnectorsResponse+--+-- , responseGetReplicationJobs $+-- getReplicationJobsResponse+--+-- , responseDisassociateConnector $+-- disassociateConnectorResponse+--+-- , responseCreateReplicationJob $+-- createReplicationJobResponse+--+-- , responseUpdateReplicationJob $+-- updateReplicationJobResponse+--+-- , responseDeleteReplicationJob $+-- deleteReplicationJobResponse+--+-- , responseStartOnDemandReplicationRun $+-- startOnDemandReplicationRunResponse+--+-- ]+-- ]++-- Requests++requestDeleteServerCatalog :: DeleteServerCatalog -> TestTree+requestDeleteServerCatalog = req+ "DeleteServerCatalog"+ "fixture/DeleteServerCatalog.yaml"++requestGetReplicationRuns :: GetReplicationRuns -> TestTree+requestGetReplicationRuns = req+ "GetReplicationRuns"+ "fixture/GetReplicationRuns.yaml"++requestGetServers :: GetServers -> TestTree+requestGetServers = req+ "GetServers"+ "fixture/GetServers.yaml"++requestImportServerCatalog :: ImportServerCatalog -> TestTree+requestImportServerCatalog = req+ "ImportServerCatalog"+ "fixture/ImportServerCatalog.yaml"++requestGetConnectors :: GetConnectors -> TestTree+requestGetConnectors = req+ "GetConnectors"+ "fixture/GetConnectors.yaml"++requestGetReplicationJobs :: GetReplicationJobs -> TestTree+requestGetReplicationJobs = req+ "GetReplicationJobs"+ "fixture/GetReplicationJobs.yaml"++requestDisassociateConnector :: DisassociateConnector -> TestTree+requestDisassociateConnector = req+ "DisassociateConnector"+ "fixture/DisassociateConnector.yaml"++requestCreateReplicationJob :: CreateReplicationJob -> TestTree+requestCreateReplicationJob = req+ "CreateReplicationJob"+ "fixture/CreateReplicationJob.yaml"++requestUpdateReplicationJob :: UpdateReplicationJob -> TestTree+requestUpdateReplicationJob = req+ "UpdateReplicationJob"+ "fixture/UpdateReplicationJob.yaml"++requestDeleteReplicationJob :: DeleteReplicationJob -> TestTree+requestDeleteReplicationJob = req+ "DeleteReplicationJob"+ "fixture/DeleteReplicationJob.yaml"++requestStartOnDemandReplicationRun :: StartOnDemandReplicationRun -> TestTree+requestStartOnDemandReplicationRun = req+ "StartOnDemandReplicationRun"+ "fixture/StartOnDemandReplicationRun.yaml"++-- Responses++responseDeleteServerCatalog :: DeleteServerCatalogResponse -> TestTree+responseDeleteServerCatalog = res+ "DeleteServerCatalogResponse"+ "fixture/DeleteServerCatalogResponse.proto"+ sms+ (Proxy :: Proxy DeleteServerCatalog)++responseGetReplicationRuns :: GetReplicationRunsResponse -> TestTree+responseGetReplicationRuns = res+ "GetReplicationRunsResponse"+ "fixture/GetReplicationRunsResponse.proto"+ sms+ (Proxy :: Proxy GetReplicationRuns)++responseGetServers :: GetServersResponse -> TestTree+responseGetServers = res+ "GetServersResponse"+ "fixture/GetServersResponse.proto"+ sms+ (Proxy :: Proxy GetServers)++responseImportServerCatalog :: ImportServerCatalogResponse -> TestTree+responseImportServerCatalog = res+ "ImportServerCatalogResponse"+ "fixture/ImportServerCatalogResponse.proto"+ sms+ (Proxy :: Proxy ImportServerCatalog)++responseGetConnectors :: GetConnectorsResponse -> TestTree+responseGetConnectors = res+ "GetConnectorsResponse"+ "fixture/GetConnectorsResponse.proto"+ sms+ (Proxy :: Proxy GetConnectors)++responseGetReplicationJobs :: GetReplicationJobsResponse -> TestTree+responseGetReplicationJobs = res+ "GetReplicationJobsResponse"+ "fixture/GetReplicationJobsResponse.proto"+ sms+ (Proxy :: Proxy GetReplicationJobs)++responseDisassociateConnector :: DisassociateConnectorResponse -> TestTree+responseDisassociateConnector = res+ "DisassociateConnectorResponse"+ "fixture/DisassociateConnectorResponse.proto"+ sms+ (Proxy :: Proxy DisassociateConnector)++responseCreateReplicationJob :: CreateReplicationJobResponse -> TestTree+responseCreateReplicationJob = res+ "CreateReplicationJobResponse"+ "fixture/CreateReplicationJobResponse.proto"+ sms+ (Proxy :: Proxy CreateReplicationJob)++responseUpdateReplicationJob :: UpdateReplicationJobResponse -> TestTree+responseUpdateReplicationJob = res+ "UpdateReplicationJobResponse"+ "fixture/UpdateReplicationJobResponse.proto"+ sms+ (Proxy :: Proxy UpdateReplicationJob)++responseDeleteReplicationJob :: DeleteReplicationJobResponse -> TestTree+responseDeleteReplicationJob = res+ "DeleteReplicationJobResponse"+ "fixture/DeleteReplicationJobResponse.proto"+ sms+ (Proxy :: Proxy DeleteReplicationJob)++responseStartOnDemandReplicationRun :: StartOnDemandReplicationRunResponse -> TestTree+responseStartOnDemandReplicationRun = res+ "StartOnDemandReplicationRunResponse"+ "fixture/StartOnDemandReplicationRunResponse.proto"+ sms+ (Proxy :: Proxy StartOnDemandReplicationRun)
+ test/Test/AWS/SMS.hs view
@@ -0,0 +1,20 @@+-- |+-- Module : Test.AWS.SMS+-- Copyright : (c) 2013-2016 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+module Test.AWS.SMS+ ( tests+ , fixtures+ ) where++import Test.Tasty (TestTree)++tests :: [TestTree]+tests = []++fixtures :: [TestTree]+fixtures = []
+ test/Test/AWS/SMS/Internal.hs view
@@ -0,0 +1,9 @@+-- |+-- Module : Test.AWS.SMS.Internal+-- Copyright : (c) 2013-2016 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+module Test.AWS.SMS.Internal where