packages feed

amazonka-workspaces (empty) → 0.3.4

raw patch · 13 files changed

+2586/−0 lines, 13 filesdep +amazonka-coredep +basesetup-changed

Dependencies added: amazonka-core, base

Files

+ LICENSE view
@@ -0,0 +1,373 @@+Mozilla Public License Version 2.0+==================================++1. Definitions+--------------++1.1. "Contributor"+    means each individual or legal entity that creates, contributes to+    the creation of, or owns Covered Software.++1.2. "Contributor Version"+    means the combination of the Contributions of others (if any) used+    by a Contributor and that particular Contributor's Contribution.++1.3. "Contribution"+    means Covered Software of a particular Contributor.++1.4. "Covered Software"+    means Source Code Form to which the initial Contributor has attached+    the notice in Exhibit A, the Executable Form of such Source Code+    Form, and Modifications of such Source Code Form, in each case+    including portions thereof.++1.5. "Incompatible With Secondary Licenses"+    means++    (a) that the initial Contributor has attached the notice described+        in Exhibit B to the Covered Software; or++    (b) that the Covered Software was made available under the terms of+        version 1.1 or earlier of the License, but not also under the+        terms of a Secondary License.++1.6. "Executable Form"+    means any form of the work other than Source Code Form.++1.7. "Larger Work"+    means a work that combines Covered Software with other material, in+    a separate file or files, that is not Covered Software.++1.8. "License"+    means this document.++1.9. "Licensable"+    means having the right to grant, to the maximum extent possible,+    whether at the time of the initial grant or subsequently, any and+    all of the rights conveyed by this License.++1.10. "Modifications"+    means any of the following:++    (a) any file in Source Code Form that results from an addition to,+        deletion from, or modification of the contents of Covered+        Software; or++    (b) any new file in Source Code Form that contains any Covered+        Software.++1.11. "Patent Claims" of a Contributor+    means any patent claim(s), including without limitation, method,+    process, and apparatus claims, in any patent Licensable by such+    Contributor that would be infringed, but for the grant of the+    License, by the making, using, selling, offering for sale, having+    made, import, or transfer of either its Contributions or its+    Contributor Version.++1.12. "Secondary License"+    means either the GNU General Public License, Version 2.0, the GNU+    Lesser General Public License, Version 2.1, the GNU Affero General+    Public License, Version 3.0, or any later versions of those+    licenses.++1.13. "Source Code Form"+    means the form of the work preferred for making modifications.++1.14. "You" (or "Your")+    means an individual or a legal entity exercising rights under this+    License. For legal entities, "You" includes any entity that+    controls, is controlled by, or is under common control with You. For+    purposes of this definition, "control" means (a) the power, direct+    or indirect, to cause the direction or management of such entity,+    whether by contract or otherwise, or (b) ownership of more than+    fifty percent (50%) of the outstanding shares or beneficial+    ownership of such entity.++2. License Grants and Conditions+--------------------------------++2.1. Grants++Each Contributor hereby grants You a world-wide, royalty-free,+non-exclusive license:++(a) under intellectual property rights (other than patent or trademark)+    Licensable by such Contributor to use, reproduce, make available,+    modify, display, perform, distribute, and otherwise exploit its+    Contributions, either on an unmodified basis, with Modifications, or+    as part of a Larger Work; and++(b) under Patent Claims of such Contributor to make, use, sell, offer+    for sale, have made, import, and otherwise transfer either its+    Contributions or its Contributor Version.++2.2. Effective Date++The licenses granted in Section 2.1 with respect to any Contribution+become effective for each Contribution on the date the Contributor first+distributes such Contribution.++2.3. Limitations on Grant Scope++The licenses granted in this Section 2 are the only rights granted under+this License. No additional rights or licenses will be implied from the+distribution or licensing of Covered Software under this License.+Notwithstanding Section 2.1(b) above, no patent license is granted by a+Contributor:++(a) for any code that a Contributor has removed from Covered Software;+    or++(b) for infringements caused by: (i) Your and any other third party's+    modifications of Covered Software, or (ii) the combination of its+    Contributions with other software (except as part of its Contributor+    Version); or++(c) under Patent Claims infringed by Covered Software in the absence of+    its Contributions.++This License does not grant any rights in the trademarks, service marks,+or logos of any Contributor (except as may be necessary to comply with+the notice requirements in Section 3.4).++2.4. Subsequent Licenses++No Contributor makes additional grants as a result of Your choice to+distribute the Covered Software under a subsequent version of this+License (see Section 10.2) or under the terms of a Secondary License (if+permitted under the terms of Section 3.3).++2.5. Representation++Each Contributor represents that the Contributor believes its+Contributions are its original creation(s) or it has sufficient rights+to grant the rights to its Contributions conveyed by this License.++2.6. Fair Use++This License is not intended to limit any rights You have under+applicable copyright doctrines of fair use, fair dealing, or other+equivalents.++2.7. Conditions++Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted+in Section 2.1.++3. Responsibilities+-------------------++3.1. Distribution of Source Form++All distribution of Covered Software in Source Code Form, including any+Modifications that You create or to which You contribute, must be under+the terms of this License. You must inform recipients that the Source+Code Form of the Covered Software is governed by the terms of this+License, and how they can obtain a copy of this License. You may not+attempt to alter or restrict the recipients' rights in the Source Code+Form.++3.2. Distribution of Executable Form++If You distribute Covered Software in Executable Form then:++(a) such Covered Software must also be made available in Source Code+    Form, as described in Section 3.1, and You must inform recipients of+    the Executable Form how they can obtain a copy of such Source Code+    Form by reasonable means in a timely manner, at a charge no more+    than the cost of distribution to the recipient; and++(b) You may distribute such Executable Form under the terms of this+    License, or sublicense it under different terms, provided that the+    license for the Executable Form does not attempt to limit or alter+    the recipients' rights in the Source Code Form under this License.++3.3. Distribution of a Larger Work++You may create and distribute a Larger Work under terms of Your choice,+provided that You also comply with the requirements of this License for+the Covered Software. If the Larger Work is a combination of Covered+Software with a work governed by one or more Secondary Licenses, and the+Covered Software is not Incompatible With Secondary Licenses, this+License permits You to additionally distribute such Covered Software+under the terms of such Secondary License(s), so that the recipient of+the Larger Work may, at their option, further distribute the Covered+Software under the terms of either this License or such Secondary+License(s).++3.4. Notices++You may not remove or alter the substance of any license notices+(including copyright notices, patent notices, disclaimers of warranty,+or limitations of liability) contained within the Source Code Form of+the Covered Software, except that You may alter any license notices to+the extent required to remedy known factual inaccuracies.++3.5. Application of Additional Terms++You may choose to offer, and to charge a fee for, warranty, support,+indemnity or liability obligations to one or more recipients of Covered+Software. However, You may do so only on Your own behalf, and not on+behalf of any Contributor. You must make it absolutely clear that any+such warranty, support, indemnity, or liability obligation is offered by+You alone, and You hereby agree to indemnify every Contributor for any+liability incurred by such Contributor as a result of warranty, support,+indemnity or liability terms You offer. You may include additional+disclaimers of warranty and limitations of liability specific to any+jurisdiction.++4. Inability to Comply Due to Statute or Regulation+---------------------------------------------------++If it is impossible for You to comply with any of the terms of this+License with respect to some or all of the Covered Software due to+statute, judicial order, or regulation then You must: (a) comply with+the terms of this License to the maximum extent possible; and (b)+describe the limitations and the code they affect. Such description must+be placed in a text file included with all distributions of the Covered+Software under this License. Except to the extent prohibited by statute+or regulation, such description must be sufficiently detailed for a+recipient of ordinary skill to be able to understand it.++5. Termination+--------------++5.1. The rights granted under this License will terminate automatically+if You fail to comply with any of its terms. However, if You become+compliant, then the rights granted under this License from a particular+Contributor are reinstated (a) provisionally, unless and until such+Contributor explicitly and finally terminates Your grants, and (b) on an+ongoing basis, if such Contributor fails to notify You of the+non-compliance by some reasonable means prior to 60 days after You have+come back into compliance. Moreover, Your grants from a particular+Contributor are reinstated on an ongoing basis if such Contributor+notifies You of the non-compliance by some reasonable means, this is the+first time You have received notice of non-compliance with this License+from such Contributor, and You become compliant prior to 30 days after+Your receipt of the notice.++5.2. If You initiate litigation against any entity by asserting a patent+infringement claim (excluding declaratory judgment actions,+counter-claims, and cross-claims) alleging that a Contributor Version+directly or indirectly infringes any patent, then the rights granted to+You by any and all Contributors for the Covered Software under Section+2.1 of this License shall terminate.++5.3. In the event of termination under Sections 5.1 or 5.2 above, all+end user license agreements (excluding distributors and resellers) which+have been validly granted by You or Your distributors under this License+prior to termination shall survive termination.++************************************************************************+*                                                                      *+*  6. Disclaimer of Warranty                                           *+*  -------------------------                                           *+*                                                                      *+*  Covered Software is provided under this License on an "as is"       *+*  basis, without warranty of any kind, either expressed, implied, or  *+*  statutory, including, without limitation, warranties that the       *+*  Covered Software is free of defects, merchantable, fit for a        *+*  particular purpose or non-infringing. The entire risk as to the     *+*  quality and performance of the Covered Software is with You.        *+*  Should any Covered Software prove defective in any respect, You     *+*  (not any Contributor) assume the cost of any necessary servicing,   *+*  repair, or correction. This disclaimer of warranty constitutes an   *+*  essential part of this License. No use of any Covered Software is   *+*  authorized under this License except under this disclaimer.         *+*                                                                      *+************************************************************************++************************************************************************+*                                                                      *+*  7. Limitation of Liability                                          *+*  --------------------------                                          *+*                                                                      *+*  Under no circumstances and under no legal theory, whether tort      *+*  (including negligence), contract, or otherwise, shall any           *+*  Contributor, or anyone who distributes Covered Software as          *+*  permitted above, be liable to You for any direct, indirect,         *+*  special, incidental, or consequential damages of any character      *+*  including, without limitation, damages for lost profits, loss of    *+*  goodwill, work stoppage, computer failure or malfunction, or any    *+*  and all other commercial damages or losses, even if such party      *+*  shall have been informed of the possibility of such damages. This   *+*  limitation of liability shall not apply to liability for death or   *+*  personal injury resulting from such party's negligence to the       *+*  extent applicable law prohibits such limitation. Some               *+*  jurisdictions do not allow the exclusion or limitation of           *+*  incidental or consequential damages, so this exclusion and          *+*  limitation may not apply to You.                                    *+*                                                                      *+************************************************************************++8. Litigation+-------------++Any litigation relating to this License may be brought only in the+courts of a jurisdiction where the defendant maintains its principal+place of business and such litigation shall be governed by laws of that+jurisdiction, without reference to its conflict-of-law provisions.+Nothing in this Section shall prevent a party's ability to bring+cross-claims or counter-claims.++9. Miscellaneous+----------------++This License represents the complete agreement concerning the subject+matter hereof. If any provision of this License is held to be+unenforceable, such provision shall be reformed only to the extent+necessary to make it enforceable. Any law or regulation which provides+that the language of a contract shall be construed against the drafter+shall not be used to construe this License against a Contributor.++10. Versions of the License+---------------------------++10.1. New Versions++Mozilla Foundation is the license steward. Except as provided in Section+10.3, no one other than the license steward has the right to modify or+publish new versions of this License. Each version will be given a+distinguishing version number.++10.2. Effect of New Versions++You may distribute the Covered Software under the terms of the version+of the License under which You originally received the Covered Software,+or under the terms of any subsequent version published by the license+steward.++10.3. Modified Versions++If you create software not governed by this License, and you want to+create a new license for such software, you may create and use a+modified version of this License if you rename the license and remove+any references to the name of the license steward (except to note that+such modified license differs from this License).++10.4. Distributing Source Code Form that is Incompatible With Secondary+Licenses++If You choose to distribute Source Code Form that is Incompatible With+Secondary Licenses under the terms of this version of the License, the+notice described in Exhibit B of this License must be attached.++Exhibit A - Source Code Form License Notice+-------------------------------------------++  This Source Code Form is subject to the terms of the Mozilla Public+  License, v. 2.0. If a copy of the MPL was not distributed with this+  file, You can obtain one at http://mozilla.org/MPL/2.0/.++If it is not possible or desirable to put the notice in a particular+file, then You may include the notice in a location (such as a LICENSE+file in a relevant directory) where a recipient would be likely to look+for such a notice.++You may add additional accurate notices of copyright ownership.++Exhibit B - "Incompatible With Secondary Licenses" Notice+---------------------------------------------------------++  This Source Code Form is "Incompatible With Secondary Licenses", as+  defined by the Mozilla Public License, v. 2.0.
+ README.md view
@@ -0,0 +1,33 @@+# Amazon WorkSpaces SDK++> _Warning:_ This is an experimental preview release which is still under heavy development and not intended for public consumption, _caveat emptor_!++* [Description](#description)+* [Contribute](#contribute)+* [Licence](#licence)++## Description++Amazon WorkSpaces offers you an easy way to provide a cloud-based desktop+experience to your end-users. You simply select from a choice of bundles that+offer a range of different amounts of CPU, memory, storage, and a choice of+applications. Users can connect from a PC, Mac desktop computer, iPad,+Kindle, or Android tablet.++Documentation is available via [Hackage](http://hackage.haskell.org/package/amazonka-workspaces)+and the [AWS API Reference](http://docs.aws.amazon.com/workspaces/latest/devguide/welcome.html).+++## Contribute++For any problems, comments, or feedback please create an issue [here on GitHub](https://github.com/brendanhay/amazonka/issues).++> _Note:_ this library is an auto-generated Haskell package. Please see `amazonka-gen` for more information.+++## Licence++`amazonka-workspaces` 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-workspaces.cabal view
@@ -0,0 +1,53 @@+name:                  amazonka-workspaces+version:               0.3.4+synopsis:              Amazon WorkSpaces SDK.+homepage:              https://github.com/brendanhay/amazonka+license:               OtherLicense+license-file:          LICENSE+author:                Brendan Hay+maintainer:            Brendan Hay <brendan.g.hay@gmail.com>+copyright:             Copyright (c) 2013-2014 Brendan Hay+category:              Network, AWS, Cloud, Distributed Computing+build-type:            Simple+extra-source-files:    README.md+cabal-version:         >= 1.10++description:+    Amazon WorkSpaces offers you an easy way to provide a cloud-based desktop+    experience to your end-users. You simply select from a choice of bundles that+    offer a range of different amounts of CPU, memory, storage, and a choice of+    applications. Users can connect from a PC, Mac desktop computer, iPad,+    Kindle, or Android tablet.++    .+    /See:/ <http://docs.aws.amazon.com/workspaces/latest/devguide/welcome.html AWS API Reference>+    .+    /Warning:/ This is an experimental preview release which is still under+    heavy development and not intended for public consumption, caveat emptor!++source-repository head+    type:     git+    location: git://github.com/brendanhay/amazonka.git++library+    default-language:  Haskell2010+    hs-source-dirs:    src gen++    ghc-options:       -Wall++    exposed-modules:+          Network.AWS.WorkSpaces+        , Network.AWS.WorkSpaces.CreateWorkspaces+        , Network.AWS.WorkSpaces.DescribeWorkspaceBundles+        , Network.AWS.WorkSpaces.DescribeWorkspaceDirectories+        , Network.AWS.WorkSpaces.DescribeWorkspaces+        , Network.AWS.WorkSpaces.RebootWorkspaces+        , Network.AWS.WorkSpaces.RebuildWorkspaces+        , Network.AWS.WorkSpaces.TerminateWorkspaces+        , Network.AWS.WorkSpaces.Types++    other-modules:++    build-depends:+          amazonka-core == 0.3.4.*+        , base          >= 4.7     && < 5
+ gen/Network/AWS/WorkSpaces.hs view
@@ -0,0 +1,36 @@+-- Module      : Network.AWS.WorkSpaces+-- Copyright   : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>+-- License     : This Source Code Form is subject to the terms of+--               the Mozilla Public License, v. 2.0.+--               A copy of the MPL can be found in the LICENSE file or+--               you can obtain it at http://mozilla.org/MPL/2.0/.+-- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability   : experimental+-- Portability : non-portable (GHC extensions)+--+-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- | Amazon WorkSpaces offers you an easy way to provide a cloud-based desktop+-- experience to your end-users. You simply select from a choice of bundles that+-- offer a range of different amounts of CPU, memory, storage, and a choice of+-- applications. Users can connect from a PC, Mac desktop computer, iPad,+-- Kindle, or Android tablet.+module Network.AWS.WorkSpaces+    ( module Network.AWS.WorkSpaces.CreateWorkspaces+    , module Network.AWS.WorkSpaces.DescribeWorkspaceBundles+    , module Network.AWS.WorkSpaces.DescribeWorkspaceDirectories+    , module Network.AWS.WorkSpaces.DescribeWorkspaces+    , module Network.AWS.WorkSpaces.RebootWorkspaces+    , module Network.AWS.WorkSpaces.RebuildWorkspaces+    , module Network.AWS.WorkSpaces.TerminateWorkspaces+    , module Network.AWS.WorkSpaces.Types+    ) where++import Network.AWS.WorkSpaces.CreateWorkspaces+import Network.AWS.WorkSpaces.DescribeWorkspaceBundles+import Network.AWS.WorkSpaces.DescribeWorkspaceDirectories+import Network.AWS.WorkSpaces.DescribeWorkspaces+import Network.AWS.WorkSpaces.RebootWorkspaces+import Network.AWS.WorkSpaces.RebuildWorkspaces+import Network.AWS.WorkSpaces.TerminateWorkspaces+import Network.AWS.WorkSpaces.Types
+ gen/Network/AWS/WorkSpaces/CreateWorkspaces.hs view
@@ -0,0 +1,136 @@+{-# LANGUAGE DataKinds                   #-}+{-# LANGUAGE DeriveGeneric               #-}+{-# LANGUAGE FlexibleInstances           #-}+{-# LANGUAGE GeneralizedNewtypeDeriving  #-}+{-# LANGUAGE LambdaCase                  #-}+{-# LANGUAGE NoImplicitPrelude           #-}+{-# LANGUAGE OverloadedStrings           #-}+{-# LANGUAGE RecordWildCards             #-}+{-# LANGUAGE TypeFamilies                #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Module      : Network.AWS.WorkSpaces.CreateWorkspaces+-- Copyright   : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>+-- License     : This Source Code Form is subject to the terms of+--               the Mozilla Public License, v. 2.0.+--               A copy of the MPL can be found in the LICENSE file or+--               you can obtain it at http://mozilla.org/MPL/2.0/.+-- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability   : experimental+-- Portability : non-portable (GHC extensions)+--+-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- | Creates one or more WorkSpaces.+--+-- This operation is asynchronous and returns before the WorkSpaces are+-- created.+--+--+--+-- <http://docs.aws.amazon.com/workspaces/latest/devguide/API_CreateWorkspaces.html>+module Network.AWS.WorkSpaces.CreateWorkspaces+    (+    -- * Request+      CreateWorkspaces+    -- ** Request constructor+    , createWorkspaces+    -- ** Request lenses+    , cwWorkspaces++    -- * Response+    , CreateWorkspacesResponse+    -- ** Response constructor+    , createWorkspacesResponse+    -- ** Response lenses+    , cwrFailedRequests+    , cwrPendingRequests+    ) where++import Network.AWS.Data (Object)+import Network.AWS.Prelude+import Network.AWS.Request.JSON+import Network.AWS.WorkSpaces.Types+import qualified GHC.Exts++newtype CreateWorkspaces = CreateWorkspaces+    { _cwWorkspaces :: List1 "Workspaces" WorkspaceRequest+    } deriving (Eq, Read, Show, Semigroup)++-- | 'CreateWorkspaces' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'cwWorkspaces' @::@ 'NonEmpty' 'WorkspaceRequest'+--+createWorkspaces :: NonEmpty WorkspaceRequest -- ^ 'cwWorkspaces'+                 -> CreateWorkspaces+createWorkspaces p1 = CreateWorkspaces+    { _cwWorkspaces = withIso _List1 (const id) p1+    }++-- | An array of structures that specify the WorkSpaces to create.+cwWorkspaces :: Lens' CreateWorkspaces (NonEmpty WorkspaceRequest)+cwWorkspaces = lens _cwWorkspaces (\s a -> s { _cwWorkspaces = a }) . _List1++data CreateWorkspacesResponse = CreateWorkspacesResponse+    { _cwrFailedRequests  :: List "FailedRequests" FailedCreateWorkspaceRequest+    , _cwrPendingRequests :: List "PendingRequests" Workspace+    } deriving (Eq, Read, Show)++-- | 'CreateWorkspacesResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'cwrFailedRequests' @::@ ['FailedCreateWorkspaceRequest']+--+-- * 'cwrPendingRequests' @::@ ['Workspace']+--+createWorkspacesResponse :: CreateWorkspacesResponse+createWorkspacesResponse = CreateWorkspacesResponse+    { _cwrFailedRequests  = mempty+    , _cwrPendingRequests = mempty+    }++-- | An array of structures that represent the WorkSpaces that could not be+-- created.+cwrFailedRequests :: Lens' CreateWorkspacesResponse [FailedCreateWorkspaceRequest]+cwrFailedRequests =+    lens _cwrFailedRequests (\s a -> s { _cwrFailedRequests = a })+        . _List++-- | An array of structures that represent the WorkSpaces that were created.+--+-- Because this operation is asynchronous, the identifier in 'WorkspaceId' is not+-- immediately available. If you immediately call 'DescribeWorkspaces' with this+-- identifier, no information will be returned.+cwrPendingRequests :: Lens' CreateWorkspacesResponse [Workspace]+cwrPendingRequests =+    lens _cwrPendingRequests (\s a -> s { _cwrPendingRequests = a })+        . _List++instance ToPath CreateWorkspaces where+    toPath = const "/"++instance ToQuery CreateWorkspaces where+    toQuery = const mempty++instance ToHeaders CreateWorkspaces++instance ToJSON CreateWorkspaces where+    toJSON CreateWorkspaces{..} = object+        [ "Workspaces" .= _cwWorkspaces+        ]++instance AWSRequest CreateWorkspaces where+    type Sv CreateWorkspaces = WorkSpaces+    type Rs CreateWorkspaces = CreateWorkspacesResponse++    request  = post "CreateWorkspaces"+    response = jsonResponse++instance FromJSON CreateWorkspacesResponse where+    parseJSON = withObject "CreateWorkspacesResponse" $ \o -> CreateWorkspacesResponse+        <$> o .:? "FailedRequests" .!= mempty+        <*> o .:? "PendingRequests" .!= mempty
+ gen/Network/AWS/WorkSpaces/DescribeWorkspaceBundles.hs view
@@ -0,0 +1,160 @@+{-# LANGUAGE DataKinds                   #-}+{-# LANGUAGE DeriveGeneric               #-}+{-# LANGUAGE FlexibleInstances           #-}+{-# LANGUAGE GeneralizedNewtypeDeriving  #-}+{-# LANGUAGE LambdaCase                  #-}+{-# LANGUAGE NoImplicitPrelude           #-}+{-# LANGUAGE OverloadedStrings           #-}+{-# LANGUAGE RecordWildCards             #-}+{-# LANGUAGE TypeFamilies                #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Module      : Network.AWS.WorkSpaces.DescribeWorkspaceBundles+-- Copyright   : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>+-- License     : This Source Code Form is subject to the terms of+--               the Mozilla Public License, v. 2.0.+--               A copy of the MPL can be found in the LICENSE file or+--               you can obtain it at http://mozilla.org/MPL/2.0/.+-- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability   : experimental+-- Portability : non-portable (GHC extensions)+--+-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- | Obtains information about the WorkSpace bundles that are available to your+-- account in the specified region.+--+-- You can filter the results with either the 'BundleIds' parameter, or the 'Owner'+-- parameter, but not both.+--+-- This operation supports pagination with the use of the 'NextToken' request and+-- response parameters. If more results are available, the 'NextToken' response+-- member contains a token that you pass in the next call to this operation to+-- retrieve the next set of items.+--+-- <http://docs.aws.amazon.com/workspaces/latest/devguide/API_DescribeWorkspaceBundles.html>+module Network.AWS.WorkSpaces.DescribeWorkspaceBundles+    (+    -- * Request+      DescribeWorkspaceBundles+    -- ** Request constructor+    , describeWorkspaceBundles+    -- ** Request lenses+    , dwbBundleIds+    , dwbNextToken+    , dwbOwner++    -- * Response+    , DescribeWorkspaceBundlesResponse+    -- ** Response constructor+    , describeWorkspaceBundlesResponse+    -- ** Response lenses+    , dwbrBundles+    , dwbrNextToken+    ) where++import Network.AWS.Data (Object)+import Network.AWS.Prelude+import Network.AWS.Request.JSON+import Network.AWS.WorkSpaces.Types+import qualified GHC.Exts++data DescribeWorkspaceBundles = DescribeWorkspaceBundles+    { _dwbBundleIds :: List1 "BundleIds" Text+    , _dwbNextToken :: Maybe Text+    , _dwbOwner     :: Maybe Text+    } deriving (Eq, Ord, Read, Show)++-- | 'DescribeWorkspaceBundles' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'dwbBundleIds' @::@ 'NonEmpty' 'Text'+--+-- * 'dwbNextToken' @::@ 'Maybe' 'Text'+--+-- * 'dwbOwner' @::@ 'Maybe' 'Text'+--+describeWorkspaceBundles :: NonEmpty Text -- ^ 'dwbBundleIds'+                         -> DescribeWorkspaceBundles+describeWorkspaceBundles p1 = DescribeWorkspaceBundles+    { _dwbBundleIds = withIso _List1 (const id) p1+    , _dwbOwner     = Nothing+    , _dwbNextToken = Nothing+    }++-- | An array of strings that contains the identifiers of the bundles to retrieve.+-- This parameter cannot be combined with any other filter parameter.+dwbBundleIds :: Lens' DescribeWorkspaceBundles (NonEmpty Text)+dwbBundleIds = lens _dwbBundleIds (\s a -> s { _dwbBundleIds = a }) . _List1++-- | The 'NextToken' value from a previous call to this operation. Pass null if this+-- is the first call.+dwbNextToken :: Lens' DescribeWorkspaceBundles (Maybe Text)+dwbNextToken = lens _dwbNextToken (\s a -> s { _dwbNextToken = a })++-- | The owner of the bundles to retrieve. This parameter cannot be combined with+-- any other filter parameter.+--+-- This contains one of the following values:+--+-- null - Retrieves the bundles that belong to the account making the call.  'AMAZON' - Retrieves the bundles that are provided by AWS.+dwbOwner :: Lens' DescribeWorkspaceBundles (Maybe Text)+dwbOwner = lens _dwbOwner (\s a -> s { _dwbOwner = a })++data DescribeWorkspaceBundlesResponse = DescribeWorkspaceBundlesResponse+    { _dwbrBundles   :: List "Bundles" WorkspaceBundle+    , _dwbrNextToken :: Maybe Text+    } deriving (Eq, Read, Show)++-- | 'DescribeWorkspaceBundlesResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'dwbrBundles' @::@ ['WorkspaceBundle']+--+-- * 'dwbrNextToken' @::@ 'Maybe' 'Text'+--+describeWorkspaceBundlesResponse :: DescribeWorkspaceBundlesResponse+describeWorkspaceBundlesResponse = DescribeWorkspaceBundlesResponse+    { _dwbrBundles   = mempty+    , _dwbrNextToken = Nothing+    }++-- | An array of structures that contain information about the bundles.+dwbrBundles :: Lens' DescribeWorkspaceBundlesResponse [WorkspaceBundle]+dwbrBundles = lens _dwbrBundles (\s a -> s { _dwbrBundles = a }) . _List++-- | If not null, more results are available. Pass this value for the 'NextToken'+-- parameter in a subsequent call to this operation to retrieve the next set of+-- items. This token is valid for one day and must be used within that timeframe.+dwbrNextToken :: Lens' DescribeWorkspaceBundlesResponse (Maybe Text)+dwbrNextToken = lens _dwbrNextToken (\s a -> s { _dwbrNextToken = a })++instance ToPath DescribeWorkspaceBundles where+    toPath = const "/"++instance ToQuery DescribeWorkspaceBundles where+    toQuery = const mempty++instance ToHeaders DescribeWorkspaceBundles++instance ToJSON DescribeWorkspaceBundles where+    toJSON DescribeWorkspaceBundles{..} = object+        [ "BundleIds" .= _dwbBundleIds+        , "Owner"     .= _dwbOwner+        , "NextToken" .= _dwbNextToken+        ]++instance AWSRequest DescribeWorkspaceBundles where+    type Sv DescribeWorkspaceBundles = WorkSpaces+    type Rs DescribeWorkspaceBundles = DescribeWorkspaceBundlesResponse++    request  = post "DescribeWorkspaceBundles"+    response = jsonResponse++instance FromJSON DescribeWorkspaceBundlesResponse where+    parseJSON = withObject "DescribeWorkspaceBundlesResponse" $ \o -> DescribeWorkspaceBundlesResponse+        <$> o .:? "Bundles" .!= mempty+        <*> o .:? "NextToken"
+ gen/Network/AWS/WorkSpaces/DescribeWorkspaceDirectories.hs view
@@ -0,0 +1,143 @@+{-# LANGUAGE DataKinds                   #-}+{-# LANGUAGE DeriveGeneric               #-}+{-# LANGUAGE FlexibleInstances           #-}+{-# LANGUAGE GeneralizedNewtypeDeriving  #-}+{-# LANGUAGE LambdaCase                  #-}+{-# LANGUAGE NoImplicitPrelude           #-}+{-# LANGUAGE OverloadedStrings           #-}+{-# LANGUAGE RecordWildCards             #-}+{-# LANGUAGE TypeFamilies                #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Module      : Network.AWS.WorkSpaces.DescribeWorkspaceDirectories+-- Copyright   : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>+-- License     : This Source Code Form is subject to the terms of+--               the Mozilla Public License, v. 2.0.+--               A copy of the MPL can be found in the LICENSE file or+--               you can obtain it at http://mozilla.org/MPL/2.0/.+-- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability   : experimental+-- Portability : non-portable (GHC extensions)+--+-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- | Retrieves information about the AWS Directory Service directories in the+-- region that are registered with Amazon WorkSpaces and are available to your+-- account.+--+-- This operation supports pagination with the use of the 'NextToken' request and+-- response parameters. If more results are available, the 'NextToken' response+-- member contains a token that you pass in the next call to this operation to+-- retrieve the next set of items.+--+-- <http://docs.aws.amazon.com/workspaces/latest/devguide/API_DescribeWorkspaceDirectories.html>+module Network.AWS.WorkSpaces.DescribeWorkspaceDirectories+    (+    -- * Request+      DescribeWorkspaceDirectories+    -- ** Request constructor+    , describeWorkspaceDirectories+    -- ** Request lenses+    , dwdDirectoryIds+    , dwdNextToken++    -- * Response+    , DescribeWorkspaceDirectoriesResponse+    -- ** Response constructor+    , describeWorkspaceDirectoriesResponse+    -- ** Response lenses+    , dwdrDirectories+    , dwdrNextToken+    ) where++import Network.AWS.Data (Object)+import Network.AWS.Prelude+import Network.AWS.Request.JSON+import Network.AWS.WorkSpaces.Types+import qualified GHC.Exts++data DescribeWorkspaceDirectories = DescribeWorkspaceDirectories+    { _dwdDirectoryIds :: List1 "DirectoryIds" Text+    , _dwdNextToken    :: Maybe Text+    } deriving (Eq, Ord, Read, Show)++-- | 'DescribeWorkspaceDirectories' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'dwdDirectoryIds' @::@ 'NonEmpty' 'Text'+--+-- * 'dwdNextToken' @::@ 'Maybe' 'Text'+--+describeWorkspaceDirectories :: NonEmpty Text -- ^ 'dwdDirectoryIds'+                             -> DescribeWorkspaceDirectories+describeWorkspaceDirectories p1 = DescribeWorkspaceDirectories+    { _dwdDirectoryIds = withIso _List1 (const id) p1+    , _dwdNextToken    = Nothing+    }++-- | An array of strings that contains the directory identifiers to retrieve+-- information for. If this member is null, all directories are retrieved.+dwdDirectoryIds :: Lens' DescribeWorkspaceDirectories (NonEmpty Text)+dwdDirectoryIds = lens _dwdDirectoryIds (\s a -> s { _dwdDirectoryIds = a }) . _List1++-- | The 'NextToken' value from a previous call to this operation. Pass null if this+-- is the first call.+dwdNextToken :: Lens' DescribeWorkspaceDirectories (Maybe Text)+dwdNextToken = lens _dwdNextToken (\s a -> s { _dwdNextToken = a })++data DescribeWorkspaceDirectoriesResponse = DescribeWorkspaceDirectoriesResponse+    { _dwdrDirectories :: List "Directories" WorkspaceDirectory+    , _dwdrNextToken   :: Maybe Text+    } deriving (Eq, Read, Show)++-- | 'DescribeWorkspaceDirectoriesResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'dwdrDirectories' @::@ ['WorkspaceDirectory']+--+-- * 'dwdrNextToken' @::@ 'Maybe' 'Text'+--+describeWorkspaceDirectoriesResponse :: DescribeWorkspaceDirectoriesResponse+describeWorkspaceDirectoriesResponse = DescribeWorkspaceDirectoriesResponse+    { _dwdrDirectories = mempty+    , _dwdrNextToken   = Nothing+    }++-- | An array of structures that contain information about the directories.+dwdrDirectories :: Lens' DescribeWorkspaceDirectoriesResponse [WorkspaceDirectory]+dwdrDirectories = lens _dwdrDirectories (\s a -> s { _dwdrDirectories = a }) . _List++-- | If not null, more results are available. Pass this value for the 'NextToken'+-- parameter in a subsequent call to this operation to retrieve the next set of+-- items. This token is valid for one day and must be used within that timeframe.+dwdrNextToken :: Lens' DescribeWorkspaceDirectoriesResponse (Maybe Text)+dwdrNextToken = lens _dwdrNextToken (\s a -> s { _dwdrNextToken = a })++instance ToPath DescribeWorkspaceDirectories where+    toPath = const "/"++instance ToQuery DescribeWorkspaceDirectories where+    toQuery = const mempty++instance ToHeaders DescribeWorkspaceDirectories++instance ToJSON DescribeWorkspaceDirectories where+    toJSON DescribeWorkspaceDirectories{..} = object+        [ "DirectoryIds" .= _dwdDirectoryIds+        , "NextToken"    .= _dwdNextToken+        ]++instance AWSRequest DescribeWorkspaceDirectories where+    type Sv DescribeWorkspaceDirectories = WorkSpaces+    type Rs DescribeWorkspaceDirectories = DescribeWorkspaceDirectoriesResponse++    request  = post "DescribeWorkspaceDirectories"+    response = jsonResponse++instance FromJSON DescribeWorkspaceDirectoriesResponse where+    parseJSON = withObject "DescribeWorkspaceDirectoriesResponse" $ \o -> DescribeWorkspaceDirectoriesResponse+        <$> o .:? "Directories" .!= mempty+        <*> o .:? "NextToken"
+ gen/Network/AWS/WorkSpaces/DescribeWorkspaces.hs view
@@ -0,0 +1,196 @@+{-# LANGUAGE DataKinds                   #-}+{-# LANGUAGE DeriveGeneric               #-}+{-# LANGUAGE FlexibleInstances           #-}+{-# LANGUAGE GeneralizedNewtypeDeriving  #-}+{-# LANGUAGE LambdaCase                  #-}+{-# LANGUAGE NoImplicitPrelude           #-}+{-# LANGUAGE OverloadedStrings           #-}+{-# LANGUAGE RecordWildCards             #-}+{-# LANGUAGE TypeFamilies                #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Module      : Network.AWS.WorkSpaces.DescribeWorkspaces+-- Copyright   : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>+-- License     : This Source Code Form is subject to the terms of+--               the Mozilla Public License, v. 2.0.+--               A copy of the MPL can be found in the LICENSE file or+--               you can obtain it at http://mozilla.org/MPL/2.0/.+-- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability   : experimental+-- Portability : non-portable (GHC extensions)+--+-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- | Obtains information about the specified WorkSpaces.+--+-- Only one of the filter parameters, such as 'BundleId', 'DirectoryId', or 'WorkspaceIds', can be specified at a time.+--+-- This operation supports pagination with the use of the 'NextToken' request and+-- response parameters. If more results are available, the 'NextToken' response+-- member contains a token that you pass in the next call to this operation to+-- retrieve the next set of items.+--+-- <http://docs.aws.amazon.com/workspaces/latest/devguide/API_DescribeWorkspaces.html>+module Network.AWS.WorkSpaces.DescribeWorkspaces+    (+    -- * Request+      DescribeWorkspaces+    -- ** Request constructor+    , describeWorkspaces+    -- ** Request lenses+    , dwBundleId+    , dwDirectoryId+    , dwLimit+    , dwNextToken+    , dwUserName+    , dwWorkspaceIds++    -- * Response+    , DescribeWorkspacesResponse+    -- ** Response constructor+    , describeWorkspacesResponse+    -- ** Response lenses+    , dwrNextToken+    , dwrWorkspaces+    ) where++import Network.AWS.Data (Object)+import Network.AWS.Prelude+import Network.AWS.Request.JSON+import Network.AWS.WorkSpaces.Types+import qualified GHC.Exts++data DescribeWorkspaces = DescribeWorkspaces+    { _dwBundleId     :: Maybe Text+    , _dwDirectoryId  :: Maybe Text+    , _dwLimit        :: Maybe Nat+    , _dwNextToken    :: Maybe Text+    , _dwUserName     :: Maybe Text+    , _dwWorkspaceIds :: List1 "WorkspaceIds" Text+    } deriving (Eq, Ord, Read, Show)++-- | 'DescribeWorkspaces' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'dwBundleId' @::@ 'Maybe' 'Text'+--+-- * 'dwDirectoryId' @::@ 'Maybe' 'Text'+--+-- * 'dwLimit' @::@ 'Maybe' 'Natural'+--+-- * 'dwNextToken' @::@ 'Maybe' 'Text'+--+-- * 'dwUserName' @::@ 'Maybe' 'Text'+--+-- * 'dwWorkspaceIds' @::@ 'NonEmpty' 'Text'+--+describeWorkspaces :: NonEmpty Text -- ^ 'dwWorkspaceIds'+                   -> DescribeWorkspaces+describeWorkspaces p1 = DescribeWorkspaces+    { _dwWorkspaceIds = withIso _List1 (const id) p1+    , _dwDirectoryId  = Nothing+    , _dwUserName     = Nothing+    , _dwBundleId     = Nothing+    , _dwLimit        = Nothing+    , _dwNextToken    = Nothing+    }++-- | The identifier of a bundle to obtain the WorkSpaces for. All WorkSpaces that+-- are created from this bundle will be retrieved. This parameter cannot be+-- combined with any other filter parameter.+dwBundleId :: Lens' DescribeWorkspaces (Maybe Text)+dwBundleId = lens _dwBundleId (\s a -> s { _dwBundleId = a })++-- | Specifies the directory identifier to which to limit the WorkSpaces.+-- Optionally, you can specify a specific directory user with the 'UserName'+-- parameter. This parameter cannot be combined with any other filter parameter.+dwDirectoryId :: Lens' DescribeWorkspaces (Maybe Text)+dwDirectoryId = lens _dwDirectoryId (\s a -> s { _dwDirectoryId = a })++-- | The maximum number of items to return.+dwLimit :: Lens' DescribeWorkspaces (Maybe Natural)+dwLimit = lens _dwLimit (\s a -> s { _dwLimit = a }) . mapping _Nat++-- | The 'NextToken' value from a previous call to this operation. Pass null if this+-- is the first call.+dwNextToken :: Lens' DescribeWorkspaces (Maybe Text)+dwNextToken = lens _dwNextToken (\s a -> s { _dwNextToken = a })++-- | Used with the 'DirectoryId' parameter to specify the directory user for which+-- to obtain the WorkSpace.+dwUserName :: Lens' DescribeWorkspaces (Maybe Text)+dwUserName = lens _dwUserName (\s a -> s { _dwUserName = a })++-- | An array of strings that contain the identifiers of the WorkSpaces for which+-- to retrieve information. This parameter cannot be combined with any other+-- filter parameter.+--+-- Because the 'CreateWorkspaces' operation is asynchronous, the identifier+-- returned by 'CreateWorkspaces' is not immediately available. If you immediately+-- call 'DescribeWorkspaces' with this identifier, no information will be returned.+dwWorkspaceIds :: Lens' DescribeWorkspaces (NonEmpty Text)+dwWorkspaceIds = lens _dwWorkspaceIds (\s a -> s { _dwWorkspaceIds = a }) . _List1++data DescribeWorkspacesResponse = DescribeWorkspacesResponse+    { _dwrNextToken  :: Maybe Text+    , _dwrWorkspaces :: List "Workspaces" Workspace+    } deriving (Eq, Read, Show)++-- | 'DescribeWorkspacesResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'dwrNextToken' @::@ 'Maybe' 'Text'+--+-- * 'dwrWorkspaces' @::@ ['Workspace']+--+describeWorkspacesResponse :: DescribeWorkspacesResponse+describeWorkspacesResponse = DescribeWorkspacesResponse+    { _dwrWorkspaces = mempty+    , _dwrNextToken  = Nothing+    }++-- | If not null, more results are available. Pass this value for the 'NextToken'+-- parameter in a subsequent call to this operation to retrieve the next set of+-- items. This token is valid for one day and must be used within that timeframe.+dwrNextToken :: Lens' DescribeWorkspacesResponse (Maybe Text)+dwrNextToken = lens _dwrNextToken (\s a -> s { _dwrNextToken = a })++-- | An array of structures that contain the information about the WorkSpaces.+--+-- Because the 'CreateWorkspaces' operation is asynchronous, some of this+-- information may be incomplete for a newly-created WorkSpace.+dwrWorkspaces :: Lens' DescribeWorkspacesResponse [Workspace]+dwrWorkspaces = lens _dwrWorkspaces (\s a -> s { _dwrWorkspaces = a }) . _List++instance ToPath DescribeWorkspaces where+    toPath = const "/"++instance ToQuery DescribeWorkspaces where+    toQuery = const mempty++instance ToHeaders DescribeWorkspaces++instance ToJSON DescribeWorkspaces where+    toJSON DescribeWorkspaces{..} = object+        [ "WorkspaceIds" .= _dwWorkspaceIds+        , "DirectoryId"  .= _dwDirectoryId+        , "UserName"     .= _dwUserName+        , "BundleId"     .= _dwBundleId+        , "Limit"        .= _dwLimit+        , "NextToken"    .= _dwNextToken+        ]++instance AWSRequest DescribeWorkspaces where+    type Sv DescribeWorkspaces = WorkSpaces+    type Rs DescribeWorkspaces = DescribeWorkspacesResponse++    request  = post "DescribeWorkspaces"+    response = jsonResponse++instance FromJSON DescribeWorkspacesResponse where+    parseJSON = withObject "DescribeWorkspacesResponse" $ \o -> DescribeWorkspacesResponse+        <$> o .:? "NextToken"+        <*> o .:? "Workspaces" .!= mempty
+ gen/Network/AWS/WorkSpaces/RebootWorkspaces.hs view
@@ -0,0 +1,131 @@+{-# LANGUAGE DataKinds                   #-}+{-# LANGUAGE DeriveGeneric               #-}+{-# LANGUAGE FlexibleInstances           #-}+{-# LANGUAGE GeneralizedNewtypeDeriving  #-}+{-# LANGUAGE LambdaCase                  #-}+{-# LANGUAGE NoImplicitPrelude           #-}+{-# LANGUAGE OverloadedStrings           #-}+{-# LANGUAGE RecordWildCards             #-}+{-# LANGUAGE TypeFamilies                #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Module      : Network.AWS.WorkSpaces.RebootWorkspaces+-- Copyright   : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>+-- License     : This Source Code Form is subject to the terms of+--               the Mozilla Public License, v. 2.0.+--               A copy of the MPL can be found in the LICENSE file or+--               you can obtain it at http://mozilla.org/MPL/2.0/.+-- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability   : experimental+-- Portability : non-portable (GHC extensions)+--+-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- | Reboots the specified WorkSpaces.+--+-- To be able to reboot a WorkSpace, the WorkSpace must have a State of 'AVAILABLE', 'IMPAIRED', or 'INOPERABLE'.+--+-- This operation is asynchronous and will return before the WorkSpaces have+-- rebooted.+--+--+--+-- <http://docs.aws.amazon.com/workspaces/latest/devguide/API_RebootWorkspaces.html>+module Network.AWS.WorkSpaces.RebootWorkspaces+    (+    -- * Request+      RebootWorkspaces+    -- ** Request constructor+    , rebootWorkspaces+    -- ** Request lenses+    , rwRebootWorkspaceRequests++    -- * Response+    , RebootWorkspacesResponse+    -- ** Response constructor+    , rebootWorkspacesResponse+    -- ** Response lenses+    , rwr1FailedRequests+    ) where++import Network.AWS.Data (Object)+import Network.AWS.Prelude+import Network.AWS.Request.JSON+import Network.AWS.WorkSpaces.Types+import qualified GHC.Exts++newtype RebootWorkspaces = RebootWorkspaces+    { _rwRebootWorkspaceRequests :: List1 "RebootWorkspaceRequests" RebootRequest+    } deriving (Eq, Read, Show, Semigroup)++-- | 'RebootWorkspaces' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'rwRebootWorkspaceRequests' @::@ 'NonEmpty' 'RebootRequest'+--+rebootWorkspaces :: NonEmpty RebootRequest -- ^ 'rwRebootWorkspaceRequests'+                 -> RebootWorkspaces+rebootWorkspaces p1 = RebootWorkspaces+    { _rwRebootWorkspaceRequests = withIso _List1 (const id) p1+    }++-- | An array of structures that specify the WorkSpaces to reboot.+rwRebootWorkspaceRequests :: Lens' RebootWorkspaces (NonEmpty RebootRequest)+rwRebootWorkspaceRequests =+    lens _rwRebootWorkspaceRequests+        (\s a -> s { _rwRebootWorkspaceRequests = a })+            . _List1++newtype RebootWorkspacesResponse = RebootWorkspacesResponse+    { _rwr1FailedRequests :: List "FailedRequests" FailedWorkspaceChangeRequest+    } deriving (Eq, Read, Show, Monoid, Semigroup)++instance GHC.Exts.IsList RebootWorkspacesResponse where+    type Item RebootWorkspacesResponse = FailedWorkspaceChangeRequest++    fromList = RebootWorkspacesResponse . GHC.Exts.fromList+    toList   = GHC.Exts.toList . _rwr1FailedRequests++-- | 'RebootWorkspacesResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'rwr1FailedRequests' @::@ ['FailedWorkspaceChangeRequest']+--+rebootWorkspacesResponse :: RebootWorkspacesResponse+rebootWorkspacesResponse = RebootWorkspacesResponse+    { _rwr1FailedRequests = mempty+    }++-- | An array of structures that represent any WorkSpaces that could not be+-- rebooted.+rwr1FailedRequests :: Lens' RebootWorkspacesResponse [FailedWorkspaceChangeRequest]+rwr1FailedRequests =+    lens _rwr1FailedRequests (\s a -> s { _rwr1FailedRequests = a })+        . _List++instance ToPath RebootWorkspaces where+    toPath = const "/"++instance ToQuery RebootWorkspaces where+    toQuery = const mempty++instance ToHeaders RebootWorkspaces++instance ToJSON RebootWorkspaces where+    toJSON RebootWorkspaces{..} = object+        [ "RebootWorkspaceRequests" .= _rwRebootWorkspaceRequests+        ]++instance AWSRequest RebootWorkspaces where+    type Sv RebootWorkspaces = WorkSpaces+    type Rs RebootWorkspaces = RebootWorkspacesResponse++    request  = post "RebootWorkspaces"+    response = jsonResponse++instance FromJSON RebootWorkspacesResponse where+    parseJSON = withObject "RebootWorkspacesResponse" $ \o -> RebootWorkspacesResponse+        <$> o .:? "FailedRequests" .!= mempty
+ gen/Network/AWS/WorkSpaces/RebuildWorkspaces.hs view
@@ -0,0 +1,141 @@+{-# LANGUAGE DataKinds                   #-}+{-# LANGUAGE DeriveGeneric               #-}+{-# LANGUAGE FlexibleInstances           #-}+{-# LANGUAGE GeneralizedNewtypeDeriving  #-}+{-# LANGUAGE LambdaCase                  #-}+{-# LANGUAGE NoImplicitPrelude           #-}+{-# LANGUAGE OverloadedStrings           #-}+{-# LANGUAGE RecordWildCards             #-}+{-# LANGUAGE TypeFamilies                #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Module      : Network.AWS.WorkSpaces.RebuildWorkspaces+-- Copyright   : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>+-- License     : This Source Code Form is subject to the terms of+--               the Mozilla Public License, v. 2.0.+--               A copy of the MPL can be found in the LICENSE file or+--               you can obtain it at http://mozilla.org/MPL/2.0/.+-- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability   : experimental+-- Portability : non-portable (GHC extensions)+--+-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- | Rebuilds the specified WorkSpaces.+--+-- Rebuilding a WorkSpace is a potentially destructive action that can result+-- in the loss of data. Rebuilding a WorkSpace causes the following to occur:+--+-- The system is restored to the image of the bundle that the WorkSpace is+-- created from. Any applications that have been installed, or system settings+-- that have been made since the WorkSpace was created will be lost. The data+-- drive (D drive) is re-created from the last automatic snapshot taken of the+-- data drive. The current contents of the data drive are overwritten. Automatic+-- snapshots of the data drive are taken every 12 hours, so the snapshot can be+-- as much as 12 hours old.  To be able to rebuild a WorkSpace, the WorkSpace+-- must have a State of 'AVAILABLE' or 'ERROR'.+--+-- This operation is asynchronous and will return before the WorkSpaces have+-- been completely rebuilt.+--+--+--+-- <http://docs.aws.amazon.com/workspaces/latest/devguide/API_RebuildWorkspaces.html>+module Network.AWS.WorkSpaces.RebuildWorkspaces+    (+    -- * Request+      RebuildWorkspaces+    -- ** Request constructor+    , rebuildWorkspaces+    -- ** Request lenses+    , rwRebuildWorkspaceRequests++    -- * Response+    , RebuildWorkspacesResponse+    -- ** Response constructor+    , rebuildWorkspacesResponse+    -- ** Response lenses+    , rwrFailedRequests+    ) where++import Network.AWS.Data (Object)+import Network.AWS.Prelude+import Network.AWS.Request.JSON+import Network.AWS.WorkSpaces.Types+import qualified GHC.Exts++newtype RebuildWorkspaces = RebuildWorkspaces+    { _rwRebuildWorkspaceRequests :: List1 "RebuildWorkspaceRequests" RebuildRequest+    } deriving (Eq, Read, Show, Semigroup)++-- | 'RebuildWorkspaces' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'rwRebuildWorkspaceRequests' @::@ 'NonEmpty' 'RebuildRequest'+--+rebuildWorkspaces :: NonEmpty RebuildRequest -- ^ 'rwRebuildWorkspaceRequests'+                  -> RebuildWorkspaces+rebuildWorkspaces p1 = RebuildWorkspaces+    { _rwRebuildWorkspaceRequests = withIso _List1 (const id) p1+    }++-- | An array of structures that specify the WorkSpaces to rebuild.+rwRebuildWorkspaceRequests :: Lens' RebuildWorkspaces (NonEmpty RebuildRequest)+rwRebuildWorkspaceRequests =+    lens _rwRebuildWorkspaceRequests+        (\s a -> s { _rwRebuildWorkspaceRequests = a })+            . _List1++newtype RebuildWorkspacesResponse = RebuildWorkspacesResponse+    { _rwrFailedRequests :: List "FailedRequests" FailedWorkspaceChangeRequest+    } deriving (Eq, Read, Show, Monoid, Semigroup)++instance GHC.Exts.IsList RebuildWorkspacesResponse where+    type Item RebuildWorkspacesResponse = FailedWorkspaceChangeRequest++    fromList = RebuildWorkspacesResponse . GHC.Exts.fromList+    toList   = GHC.Exts.toList . _rwrFailedRequests++-- | 'RebuildWorkspacesResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'rwrFailedRequests' @::@ ['FailedWorkspaceChangeRequest']+--+rebuildWorkspacesResponse :: RebuildWorkspacesResponse+rebuildWorkspacesResponse = RebuildWorkspacesResponse+    { _rwrFailedRequests = mempty+    }++-- | An array of structures that represent any WorkSpaces that could not be+-- rebuilt.+rwrFailedRequests :: Lens' RebuildWorkspacesResponse [FailedWorkspaceChangeRequest]+rwrFailedRequests =+    lens _rwrFailedRequests (\s a -> s { _rwrFailedRequests = a })+        . _List++instance ToPath RebuildWorkspaces where+    toPath = const "/"++instance ToQuery RebuildWorkspaces where+    toQuery = const mempty++instance ToHeaders RebuildWorkspaces++instance ToJSON RebuildWorkspaces where+    toJSON RebuildWorkspaces{..} = object+        [ "RebuildWorkspaceRequests" .= _rwRebuildWorkspaceRequests+        ]++instance AWSRequest RebuildWorkspaces where+    type Sv RebuildWorkspaces = WorkSpaces+    type Rs RebuildWorkspaces = RebuildWorkspacesResponse++    request  = post "RebuildWorkspaces"+    response = jsonResponse++instance FromJSON RebuildWorkspacesResponse where+    parseJSON = withObject "RebuildWorkspacesResponse" $ \o -> RebuildWorkspacesResponse+        <$> o .:? "FailedRequests" .!= mempty
+ gen/Network/AWS/WorkSpaces/TerminateWorkspaces.hs view
@@ -0,0 +1,135 @@+{-# LANGUAGE DataKinds                   #-}+{-# LANGUAGE DeriveGeneric               #-}+{-# LANGUAGE FlexibleInstances           #-}+{-# LANGUAGE GeneralizedNewtypeDeriving  #-}+{-# LANGUAGE LambdaCase                  #-}+{-# LANGUAGE NoImplicitPrelude           #-}+{-# LANGUAGE OverloadedStrings           #-}+{-# LANGUAGE RecordWildCards             #-}+{-# LANGUAGE TypeFamilies                #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Module      : Network.AWS.WorkSpaces.TerminateWorkspaces+-- Copyright   : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>+-- License     : This Source Code Form is subject to the terms of+--               the Mozilla Public License, v. 2.0.+--               A copy of the MPL can be found in the LICENSE file or+--               you can obtain it at http://mozilla.org/MPL/2.0/.+-- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability   : experimental+-- Portability : non-portable (GHC extensions)+--+-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- | Terminates the specified WorkSpaces.+--+-- Terminating a WorkSpace is a permanent action and cannot be undone. The+-- user's data is not maintained and will be destroyed. If you need to archive+-- any user data, contact Amazon Web Services before terminating the WorkSpace.+--+-- You can terminate a WorkSpace that is in any state except 'SUSPENDED'.+--+-- This operation is asynchronous and will return before the WorkSpaces have+-- been completely terminated.+--+--+--+-- <http://docs.aws.amazon.com/workspaces/latest/devguide/API_TerminateWorkspaces.html>+module Network.AWS.WorkSpaces.TerminateWorkspaces+    (+    -- * Request+      TerminateWorkspaces+    -- ** Request constructor+    , terminateWorkspaces+    -- ** Request lenses+    , twTerminateWorkspaceRequests++    -- * Response+    , TerminateWorkspacesResponse+    -- ** Response constructor+    , terminateWorkspacesResponse+    -- ** Response lenses+    , twrFailedRequests+    ) where++import Network.AWS.Data (Object)+import Network.AWS.Prelude+import Network.AWS.Request.JSON+import Network.AWS.WorkSpaces.Types+import qualified GHC.Exts++newtype TerminateWorkspaces = TerminateWorkspaces+    { _twTerminateWorkspaceRequests :: List1 "TerminateWorkspaceRequests" TerminateRequest+    } deriving (Eq, Read, Show, Semigroup)++-- | 'TerminateWorkspaces' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'twTerminateWorkspaceRequests' @::@ 'NonEmpty' 'TerminateRequest'+--+terminateWorkspaces :: NonEmpty TerminateRequest -- ^ 'twTerminateWorkspaceRequests'+                    -> TerminateWorkspaces+terminateWorkspaces p1 = TerminateWorkspaces+    { _twTerminateWorkspaceRequests = withIso _List1 (const id) p1+    }++-- | An array of structures that specify the WorkSpaces to terminate.+twTerminateWorkspaceRequests :: Lens' TerminateWorkspaces (NonEmpty TerminateRequest)+twTerminateWorkspaceRequests =+    lens _twTerminateWorkspaceRequests+        (\s a -> s { _twTerminateWorkspaceRequests = a })+            . _List1++newtype TerminateWorkspacesResponse = TerminateWorkspacesResponse+    { _twrFailedRequests :: List "FailedRequests" FailedWorkspaceChangeRequest+    } deriving (Eq, Read, Show, Monoid, Semigroup)++instance GHC.Exts.IsList TerminateWorkspacesResponse where+    type Item TerminateWorkspacesResponse = FailedWorkspaceChangeRequest++    fromList = TerminateWorkspacesResponse . GHC.Exts.fromList+    toList   = GHC.Exts.toList . _twrFailedRequests++-- | 'TerminateWorkspacesResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'twrFailedRequests' @::@ ['FailedWorkspaceChangeRequest']+--+terminateWorkspacesResponse :: TerminateWorkspacesResponse+terminateWorkspacesResponse = TerminateWorkspacesResponse+    { _twrFailedRequests = mempty+    }++-- | An array of structures that represent any WorkSpaces that could not be+-- terminated.+twrFailedRequests :: Lens' TerminateWorkspacesResponse [FailedWorkspaceChangeRequest]+twrFailedRequests =+    lens _twrFailedRequests (\s a -> s { _twrFailedRequests = a })+        . _List++instance ToPath TerminateWorkspaces where+    toPath = const "/"++instance ToQuery TerminateWorkspaces where+    toQuery = const mempty++instance ToHeaders TerminateWorkspaces++instance ToJSON TerminateWorkspaces where+    toJSON TerminateWorkspaces{..} = object+        [ "TerminateWorkspaceRequests" .= _twTerminateWorkspaceRequests+        ]++instance AWSRequest TerminateWorkspaces where+    type Sv TerminateWorkspaces = WorkSpaces+    type Rs TerminateWorkspaces = TerminateWorkspacesResponse++    request  = post "TerminateWorkspaces"+    response = jsonResponse++instance FromJSON TerminateWorkspacesResponse where+    parseJSON = withObject "TerminateWorkspacesResponse" $ \o -> TerminateWorkspacesResponse+        <$> o .:? "FailedRequests" .!= mempty
+ gen/Network/AWS/WorkSpaces/Types.hs view
@@ -0,0 +1,1047 @@+{-# LANGUAGE DataKinds                   #-}+{-# LANGUAGE DeriveGeneric               #-}+{-# LANGUAGE FlexibleInstances           #-}+{-# LANGUAGE GeneralizedNewtypeDeriving  #-}+{-# LANGUAGE LambdaCase                  #-}+{-# LANGUAGE NoImplicitPrelude           #-}+{-# LANGUAGE OverloadedStrings           #-}+{-# LANGUAGE RecordWildCards             #-}+{-# LANGUAGE TypeFamilies                #-}+{-# LANGUAGE ViewPatterns                #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Module      : Network.AWS.WorkSpaces.Types+-- Copyright   : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>+-- License     : This Source Code Form is subject to the terms of+--               the Mozilla Public License, v. 2.0.+--               A copy of the MPL can be found in the LICENSE file or+--               you can obtain it at http://mozilla.org/MPL/2.0/.+-- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability   : experimental+-- Portability : non-portable (GHC extensions)+--+-- Derived from AWS service descriptions, licensed under Apache 2.0.++module Network.AWS.WorkSpaces.Types+    (+    -- * Service+      WorkSpaces+    -- ** Error+    , JSONError++    -- * WorkspaceRequest+    , WorkspaceRequest+    , workspaceRequest+    , wBundleId+    , wDirectoryId+    , wUserName++    -- * WorkspaceDirectory+    , WorkspaceDirectory+    , workspaceDirectory+    , wdAlias+    , wdCustomerUserName+    , wdDirectoryId+    , wdDirectoryName+    , wdDirectoryType+    , wdDnsIpAddresses+    , wdIamRoleId+    , wdRegistrationCode+    , wdState+    , wdSubnetIds+    , wdWorkspaceCreationProperties+    , wdWorkspaceSecurityGroupId++    -- * Compute+    , Compute (..)++    -- * Workspace+    , Workspace+    , workspace+    , w1BundleId+    , w1DirectoryId+    , w1ErrorCode+    , w1ErrorMessage+    , w1IpAddress+    , w1State+    , w1SubnetId+    , w1UserName+    , w1WorkspaceId++    -- * RebuildRequest+    , RebuildRequest+    , rebuildRequest+    , rWorkspaceId++    -- * FailedCreateWorkspaceRequest+    , FailedCreateWorkspaceRequest+    , failedCreateWorkspaceRequest+    , fcwErrorCode+    , fcwErrorMessage+    , fcwWorkspaceRequest++    -- * WorkspaceDirectoryState+    , WorkspaceDirectoryState (..)++    -- * FailedWorkspaceChangeRequest+    , FailedWorkspaceChangeRequest+    , failedWorkspaceChangeRequest+    , fwcErrorCode+    , fwcErrorMessage+    , fwcWorkspaceId++    -- * WorkspaceDirectoryType+    , WorkspaceDirectoryType (..)++    -- * WorkspaceState+    , WorkspaceState (..)++    -- * ComputeType+    , ComputeType+    , computeType+    , ctName++    -- * RebootRequest+    , RebootRequest+    , rebootRequest+    , r1WorkspaceId++    -- * UserStorage+    , UserStorage+    , userStorage+    , usCapacity++    -- * TerminateRequest+    , TerminateRequest+    , terminateRequest+    , tWorkspaceId++    -- * DefaultWorkspaceCreationProperties+    , DefaultWorkspaceCreationProperties+    , defaultWorkspaceCreationProperties+    , dwcpCustomSecurityGroupId+    , dwcpDefaultOu+    , dwcpEnableInternetAccess+    , dwcpEnableWorkDocs+    , dwcpUserEnabledAsLocalAdministrator++    -- * WorkspaceBundle+    , WorkspaceBundle+    , workspaceBundle+    , wbBundleId+    , wbComputeType+    , wbDescription+    , wbName+    , wbOwner+    , wbUserStorage+    ) where++import Network.AWS.Prelude+import Network.AWS.Signing+import qualified GHC.Exts++-- | Version @2015-04-08@ of the Amazon WorkSpaces service.+data WorkSpaces++instance AWSService WorkSpaces where+    type Sg WorkSpaces = V4+    type Er WorkSpaces = JSONError++    service = service'+      where+        service' :: Service WorkSpaces+        service' = Service+            { _svcAbbrev       = "WorkSpaces"+            , _svcPrefix       = "workspaces"+            , _svcVersion      = "2015-04-08"+            , _svcTargetPrefix = Just "WorkspacesService"+            , _svcJSONVersion  = Just "1.1"+            , _svcHandle       = handle+            , _svcRetry        = retry+            }++        handle :: Status+               -> Maybe (LazyByteString -> ServiceError JSONError)+        handle = jsonError statusSuccess service'++        retry :: Retry WorkSpaces+        retry = Exponential+            { _retryBase     = 0.05+            , _retryGrowth   = 2+            , _retryAttempts = 5+            , _retryCheck    = check+            }++        check :: Status+              -> JSONError+              -> Bool+        check (statusCode -> s) (awsErrorCode -> e)+            | s == 500  = True -- General Server Error+            | s == 509  = True -- Limit Exceeded+            | s == 503  = True -- Service Unavailable+            | otherwise = False++data WorkspaceRequest = WorkspaceRequest+    { _wBundleId    :: Text+    , _wDirectoryId :: Text+    , _wUserName    :: Text+    } deriving (Eq, Ord, Read, Show)++-- | 'WorkspaceRequest' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'wBundleId' @::@ 'Text'+--+-- * 'wDirectoryId' @::@ 'Text'+--+-- * 'wUserName' @::@ 'Text'+--+workspaceRequest :: Text -- ^ 'wDirectoryId'+                 -> Text -- ^ 'wUserName'+                 -> Text -- ^ 'wBundleId'+                 -> WorkspaceRequest+workspaceRequest p1 p2 p3 = WorkspaceRequest+    { _wDirectoryId = p1+    , _wUserName    = p2+    , _wBundleId    = p3+    }++-- | The identifier of the bundle to create the WorkSpace from. You can use the 'DescribeWorkspaceBundles' operation to obtain a list of the bundles that are available.+wBundleId :: Lens' WorkspaceRequest Text+wBundleId = lens _wBundleId (\s a -> s { _wBundleId = a })++-- | The identifier of the AWS Directory Service directory to create the WorkSpace+-- in. You can use the 'DescribeWorkspaceDirectories' operation to obtain a list+-- of the directories that are available.+wDirectoryId :: Lens' WorkspaceRequest Text+wDirectoryId = lens _wDirectoryId (\s a -> s { _wDirectoryId = a })++-- | The username that the WorkSpace is assigned to. This username must exist in+-- the AWS Directory Service directory specified by the 'DirectoryId' member.+wUserName :: Lens' WorkspaceRequest Text+wUserName = lens _wUserName (\s a -> s { _wUserName = a })++instance FromJSON WorkspaceRequest where+    parseJSON = withObject "WorkspaceRequest" $ \o -> WorkspaceRequest+        <$> o .:  "BundleId"+        <*> o .:  "DirectoryId"+        <*> o .:  "UserName"++instance ToJSON WorkspaceRequest where+    toJSON WorkspaceRequest{..} = object+        [ "DirectoryId" .= _wDirectoryId+        , "UserName"    .= _wUserName+        , "BundleId"    .= _wBundleId+        ]++data WorkspaceDirectory = WorkspaceDirectory+    { _wdAlias                       :: Maybe Text+    , _wdCustomerUserName            :: Maybe Text+    , _wdDirectoryId                 :: Maybe Text+    , _wdDirectoryName               :: Maybe Text+    , _wdDirectoryType               :: Maybe WorkspaceDirectoryType+    , _wdDnsIpAddresses              :: List "DnsIpAddresses" Text+    , _wdIamRoleId                   :: Maybe Text+    , _wdRegistrationCode            :: Maybe Text+    , _wdState                       :: Maybe WorkspaceDirectoryState+    , _wdSubnetIds                   :: List "SubnetIds" Text+    , _wdWorkspaceCreationProperties :: Maybe DefaultWorkspaceCreationProperties+    , _wdWorkspaceSecurityGroupId    :: Maybe Text+    } deriving (Eq, Read, Show)++-- | 'WorkspaceDirectory' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'wdAlias' @::@ 'Maybe' 'Text'+--+-- * 'wdCustomerUserName' @::@ 'Maybe' 'Text'+--+-- * 'wdDirectoryId' @::@ 'Maybe' 'Text'+--+-- * 'wdDirectoryName' @::@ 'Maybe' 'Text'+--+-- * 'wdDirectoryType' @::@ 'Maybe' 'WorkspaceDirectoryType'+--+-- * 'wdDnsIpAddresses' @::@ ['Text']+--+-- * 'wdIamRoleId' @::@ 'Maybe' 'Text'+--+-- * 'wdRegistrationCode' @::@ 'Maybe' 'Text'+--+-- * 'wdState' @::@ 'Maybe' 'WorkspaceDirectoryState'+--+-- * 'wdSubnetIds' @::@ ['Text']+--+-- * 'wdWorkspaceCreationProperties' @::@ 'Maybe' 'DefaultWorkspaceCreationProperties'+--+-- * 'wdWorkspaceSecurityGroupId' @::@ 'Maybe' 'Text'+--+workspaceDirectory :: WorkspaceDirectory+workspaceDirectory = WorkspaceDirectory+    { _wdDirectoryId                 = Nothing+    , _wdAlias                       = Nothing+    , _wdDirectoryName               = Nothing+    , _wdRegistrationCode            = Nothing+    , _wdSubnetIds                   = mempty+    , _wdDnsIpAddresses              = mempty+    , _wdCustomerUserName            = Nothing+    , _wdIamRoleId                   = Nothing+    , _wdDirectoryType               = Nothing+    , _wdWorkspaceSecurityGroupId    = Nothing+    , _wdState                       = Nothing+    , _wdWorkspaceCreationProperties = Nothing+    }++-- | The directory alias.+wdAlias :: Lens' WorkspaceDirectory (Maybe Text)+wdAlias = lens _wdAlias (\s a -> s { _wdAlias = a })++-- | The user name for the service account.+wdCustomerUserName :: Lens' WorkspaceDirectory (Maybe Text)+wdCustomerUserName =+    lens _wdCustomerUserName (\s a -> s { _wdCustomerUserName = a })++-- | The directory identifier.+wdDirectoryId :: Lens' WorkspaceDirectory (Maybe Text)+wdDirectoryId = lens _wdDirectoryId (\s a -> s { _wdDirectoryId = a })++-- | The name of the directory.+wdDirectoryName :: Lens' WorkspaceDirectory (Maybe Text)+wdDirectoryName = lens _wdDirectoryName (\s a -> s { _wdDirectoryName = a })++-- | The directory type.+wdDirectoryType :: Lens' WorkspaceDirectory (Maybe WorkspaceDirectoryType)+wdDirectoryType = lens _wdDirectoryType (\s a -> s { _wdDirectoryType = a })++-- | An array of strings that contains the IP addresses of the DNS servers for the+-- directory.+wdDnsIpAddresses :: Lens' WorkspaceDirectory [Text]+wdDnsIpAddresses = lens _wdDnsIpAddresses (\s a -> s { _wdDnsIpAddresses = a }) . _List++-- | The identifier of the IAM role. This is the role that allows Amazon+-- WorkSpaces to make calls to other services, such as Amazon EC2, on your+-- behalf.+wdIamRoleId :: Lens' WorkspaceDirectory (Maybe Text)+wdIamRoleId = lens _wdIamRoleId (\s a -> s { _wdIamRoleId = a })++-- | The registration code for the directory. This is the code that users enter in+-- their Amazon WorkSpaces client application to connect to the directory.+wdRegistrationCode :: Lens' WorkspaceDirectory (Maybe Text)+wdRegistrationCode =+    lens _wdRegistrationCode (\s a -> s { _wdRegistrationCode = a })++-- | The state of the directory's registration with Amazon WorkSpaces+wdState :: Lens' WorkspaceDirectory (Maybe WorkspaceDirectoryState)+wdState = lens _wdState (\s a -> s { _wdState = a })++-- | An array of strings that contains the identifiers of the subnets used with+-- the directory.+wdSubnetIds :: Lens' WorkspaceDirectory [Text]+wdSubnetIds = lens _wdSubnetIds (\s a -> s { _wdSubnetIds = a }) . _List++-- | A structure that specifies the default creation properties for all WorkSpaces+-- in the directory.+wdWorkspaceCreationProperties :: Lens' WorkspaceDirectory (Maybe DefaultWorkspaceCreationProperties)+wdWorkspaceCreationProperties =+    lens _wdWorkspaceCreationProperties+        (\s a -> s { _wdWorkspaceCreationProperties = a })++-- | The identifier of the security group that is assigned to new WorkSpaces.+wdWorkspaceSecurityGroupId :: Lens' WorkspaceDirectory (Maybe Text)+wdWorkspaceSecurityGroupId =+    lens _wdWorkspaceSecurityGroupId+        (\s a -> s { _wdWorkspaceSecurityGroupId = a })++instance FromJSON WorkspaceDirectory where+    parseJSON = withObject "WorkspaceDirectory" $ \o -> WorkspaceDirectory+        <$> o .:? "Alias"+        <*> o .:? "CustomerUserName"+        <*> o .:? "DirectoryId"+        <*> o .:? "DirectoryName"+        <*> o .:? "DirectoryType"+        <*> o .:? "DnsIpAddresses" .!= mempty+        <*> o .:? "IamRoleId"+        <*> o .:? "RegistrationCode"+        <*> o .:? "State"+        <*> o .:? "SubnetIds" .!= mempty+        <*> o .:? "WorkspaceCreationProperties"+        <*> o .:? "WorkspaceSecurityGroupId"++instance ToJSON WorkspaceDirectory where+    toJSON WorkspaceDirectory{..} = object+        [ "DirectoryId"                 .= _wdDirectoryId+        , "Alias"                       .= _wdAlias+        , "DirectoryName"               .= _wdDirectoryName+        , "RegistrationCode"            .= _wdRegistrationCode+        , "SubnetIds"                   .= _wdSubnetIds+        , "DnsIpAddresses"              .= _wdDnsIpAddresses+        , "CustomerUserName"            .= _wdCustomerUserName+        , "IamRoleId"                   .= _wdIamRoleId+        , "DirectoryType"               .= _wdDirectoryType+        , "WorkspaceSecurityGroupId"    .= _wdWorkspaceSecurityGroupId+        , "State"                       .= _wdState+        , "WorkspaceCreationProperties" .= _wdWorkspaceCreationProperties+        ]++data Compute+    = Performance -- ^ PERFORMANCE+    | Standard    -- ^ STANDARD+    | Value       -- ^ VALUE+      deriving (Eq, Ord, Read, Show, Generic, Enum)++instance Hashable Compute++instance FromText Compute where+    parser = takeLowerText >>= \case+        "performance" -> pure Performance+        "standard"    -> pure Standard+        "value"       -> pure Value+        e             -> fail $+            "Failure parsing Compute from " ++ show e++instance ToText Compute where+    toText = \case+        Performance -> "PERFORMANCE"+        Standard    -> "STANDARD"+        Value       -> "VALUE"++instance ToByteString Compute+instance ToHeader     Compute+instance ToQuery      Compute++instance FromJSON Compute where+    parseJSON = parseJSONText "Compute"++instance ToJSON Compute where+    toJSON = toJSONText++data Workspace = Workspace+    { _w1BundleId     :: Maybe Text+    , _w1DirectoryId  :: Maybe Text+    , _w1ErrorCode    :: Maybe Text+    , _w1ErrorMessage :: Maybe Text+    , _w1IpAddress    :: Maybe Text+    , _w1State        :: Maybe WorkspaceState+    , _w1SubnetId     :: Maybe Text+    , _w1UserName     :: Maybe Text+    , _w1WorkspaceId  :: Maybe Text+    } deriving (Eq, Read, Show)++-- | 'Workspace' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'w1BundleId' @::@ 'Maybe' 'Text'+--+-- * 'w1DirectoryId' @::@ 'Maybe' 'Text'+--+-- * 'w1ErrorCode' @::@ 'Maybe' 'Text'+--+-- * 'w1ErrorMessage' @::@ 'Maybe' 'Text'+--+-- * 'w1IpAddress' @::@ 'Maybe' 'Text'+--+-- * 'w1State' @::@ 'Maybe' 'WorkspaceState'+--+-- * 'w1SubnetId' @::@ 'Maybe' 'Text'+--+-- * 'w1UserName' @::@ 'Maybe' 'Text'+--+-- * 'w1WorkspaceId' @::@ 'Maybe' 'Text'+--+workspace :: Workspace+workspace = Workspace+    { _w1WorkspaceId  = Nothing+    , _w1DirectoryId  = Nothing+    , _w1UserName     = Nothing+    , _w1IpAddress    = Nothing+    , _w1State        = Nothing+    , _w1BundleId     = Nothing+    , _w1SubnetId     = Nothing+    , _w1ErrorMessage = Nothing+    , _w1ErrorCode    = Nothing+    }++-- | The identifier of the bundle that the WorkSpace was created from.+w1BundleId :: Lens' Workspace (Maybe Text)+w1BundleId = lens _w1BundleId (\s a -> s { _w1BundleId = a })++-- | The identifier of the AWS Directory Service directory that the WorkSpace+-- belongs to.+w1DirectoryId :: Lens' Workspace (Maybe Text)+w1DirectoryId = lens _w1DirectoryId (\s a -> s { _w1DirectoryId = a })++-- | If the WorkSpace could not be created, this contains the error code.+w1ErrorCode :: Lens' Workspace (Maybe Text)+w1ErrorCode = lens _w1ErrorCode (\s a -> s { _w1ErrorCode = a })++-- | If the WorkSpace could not be created, this contains a textual error message+-- that describes the failure.+w1ErrorMessage :: Lens' Workspace (Maybe Text)+w1ErrorMessage = lens _w1ErrorMessage (\s a -> s { _w1ErrorMessage = a })++-- | The IP address of the WorkSpace.+w1IpAddress :: Lens' Workspace (Maybe Text)+w1IpAddress = lens _w1IpAddress (\s a -> s { _w1IpAddress = a })++-- | The operational state of the WorkSpace.+w1State :: Lens' Workspace (Maybe WorkspaceState)+w1State = lens _w1State (\s a -> s { _w1State = a })++-- | The identifier of the subnet that the WorkSpace is in.+w1SubnetId :: Lens' Workspace (Maybe Text)+w1SubnetId = lens _w1SubnetId (\s a -> s { _w1SubnetId = a })++-- | The user that the WorkSpace is assigned to.+w1UserName :: Lens' Workspace (Maybe Text)+w1UserName = lens _w1UserName (\s a -> s { _w1UserName = a })++-- | The identifier of the WorkSpace.+w1WorkspaceId :: Lens' Workspace (Maybe Text)+w1WorkspaceId = lens _w1WorkspaceId (\s a -> s { _w1WorkspaceId = a })++instance FromJSON Workspace where+    parseJSON = withObject "Workspace" $ \o -> Workspace+        <$> o .:? "BundleId"+        <*> o .:? "DirectoryId"+        <*> o .:? "ErrorCode"+        <*> o .:? "ErrorMessage"+        <*> o .:? "IpAddress"+        <*> o .:? "State"+        <*> o .:? "SubnetId"+        <*> o .:? "UserName"+        <*> o .:? "WorkspaceId"++instance ToJSON Workspace where+    toJSON Workspace{..} = object+        [ "WorkspaceId"  .= _w1WorkspaceId+        , "DirectoryId"  .= _w1DirectoryId+        , "UserName"     .= _w1UserName+        , "IpAddress"    .= _w1IpAddress+        , "State"        .= _w1State+        , "BundleId"     .= _w1BundleId+        , "SubnetId"     .= _w1SubnetId+        , "ErrorMessage" .= _w1ErrorMessage+        , "ErrorCode"    .= _w1ErrorCode+        ]++newtype RebuildRequest = RebuildRequest+    { _rWorkspaceId :: Text+    } deriving (Eq, Ord, Read, Show, Monoid, IsString)++-- | 'RebuildRequest' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'rWorkspaceId' @::@ 'Text'+--+rebuildRequest :: Text -- ^ 'rWorkspaceId'+               -> RebuildRequest+rebuildRequest p1 = RebuildRequest+    { _rWorkspaceId = p1+    }++-- | The identifier of the WorkSpace to rebuild.+rWorkspaceId :: Lens' RebuildRequest Text+rWorkspaceId = lens _rWorkspaceId (\s a -> s { _rWorkspaceId = a })++instance FromJSON RebuildRequest where+    parseJSON = withObject "RebuildRequest" $ \o -> RebuildRequest+        <$> o .:  "WorkspaceId"++instance ToJSON RebuildRequest where+    toJSON RebuildRequest{..} = object+        [ "WorkspaceId" .= _rWorkspaceId+        ]++data FailedCreateWorkspaceRequest = FailedCreateWorkspaceRequest+    { _fcwErrorCode        :: Maybe Text+    , _fcwErrorMessage     :: Maybe Text+    , _fcwWorkspaceRequest :: Maybe WorkspaceRequest+    } deriving (Eq, Read, Show)++-- | 'FailedCreateWorkspaceRequest' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'fcwErrorCode' @::@ 'Maybe' 'Text'+--+-- * 'fcwErrorMessage' @::@ 'Maybe' 'Text'+--+-- * 'fcwWorkspaceRequest' @::@ 'Maybe' 'WorkspaceRequest'+--+failedCreateWorkspaceRequest :: FailedCreateWorkspaceRequest+failedCreateWorkspaceRequest = FailedCreateWorkspaceRequest+    { _fcwWorkspaceRequest = Nothing+    , _fcwErrorCode        = Nothing+    , _fcwErrorMessage     = Nothing+    }++-- | The error code.+fcwErrorCode :: Lens' FailedCreateWorkspaceRequest (Maybe Text)+fcwErrorCode = lens _fcwErrorCode (\s a -> s { _fcwErrorCode = a })++-- | The textual error message.+fcwErrorMessage :: Lens' FailedCreateWorkspaceRequest (Maybe Text)+fcwErrorMessage = lens _fcwErrorMessage (\s a -> s { _fcwErrorMessage = a })++-- | A 'WorkspaceRequest' object that contains the information about the WorkSpace+-- that could not be created.+fcwWorkspaceRequest :: Lens' FailedCreateWorkspaceRequest (Maybe WorkspaceRequest)+fcwWorkspaceRequest =+    lens _fcwWorkspaceRequest (\s a -> s { _fcwWorkspaceRequest = a })++instance FromJSON FailedCreateWorkspaceRequest where+    parseJSON = withObject "FailedCreateWorkspaceRequest" $ \o -> FailedCreateWorkspaceRequest+        <$> o .:? "ErrorCode"+        <*> o .:? "ErrorMessage"+        <*> o .:? "WorkspaceRequest"++instance ToJSON FailedCreateWorkspaceRequest where+    toJSON FailedCreateWorkspaceRequest{..} = object+        [ "WorkspaceRequest" .= _fcwWorkspaceRequest+        , "ErrorCode"        .= _fcwErrorCode+        , "ErrorMessage"     .= _fcwErrorMessage+        ]++data WorkspaceDirectoryState+    = Deregistered  -- ^ DEREGISTERED+    | Deregistering -- ^ DEREGISTERING+    | Error         -- ^ ERROR+    | Registered    -- ^ REGISTERED+    | Registering   -- ^ REGISTERING+      deriving (Eq, Ord, Read, Show, Generic, Enum)++instance Hashable WorkspaceDirectoryState++instance FromText WorkspaceDirectoryState where+    parser = takeLowerText >>= \case+        "deregistered"  -> pure Deregistered+        "deregistering" -> pure Deregistering+        "error"         -> pure Error+        "registered"    -> pure Registered+        "registering"   -> pure Registering+        e               -> fail $+            "Failure parsing WorkspaceDirectoryState from " ++ show e++instance ToText WorkspaceDirectoryState where+    toText = \case+        Deregistered  -> "DEREGISTERED"+        Deregistering -> "DEREGISTERING"+        Error         -> "ERROR"+        Registered    -> "REGISTERED"+        Registering   -> "REGISTERING"++instance ToByteString WorkspaceDirectoryState+instance ToHeader     WorkspaceDirectoryState+instance ToQuery      WorkspaceDirectoryState++instance FromJSON WorkspaceDirectoryState where+    parseJSON = parseJSONText "WorkspaceDirectoryState"++instance ToJSON WorkspaceDirectoryState where+    toJSON = toJSONText++data FailedWorkspaceChangeRequest = FailedWorkspaceChangeRequest+    { _fwcErrorCode    :: Maybe Text+    , _fwcErrorMessage :: Maybe Text+    , _fwcWorkspaceId  :: Maybe Text+    } deriving (Eq, Ord, Read, Show)++-- | 'FailedWorkspaceChangeRequest' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'fwcErrorCode' @::@ 'Maybe' 'Text'+--+-- * 'fwcErrorMessage' @::@ 'Maybe' 'Text'+--+-- * 'fwcWorkspaceId' @::@ 'Maybe' 'Text'+--+failedWorkspaceChangeRequest :: FailedWorkspaceChangeRequest+failedWorkspaceChangeRequest = FailedWorkspaceChangeRequest+    { _fwcWorkspaceId  = Nothing+    , _fwcErrorCode    = Nothing+    , _fwcErrorMessage = Nothing+    }++-- | The error code.+fwcErrorCode :: Lens' FailedWorkspaceChangeRequest (Maybe Text)+fwcErrorCode = lens _fwcErrorCode (\s a -> s { _fwcErrorCode = a })++-- | The textual error message.+fwcErrorMessage :: Lens' FailedWorkspaceChangeRequest (Maybe Text)+fwcErrorMessage = lens _fwcErrorMessage (\s a -> s { _fwcErrorMessage = a })++-- | The identifier of the WorkSpace.+fwcWorkspaceId :: Lens' FailedWorkspaceChangeRequest (Maybe Text)+fwcWorkspaceId = lens _fwcWorkspaceId (\s a -> s { _fwcWorkspaceId = a })++instance FromJSON FailedWorkspaceChangeRequest where+    parseJSON = withObject "FailedWorkspaceChangeRequest" $ \o -> FailedWorkspaceChangeRequest+        <$> o .:? "ErrorCode"+        <*> o .:? "ErrorMessage"+        <*> o .:? "WorkspaceId"++instance ToJSON FailedWorkspaceChangeRequest where+    toJSON FailedWorkspaceChangeRequest{..} = object+        [ "WorkspaceId"  .= _fwcWorkspaceId+        , "ErrorCode"    .= _fwcErrorCode+        , "ErrorMessage" .= _fwcErrorMessage+        ]++data WorkspaceDirectoryType+    = AdConnector -- ^ AD_CONNECTOR+    | SimpleAd    -- ^ SIMPLE_AD+      deriving (Eq, Ord, Read, Show, Generic, Enum)++instance Hashable WorkspaceDirectoryType++instance FromText WorkspaceDirectoryType where+    parser = takeLowerText >>= \case+        "ad_connector" -> pure AdConnector+        "simple_ad"    -> pure SimpleAd+        e              -> fail $+            "Failure parsing WorkspaceDirectoryType from " ++ show e++instance ToText WorkspaceDirectoryType where+    toText = \case+        AdConnector -> "AD_CONNECTOR"+        SimpleAd    -> "SIMPLE_AD"++instance ToByteString WorkspaceDirectoryType+instance ToHeader     WorkspaceDirectoryType+instance ToQuery      WorkspaceDirectoryType++instance FromJSON WorkspaceDirectoryType where+    parseJSON = parseJSONText "WorkspaceDirectoryType"++instance ToJSON WorkspaceDirectoryType where+    toJSON = toJSONText++data WorkspaceState+    = WSAvailable   -- ^ AVAILABLE+    | WSError       -- ^ ERROR+    | WSImpaired    -- ^ IMPAIRED+    | WSPending     -- ^ PENDING+    | WSRebooting   -- ^ REBOOTING+    | WSRebuilding  -- ^ REBUILDING+    | WSSuspended   -- ^ SUSPENDED+    | WSTerminated  -- ^ TERMINATED+    | WSTerminating -- ^ TERMINATING+    | WSUnhealthy   -- ^ UNHEALTHY+      deriving (Eq, Ord, Read, Show, Generic, Enum)++instance Hashable WorkspaceState++instance FromText WorkspaceState where+    parser = takeLowerText >>= \case+        "available"   -> pure WSAvailable+        "error"       -> pure WSError+        "impaired"    -> pure WSImpaired+        "pending"     -> pure WSPending+        "rebooting"   -> pure WSRebooting+        "rebuilding"  -> pure WSRebuilding+        "suspended"   -> pure WSSuspended+        "terminated"  -> pure WSTerminated+        "terminating" -> pure WSTerminating+        "unhealthy"   -> pure WSUnhealthy+        e             -> fail $+            "Failure parsing WorkspaceState from " ++ show e++instance ToText WorkspaceState where+    toText = \case+        WSAvailable   -> "AVAILABLE"+        WSError       -> "ERROR"+        WSImpaired    -> "IMPAIRED"+        WSPending     -> "PENDING"+        WSRebooting   -> "REBOOTING"+        WSRebuilding  -> "REBUILDING"+        WSSuspended   -> "SUSPENDED"+        WSTerminated  -> "TERMINATED"+        WSTerminating -> "TERMINATING"+        WSUnhealthy   -> "UNHEALTHY"++instance ToByteString WorkspaceState+instance ToHeader     WorkspaceState+instance ToQuery      WorkspaceState++instance FromJSON WorkspaceState where+    parseJSON = parseJSONText "WorkspaceState"++instance ToJSON WorkspaceState where+    toJSON = toJSONText++newtype ComputeType = ComputeType+    { _ctName :: Maybe Compute+    } deriving (Eq, Read, Show)++-- | 'ComputeType' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'ctName' @::@ 'Maybe' 'Compute'+--+computeType :: ComputeType+computeType = ComputeType+    { _ctName = Nothing+    }++-- | The name of the compute type for the bundle.+ctName :: Lens' ComputeType (Maybe Compute)+ctName = lens _ctName (\s a -> s { _ctName = a })++instance FromJSON ComputeType where+    parseJSON = withObject "ComputeType" $ \o -> ComputeType+        <$> o .:? "Name"++instance ToJSON ComputeType where+    toJSON ComputeType{..} = object+        [ "Name" .= _ctName+        ]++newtype RebootRequest = RebootRequest+    { _r1WorkspaceId :: Text+    } deriving (Eq, Ord, Read, Show, Monoid, IsString)++-- | 'RebootRequest' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'r1WorkspaceId' @::@ 'Text'+--+rebootRequest :: Text -- ^ 'r1WorkspaceId'+              -> RebootRequest+rebootRequest p1 = RebootRequest+    { _r1WorkspaceId = p1+    }++-- | The identifier of the WorkSpace to reboot.+r1WorkspaceId :: Lens' RebootRequest Text+r1WorkspaceId = lens _r1WorkspaceId (\s a -> s { _r1WorkspaceId = a })++instance FromJSON RebootRequest where+    parseJSON = withObject "RebootRequest" $ \o -> RebootRequest+        <$> o .:  "WorkspaceId"++instance ToJSON RebootRequest where+    toJSON RebootRequest{..} = object+        [ "WorkspaceId" .= _r1WorkspaceId+        ]++newtype UserStorage = UserStorage+    { _usCapacity :: Maybe Text+    } deriving (Eq, Ord, Read, Show, Monoid)++-- | 'UserStorage' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'usCapacity' @::@ 'Maybe' 'Text'+--+userStorage :: UserStorage+userStorage = UserStorage+    { _usCapacity = Nothing+    }++-- | The amount of user storage for the bundle.+usCapacity :: Lens' UserStorage (Maybe Text)+usCapacity = lens _usCapacity (\s a -> s { _usCapacity = a })++instance FromJSON UserStorage where+    parseJSON = withObject "UserStorage" $ \o -> UserStorage+        <$> o .:? "Capacity"++instance ToJSON UserStorage where+    toJSON UserStorage{..} = object+        [ "Capacity" .= _usCapacity+        ]++newtype TerminateRequest = TerminateRequest+    { _tWorkspaceId :: Text+    } deriving (Eq, Ord, Read, Show, Monoid, IsString)++-- | 'TerminateRequest' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'tWorkspaceId' @::@ 'Text'+--+terminateRequest :: Text -- ^ 'tWorkspaceId'+                 -> TerminateRequest+terminateRequest p1 = TerminateRequest+    { _tWorkspaceId = p1+    }++-- | The identifier of the WorkSpace to terminate.+tWorkspaceId :: Lens' TerminateRequest Text+tWorkspaceId = lens _tWorkspaceId (\s a -> s { _tWorkspaceId = a })++instance FromJSON TerminateRequest where+    parseJSON = withObject "TerminateRequest" $ \o -> TerminateRequest+        <$> o .:  "WorkspaceId"++instance ToJSON TerminateRequest where+    toJSON TerminateRequest{..} = object+        [ "WorkspaceId" .= _tWorkspaceId+        ]++data DefaultWorkspaceCreationProperties = DefaultWorkspaceCreationProperties+    { _dwcpCustomSecurityGroupId           :: Maybe Text+    , _dwcpDefaultOu                       :: Maybe Text+    , _dwcpEnableInternetAccess            :: Maybe Bool+    , _dwcpEnableWorkDocs                  :: Maybe Bool+    , _dwcpUserEnabledAsLocalAdministrator :: Maybe Bool+    } deriving (Eq, Ord, Read, Show)++-- | 'DefaultWorkspaceCreationProperties' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'dwcpCustomSecurityGroupId' @::@ 'Maybe' 'Text'+--+-- * 'dwcpDefaultOu' @::@ 'Maybe' 'Text'+--+-- * 'dwcpEnableInternetAccess' @::@ 'Maybe' 'Bool'+--+-- * 'dwcpEnableWorkDocs' @::@ 'Maybe' 'Bool'+--+-- * 'dwcpUserEnabledAsLocalAdministrator' @::@ 'Maybe' 'Bool'+--+defaultWorkspaceCreationProperties :: DefaultWorkspaceCreationProperties+defaultWorkspaceCreationProperties = DefaultWorkspaceCreationProperties+    { _dwcpEnableWorkDocs                  = Nothing+    , _dwcpEnableInternetAccess            = Nothing+    , _dwcpDefaultOu                       = Nothing+    , _dwcpCustomSecurityGroupId           = Nothing+    , _dwcpUserEnabledAsLocalAdministrator = Nothing+    }++-- | The identifier of any custom security groups that are applied to the+-- WorkSpaces when they are created.+dwcpCustomSecurityGroupId :: Lens' DefaultWorkspaceCreationProperties (Maybe Text)+dwcpCustomSecurityGroupId =+    lens _dwcpCustomSecurityGroupId+        (\s a -> s { _dwcpCustomSecurityGroupId = a })++-- | The organizational unit (OU) in the directory that the WorkSpace machine+-- accounts are placed in.+dwcpDefaultOu :: Lens' DefaultWorkspaceCreationProperties (Maybe Text)+dwcpDefaultOu = lens _dwcpDefaultOu (\s a -> s { _dwcpDefaultOu = a })++-- | A public IP address will be attached to all WorkSpaces that are created or+-- rebuilt.+dwcpEnableInternetAccess :: Lens' DefaultWorkspaceCreationProperties (Maybe Bool)+dwcpEnableInternetAccess =+    lens _dwcpEnableInternetAccess+        (\s a -> s { _dwcpEnableInternetAccess = a })++-- | Specifies if the directory is enabled for Amazon WorkDocs.+dwcpEnableWorkDocs :: Lens' DefaultWorkspaceCreationProperties (Maybe Bool)+dwcpEnableWorkDocs =+    lens _dwcpEnableWorkDocs (\s a -> s { _dwcpEnableWorkDocs = a })++-- | The WorkSpace user is an administrator on the WorkSpace.+dwcpUserEnabledAsLocalAdministrator :: Lens' DefaultWorkspaceCreationProperties (Maybe Bool)+dwcpUserEnabledAsLocalAdministrator =+    lens _dwcpUserEnabledAsLocalAdministrator+        (\s a -> s { _dwcpUserEnabledAsLocalAdministrator = a })++instance FromJSON DefaultWorkspaceCreationProperties where+    parseJSON = withObject "DefaultWorkspaceCreationProperties" $ \o -> DefaultWorkspaceCreationProperties+        <$> o .:? "CustomSecurityGroupId"+        <*> o .:? "DefaultOu"+        <*> o .:? "EnableInternetAccess"+        <*> o .:? "EnableWorkDocs"+        <*> o .:? "UserEnabledAsLocalAdministrator"++instance ToJSON DefaultWorkspaceCreationProperties where+    toJSON DefaultWorkspaceCreationProperties{..} = object+        [ "EnableWorkDocs"                  .= _dwcpEnableWorkDocs+        , "EnableInternetAccess"            .= _dwcpEnableInternetAccess+        , "DefaultOu"                       .= _dwcpDefaultOu+        , "CustomSecurityGroupId"           .= _dwcpCustomSecurityGroupId+        , "UserEnabledAsLocalAdministrator" .= _dwcpUserEnabledAsLocalAdministrator+        ]++data WorkspaceBundle = WorkspaceBundle+    { _wbBundleId    :: Maybe Text+    , _wbComputeType :: Maybe ComputeType+    , _wbDescription :: Maybe Text+    , _wbName        :: Maybe Text+    , _wbOwner       :: Maybe Text+    , _wbUserStorage :: Maybe UserStorage+    } deriving (Eq, Read, Show)++-- | 'WorkspaceBundle' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'wbBundleId' @::@ 'Maybe' 'Text'+--+-- * 'wbComputeType' @::@ 'Maybe' 'ComputeType'+--+-- * 'wbDescription' @::@ 'Maybe' 'Text'+--+-- * 'wbName' @::@ 'Maybe' 'Text'+--+-- * 'wbOwner' @::@ 'Maybe' 'Text'+--+-- * 'wbUserStorage' @::@ 'Maybe' 'UserStorage'+--+workspaceBundle :: WorkspaceBundle+workspaceBundle = WorkspaceBundle+    { _wbBundleId    = Nothing+    , _wbName        = Nothing+    , _wbOwner       = Nothing+    , _wbDescription = Nothing+    , _wbUserStorage = Nothing+    , _wbComputeType = Nothing+    }++-- | The bundle identifier.+wbBundleId :: Lens' WorkspaceBundle (Maybe Text)+wbBundleId = lens _wbBundleId (\s a -> s { _wbBundleId = a })++-- | A 'ComputeType' object that specifies the compute type for the bundle.+wbComputeType :: Lens' WorkspaceBundle (Maybe ComputeType)+wbComputeType = lens _wbComputeType (\s a -> s { _wbComputeType = a })++-- | The bundle description.+wbDescription :: Lens' WorkspaceBundle (Maybe Text)+wbDescription = lens _wbDescription (\s a -> s { _wbDescription = a })++-- | The name of the bundle.+wbName :: Lens' WorkspaceBundle (Maybe Text)+wbName = lens _wbName (\s a -> s { _wbName = a })++-- | The owner of the bundle. This contains the owner's account identifier, or 'AMAZON' if the bundle is provided by AWS.+wbOwner :: Lens' WorkspaceBundle (Maybe Text)+wbOwner = lens _wbOwner (\s a -> s { _wbOwner = a })++-- | A 'UserStorage' object that specifies the amount of user storage that the+-- bundle contains.+wbUserStorage :: Lens' WorkspaceBundle (Maybe UserStorage)+wbUserStorage = lens _wbUserStorage (\s a -> s { _wbUserStorage = a })++instance FromJSON WorkspaceBundle where+    parseJSON = withObject "WorkspaceBundle" $ \o -> WorkspaceBundle+        <$> o .:? "BundleId"+        <*> o .:? "ComputeType"+        <*> o .:? "Description"+        <*> o .:? "Name"+        <*> o .:? "Owner"+        <*> o .:? "UserStorage"++instance ToJSON WorkspaceBundle where+    toJSON WorkspaceBundle{..} = object+        [ "BundleId"    .= _wbBundleId+        , "Name"        .= _wbName+        , "Owner"       .= _wbOwner+        , "Description" .= _wbDescription+        , "UserStorage" .= _wbUserStorage+        , "ComputeType" .= _wbComputeType+        ]