packages feed

amazonka-s3 (empty) → 0.0.0

raw patch · 56 files changed

+12738/−0 lines, 56 filesdep +amazonka-coredep +basesetup-changed

Dependencies added: amazonka-core, base

Files

+ LICENSE view
@@ -0,0 +1,373 @@+Mozilla Public License Version 2.0+==================================++1. Definitions+--------------++1.1. "Contributor"+    means each individual or legal entity that creates, contributes to+    the creation of, or owns Covered Software.++1.2. "Contributor Version"+    means the combination of the Contributions of others (if any) used+    by a Contributor and that particular Contributor's Contribution.++1.3. "Contribution"+    means Covered Software of a particular Contributor.++1.4. "Covered Software"+    means Source Code Form to which the initial Contributor has attached+    the notice in Exhibit A, the Executable Form of such Source Code+    Form, and Modifications of such Source Code Form, in each case+    including portions thereof.++1.5. "Incompatible With Secondary Licenses"+    means++    (a) that the initial Contributor has attached the notice described+        in Exhibit B to the Covered Software; or++    (b) that the Covered Software was made available under the terms of+        version 1.1 or earlier of the License, but not also under the+        terms of a Secondary License.++1.6. "Executable Form"+    means any form of the work other than Source Code Form.++1.7. "Larger Work"+    means a work that combines Covered Software with other material, in+    a separate file or files, that is not Covered Software.++1.8. "License"+    means this document.++1.9. "Licensable"+    means having the right to grant, to the maximum extent possible,+    whether at the time of the initial grant or subsequently, any and+    all of the rights conveyed by this License.++1.10. "Modifications"+    means any of the following:++    (a) any file in Source Code Form that results from an addition to,+        deletion from, or modification of the contents of Covered+        Software; or++    (b) any new file in Source Code Form that contains any Covered+        Software.++1.11. "Patent Claims" of a Contributor+    means any patent claim(s), including without limitation, method,+    process, and apparatus claims, in any patent Licensable by such+    Contributor that would be infringed, but for the grant of the+    License, by the making, using, selling, offering for sale, having+    made, import, or transfer of either its Contributions or its+    Contributor Version.++1.12. "Secondary License"+    means either the GNU General Public License, Version 2.0, the GNU+    Lesser General Public License, Version 2.1, the GNU Affero General+    Public License, Version 3.0, or any later versions of those+    licenses.++1.13. "Source Code Form"+    means the form of the work preferred for making modifications.++1.14. "You" (or "Your")+    means an individual or a legal entity exercising rights under this+    License. For legal entities, "You" includes any entity that+    controls, is controlled by, or is under common control with You. For+    purposes of this definition, "control" means (a) the power, direct+    or indirect, to cause the direction or management of such entity,+    whether by contract or otherwise, or (b) ownership of more than+    fifty percent (50%) of the outstanding shares or beneficial+    ownership of such entity.++2. License Grants and Conditions+--------------------------------++2.1. Grants++Each Contributor hereby grants You a world-wide, royalty-free,+non-exclusive license:++(a) under intellectual property rights (other than patent or trademark)+    Licensable by such Contributor to use, reproduce, make available,+    modify, display, perform, distribute, and otherwise exploit its+    Contributions, either on an unmodified basis, with Modifications, or+    as part of a Larger Work; and++(b) under Patent Claims of such Contributor to make, use, sell, offer+    for sale, have made, import, and otherwise transfer either its+    Contributions or its Contributor Version.++2.2. Effective Date++The licenses granted in Section 2.1 with respect to any Contribution+become effective for each Contribution on the date the Contributor first+distributes such Contribution.++2.3. Limitations on Grant Scope++The licenses granted in this Section 2 are the only rights granted under+this License. No additional rights or licenses will be implied from the+distribution or licensing of Covered Software under this License.+Notwithstanding Section 2.1(b) above, no patent license is granted by a+Contributor:++(a) for any code that a Contributor has removed from Covered Software;+    or++(b) for infringements caused by: (i) Your and any other third party's+    modifications of Covered Software, or (ii) the combination of its+    Contributions with other software (except as part of its Contributor+    Version); or++(c) under Patent Claims infringed by Covered Software in the absence of+    its Contributions.++This License does not grant any rights in the trademarks, service marks,+or logos of any Contributor (except as may be necessary to comply with+the notice requirements in Section 3.4).++2.4. Subsequent Licenses++No Contributor makes additional grants as a result of Your choice to+distribute the Covered Software under a subsequent version of this+License (see Section 10.2) or under the terms of a Secondary License (if+permitted under the terms of Section 3.3).++2.5. Representation++Each Contributor represents that the Contributor believes its+Contributions are its original creation(s) or it has sufficient rights+to grant the rights to its Contributions conveyed by this License.++2.6. Fair Use++This License is not intended to limit any rights You have under+applicable copyright doctrines of fair use, fair dealing, or other+equivalents.++2.7. Conditions++Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted+in Section 2.1.++3. Responsibilities+-------------------++3.1. Distribution of Source Form++All distribution of Covered Software in Source Code Form, including any+Modifications that You create or to which You contribute, must be under+the terms of this License. You must inform recipients that the Source+Code Form of the Covered Software is governed by the terms of this+License, and how they can obtain a copy of this License. You may not+attempt to alter or restrict the recipients' rights in the Source Code+Form.++3.2. Distribution of Executable Form++If You distribute Covered Software in Executable Form then:++(a) such Covered Software must also be made available in Source Code+    Form, as described in Section 3.1, and You must inform recipients of+    the Executable Form how they can obtain a copy of such Source Code+    Form by reasonable means in a timely manner, at a charge no more+    than the cost of distribution to the recipient; and++(b) You may distribute such Executable Form under the terms of this+    License, or sublicense it under different terms, provided that the+    license for the Executable Form does not attempt to limit or alter+    the recipients' rights in the Source Code Form under this License.++3.3. Distribution of a Larger Work++You may create and distribute a Larger Work under terms of Your choice,+provided that You also comply with the requirements of this License for+the Covered Software. If the Larger Work is a combination of Covered+Software with a work governed by one or more Secondary Licenses, and the+Covered Software is not Incompatible With Secondary Licenses, this+License permits You to additionally distribute such Covered Software+under the terms of such Secondary License(s), so that the recipient of+the Larger Work may, at their option, further distribute the Covered+Software under the terms of either this License or such Secondary+License(s).++3.4. Notices++You may not remove or alter the substance of any license notices+(including copyright notices, patent notices, disclaimers of warranty,+or limitations of liability) contained within the Source Code Form of+the Covered Software, except that You may alter any license notices to+the extent required to remedy known factual inaccuracies.++3.5. Application of Additional Terms++You may choose to offer, and to charge a fee for, warranty, support,+indemnity or liability obligations to one or more recipients of Covered+Software. However, You may do so only on Your own behalf, and not on+behalf of any Contributor. You must make it absolutely clear that any+such warranty, support, indemnity, or liability obligation is offered by+You alone, and You hereby agree to indemnify every Contributor for any+liability incurred by such Contributor as a result of warranty, support,+indemnity or liability terms You offer. You may include additional+disclaimers of warranty and limitations of liability specific to any+jurisdiction.++4. Inability to Comply Due to Statute or Regulation+---------------------------------------------------++If it is impossible for You to comply with any of the terms of this+License with respect to some or all of the Covered Software due to+statute, judicial order, or regulation then You must: (a) comply with+the terms of this License to the maximum extent possible; and (b)+describe the limitations and the code they affect. Such description must+be placed in a text file included with all distributions of the Covered+Software under this License. Except to the extent prohibited by statute+or regulation, such description must be sufficiently detailed for a+recipient of ordinary skill to be able to understand it.++5. Termination+--------------++5.1. The rights granted under this License will terminate automatically+if You fail to comply with any of its terms. However, if You become+compliant, then the rights granted under this License from a particular+Contributor are reinstated (a) provisionally, unless and until such+Contributor explicitly and finally terminates Your grants, and (b) on an+ongoing basis, if such Contributor fails to notify You of the+non-compliance by some reasonable means prior to 60 days after You have+come back into compliance. Moreover, Your grants from a particular+Contributor are reinstated on an ongoing basis if such Contributor+notifies You of the non-compliance by some reasonable means, this is the+first time You have received notice of non-compliance with this License+from such Contributor, and You become compliant prior to 30 days after+Your receipt of the notice.++5.2. If You initiate litigation against any entity by asserting a patent+infringement claim (excluding declaratory judgment actions,+counter-claims, and cross-claims) alleging that a Contributor Version+directly or indirectly infringes any patent, then the rights granted to+You by any and all Contributors for the Covered Software under Section+2.1 of this License shall terminate.++5.3. In the event of termination under Sections 5.1 or 5.2 above, all+end user license agreements (excluding distributors and resellers) which+have been validly granted by You or Your distributors under this License+prior to termination shall survive termination.++************************************************************************+*                                                                      *+*  6. Disclaimer of Warranty                                           *+*  -------------------------                                           *+*                                                                      *+*  Covered Software is provided under this License on an "as is"       *+*  basis, without warranty of any kind, either expressed, implied, or  *+*  statutory, including, without limitation, warranties that the       *+*  Covered Software is free of defects, merchantable, fit for a        *+*  particular purpose or non-infringing. The entire risk as to the     *+*  quality and performance of the Covered Software is with You.        *+*  Should any Covered Software prove defective in any respect, You     *+*  (not any Contributor) assume the cost of any necessary servicing,   *+*  repair, or correction. This disclaimer of warranty constitutes an   *+*  essential part of this License. No use of any Covered Software is   *+*  authorized under this License except under this disclaimer.         *+*                                                                      *+************************************************************************++************************************************************************+*                                                                      *+*  7. Limitation of Liability                                          *+*  --------------------------                                          *+*                                                                      *+*  Under no circumstances and under no legal theory, whether tort      *+*  (including negligence), contract, or otherwise, shall any           *+*  Contributor, or anyone who distributes Covered Software as          *+*  permitted above, be liable to You for any direct, indirect,         *+*  special, incidental, or consequential damages of any character      *+*  including, without limitation, damages for lost profits, loss of    *+*  goodwill, work stoppage, computer failure or malfunction, or any    *+*  and all other commercial damages or losses, even if such party      *+*  shall have been informed of the possibility of such damages. This   *+*  limitation of liability shall not apply to liability for death or   *+*  personal injury resulting from such party's negligence to the       *+*  extent applicable law prohibits such limitation. Some               *+*  jurisdictions do not allow the exclusion or limitation of           *+*  incidental or consequential damages, so this exclusion and          *+*  limitation may not apply to You.                                    *+*                                                                      *+************************************************************************++8. Litigation+-------------++Any litigation relating to this License may be brought only in the+courts of a jurisdiction where the defendant maintains its principal+place of business and such litigation shall be governed by laws of that+jurisdiction, without reference to its conflict-of-law provisions.+Nothing in this Section shall prevent a party's ability to bring+cross-claims or counter-claims.++9. Miscellaneous+----------------++This License represents the complete agreement concerning the subject+matter hereof. If any provision of this License is held to be+unenforceable, such provision shall be reformed only to the extent+necessary to make it enforceable. Any law or regulation which provides+that the language of a contract shall be construed against the drafter+shall not be used to construe this License against a Contributor.++10. Versions of the License+---------------------------++10.1. New Versions++Mozilla Foundation is the license steward. Except as provided in Section+10.3, no one other than the license steward has the right to modify or+publish new versions of this License. Each version will be given a+distinguishing version number.++10.2. Effect of New Versions++You may distribute the Covered Software under the terms of the version+of the License under which You originally received the Covered Software,+or under the terms of any subsequent version published by the license+steward.++10.3. Modified Versions++If you create software not governed by this License, and you want to+create a new license for such software, you may create and use a+modified version of this License if you rename the license and remove+any references to the name of the license steward (except to note that+such modified license differs from this License).++10.4. Distributing Source Code Form that is Incompatible With Secondary+Licenses++If You choose to distribute Source Code Form that is Incompatible With+Secondary Licenses under the terms of this version of the License, the+notice described in Exhibit B of this License must be attached.++Exhibit A - Source Code Form License Notice+-------------------------------------------++  This Source Code Form is subject to the terms of the Mozilla Public+  License, v. 2.0. If a copy of the MPL was not distributed with this+  file, You can obtain one at http://mozilla.org/MPL/2.0/.++If it is not possible or desirable to put the notice in a particular+file, then You may include the notice in a location (such as a LICENSE+file in a relevant directory) where a recipient would be likely to look+for such a notice.++You may add additional accurate notices of copyright ownership.++Exhibit B - "Incompatible With Secondary Licenses" Notice+---------------------------------------------------------++  This Source Code Form is "Incompatible With Secondary Licenses", as+  defined by the Mozilla Public License, v. 2.0.
+ README.md view
@@ -0,0 +1,26 @@+# Amazon Simple Storage Service 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 Simple Storage Service is storage for the Internet. Amazon S3 has a simple web services interface that you can use to store and retrieve any amount of data, at any time, from anywhere on the web. It gives any developer access to the same highly scalable, reliable, fast, inexpensive data storage infrastructure that Amazon uses to run its own global network of web sites. The service aims to maximize benefits of scale and to pass those benefits on to developers.++Documentation is available via [Hackage](http://hackage.haskell.org/package/amazonka-s3)+and [AWS API Reference](http://docs.aws.amazon.com/AmazonS3/latest/API/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-s3` is released under the [Mozilla Public License Version 2.0](http://www.mozilla.org/MPL/).
+ Setup.hs view
@@ -0,0 +1,2 @@+import Distribution.Simple+main = defaultMain
+ amazonka-s3.cabal view
@@ -0,0 +1,97 @@+name:                  amazonka-s3+version:               0.0.0+synopsis:              Amazon Simple Storage Service SDK.+homepage:              https://github.com/brendanhay/amazonka+license:               OtherLicense+license-file:          LICENSE+author:                Brendan Hay+maintainer:            Brendan Hay <brendan.g.hay@gmail.com>+copyright:             Copyright (c) 2013-2014 Brendan Hay+category:              Network, AWS, Cloud+build-type:            Simple+extra-source-files:    README.md+cabal-version:         >= 1.10++description:+    Amazon Simple Storage Service is storage for the Internet. Amazon S3+    has a simple web services interface that you can use to store and+    retrieve any amount of data, at any time, from anywhere on the web. It+    gives any developer access to the same highly scalable, reliable, fast,+    inexpensive data storage infrastructure that Amazon uses to run its own+    global network of web sites. The service aims to maximize benefits of+    scale and to pass those benefits on to developers.+    .+    /See:/ <http://docs.aws.amazon.com/AmazonS3/latest/API/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.S3+        , Network.AWS.S3.AbortMultipartUpload+        , Network.AWS.S3.CompleteMultipartUpload+        , Network.AWS.S3.CopyObject+        , Network.AWS.S3.CreateBucket+        , Network.AWS.S3.CreateMultipartUpload+        , Network.AWS.S3.DeleteBucket+        , Network.AWS.S3.DeleteBucketCors+        , Network.AWS.S3.DeleteBucketLifecycle+        , Network.AWS.S3.DeleteBucketPolicy+        , Network.AWS.S3.DeleteBucketTagging+        , Network.AWS.S3.DeleteBucketWebsite+        , Network.AWS.S3.DeleteObject+        , Network.AWS.S3.DeleteObjects+        , Network.AWS.S3.GetBucketAcl+        , Network.AWS.S3.GetBucketCors+        , Network.AWS.S3.GetBucketLifecycle+        , Network.AWS.S3.GetBucketLocation+        , Network.AWS.S3.GetBucketLogging+        , Network.AWS.S3.GetBucketNotification+        , Network.AWS.S3.GetBucketPolicy+        , Network.AWS.S3.GetBucketRequestPayment+        , Network.AWS.S3.GetBucketTagging+        , Network.AWS.S3.GetBucketVersioning+        , Network.AWS.S3.GetBucketWebsite+        , Network.AWS.S3.GetObject+        , Network.AWS.S3.GetObjectAcl+        , Network.AWS.S3.GetObjectTorrent+        , Network.AWS.S3.HeadBucket+        , Network.AWS.S3.HeadObject+        , Network.AWS.S3.ListBuckets+        , Network.AWS.S3.ListMultipartUploads+        , Network.AWS.S3.ListObjectVersions+        , Network.AWS.S3.ListObjects+        , Network.AWS.S3.ListParts+        , Network.AWS.S3.PutBucketAcl+        , Network.AWS.S3.PutBucketCors+        , Network.AWS.S3.PutBucketLifecycle+        , Network.AWS.S3.PutBucketLogging+        , Network.AWS.S3.PutBucketNotification+        , Network.AWS.S3.PutBucketPolicy+        , Network.AWS.S3.PutBucketRequestPayment+        , Network.AWS.S3.PutBucketTagging+        , Network.AWS.S3.PutBucketVersioning+        , Network.AWS.S3.PutBucketWebsite+        , Network.AWS.S3.PutObject+        , Network.AWS.S3.PutObjectAcl+        , Network.AWS.S3.RestoreObject+        , Network.AWS.S3.Types+        , Network.AWS.S3.UploadPart+        , Network.AWS.S3.UploadPartCopy++    other-modules:+          Network.AWS.S3.Internal++    build-depends:+          amazonka-core+        , base          >= 4.7 && < 5
+ gen/Network/AWS/S3.hs view
@@ -0,0 +1,120 @@+-- Module      : Network.AWS.S3+-- Copyright   : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>+-- License     : This Source Code Form is subject to the terms of+--               the Mozilla Public License, v. 2.0.+--               A copy of the MPL can be found in the LICENSE file or+--               you can obtain it at http://mozilla.org/MPL/2.0/.+-- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability   : experimental+-- Portability : non-portable (GHC extensions)++-- | Amazon Simple Storage Service is storage for the Internet. Amazon S3 has a+-- simple web services interface that you can use to store and retrieve any+-- amount of data, at any time, from anywhere on the web. It gives any+-- developer access to the same highly scalable, reliable, fast, inexpensive+-- data storage infrastructure that Amazon uses to run its own global network+-- of web sites. The service aims to maximize benefits of scale and to pass+-- those benefits on to developers.+module Network.AWS.S3+    ( module Network.AWS.S3.AbortMultipartUpload+    , module Network.AWS.S3.CompleteMultipartUpload+    , module Network.AWS.S3.CopyObject+    , module Network.AWS.S3.CreateBucket+    , module Network.AWS.S3.CreateMultipartUpload+    , module Network.AWS.S3.DeleteBucket+    , module Network.AWS.S3.DeleteBucketCors+    , module Network.AWS.S3.DeleteBucketLifecycle+    , module Network.AWS.S3.DeleteBucketPolicy+    , module Network.AWS.S3.DeleteBucketTagging+    , module Network.AWS.S3.DeleteBucketWebsite+    , module Network.AWS.S3.DeleteObject+    , module Network.AWS.S3.DeleteObjects+    , module Network.AWS.S3.GetBucketAcl+    , module Network.AWS.S3.GetBucketCors+    , module Network.AWS.S3.GetBucketLifecycle+    , module Network.AWS.S3.GetBucketLocation+    , module Network.AWS.S3.GetBucketLogging+    , module Network.AWS.S3.GetBucketNotification+    , module Network.AWS.S3.GetBucketPolicy+    , module Network.AWS.S3.GetBucketRequestPayment+    , module Network.AWS.S3.GetBucketTagging+    , module Network.AWS.S3.GetBucketVersioning+    , module Network.AWS.S3.GetBucketWebsite+    , module Network.AWS.S3.GetObject+    , module Network.AWS.S3.GetObjectAcl+    , module Network.AWS.S3.GetObjectTorrent+    , module Network.AWS.S3.HeadBucket+    , module Network.AWS.S3.HeadObject+    , module Network.AWS.S3.ListBuckets+    , module Network.AWS.S3.ListMultipartUploads+    , module Network.AWS.S3.ListObjectVersions+    , module Network.AWS.S3.ListObjects+    , module Network.AWS.S3.ListParts+    , module Network.AWS.S3.PutBucketAcl+    , module Network.AWS.S3.PutBucketCors+    , module Network.AWS.S3.PutBucketLifecycle+    , module Network.AWS.S3.PutBucketLogging+    , module Network.AWS.S3.PutBucketNotification+    , module Network.AWS.S3.PutBucketPolicy+    , module Network.AWS.S3.PutBucketRequestPayment+    , module Network.AWS.S3.PutBucketTagging+    , module Network.AWS.S3.PutBucketVersioning+    , module Network.AWS.S3.PutBucketWebsite+    , module Network.AWS.S3.PutObject+    , module Network.AWS.S3.PutObjectAcl+    , module Network.AWS.S3.RestoreObject+    , module Network.AWS.S3.Types+    , module Network.AWS.S3.UploadPart+    , module Network.AWS.S3.UploadPartCopy+    ) where++import Network.AWS.S3.AbortMultipartUpload+import Network.AWS.S3.CompleteMultipartUpload+import Network.AWS.S3.CopyObject+import Network.AWS.S3.CreateBucket+import Network.AWS.S3.CreateMultipartUpload+import Network.AWS.S3.DeleteBucket+import Network.AWS.S3.DeleteBucketCors+import Network.AWS.S3.DeleteBucketLifecycle+import Network.AWS.S3.DeleteBucketPolicy+import Network.AWS.S3.DeleteBucketTagging+import Network.AWS.S3.DeleteBucketWebsite+import Network.AWS.S3.DeleteObject+import Network.AWS.S3.DeleteObjects+import Network.AWS.S3.GetBucketAcl+import Network.AWS.S3.GetBucketCors+import Network.AWS.S3.GetBucketLifecycle+import Network.AWS.S3.GetBucketLocation+import Network.AWS.S3.GetBucketLogging+import Network.AWS.S3.GetBucketNotification+import Network.AWS.S3.GetBucketPolicy+import Network.AWS.S3.GetBucketRequestPayment+import Network.AWS.S3.GetBucketTagging+import Network.AWS.S3.GetBucketVersioning+import Network.AWS.S3.GetBucketWebsite+import Network.AWS.S3.GetObject+import Network.AWS.S3.GetObjectAcl+import Network.AWS.S3.GetObjectTorrent+import Network.AWS.S3.HeadBucket+import Network.AWS.S3.HeadObject+import Network.AWS.S3.ListBuckets+import Network.AWS.S3.ListMultipartUploads+import Network.AWS.S3.ListObjectVersions+import Network.AWS.S3.ListObjects+import Network.AWS.S3.ListParts+import Network.AWS.S3.PutBucketAcl+import Network.AWS.S3.PutBucketCors+import Network.AWS.S3.PutBucketLifecycle+import Network.AWS.S3.PutBucketLogging+import Network.AWS.S3.PutBucketNotification+import Network.AWS.S3.PutBucketPolicy+import Network.AWS.S3.PutBucketRequestPayment+import Network.AWS.S3.PutBucketTagging+import Network.AWS.S3.PutBucketVersioning+import Network.AWS.S3.PutBucketWebsite+import Network.AWS.S3.PutObject+import Network.AWS.S3.PutObjectAcl+import Network.AWS.S3.RestoreObject+import Network.AWS.S3.Types+import Network.AWS.S3.UploadPart+import Network.AWS.S3.UploadPartCopy
+ gen/Network/AWS/S3/AbortMultipartUpload.hs view
@@ -0,0 +1,115 @@+{-# LANGUAGE DataKinds                   #-}+{-# LANGUAGE DeriveGeneric               #-}+{-# LANGUAGE FlexibleInstances           #-}+{-# LANGUAGE GeneralizedNewtypeDeriving  #-}+{-# LANGUAGE LambdaCase                  #-}+{-# LANGUAGE NoImplicitPrelude           #-}+{-# LANGUAGE OverloadedStrings           #-}+{-# LANGUAGE RecordWildCards             #-}+{-# LANGUAGE TypeFamilies                #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Module      : Network.AWS.S3.AbortMultipartUpload+-- 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)++-- | Aborts a multipart upload. To verify that all parts have been removed, so+-- you don't get charged for the part storage, you should call the List Parts+-- operation and ensure the parts list is empty.+--+-- <http://docs.aws.amazon.com/AmazonS3/latest/API/AbortMultipartUpload.html>+module Network.AWS.S3.AbortMultipartUpload+    (+    -- * Request+      AbortMultipartUpload+    -- ** Request constructor+    , abortMultipartUpload+    -- ** Request lenses+    , amuBucket+    , amuKey+    , amuUploadId++    -- * Response+    , AbortMultipartUploadResponse+    -- ** Response constructor+    , abortMultipartUploadResponse+    ) where++import Network.AWS.Prelude+import Network.AWS.Request.RestXML+import Network.AWS.S3.Types+import qualified GHC.Exts++data AbortMultipartUpload = AbortMultipartUpload+    { _amuBucket   :: Text+    , _amuKey      :: Text+    , _amuUploadId :: Text+    } deriving (Eq, Ord, Show)++-- | 'AbortMultipartUpload' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'amuBucket' @::@ 'Text'+--+-- * 'amuKey' @::@ 'Text'+--+-- * 'amuUploadId' @::@ 'Text'+--+abortMultipartUpload :: Text -- ^ 'amuBucket'+                     -> Text -- ^ 'amuKey'+                     -> Text -- ^ 'amuUploadId'+                     -> AbortMultipartUpload+abortMultipartUpload p1 p2 p3 = AbortMultipartUpload+    { _amuBucket   = p1+    , _amuKey      = p2+    , _amuUploadId = p3+    }++amuBucket :: Lens' AbortMultipartUpload Text+amuBucket = lens _amuBucket (\s a -> s { _amuBucket = a })++amuKey :: Lens' AbortMultipartUpload Text+amuKey = lens _amuKey (\s a -> s { _amuKey = a })++amuUploadId :: Lens' AbortMultipartUpload Text+amuUploadId = lens _amuUploadId (\s a -> s { _amuUploadId = a })++data AbortMultipartUploadResponse = AbortMultipartUploadResponse+    deriving (Eq, Ord, Show, Generic)++-- | 'AbortMultipartUploadResponse' constructor.+abortMultipartUploadResponse :: AbortMultipartUploadResponse+abortMultipartUploadResponse = AbortMultipartUploadResponse++instance ToPath AbortMultipartUpload where+    toPath AbortMultipartUpload{..} = mconcat+        [ "/"+        , toText _amuBucket+        , "/"+        , toText _amuKey+        ]++instance ToQuery AbortMultipartUpload where+    toQuery rq = "uploadId" =? _amuUploadId rq++instance ToHeaders AbortMultipartUpload++instance ToXMLRoot AbortMultipartUpload where+    toXMLRoot = const (namespaced ns "AbortMultipartUpload" [])++instance ToXML AbortMultipartUpload++instance AWSRequest AbortMultipartUpload where+    type Sv AbortMultipartUpload = S3+    type Rs AbortMultipartUpload = AbortMultipartUploadResponse++    request  = delete+    response = nullResponse AbortMultipartUploadResponse
+ gen/Network/AWS/S3/CompleteMultipartUpload.hs view
@@ -0,0 +1,211 @@+{-# 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.S3.CompleteMultipartUpload+-- 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)++-- | Completes a multipart upload by assembling previously uploaded parts.+--+-- <http://docs.aws.amazon.com/AmazonS3/latest/API/CompleteMultipartUpload.html>+module Network.AWS.S3.CompleteMultipartUpload+    (+    -- * Request+      CompleteMultipartUpload+    -- ** Request constructor+    , completeMultipartUpload+    -- ** Request lenses+    , cmu1Bucket+    , cmu1Key+    , cmu1MultipartUpload+    , cmu1UploadId++    -- * Response+    , CompleteMultipartUploadResponse+    -- ** Response constructor+    , completeMultipartUploadResponse+    -- ** Response lenses+    , cmur1Bucket+    , cmur1ETag+    , cmur1Expiration+    , cmur1Key+    , cmur1Location+    , cmur1SSEKMSKeyId+    , cmur1ServerSideEncryption+    , cmur1VersionId+    ) where++import Network.AWS.Prelude+import Network.AWS.Request.RestXML+import Network.AWS.S3.Types+import qualified GHC.Exts++data CompleteMultipartUpload = CompleteMultipartUpload+    { _cmu1Bucket          :: Text+    , _cmu1Key             :: Text+    , _cmu1MultipartUpload :: Maybe CompletedMultipartUpload+    , _cmu1UploadId        :: Text+    } deriving (Eq, Show)++-- | 'CompleteMultipartUpload' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'cmu1Bucket' @::@ 'Text'+--+-- * 'cmu1Key' @::@ 'Text'+--+-- * 'cmu1MultipartUpload' @::@ 'Maybe' 'CompletedMultipartUpload'+--+-- * 'cmu1UploadId' @::@ 'Text'+--+completeMultipartUpload :: Text -- ^ 'cmu1Bucket'+                        -> Text -- ^ 'cmu1Key'+                        -> Text -- ^ 'cmu1UploadId'+                        -> CompleteMultipartUpload+completeMultipartUpload p1 p2 p3 = CompleteMultipartUpload+    { _cmu1Bucket          = p1+    , _cmu1Key             = p2+    , _cmu1UploadId        = p3+    , _cmu1MultipartUpload = Nothing+    }++cmu1Bucket :: Lens' CompleteMultipartUpload Text+cmu1Bucket = lens _cmu1Bucket (\s a -> s { _cmu1Bucket = a })++cmu1Key :: Lens' CompleteMultipartUpload Text+cmu1Key = lens _cmu1Key (\s a -> s { _cmu1Key = a })++cmu1MultipartUpload :: Lens' CompleteMultipartUpload (Maybe CompletedMultipartUpload)+cmu1MultipartUpload =+    lens _cmu1MultipartUpload (\s a -> s { _cmu1MultipartUpload = a })++cmu1UploadId :: Lens' CompleteMultipartUpload Text+cmu1UploadId = lens _cmu1UploadId (\s a -> s { _cmu1UploadId = a })++data CompleteMultipartUploadResponse = CompleteMultipartUploadResponse+    { _cmur1Bucket               :: Maybe Text+    , _cmur1ETag                 :: Maybe Text+    , _cmur1Expiration           :: Maybe RFC822+    , _cmur1Key                  :: Maybe Text+    , _cmur1Location             :: Maybe Text+    , _cmur1SSEKMSKeyId          :: Maybe (Sensitive Text)+    , _cmur1ServerSideEncryption :: Maybe Text+    , _cmur1VersionId            :: Maybe Text+    } deriving (Eq, Ord, Show)++-- | 'CompleteMultipartUploadResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'cmur1Bucket' @::@ 'Maybe' 'Text'+--+-- * 'cmur1ETag' @::@ 'Maybe' 'Text'+--+-- * 'cmur1Expiration' @::@ 'Maybe' 'UTCTime'+--+-- * 'cmur1Key' @::@ 'Maybe' 'Text'+--+-- * 'cmur1Location' @::@ 'Maybe' 'Text'+--+-- * 'cmur1SSEKMSKeyId' @::@ 'Maybe' 'Text'+--+-- * 'cmur1ServerSideEncryption' @::@ 'Maybe' 'Text'+--+-- * 'cmur1VersionId' @::@ 'Maybe' 'Text'+--+completeMultipartUploadResponse :: CompleteMultipartUploadResponse+completeMultipartUploadResponse = CompleteMultipartUploadResponse+    { _cmur1Location             = Nothing+    , _cmur1Bucket               = Nothing+    , _cmur1Key                  = Nothing+    , _cmur1Expiration           = Nothing+    , _cmur1ETag                 = Nothing+    , _cmur1ServerSideEncryption = Nothing+    , _cmur1VersionId            = Nothing+    , _cmur1SSEKMSKeyId          = Nothing+    }++cmur1Bucket :: Lens' CompleteMultipartUploadResponse (Maybe Text)+cmur1Bucket = lens _cmur1Bucket (\s a -> s { _cmur1Bucket = a })++-- | Entity tag of the object.+cmur1ETag :: Lens' CompleteMultipartUploadResponse (Maybe Text)+cmur1ETag = lens _cmur1ETag (\s a -> s { _cmur1ETag = a })++-- | If the object expiration is configured, this will contain the expiration+-- date (expiry-date) and rule ID (rule-id). The value of rule-id is URL+-- encoded.+cmur1Expiration :: Lens' CompleteMultipartUploadResponse (Maybe UTCTime)+cmur1Expiration = lens _cmur1Expiration (\s a -> s { _cmur1Expiration = a }) . mapping _Time++cmur1Key :: Lens' CompleteMultipartUploadResponse (Maybe Text)+cmur1Key = lens _cmur1Key (\s a -> s { _cmur1Key = a })++cmur1Location :: Lens' CompleteMultipartUploadResponse (Maybe Text)+cmur1Location = lens _cmur1Location (\s a -> s { _cmur1Location = a })++-- | If present, specifies the AWS KMS key used to encrypt the object.+cmur1SSEKMSKeyId :: Lens' CompleteMultipartUploadResponse (Maybe Text)+cmur1SSEKMSKeyId = lens _cmur1SSEKMSKeyId (\s a -> s { _cmur1SSEKMSKeyId = a }) . mapping _Sensitive++-- | The Server-side encryption algorithm used when storing this object in S3+-- (e.g., AES256, aws:kms).+cmur1ServerSideEncryption :: Lens' CompleteMultipartUploadResponse (Maybe Text)+cmur1ServerSideEncryption =+    lens _cmur1ServerSideEncryption+        (\s a -> s { _cmur1ServerSideEncryption = a })++-- | Version of the object.+cmur1VersionId :: Lens' CompleteMultipartUploadResponse (Maybe Text)+cmur1VersionId = lens _cmur1VersionId (\s a -> s { _cmur1VersionId = a })++instance ToPath CompleteMultipartUpload where+    toPath CompleteMultipartUpload{..} = mconcat+        [ "/"+        , toText _cmu1Bucket+        , "/"+        , toText _cmu1Key+        ]++instance ToQuery CompleteMultipartUpload where+    toQuery rq = "uploadId" =? _cmu1UploadId rq++instance ToHeaders CompleteMultipartUpload++instance ToXMLRoot CompleteMultipartUpload where+    toXMLRoot CompleteMultipartUpload{..} = namespaced ns "CompleteMultipartUpload"+        [ "CompleteMultipartUpload" =@ _cmu1MultipartUpload+        ]++instance ToXML CompleteMultipartUpload++instance AWSRequest CompleteMultipartUpload where+    type Sv CompleteMultipartUpload = S3+    type Rs CompleteMultipartUpload = CompleteMultipartUploadResponse++    request  = post+    response = xmlHeaderResponse $ \h x -> CompleteMultipartUploadResponse+        <$> x .@? "Bucket"+        <*> x .@? "ETag"+        <*> h ~:? "x-amz-expiration"+        <*> x .@? "Key"+        <*> x .@? "Location"+        <*> h ~:? "x-amz-server-side-encryption-aws-kms-key-id"+        <*> h ~:? "x-amz-server-side-encryption"+        <*> h ~:? "x-amz-version-id"
+ gen/Network/AWS/S3/CopyObject.hs view
@@ -0,0 +1,519 @@+{-# 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.S3.CopyObject+-- Copyright   : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>+-- License     : This Source Code Form is subject to the terms of+--               the Mozilla Public License, v. 2.0.+--               A copy of the MPL can be found in the LICENSE file or+--               you can obtain it at http://mozilla.org/MPL/2.0/.+-- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability   : experimental+-- Portability : non-portable (GHC extensions)++-- | Creates a copy of an object that is already stored in Amazon S3.+--+-- <http://docs.aws.amazon.com/AmazonS3/latest/API/CopyObject.html>+module Network.AWS.S3.CopyObject+    (+    -- * Request+      CopyObject+    -- ** Request constructor+    , copyObject+    -- ** Request lenses+    , coACL+    , coBucket+    , coCacheControl+    , coContentDisposition+    , coContentEncoding+    , coContentLanguage+    , coContentType+    , coCopySource+    , coCopySourceIfMatch+    , coCopySourceIfModifiedSince+    , coCopySourceIfNoneMatch+    , coCopySourceIfUnmodifiedSince+    , coCopySourceSSECustomerAlgorithm+    , coCopySourceSSECustomerKey+    , coCopySourceSSECustomerKeyMD5+    , coCopySourceSSEKMSKeyId+    , coExpires+    , coGrantFullControl+    , coGrantRead+    , coGrantReadACP+    , coGrantWriteACP+    , coKey+    , coMetadata+    , coMetadataDirective+    , coSSECustomerAlgorithm+    , coSSECustomerKey+    , coSSECustomerKeyMD5+    , coServerSideEncryption+    , coStorageClass+    , coWebsiteRedirectLocation++    -- * Response+    , CopyObjectResponse+    -- ** Response constructor+    , copyObjectResponse+    -- ** Response lenses+    , corCopyObjectResult+    , corCopySourceVersionId+    , corExpiration+    , corSSECustomerAlgorithm+    , corSSECustomerKeyMD5+    , corSSEKMSKeyId+    , corServerSideEncryption+    ) where++import Network.AWS.Prelude+import Network.AWS.Request.RestXML+import Network.AWS.S3.Types+import qualified GHC.Exts++data CopyObject = CopyObject+    { _coACL                            :: Maybe Text+    , _coBucket                         :: Text+    , _coCacheControl                   :: Maybe Text+    , _coContentDisposition             :: Maybe Text+    , _coContentEncoding                :: Maybe Text+    , _coContentLanguage                :: Maybe Text+    , _coContentType                    :: Maybe Text+    , _coCopySource                     :: Text+    , _coCopySourceIfMatch              :: Maybe Text+    , _coCopySourceIfModifiedSince      :: Maybe RFC822+    , _coCopySourceIfNoneMatch          :: Maybe Text+    , _coCopySourceIfUnmodifiedSince    :: Maybe RFC822+    , _coCopySourceSSECustomerAlgorithm :: Maybe Text+    , _coCopySourceSSECustomerKey       :: Maybe (Sensitive Text)+    , _coCopySourceSSECustomerKeyMD5    :: Maybe Text+    , _coCopySourceSSEKMSKeyId          :: Maybe (Sensitive Text)+    , _coExpires                        :: Maybe RFC822+    , _coGrantFullControl               :: Maybe Text+    , _coGrantRead                      :: Maybe Text+    , _coGrantReadACP                   :: Maybe Text+    , _coGrantWriteACP                  :: Maybe Text+    , _coKey                            :: Text+    , _coMetadata                       :: Map (CI Text) Text+    , _coMetadataDirective              :: Maybe Text+    , _coSSECustomerAlgorithm           :: Maybe Text+    , _coSSECustomerKey                 :: Maybe (Sensitive Text)+    , _coSSECustomerKeyMD5              :: Maybe Text+    , _coServerSideEncryption           :: Maybe Text+    , _coStorageClass                   :: Maybe Text+    , _coWebsiteRedirectLocation        :: Maybe Text+    } deriving (Eq, Show)++-- | 'CopyObject' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'coACL' @::@ 'Maybe' 'Text'+--+-- * 'coBucket' @::@ 'Text'+--+-- * 'coCacheControl' @::@ 'Maybe' 'Text'+--+-- * 'coContentDisposition' @::@ 'Maybe' 'Text'+--+-- * 'coContentEncoding' @::@ 'Maybe' 'Text'+--+-- * 'coContentLanguage' @::@ 'Maybe' 'Text'+--+-- * 'coContentType' @::@ 'Maybe' 'Text'+--+-- * 'coCopySource' @::@ 'Text'+--+-- * 'coCopySourceIfMatch' @::@ 'Maybe' 'Text'+--+-- * 'coCopySourceIfModifiedSince' @::@ 'Maybe' 'UTCTime'+--+-- * 'coCopySourceIfNoneMatch' @::@ 'Maybe' 'Text'+--+-- * 'coCopySourceIfUnmodifiedSince' @::@ 'Maybe' 'UTCTime'+--+-- * 'coCopySourceSSECustomerAlgorithm' @::@ 'Maybe' 'Text'+--+-- * 'coCopySourceSSECustomerKey' @::@ 'Maybe' 'Text'+--+-- * 'coCopySourceSSECustomerKeyMD5' @::@ 'Maybe' 'Text'+--+-- * 'coCopySourceSSEKMSKeyId' @::@ 'Maybe' 'Text'+--+-- * 'coExpires' @::@ 'Maybe' 'UTCTime'+--+-- * 'coGrantFullControl' @::@ 'Maybe' 'Text'+--+-- * 'coGrantRead' @::@ 'Maybe' 'Text'+--+-- * 'coGrantReadACP' @::@ 'Maybe' 'Text'+--+-- * 'coGrantWriteACP' @::@ 'Maybe' 'Text'+--+-- * 'coKey' @::@ 'Text'+--+-- * 'coMetadata' @::@ 'HashMap' ('CI' 'Text') 'Text'+--+-- * 'coMetadataDirective' @::@ 'Maybe' 'Text'+--+-- * 'coSSECustomerAlgorithm' @::@ 'Maybe' 'Text'+--+-- * 'coSSECustomerKey' @::@ 'Maybe' 'Text'+--+-- * 'coSSECustomerKeyMD5' @::@ 'Maybe' 'Text'+--+-- * 'coServerSideEncryption' @::@ 'Maybe' 'Text'+--+-- * 'coStorageClass' @::@ 'Maybe' 'Text'+--+-- * 'coWebsiteRedirectLocation' @::@ 'Maybe' 'Text'+--+copyObject :: Text -- ^ 'coBucket'+           -> Text -- ^ 'coCopySource'+           -> Text -- ^ 'coKey'+           -> CopyObject+copyObject p1 p2 p3 = CopyObject+    { _coBucket                         = p1+    , _coCopySource                     = p2+    , _coKey                            = p3+    , _coACL                            = Nothing+    , _coCacheControl                   = Nothing+    , _coContentDisposition             = Nothing+    , _coContentEncoding                = Nothing+    , _coContentLanguage                = Nothing+    , _coContentType                    = Nothing+    , _coCopySourceIfMatch              = Nothing+    , _coCopySourceIfModifiedSince      = Nothing+    , _coCopySourceIfNoneMatch          = Nothing+    , _coCopySourceIfUnmodifiedSince    = Nothing+    , _coExpires                        = Nothing+    , _coGrantFullControl               = Nothing+    , _coGrantRead                      = Nothing+    , _coGrantReadACP                   = Nothing+    , _coGrantWriteACP                  = Nothing+    , _coMetadata                       = mempty+    , _coMetadataDirective              = Nothing+    , _coServerSideEncryption           = Nothing+    , _coStorageClass                   = Nothing+    , _coWebsiteRedirectLocation        = Nothing+    , _coSSECustomerAlgorithm           = Nothing+    , _coSSECustomerKey                 = Nothing+    , _coSSECustomerKeyMD5              = Nothing+    , _coCopySourceSSECustomerAlgorithm = Nothing+    , _coCopySourceSSECustomerKey       = Nothing+    , _coCopySourceSSECustomerKeyMD5    = Nothing+    , _coCopySourceSSEKMSKeyId          = Nothing+    }++-- | The canned ACL to apply to the object.+coACL :: Lens' CopyObject (Maybe Text)+coACL = lens _coACL (\s a -> s { _coACL = a })++coBucket :: Lens' CopyObject Text+coBucket = lens _coBucket (\s a -> s { _coBucket = a })++-- | Specifies caching behavior along the request/reply chain.+coCacheControl :: Lens' CopyObject (Maybe Text)+coCacheControl = lens _coCacheControl (\s a -> s { _coCacheControl = a })++-- | Specifies presentational information for the object.+coContentDisposition :: Lens' CopyObject (Maybe Text)+coContentDisposition =+    lens _coContentDisposition (\s a -> s { _coContentDisposition = a })++-- | Specifies what content encodings have been applied to the object and thus+-- what decoding mechanisms must be applied to obtain the media-type+-- referenced by the Content-Type header field.+coContentEncoding :: Lens' CopyObject (Maybe Text)+coContentEncoding =+    lens _coContentEncoding (\s a -> s { _coContentEncoding = a })++-- | The language the content is in.+coContentLanguage :: Lens' CopyObject (Maybe Text)+coContentLanguage =+    lens _coContentLanguage (\s a -> s { _coContentLanguage = a })++-- | A standard MIME type describing the format of the object data.+coContentType :: Lens' CopyObject (Maybe Text)+coContentType = lens _coContentType (\s a -> s { _coContentType = a })++-- | The name of the source bucket and key name of the source object,+-- separated by a slash (/). Must be URL-encoded.+coCopySource :: Lens' CopyObject Text+coCopySource = lens _coCopySource (\s a -> s { _coCopySource = a })++-- | Copies the object if its entity tag (ETag) matches the specified tag.+coCopySourceIfMatch :: Lens' CopyObject (Maybe Text)+coCopySourceIfMatch =+    lens _coCopySourceIfMatch (\s a -> s { _coCopySourceIfMatch = a })++-- | Copies the object if it has been modified since the specified time.+coCopySourceIfModifiedSince :: Lens' CopyObject (Maybe UTCTime)+coCopySourceIfModifiedSince =+    lens _coCopySourceIfModifiedSince+        (\s a -> s { _coCopySourceIfModifiedSince = a })+            . mapping _Time++-- | Copies the object if its entity tag (ETag) is different than the+-- specified ETag.+coCopySourceIfNoneMatch :: Lens' CopyObject (Maybe Text)+coCopySourceIfNoneMatch =+    lens _coCopySourceIfNoneMatch (\s a -> s { _coCopySourceIfNoneMatch = a })++-- | Copies the object if it hasn't been modified since the specified time.+coCopySourceIfUnmodifiedSince :: Lens' CopyObject (Maybe UTCTime)+coCopySourceIfUnmodifiedSince =+    lens _coCopySourceIfUnmodifiedSince+        (\s a -> s { _coCopySourceIfUnmodifiedSince = a })+            . mapping _Time++-- | Specifies the algorithm to use when decrypting the source object (e.g.,+-- AES256).+coCopySourceSSECustomerAlgorithm :: Lens' CopyObject (Maybe Text)+coCopySourceSSECustomerAlgorithm =+    lens _coCopySourceSSECustomerAlgorithm+        (\s a -> s { _coCopySourceSSECustomerAlgorithm = a })++-- | Specifies the customer-provided encryption key for Amazon S3 to use to+-- decrypt the source object. The encryption key provided in this header+-- must be one that was used when the source object was created.+coCopySourceSSECustomerKey :: Lens' CopyObject (Maybe Text)+coCopySourceSSECustomerKey =+    lens _coCopySourceSSECustomerKey+        (\s a -> s { _coCopySourceSSECustomerKey = a })+            . mapping _Sensitive++-- | Specifies the 128-bit MD5 digest of the encryption key according to RFC+-- 1321. Amazon S3 uses this header for a message integrity check to ensure+-- the encryption key was transmitted without error.+coCopySourceSSECustomerKeyMD5 :: Lens' CopyObject (Maybe Text)+coCopySourceSSECustomerKeyMD5 =+    lens _coCopySourceSSECustomerKeyMD5+        (\s a -> s { _coCopySourceSSECustomerKeyMD5 = a })++-- | Specifies the AWS KMS key ID to use for object encryption.+coCopySourceSSEKMSKeyId :: Lens' CopyObject (Maybe Text)+coCopySourceSSEKMSKeyId =+    lens _coCopySourceSSEKMSKeyId (\s a -> s { _coCopySourceSSEKMSKeyId = a })+        . mapping _Sensitive++-- | The date and time at which the object is no longer cacheable.+coExpires :: Lens' CopyObject (Maybe UTCTime)+coExpires = lens _coExpires (\s a -> s { _coExpires = a }) . mapping _Time++-- | Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the+-- object.+coGrantFullControl :: Lens' CopyObject (Maybe Text)+coGrantFullControl =+    lens _coGrantFullControl (\s a -> s { _coGrantFullControl = a })++-- | Allows grantee to read the object data and its metadata.+coGrantRead :: Lens' CopyObject (Maybe Text)+coGrantRead = lens _coGrantRead (\s a -> s { _coGrantRead = a })++-- | Allows grantee to read the object ACL.+coGrantReadACP :: Lens' CopyObject (Maybe Text)+coGrantReadACP = lens _coGrantReadACP (\s a -> s { _coGrantReadACP = a })++-- | Allows grantee to write the ACL for the applicable object.+coGrantWriteACP :: Lens' CopyObject (Maybe Text)+coGrantWriteACP = lens _coGrantWriteACP (\s a -> s { _coGrantWriteACP = a })++coKey :: Lens' CopyObject Text+coKey = lens _coKey (\s a -> s { _coKey = a })++-- | A map of metadata to store with the object in S3.+coMetadata :: Lens' CopyObject (HashMap (CI Text) Text)+coMetadata = lens _coMetadata (\s a -> s { _coMetadata = a }) . _Map++-- | Specifies whether the metadata is copied from the source object or+-- replaced with metadata provided in the request.+coMetadataDirective :: Lens' CopyObject (Maybe Text)+coMetadataDirective =+    lens _coMetadataDirective (\s a -> s { _coMetadataDirective = a })++-- | Specifies the algorithm to use to when encrypting the object (e.g.,+-- AES256, aws:kms).+coSSECustomerAlgorithm :: Lens' CopyObject (Maybe Text)+coSSECustomerAlgorithm =+    lens _coSSECustomerAlgorithm (\s a -> s { _coSSECustomerAlgorithm = a })++-- | Specifies the customer-provided encryption key for Amazon S3 to use in+-- encrypting data. This value is used to store the object and then it is+-- discarded; Amazon does not store the encryption key. The key must be+-- appropriate for use with the algorithm specified in the+-- x-amz-server-side&#x200B;-encryption&#x200B;-customer-algorithm header.+coSSECustomerKey :: Lens' CopyObject (Maybe Text)+coSSECustomerKey = lens _coSSECustomerKey (\s a -> s { _coSSECustomerKey = a }) . mapping _Sensitive++-- | Specifies the 128-bit MD5 digest of the encryption key according to RFC+-- 1321. Amazon S3 uses this header for a message integrity check to ensure+-- the encryption key was transmitted without error.+coSSECustomerKeyMD5 :: Lens' CopyObject (Maybe Text)+coSSECustomerKeyMD5 =+    lens _coSSECustomerKeyMD5 (\s a -> s { _coSSECustomerKeyMD5 = a })++-- | The Server-side encryption algorithm used when storing this object in S3+-- (e.g., AES256, aws:kms).+coServerSideEncryption :: Lens' CopyObject (Maybe Text)+coServerSideEncryption =+    lens _coServerSideEncryption (\s a -> s { _coServerSideEncryption = a })++-- | The type of storage to use for the object. Defaults to 'STANDARD'.+coStorageClass :: Lens' CopyObject (Maybe Text)+coStorageClass = lens _coStorageClass (\s a -> s { _coStorageClass = a })++-- | If the bucket is configured as a website, redirects requests for this+-- object to another object in the same bucket or to an external URL. Amazon+-- S3 stores the value of this header in the object metadata.+coWebsiteRedirectLocation :: Lens' CopyObject (Maybe Text)+coWebsiteRedirectLocation =+    lens _coWebsiteRedirectLocation+        (\s a -> s { _coWebsiteRedirectLocation = a })++data CopyObjectResponse = CopyObjectResponse+    { _corCopyObjectResult     :: Maybe CopyObjectResult+    , _corCopySourceVersionId  :: Maybe Text+    , _corExpiration           :: Maybe RFC822+    , _corSSECustomerAlgorithm :: Maybe Text+    , _corSSECustomerKeyMD5    :: Maybe Text+    , _corSSEKMSKeyId          :: Maybe (Sensitive Text)+    , _corServerSideEncryption :: Maybe Text+    } deriving (Eq, Show)++-- | 'CopyObjectResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'corCopyObjectResult' @::@ 'Maybe' 'CopyObjectResult'+--+-- * 'corCopySourceVersionId' @::@ 'Maybe' 'Text'+--+-- * 'corExpiration' @::@ 'Maybe' 'UTCTime'+--+-- * 'corSSECustomerAlgorithm' @::@ 'Maybe' 'Text'+--+-- * 'corSSECustomerKeyMD5' @::@ 'Maybe' 'Text'+--+-- * 'corSSEKMSKeyId' @::@ 'Maybe' 'Text'+--+-- * 'corServerSideEncryption' @::@ 'Maybe' 'Text'+--+copyObjectResponse :: CopyObjectResponse+copyObjectResponse = CopyObjectResponse+    { _corCopyObjectResult     = Nothing+    , _corExpiration           = Nothing+    , _corCopySourceVersionId  = Nothing+    , _corServerSideEncryption = Nothing+    , _corSSECustomerAlgorithm = Nothing+    , _corSSECustomerKeyMD5    = Nothing+    , _corSSEKMSKeyId          = Nothing+    }++corCopyObjectResult :: Lens' CopyObjectResponse (Maybe CopyObjectResult)+corCopyObjectResult =+    lens _corCopyObjectResult (\s a -> s { _corCopyObjectResult = a })++corCopySourceVersionId :: Lens' CopyObjectResponse (Maybe Text)+corCopySourceVersionId =+    lens _corCopySourceVersionId (\s a -> s { _corCopySourceVersionId = a })++-- | If the object expiration is configured, the response includes this+-- header.+corExpiration :: Lens' CopyObjectResponse (Maybe UTCTime)+corExpiration = lens _corExpiration (\s a -> s { _corExpiration = a }) . mapping _Time++-- | If server-side encryption with a customer-provided encryption key was+-- requested, the response will include this header confirming the+-- encryption algorithm used.+corSSECustomerAlgorithm :: Lens' CopyObjectResponse (Maybe Text)+corSSECustomerAlgorithm =+    lens _corSSECustomerAlgorithm (\s a -> s { _corSSECustomerAlgorithm = a })++-- | If server-side encryption with a customer-provided encryption key was+-- requested, the response will include this header to provide round trip+-- message integrity verification of the customer-provided encryption key.+corSSECustomerKeyMD5 :: Lens' CopyObjectResponse (Maybe Text)+corSSECustomerKeyMD5 =+    lens _corSSECustomerKeyMD5 (\s a -> s { _corSSECustomerKeyMD5 = a })++-- | If present, specifies the AWS KMS key used to encrypt the object.+corSSEKMSKeyId :: Lens' CopyObjectResponse (Maybe Text)+corSSEKMSKeyId = lens _corSSEKMSKeyId (\s a -> s { _corSSEKMSKeyId = a }) . mapping _Sensitive++-- | The Server-side encryption algorithm used when storing this object in S3+-- (e.g., AES256, aws:kms).+corServerSideEncryption :: Lens' CopyObjectResponse (Maybe Text)+corServerSideEncryption =+    lens _corServerSideEncryption (\s a -> s { _corServerSideEncryption = a })++instance ToPath CopyObject where+    toPath CopyObject{..} = mconcat+        [ "/"+        , toText _coBucket+        , "/"+        , toText _coKey+        ]++instance ToQuery CopyObject where+    toQuery = const mempty++instance ToHeaders CopyObject where+    toHeaders CopyObject{..} = mconcat+        [ "x-amz-acl"                                                   =: _coACL+        , "Cache-Control"                                               =: _coCacheControl+        , "Content-Disposition"                                         =: _coContentDisposition+        , "Content-Encoding"                                            =: _coContentEncoding+        , "Content-Language"                                            =: _coContentLanguage+        , "Content-Type"                                                =: _coContentType+        , "x-amz-copy-source"                                           =: _coCopySource+        , "x-amz-copy-source-if-match"                                  =: _coCopySourceIfMatch+        , "x-amz-copy-source-if-modified-since"                         =: _coCopySourceIfModifiedSince+        , "x-amz-copy-source-if-none-match"                             =: _coCopySourceIfNoneMatch+        , "x-amz-copy-source-if-unmodified-since"                       =: _coCopySourceIfUnmodifiedSince+        , "Expires"                                                     =: _coExpires+        , "x-amz-grant-full-control"                                    =: _coGrantFullControl+        , "x-amz-grant-read"                                            =: _coGrantRead+        , "x-amz-grant-read-acp"                                        =: _coGrantReadACP+        , "x-amz-grant-write-acp"                                       =: _coGrantWriteACP+        , "x-amz-meta-"                                                 =: _coMetadata+        , "x-amz-metadata-directive"                                    =: _coMetadataDirective+        , "x-amz-server-side-encryption"                                =: _coServerSideEncryption+        , "x-amz-storage-class"                                         =: _coStorageClass+        , "x-amz-website-redirect-location"                             =: _coWebsiteRedirectLocation+        , "x-amz-server-side-encryption-customer-algorithm"             =: _coSSECustomerAlgorithm+        , "x-amz-server-side-encryption-customer-key"                   =: _coSSECustomerKey+        , "x-amz-server-side-encryption-customer-key-MD5"               =: _coSSECustomerKeyMD5+        , "x-amz-copy-source-server-side-encryption-customer-algorithm" =: _coCopySourceSSECustomerAlgorithm+        , "x-amz-copy-source-server-side-encryption-customer-key"       =: _coCopySourceSSECustomerKey+        , "x-amz-copy-source-server-side-encryption-customer-key-MD5"   =: _coCopySourceSSECustomerKeyMD5+        , "x-amz-copy-source-server-side-encryption-aws-kms-key-id"     =: _coCopySourceSSEKMSKeyId+        ]++instance ToXMLRoot CopyObject where+    toXMLRoot = const (namespaced ns "CopyObject" [])++instance ToXML CopyObject++instance AWSRequest CopyObject where+    type Sv CopyObject = S3+    type Rs CopyObject = CopyObjectResponse++    request  = put+    response = xmlHeaderResponse $ \h x -> CopyObjectResponse+        <$> x .@? "CopyObjectResult"+        <*> h ~:? "x-amz-copy-source-version-id"+        <*> h ~:? "x-amz-expiration"+        <*> h ~:? "x-amz-server-side-encryption-customer-algorithm"+        <*> h ~:? "x-amz-server-side-encryption-customer-key-MD5"+        <*> h ~:? "x-amz-server-side-encryption-aws-kms-key-id"+        <*> h ~:? "x-amz-server-side-encryption"
+ gen/Network/AWS/S3/CreateBucket.hs view
@@ -0,0 +1,183 @@+{-# 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.S3.CreateBucket+-- Copyright   : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>+-- License     : This Source Code Form is subject to the terms of+--               the Mozilla Public License, v. 2.0.+--               A copy of the MPL can be found in the LICENSE file or+--               you can obtain it at http://mozilla.org/MPL/2.0/.+-- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability   : experimental+-- Portability : non-portable (GHC extensions)++-- | Creates a new bucket.+--+-- <http://docs.aws.amazon.com/AmazonS3/latest/API/CreateBucket.html>+module Network.AWS.S3.CreateBucket+    (+    -- * Request+      CreateBucket+    -- ** Request constructor+    , createBucket+    -- ** Request lenses+    , cbACL+    , cbBucket+    , cbCreateBucketConfiguration+    , cbGrantFullControl+    , cbGrantRead+    , cbGrantReadACP+    , cbGrantWrite+    , cbGrantWriteACP++    -- * Response+    , CreateBucketResponse+    -- ** Response constructor+    , createBucketResponse+    -- ** Response lenses+    , cbrLocation+    ) where++import Network.AWS.Prelude+import Network.AWS.Request.RestXML+import Network.AWS.S3.Types+import qualified GHC.Exts++data CreateBucket = CreateBucket+    { _cbACL                       :: Maybe Text+    , _cbBucket                    :: Text+    , _cbCreateBucketConfiguration :: Maybe CreateBucketConfiguration+    , _cbGrantFullControl          :: Maybe Text+    , _cbGrantRead                 :: Maybe Text+    , _cbGrantReadACP              :: Maybe Text+    , _cbGrantWrite                :: Maybe Text+    , _cbGrantWriteACP             :: Maybe Text+    } deriving (Eq, Show)++-- | 'CreateBucket' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'cbACL' @::@ 'Maybe' 'Text'+--+-- * 'cbBucket' @::@ 'Text'+--+-- * 'cbCreateBucketConfiguration' @::@ 'Maybe' 'CreateBucketConfiguration'+--+-- * 'cbGrantFullControl' @::@ 'Maybe' 'Text'+--+-- * 'cbGrantRead' @::@ 'Maybe' 'Text'+--+-- * 'cbGrantReadACP' @::@ 'Maybe' 'Text'+--+-- * 'cbGrantWrite' @::@ 'Maybe' 'Text'+--+-- * 'cbGrantWriteACP' @::@ 'Maybe' 'Text'+--+createBucket :: Text -- ^ 'cbBucket'+             -> CreateBucket+createBucket p1 = CreateBucket+    { _cbBucket                    = p1+    , _cbACL                       = Nothing+    , _cbCreateBucketConfiguration = Nothing+    , _cbGrantFullControl          = Nothing+    , _cbGrantRead                 = Nothing+    , _cbGrantReadACP              = Nothing+    , _cbGrantWrite                = Nothing+    , _cbGrantWriteACP             = Nothing+    }++-- | The canned ACL to apply to the bucket.+cbACL :: Lens' CreateBucket (Maybe Text)+cbACL = lens _cbACL (\s a -> s { _cbACL = a })++cbBucket :: Lens' CreateBucket Text+cbBucket = lens _cbBucket (\s a -> s { _cbBucket = a })++cbCreateBucketConfiguration :: Lens' CreateBucket (Maybe CreateBucketConfiguration)+cbCreateBucketConfiguration =+    lens _cbCreateBucketConfiguration+        (\s a -> s { _cbCreateBucketConfiguration = a })++-- | Allows grantee the read, write, read ACP, and write ACP permissions on+-- the bucket.+cbGrantFullControl :: Lens' CreateBucket (Maybe Text)+cbGrantFullControl =+    lens _cbGrantFullControl (\s a -> s { _cbGrantFullControl = a })++-- | Allows grantee to list the objects in the bucket.+cbGrantRead :: Lens' CreateBucket (Maybe Text)+cbGrantRead = lens _cbGrantRead (\s a -> s { _cbGrantRead = a })++-- | Allows grantee to read the bucket ACL.+cbGrantReadACP :: Lens' CreateBucket (Maybe Text)+cbGrantReadACP = lens _cbGrantReadACP (\s a -> s { _cbGrantReadACP = a })++-- | Allows grantee to create, overwrite, and delete any object in the bucket.+cbGrantWrite :: Lens' CreateBucket (Maybe Text)+cbGrantWrite = lens _cbGrantWrite (\s a -> s { _cbGrantWrite = a })++-- | Allows grantee to write the ACL for the applicable bucket.+cbGrantWriteACP :: Lens' CreateBucket (Maybe Text)+cbGrantWriteACP = lens _cbGrantWriteACP (\s a -> s { _cbGrantWriteACP = a })++newtype CreateBucketResponse = CreateBucketResponse+    { _cbrLocation :: Maybe Text+    } deriving (Eq, Ord, Show, Monoid)++-- | 'CreateBucketResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'cbrLocation' @::@ 'Maybe' 'Text'+--+createBucketResponse :: CreateBucketResponse+createBucketResponse = CreateBucketResponse+    { _cbrLocation = Nothing+    }++cbrLocation :: Lens' CreateBucketResponse (Maybe Text)+cbrLocation = lens _cbrLocation (\s a -> s { _cbrLocation = a })++instance ToPath CreateBucket where+    toPath CreateBucket{..} = mconcat+        [ "/"+        , toText _cbBucket+        ]++instance ToQuery CreateBucket where+    toQuery = const mempty++instance ToHeaders CreateBucket where+    toHeaders CreateBucket{..} = mconcat+        [ "x-amz-acl"                =: _cbACL+        , "x-amz-grant-full-control" =: _cbGrantFullControl+        , "x-amz-grant-read"         =: _cbGrantRead+        , "x-amz-grant-read-acp"     =: _cbGrantReadACP+        , "x-amz-grant-write"        =: _cbGrantWrite+        , "x-amz-grant-write-acp"    =: _cbGrantWriteACP+        ]++instance ToXMLRoot CreateBucket where+    toXMLRoot CreateBucket{..} = namespaced ns "CreateBucket"+        [ "CreateBucketConfiguration" =@ _cbCreateBucketConfiguration+        ]++instance ToXML CreateBucket++instance AWSRequest CreateBucket where+    type Sv CreateBucket = S3+    type Rs CreateBucket = CreateBucketResponse++    request  = put+    response = headerResponse $ \h -> CreateBucketResponse+        <$> h ~:? "Location"
+ gen/Network/AWS/S3/CreateMultipartUpload.hs view
@@ -0,0 +1,410 @@+{-# 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.S3.CreateMultipartUpload+-- 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)++-- | Initiates a multipart upload and returns an upload ID. Note: After you+-- initiate multipart upload and upload one or more parts, you must either+-- complete or abort multipart upload in order to stop getting charged for+-- storage of the uploaded parts. Only after you either complete or abort+-- multipart upload, Amazon S3 frees up the parts storage and stops charging+-- you for the parts storage.+--+-- <http://docs.aws.amazon.com/AmazonS3/latest/API/CreateMultipartUpload.html>+module Network.AWS.S3.CreateMultipartUpload+    (+    -- * Request+      CreateMultipartUpload+    -- ** Request constructor+    , createMultipartUpload+    -- ** Request lenses+    , cmuACL+    , cmuBucket+    , cmuCacheControl+    , cmuContentDisposition+    , cmuContentEncoding+    , cmuContentLanguage+    , cmuContentType+    , cmuExpires+    , cmuGrantFullControl+    , cmuGrantRead+    , cmuGrantReadACP+    , cmuGrantWriteACP+    , cmuKey+    , cmuMetadata+    , cmuSSECustomerAlgorithm+    , cmuSSECustomerKey+    , cmuSSECustomerKeyMD5+    , cmuSSEKMSKeyId+    , cmuServerSideEncryption+    , cmuStorageClass+    , cmuWebsiteRedirectLocation++    -- * Response+    , CreateMultipartUploadResponse+    -- ** Response constructor+    , createMultipartUploadResponse+    -- ** Response lenses+    , cmurBucket+    , cmurKey+    , cmurSSECustomerAlgorithm+    , cmurSSECustomerKeyMD5+    , cmurSSEKMSKeyId+    , cmurServerSideEncryption+    , cmurUploadId+    ) where++import Network.AWS.Prelude+import Network.AWS.Request.RestXML+import Network.AWS.S3.Types+import qualified GHC.Exts++data CreateMultipartUpload = CreateMultipartUpload+    { _cmuACL                     :: Maybe Text+    , _cmuBucket                  :: Text+    , _cmuCacheControl            :: Maybe Text+    , _cmuContentDisposition      :: Maybe Text+    , _cmuContentEncoding         :: Maybe Text+    , _cmuContentLanguage         :: Maybe Text+    , _cmuContentType             :: Maybe Text+    , _cmuExpires                 :: Maybe RFC822+    , _cmuGrantFullControl        :: Maybe Text+    , _cmuGrantRead               :: Maybe Text+    , _cmuGrantReadACP            :: Maybe Text+    , _cmuGrantWriteACP           :: Maybe Text+    , _cmuKey                     :: Text+    , _cmuMetadata                :: Map (CI Text) Text+    , _cmuSSECustomerAlgorithm    :: Maybe Text+    , _cmuSSECustomerKey          :: Maybe (Sensitive Text)+    , _cmuSSECustomerKeyMD5       :: Maybe Text+    , _cmuSSEKMSKeyId             :: Maybe (Sensitive Text)+    , _cmuServerSideEncryption    :: Maybe Text+    , _cmuStorageClass            :: Maybe Text+    , _cmuWebsiteRedirectLocation :: Maybe Text+    } deriving (Eq, Show)++-- | 'CreateMultipartUpload' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'cmuACL' @::@ 'Maybe' 'Text'+--+-- * 'cmuBucket' @::@ 'Text'+--+-- * 'cmuCacheControl' @::@ 'Maybe' 'Text'+--+-- * 'cmuContentDisposition' @::@ 'Maybe' 'Text'+--+-- * 'cmuContentEncoding' @::@ 'Maybe' 'Text'+--+-- * 'cmuContentLanguage' @::@ 'Maybe' 'Text'+--+-- * 'cmuContentType' @::@ 'Maybe' 'Text'+--+-- * 'cmuExpires' @::@ 'Maybe' 'UTCTime'+--+-- * 'cmuGrantFullControl' @::@ 'Maybe' 'Text'+--+-- * 'cmuGrantRead' @::@ 'Maybe' 'Text'+--+-- * 'cmuGrantReadACP' @::@ 'Maybe' 'Text'+--+-- * 'cmuGrantWriteACP' @::@ 'Maybe' 'Text'+--+-- * 'cmuKey' @::@ 'Text'+--+-- * 'cmuMetadata' @::@ 'HashMap' ('CI' 'Text') 'Text'+--+-- * 'cmuSSECustomerAlgorithm' @::@ 'Maybe' 'Text'+--+-- * 'cmuSSECustomerKey' @::@ 'Maybe' 'Text'+--+-- * 'cmuSSECustomerKeyMD5' @::@ 'Maybe' 'Text'+--+-- * 'cmuSSEKMSKeyId' @::@ 'Maybe' 'Text'+--+-- * 'cmuServerSideEncryption' @::@ 'Maybe' 'Text'+--+-- * 'cmuStorageClass' @::@ 'Maybe' 'Text'+--+-- * 'cmuWebsiteRedirectLocation' @::@ 'Maybe' 'Text'+--+createMultipartUpload :: Text -- ^ 'cmuBucket'+                      -> Text -- ^ 'cmuKey'+                      -> CreateMultipartUpload+createMultipartUpload p1 p2 = CreateMultipartUpload+    { _cmuBucket                  = p1+    , _cmuKey                     = p2+    , _cmuACL                     = Nothing+    , _cmuCacheControl            = Nothing+    , _cmuContentDisposition      = Nothing+    , _cmuContentEncoding         = Nothing+    , _cmuContentLanguage         = Nothing+    , _cmuContentType             = Nothing+    , _cmuExpires                 = Nothing+    , _cmuGrantFullControl        = Nothing+    , _cmuGrantRead               = Nothing+    , _cmuGrantReadACP            = Nothing+    , _cmuGrantWriteACP           = Nothing+    , _cmuMetadata                = mempty+    , _cmuServerSideEncryption    = Nothing+    , _cmuStorageClass            = Nothing+    , _cmuWebsiteRedirectLocation = Nothing+    , _cmuSSECustomerAlgorithm    = Nothing+    , _cmuSSECustomerKey          = Nothing+    , _cmuSSECustomerKeyMD5       = Nothing+    , _cmuSSEKMSKeyId             = Nothing+    }++-- | The canned ACL to apply to the object.+cmuACL :: Lens' CreateMultipartUpload (Maybe Text)+cmuACL = lens _cmuACL (\s a -> s { _cmuACL = a })++cmuBucket :: Lens' CreateMultipartUpload Text+cmuBucket = lens _cmuBucket (\s a -> s { _cmuBucket = a })++-- | Specifies caching behavior along the request/reply chain.+cmuCacheControl :: Lens' CreateMultipartUpload (Maybe Text)+cmuCacheControl = lens _cmuCacheControl (\s a -> s { _cmuCacheControl = a })++-- | Specifies presentational information for the object.+cmuContentDisposition :: Lens' CreateMultipartUpload (Maybe Text)+cmuContentDisposition =+    lens _cmuContentDisposition (\s a -> s { _cmuContentDisposition = a })++-- | Specifies what content encodings have been applied to the object and thus+-- what decoding mechanisms must be applied to obtain the media-type+-- referenced by the Content-Type header field.+cmuContentEncoding :: Lens' CreateMultipartUpload (Maybe Text)+cmuContentEncoding =+    lens _cmuContentEncoding (\s a -> s { _cmuContentEncoding = a })++-- | The language the content is in.+cmuContentLanguage :: Lens' CreateMultipartUpload (Maybe Text)+cmuContentLanguage =+    lens _cmuContentLanguage (\s a -> s { _cmuContentLanguage = a })++-- | A standard MIME type describing the format of the object data.+cmuContentType :: Lens' CreateMultipartUpload (Maybe Text)+cmuContentType = lens _cmuContentType (\s a -> s { _cmuContentType = a })++-- | The date and time at which the object is no longer cacheable.+cmuExpires :: Lens' CreateMultipartUpload (Maybe UTCTime)+cmuExpires = lens _cmuExpires (\s a -> s { _cmuExpires = a }) . mapping _Time++-- | Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the+-- object.+cmuGrantFullControl :: Lens' CreateMultipartUpload (Maybe Text)+cmuGrantFullControl =+    lens _cmuGrantFullControl (\s a -> s { _cmuGrantFullControl = a })++-- | Allows grantee to read the object data and its metadata.+cmuGrantRead :: Lens' CreateMultipartUpload (Maybe Text)+cmuGrantRead = lens _cmuGrantRead (\s a -> s { _cmuGrantRead = a })++-- | Allows grantee to read the object ACL.+cmuGrantReadACP :: Lens' CreateMultipartUpload (Maybe Text)+cmuGrantReadACP = lens _cmuGrantReadACP (\s a -> s { _cmuGrantReadACP = a })++-- | Allows grantee to write the ACL for the applicable object.+cmuGrantWriteACP :: Lens' CreateMultipartUpload (Maybe Text)+cmuGrantWriteACP = lens _cmuGrantWriteACP (\s a -> s { _cmuGrantWriteACP = a })++cmuKey :: Lens' CreateMultipartUpload Text+cmuKey = lens _cmuKey (\s a -> s { _cmuKey = a })++-- | A map of metadata to store with the object in S3.+cmuMetadata :: Lens' CreateMultipartUpload (HashMap (CI Text) Text)+cmuMetadata = lens _cmuMetadata (\s a -> s { _cmuMetadata = a }) . _Map++-- | Specifies the algorithm to use to when encrypting the object (e.g.,+-- AES256, aws:kms).+cmuSSECustomerAlgorithm :: Lens' CreateMultipartUpload (Maybe Text)+cmuSSECustomerAlgorithm =+    lens _cmuSSECustomerAlgorithm (\s a -> s { _cmuSSECustomerAlgorithm = a })++-- | Specifies the customer-provided encryption key for Amazon S3 to use in+-- encrypting data. This value is used to store the object and then it is+-- discarded; Amazon does not store the encryption key. The key must be+-- appropriate for use with the algorithm specified in the+-- x-amz-server-side&#x200B;-encryption&#x200B;-customer-algorithm header.+cmuSSECustomerKey :: Lens' CreateMultipartUpload (Maybe Text)+cmuSSECustomerKey =+    lens _cmuSSECustomerKey (\s a -> s { _cmuSSECustomerKey = a })+        . mapping _Sensitive++-- | Specifies the 128-bit MD5 digest of the encryption key according to RFC+-- 1321. Amazon S3 uses this header for a message integrity check to ensure+-- the encryption key was transmitted without error.+cmuSSECustomerKeyMD5 :: Lens' CreateMultipartUpload (Maybe Text)+cmuSSECustomerKeyMD5 =+    lens _cmuSSECustomerKeyMD5 (\s a -> s { _cmuSSECustomerKeyMD5 = a })++-- | Specifies the AWS KMS key ID to use for object encryption.+cmuSSEKMSKeyId :: Lens' CreateMultipartUpload (Maybe Text)+cmuSSEKMSKeyId = lens _cmuSSEKMSKeyId (\s a -> s { _cmuSSEKMSKeyId = a }) . mapping _Sensitive++-- | The Server-side encryption algorithm used when storing this object in S3+-- (e.g., AES256, aws:kms).+cmuServerSideEncryption :: Lens' CreateMultipartUpload (Maybe Text)+cmuServerSideEncryption =+    lens _cmuServerSideEncryption (\s a -> s { _cmuServerSideEncryption = a })++-- | The type of storage to use for the object. Defaults to 'STANDARD'.+cmuStorageClass :: Lens' CreateMultipartUpload (Maybe Text)+cmuStorageClass = lens _cmuStorageClass (\s a -> s { _cmuStorageClass = a })++-- | If the bucket is configured as a website, redirects requests for this+-- object to another object in the same bucket or to an external URL. Amazon+-- S3 stores the value of this header in the object metadata.+cmuWebsiteRedirectLocation :: Lens' CreateMultipartUpload (Maybe Text)+cmuWebsiteRedirectLocation =+    lens _cmuWebsiteRedirectLocation+        (\s a -> s { _cmuWebsiteRedirectLocation = a })++data CreateMultipartUploadResponse = CreateMultipartUploadResponse+    { _cmurBucket               :: Maybe Text+    , _cmurKey                  :: Maybe Text+    , _cmurSSECustomerAlgorithm :: Maybe Text+    , _cmurSSECustomerKeyMD5    :: Maybe Text+    , _cmurSSEKMSKeyId          :: Maybe (Sensitive Text)+    , _cmurServerSideEncryption :: Maybe Text+    , _cmurUploadId             :: Maybe Text+    } deriving (Eq, Ord, Show)++-- | 'CreateMultipartUploadResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'cmurBucket' @::@ 'Maybe' 'Text'+--+-- * 'cmurKey' @::@ 'Maybe' 'Text'+--+-- * 'cmurSSECustomerAlgorithm' @::@ 'Maybe' 'Text'+--+-- * 'cmurSSECustomerKeyMD5' @::@ 'Maybe' 'Text'+--+-- * 'cmurSSEKMSKeyId' @::@ 'Maybe' 'Text'+--+-- * 'cmurServerSideEncryption' @::@ 'Maybe' 'Text'+--+-- * 'cmurUploadId' @::@ 'Maybe' 'Text'+--+createMultipartUploadResponse :: CreateMultipartUploadResponse+createMultipartUploadResponse = CreateMultipartUploadResponse+    { _cmurBucket               = Nothing+    , _cmurKey                  = Nothing+    , _cmurUploadId             = Nothing+    , _cmurServerSideEncryption = Nothing+    , _cmurSSECustomerAlgorithm = Nothing+    , _cmurSSECustomerKeyMD5    = Nothing+    , _cmurSSEKMSKeyId          = Nothing+    }++-- | Name of the bucket to which the multipart upload was initiated.+cmurBucket :: Lens' CreateMultipartUploadResponse (Maybe Text)+cmurBucket = lens _cmurBucket (\s a -> s { _cmurBucket = a })++-- | Object key for which the multipart upload was initiated.+cmurKey :: Lens' CreateMultipartUploadResponse (Maybe Text)+cmurKey = lens _cmurKey (\s a -> s { _cmurKey = a })++-- | If server-side encryption with a customer-provided encryption key was+-- requested, the response will include this header confirming the+-- encryption algorithm used.+cmurSSECustomerAlgorithm :: Lens' CreateMultipartUploadResponse (Maybe Text)+cmurSSECustomerAlgorithm =+    lens _cmurSSECustomerAlgorithm+        (\s a -> s { _cmurSSECustomerAlgorithm = a })++-- | If server-side encryption with a customer-provided encryption key was+-- requested, the response will include this header to provide round trip+-- message integrity verification of the customer-provided encryption key.+cmurSSECustomerKeyMD5 :: Lens' CreateMultipartUploadResponse (Maybe Text)+cmurSSECustomerKeyMD5 =+    lens _cmurSSECustomerKeyMD5 (\s a -> s { _cmurSSECustomerKeyMD5 = a })++-- | If present, specifies the AWS KMS key used to encrypt the object.+cmurSSEKMSKeyId :: Lens' CreateMultipartUploadResponse (Maybe Text)+cmurSSEKMSKeyId = lens _cmurSSEKMSKeyId (\s a -> s { _cmurSSEKMSKeyId = a }) . mapping _Sensitive++-- | The Server-side encryption algorithm used when storing this object in S3+-- (e.g., AES256, aws:kms).+cmurServerSideEncryption :: Lens' CreateMultipartUploadResponse (Maybe Text)+cmurServerSideEncryption =+    lens _cmurServerSideEncryption+        (\s a -> s { _cmurServerSideEncryption = a })++-- | ID for the initiated multipart upload.+cmurUploadId :: Lens' CreateMultipartUploadResponse (Maybe Text)+cmurUploadId = lens _cmurUploadId (\s a -> s { _cmurUploadId = a })++instance ToPath CreateMultipartUpload where+    toPath CreateMultipartUpload{..} = mconcat+        [ "/"+        , toText _cmuBucket+        , "/"+        , toText _cmuKey+        ]++instance ToQuery CreateMultipartUpload where+    toQuery = const "uploads"++instance ToHeaders CreateMultipartUpload where+    toHeaders CreateMultipartUpload{..} = mconcat+        [ "x-amz-acl"                                       =: _cmuACL+        , "Cache-Control"                                   =: _cmuCacheControl+        , "Content-Disposition"                             =: _cmuContentDisposition+        , "Content-Encoding"                                =: _cmuContentEncoding+        , "Content-Language"                                =: _cmuContentLanguage+        , "Content-Type"                                    =: _cmuContentType+        , "Expires"                                         =: _cmuExpires+        , "x-amz-grant-full-control"                        =: _cmuGrantFullControl+        , "x-amz-grant-read"                                =: _cmuGrantRead+        , "x-amz-grant-read-acp"                            =: _cmuGrantReadACP+        , "x-amz-grant-write-acp"                           =: _cmuGrantWriteACP+        , "x-amz-meta-"                                     =: _cmuMetadata+        , "x-amz-server-side-encryption"                    =: _cmuServerSideEncryption+        , "x-amz-storage-class"                             =: _cmuStorageClass+        , "x-amz-website-redirect-location"                 =: _cmuWebsiteRedirectLocation+        , "x-amz-server-side-encryption-customer-algorithm" =: _cmuSSECustomerAlgorithm+        , "x-amz-server-side-encryption-customer-key"       =: _cmuSSECustomerKey+        , "x-amz-server-side-encryption-customer-key-MD5"   =: _cmuSSECustomerKeyMD5+        , "x-amz-server-side-encryption-aws-kms-key-id"     =: _cmuSSEKMSKeyId+        ]++instance ToXMLRoot CreateMultipartUpload where+    toXMLRoot = const (namespaced ns "CreateMultipartUpload" [])++instance ToXML CreateMultipartUpload++instance AWSRequest CreateMultipartUpload where+    type Sv CreateMultipartUpload = S3+    type Rs CreateMultipartUpload = CreateMultipartUploadResponse++    request  = post+    response = xmlHeaderResponse $ \h x -> CreateMultipartUploadResponse+        <$> x .@? "Bucket"+        <*> x .@? "Key"+        <*> h ~:? "x-amz-server-side-encryption-customer-algorithm"+        <*> h ~:? "x-amz-server-side-encryption-customer-key-MD5"+        <*> h ~:? "x-amz-server-side-encryption-aws-kms-key-id"+        <*> h ~:? "x-amz-server-side-encryption"+        <*> x .@? "UploadId"
+ gen/Network/AWS/S3/DeleteBucket.hs view
@@ -0,0 +1,95 @@+{-# 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.S3.DeleteBucket+-- Copyright   : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>+-- License     : This Source Code Form is subject to the terms of+--               the Mozilla Public License, v. 2.0.+--               A copy of the MPL can be found in the LICENSE file or+--               you can obtain it at http://mozilla.org/MPL/2.0/.+-- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability   : experimental+-- Portability : non-portable (GHC extensions)++-- | Deletes the bucket. All objects (including all object versions and Delete+-- Markers) in the bucket must be deleted before the bucket itself can be+-- deleted.+--+-- <http://docs.aws.amazon.com/AmazonS3/latest/API/DeleteBucket.html>+module Network.AWS.S3.DeleteBucket+    (+    -- * Request+      DeleteBucket+    -- ** Request constructor+    , deleteBucket+    -- ** Request lenses+    , dbBucket++    -- * Response+    , DeleteBucketResponse+    -- ** Response constructor+    , deleteBucketResponse+    ) where++import Network.AWS.Prelude+import Network.AWS.Request.RestXML+import Network.AWS.S3.Types+import qualified GHC.Exts++newtype DeleteBucket = DeleteBucket+    { _dbBucket :: Text+    } deriving (Eq, Ord, Show, Monoid, IsString)++-- | 'DeleteBucket' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'dbBucket' @::@ 'Text'+--+deleteBucket :: Text -- ^ 'dbBucket'+             -> DeleteBucket+deleteBucket p1 = DeleteBucket+    { _dbBucket = p1+    }++dbBucket :: Lens' DeleteBucket Text+dbBucket = lens _dbBucket (\s a -> s { _dbBucket = a })++data DeleteBucketResponse = DeleteBucketResponse+    deriving (Eq, Ord, Show, Generic)++-- | 'DeleteBucketResponse' constructor.+deleteBucketResponse :: DeleteBucketResponse+deleteBucketResponse = DeleteBucketResponse++instance ToPath DeleteBucket where+    toPath DeleteBucket{..} = mconcat+        [ "/"+        , toText _dbBucket+        ]++instance ToQuery DeleteBucket where+    toQuery = const mempty++instance ToHeaders DeleteBucket++instance ToXMLRoot DeleteBucket where+    toXMLRoot = const (namespaced ns "DeleteBucket" [])++instance ToXML DeleteBucket++instance AWSRequest DeleteBucket where+    type Sv DeleteBucket = S3+    type Rs DeleteBucket = DeleteBucketResponse++    request  = delete+    response = nullResponse DeleteBucketResponse
+ gen/Network/AWS/S3/DeleteBucketCors.hs view
@@ -0,0 +1,93 @@+{-# LANGUAGE DataKinds                   #-}+{-# LANGUAGE DeriveGeneric               #-}+{-# LANGUAGE FlexibleInstances           #-}+{-# LANGUAGE GeneralizedNewtypeDeriving  #-}+{-# LANGUAGE LambdaCase                  #-}+{-# LANGUAGE NoImplicitPrelude           #-}+{-# LANGUAGE OverloadedStrings           #-}+{-# LANGUAGE RecordWildCards             #-}+{-# LANGUAGE TypeFamilies                #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Module      : Network.AWS.S3.DeleteBucketCors+-- Copyright   : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>+-- License     : This Source Code Form is subject to the terms of+--               the Mozilla Public License, v. 2.0.+--               A copy of the MPL can be found in the LICENSE file or+--               you can obtain it at http://mozilla.org/MPL/2.0/.+-- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability   : experimental+-- Portability : non-portable (GHC extensions)++-- | Deletes the cors configuration information set for the bucket.+--+-- <http://docs.aws.amazon.com/AmazonS3/latest/API/DeleteBucketCors.html>+module Network.AWS.S3.DeleteBucketCors+    (+    -- * Request+      DeleteBucketCors+    -- ** Request constructor+    , deleteBucketCors+    -- ** Request lenses+    , dbcBucket++    -- * Response+    , DeleteBucketCorsResponse+    -- ** Response constructor+    , deleteBucketCorsResponse+    ) where++import Network.AWS.Prelude+import Network.AWS.Request.RestXML+import Network.AWS.S3.Types+import qualified GHC.Exts++newtype DeleteBucketCors = DeleteBucketCors+    { _dbcBucket :: Text+    } deriving (Eq, Ord, Show, Monoid, IsString)++-- | 'DeleteBucketCors' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'dbcBucket' @::@ 'Text'+--+deleteBucketCors :: Text -- ^ 'dbcBucket'+                 -> DeleteBucketCors+deleteBucketCors p1 = DeleteBucketCors+    { _dbcBucket = p1+    }++dbcBucket :: Lens' DeleteBucketCors Text+dbcBucket = lens _dbcBucket (\s a -> s { _dbcBucket = a })++data DeleteBucketCorsResponse = DeleteBucketCorsResponse+    deriving (Eq, Ord, Show, Generic)++-- | 'DeleteBucketCorsResponse' constructor.+deleteBucketCorsResponse :: DeleteBucketCorsResponse+deleteBucketCorsResponse = DeleteBucketCorsResponse++instance ToPath DeleteBucketCors where+    toPath DeleteBucketCors{..} = mconcat+        [ "/"+        , toText _dbcBucket+        ]++instance ToQuery DeleteBucketCors where+    toQuery = const "cors"++instance ToHeaders DeleteBucketCors++instance ToXMLRoot DeleteBucketCors where+    toXMLRoot = const (namespaced ns "DeleteBucketCors" [])++instance ToXML DeleteBucketCors++instance AWSRequest DeleteBucketCors where+    type Sv DeleteBucketCors = S3+    type Rs DeleteBucketCors = DeleteBucketCorsResponse++    request  = delete+    response = nullResponse DeleteBucketCorsResponse
+ gen/Network/AWS/S3/DeleteBucketLifecycle.hs view
@@ -0,0 +1,93 @@+{-# LANGUAGE DataKinds                   #-}+{-# LANGUAGE DeriveGeneric               #-}+{-# LANGUAGE FlexibleInstances           #-}+{-# LANGUAGE GeneralizedNewtypeDeriving  #-}+{-# LANGUAGE LambdaCase                  #-}+{-# LANGUAGE NoImplicitPrelude           #-}+{-# LANGUAGE OverloadedStrings           #-}+{-# LANGUAGE RecordWildCards             #-}+{-# LANGUAGE TypeFamilies                #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Module      : Network.AWS.S3.DeleteBucketLifecycle+-- Copyright   : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>+-- License     : This Source Code Form is subject to the terms of+--               the Mozilla Public License, v. 2.0.+--               A copy of the MPL can be found in the LICENSE file or+--               you can obtain it at http://mozilla.org/MPL/2.0/.+-- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability   : experimental+-- Portability : non-portable (GHC extensions)++-- | Deletes the lifecycle configuration from the bucket.+--+-- <http://docs.aws.amazon.com/AmazonS3/latest/API/DeleteBucketLifecycle.html>+module Network.AWS.S3.DeleteBucketLifecycle+    (+    -- * Request+      DeleteBucketLifecycle+    -- ** Request constructor+    , deleteBucketLifecycle+    -- ** Request lenses+    , dblBucket++    -- * Response+    , DeleteBucketLifecycleResponse+    -- ** Response constructor+    , deleteBucketLifecycleResponse+    ) where++import Network.AWS.Prelude+import Network.AWS.Request.RestXML+import Network.AWS.S3.Types+import qualified GHC.Exts++newtype DeleteBucketLifecycle = DeleteBucketLifecycle+    { _dblBucket :: Text+    } deriving (Eq, Ord, Show, Monoid, IsString)++-- | 'DeleteBucketLifecycle' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'dblBucket' @::@ 'Text'+--+deleteBucketLifecycle :: Text -- ^ 'dblBucket'+                      -> DeleteBucketLifecycle+deleteBucketLifecycle p1 = DeleteBucketLifecycle+    { _dblBucket = p1+    }++dblBucket :: Lens' DeleteBucketLifecycle Text+dblBucket = lens _dblBucket (\s a -> s { _dblBucket = a })++data DeleteBucketLifecycleResponse = DeleteBucketLifecycleResponse+    deriving (Eq, Ord, Show, Generic)++-- | 'DeleteBucketLifecycleResponse' constructor.+deleteBucketLifecycleResponse :: DeleteBucketLifecycleResponse+deleteBucketLifecycleResponse = DeleteBucketLifecycleResponse++instance ToPath DeleteBucketLifecycle where+    toPath DeleteBucketLifecycle{..} = mconcat+        [ "/"+        , toText _dblBucket+        ]++instance ToQuery DeleteBucketLifecycle where+    toQuery = const "lifecycle"++instance ToHeaders DeleteBucketLifecycle++instance ToXMLRoot DeleteBucketLifecycle where+    toXMLRoot = const (namespaced ns "DeleteBucketLifecycle" [])++instance ToXML DeleteBucketLifecycle++instance AWSRequest DeleteBucketLifecycle where+    type Sv DeleteBucketLifecycle = S3+    type Rs DeleteBucketLifecycle = DeleteBucketLifecycleResponse++    request  = delete+    response = nullResponse DeleteBucketLifecycleResponse
+ gen/Network/AWS/S3/DeleteBucketPolicy.hs view
@@ -0,0 +1,93 @@+{-# LANGUAGE DataKinds                   #-}+{-# LANGUAGE DeriveGeneric               #-}+{-# LANGUAGE FlexibleInstances           #-}+{-# LANGUAGE GeneralizedNewtypeDeriving  #-}+{-# LANGUAGE LambdaCase                  #-}+{-# LANGUAGE NoImplicitPrelude           #-}+{-# LANGUAGE OverloadedStrings           #-}+{-# LANGUAGE RecordWildCards             #-}+{-# LANGUAGE TypeFamilies                #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Module      : Network.AWS.S3.DeleteBucketPolicy+-- Copyright   : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>+-- License     : This Source Code Form is subject to the terms of+--               the Mozilla Public License, v. 2.0.+--               A copy of the MPL can be found in the LICENSE file or+--               you can obtain it at http://mozilla.org/MPL/2.0/.+-- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability   : experimental+-- Portability : non-portable (GHC extensions)++-- | Deletes the policy from the bucket.+--+-- <http://docs.aws.amazon.com/AmazonS3/latest/API/DeleteBucketPolicy.html>+module Network.AWS.S3.DeleteBucketPolicy+    (+    -- * Request+      DeleteBucketPolicy+    -- ** Request constructor+    , deleteBucketPolicy+    -- ** Request lenses+    , dbpBucket++    -- * Response+    , DeleteBucketPolicyResponse+    -- ** Response constructor+    , deleteBucketPolicyResponse+    ) where++import Network.AWS.Prelude+import Network.AWS.Request.RestXML+import Network.AWS.S3.Types+import qualified GHC.Exts++newtype DeleteBucketPolicy = DeleteBucketPolicy+    { _dbpBucket :: Text+    } deriving (Eq, Ord, Show, Monoid, IsString)++-- | 'DeleteBucketPolicy' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'dbpBucket' @::@ 'Text'+--+deleteBucketPolicy :: Text -- ^ 'dbpBucket'+                   -> DeleteBucketPolicy+deleteBucketPolicy p1 = DeleteBucketPolicy+    { _dbpBucket = p1+    }++dbpBucket :: Lens' DeleteBucketPolicy Text+dbpBucket = lens _dbpBucket (\s a -> s { _dbpBucket = a })++data DeleteBucketPolicyResponse = DeleteBucketPolicyResponse+    deriving (Eq, Ord, Show, Generic)++-- | 'DeleteBucketPolicyResponse' constructor.+deleteBucketPolicyResponse :: DeleteBucketPolicyResponse+deleteBucketPolicyResponse = DeleteBucketPolicyResponse++instance ToPath DeleteBucketPolicy where+    toPath DeleteBucketPolicy{..} = mconcat+        [ "/"+        , toText _dbpBucket+        ]++instance ToQuery DeleteBucketPolicy where+    toQuery = const "policy"++instance ToHeaders DeleteBucketPolicy++instance ToXMLRoot DeleteBucketPolicy where+    toXMLRoot = const (namespaced ns "DeleteBucketPolicy" [])++instance ToXML DeleteBucketPolicy++instance AWSRequest DeleteBucketPolicy where+    type Sv DeleteBucketPolicy = S3+    type Rs DeleteBucketPolicy = DeleteBucketPolicyResponse++    request  = delete+    response = nullResponse DeleteBucketPolicyResponse
+ gen/Network/AWS/S3/DeleteBucketTagging.hs view
@@ -0,0 +1,93 @@+{-# LANGUAGE DataKinds                   #-}+{-# LANGUAGE DeriveGeneric               #-}+{-# LANGUAGE FlexibleInstances           #-}+{-# LANGUAGE GeneralizedNewtypeDeriving  #-}+{-# LANGUAGE LambdaCase                  #-}+{-# LANGUAGE NoImplicitPrelude           #-}+{-# LANGUAGE OverloadedStrings           #-}+{-# LANGUAGE RecordWildCards             #-}+{-# LANGUAGE TypeFamilies                #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Module      : Network.AWS.S3.DeleteBucketTagging+-- Copyright   : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>+-- License     : This Source Code Form is subject to the terms of+--               the Mozilla Public License, v. 2.0.+--               A copy of the MPL can be found in the LICENSE file or+--               you can obtain it at http://mozilla.org/MPL/2.0/.+-- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability   : experimental+-- Portability : non-portable (GHC extensions)++-- | Deletes the tags from the bucket.+--+-- <http://docs.aws.amazon.com/AmazonS3/latest/API/DeleteBucketTagging.html>+module Network.AWS.S3.DeleteBucketTagging+    (+    -- * Request+      DeleteBucketTagging+    -- ** Request constructor+    , deleteBucketTagging+    -- ** Request lenses+    , dbtBucket++    -- * Response+    , DeleteBucketTaggingResponse+    -- ** Response constructor+    , deleteBucketTaggingResponse+    ) where++import Network.AWS.Prelude+import Network.AWS.Request.RestXML+import Network.AWS.S3.Types+import qualified GHC.Exts++newtype DeleteBucketTagging = DeleteBucketTagging+    { _dbtBucket :: Text+    } deriving (Eq, Ord, Show, Monoid, IsString)++-- | 'DeleteBucketTagging' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'dbtBucket' @::@ 'Text'+--+deleteBucketTagging :: Text -- ^ 'dbtBucket'+                    -> DeleteBucketTagging+deleteBucketTagging p1 = DeleteBucketTagging+    { _dbtBucket = p1+    }++dbtBucket :: Lens' DeleteBucketTagging Text+dbtBucket = lens _dbtBucket (\s a -> s { _dbtBucket = a })++data DeleteBucketTaggingResponse = DeleteBucketTaggingResponse+    deriving (Eq, Ord, Show, Generic)++-- | 'DeleteBucketTaggingResponse' constructor.+deleteBucketTaggingResponse :: DeleteBucketTaggingResponse+deleteBucketTaggingResponse = DeleteBucketTaggingResponse++instance ToPath DeleteBucketTagging where+    toPath DeleteBucketTagging{..} = mconcat+        [ "/"+        , toText _dbtBucket+        ]++instance ToQuery DeleteBucketTagging where+    toQuery = const "tagging"++instance ToHeaders DeleteBucketTagging++instance ToXMLRoot DeleteBucketTagging where+    toXMLRoot = const (namespaced ns "DeleteBucketTagging" [])++instance ToXML DeleteBucketTagging++instance AWSRequest DeleteBucketTagging where+    type Sv DeleteBucketTagging = S3+    type Rs DeleteBucketTagging = DeleteBucketTaggingResponse++    request  = delete+    response = nullResponse DeleteBucketTaggingResponse
+ gen/Network/AWS/S3/DeleteBucketWebsite.hs view
@@ -0,0 +1,93 @@+{-# LANGUAGE DataKinds                   #-}+{-# LANGUAGE DeriveGeneric               #-}+{-# LANGUAGE FlexibleInstances           #-}+{-# LANGUAGE GeneralizedNewtypeDeriving  #-}+{-# LANGUAGE LambdaCase                  #-}+{-# LANGUAGE NoImplicitPrelude           #-}+{-# LANGUAGE OverloadedStrings           #-}+{-# LANGUAGE RecordWildCards             #-}+{-# LANGUAGE TypeFamilies                #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Module      : Network.AWS.S3.DeleteBucketWebsite+-- 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)++-- | This operation removes the website configuration from the bucket.+--+-- <http://docs.aws.amazon.com/AmazonS3/latest/API/DeleteBucketWebsite.html>+module Network.AWS.S3.DeleteBucketWebsite+    (+    -- * Request+      DeleteBucketWebsite+    -- ** Request constructor+    , deleteBucketWebsite+    -- ** Request lenses+    , dbwBucket++    -- * Response+    , DeleteBucketWebsiteResponse+    -- ** Response constructor+    , deleteBucketWebsiteResponse+    ) where++import Network.AWS.Prelude+import Network.AWS.Request.RestXML+import Network.AWS.S3.Types+import qualified GHC.Exts++newtype DeleteBucketWebsite = DeleteBucketWebsite+    { _dbwBucket :: Text+    } deriving (Eq, Ord, Show, Monoid, IsString)++-- | 'DeleteBucketWebsite' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'dbwBucket' @::@ 'Text'+--+deleteBucketWebsite :: Text -- ^ 'dbwBucket'+                    -> DeleteBucketWebsite+deleteBucketWebsite p1 = DeleteBucketWebsite+    { _dbwBucket = p1+    }++dbwBucket :: Lens' DeleteBucketWebsite Text+dbwBucket = lens _dbwBucket (\s a -> s { _dbwBucket = a })++data DeleteBucketWebsiteResponse = DeleteBucketWebsiteResponse+    deriving (Eq, Ord, Show, Generic)++-- | 'DeleteBucketWebsiteResponse' constructor.+deleteBucketWebsiteResponse :: DeleteBucketWebsiteResponse+deleteBucketWebsiteResponse = DeleteBucketWebsiteResponse++instance ToPath DeleteBucketWebsite where+    toPath DeleteBucketWebsite{..} = mconcat+        [ "/"+        , toText _dbwBucket+        ]++instance ToQuery DeleteBucketWebsite where+    toQuery = const "website"++instance ToHeaders DeleteBucketWebsite++instance ToXMLRoot DeleteBucketWebsite where+    toXMLRoot = const (namespaced ns "DeleteBucketWebsite" [])++instance ToXML DeleteBucketWebsite++instance AWSRequest DeleteBucketWebsite where+    type Sv DeleteBucketWebsite = S3+    type Rs DeleteBucketWebsite = DeleteBucketWebsiteResponse++    request  = delete+    response = nullResponse DeleteBucketWebsiteResponse
+ gen/Network/AWS/S3/DeleteObject.hs view
@@ -0,0 +1,155 @@+{-# 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.S3.DeleteObject+-- 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)++-- | Removes the null version (if there is one) of an object and inserts a+-- delete marker, which becomes the latest version of the object. If there+-- isn't a null version, Amazon S3 does not remove any objects.+--+-- <http://docs.aws.amazon.com/AmazonS3/latest/API/DeleteObject.html>+module Network.AWS.S3.DeleteObject+    (+    -- * Request+      DeleteObject+    -- ** Request constructor+    , deleteObject+    -- ** Request lenses+    , doBucket+    , doKey+    , doMFA+    , doVersionId++    -- * Response+    , DeleteObjectResponse+    -- ** Response constructor+    , deleteObjectResponse+    -- ** Response lenses+    , dorDeleteMarker+    , dorVersionId+    ) where++import Network.AWS.Prelude+import Network.AWS.Request.RestXML+import Network.AWS.S3.Types+import qualified GHC.Exts++data DeleteObject = DeleteObject+    { _doBucket    :: Text+    , _doKey       :: Text+    , _doMFA       :: Maybe Text+    , _doVersionId :: Maybe Text+    } deriving (Eq, Ord, Show)++-- | 'DeleteObject' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'doBucket' @::@ 'Text'+--+-- * 'doKey' @::@ 'Text'+--+-- * 'doMFA' @::@ 'Maybe' 'Text'+--+-- * 'doVersionId' @::@ 'Maybe' 'Text'+--+deleteObject :: Text -- ^ 'doBucket'+             -> Text -- ^ 'doKey'+             -> DeleteObject+deleteObject p1 p2 = DeleteObject+    { _doBucket    = p1+    , _doKey       = p2+    , _doMFA       = Nothing+    , _doVersionId = Nothing+    }++doBucket :: Lens' DeleteObject Text+doBucket = lens _doBucket (\s a -> s { _doBucket = a })++doKey :: Lens' DeleteObject Text+doKey = lens _doKey (\s a -> s { _doKey = a })++-- | The concatenation of the authentication device's serial number, a space,+-- and the value that is displayed on your authentication device.+doMFA :: Lens' DeleteObject (Maybe Text)+doMFA = lens _doMFA (\s a -> s { _doMFA = a })++-- | VersionId used to reference a specific version of the object.+doVersionId :: Lens' DeleteObject (Maybe Text)+doVersionId = lens _doVersionId (\s a -> s { _doVersionId = a })++data DeleteObjectResponse = DeleteObjectResponse+    { _dorDeleteMarker :: Maybe Bool+    , _dorVersionId    :: Maybe Text+    } deriving (Eq, Ord, Show)++-- | 'DeleteObjectResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'dorDeleteMarker' @::@ 'Maybe' 'Bool'+--+-- * 'dorVersionId' @::@ 'Maybe' 'Text'+--+deleteObjectResponse :: DeleteObjectResponse+deleteObjectResponse = DeleteObjectResponse+    { _dorDeleteMarker = Nothing+    , _dorVersionId    = Nothing+    }++-- | Specifies whether the versioned object that was permanently deleted was+-- (true) or was not (false) a delete marker.+dorDeleteMarker :: Lens' DeleteObjectResponse (Maybe Bool)+dorDeleteMarker = lens _dorDeleteMarker (\s a -> s { _dorDeleteMarker = a })++-- | Returns the version ID of the delete marker created as a result of the+-- DELETE operation.+dorVersionId :: Lens' DeleteObjectResponse (Maybe Text)+dorVersionId = lens _dorVersionId (\s a -> s { _dorVersionId = a })++instance ToPath DeleteObject where+    toPath DeleteObject{..} = mconcat+        [ "/"+        , toText _doBucket+        , "/"+        , toText _doKey+        ]++instance ToQuery DeleteObject where+    toQuery rq = "versionId" =? _doVersionId rq++instance ToHeaders DeleteObject where+    toHeaders DeleteObject{..} = mconcat+        [ "x-amz-mfa" =: _doMFA+        ]++instance ToXMLRoot DeleteObject where+    toXMLRoot = const (namespaced ns "DeleteObject" [])++instance ToXML DeleteObject++instance AWSRequest DeleteObject where+    type Sv DeleteObject = S3+    type Rs DeleteObject = DeleteObjectResponse++    request  = delete+    response = headerResponse $ \h -> DeleteObjectResponse+        <$> h ~:? "x-amz-delete-marker"+        <*> h ~:? "x-amz-version-id"
+ gen/Network/AWS/S3/DeleteObjects.hs view
@@ -0,0 +1,146 @@+{-# 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.S3.DeleteObjects+-- 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)++-- | This operation enables you to delete multiple objects from a bucket using a+-- single HTTP request. You may specify up to 1000 keys.+--+-- <http://docs.aws.amazon.com/AmazonS3/latest/API/DeleteObjects.html>+module Network.AWS.S3.DeleteObjects+    (+    -- * Request+      DeleteObjects+    -- ** Request constructor+    , deleteObjects+    -- ** Request lenses+    , do1Bucket+    , do1Delete+    , do1MFA++    -- * Response+    , DeleteObjectsResponse+    -- ** Response constructor+    , deleteObjectsResponse+    -- ** Response lenses+    , dorDeleted+    , dorErrors+    ) where++import Network.AWS.Prelude+import Network.AWS.Request.RestXML+import Network.AWS.S3.Types+import qualified GHC.Exts++data DeleteObjects = DeleteObjects+    { _do1Bucket :: Text+    , _do1Delete :: Delete+    , _do1MFA    :: Maybe Text+    } deriving (Eq, Show)++-- | 'DeleteObjects' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'do1Bucket' @::@ 'Text'+--+-- * 'do1Delete' @::@ 'Delete'+--+-- * 'do1MFA' @::@ 'Maybe' 'Text'+--+deleteObjects :: Text -- ^ 'do1Bucket'+              -> Delete -- ^ 'do1Delete'+              -> DeleteObjects+deleteObjects p1 p2 = DeleteObjects+    { _do1Bucket = p1+    , _do1Delete = p2+    , _do1MFA    = Nothing+    }++do1Bucket :: Lens' DeleteObjects Text+do1Bucket = lens _do1Bucket (\s a -> s { _do1Bucket = a })++do1Delete :: Lens' DeleteObjects Delete+do1Delete = lens _do1Delete (\s a -> s { _do1Delete = a })++-- | The concatenation of the authentication device's serial number, a space,+-- and the value that is displayed on your authentication device.+do1MFA :: Lens' DeleteObjects (Maybe Text)+do1MFA = lens _do1MFA (\s a -> s { _do1MFA = a })++data DeleteObjectsResponse = DeleteObjectsResponse+    { _dorDeleted :: List "Deleted" DeletedObject+    , _dorErrors  :: List "Error" S3ServiceError+    } deriving (Eq, Show)++-- | 'DeleteObjectsResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'dorDeleted' @::@ ['DeletedObject']+--+-- * 'dorErrors' @::@ ['S3ServiceError']+--+deleteObjectsResponse :: [DeletedObject] -- ^ 'dorDeleted'+                      -> [S3ServiceError] -- ^ 'dorErrors'+                      -> DeleteObjectsResponse+deleteObjectsResponse p1 p2 = DeleteObjectsResponse+    { _dorDeleted = withIso _List (const id) p1+    , _dorErrors  = withIso _List (const id) p2+    }++dorDeleted :: Lens' DeleteObjectsResponse [DeletedObject]+dorDeleted = lens _dorDeleted (\s a -> s { _dorDeleted = a }) . _List++dorErrors :: Lens' DeleteObjectsResponse [S3ServiceError]+dorErrors = lens _dorErrors (\s a -> s { _dorErrors = a }) . _List++instance ToPath DeleteObjects where+    toPath DeleteObjects{..} = mconcat+        [ "/"+        , toText _do1Bucket+        ]++instance ToQuery DeleteObjects where+    toQuery = const "delete"++instance ToHeaders DeleteObjects where+    toHeaders DeleteObjects{..} = mconcat+        [ "x-amz-mfa" =: _do1MFA+        ]++instance ToXMLRoot DeleteObjects where+    toXMLRoot DeleteObjects{..} = namespaced ns "DeleteObjects"+        [ "Delete" =@ _do1Delete+        ]++instance ToXML DeleteObjects++instance AWSRequest DeleteObjects where+    type Sv DeleteObjects = S3+    type Rs DeleteObjects = DeleteObjectsResponse++    request  = post+    response = xmlResponse++instance FromXML DeleteObjectsResponse where+    parseXML x = DeleteObjectsResponse+        <$> parseXML x+        <*> parseXML x
+ gen/Network/AWS/S3/GetBucketAcl.hs view
@@ -0,0 +1,120 @@+{-# 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.S3.GetBucketAcl+-- Copyright   : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>+-- License     : This Source Code Form is subject to the terms of+--               the Mozilla Public License, v. 2.0.+--               A copy of the MPL can be found in the LICENSE file or+--               you can obtain it at http://mozilla.org/MPL/2.0/.+-- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability   : experimental+-- Portability : non-portable (GHC extensions)++-- | Gets the access control policy for the bucket.+--+-- <http://docs.aws.amazon.com/AmazonS3/latest/API/GetBucketAcl.html>+module Network.AWS.S3.GetBucketAcl+    (+    -- * Request+      GetBucketAcl+    -- ** Request constructor+    , getBucketAcl+    -- ** Request lenses+    , gbaBucket++    -- * Response+    , GetBucketAclResponse+    -- ** Response constructor+    , getBucketAclResponse+    -- ** Response lenses+    , gbarGrants+    , gbarOwner+    ) where++import Network.AWS.Prelude+import Network.AWS.Request.RestXML+import Network.AWS.S3.Types+import qualified GHC.Exts++newtype GetBucketAcl = GetBucketAcl+    { _gbaBucket :: Text+    } deriving (Eq, Ord, Show, Monoid, IsString)++-- | 'GetBucketAcl' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'gbaBucket' @::@ 'Text'+--+getBucketAcl :: Text -- ^ 'gbaBucket'+             -> GetBucketAcl+getBucketAcl p1 = GetBucketAcl+    { _gbaBucket = p1+    }++gbaBucket :: Lens' GetBucketAcl Text+gbaBucket = lens _gbaBucket (\s a -> s { _gbaBucket = a })++data GetBucketAclResponse = GetBucketAclResponse+    { _gbarGrants :: List "Grant" Grant+    , _gbarOwner  :: Maybe Owner+    } deriving (Eq, Show)++-- | 'GetBucketAclResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'gbarGrants' @::@ ['Grant']+--+-- * 'gbarOwner' @::@ 'Maybe' 'Owner'+--+getBucketAclResponse :: GetBucketAclResponse+getBucketAclResponse = GetBucketAclResponse+    { _gbarOwner  = Nothing+    , _gbarGrants = mempty+    }++-- | A list of grants.+gbarGrants :: Lens' GetBucketAclResponse [Grant]+gbarGrants = lens _gbarGrants (\s a -> s { _gbarGrants = a }) . _List++gbarOwner :: Lens' GetBucketAclResponse (Maybe Owner)+gbarOwner = lens _gbarOwner (\s a -> s { _gbarOwner = a })++instance ToPath GetBucketAcl where+    toPath GetBucketAcl{..} = mconcat+        [ "/"+        , toText _gbaBucket+        ]++instance ToQuery GetBucketAcl where+    toQuery = const "acl"++instance ToHeaders GetBucketAcl++instance ToXMLRoot GetBucketAcl where+    toXMLRoot = const (namespaced ns "GetBucketAcl" [])++instance ToXML GetBucketAcl++instance AWSRequest GetBucketAcl where+    type Sv GetBucketAcl = S3+    type Rs GetBucketAcl = GetBucketAclResponse++    request  = get+    response = xmlResponse++instance FromXML GetBucketAclResponse where+    parseXML x = GetBucketAclResponse+        <$> x .@  "AccessControlList"+        <*> x .@? "Owner"
+ gen/Network/AWS/S3/GetBucketCors.hs view
@@ -0,0 +1,111 @@+{-# 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.S3.GetBucketCors+-- 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)++-- | Returns the cors configuration for the bucket.+--+-- <http://docs.aws.amazon.com/AmazonS3/latest/API/GetBucketCors.html>+module Network.AWS.S3.GetBucketCors+    (+    -- * Request+      GetBucketCors+    -- ** Request constructor+    , getBucketCors+    -- ** Request lenses+    , gbcBucket++    -- * Response+    , GetBucketCorsResponse+    -- ** Response constructor+    , getBucketCorsResponse+    -- ** Response lenses+    , gbcrCORSRules+    ) where++import Network.AWS.Prelude+import Network.AWS.Request.RestXML+import Network.AWS.S3.Types+import qualified GHC.Exts++newtype GetBucketCors = GetBucketCors+    { _gbcBucket :: Text+    } deriving (Eq, Ord, Show, Monoid, IsString)++-- | 'GetBucketCors' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'gbcBucket' @::@ 'Text'+--+getBucketCors :: Text -- ^ 'gbcBucket'+              -> GetBucketCors+getBucketCors p1 = GetBucketCors+    { _gbcBucket = p1+    }++gbcBucket :: Lens' GetBucketCors Text+gbcBucket = lens _gbcBucket (\s a -> s { _gbcBucket = a })++newtype GetBucketCorsResponse = GetBucketCorsResponse+    { _gbcrCORSRules :: List "CORSRule" CORSRule+    } deriving (Eq, Show, Monoid, Semigroup)++-- | 'GetBucketCorsResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'gbcrCORSRules' @::@ ['CORSRule']+--+getBucketCorsResponse :: [CORSRule] -- ^ 'gbcrCORSRules'+                      -> GetBucketCorsResponse+getBucketCorsResponse p1 = GetBucketCorsResponse+    { _gbcrCORSRules = withIso _List (const id) p1+    }++gbcrCORSRules :: Lens' GetBucketCorsResponse [CORSRule]+gbcrCORSRules = lens _gbcrCORSRules (\s a -> s { _gbcrCORSRules = a }) . _List++instance ToPath GetBucketCors where+    toPath GetBucketCors{..} = mconcat+        [ "/"+        , toText _gbcBucket+        ]++instance ToQuery GetBucketCors where+    toQuery = const "cors"++instance ToHeaders GetBucketCors++instance ToXMLRoot GetBucketCors where+    toXMLRoot = const (namespaced ns "GetBucketCors" [])++instance ToXML GetBucketCors++instance AWSRequest GetBucketCors where+    type Sv GetBucketCors = S3+    type Rs GetBucketCors = GetBucketCorsResponse++    request  = get+    response = xmlResponse++instance FromXML GetBucketCorsResponse where+    parseXML x = GetBucketCorsResponse+        <$> parseXML x
+ gen/Network/AWS/S3/GetBucketLifecycle.hs view
@@ -0,0 +1,111 @@+{-# 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.S3.GetBucketLifecycle+-- 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)++-- | Returns the lifecycle configuration information set on the bucket.+--+-- <http://docs.aws.amazon.com/AmazonS3/latest/API/GetBucketLifecycle.html>+module Network.AWS.S3.GetBucketLifecycle+    (+    -- * Request+      GetBucketLifecycle+    -- ** Request constructor+    , getBucketLifecycle+    -- ** Request lenses+    , gbl1Bucket++    -- * Response+    , GetBucketLifecycleResponse+    -- ** Response constructor+    , getBucketLifecycleResponse+    -- ** Response lenses+    , gblrRules+    ) where++import Network.AWS.Prelude+import Network.AWS.Request.RestXML+import Network.AWS.S3.Types+import qualified GHC.Exts++newtype GetBucketLifecycle = GetBucketLifecycle+    { _gbl1Bucket :: Text+    } deriving (Eq, Ord, Show, Monoid, IsString)++-- | 'GetBucketLifecycle' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'gbl1Bucket' @::@ 'Text'+--+getBucketLifecycle :: Text -- ^ 'gbl1Bucket'+                   -> GetBucketLifecycle+getBucketLifecycle p1 = GetBucketLifecycle+    { _gbl1Bucket = p1+    }++gbl1Bucket :: Lens' GetBucketLifecycle Text+gbl1Bucket = lens _gbl1Bucket (\s a -> s { _gbl1Bucket = a })++newtype GetBucketLifecycleResponse = GetBucketLifecycleResponse+    { _gblrRules :: List "Rule" Rule+    } deriving (Eq, Show, Monoid, Semigroup)++-- | 'GetBucketLifecycleResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'gblrRules' @::@ ['Rule']+--+getBucketLifecycleResponse :: [Rule] -- ^ 'gblrRules'+                           -> GetBucketLifecycleResponse+getBucketLifecycleResponse p1 = GetBucketLifecycleResponse+    { _gblrRules = withIso _List (const id) p1+    }++gblrRules :: Lens' GetBucketLifecycleResponse [Rule]+gblrRules = lens _gblrRules (\s a -> s { _gblrRules = a }) . _List++instance ToPath GetBucketLifecycle where+    toPath GetBucketLifecycle{..} = mconcat+        [ "/"+        , toText _gbl1Bucket+        ]++instance ToQuery GetBucketLifecycle where+    toQuery = const "lifecycle"++instance ToHeaders GetBucketLifecycle++instance ToXMLRoot GetBucketLifecycle where+    toXMLRoot = const (namespaced ns "GetBucketLifecycle" [])++instance ToXML GetBucketLifecycle++instance AWSRequest GetBucketLifecycle where+    type Sv GetBucketLifecycle = S3+    type Rs GetBucketLifecycle = GetBucketLifecycleResponse++    request  = get+    response = xmlResponse++instance FromXML GetBucketLifecycleResponse where+    parseXML x = GetBucketLifecycleResponse+        <$> parseXML x
+ gen/Network/AWS/S3/GetBucketLocation.hs view
@@ -0,0 +1,111 @@+{-# 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.S3.GetBucketLocation+-- 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)++-- | Returns the region the bucket resides in.+--+-- <http://docs.aws.amazon.com/AmazonS3/latest/API/GetBucketLocation.html>+module Network.AWS.S3.GetBucketLocation+    (+    -- * Request+      GetBucketLocation+    -- ** Request constructor+    , getBucketLocation+    -- ** Request lenses+    , gblBucket++    -- * Response+    , GetBucketLocationResponse+    -- ** Response constructor+    , getBucketLocationResponse+    -- ** Response lenses+    , gblrLocationConstraint+    ) where++import Network.AWS.Prelude+import Network.AWS.Request.RestXML+import Network.AWS.S3.Types+import qualified GHC.Exts++newtype GetBucketLocation = GetBucketLocation+    { _gblBucket :: Text+    } deriving (Eq, Ord, Show, Monoid, IsString)++-- | 'GetBucketLocation' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'gblBucket' @::@ 'Text'+--+getBucketLocation :: Text -- ^ 'gblBucket'+                  -> GetBucketLocation+getBucketLocation p1 = GetBucketLocation+    { _gblBucket = p1+    }++gblBucket :: Lens' GetBucketLocation Text+gblBucket = lens _gblBucket (\s a -> s { _gblBucket = a })++newtype GetBucketLocationResponse = GetBucketLocationResponse+    { _gblrLocationConstraint :: Maybe Text+    } deriving (Eq, Ord, Show, Monoid)++-- | 'GetBucketLocationResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'gblrLocationConstraint' @::@ 'Maybe' 'Text'+--+getBucketLocationResponse :: GetBucketLocationResponse+getBucketLocationResponse = GetBucketLocationResponse+    { _gblrLocationConstraint = Nothing+    }++gblrLocationConstraint :: Lens' GetBucketLocationResponse (Maybe Text)+gblrLocationConstraint =+    lens _gblrLocationConstraint (\s a -> s { _gblrLocationConstraint = a })++instance ToPath GetBucketLocation where+    toPath GetBucketLocation{..} = mconcat+        [ "/"+        , toText _gblBucket+        ]++instance ToQuery GetBucketLocation where+    toQuery = const "location"++instance ToHeaders GetBucketLocation++instance ToXMLRoot GetBucketLocation where+    toXMLRoot = const (namespaced ns "GetBucketLocation" [])++instance ToXML GetBucketLocation++instance AWSRequest GetBucketLocation where+    type Sv GetBucketLocation = S3+    type Rs GetBucketLocation = GetBucketLocationResponse++    request  = get+    response = xmlResponse++instance FromXML GetBucketLocationResponse where+    parseXML x = GetBucketLocationResponse+        <$> x .@? "LocationConstraint"
+ gen/Network/AWS/S3/GetBucketLogging.hs view
@@ -0,0 +1,112 @@+{-# 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.S3.GetBucketLogging+-- 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)++-- | Returns the logging status of a bucket and the permissions users have to+-- view and modify that status. To use GET, you must be the bucket owner.+--+-- <http://docs.aws.amazon.com/AmazonS3/latest/API/GetBucketLogging.html>+module Network.AWS.S3.GetBucketLogging+    (+    -- * Request+      GetBucketLogging+    -- ** Request constructor+    , getBucketLogging+    -- ** Request lenses+    , gbl2Bucket++    -- * Response+    , GetBucketLoggingResponse+    -- ** Response constructor+    , getBucketLoggingResponse+    -- ** Response lenses+    , gblrLoggingEnabled+    ) where++import Network.AWS.Prelude+import Network.AWS.Request.RestXML+import Network.AWS.S3.Types+import qualified GHC.Exts++newtype GetBucketLogging = GetBucketLogging+    { _gbl2Bucket :: Text+    } deriving (Eq, Ord, Show, Monoid, IsString)++-- | 'GetBucketLogging' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'gbl2Bucket' @::@ 'Text'+--+getBucketLogging :: Text -- ^ 'gbl2Bucket'+                 -> GetBucketLogging+getBucketLogging p1 = GetBucketLogging+    { _gbl2Bucket = p1+    }++gbl2Bucket :: Lens' GetBucketLogging Text+gbl2Bucket = lens _gbl2Bucket (\s a -> s { _gbl2Bucket = a })++newtype GetBucketLoggingResponse = GetBucketLoggingResponse+    { _gblrLoggingEnabled :: Maybe LoggingEnabled+    } deriving (Eq, Show)++-- | 'GetBucketLoggingResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'gblrLoggingEnabled' @::@ 'Maybe' 'LoggingEnabled'+--+getBucketLoggingResponse :: GetBucketLoggingResponse+getBucketLoggingResponse = GetBucketLoggingResponse+    { _gblrLoggingEnabled = Nothing+    }++gblrLoggingEnabled :: Lens' GetBucketLoggingResponse (Maybe LoggingEnabled)+gblrLoggingEnabled =+    lens _gblrLoggingEnabled (\s a -> s { _gblrLoggingEnabled = a })++instance ToPath GetBucketLogging where+    toPath GetBucketLogging{..} = mconcat+        [ "/"+        , toText _gbl2Bucket+        ]++instance ToQuery GetBucketLogging where+    toQuery = const "logging"++instance ToHeaders GetBucketLogging++instance ToXMLRoot GetBucketLogging where+    toXMLRoot = const (namespaced ns "GetBucketLogging" [])++instance ToXML GetBucketLogging++instance AWSRequest GetBucketLogging where+    type Sv GetBucketLogging = S3+    type Rs GetBucketLogging = GetBucketLoggingResponse++    request  = get+    response = xmlResponse++instance FromXML GetBucketLoggingResponse where+    parseXML x = GetBucketLoggingResponse+        <$> x .@? "LoggingEnabled"
+ gen/Network/AWS/S3/GetBucketNotification.hs view
@@ -0,0 +1,132 @@+{-# LANGUAGE DataKinds                   #-}+{-# LANGUAGE DeriveGeneric               #-}+{-# LANGUAGE FlexibleInstances           #-}+{-# LANGUAGE GeneralizedNewtypeDeriving  #-}+{-# LANGUAGE LambdaCase                  #-}+{-# LANGUAGE NoImplicitPrelude           #-}+{-# LANGUAGE OverloadedStrings           #-}+{-# LANGUAGE RecordWildCards             #-}+{-# LANGUAGE TypeFamilies                #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Module      : Network.AWS.S3.GetBucketNotification+-- 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)++-- | Return the notification configuration of a bucket.+--+-- <http://docs.aws.amazon.com/AmazonS3/latest/API/GetBucketNotification.html>+module Network.AWS.S3.GetBucketNotification+    (+    -- * Request+      GetBucketNotification+    -- ** Request constructor+    , getBucketNotification+    -- ** Request lenses+    , gbnBucket++    -- * Response+    , GetBucketNotificationResponse+    -- ** Response constructor+    , getBucketNotificationResponse+    -- ** Response lenses+    , gbnrCloudFunctionConfiguration+    , gbnrQueueConfiguration+    , gbnrTopicConfiguration+    ) where++import Network.AWS.Prelude+import Network.AWS.Request.RestXML+import Network.AWS.S3.Types+import qualified GHC.Exts++newtype GetBucketNotification = GetBucketNotification+    { _gbnBucket :: Text+    } deriving (Eq, Ord, Show, Monoid, IsString)++-- | 'GetBucketNotification' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'gbnBucket' @::@ 'Text'+--+getBucketNotification :: Text -- ^ 'gbnBucket'+                      -> GetBucketNotification+getBucketNotification p1 = GetBucketNotification+    { _gbnBucket = p1+    }++gbnBucket :: Lens' GetBucketNotification Text+gbnBucket = lens _gbnBucket (\s a -> s { _gbnBucket = a })++data GetBucketNotificationResponse = GetBucketNotificationResponse+    { _gbnrCloudFunctionConfiguration :: Maybe CloudFunctionConfiguration+    , _gbnrQueueConfiguration         :: Maybe QueueConfiguration+    , _gbnrTopicConfiguration         :: Maybe TopicConfiguration+    } deriving (Eq, Show)++-- | 'GetBucketNotificationResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'gbnrCloudFunctionConfiguration' @::@ 'Maybe' 'CloudFunctionConfiguration'+--+-- * 'gbnrQueueConfiguration' @::@ 'Maybe' 'QueueConfiguration'+--+-- * 'gbnrTopicConfiguration' @::@ 'Maybe' 'TopicConfiguration'+--+getBucketNotificationResponse :: GetBucketNotificationResponse+getBucketNotificationResponse = GetBucketNotificationResponse+    { _gbnrTopicConfiguration         = Nothing+    , _gbnrQueueConfiguration         = Nothing+    , _gbnrCloudFunctionConfiguration = Nothing+    }++gbnrCloudFunctionConfiguration :: Lens' GetBucketNotificationResponse (Maybe CloudFunctionConfiguration)+gbnrCloudFunctionConfiguration =+    lens _gbnrCloudFunctionConfiguration+        (\s a -> s { _gbnrCloudFunctionConfiguration = a })++gbnrQueueConfiguration :: Lens' GetBucketNotificationResponse (Maybe QueueConfiguration)+gbnrQueueConfiguration =+    lens _gbnrQueueConfiguration (\s a -> s { _gbnrQueueConfiguration = a })++gbnrTopicConfiguration :: Lens' GetBucketNotificationResponse (Maybe TopicConfiguration)+gbnrTopicConfiguration =+    lens _gbnrTopicConfiguration (\s a -> s { _gbnrTopicConfiguration = a })++instance ToPath GetBucketNotification where+    toPath GetBucketNotification{..} = mconcat+        [ "/"+        , toText _gbnBucket+        ]++instance ToQuery GetBucketNotification where+    toQuery = const "notification"++instance ToHeaders GetBucketNotification++instance ToXMLRoot GetBucketNotification where+    toXMLRoot = const (namespaced ns "GetBucketNotification" [])++instance ToXML GetBucketNotification++instance AWSRequest GetBucketNotification where+    type Sv GetBucketNotification = S3+    type Rs GetBucketNotification = GetBucketNotificationResponse++    request  = get+    response = xmlResponse++instance FromXML GetBucketNotificationResponse where+    parseXML x = GetBucketNotificationResponse+        <$> x .@? "CloudFunctionConfiguration"+        <*> x .@? "QueueConfiguration"+        <*> x .@? "TopicConfiguration"
+ gen/Network/AWS/S3/GetBucketPolicy.hs view
@@ -0,0 +1,111 @@+{-# 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.S3.GetBucketPolicy+-- 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)++-- | Returns the policy of a specified bucket.+--+-- <http://docs.aws.amazon.com/AmazonS3/latest/API/GetBucketPolicy.html>+module Network.AWS.S3.GetBucketPolicy+    (+    -- * Request+      GetBucketPolicy+    -- ** Request constructor+    , getBucketPolicy+    -- ** Request lenses+    , gbpBucket++    -- * Response+    , GetBucketPolicyResponse+    -- ** Response constructor+    , getBucketPolicyResponse+    -- ** Response lenses+    , gbprPolicy+    ) where++import Network.AWS.Prelude+import Network.AWS.Request.RestXML+import Network.AWS.S3.Types+import qualified GHC.Exts++newtype GetBucketPolicy = GetBucketPolicy+    { _gbpBucket :: Text+    } deriving (Eq, Ord, Show, Monoid, IsString)++-- | 'GetBucketPolicy' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'gbpBucket' @::@ 'Text'+--+getBucketPolicy :: Text -- ^ 'gbpBucket'+                -> GetBucketPolicy+getBucketPolicy p1 = GetBucketPolicy+    { _gbpBucket = p1+    }++gbpBucket :: Lens' GetBucketPolicy Text+gbpBucket = lens _gbpBucket (\s a -> s { _gbpBucket = a })++newtype GetBucketPolicyResponse = GetBucketPolicyResponse+    { _gbprPolicy :: Maybe Text+    } deriving (Eq, Ord, Show, Monoid)++-- | 'GetBucketPolicyResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'gbprPolicy' @::@ 'Maybe' 'Text'+--+getBucketPolicyResponse :: GetBucketPolicyResponse+getBucketPolicyResponse = GetBucketPolicyResponse+    { _gbprPolicy = Nothing+    }++-- | The bucket policy as a JSON document.+gbprPolicy :: Lens' GetBucketPolicyResponse (Maybe Text)+gbprPolicy = lens _gbprPolicy (\s a -> s { _gbprPolicy = a })++instance ToPath GetBucketPolicy where+    toPath GetBucketPolicy{..} = mconcat+        [ "/"+        , toText _gbpBucket+        ]++instance ToQuery GetBucketPolicy where+    toQuery = const "policy"++instance ToHeaders GetBucketPolicy++instance ToXMLRoot GetBucketPolicy where+    toXMLRoot = const (namespaced ns "GetBucketPolicy" [])++instance ToXML GetBucketPolicy++instance AWSRequest GetBucketPolicy where+    type Sv GetBucketPolicy = S3+    type Rs GetBucketPolicy = GetBucketPolicyResponse++    request  = get+    response = xmlResponse++instance FromXML GetBucketPolicyResponse where+    parseXML x = GetBucketPolicyResponse+        <$> x .@? "Policy"
+ gen/Network/AWS/S3/GetBucketRequestPayment.hs view
@@ -0,0 +1,111 @@+{-# 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.S3.GetBucketRequestPayment+-- 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)++-- | Returns the request payment configuration of a bucket.+--+-- <http://docs.aws.amazon.com/AmazonS3/latest/API/GetBucketRequestPayment.html>+module Network.AWS.S3.GetBucketRequestPayment+    (+    -- * Request+      GetBucketRequestPayment+    -- ** Request constructor+    , getBucketRequestPayment+    -- ** Request lenses+    , gbrpBucket++    -- * Response+    , GetBucketRequestPaymentResponse+    -- ** Response constructor+    , getBucketRequestPaymentResponse+    -- ** Response lenses+    , gbrprPayer+    ) where++import Network.AWS.Prelude+import Network.AWS.Request.RestXML+import Network.AWS.S3.Types+import qualified GHC.Exts++newtype GetBucketRequestPayment = GetBucketRequestPayment+    { _gbrpBucket :: Text+    } deriving (Eq, Ord, Show, Monoid, IsString)++-- | 'GetBucketRequestPayment' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'gbrpBucket' @::@ 'Text'+--+getBucketRequestPayment :: Text -- ^ 'gbrpBucket'+                        -> GetBucketRequestPayment+getBucketRequestPayment p1 = GetBucketRequestPayment+    { _gbrpBucket = p1+    }++gbrpBucket :: Lens' GetBucketRequestPayment Text+gbrpBucket = lens _gbrpBucket (\s a -> s { _gbrpBucket = a })++newtype GetBucketRequestPaymentResponse = GetBucketRequestPaymentResponse+    { _gbrprPayer :: Maybe Text+    } deriving (Eq, Ord, Show, Monoid)++-- | 'GetBucketRequestPaymentResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'gbrprPayer' @::@ 'Maybe' 'Text'+--+getBucketRequestPaymentResponse :: GetBucketRequestPaymentResponse+getBucketRequestPaymentResponse = GetBucketRequestPaymentResponse+    { _gbrprPayer = Nothing+    }++-- | Specifies who pays for the download and request fees.+gbrprPayer :: Lens' GetBucketRequestPaymentResponse (Maybe Text)+gbrprPayer = lens _gbrprPayer (\s a -> s { _gbrprPayer = a })++instance ToPath GetBucketRequestPayment where+    toPath GetBucketRequestPayment{..} = mconcat+        [ "/"+        , toText _gbrpBucket+        ]++instance ToQuery GetBucketRequestPayment where+    toQuery = const "requestPayment"++instance ToHeaders GetBucketRequestPayment++instance ToXMLRoot GetBucketRequestPayment where+    toXMLRoot = const (namespaced ns "GetBucketRequestPayment" [])++instance ToXML GetBucketRequestPayment++instance AWSRequest GetBucketRequestPayment where+    type Sv GetBucketRequestPayment = S3+    type Rs GetBucketRequestPayment = GetBucketRequestPaymentResponse++    request  = get+    response = xmlResponse++instance FromXML GetBucketRequestPaymentResponse where+    parseXML x = GetBucketRequestPaymentResponse+        <$> x .@? "Payer"
+ gen/Network/AWS/S3/GetBucketTagging.hs view
@@ -0,0 +1,116 @@+{-# 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.S3.GetBucketTagging+-- 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)++-- | Returns the tag set associated with the bucket.+--+-- <http://docs.aws.amazon.com/AmazonS3/latest/API/GetBucketTagging.html>+module Network.AWS.S3.GetBucketTagging+    (+    -- * Request+      GetBucketTagging+    -- ** Request constructor+    , getBucketTagging+    -- ** Request lenses+    , gbtBucket++    -- * Response+    , GetBucketTaggingResponse+    -- ** Response constructor+    , getBucketTaggingResponse+    -- ** Response lenses+    , gbtrTagSet+    ) where++import Network.AWS.Prelude+import Network.AWS.Request.RestXML+import Network.AWS.S3.Types+import qualified GHC.Exts++newtype GetBucketTagging = GetBucketTagging+    { _gbtBucket :: Text+    } deriving (Eq, Ord, Show, Monoid, IsString)++-- | 'GetBucketTagging' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'gbtBucket' @::@ 'Text'+--+getBucketTagging :: Text -- ^ 'gbtBucket'+                 -> GetBucketTagging+getBucketTagging p1 = GetBucketTagging+    { _gbtBucket = p1+    }++gbtBucket :: Lens' GetBucketTagging Text+gbtBucket = lens _gbtBucket (\s a -> s { _gbtBucket = a })++newtype GetBucketTaggingResponse = GetBucketTaggingResponse+    { _gbtrTagSet :: List "Tag" Tag+    } deriving (Eq, Show, Monoid, Semigroup)++instance GHC.Exts.IsList GetBucketTaggingResponse where+    type Item GetBucketTaggingResponse = Tag++    fromList = GetBucketTaggingResponse . GHC.Exts.fromList+    toList   = GHC.Exts.toList . _gbtrTagSet++-- | 'GetBucketTaggingResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'gbtrTagSet' @::@ ['Tag']+--+getBucketTaggingResponse :: GetBucketTaggingResponse+getBucketTaggingResponse = GetBucketTaggingResponse+    { _gbtrTagSet = mempty+    }++gbtrTagSet :: Lens' GetBucketTaggingResponse [Tag]+gbtrTagSet = lens _gbtrTagSet (\s a -> s { _gbtrTagSet = a }) . _List++instance ToPath GetBucketTagging where+    toPath GetBucketTagging{..} = mconcat+        [ "/"+        , toText _gbtBucket+        ]++instance ToQuery GetBucketTagging where+    toQuery = const "tagging"++instance ToHeaders GetBucketTagging++instance ToXMLRoot GetBucketTagging where+    toXMLRoot = const (namespaced ns "GetBucketTagging" [])++instance ToXML GetBucketTagging++instance AWSRequest GetBucketTagging where+    type Sv GetBucketTagging = S3+    type Rs GetBucketTagging = GetBucketTaggingResponse++    request  = get+    response = xmlResponse++instance FromXML GetBucketTaggingResponse where+    parseXML x = GetBucketTaggingResponse+        <$> x .@  "TagSet"
+ gen/Network/AWS/S3/GetBucketVersioning.hs view
@@ -0,0 +1,124 @@+{-# 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.S3.GetBucketVersioning+-- 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)++-- | Returns the versioning state of a bucket.+--+-- <http://docs.aws.amazon.com/AmazonS3/latest/API/GetBucketVersioning.html>+module Network.AWS.S3.GetBucketVersioning+    (+    -- * Request+      GetBucketVersioning+    -- ** Request constructor+    , getBucketVersioning+    -- ** Request lenses+    , gbvBucket++    -- * Response+    , GetBucketVersioningResponse+    -- ** Response constructor+    , getBucketVersioningResponse+    -- ** Response lenses+    , gbvrMFADelete+    , gbvrStatus+    ) where++import Network.AWS.Prelude+import Network.AWS.Request.RestXML+import Network.AWS.S3.Types+import qualified GHC.Exts++newtype GetBucketVersioning = GetBucketVersioning+    { _gbvBucket :: Text+    } deriving (Eq, Ord, Show, Monoid, IsString)++-- | 'GetBucketVersioning' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'gbvBucket' @::@ 'Text'+--+getBucketVersioning :: Text -- ^ 'gbvBucket'+                    -> GetBucketVersioning+getBucketVersioning p1 = GetBucketVersioning+    { _gbvBucket = p1+    }++gbvBucket :: Lens' GetBucketVersioning Text+gbvBucket = lens _gbvBucket (\s a -> s { _gbvBucket = a })++data GetBucketVersioningResponse = GetBucketVersioningResponse+    { _gbvrMFADelete :: Maybe Text+    , _gbvrStatus    :: Maybe Text+    } deriving (Eq, Ord, Show)++-- | 'GetBucketVersioningResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'gbvrMFADelete' @::@ 'Maybe' 'Text'+--+-- * 'gbvrStatus' @::@ 'Maybe' 'Text'+--+getBucketVersioningResponse :: GetBucketVersioningResponse+getBucketVersioningResponse = GetBucketVersioningResponse+    { _gbvrStatus    = Nothing+    , _gbvrMFADelete = Nothing+    }++-- | Specifies whether MFA delete is enabled in the bucket versioning+-- configuration. This element is only returned if the bucket has been+-- configured with MFA delete. If the bucket has never been so configured,+-- this element is not returned.+gbvrMFADelete :: Lens' GetBucketVersioningResponse (Maybe Text)+gbvrMFADelete = lens _gbvrMFADelete (\s a -> s { _gbvrMFADelete = a })++-- | The versioning state of the bucket.+gbvrStatus :: Lens' GetBucketVersioningResponse (Maybe Text)+gbvrStatus = lens _gbvrStatus (\s a -> s { _gbvrStatus = a })++instance ToPath GetBucketVersioning where+    toPath GetBucketVersioning{..} = mconcat+        [ "/"+        , toText _gbvBucket+        ]++instance ToQuery GetBucketVersioning where+    toQuery = const "versioning"++instance ToHeaders GetBucketVersioning++instance ToXMLRoot GetBucketVersioning where+    toXMLRoot = const (namespaced ns "GetBucketVersioning" [])++instance ToXML GetBucketVersioning++instance AWSRequest GetBucketVersioning where+    type Sv GetBucketVersioning = S3+    type Rs GetBucketVersioning = GetBucketVersioningResponse++    request  = get+    response = xmlResponse++instance FromXML GetBucketVersioningResponse where+    parseXML x = GetBucketVersioningResponse+        <$> x .@? "MfaDelete"+        <*> x .@? "Status"
+ gen/Network/AWS/S3/GetBucketWebsite.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.S3.GetBucketWebsite+-- 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)++-- | Returns the website configuration for a bucket.+--+-- <http://docs.aws.amazon.com/AmazonS3/latest/API/GetBucketWebsite.html>+module Network.AWS.S3.GetBucketWebsite+    (+    -- * Request+      GetBucketWebsite+    -- ** Request constructor+    , getBucketWebsite+    -- ** Request lenses+    , gbwBucket++    -- * Response+    , GetBucketWebsiteResponse+    -- ** Response constructor+    , getBucketWebsiteResponse+    -- ** Response lenses+    , gbwrErrorDocument+    , gbwrIndexDocument+    , gbwrRedirectAllRequestsTo+    , gbwrRoutingRules+    ) where++import Network.AWS.Prelude+import Network.AWS.Request.RestXML+import Network.AWS.S3.Types+import qualified GHC.Exts++newtype GetBucketWebsite = GetBucketWebsite+    { _gbwBucket :: Text+    } deriving (Eq, Ord, Show, Monoid, IsString)++-- | 'GetBucketWebsite' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'gbwBucket' @::@ 'Text'+--+getBucketWebsite :: Text -- ^ 'gbwBucket'+                 -> GetBucketWebsite+getBucketWebsite p1 = GetBucketWebsite+    { _gbwBucket = p1+    }++gbwBucket :: Lens' GetBucketWebsite Text+gbwBucket = lens _gbwBucket (\s a -> s { _gbwBucket = a })++data GetBucketWebsiteResponse = GetBucketWebsiteResponse+    { _gbwrErrorDocument         :: Maybe ErrorDocument+    , _gbwrIndexDocument         :: Maybe IndexDocument+    , _gbwrRedirectAllRequestsTo :: Maybe RedirectAllRequestsTo+    , _gbwrRoutingRules          :: List "RoutingRule" RoutingRule+    } deriving (Eq, Show)++-- | 'GetBucketWebsiteResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'gbwrErrorDocument' @::@ 'Maybe' 'ErrorDocument'+--+-- * 'gbwrIndexDocument' @::@ 'Maybe' 'IndexDocument'+--+-- * 'gbwrRedirectAllRequestsTo' @::@ 'Maybe' 'RedirectAllRequestsTo'+--+-- * 'gbwrRoutingRules' @::@ ['RoutingRule']+--+getBucketWebsiteResponse :: GetBucketWebsiteResponse+getBucketWebsiteResponse = GetBucketWebsiteResponse+    { _gbwrRedirectAllRequestsTo = Nothing+    , _gbwrIndexDocument         = Nothing+    , _gbwrErrorDocument         = Nothing+    , _gbwrRoutingRules          = mempty+    }++gbwrErrorDocument :: Lens' GetBucketWebsiteResponse (Maybe ErrorDocument)+gbwrErrorDocument =+    lens _gbwrErrorDocument (\s a -> s { _gbwrErrorDocument = a })++gbwrIndexDocument :: Lens' GetBucketWebsiteResponse (Maybe IndexDocument)+gbwrIndexDocument =+    lens _gbwrIndexDocument (\s a -> s { _gbwrIndexDocument = a })++gbwrRedirectAllRequestsTo :: Lens' GetBucketWebsiteResponse (Maybe RedirectAllRequestsTo)+gbwrRedirectAllRequestsTo =+    lens _gbwrRedirectAllRequestsTo+        (\s a -> s { _gbwrRedirectAllRequestsTo = a })++gbwrRoutingRules :: Lens' GetBucketWebsiteResponse [RoutingRule]+gbwrRoutingRules = lens _gbwrRoutingRules (\s a -> s { _gbwrRoutingRules = a }) . _List++instance ToPath GetBucketWebsite where+    toPath GetBucketWebsite{..} = mconcat+        [ "/"+        , toText _gbwBucket+        ]++instance ToQuery GetBucketWebsite where+    toQuery = const "website"++instance ToHeaders GetBucketWebsite++instance ToXMLRoot GetBucketWebsite where+    toXMLRoot = const (namespaced ns "GetBucketWebsite" [])++instance ToXML GetBucketWebsite++instance AWSRequest GetBucketWebsite where+    type Sv GetBucketWebsite = S3+    type Rs GetBucketWebsite = GetBucketWebsiteResponse++    request  = get+    response = xmlResponse++instance FromXML GetBucketWebsiteResponse where+    parseXML x = GetBucketWebsiteResponse+        <$> x .@? "ErrorDocument"+        <*> x .@? "IndexDocument"+        <*> x .@? "RedirectAllRequestsTo"+        <*> x .@  "RoutingRules"
+ gen/Network/AWS/S3/GetObject.hs view
@@ -0,0 +1,549 @@+{-# 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.S3.GetObject+-- Copyright   : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>+-- License     : This Source Code Form is subject to the terms of+--               the Mozilla Public License, v. 2.0.+--               A copy of the MPL can be found in the LICENSE file or+--               you can obtain it at http://mozilla.org/MPL/2.0/.+-- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability   : experimental+-- Portability : non-portable (GHC extensions)++-- | Retrieves objects from Amazon S3.+--+-- <http://docs.aws.amazon.com/AmazonS3/latest/API/GetObject.html>+module Network.AWS.S3.GetObject+    (+    -- * Request+      GetObject+    -- ** Request constructor+    , getObject+    -- ** Request lenses+    , goBucket+    , goIfMatch+    , goIfModifiedSince+    , goIfNoneMatch+    , goIfUnmodifiedSince+    , goKey+    , goRange+    , goResponseCacheControl+    , goResponseContentDisposition+    , goResponseContentEncoding+    , goResponseContentLanguage+    , goResponseContentType+    , goResponseExpires+    , goSSECustomerAlgorithm+    , goSSECustomerKey+    , goSSECustomerKeyMD5+    , goSSEKMSKeyId+    , goVersionId++    -- * Response+    , GetObjectResponse+    -- ** Response constructor+    , getObjectResponse+    -- ** Response lenses+    , gorAcceptRanges+    , gorBody+    , gorCacheControl+    , gorContentDisposition+    , gorContentEncoding+    , gorContentLanguage+    , gorContentLength+    , gorContentType+    , gorDeleteMarker+    , gorETag+    , gorExpiration+    , gorExpires+    , gorLastModified+    , gorMetadata+    , gorMissingMeta+    , gorRestore+    , gorSSECustomerAlgorithm+    , gorSSECustomerKeyMD5+    , gorSSEKMSKeyId+    , gorServerSideEncryption+    , gorVersionId+    , gorWebsiteRedirectLocation+    ) where++import Network.AWS.Prelude+import Network.AWS.Request.RestXML+import Network.AWS.S3.Types+import qualified GHC.Exts++data GetObject = GetObject+    { _goBucket                     :: Text+    , _goIfMatch                    :: Maybe Text+    , _goIfModifiedSince            :: Maybe RFC822+    , _goIfNoneMatch                :: Maybe Text+    , _goIfUnmodifiedSince          :: Maybe RFC822+    , _goKey                        :: Text+    , _goRange                      :: Maybe Text+    , _goResponseCacheControl       :: Maybe Text+    , _goResponseContentDisposition :: Maybe Text+    , _goResponseContentEncoding    :: Maybe Text+    , _goResponseContentLanguage    :: Maybe Text+    , _goResponseContentType        :: Maybe Text+    , _goResponseExpires            :: Maybe RFC822+    , _goSSECustomerAlgorithm       :: Maybe Text+    , _goSSECustomerKey             :: Maybe (Sensitive Text)+    , _goSSECustomerKeyMD5          :: Maybe Text+    , _goSSEKMSKeyId                :: Maybe (Sensitive Text)+    , _goVersionId                  :: Maybe Text+    } deriving (Eq, Ord, Show)++-- | 'GetObject' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'goBucket' @::@ 'Text'+--+-- * 'goIfMatch' @::@ 'Maybe' 'Text'+--+-- * 'goIfModifiedSince' @::@ 'Maybe' 'UTCTime'+--+-- * 'goIfNoneMatch' @::@ 'Maybe' 'Text'+--+-- * 'goIfUnmodifiedSince' @::@ 'Maybe' 'UTCTime'+--+-- * 'goKey' @::@ 'Text'+--+-- * 'goRange' @::@ 'Maybe' 'Text'+--+-- * 'goResponseCacheControl' @::@ 'Maybe' 'Text'+--+-- * 'goResponseContentDisposition' @::@ 'Maybe' 'Text'+--+-- * 'goResponseContentEncoding' @::@ 'Maybe' 'Text'+--+-- * 'goResponseContentLanguage' @::@ 'Maybe' 'Text'+--+-- * 'goResponseContentType' @::@ 'Maybe' 'Text'+--+-- * 'goResponseExpires' @::@ 'Maybe' 'UTCTime'+--+-- * 'goSSECustomerAlgorithm' @::@ 'Maybe' 'Text'+--+-- * 'goSSECustomerKey' @::@ 'Maybe' 'Text'+--+-- * 'goSSECustomerKeyMD5' @::@ 'Maybe' 'Text'+--+-- * 'goSSEKMSKeyId' @::@ 'Maybe' 'Text'+--+-- * 'goVersionId' @::@ 'Maybe' 'Text'+--+getObject :: Text -- ^ 'goBucket'+          -> Text -- ^ 'goKey'+          -> GetObject+getObject p1 p2 = GetObject+    { _goBucket                     = p1+    , _goKey                        = p2+    , _goIfMatch                    = Nothing+    , _goIfModifiedSince            = Nothing+    , _goIfNoneMatch                = Nothing+    , _goIfUnmodifiedSince          = Nothing+    , _goRange                      = Nothing+    , _goResponseCacheControl       = Nothing+    , _goResponseContentDisposition = Nothing+    , _goResponseContentEncoding    = Nothing+    , _goResponseContentLanguage    = Nothing+    , _goResponseContentType        = Nothing+    , _goResponseExpires            = Nothing+    , _goVersionId                  = Nothing+    , _goSSECustomerAlgorithm       = Nothing+    , _goSSECustomerKey             = Nothing+    , _goSSECustomerKeyMD5          = Nothing+    , _goSSEKMSKeyId                = Nothing+    }++goBucket :: Lens' GetObject Text+goBucket = lens _goBucket (\s a -> s { _goBucket = a })++-- | Return the object only if its entity tag (ETag) is the same as the one+-- specified, otherwise return a 412 (precondition failed).+goIfMatch :: Lens' GetObject (Maybe Text)+goIfMatch = lens _goIfMatch (\s a -> s { _goIfMatch = a })++-- | Return the object only if it has been modified since the specified time,+-- otherwise return a 304 (not modified).+goIfModifiedSince :: Lens' GetObject (Maybe UTCTime)+goIfModifiedSince =+    lens _goIfModifiedSince (\s a -> s { _goIfModifiedSince = a })+        . mapping _Time++-- | Return the object only if its entity tag (ETag) is different from the one+-- specified, otherwise return a 304 (not modified).+goIfNoneMatch :: Lens' GetObject (Maybe Text)+goIfNoneMatch = lens _goIfNoneMatch (\s a -> s { _goIfNoneMatch = a })++-- | Return the object only if it has not been modified since the specified+-- time, otherwise return a 412 (precondition failed).+goIfUnmodifiedSince :: Lens' GetObject (Maybe UTCTime)+goIfUnmodifiedSince =+    lens _goIfUnmodifiedSince (\s a -> s { _goIfUnmodifiedSince = a })+        . mapping _Time++goKey :: Lens' GetObject Text+goKey = lens _goKey (\s a -> s { _goKey = a })++-- | Downloads the specified range bytes of an object. For more information+-- about the HTTP Range header, go to+-- http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35.+goRange :: Lens' GetObject (Maybe Text)+goRange = lens _goRange (\s a -> s { _goRange = a })++-- | Sets the Cache-Control header of the response.+goResponseCacheControl :: Lens' GetObject (Maybe Text)+goResponseCacheControl =+    lens _goResponseCacheControl (\s a -> s { _goResponseCacheControl = a })++-- | Sets the Content-Disposition header of the response.+goResponseContentDisposition :: Lens' GetObject (Maybe Text)+goResponseContentDisposition =+    lens _goResponseContentDisposition+        (\s a -> s { _goResponseContentDisposition = a })++-- | Sets the Content-Encoding header of the response.+goResponseContentEncoding :: Lens' GetObject (Maybe Text)+goResponseContentEncoding =+    lens _goResponseContentEncoding+        (\s a -> s { _goResponseContentEncoding = a })++-- | Sets the Content-Language header of the response.+goResponseContentLanguage :: Lens' GetObject (Maybe Text)+goResponseContentLanguage =+    lens _goResponseContentLanguage+        (\s a -> s { _goResponseContentLanguage = a })++-- | Sets the Content-Type header of the response.+goResponseContentType :: Lens' GetObject (Maybe Text)+goResponseContentType =+    lens _goResponseContentType (\s a -> s { _goResponseContentType = a })++-- | Sets the Expires header of the response.+goResponseExpires :: Lens' GetObject (Maybe UTCTime)+goResponseExpires =+    lens _goResponseExpires (\s a -> s { _goResponseExpires = a })+        . mapping _Time++-- | Specifies the algorithm to use to when encrypting the object (e.g.,+-- AES256, aws:kms).+goSSECustomerAlgorithm :: Lens' GetObject (Maybe Text)+goSSECustomerAlgorithm =+    lens _goSSECustomerAlgorithm (\s a -> s { _goSSECustomerAlgorithm = a })++-- | Specifies the customer-provided encryption key for Amazon S3 to use in+-- encrypting data. This value is used to store the object and then it is+-- discarded; Amazon does not store the encryption key. The key must be+-- appropriate for use with the algorithm specified in the+-- x-amz-server-side&#x200B;-encryption&#x200B;-customer-algorithm header.+goSSECustomerKey :: Lens' GetObject (Maybe Text)+goSSECustomerKey = lens _goSSECustomerKey (\s a -> s { _goSSECustomerKey = a }) . mapping _Sensitive++-- | Specifies the 128-bit MD5 digest of the encryption key according to RFC+-- 1321. Amazon S3 uses this header for a message integrity check to ensure+-- the encryption key was transmitted without error.+goSSECustomerKeyMD5 :: Lens' GetObject (Maybe Text)+goSSECustomerKeyMD5 =+    lens _goSSECustomerKeyMD5 (\s a -> s { _goSSECustomerKeyMD5 = a })++-- | Specifies the AWS KMS key ID to use for object encryption.+goSSEKMSKeyId :: Lens' GetObject (Maybe Text)+goSSEKMSKeyId = lens _goSSEKMSKeyId (\s a -> s { _goSSEKMSKeyId = a }) . mapping _Sensitive++-- | VersionId used to reference a specific version of the object.+goVersionId :: Lens' GetObject (Maybe Text)+goVersionId = lens _goVersionId (\s a -> s { _goVersionId = a })++data GetObjectResponse = GetObjectResponse+    { _gorAcceptRanges            :: Maybe Text+    , _gorBody                    :: RsBody+    , _gorCacheControl            :: Maybe Text+    , _gorContentDisposition      :: Maybe Text+    , _gorContentEncoding         :: Maybe Text+    , _gorContentLanguage         :: Maybe Text+    , _gorContentLength           :: Maybe Int+    , _gorContentType             :: Maybe Text+    , _gorDeleteMarker            :: Maybe Bool+    , _gorETag                    :: Maybe Text+    , _gorExpiration              :: Maybe RFC822+    , _gorExpires                 :: Maybe RFC822+    , _gorLastModified            :: Maybe RFC822+    , _gorMetadata                :: Map (CI Text) Text+    , _gorMissingMeta             :: Maybe Int+    , _gorRestore                 :: Maybe Text+    , _gorSSECustomerAlgorithm    :: Maybe Text+    , _gorSSECustomerKeyMD5       :: Maybe Text+    , _gorSSEKMSKeyId             :: Maybe (Sensitive Text)+    , _gorServerSideEncryption    :: Maybe Text+    , _gorVersionId               :: Maybe Text+    , _gorWebsiteRedirectLocation :: Maybe Text+    } deriving (Show)++-- | 'GetObjectResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'gorAcceptRanges' @::@ 'Maybe' 'Text'+--+-- * 'gorBody' @::@ 'RsBody'+--+-- * 'gorCacheControl' @::@ 'Maybe' 'Text'+--+-- * 'gorContentDisposition' @::@ 'Maybe' 'Text'+--+-- * 'gorContentEncoding' @::@ 'Maybe' 'Text'+--+-- * 'gorContentLanguage' @::@ 'Maybe' 'Text'+--+-- * 'gorContentLength' @::@ 'Maybe' 'Int'+--+-- * 'gorContentType' @::@ 'Maybe' 'Text'+--+-- * 'gorDeleteMarker' @::@ 'Maybe' 'Bool'+--+-- * 'gorETag' @::@ 'Maybe' 'Text'+--+-- * 'gorExpiration' @::@ 'Maybe' 'UTCTime'+--+-- * 'gorExpires' @::@ 'Maybe' 'UTCTime'+--+-- * 'gorLastModified' @::@ 'Maybe' 'UTCTime'+--+-- * 'gorMetadata' @::@ 'HashMap' ('CI' 'Text') 'Text'+--+-- * 'gorMissingMeta' @::@ 'Maybe' 'Int'+--+-- * 'gorRestore' @::@ 'Maybe' 'Text'+--+-- * 'gorSSECustomerAlgorithm' @::@ 'Maybe' 'Text'+--+-- * 'gorSSECustomerKeyMD5' @::@ 'Maybe' 'Text'+--+-- * 'gorSSEKMSKeyId' @::@ 'Maybe' 'Text'+--+-- * 'gorServerSideEncryption' @::@ 'Maybe' 'Text'+--+-- * 'gorVersionId' @::@ 'Maybe' 'Text'+--+-- * 'gorWebsiteRedirectLocation' @::@ 'Maybe' 'Text'+--+getObjectResponse :: RsBody -- ^ 'gorBody'+                  -> GetObjectResponse+getObjectResponse p1 = GetObjectResponse+    { _gorBody                    = p1+    , _gorDeleteMarker            = Nothing+    , _gorAcceptRanges            = Nothing+    , _gorExpiration              = Nothing+    , _gorRestore                 = Nothing+    , _gorLastModified            = Nothing+    , _gorContentLength           = Nothing+    , _gorETag                    = Nothing+    , _gorMissingMeta             = Nothing+    , _gorVersionId               = Nothing+    , _gorCacheControl            = Nothing+    , _gorContentDisposition      = Nothing+    , _gorContentEncoding         = Nothing+    , _gorContentLanguage         = Nothing+    , _gorContentType             = Nothing+    , _gorExpires                 = Nothing+    , _gorWebsiteRedirectLocation = Nothing+    , _gorServerSideEncryption    = Nothing+    , _gorMetadata                = mempty+    , _gorSSECustomerAlgorithm    = Nothing+    , _gorSSECustomerKeyMD5       = Nothing+    , _gorSSEKMSKeyId             = Nothing+    }++gorAcceptRanges :: Lens' GetObjectResponse (Maybe Text)+gorAcceptRanges = lens _gorAcceptRanges (\s a -> s { _gorAcceptRanges = a })++-- | Object data.+gorBody :: Lens' GetObjectResponse RsBody+gorBody = lens _gorBody (\s a -> s { _gorBody = a })++-- | Specifies caching behavior along the request/reply chain.+gorCacheControl :: Lens' GetObjectResponse (Maybe Text)+gorCacheControl = lens _gorCacheControl (\s a -> s { _gorCacheControl = a })++-- | Specifies presentational information for the object.+gorContentDisposition :: Lens' GetObjectResponse (Maybe Text)+gorContentDisposition =+    lens _gorContentDisposition (\s a -> s { _gorContentDisposition = a })++-- | Specifies what content encodings have been applied to the object and thus+-- what decoding mechanisms must be applied to obtain the media-type+-- referenced by the Content-Type header field.+gorContentEncoding :: Lens' GetObjectResponse (Maybe Text)+gorContentEncoding =+    lens _gorContentEncoding (\s a -> s { _gorContentEncoding = a })++-- | The language the content is in.+gorContentLanguage :: Lens' GetObjectResponse (Maybe Text)+gorContentLanguage =+    lens _gorContentLanguage (\s a -> s { _gorContentLanguage = a })++-- | Size of the body in bytes.+gorContentLength :: Lens' GetObjectResponse (Maybe Int)+gorContentLength = lens _gorContentLength (\s a -> s { _gorContentLength = a })++-- | A standard MIME type describing the format of the object data.+gorContentType :: Lens' GetObjectResponse (Maybe Text)+gorContentType = lens _gorContentType (\s a -> s { _gorContentType = a })++-- | Specifies whether the object retrieved was (true) or was not (false) a+-- Delete Marker. If false, this response header does not appear in the+-- response.+gorDeleteMarker :: Lens' GetObjectResponse (Maybe Bool)+gorDeleteMarker = lens _gorDeleteMarker (\s a -> s { _gorDeleteMarker = a })++-- | An ETag is an opaque identifier assigned by a web server to a specific+-- version of a resource found at a URL.+gorETag :: Lens' GetObjectResponse (Maybe Text)+gorETag = lens _gorETag (\s a -> s { _gorETag = a })++-- | If the object expiration is configured (see PUT Bucket lifecycle), the+-- response includes this header. It includes the expiry-date and rule-id+-- key value pairs providing object expiration information. The value of the+-- rule-id is URL encoded.+gorExpiration :: Lens' GetObjectResponse (Maybe UTCTime)+gorExpiration = lens _gorExpiration (\s a -> s { _gorExpiration = a }) . mapping _Time++-- | The date and time at which the object is no longer cacheable.+gorExpires :: Lens' GetObjectResponse (Maybe UTCTime)+gorExpires = lens _gorExpires (\s a -> s { _gorExpires = a }) . mapping _Time++-- | Last modified date of the object.+gorLastModified :: Lens' GetObjectResponse (Maybe UTCTime)+gorLastModified = lens _gorLastModified (\s a -> s { _gorLastModified = a }) . mapping _Time++-- | A map of metadata to store with the object in S3.+gorMetadata :: Lens' GetObjectResponse (HashMap (CI Text) Text)+gorMetadata = lens _gorMetadata (\s a -> s { _gorMetadata = a }) . _Map++-- | This is set to the number of metadata entries not returned in x-amz-meta+-- headers. This can happen if you create metadata using an API like SOAP+-- that supports more flexible metadata than the REST API. For example,+-- using SOAP, you can create metadata whose values are not legal HTTP+-- headers.+gorMissingMeta :: Lens' GetObjectResponse (Maybe Int)+gorMissingMeta = lens _gorMissingMeta (\s a -> s { _gorMissingMeta = a })++-- | Provides information about object restoration operation and expiration+-- time of the restored object copy.+gorRestore :: Lens' GetObjectResponse (Maybe Text)+gorRestore = lens _gorRestore (\s a -> s { _gorRestore = a })++-- | If server-side encryption with a customer-provided encryption key was+-- requested, the response will include this header confirming the+-- encryption algorithm used.+gorSSECustomerAlgorithm :: Lens' GetObjectResponse (Maybe Text)+gorSSECustomerAlgorithm =+    lens _gorSSECustomerAlgorithm (\s a -> s { _gorSSECustomerAlgorithm = a })++-- | If server-side encryption with a customer-provided encryption key was+-- requested, the response will include this header to provide round trip+-- message integrity verification of the customer-provided encryption key.+gorSSECustomerKeyMD5 :: Lens' GetObjectResponse (Maybe Text)+gorSSECustomerKeyMD5 =+    lens _gorSSECustomerKeyMD5 (\s a -> s { _gorSSECustomerKeyMD5 = a })++-- | If present, specifies the AWS KMS key used to encrypt the object.+gorSSEKMSKeyId :: Lens' GetObjectResponse (Maybe Text)+gorSSEKMSKeyId = lens _gorSSEKMSKeyId (\s a -> s { _gorSSEKMSKeyId = a }) . mapping _Sensitive++-- | The Server-side encryption algorithm used when storing this object in S3+-- (e.g., AES256, aws:kms).+gorServerSideEncryption :: Lens' GetObjectResponse (Maybe Text)+gorServerSideEncryption =+    lens _gorServerSideEncryption (\s a -> s { _gorServerSideEncryption = a })++-- | Version of the object.+gorVersionId :: Lens' GetObjectResponse (Maybe Text)+gorVersionId = lens _gorVersionId (\s a -> s { _gorVersionId = a })++-- | If the bucket is configured as a website, redirects requests for this+-- object to another object in the same bucket or to an external URL. Amazon+-- S3 stores the value of this header in the object metadata.+gorWebsiteRedirectLocation :: Lens' GetObjectResponse (Maybe Text)+gorWebsiteRedirectLocation =+    lens _gorWebsiteRedirectLocation+        (\s a -> s { _gorWebsiteRedirectLocation = a })++instance ToPath GetObject where+    toPath GetObject{..} = mconcat+        [ "/"+        , toText _goBucket+        , "/"+        , toText _goKey+        ]++instance ToQuery GetObject where+    toQuery GetObject{..} = mconcat+        [ "response-cache-control"       =? _goResponseCacheControl+        , "response-content-disposition" =? _goResponseContentDisposition+        , "response-content-encoding"    =? _goResponseContentEncoding+        , "response-content-language"    =? _goResponseContentLanguage+        , "response-content-type"        =? _goResponseContentType+        , "response-expires"             =? _goResponseExpires+        , "versionId"                    =? _goVersionId+        ]++instance ToHeaders GetObject where+    toHeaders GetObject{..} = mconcat+        [ "If-Match"                                        =: _goIfMatch+        , "If-Modified-Since"                               =: _goIfModifiedSince+        , "If-None-Match"                                   =: _goIfNoneMatch+        , "If-Unmodified-Since"                             =: _goIfUnmodifiedSince+        , "Range"                                           =: _goRange+        , "x-amz-server-side-encryption-customer-algorithm" =: _goSSECustomerAlgorithm+        , "x-amz-server-side-encryption-customer-key"       =: _goSSECustomerKey+        , "x-amz-server-side-encryption-customer-key-MD5"   =: _goSSECustomerKeyMD5+        , "x-amz-server-side-encryption-aws-kms-key-id"     =: _goSSEKMSKeyId+        ]++instance ToXMLRoot GetObject where+    toXMLRoot = const (namespaced ns "GetObject" [])++instance ToXML GetObject++instance AWSRequest GetObject where+    type Sv GetObject = S3+    type Rs GetObject = GetObjectResponse++    request  = get+    response = bodyResponse $ \h b -> GetObjectResponse+        <$> h ~:? "accept-ranges"+        <*> pure (RsBody b)+        <*> h ~:? "Cache-Control"+        <*> h ~:? "Content-Disposition"+        <*> h ~:? "Content-Encoding"+        <*> h ~:? "Content-Language"+        <*> h ~:? "Content-Length"+        <*> h ~:? "Content-Type"+        <*> h ~:? "x-amz-delete-marker"+        <*> h ~:? "ETag"+        <*> h ~:? "x-amz-expiration"+        <*> h ~:? "Expires"+        <*> h ~:? "Last-Modified"+        <*> h ~:: "x-amz-meta-"+        <*> h ~:? "x-amz-missing-meta"+        <*> h ~:? "x-amz-restore"+        <*> h ~:? "x-amz-server-side-encryption-customer-algorithm"+        <*> h ~:? "x-amz-server-side-encryption-customer-key-MD5"+        <*> h ~:? "x-amz-server-side-encryption-aws-kms-key-id"+        <*> h ~:? "x-amz-server-side-encryption"+        <*> h ~:? "x-amz-version-id"+        <*> h ~:? "x-amz-website-redirect-location"
+ gen/Network/AWS/S3/GetObjectAcl.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.S3.GetObjectAcl+-- 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)++-- | Returns the access control list (ACL) of an object.+--+-- <http://docs.aws.amazon.com/AmazonS3/latest/API/GetObjectAcl.html>+module Network.AWS.S3.GetObjectAcl+    (+    -- * Request+      GetObjectAcl+    -- ** Request constructor+    , getObjectAcl+    -- ** Request lenses+    , goaBucket+    , goaKey+    , goaVersionId++    -- * Response+    , GetObjectAclResponse+    -- ** Response constructor+    , getObjectAclResponse+    -- ** Response lenses+    , goarGrants+    , goarOwner+    ) where++import Network.AWS.Prelude+import Network.AWS.Request.RestXML+import Network.AWS.S3.Types+import qualified GHC.Exts++data GetObjectAcl = GetObjectAcl+    { _goaBucket    :: Text+    , _goaKey       :: Text+    , _goaVersionId :: Maybe Text+    } deriving (Eq, Ord, Show)++-- | 'GetObjectAcl' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'goaBucket' @::@ 'Text'+--+-- * 'goaKey' @::@ 'Text'+--+-- * 'goaVersionId' @::@ 'Maybe' 'Text'+--+getObjectAcl :: Text -- ^ 'goaBucket'+             -> Text -- ^ 'goaKey'+             -> GetObjectAcl+getObjectAcl p1 p2 = GetObjectAcl+    { _goaBucket    = p1+    , _goaKey       = p2+    , _goaVersionId = Nothing+    }++goaBucket :: Lens' GetObjectAcl Text+goaBucket = lens _goaBucket (\s a -> s { _goaBucket = a })++goaKey :: Lens' GetObjectAcl Text+goaKey = lens _goaKey (\s a -> s { _goaKey = a })++-- | VersionId used to reference a specific version of the object.+goaVersionId :: Lens' GetObjectAcl (Maybe Text)+goaVersionId = lens _goaVersionId (\s a -> s { _goaVersionId = a })++data GetObjectAclResponse = GetObjectAclResponse+    { _goarGrants :: List "Grant" Grant+    , _goarOwner  :: Maybe Owner+    } deriving (Eq, Show)++-- | 'GetObjectAclResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'goarGrants' @::@ ['Grant']+--+-- * 'goarOwner' @::@ 'Maybe' 'Owner'+--+getObjectAclResponse :: GetObjectAclResponse+getObjectAclResponse = GetObjectAclResponse+    { _goarOwner  = Nothing+    , _goarGrants = mempty+    }++-- | A list of grants.+goarGrants :: Lens' GetObjectAclResponse [Grant]+goarGrants = lens _goarGrants (\s a -> s { _goarGrants = a }) . _List++goarOwner :: Lens' GetObjectAclResponse (Maybe Owner)+goarOwner = lens _goarOwner (\s a -> s { _goarOwner = a })++instance ToPath GetObjectAcl where+    toPath GetObjectAcl{..} = mconcat+        [ "/"+        , toText _goaBucket+        , "/"+        , toText _goaKey+        ]++instance ToQuery GetObjectAcl where+    toQuery GetObjectAcl{..} = mconcat+        [ "acl"+        , "versionId" =? _goaVersionId+        ]++instance ToHeaders GetObjectAcl++instance ToXMLRoot GetObjectAcl where+    toXMLRoot = const (namespaced ns "GetObjectAcl" [])++instance ToXML GetObjectAcl++instance AWSRequest GetObjectAcl where+    type Sv GetObjectAcl = S3+    type Rs GetObjectAcl = GetObjectAclResponse++    request  = get+    response = xmlResponse++instance FromXML GetObjectAclResponse where+    parseXML x = GetObjectAclResponse+        <$> x .@  "AccessControlList"+        <*> x .@? "Owner"
+ gen/Network/AWS/S3/GetObjectTorrent.hs view
@@ -0,0 +1,119 @@+{-# LANGUAGE DataKinds                   #-}+{-# LANGUAGE DeriveGeneric               #-}+{-# LANGUAGE FlexibleInstances           #-}+{-# LANGUAGE GeneralizedNewtypeDeriving  #-}+{-# LANGUAGE LambdaCase                  #-}+{-# LANGUAGE NoImplicitPrelude           #-}+{-# LANGUAGE OverloadedStrings           #-}+{-# LANGUAGE RecordWildCards             #-}+{-# LANGUAGE TypeFamilies                #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Module      : Network.AWS.S3.GetObjectTorrent+-- 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)++-- | Return torrent files from a bucket.+--+-- <http://docs.aws.amazon.com/AmazonS3/latest/API/GetObjectTorrent.html>+module Network.AWS.S3.GetObjectTorrent+    (+    -- * Request+      GetObjectTorrent+    -- ** Request constructor+    , getObjectTorrent+    -- ** Request lenses+    , gotBucket+    , gotKey++    -- * Response+    , GetObjectTorrentResponse+    -- ** Response constructor+    , getObjectTorrentResponse+    -- ** Response lenses+    , gotrBody+    ) where++import Network.AWS.Prelude+import Network.AWS.Request.RestXML+import Network.AWS.S3.Types+import qualified GHC.Exts++data GetObjectTorrent = GetObjectTorrent+    { _gotBucket :: Text+    , _gotKey    :: Text+    } deriving (Eq, Ord, Show)++-- | 'GetObjectTorrent' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'gotBucket' @::@ 'Text'+--+-- * 'gotKey' @::@ 'Text'+--+getObjectTorrent :: Text -- ^ 'gotBucket'+                 -> Text -- ^ 'gotKey'+                 -> GetObjectTorrent+getObjectTorrent p1 p2 = GetObjectTorrent+    { _gotBucket = p1+    , _gotKey    = p2+    }++gotBucket :: Lens' GetObjectTorrent Text+gotBucket = lens _gotBucket (\s a -> s { _gotBucket = a })++gotKey :: Lens' GetObjectTorrent Text+gotKey = lens _gotKey (\s a -> s { _gotKey = a })++newtype GetObjectTorrentResponse = GetObjectTorrentResponse+    { _gotrBody :: RsBody+    } deriving (Show)++-- | 'GetObjectTorrentResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'gotrBody' @::@ 'RsBody'+--+getObjectTorrentResponse :: RsBody -- ^ 'gotrBody'+                         -> GetObjectTorrentResponse+getObjectTorrentResponse p1 = GetObjectTorrentResponse+    { _gotrBody = p1+    }++gotrBody :: Lens' GetObjectTorrentResponse RsBody+gotrBody = lens _gotrBody (\s a -> s { _gotrBody = a })++instance ToPath GetObjectTorrent where+    toPath GetObjectTorrent{..} = mconcat+        [ "/"+        , toText _gotBucket+        , "/"+        , toText _gotKey+        ]++instance ToQuery GetObjectTorrent where+    toQuery = const "torrent"++instance ToHeaders GetObjectTorrent++instance ToXMLRoot GetObjectTorrent where+    toXMLRoot = const (namespaced ns "GetObjectTorrent" [])++instance ToXML GetObjectTorrent++instance AWSRequest GetObjectTorrent where+    type Sv GetObjectTorrent = S3+    type Rs GetObjectTorrent = GetObjectTorrentResponse++    request  = get+    response = bodyResponse . const $ \b -> GetObjectTorrentResponse+        <$> pure (RsBody b)
+ gen/Network/AWS/S3/HeadBucket.hs view
@@ -0,0 +1,94 @@+{-# 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.S3.HeadBucket+-- 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)++-- | This operation is useful to determine if a bucket exists and you have+-- permission to access it.+--+-- <http://docs.aws.amazon.com/AmazonS3/latest/API/HeadBucket.html>+module Network.AWS.S3.HeadBucket+    (+    -- * Request+      HeadBucket+    -- ** Request constructor+    , headBucket+    -- ** Request lenses+    , hbBucket++    -- * Response+    , HeadBucketResponse+    -- ** Response constructor+    , headBucketResponse+    ) where++import Network.AWS.Prelude+import Network.AWS.Request.RestXML+import Network.AWS.S3.Types+import qualified GHC.Exts++newtype HeadBucket = HeadBucket+    { _hbBucket :: Text+    } deriving (Eq, Ord, Show, Monoid, IsString)++-- | 'HeadBucket' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'hbBucket' @::@ 'Text'+--+headBucket :: Text -- ^ 'hbBucket'+           -> HeadBucket+headBucket p1 = HeadBucket+    { _hbBucket = p1+    }++hbBucket :: Lens' HeadBucket Text+hbBucket = lens _hbBucket (\s a -> s { _hbBucket = a })++data HeadBucketResponse = HeadBucketResponse+    deriving (Eq, Ord, Show, Generic)++-- | 'HeadBucketResponse' constructor.+headBucketResponse :: HeadBucketResponse+headBucketResponse = HeadBucketResponse++instance ToPath HeadBucket where+    toPath HeadBucket{..} = mconcat+        [ "/"+        , toText _hbBucket+        ]++instance ToQuery HeadBucket where+    toQuery = const mempty++instance ToHeaders HeadBucket++instance ToXMLRoot HeadBucket where+    toXMLRoot = const (namespaced ns "HeadBucket" [])++instance ToXML HeadBucket++instance AWSRequest HeadBucket where+    type Sv HeadBucket = S3+    type Rs HeadBucket = HeadBucketResponse++    request  = head+    response = nullResponse HeadBucketResponse
+ gen/Network/AWS/S3/HeadObject.hs view
@@ -0,0 +1,468 @@+{-# 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.S3.HeadObject+-- 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)++-- | The HEAD operation retrieves metadata from an object without returning the+-- object itself. This operation is useful if you're only interested in an+-- object's metadata. To use HEAD, you must have READ access to the object.+--+-- <http://docs.aws.amazon.com/AmazonS3/latest/API/HeadObject.html>+module Network.AWS.S3.HeadObject+    (+    -- * Request+      HeadObject+    -- ** Request constructor+    , headObject+    -- ** Request lenses+    , hoBucket+    , hoIfMatch+    , hoIfModifiedSince+    , hoIfNoneMatch+    , hoIfUnmodifiedSince+    , hoKey+    , hoRange+    , hoSSECustomerAlgorithm+    , hoSSECustomerKey+    , hoSSECustomerKeyMD5+    , hoSSEKMSKeyId+    , hoVersionId++    -- * Response+    , HeadObjectResponse+    -- ** Response constructor+    , headObjectResponse+    -- ** Response lenses+    , horAcceptRanges+    , horCacheControl+    , horContentDisposition+    , horContentEncoding+    , horContentLanguage+    , horContentLength+    , horContentType+    , horDeleteMarker+    , horETag+    , horExpiration+    , horExpires+    , horLastModified+    , horMetadata+    , horMissingMeta+    , horRestore+    , horSSECustomerAlgorithm+    , horSSECustomerKeyMD5+    , horSSEKMSKeyId+    , horServerSideEncryption+    , horVersionId+    , horWebsiteRedirectLocation+    ) where++import Network.AWS.Prelude+import Network.AWS.Request.RestXML+import Network.AWS.S3.Types+import qualified GHC.Exts++data HeadObject = HeadObject+    { _hoBucket               :: Text+    , _hoIfMatch              :: Maybe Text+    , _hoIfModifiedSince      :: Maybe RFC822+    , _hoIfNoneMatch          :: Maybe Text+    , _hoIfUnmodifiedSince    :: Maybe RFC822+    , _hoKey                  :: Text+    , _hoRange                :: Maybe Text+    , _hoSSECustomerAlgorithm :: Maybe Text+    , _hoSSECustomerKey       :: Maybe (Sensitive Text)+    , _hoSSECustomerKeyMD5    :: Maybe Text+    , _hoSSEKMSKeyId          :: Maybe (Sensitive Text)+    , _hoVersionId            :: Maybe Text+    } deriving (Eq, Ord, Show)++-- | 'HeadObject' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'hoBucket' @::@ 'Text'+--+-- * 'hoIfMatch' @::@ 'Maybe' 'Text'+--+-- * 'hoIfModifiedSince' @::@ 'Maybe' 'UTCTime'+--+-- * 'hoIfNoneMatch' @::@ 'Maybe' 'Text'+--+-- * 'hoIfUnmodifiedSince' @::@ 'Maybe' 'UTCTime'+--+-- * 'hoKey' @::@ 'Text'+--+-- * 'hoRange' @::@ 'Maybe' 'Text'+--+-- * 'hoSSECustomerAlgorithm' @::@ 'Maybe' 'Text'+--+-- * 'hoSSECustomerKey' @::@ 'Maybe' 'Text'+--+-- * 'hoSSECustomerKeyMD5' @::@ 'Maybe' 'Text'+--+-- * 'hoSSEKMSKeyId' @::@ 'Maybe' 'Text'+--+-- * 'hoVersionId' @::@ 'Maybe' 'Text'+--+headObject :: Text -- ^ 'hoBucket'+           -> Text -- ^ 'hoKey'+           -> HeadObject+headObject p1 p2 = HeadObject+    { _hoBucket               = p1+    , _hoKey                  = p2+    , _hoIfMatch              = Nothing+    , _hoIfModifiedSince      = Nothing+    , _hoIfNoneMatch          = Nothing+    , _hoIfUnmodifiedSince    = Nothing+    , _hoRange                = Nothing+    , _hoVersionId            = Nothing+    , _hoSSECustomerAlgorithm = Nothing+    , _hoSSECustomerKey       = Nothing+    , _hoSSECustomerKeyMD5    = Nothing+    , _hoSSEKMSKeyId          = Nothing+    }++hoBucket :: Lens' HeadObject Text+hoBucket = lens _hoBucket (\s a -> s { _hoBucket = a })++-- | Return the object only if its entity tag (ETag) is the same as the one+-- specified, otherwise return a 412 (precondition failed).+hoIfMatch :: Lens' HeadObject (Maybe Text)+hoIfMatch = lens _hoIfMatch (\s a -> s { _hoIfMatch = a })++-- | Return the object only if it has been modified since the specified time,+-- otherwise return a 304 (not modified).+hoIfModifiedSince :: Lens' HeadObject (Maybe UTCTime)+hoIfModifiedSince =+    lens _hoIfModifiedSince (\s a -> s { _hoIfModifiedSince = a })+        . mapping _Time++-- | Return the object only if its entity tag (ETag) is different from the one+-- specified, otherwise return a 304 (not modified).+hoIfNoneMatch :: Lens' HeadObject (Maybe Text)+hoIfNoneMatch = lens _hoIfNoneMatch (\s a -> s { _hoIfNoneMatch = a })++-- | Return the object only if it has not been modified since the specified+-- time, otherwise return a 412 (precondition failed).+hoIfUnmodifiedSince :: Lens' HeadObject (Maybe UTCTime)+hoIfUnmodifiedSince =+    lens _hoIfUnmodifiedSince (\s a -> s { _hoIfUnmodifiedSince = a })+        . mapping _Time++hoKey :: Lens' HeadObject Text+hoKey = lens _hoKey (\s a -> s { _hoKey = a })++-- | Downloads the specified range bytes of an object. For more information+-- about the HTTP Range header, go to+-- http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35.+hoRange :: Lens' HeadObject (Maybe Text)+hoRange = lens _hoRange (\s a -> s { _hoRange = a })++-- | Specifies the algorithm to use to when encrypting the object (e.g.,+-- AES256, aws:kms).+hoSSECustomerAlgorithm :: Lens' HeadObject (Maybe Text)+hoSSECustomerAlgorithm =+    lens _hoSSECustomerAlgorithm (\s a -> s { _hoSSECustomerAlgorithm = a })++-- | Specifies the customer-provided encryption key for Amazon S3 to use in+-- encrypting data. This value is used to store the object and then it is+-- discarded; Amazon does not store the encryption key. The key must be+-- appropriate for use with the algorithm specified in the+-- x-amz-server-side&#x200B;-encryption&#x200B;-customer-algorithm header.+hoSSECustomerKey :: Lens' HeadObject (Maybe Text)+hoSSECustomerKey = lens _hoSSECustomerKey (\s a -> s { _hoSSECustomerKey = a }) . mapping _Sensitive++-- | Specifies the 128-bit MD5 digest of the encryption key according to RFC+-- 1321. Amazon S3 uses this header for a message integrity check to ensure+-- the encryption key was transmitted without error.+hoSSECustomerKeyMD5 :: Lens' HeadObject (Maybe Text)+hoSSECustomerKeyMD5 =+    lens _hoSSECustomerKeyMD5 (\s a -> s { _hoSSECustomerKeyMD5 = a })++-- | Specifies the AWS KMS key ID to use for object encryption.+hoSSEKMSKeyId :: Lens' HeadObject (Maybe Text)+hoSSEKMSKeyId = lens _hoSSEKMSKeyId (\s a -> s { _hoSSEKMSKeyId = a }) . mapping _Sensitive++-- | VersionId used to reference a specific version of the object.+hoVersionId :: Lens' HeadObject (Maybe Text)+hoVersionId = lens _hoVersionId (\s a -> s { _hoVersionId = a })++data HeadObjectResponse = HeadObjectResponse+    { _horAcceptRanges            :: Maybe Text+    , _horCacheControl            :: Maybe Text+    , _horContentDisposition      :: Maybe Text+    , _horContentEncoding         :: Maybe Text+    , _horContentLanguage         :: Maybe Text+    , _horContentLength           :: Maybe Int+    , _horContentType             :: Maybe Text+    , _horDeleteMarker            :: Maybe Bool+    , _horETag                    :: Maybe Text+    , _horExpiration              :: Maybe RFC822+    , _horExpires                 :: Maybe RFC822+    , _horLastModified            :: Maybe RFC822+    , _horMetadata                :: Map (CI Text) Text+    , _horMissingMeta             :: Maybe Int+    , _horRestore                 :: Maybe Text+    , _horSSECustomerAlgorithm    :: Maybe Text+    , _horSSECustomerKeyMD5       :: Maybe Text+    , _horSSEKMSKeyId             :: Maybe (Sensitive Text)+    , _horServerSideEncryption    :: Maybe Text+    , _horVersionId               :: Maybe Text+    , _horWebsiteRedirectLocation :: Maybe Text+    } deriving (Eq, Show)++-- | 'HeadObjectResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'horAcceptRanges' @::@ 'Maybe' 'Text'+--+-- * 'horCacheControl' @::@ 'Maybe' 'Text'+--+-- * 'horContentDisposition' @::@ 'Maybe' 'Text'+--+-- * 'horContentEncoding' @::@ 'Maybe' 'Text'+--+-- * 'horContentLanguage' @::@ 'Maybe' 'Text'+--+-- * 'horContentLength' @::@ 'Maybe' 'Int'+--+-- * 'horContentType' @::@ 'Maybe' 'Text'+--+-- * 'horDeleteMarker' @::@ 'Maybe' 'Bool'+--+-- * 'horETag' @::@ 'Maybe' 'Text'+--+-- * 'horExpiration' @::@ 'Maybe' 'UTCTime'+--+-- * 'horExpires' @::@ 'Maybe' 'UTCTime'+--+-- * 'horLastModified' @::@ 'Maybe' 'UTCTime'+--+-- * 'horMetadata' @::@ 'HashMap' ('CI' 'Text') 'Text'+--+-- * 'horMissingMeta' @::@ 'Maybe' 'Int'+--+-- * 'horRestore' @::@ 'Maybe' 'Text'+--+-- * 'horSSECustomerAlgorithm' @::@ 'Maybe' 'Text'+--+-- * 'horSSECustomerKeyMD5' @::@ 'Maybe' 'Text'+--+-- * 'horSSEKMSKeyId' @::@ 'Maybe' 'Text'+--+-- * 'horServerSideEncryption' @::@ 'Maybe' 'Text'+--+-- * 'horVersionId' @::@ 'Maybe' 'Text'+--+-- * 'horWebsiteRedirectLocation' @::@ 'Maybe' 'Text'+--+headObjectResponse :: HeadObjectResponse+headObjectResponse = HeadObjectResponse+    { _horDeleteMarker            = Nothing+    , _horAcceptRanges            = Nothing+    , _horExpiration              = Nothing+    , _horRestore                 = Nothing+    , _horLastModified            = Nothing+    , _horContentLength           = Nothing+    , _horETag                    = Nothing+    , _horMissingMeta             = Nothing+    , _horVersionId               = Nothing+    , _horCacheControl            = Nothing+    , _horContentDisposition      = Nothing+    , _horContentEncoding         = Nothing+    , _horContentLanguage         = Nothing+    , _horContentType             = Nothing+    , _horExpires                 = Nothing+    , _horWebsiteRedirectLocation = Nothing+    , _horServerSideEncryption    = Nothing+    , _horMetadata                = mempty+    , _horSSECustomerAlgorithm    = Nothing+    , _horSSECustomerKeyMD5       = Nothing+    , _horSSEKMSKeyId             = Nothing+    }++horAcceptRanges :: Lens' HeadObjectResponse (Maybe Text)+horAcceptRanges = lens _horAcceptRanges (\s a -> s { _horAcceptRanges = a })++-- | Specifies caching behavior along the request/reply chain.+horCacheControl :: Lens' HeadObjectResponse (Maybe Text)+horCacheControl = lens _horCacheControl (\s a -> s { _horCacheControl = a })++-- | Specifies presentational information for the object.+horContentDisposition :: Lens' HeadObjectResponse (Maybe Text)+horContentDisposition =+    lens _horContentDisposition (\s a -> s { _horContentDisposition = a })++-- | Specifies what content encodings have been applied to the object and thus+-- what decoding mechanisms must be applied to obtain the media-type+-- referenced by the Content-Type header field.+horContentEncoding :: Lens' HeadObjectResponse (Maybe Text)+horContentEncoding =+    lens _horContentEncoding (\s a -> s { _horContentEncoding = a })++-- | The language the content is in.+horContentLanguage :: Lens' HeadObjectResponse (Maybe Text)+horContentLanguage =+    lens _horContentLanguage (\s a -> s { _horContentLanguage = a })++-- | Size of the body in bytes.+horContentLength :: Lens' HeadObjectResponse (Maybe Int)+horContentLength = lens _horContentLength (\s a -> s { _horContentLength = a })++-- | A standard MIME type describing the format of the object data.+horContentType :: Lens' HeadObjectResponse (Maybe Text)+horContentType = lens _horContentType (\s a -> s { _horContentType = a })++-- | Specifies whether the object retrieved was (true) or was not (false) a+-- Delete Marker. If false, this response header does not appear in the+-- response.+horDeleteMarker :: Lens' HeadObjectResponse (Maybe Bool)+horDeleteMarker = lens _horDeleteMarker (\s a -> s { _horDeleteMarker = a })++-- | An ETag is an opaque identifier assigned by a web server to a specific+-- version of a resource found at a URL.+horETag :: Lens' HeadObjectResponse (Maybe Text)+horETag = lens _horETag (\s a -> s { _horETag = a })++-- | If the object expiration is configured (see PUT Bucket lifecycle), the+-- response includes this header. It includes the expiry-date and rule-id+-- key value pairs providing object expiration information. The value of the+-- rule-id is URL encoded.+horExpiration :: Lens' HeadObjectResponse (Maybe UTCTime)+horExpiration = lens _horExpiration (\s a -> s { _horExpiration = a }) . mapping _Time++-- | The date and time at which the object is no longer cacheable.+horExpires :: Lens' HeadObjectResponse (Maybe UTCTime)+horExpires = lens _horExpires (\s a -> s { _horExpires = a }) . mapping _Time++-- | Last modified date of the object.+horLastModified :: Lens' HeadObjectResponse (Maybe UTCTime)+horLastModified = lens _horLastModified (\s a -> s { _horLastModified = a }) . mapping _Time++-- | A map of metadata to store with the object in S3.+horMetadata :: Lens' HeadObjectResponse (HashMap (CI Text) Text)+horMetadata = lens _horMetadata (\s a -> s { _horMetadata = a }) . _Map++-- | This is set to the number of metadata entries not returned in x-amz-meta+-- headers. This can happen if you create metadata using an API like SOAP+-- that supports more flexible metadata than the REST API. For example,+-- using SOAP, you can create metadata whose values are not legal HTTP+-- headers.+horMissingMeta :: Lens' HeadObjectResponse (Maybe Int)+horMissingMeta = lens _horMissingMeta (\s a -> s { _horMissingMeta = a })++-- | Provides information about object restoration operation and expiration+-- time of the restored object copy.+horRestore :: Lens' HeadObjectResponse (Maybe Text)+horRestore = lens _horRestore (\s a -> s { _horRestore = a })++-- | If server-side encryption with a customer-provided encryption key was+-- requested, the response will include this header confirming the+-- encryption algorithm used.+horSSECustomerAlgorithm :: Lens' HeadObjectResponse (Maybe Text)+horSSECustomerAlgorithm =+    lens _horSSECustomerAlgorithm (\s a -> s { _horSSECustomerAlgorithm = a })++-- | If server-side encryption with a customer-provided encryption key was+-- requested, the response will include this header to provide round trip+-- message integrity verification of the customer-provided encryption key.+horSSECustomerKeyMD5 :: Lens' HeadObjectResponse (Maybe Text)+horSSECustomerKeyMD5 =+    lens _horSSECustomerKeyMD5 (\s a -> s { _horSSECustomerKeyMD5 = a })++-- | If present, specifies the AWS KMS key used to encrypt the object.+horSSEKMSKeyId :: Lens' HeadObjectResponse (Maybe Text)+horSSEKMSKeyId = lens _horSSEKMSKeyId (\s a -> s { _horSSEKMSKeyId = a }) . mapping _Sensitive++-- | The Server-side encryption algorithm used when storing this object in S3+-- (e.g., AES256, aws:kms).+horServerSideEncryption :: Lens' HeadObjectResponse (Maybe Text)+horServerSideEncryption =+    lens _horServerSideEncryption (\s a -> s { _horServerSideEncryption = a })++-- | Version of the object.+horVersionId :: Lens' HeadObjectResponse (Maybe Text)+horVersionId = lens _horVersionId (\s a -> s { _horVersionId = a })++-- | If the bucket is configured as a website, redirects requests for this+-- object to another object in the same bucket or to an external URL. Amazon+-- S3 stores the value of this header in the object metadata.+horWebsiteRedirectLocation :: Lens' HeadObjectResponse (Maybe Text)+horWebsiteRedirectLocation =+    lens _horWebsiteRedirectLocation+        (\s a -> s { _horWebsiteRedirectLocation = a })++instance ToPath HeadObject where+    toPath HeadObject{..} = mconcat+        [ "/"+        , toText _hoBucket+        , "/"+        , toText _hoKey+        ]++instance ToQuery HeadObject where+    toQuery rq = "versionId" =? _hoVersionId rq++instance ToHeaders HeadObject where+    toHeaders HeadObject{..} = mconcat+        [ "If-Match"                                        =: _hoIfMatch+        , "If-Modified-Since"                               =: _hoIfModifiedSince+        , "If-None-Match"                                   =: _hoIfNoneMatch+        , "If-Unmodified-Since"                             =: _hoIfUnmodifiedSince+        , "Range"                                           =: _hoRange+        , "x-amz-server-side-encryption-customer-algorithm" =: _hoSSECustomerAlgorithm+        , "x-amz-server-side-encryption-customer-key"       =: _hoSSECustomerKey+        , "x-amz-server-side-encryption-customer-key-MD5"   =: _hoSSECustomerKeyMD5+        , "x-amz-server-side-encryption-aws-kms-key-id"     =: _hoSSEKMSKeyId+        ]++instance ToXMLRoot HeadObject where+    toXMLRoot = const (namespaced ns "HeadObject" [])++instance ToXML HeadObject++instance AWSRequest HeadObject where+    type Sv HeadObject = S3+    type Rs HeadObject = HeadObjectResponse++    request  = head+    response = headerResponse $ \h -> HeadObjectResponse+        <$> h ~:? "accept-ranges"+        <*> h ~:? "Cache-Control"+        <*> h ~:? "Content-Disposition"+        <*> h ~:? "Content-Encoding"+        <*> h ~:? "Content-Language"+        <*> h ~:? "Content-Length"+        <*> h ~:? "Content-Type"+        <*> h ~:? "x-amz-delete-marker"+        <*> h ~:? "ETag"+        <*> h ~:? "x-amz-expiration"+        <*> h ~:? "Expires"+        <*> h ~:? "Last-Modified"+        <*> h ~:: "x-amz-meta-"+        <*> h ~:? "x-amz-missing-meta"+        <*> h ~:? "x-amz-restore"+        <*> h ~:? "x-amz-server-side-encryption-customer-algorithm"+        <*> h ~:? "x-amz-server-side-encryption-customer-key-MD5"+        <*> h ~:? "x-amz-server-side-encryption-aws-kms-key-id"+        <*> h ~:? "x-amz-server-side-encryption"+        <*> h ~:? "x-amz-version-id"+        <*> h ~:? "x-amz-website-redirect-location"
+ gen/Network/AWS/S3/ListBuckets.hs view
@@ -0,0 +1,103 @@+{-# 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.S3.ListBuckets+-- 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)++-- | Returns a list of all buckets owned by the authenticated sender of the+-- request.+--+-- <http://docs.aws.amazon.com/AmazonS3/latest/API/ListBuckets.html>+module Network.AWS.S3.ListBuckets+    (+    -- * Request+      ListBuckets+    -- ** Request constructor+    , listBuckets++    -- * Response+    , ListBucketsResponse+    -- ** Response constructor+    , listBucketsResponse+    -- ** Response lenses+    , lbrBuckets+    , lbrOwner+    ) where++import Network.AWS.Prelude+import Network.AWS.Request.RestXML+import Network.AWS.S3.Types+import qualified GHC.Exts++data ListBuckets = ListBuckets+    deriving (Eq, Ord, Show, Generic)++-- | 'ListBuckets' constructor.+listBuckets :: ListBuckets+listBuckets = ListBuckets++data ListBucketsResponse = ListBucketsResponse+    { _lbrBuckets :: List "Bucket" Bucket+    , _lbrOwner   :: Maybe Owner+    } deriving (Eq, Show)++-- | 'ListBucketsResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'lbrBuckets' @::@ ['Bucket']+--+-- * 'lbrOwner' @::@ 'Maybe' 'Owner'+--+listBucketsResponse :: ListBucketsResponse+listBucketsResponse = ListBucketsResponse+    { _lbrBuckets = mempty+    , _lbrOwner   = Nothing+    }++lbrBuckets :: Lens' ListBucketsResponse [Bucket]+lbrBuckets = lens _lbrBuckets (\s a -> s { _lbrBuckets = a }) . _List++lbrOwner :: Lens' ListBucketsResponse (Maybe Owner)+lbrOwner = lens _lbrOwner (\s a -> s { _lbrOwner = a })++instance ToPath ListBuckets where+    toPath = const "/"++instance ToQuery ListBuckets where+    toQuery = const mempty++instance ToHeaders ListBuckets++instance ToXMLRoot ListBuckets where+    toXMLRoot = const (namespaced ns "ListBuckets" [])++instance ToXML ListBuckets++instance AWSRequest ListBuckets where+    type Sv ListBuckets = S3+    type Rs ListBuckets = ListBucketsResponse++    request  = get+    response = xmlResponse++instance FromXML ListBucketsResponse where+    parseXML x = ListBucketsResponse+        <$> x .@  "Buckets"+        <*> x .@? "Owner"
+ gen/Network/AWS/S3/ListMultipartUploads.hs view
@@ -0,0 +1,312 @@+{-# 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.S3.ListMultipartUploads+-- 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)++-- | This operation lists in-progress multipart uploads.+--+-- <http://docs.aws.amazon.com/AmazonS3/latest/API/ListMultipartUploads.html>+module Network.AWS.S3.ListMultipartUploads+    (+    -- * Request+      ListMultipartUploads+    -- ** Request constructor+    , listMultipartUploads+    -- ** Request lenses+    , lmuBucket+    , lmuDelimiter+    , lmuEncodingType+    , lmuKeyMarker+    , lmuMaxUploads+    , lmuPrefix+    , lmuUploadIdMarker++    -- * Response+    , ListMultipartUploadsResponse+    -- ** Response constructor+    , listMultipartUploadsResponse+    -- ** Response lenses+    , lmurBucket+    , lmurCommonPrefixes+    , lmurDelimiter+    , lmurEncodingType+    , lmurIsTruncated+    , lmurKeyMarker+    , lmurMaxUploads+    , lmurNextKeyMarker+    , lmurNextUploadIdMarker+    , lmurPrefix+    , lmurUploadIdMarker+    , lmurUploads+    ) where++import Network.AWS.Prelude+import Network.AWS.Request.RestXML+import Network.AWS.S3.Types+import qualified GHC.Exts++data ListMultipartUploads = ListMultipartUploads+    { _lmuBucket         :: Text+    , _lmuDelimiter      :: Maybe Text+    , _lmuEncodingType   :: Maybe Text+    , _lmuKeyMarker      :: Maybe Text+    , _lmuMaxUploads     :: Maybe Int+    , _lmuPrefix         :: Maybe Text+    , _lmuUploadIdMarker :: Maybe Text+    } deriving (Eq, Ord, Show)++-- | 'ListMultipartUploads' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'lmuBucket' @::@ 'Text'+--+-- * 'lmuDelimiter' @::@ 'Maybe' 'Text'+--+-- * 'lmuEncodingType' @::@ 'Maybe' 'Text'+--+-- * 'lmuKeyMarker' @::@ 'Maybe' 'Text'+--+-- * 'lmuMaxUploads' @::@ 'Maybe' 'Int'+--+-- * 'lmuPrefix' @::@ 'Maybe' 'Text'+--+-- * 'lmuUploadIdMarker' @::@ 'Maybe' 'Text'+--+listMultipartUploads :: Text -- ^ 'lmuBucket'+                     -> ListMultipartUploads+listMultipartUploads p1 = ListMultipartUploads+    { _lmuBucket         = p1+    , _lmuDelimiter      = Nothing+    , _lmuEncodingType   = Nothing+    , _lmuKeyMarker      = Nothing+    , _lmuMaxUploads     = Nothing+    , _lmuPrefix         = Nothing+    , _lmuUploadIdMarker = Nothing+    }++lmuBucket :: Lens' ListMultipartUploads Text+lmuBucket = lens _lmuBucket (\s a -> s { _lmuBucket = a })++-- | Character you use to group keys.+lmuDelimiter :: Lens' ListMultipartUploads (Maybe Text)+lmuDelimiter = lens _lmuDelimiter (\s a -> s { _lmuDelimiter = a })++lmuEncodingType :: Lens' ListMultipartUploads (Maybe Text)+lmuEncodingType = lens _lmuEncodingType (\s a -> s { _lmuEncodingType = a })++-- | Together with upload-id-marker, this parameter specifies the multipart+-- upload after which listing should begin.+lmuKeyMarker :: Lens' ListMultipartUploads (Maybe Text)+lmuKeyMarker = lens _lmuKeyMarker (\s a -> s { _lmuKeyMarker = a })++-- | Sets the maximum number of multipart uploads, from 1 to 1,000, to return+-- in the response body. 1,000 is the maximum number of uploads that can be+-- returned in a response.+lmuMaxUploads :: Lens' ListMultipartUploads (Maybe Int)+lmuMaxUploads = lens _lmuMaxUploads (\s a -> s { _lmuMaxUploads = a })++-- | Lists in-progress uploads only for those keys that begin with the+-- specified prefix.+lmuPrefix :: Lens' ListMultipartUploads (Maybe Text)+lmuPrefix = lens _lmuPrefix (\s a -> s { _lmuPrefix = a })++-- | Together with key-marker, specifies the multipart upload after which+-- listing should begin. If key-marker is not specified, the+-- upload-id-marker parameter is ignored.+lmuUploadIdMarker :: Lens' ListMultipartUploads (Maybe Text)+lmuUploadIdMarker =+    lens _lmuUploadIdMarker (\s a -> s { _lmuUploadIdMarker = a })++data ListMultipartUploadsResponse = ListMultipartUploadsResponse+    { _lmurBucket             :: Maybe Text+    , _lmurCommonPrefixes     :: List "CommonPrefixes" CommonPrefix+    , _lmurDelimiter          :: Maybe Text+    , _lmurEncodingType       :: Maybe Text+    , _lmurIsTruncated        :: Maybe Bool+    , _lmurKeyMarker          :: Maybe Text+    , _lmurMaxUploads         :: Maybe Int+    , _lmurNextKeyMarker      :: Maybe Text+    , _lmurNextUploadIdMarker :: Maybe Text+    , _lmurPrefix             :: Maybe Text+    , _lmurUploadIdMarker     :: Maybe Text+    , _lmurUploads            :: List "Upload" MultipartUpload+    } deriving (Eq, Show)++-- | 'ListMultipartUploadsResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'lmurBucket' @::@ 'Maybe' 'Text'+--+-- * 'lmurCommonPrefixes' @::@ ['CommonPrefix']+--+-- * 'lmurDelimiter' @::@ 'Maybe' 'Text'+--+-- * 'lmurEncodingType' @::@ 'Maybe' 'Text'+--+-- * 'lmurIsTruncated' @::@ 'Maybe' 'Bool'+--+-- * 'lmurKeyMarker' @::@ 'Maybe' 'Text'+--+-- * 'lmurMaxUploads' @::@ 'Maybe' 'Int'+--+-- * 'lmurNextKeyMarker' @::@ 'Maybe' 'Text'+--+-- * 'lmurNextUploadIdMarker' @::@ 'Maybe' 'Text'+--+-- * 'lmurPrefix' @::@ 'Maybe' 'Text'+--+-- * 'lmurUploadIdMarker' @::@ 'Maybe' 'Text'+--+-- * 'lmurUploads' @::@ ['MultipartUpload']+--+listMultipartUploadsResponse :: [MultipartUpload] -- ^ 'lmurUploads'+                             -> [CommonPrefix] -- ^ 'lmurCommonPrefixes'+                             -> ListMultipartUploadsResponse+listMultipartUploadsResponse p1 p2 = ListMultipartUploadsResponse+    { _lmurUploads            = withIso _List (const id) p1+    , _lmurCommonPrefixes     = withIso _List (const id) p2+    , _lmurBucket             = Nothing+    , _lmurKeyMarker          = Nothing+    , _lmurUploadIdMarker     = Nothing+    , _lmurNextKeyMarker      = Nothing+    , _lmurPrefix             = Nothing+    , _lmurDelimiter          = Nothing+    , _lmurNextUploadIdMarker = Nothing+    , _lmurMaxUploads         = Nothing+    , _lmurIsTruncated        = Nothing+    , _lmurEncodingType       = Nothing+    }++-- | Name of the bucket to which the multipart upload was initiated.+lmurBucket :: Lens' ListMultipartUploadsResponse (Maybe Text)+lmurBucket = lens _lmurBucket (\s a -> s { _lmurBucket = a })++lmurCommonPrefixes :: Lens' ListMultipartUploadsResponse [CommonPrefix]+lmurCommonPrefixes =+    lens _lmurCommonPrefixes (\s a -> s { _lmurCommonPrefixes = a })+        . _List++lmurDelimiter :: Lens' ListMultipartUploadsResponse (Maybe Text)+lmurDelimiter = lens _lmurDelimiter (\s a -> s { _lmurDelimiter = a })++-- | Encoding type used by Amazon S3 to encode object keys in the response.+lmurEncodingType :: Lens' ListMultipartUploadsResponse (Maybe Text)+lmurEncodingType = lens _lmurEncodingType (\s a -> s { _lmurEncodingType = a })++-- | Indicates whether the returned list of multipart uploads is truncated. A+-- value of true indicates that the list was truncated. The list can be+-- truncated if the number of multipart uploads exceeds the limit allowed or+-- specified by max uploads.+lmurIsTruncated :: Lens' ListMultipartUploadsResponse (Maybe Bool)+lmurIsTruncated = lens _lmurIsTruncated (\s a -> s { _lmurIsTruncated = a })++-- | The key at or after which the listing began.+lmurKeyMarker :: Lens' ListMultipartUploadsResponse (Maybe Text)+lmurKeyMarker = lens _lmurKeyMarker (\s a -> s { _lmurKeyMarker = a })++-- | Maximum number of multipart uploads that could have been included in the+-- response.+lmurMaxUploads :: Lens' ListMultipartUploadsResponse (Maybe Int)+lmurMaxUploads = lens _lmurMaxUploads (\s a -> s { _lmurMaxUploads = a })++-- | When a list is truncated, this element specifies the value that should be+-- used for the key-marker request parameter in a subsequent request.+lmurNextKeyMarker :: Lens' ListMultipartUploadsResponse (Maybe Text)+lmurNextKeyMarker =+    lens _lmurNextKeyMarker (\s a -> s { _lmurNextKeyMarker = a })++-- | When a list is truncated, this element specifies the value that should be+-- used for the upload-id-marker request parameter in a subsequent request.+lmurNextUploadIdMarker :: Lens' ListMultipartUploadsResponse (Maybe Text)+lmurNextUploadIdMarker =+    lens _lmurNextUploadIdMarker (\s a -> s { _lmurNextUploadIdMarker = a })++-- | When a prefix is provided in the request, this field contains the+-- specified prefix. The result contains only keys starting with the+-- specified prefix.+lmurPrefix :: Lens' ListMultipartUploadsResponse (Maybe Text)+lmurPrefix = lens _lmurPrefix (\s a -> s { _lmurPrefix = a })++-- | Upload ID after which listing began.+lmurUploadIdMarker :: Lens' ListMultipartUploadsResponse (Maybe Text)+lmurUploadIdMarker =+    lens _lmurUploadIdMarker (\s a -> s { _lmurUploadIdMarker = a })++lmurUploads :: Lens' ListMultipartUploadsResponse [MultipartUpload]+lmurUploads = lens _lmurUploads (\s a -> s { _lmurUploads = a }) . _List++instance ToPath ListMultipartUploads where+    toPath ListMultipartUploads{..} = mconcat+        [ "/"+        , toText _lmuBucket+        ]++instance ToQuery ListMultipartUploads where+    toQuery ListMultipartUploads{..} = mconcat+        [ "uploads"+        , "delimiter"        =? _lmuDelimiter+        , "encoding-type"    =? _lmuEncodingType+        , "key-marker"       =? _lmuKeyMarker+        , "max-uploads"      =? _lmuMaxUploads+        , "prefix"           =? _lmuPrefix+        , "upload-id-marker" =? _lmuUploadIdMarker+        ]++instance ToHeaders ListMultipartUploads++instance ToXMLRoot ListMultipartUploads where+    toXMLRoot = const (namespaced ns "ListMultipartUploads" [])++instance ToXML ListMultipartUploads++instance AWSRequest ListMultipartUploads where+    type Sv ListMultipartUploads = S3+    type Rs ListMultipartUploads = ListMultipartUploadsResponse++    request  = get+    response = xmlResponse++instance FromXML ListMultipartUploadsResponse where+    parseXML x = ListMultipartUploadsResponse+        <$> x .@? "Bucket"+        <*> parseXML x+        <*> x .@? "Delimiter"+        <*> x .@? "EncodingType"+        <*> x .@? "IsTruncated"+        <*> x .@? "KeyMarker"+        <*> x .@? "MaxUploads"+        <*> x .@? "NextKeyMarker"+        <*> x .@? "NextUploadIdMarker"+        <*> x .@? "Prefix"+        <*> x .@? "UploadIdMarker"+        <*> parseXML x++instance AWSPager ListMultipartUploads where+    page rq rs+        | stop (rs ^. lmurIsTruncated) = Nothing+        | isNothing p1 && isNothing p2 = Nothing+        | otherwise = Just $ rq+            & lmuKeyMarker .~ p1+            & lmuUploadIdMarker .~ p2+      where+        p1 = rs ^. lmurNextKeyMarker+        p2 = rs ^. lmurNextUploadIdMarker
+ gen/Network/AWS/S3/ListObjectVersions.hs view
@@ -0,0 +1,313 @@+{-# 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.S3.ListObjectVersions+-- 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)++-- | Returns metadata about all of the versions of objects in a bucket.+--+-- <http://docs.aws.amazon.com/AmazonS3/latest/API/ListObjectVersions.html>+module Network.AWS.S3.ListObjectVersions+    (+    -- * Request+      ListObjectVersions+    -- ** Request constructor+    , listObjectVersions+    -- ** Request lenses+    , lovBucket+    , lovDelimiter+    , lovEncodingType+    , lovKeyMarker+    , lovMaxKeys+    , lovPrefix+    , lovVersionIdMarker++    -- * Response+    , ListObjectVersionsResponse+    -- ** Response constructor+    , listObjectVersionsResponse+    -- ** Response lenses+    , lovrCommonPrefixes+    , lovrDeleteMarkers+    , lovrDelimiter+    , lovrEncodingType+    , lovrIsTruncated+    , lovrKeyMarker+    , lovrMaxKeys+    , lovrName+    , lovrNextKeyMarker+    , lovrNextVersionIdMarker+    , lovrPrefix+    , lovrVersionIdMarker+    , lovrVersions+    ) where++import Network.AWS.Prelude+import Network.AWS.Request.RestXML+import Network.AWS.S3.Types+import qualified GHC.Exts++data ListObjectVersions = ListObjectVersions+    { _lovBucket          :: Text+    , _lovDelimiter       :: Maybe Text+    , _lovEncodingType    :: Maybe Text+    , _lovKeyMarker       :: Maybe Text+    , _lovMaxKeys         :: Maybe Int+    , _lovPrefix          :: Maybe Text+    , _lovVersionIdMarker :: Maybe Text+    } deriving (Eq, Ord, Show)++-- | 'ListObjectVersions' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'lovBucket' @::@ 'Text'+--+-- * 'lovDelimiter' @::@ 'Maybe' 'Text'+--+-- * 'lovEncodingType' @::@ 'Maybe' 'Text'+--+-- * 'lovKeyMarker' @::@ 'Maybe' 'Text'+--+-- * 'lovMaxKeys' @::@ 'Maybe' 'Int'+--+-- * 'lovPrefix' @::@ 'Maybe' 'Text'+--+-- * 'lovVersionIdMarker' @::@ 'Maybe' 'Text'+--+listObjectVersions :: Text -- ^ 'lovBucket'+                   -> ListObjectVersions+listObjectVersions p1 = ListObjectVersions+    { _lovBucket          = p1+    , _lovDelimiter       = Nothing+    , _lovEncodingType    = Nothing+    , _lovKeyMarker       = Nothing+    , _lovMaxKeys         = Nothing+    , _lovPrefix          = Nothing+    , _lovVersionIdMarker = Nothing+    }++lovBucket :: Lens' ListObjectVersions Text+lovBucket = lens _lovBucket (\s a -> s { _lovBucket = a })++-- | A delimiter is a character you use to group keys.+lovDelimiter :: Lens' ListObjectVersions (Maybe Text)+lovDelimiter = lens _lovDelimiter (\s a -> s { _lovDelimiter = a })++lovEncodingType :: Lens' ListObjectVersions (Maybe Text)+lovEncodingType = lens _lovEncodingType (\s a -> s { _lovEncodingType = a })++-- | Specifies the key to start with when listing objects in a bucket.+lovKeyMarker :: Lens' ListObjectVersions (Maybe Text)+lovKeyMarker = lens _lovKeyMarker (\s a -> s { _lovKeyMarker = a })++-- | Sets the maximum number of keys returned in the response. The response+-- might contain fewer keys but will never contain more.+lovMaxKeys :: Lens' ListObjectVersions (Maybe Int)+lovMaxKeys = lens _lovMaxKeys (\s a -> s { _lovMaxKeys = a })++-- | Limits the response to keys that begin with the specified prefix.+lovPrefix :: Lens' ListObjectVersions (Maybe Text)+lovPrefix = lens _lovPrefix (\s a -> s { _lovPrefix = a })++-- | Specifies the object version you want to start listing from.+lovVersionIdMarker :: Lens' ListObjectVersions (Maybe Text)+lovVersionIdMarker =+    lens _lovVersionIdMarker (\s a -> s { _lovVersionIdMarker = a })++data ListObjectVersionsResponse = ListObjectVersionsResponse+    { _lovrCommonPrefixes      :: List "CommonPrefixes" CommonPrefix+    , _lovrDeleteMarkers       :: List "DeleteMarker" DeleteMarkerEntry+    , _lovrDelimiter           :: Maybe Text+    , _lovrEncodingType        :: Maybe Text+    , _lovrIsTruncated         :: Maybe Bool+    , _lovrKeyMarker           :: Maybe Text+    , _lovrMaxKeys             :: Maybe Int+    , _lovrName                :: Maybe Text+    , _lovrNextKeyMarker       :: Maybe Text+    , _lovrNextVersionIdMarker :: Maybe Text+    , _lovrPrefix              :: Maybe Text+    , _lovrVersionIdMarker     :: Maybe Text+    , _lovrVersions            :: List "Version" ObjectVersion+    } deriving (Eq, Show)++-- | 'ListObjectVersionsResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'lovrCommonPrefixes' @::@ ['CommonPrefix']+--+-- * 'lovrDeleteMarkers' @::@ ['DeleteMarkerEntry']+--+-- * 'lovrDelimiter' @::@ 'Maybe' 'Text'+--+-- * 'lovrEncodingType' @::@ 'Maybe' 'Text'+--+-- * 'lovrIsTruncated' @::@ 'Maybe' 'Bool'+--+-- * 'lovrKeyMarker' @::@ 'Maybe' 'Text'+--+-- * 'lovrMaxKeys' @::@ 'Maybe' 'Int'+--+-- * 'lovrName' @::@ 'Maybe' 'Text'+--+-- * 'lovrNextKeyMarker' @::@ 'Maybe' 'Text'+--+-- * 'lovrNextVersionIdMarker' @::@ 'Maybe' 'Text'+--+-- * 'lovrPrefix' @::@ 'Maybe' 'Text'+--+-- * 'lovrVersionIdMarker' @::@ 'Maybe' 'Text'+--+-- * 'lovrVersions' @::@ ['ObjectVersion']+--+listObjectVersionsResponse :: [ObjectVersion] -- ^ 'lovrVersions'+                           -> [DeleteMarkerEntry] -- ^ 'lovrDeleteMarkers'+                           -> [CommonPrefix] -- ^ 'lovrCommonPrefixes'+                           -> ListObjectVersionsResponse+listObjectVersionsResponse p1 p2 p3 = ListObjectVersionsResponse+    { _lovrVersions            = withIso _List (const id) p1+    , _lovrDeleteMarkers       = withIso _List (const id) p2+    , _lovrCommonPrefixes      = withIso _List (const id) p3+    , _lovrIsTruncated         = Nothing+    , _lovrKeyMarker           = Nothing+    , _lovrVersionIdMarker     = Nothing+    , _lovrNextKeyMarker       = Nothing+    , _lovrNextVersionIdMarker = Nothing+    , _lovrName                = Nothing+    , _lovrPrefix              = Nothing+    , _lovrDelimiter           = Nothing+    , _lovrMaxKeys             = Nothing+    , _lovrEncodingType        = Nothing+    }++lovrCommonPrefixes :: Lens' ListObjectVersionsResponse [CommonPrefix]+lovrCommonPrefixes =+    lens _lovrCommonPrefixes (\s a -> s { _lovrCommonPrefixes = a })+        . _List++lovrDeleteMarkers :: Lens' ListObjectVersionsResponse [DeleteMarkerEntry]+lovrDeleteMarkers =+    lens _lovrDeleteMarkers (\s a -> s { _lovrDeleteMarkers = a })+        . _List++lovrDelimiter :: Lens' ListObjectVersionsResponse (Maybe Text)+lovrDelimiter = lens _lovrDelimiter (\s a -> s { _lovrDelimiter = a })++-- | Encoding type used by Amazon S3 to encode object keys in the response.+lovrEncodingType :: Lens' ListObjectVersionsResponse (Maybe Text)+lovrEncodingType = lens _lovrEncodingType (\s a -> s { _lovrEncodingType = a })++-- | A flag that indicates whether or not Amazon S3 returned all of the+-- results that satisfied the search criteria. If your results were+-- truncated, you can make a follow-up paginated request using the+-- NextKeyMarker and NextVersionIdMarker response parameters as a starting+-- place in another request to return the rest of the results.+lovrIsTruncated :: Lens' ListObjectVersionsResponse (Maybe Bool)+lovrIsTruncated = lens _lovrIsTruncated (\s a -> s { _lovrIsTruncated = a })++-- | Marks the last Key returned in a truncated response.+lovrKeyMarker :: Lens' ListObjectVersionsResponse (Maybe Text)+lovrKeyMarker = lens _lovrKeyMarker (\s a -> s { _lovrKeyMarker = a })++lovrMaxKeys :: Lens' ListObjectVersionsResponse (Maybe Int)+lovrMaxKeys = lens _lovrMaxKeys (\s a -> s { _lovrMaxKeys = a })++lovrName :: Lens' ListObjectVersionsResponse (Maybe Text)+lovrName = lens _lovrName (\s a -> s { _lovrName = a })++-- | Use this value for the key marker request parameter in a subsequent+-- request.+lovrNextKeyMarker :: Lens' ListObjectVersionsResponse (Maybe Text)+lovrNextKeyMarker =+    lens _lovrNextKeyMarker (\s a -> s { _lovrNextKeyMarker = a })++-- | Use this value for the next version id marker parameter in a subsequent+-- request.+lovrNextVersionIdMarker :: Lens' ListObjectVersionsResponse (Maybe Text)+lovrNextVersionIdMarker =+    lens _lovrNextVersionIdMarker (\s a -> s { _lovrNextVersionIdMarker = a })++lovrPrefix :: Lens' ListObjectVersionsResponse (Maybe Text)+lovrPrefix = lens _lovrPrefix (\s a -> s { _lovrPrefix = a })++lovrVersionIdMarker :: Lens' ListObjectVersionsResponse (Maybe Text)+lovrVersionIdMarker =+    lens _lovrVersionIdMarker (\s a -> s { _lovrVersionIdMarker = a })++lovrVersions :: Lens' ListObjectVersionsResponse [ObjectVersion]+lovrVersions = lens _lovrVersions (\s a -> s { _lovrVersions = a }) . _List++instance ToPath ListObjectVersions where+    toPath ListObjectVersions{..} = mconcat+        [ "/"+        , toText _lovBucket+        ]++instance ToQuery ListObjectVersions where+    toQuery ListObjectVersions{..} = mconcat+        [ "versions"+        , "delimiter"         =? _lovDelimiter+        , "encoding-type"     =? _lovEncodingType+        , "key-marker"        =? _lovKeyMarker+        , "max-keys"          =? _lovMaxKeys+        , "prefix"            =? _lovPrefix+        , "version-id-marker" =? _lovVersionIdMarker+        ]++instance ToHeaders ListObjectVersions++instance ToXMLRoot ListObjectVersions where+    toXMLRoot = const (namespaced ns "ListObjectVersions" [])++instance ToXML ListObjectVersions++instance AWSRequest ListObjectVersions where+    type Sv ListObjectVersions = S3+    type Rs ListObjectVersions = ListObjectVersionsResponse++    request  = get+    response = xmlResponse++instance FromXML ListObjectVersionsResponse where+    parseXML x = ListObjectVersionsResponse+        <$> parseXML x+        <*> parseXML x+        <*> x .@? "Delimiter"+        <*> x .@? "EncodingType"+        <*> x .@? "IsTruncated"+        <*> x .@? "KeyMarker"+        <*> x .@? "MaxKeys"+        <*> x .@? "Name"+        <*> x .@? "NextKeyMarker"+        <*> x .@? "NextVersionIdMarker"+        <*> x .@? "Prefix"+        <*> x .@? "VersionIdMarker"+        <*> parseXML x++instance AWSPager ListObjectVersions where+    page rq rs+        | stop (rs ^. lovrIsTruncated) = Nothing+        | isNothing p1 && isNothing p2 = Nothing+        | otherwise = Just $ rq+            & lovKeyMarker .~ p1+            & lovVersionIdMarker .~ p2+      where+        p1 = rs ^. lovrNextKeyMarker+        p2 = rs ^. lovrNextVersionIdMarker
+ gen/Network/AWS/S3/ListObjects.hs view
@@ -0,0 +1,265 @@+{-# 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.S3.ListObjects+-- 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)++-- | Returns some or all (up to 1000) of the objects in a bucket. You can use+-- the request parameters as selection criteria to return a subset of the+-- objects in a bucket.+--+-- <http://docs.aws.amazon.com/AmazonS3/latest/API/ListObjects.html>+module Network.AWS.S3.ListObjects+    (+    -- * Request+      ListObjects+    -- ** Request constructor+    , listObjects+    -- ** Request lenses+    , loBucket+    , loDelimiter+    , loEncodingType+    , loMarker+    , loMaxKeys+    , loPrefix++    -- * Response+    , ListObjectsResponse+    -- ** Response constructor+    , listObjectsResponse+    -- ** Response lenses+    , lorCommonPrefixes+    , lorContents+    , lorDelimiter+    , lorEncodingType+    , lorIsTruncated+    , lorMarker+    , lorMaxKeys+    , lorName+    , lorNextMarker+    , lorPrefix+    ) where++import Network.AWS.Prelude+import Network.AWS.Request.RestXML+import Network.AWS.S3.Types+import qualified GHC.Exts++data ListObjects = ListObjects+    { _loBucket       :: Text+    , _loDelimiter    :: Maybe Text+    , _loEncodingType :: Maybe Text+    , _loMarker       :: Maybe Text+    , _loMaxKeys      :: Maybe Int+    , _loPrefix       :: Maybe Text+    } deriving (Eq, Ord, Show)++-- | 'ListObjects' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'loBucket' @::@ 'Text'+--+-- * 'loDelimiter' @::@ 'Maybe' 'Text'+--+-- * 'loEncodingType' @::@ 'Maybe' 'Text'+--+-- * 'loMarker' @::@ 'Maybe' 'Text'+--+-- * 'loMaxKeys' @::@ 'Maybe' 'Int'+--+-- * 'loPrefix' @::@ 'Maybe' 'Text'+--+listObjects :: Text -- ^ 'loBucket'+            -> ListObjects+listObjects p1 = ListObjects+    { _loBucket       = p1+    , _loDelimiter    = Nothing+    , _loEncodingType = Nothing+    , _loMarker       = Nothing+    , _loMaxKeys      = Nothing+    , _loPrefix       = Nothing+    }++loBucket :: Lens' ListObjects Text+loBucket = lens _loBucket (\s a -> s { _loBucket = a })++-- | A delimiter is a character you use to group keys.+loDelimiter :: Lens' ListObjects (Maybe Text)+loDelimiter = lens _loDelimiter (\s a -> s { _loDelimiter = a })++loEncodingType :: Lens' ListObjects (Maybe Text)+loEncodingType = lens _loEncodingType (\s a -> s { _loEncodingType = a })++-- | Specifies the key to start with when listing objects in a bucket.+loMarker :: Lens' ListObjects (Maybe Text)+loMarker = lens _loMarker (\s a -> s { _loMarker = a })++-- | Sets the maximum number of keys returned in the response. The response+-- might contain fewer keys but will never contain more.+loMaxKeys :: Lens' ListObjects (Maybe Int)+loMaxKeys = lens _loMaxKeys (\s a -> s { _loMaxKeys = a })++-- | Limits the response to keys that begin with the specified prefix.+loPrefix :: Lens' ListObjects (Maybe Text)+loPrefix = lens _loPrefix (\s a -> s { _loPrefix = a })++data ListObjectsResponse = ListObjectsResponse+    { _lorCommonPrefixes :: List "CommonPrefixes" CommonPrefix+    , _lorContents       :: List "Contents" Object+    , _lorDelimiter      :: Maybe Text+    , _lorEncodingType   :: Maybe Text+    , _lorIsTruncated    :: Maybe Bool+    , _lorMarker         :: Maybe Text+    , _lorMaxKeys        :: Maybe Int+    , _lorName           :: Maybe Text+    , _lorNextMarker     :: Maybe Text+    , _lorPrefix         :: Maybe Text+    } deriving (Eq, Show)++-- | 'ListObjectsResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'lorCommonPrefixes' @::@ ['CommonPrefix']+--+-- * 'lorContents' @::@ ['Object']+--+-- * 'lorDelimiter' @::@ 'Maybe' 'Text'+--+-- * 'lorEncodingType' @::@ 'Maybe' 'Text'+--+-- * 'lorIsTruncated' @::@ 'Maybe' 'Bool'+--+-- * 'lorMarker' @::@ 'Maybe' 'Text'+--+-- * 'lorMaxKeys' @::@ 'Maybe' 'Int'+--+-- * 'lorName' @::@ 'Maybe' 'Text'+--+-- * 'lorNextMarker' @::@ 'Maybe' 'Text'+--+-- * 'lorPrefix' @::@ 'Maybe' 'Text'+--+listObjectsResponse :: [Object] -- ^ 'lorContents'+                    -> [CommonPrefix] -- ^ 'lorCommonPrefixes'+                    -> ListObjectsResponse+listObjectsResponse p1 p2 = ListObjectsResponse+    { _lorContents       = withIso _List (const id) p1+    , _lorCommonPrefixes = withIso _List (const id) p2+    , _lorIsTruncated    = Nothing+    , _lorMarker         = Nothing+    , _lorNextMarker     = Nothing+    , _lorName           = Nothing+    , _lorPrefix         = Nothing+    , _lorDelimiter      = Nothing+    , _lorMaxKeys        = Nothing+    , _lorEncodingType   = Nothing+    }++lorCommonPrefixes :: Lens' ListObjectsResponse [CommonPrefix]+lorCommonPrefixes =+    lens _lorCommonPrefixes (\s a -> s { _lorCommonPrefixes = a })+        . _List++lorContents :: Lens' ListObjectsResponse [Object]+lorContents = lens _lorContents (\s a -> s { _lorContents = a }) . _List++lorDelimiter :: Lens' ListObjectsResponse (Maybe Text)+lorDelimiter = lens _lorDelimiter (\s a -> s { _lorDelimiter = a })++-- | Encoding type used by Amazon S3 to encode object keys in the response.+lorEncodingType :: Lens' ListObjectsResponse (Maybe Text)+lorEncodingType = lens _lorEncodingType (\s a -> s { _lorEncodingType = a })++-- | A flag that indicates whether or not Amazon S3 returned all of the+-- results that satisfied the search criteria.+lorIsTruncated :: Lens' ListObjectsResponse (Maybe Bool)+lorIsTruncated = lens _lorIsTruncated (\s a -> s { _lorIsTruncated = a })++lorMarker :: Lens' ListObjectsResponse (Maybe Text)+lorMarker = lens _lorMarker (\s a -> s { _lorMarker = a })++lorMaxKeys :: Lens' ListObjectsResponse (Maybe Int)+lorMaxKeys = lens _lorMaxKeys (\s a -> s { _lorMaxKeys = a })++lorName :: Lens' ListObjectsResponse (Maybe Text)+lorName = lens _lorName (\s a -> s { _lorName = a })++-- | When response is truncated (the IsTruncated element value in the response+-- is true), you can use the key name in this field as marker in the+-- subsequent request to get next set of objects. Amazon S3 lists objects in+-- alphabetical order Note: This element is returned only if you have+-- delimiter request parameter specified. If response does not include the+-- NextMaker and it is truncated, you can use the value of the last Key in+-- the response as the marker in the subsequent request to get the next set+-- of object keys.+lorNextMarker :: Lens' ListObjectsResponse (Maybe Text)+lorNextMarker = lens _lorNextMarker (\s a -> s { _lorNextMarker = a })++lorPrefix :: Lens' ListObjectsResponse (Maybe Text)+lorPrefix = lens _lorPrefix (\s a -> s { _lorPrefix = a })++instance ToPath ListObjects where+    toPath ListObjects{..} = mconcat+        [ "/"+        , toText _loBucket+        ]++instance ToQuery ListObjects where+    toQuery ListObjects{..} = mconcat+        [ "delimiter"     =? _loDelimiter+        , "encoding-type" =? _loEncodingType+        , "marker"        =? _loMarker+        , "max-keys"      =? _loMaxKeys+        , "prefix"        =? _loPrefix+        ]++instance ToHeaders ListObjects++instance ToXMLRoot ListObjects where+    toXMLRoot = const (namespaced ns "ListObjects" [])++instance ToXML ListObjects++instance AWSRequest ListObjects where+    type Sv ListObjects = S3+    type Rs ListObjects = ListObjectsResponse++    request  = get+    response = xmlResponse++instance FromXML ListObjectsResponse where+    parseXML x = ListObjectsResponse+        <$> parseXML x+        <*> parseXML x+        <*> x .@? "Delimiter"+        <*> x .@? "EncodingType"+        <*> x .@? "IsTruncated"+        <*> x .@? "Marker"+        <*> x .@? "MaxKeys"+        <*> x .@? "Name"+        <*> x .@? "NextMarker"+        <*> x .@? "Prefix"++instance AWSPager ListObjects where+    page rq rs+        | stop (rs ^. lorIsTruncated) = Nothing+        | otherwise = Just $ rq+            & loMarker .~ rs ^. lorNextMarker
+ gen/Network/AWS/S3/ListParts.hs view
@@ -0,0 +1,265 @@+{-# 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.S3.ListParts+-- Copyright   : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>+-- License     : This Source Code Form is subject to the terms of+--               the Mozilla Public License, v. 2.0.+--               A copy of the MPL can be found in the LICENSE file or+--               you can obtain it at http://mozilla.org/MPL/2.0/.+-- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability   : experimental+-- Portability : non-portable (GHC extensions)++-- | Lists the parts that have been uploaded for a specific multipart upload.+--+-- <http://docs.aws.amazon.com/AmazonS3/latest/API/ListParts.html>+module Network.AWS.S3.ListParts+    (+    -- * Request+      ListParts+    -- ** Request constructor+    , listParts+    -- ** Request lenses+    , lpBucket+    , lpKey+    , lpMaxParts+    , lpPartNumberMarker+    , lpUploadId++    -- * Response+    , ListPartsResponse+    -- ** Response constructor+    , listPartsResponse+    -- ** Response lenses+    , lprBucket+    , lprInitiator+    , lprIsTruncated+    , lprKey+    , lprMaxParts+    , lprNextPartNumberMarker+    , lprOwner+    , lprPartNumberMarker+    , lprParts+    , lprStorageClass+    , lprUploadId+    ) where++import Network.AWS.Prelude+import Network.AWS.Request.RestXML+import Network.AWS.S3.Types+import qualified GHC.Exts++data ListParts = ListParts+    { _lpBucket           :: Text+    , _lpKey              :: Text+    , _lpMaxParts         :: Maybe Int+    , _lpPartNumberMarker :: Maybe Int+    , _lpUploadId         :: Text+    } deriving (Eq, Ord, Show)++-- | 'ListParts' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'lpBucket' @::@ 'Text'+--+-- * 'lpKey' @::@ 'Text'+--+-- * 'lpMaxParts' @::@ 'Maybe' 'Int'+--+-- * 'lpPartNumberMarker' @::@ 'Maybe' 'Int'+--+-- * 'lpUploadId' @::@ 'Text'+--+listParts :: Text -- ^ 'lpBucket'+          -> Text -- ^ 'lpKey'+          -> Text -- ^ 'lpUploadId'+          -> ListParts+listParts p1 p2 p3 = ListParts+    { _lpBucket           = p1+    , _lpKey              = p2+    , _lpUploadId         = p3+    , _lpMaxParts         = Nothing+    , _lpPartNumberMarker = Nothing+    }++lpBucket :: Lens' ListParts Text+lpBucket = lens _lpBucket (\s a -> s { _lpBucket = a })++lpKey :: Lens' ListParts Text+lpKey = lens _lpKey (\s a -> s { _lpKey = a })++-- | Sets the maximum number of parts to return.+lpMaxParts :: Lens' ListParts (Maybe Int)+lpMaxParts = lens _lpMaxParts (\s a -> s { _lpMaxParts = a })++-- | Specifies the part after which listing should begin. Only parts with+-- higher part numbers will be listed.+lpPartNumberMarker :: Lens' ListParts (Maybe Int)+lpPartNumberMarker =+    lens _lpPartNumberMarker (\s a -> s { _lpPartNumberMarker = a })++-- | Upload ID identifying the multipart upload whose parts are being listed.+lpUploadId :: Lens' ListParts Text+lpUploadId = lens _lpUploadId (\s a -> s { _lpUploadId = a })++data ListPartsResponse = ListPartsResponse+    { _lprBucket               :: Maybe Text+    , _lprInitiator            :: Maybe Initiator+    , _lprIsTruncated          :: Maybe Bool+    , _lprKey                  :: Maybe Text+    , _lprMaxParts             :: Maybe Int+    , _lprNextPartNumberMarker :: Maybe Int+    , _lprOwner                :: Maybe Owner+    , _lprPartNumberMarker     :: Maybe Int+    , _lprParts                :: List "Part" Part+    , _lprStorageClass         :: Maybe Text+    , _lprUploadId             :: Maybe Text+    } deriving (Eq, Show)++-- | 'ListPartsResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'lprBucket' @::@ 'Maybe' 'Text'+--+-- * 'lprInitiator' @::@ 'Maybe' 'Initiator'+--+-- * 'lprIsTruncated' @::@ 'Maybe' 'Bool'+--+-- * 'lprKey' @::@ 'Maybe' 'Text'+--+-- * 'lprMaxParts' @::@ 'Maybe' 'Int'+--+-- * 'lprNextPartNumberMarker' @::@ 'Maybe' 'Int'+--+-- * 'lprOwner' @::@ 'Maybe' 'Owner'+--+-- * 'lprPartNumberMarker' @::@ 'Maybe' 'Int'+--+-- * 'lprParts' @::@ ['Part']+--+-- * 'lprStorageClass' @::@ 'Maybe' 'Text'+--+-- * 'lprUploadId' @::@ 'Maybe' 'Text'+--+listPartsResponse :: [Part] -- ^ 'lprParts'+                  -> ListPartsResponse+listPartsResponse p1 = ListPartsResponse+    { _lprParts                = withIso _List (const id) p1+    , _lprBucket               = Nothing+    , _lprKey                  = Nothing+    , _lprUploadId             = Nothing+    , _lprPartNumberMarker     = Nothing+    , _lprNextPartNumberMarker = Nothing+    , _lprMaxParts             = Nothing+    , _lprIsTruncated          = Nothing+    , _lprInitiator            = Nothing+    , _lprOwner                = Nothing+    , _lprStorageClass         = Nothing+    }++-- | Name of the bucket to which the multipart upload was initiated.+lprBucket :: Lens' ListPartsResponse (Maybe Text)+lprBucket = lens _lprBucket (\s a -> s { _lprBucket = a })++-- | Identifies who initiated the multipart upload.+lprInitiator :: Lens' ListPartsResponse (Maybe Initiator)+lprInitiator = lens _lprInitiator (\s a -> s { _lprInitiator = a })++-- | Indicates whether the returned list of parts is truncated.+lprIsTruncated :: Lens' ListPartsResponse (Maybe Bool)+lprIsTruncated = lens _lprIsTruncated (\s a -> s { _lprIsTruncated = a })++-- | Object key for which the multipart upload was initiated.+lprKey :: Lens' ListPartsResponse (Maybe Text)+lprKey = lens _lprKey (\s a -> s { _lprKey = a })++-- | Maximum number of parts that were allowed in the response.+lprMaxParts :: Lens' ListPartsResponse (Maybe Int)+lprMaxParts = lens _lprMaxParts (\s a -> s { _lprMaxParts = a })++-- | When a list is truncated, this element specifies the last part in the+-- list, as well as the value to use for the part-number-marker request+-- parameter in a subsequent request.+lprNextPartNumberMarker :: Lens' ListPartsResponse (Maybe Int)+lprNextPartNumberMarker =+    lens _lprNextPartNumberMarker (\s a -> s { _lprNextPartNumberMarker = a })++lprOwner :: Lens' ListPartsResponse (Maybe Owner)+lprOwner = lens _lprOwner (\s a -> s { _lprOwner = a })++-- | Part number after which listing begins.+lprPartNumberMarker :: Lens' ListPartsResponse (Maybe Int)+lprPartNumberMarker =+    lens _lprPartNumberMarker (\s a -> s { _lprPartNumberMarker = a })++lprParts :: Lens' ListPartsResponse [Part]+lprParts = lens _lprParts (\s a -> s { _lprParts = a }) . _List++-- | The class of storage used to store the object.+lprStorageClass :: Lens' ListPartsResponse (Maybe Text)+lprStorageClass = lens _lprStorageClass (\s a -> s { _lprStorageClass = a })++-- | Upload ID identifying the multipart upload whose parts are being listed.+lprUploadId :: Lens' ListPartsResponse (Maybe Text)+lprUploadId = lens _lprUploadId (\s a -> s { _lprUploadId = a })++instance ToPath ListParts where+    toPath ListParts{..} = mconcat+        [ "/"+        , toText _lpBucket+        , "/"+        , toText _lpKey+        ]++instance ToQuery ListParts where+    toQuery ListParts{..} = mconcat+        [ "max-parts"          =? _lpMaxParts+        , "part-number-marker" =? _lpPartNumberMarker+        , "uploadId"           =? _lpUploadId+        ]++instance ToHeaders ListParts++instance ToXMLRoot ListParts where+    toXMLRoot = const (namespaced ns "ListParts" [])++instance ToXML ListParts++instance AWSRequest ListParts where+    type Sv ListParts = S3+    type Rs ListParts = ListPartsResponse++    request  = get+    response = xmlResponse++instance FromXML ListPartsResponse where+    parseXML x = ListPartsResponse+        <$> x .@? "Bucket"+        <*> x .@? "Initiator"+        <*> x .@? "IsTruncated"+        <*> x .@? "Key"+        <*> x .@? "MaxParts"+        <*> x .@? "NextPartNumberMarker"+        <*> x .@? "Owner"+        <*> x .@? "PartNumberMarker"+        <*> parseXML x+        <*> x .@? "StorageClass"+        <*> x .@? "UploadId"++instance AWSPager ListParts where+    page rq rs+        | stop (rs ^. lprIsTruncated) = Nothing+        | otherwise = Just $ rq+            & lpPartNumberMarker .~ rs ^. lprNextPartNumberMarker
+ gen/Network/AWS/S3/PutBucketAcl.hs view
@@ -0,0 +1,177 @@+{-# 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.S3.PutBucketAcl+-- Copyright   : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>+-- License     : This Source Code Form is subject to the terms of+--               the Mozilla Public License, v. 2.0.+--               A copy of the MPL can be found in the LICENSE file or+--               you can obtain it at http://mozilla.org/MPL/2.0/.+-- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability   : experimental+-- Portability : non-portable (GHC extensions)++-- | Sets the permissions on a bucket using access control lists (ACL).+--+-- <http://docs.aws.amazon.com/AmazonS3/latest/API/PutBucketAcl.html>+module Network.AWS.S3.PutBucketAcl+    (+    -- * Request+      PutBucketAcl+    -- ** Request constructor+    , putBucketAcl+    -- ** Request lenses+    , pbaACL+    , pbaAccessControlPolicy+    , pbaBucket+    , pbaContentMD5+    , pbaGrantFullControl+    , pbaGrantRead+    , pbaGrantReadACP+    , pbaGrantWrite+    , pbaGrantWriteACP++    -- * Response+    , PutBucketAclResponse+    -- ** Response constructor+    , putBucketAclResponse+    ) where++import Network.AWS.Prelude+import Network.AWS.Request.RestXML+import Network.AWS.S3.Types+import qualified GHC.Exts++data PutBucketAcl = PutBucketAcl+    { _pbaACL                 :: Maybe Text+    , _pbaAccessControlPolicy :: Maybe AccessControlPolicy+    , _pbaBucket              :: Text+    , _pbaContentMD5          :: Maybe Text+    , _pbaGrantFullControl    :: Maybe Text+    , _pbaGrantRead           :: Maybe Text+    , _pbaGrantReadACP        :: Maybe Text+    , _pbaGrantWrite          :: Maybe Text+    , _pbaGrantWriteACP       :: Maybe Text+    } deriving (Eq, Show)++-- | 'PutBucketAcl' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'pbaACL' @::@ 'Maybe' 'Text'+--+-- * 'pbaAccessControlPolicy' @::@ 'Maybe' 'AccessControlPolicy'+--+-- * 'pbaBucket' @::@ 'Text'+--+-- * 'pbaContentMD5' @::@ 'Maybe' 'Text'+--+-- * 'pbaGrantFullControl' @::@ 'Maybe' 'Text'+--+-- * 'pbaGrantRead' @::@ 'Maybe' 'Text'+--+-- * 'pbaGrantReadACP' @::@ 'Maybe' 'Text'+--+-- * 'pbaGrantWrite' @::@ 'Maybe' 'Text'+--+-- * 'pbaGrantWriteACP' @::@ 'Maybe' 'Text'+--+putBucketAcl :: Text -- ^ 'pbaBucket'+             -> PutBucketAcl+putBucketAcl p1 = PutBucketAcl+    { _pbaBucket              = p1+    , _pbaACL                 = Nothing+    , _pbaAccessControlPolicy = Nothing+    , _pbaContentMD5          = Nothing+    , _pbaGrantFullControl    = Nothing+    , _pbaGrantRead           = Nothing+    , _pbaGrantReadACP        = Nothing+    , _pbaGrantWrite          = Nothing+    , _pbaGrantWriteACP       = Nothing+    }++-- | The canned ACL to apply to the bucket.+pbaACL :: Lens' PutBucketAcl (Maybe Text)+pbaACL = lens _pbaACL (\s a -> s { _pbaACL = a })++pbaAccessControlPolicy :: Lens' PutBucketAcl (Maybe AccessControlPolicy)+pbaAccessControlPolicy =+    lens _pbaAccessControlPolicy (\s a -> s { _pbaAccessControlPolicy = a })++pbaBucket :: Lens' PutBucketAcl Text+pbaBucket = lens _pbaBucket (\s a -> s { _pbaBucket = a })++pbaContentMD5 :: Lens' PutBucketAcl (Maybe Text)+pbaContentMD5 = lens _pbaContentMD5 (\s a -> s { _pbaContentMD5 = a })++-- | Allows grantee the read, write, read ACP, and write ACP permissions on+-- the bucket.+pbaGrantFullControl :: Lens' PutBucketAcl (Maybe Text)+pbaGrantFullControl =+    lens _pbaGrantFullControl (\s a -> s { _pbaGrantFullControl = a })++-- | Allows grantee to list the objects in the bucket.+pbaGrantRead :: Lens' PutBucketAcl (Maybe Text)+pbaGrantRead = lens _pbaGrantRead (\s a -> s { _pbaGrantRead = a })++-- | Allows grantee to read the bucket ACL.+pbaGrantReadACP :: Lens' PutBucketAcl (Maybe Text)+pbaGrantReadACP = lens _pbaGrantReadACP (\s a -> s { _pbaGrantReadACP = a })++-- | Allows grantee to create, overwrite, and delete any object in the bucket.+pbaGrantWrite :: Lens' PutBucketAcl (Maybe Text)+pbaGrantWrite = lens _pbaGrantWrite (\s a -> s { _pbaGrantWrite = a })++-- | Allows grantee to write the ACL for the applicable bucket.+pbaGrantWriteACP :: Lens' PutBucketAcl (Maybe Text)+pbaGrantWriteACP = lens _pbaGrantWriteACP (\s a -> s { _pbaGrantWriteACP = a })++data PutBucketAclResponse = PutBucketAclResponse+    deriving (Eq, Ord, Show, Generic)++-- | 'PutBucketAclResponse' constructor.+putBucketAclResponse :: PutBucketAclResponse+putBucketAclResponse = PutBucketAclResponse++instance ToPath PutBucketAcl where+    toPath PutBucketAcl{..} = mconcat+        [ "/"+        , toText _pbaBucket+        ]++instance ToQuery PutBucketAcl where+    toQuery = const "acl"++instance ToHeaders PutBucketAcl where+    toHeaders PutBucketAcl{..} = mconcat+        [ "x-amz-acl"                =: _pbaACL+        , "Content-MD5"              =: _pbaContentMD5+        , "x-amz-grant-full-control" =: _pbaGrantFullControl+        , "x-amz-grant-read"         =: _pbaGrantRead+        , "x-amz-grant-read-acp"     =: _pbaGrantReadACP+        , "x-amz-grant-write"        =: _pbaGrantWrite+        , "x-amz-grant-write-acp"    =: _pbaGrantWriteACP+        ]++instance ToXMLRoot PutBucketAcl where+    toXMLRoot PutBucketAcl{..} = namespaced ns "PutBucketAcl"+        [ "AccessControlPolicy" =@ _pbaAccessControlPolicy+        ]++instance ToXML PutBucketAcl++instance AWSRequest PutBucketAcl where+    type Sv PutBucketAcl = S3+    type Rs PutBucketAcl = PutBucketAclResponse++    request  = put+    response = nullResponse PutBucketAclResponse
+ gen/Network/AWS/S3/PutBucketCors.hs view
@@ -0,0 +1,115 @@+{-# LANGUAGE DataKinds                   #-}+{-# LANGUAGE DeriveGeneric               #-}+{-# LANGUAGE FlexibleInstances           #-}+{-# LANGUAGE GeneralizedNewtypeDeriving  #-}+{-# LANGUAGE LambdaCase                  #-}+{-# LANGUAGE NoImplicitPrelude           #-}+{-# LANGUAGE OverloadedStrings           #-}+{-# LANGUAGE RecordWildCards             #-}+{-# LANGUAGE TypeFamilies                #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Module      : Network.AWS.S3.PutBucketCors+-- Copyright   : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>+-- License     : This Source Code Form is subject to the terms of+--               the Mozilla Public License, v. 2.0.+--               A copy of the MPL can be found in the LICENSE file or+--               you can obtain it at http://mozilla.org/MPL/2.0/.+-- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability   : experimental+-- Portability : non-portable (GHC extensions)++-- | Sets the cors configuration for a bucket.+--+-- <http://docs.aws.amazon.com/AmazonS3/latest/API/PutBucketCors.html>+module Network.AWS.S3.PutBucketCors+    (+    -- * Request+      PutBucketCors+    -- ** Request constructor+    , putBucketCors+    -- ** Request lenses+    , pbcBucket+    , pbcCORSConfiguration+    , pbcContentMD5++    -- * Response+    , PutBucketCorsResponse+    -- ** Response constructor+    , putBucketCorsResponse+    ) where++import Network.AWS.Prelude+import Network.AWS.Request.RestXML+import Network.AWS.S3.Types+import qualified GHC.Exts++data PutBucketCors = PutBucketCors+    { _pbcBucket            :: Text+    , _pbcCORSConfiguration :: Maybe CORSConfiguration+    , _pbcContentMD5        :: Maybe Text+    } deriving (Eq, Show)++-- | 'PutBucketCors' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'pbcBucket' @::@ 'Text'+--+-- * 'pbcCORSConfiguration' @::@ 'Maybe' 'CORSConfiguration'+--+-- * 'pbcContentMD5' @::@ 'Maybe' 'Text'+--+putBucketCors :: Text -- ^ 'pbcBucket'+              -> PutBucketCors+putBucketCors p1 = PutBucketCors+    { _pbcBucket            = p1+    , _pbcCORSConfiguration = Nothing+    , _pbcContentMD5        = Nothing+    }++pbcBucket :: Lens' PutBucketCors Text+pbcBucket = lens _pbcBucket (\s a -> s { _pbcBucket = a })++pbcCORSConfiguration :: Lens' PutBucketCors (Maybe CORSConfiguration)+pbcCORSConfiguration =+    lens _pbcCORSConfiguration (\s a -> s { _pbcCORSConfiguration = a })++pbcContentMD5 :: Lens' PutBucketCors (Maybe Text)+pbcContentMD5 = lens _pbcContentMD5 (\s a -> s { _pbcContentMD5 = a })++data PutBucketCorsResponse = PutBucketCorsResponse+    deriving (Eq, Ord, Show, Generic)++-- | 'PutBucketCorsResponse' constructor.+putBucketCorsResponse :: PutBucketCorsResponse+putBucketCorsResponse = PutBucketCorsResponse++instance ToPath PutBucketCors where+    toPath PutBucketCors{..} = mconcat+        [ "/"+        , toText _pbcBucket+        ]++instance ToQuery PutBucketCors where+    toQuery = const "cors"++instance ToHeaders PutBucketCors where+    toHeaders PutBucketCors{..} = mconcat+        [ "Content-MD5" =: _pbcContentMD5+        ]++instance ToXMLRoot PutBucketCors where+    toXMLRoot PutBucketCors{..} = namespaced ns "PutBucketCors"+        [ "CORSConfiguration" =@ _pbcCORSConfiguration+        ]++instance ToXML PutBucketCors++instance AWSRequest PutBucketCors where+    type Sv PutBucketCors = S3+    type Rs PutBucketCors = PutBucketCorsResponse++    request  = put+    response = nullResponse PutBucketCorsResponse
+ gen/Network/AWS/S3/PutBucketLifecycle.hs view
@@ -0,0 +1,117 @@+{-# 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.S3.PutBucketLifecycle+-- Copyright   : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>+-- License     : This Source Code Form is subject to the terms of+--               the Mozilla Public License, v. 2.0.+--               A copy of the MPL can be found in the LICENSE file or+--               you can obtain it at http://mozilla.org/MPL/2.0/.+-- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability   : experimental+-- Portability : non-portable (GHC extensions)++-- | Sets lifecycle configuration for your bucket. If a lifecycle configuration+-- exists, it replaces it.+--+-- <http://docs.aws.amazon.com/AmazonS3/latest/API/PutBucketLifecycle.html>+module Network.AWS.S3.PutBucketLifecycle+    (+    -- * Request+      PutBucketLifecycle+    -- ** Request constructor+    , putBucketLifecycle+    -- ** Request lenses+    , pbl1Bucket+    , pbl1ContentMD5+    , pbl1LifecycleConfiguration++    -- * Response+    , PutBucketLifecycleResponse+    -- ** Response constructor+    , putBucketLifecycleResponse+    ) where++import Network.AWS.Prelude+import Network.AWS.Request.RestXML+import Network.AWS.S3.Types+import qualified GHC.Exts++data PutBucketLifecycle = PutBucketLifecycle+    { _pbl1Bucket                 :: Text+    , _pbl1ContentMD5             :: Maybe Text+    , _pbl1LifecycleConfiguration :: Maybe LifecycleConfiguration+    } deriving (Eq, Show)++-- | 'PutBucketLifecycle' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'pbl1Bucket' @::@ 'Text'+--+-- * 'pbl1ContentMD5' @::@ 'Maybe' 'Text'+--+-- * 'pbl1LifecycleConfiguration' @::@ 'Maybe' 'LifecycleConfiguration'+--+putBucketLifecycle :: Text -- ^ 'pbl1Bucket'+                   -> PutBucketLifecycle+putBucketLifecycle p1 = PutBucketLifecycle+    { _pbl1Bucket                 = p1+    , _pbl1ContentMD5             = Nothing+    , _pbl1LifecycleConfiguration = Nothing+    }++pbl1Bucket :: Lens' PutBucketLifecycle Text+pbl1Bucket = lens _pbl1Bucket (\s a -> s { _pbl1Bucket = a })++pbl1ContentMD5 :: Lens' PutBucketLifecycle (Maybe Text)+pbl1ContentMD5 = lens _pbl1ContentMD5 (\s a -> s { _pbl1ContentMD5 = a })++pbl1LifecycleConfiguration :: Lens' PutBucketLifecycle (Maybe LifecycleConfiguration)+pbl1LifecycleConfiguration =+    lens _pbl1LifecycleConfiguration+        (\s a -> s { _pbl1LifecycleConfiguration = a })++data PutBucketLifecycleResponse = PutBucketLifecycleResponse+    deriving (Eq, Ord, Show, Generic)++-- | 'PutBucketLifecycleResponse' constructor.+putBucketLifecycleResponse :: PutBucketLifecycleResponse+putBucketLifecycleResponse = PutBucketLifecycleResponse++instance ToPath PutBucketLifecycle where+    toPath PutBucketLifecycle{..} = mconcat+        [ "/"+        , toText _pbl1Bucket+        ]++instance ToQuery PutBucketLifecycle where+    toQuery = const "lifecycle"++instance ToHeaders PutBucketLifecycle where+    toHeaders PutBucketLifecycle{..} = mconcat+        [ "Content-MD5" =: _pbl1ContentMD5+        ]++instance ToXMLRoot PutBucketLifecycle where+    toXMLRoot PutBucketLifecycle{..} = namespaced ns "PutBucketLifecycle"+        [ "LifecycleConfiguration" =@ _pbl1LifecycleConfiguration+        ]++instance ToXML PutBucketLifecycle++instance AWSRequest PutBucketLifecycle where+    type Sv PutBucketLifecycle = S3+    type Rs PutBucketLifecycle = PutBucketLifecycleResponse++    request  = put+    response = nullResponse PutBucketLifecycleResponse
+ gen/Network/AWS/S3/PutBucketLogging.hs view
@@ -0,0 +1,118 @@+{-# 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.S3.PutBucketLogging+-- 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)++-- | Set the logging parameters for a bucket and to specify permissions for who+-- can view and modify the logging parameters. To set the logging status of a+-- bucket, you must be the bucket owner.+--+-- <http://docs.aws.amazon.com/AmazonS3/latest/API/PutBucketLogging.html>+module Network.AWS.S3.PutBucketLogging+    (+    -- * Request+      PutBucketLogging+    -- ** Request constructor+    , putBucketLogging+    -- ** Request lenses+    , pblBucket+    , pblBucketLoggingStatus+    , pblContentMD5++    -- * Response+    , PutBucketLoggingResponse+    -- ** Response constructor+    , putBucketLoggingResponse+    ) where++import Network.AWS.Prelude+import Network.AWS.Request.RestXML+import Network.AWS.S3.Types+import qualified GHC.Exts++data PutBucketLogging = PutBucketLogging+    { _pblBucket              :: Text+    , _pblBucketLoggingStatus :: BucketLoggingStatus+    , _pblContentMD5          :: Maybe Text+    } deriving (Eq, Show)++-- | 'PutBucketLogging' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'pblBucket' @::@ 'Text'+--+-- * 'pblBucketLoggingStatus' @::@ 'BucketLoggingStatus'+--+-- * 'pblContentMD5' @::@ 'Maybe' 'Text'+--+putBucketLogging :: Text -- ^ 'pblBucket'+                 -> BucketLoggingStatus -- ^ 'pblBucketLoggingStatus'+                 -> PutBucketLogging+putBucketLogging p1 p2 = PutBucketLogging+    { _pblBucket              = p1+    , _pblBucketLoggingStatus = p2+    , _pblContentMD5          = Nothing+    }++pblBucket :: Lens' PutBucketLogging Text+pblBucket = lens _pblBucket (\s a -> s { _pblBucket = a })++pblBucketLoggingStatus :: Lens' PutBucketLogging BucketLoggingStatus+pblBucketLoggingStatus =+    lens _pblBucketLoggingStatus (\s a -> s { _pblBucketLoggingStatus = a })++pblContentMD5 :: Lens' PutBucketLogging (Maybe Text)+pblContentMD5 = lens _pblContentMD5 (\s a -> s { _pblContentMD5 = a })++data PutBucketLoggingResponse = PutBucketLoggingResponse+    deriving (Eq, Ord, Show, Generic)++-- | 'PutBucketLoggingResponse' constructor.+putBucketLoggingResponse :: PutBucketLoggingResponse+putBucketLoggingResponse = PutBucketLoggingResponse++instance ToPath PutBucketLogging where+    toPath PutBucketLogging{..} = mconcat+        [ "/"+        , toText _pblBucket+        ]++instance ToQuery PutBucketLogging where+    toQuery = const "logging"++instance ToHeaders PutBucketLogging where+    toHeaders PutBucketLogging{..} = mconcat+        [ "Content-MD5" =: _pblContentMD5+        ]++instance ToXMLRoot PutBucketLogging where+    toXMLRoot PutBucketLogging{..} = namespaced ns "PutBucketLogging"+        [ "BucketLoggingStatus" =@ _pblBucketLoggingStatus+        ]++instance ToXML PutBucketLogging++instance AWSRequest PutBucketLogging where+    type Sv PutBucketLogging = S3+    type Rs PutBucketLogging = PutBucketLoggingResponse++    request  = put+    response = nullResponse PutBucketLoggingResponse
+ gen/Network/AWS/S3/PutBucketNotification.hs view
@@ -0,0 +1,117 @@+{-# 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.S3.PutBucketNotification+-- 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)++-- | Enables notifications of specified events for a bucket.+--+-- <http://docs.aws.amazon.com/AmazonS3/latest/API/PutBucketNotification.html>+module Network.AWS.S3.PutBucketNotification+    (+    -- * Request+      PutBucketNotification+    -- ** Request constructor+    , putBucketNotification+    -- ** Request lenses+    , pbnBucket+    , pbnContentMD5+    , pbnNotificationConfiguration++    -- * Response+    , PutBucketNotificationResponse+    -- ** Response constructor+    , putBucketNotificationResponse+    ) where++import Network.AWS.Prelude+import Network.AWS.Request.RestXML+import Network.AWS.S3.Types+import qualified GHC.Exts++data PutBucketNotification = PutBucketNotification+    { _pbnBucket                    :: Text+    , _pbnContentMD5                :: Maybe Text+    , _pbnNotificationConfiguration :: NotificationConfiguration+    } deriving (Eq, Show)++-- | 'PutBucketNotification' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'pbnBucket' @::@ 'Text'+--+-- * 'pbnContentMD5' @::@ 'Maybe' 'Text'+--+-- * 'pbnNotificationConfiguration' @::@ 'NotificationConfiguration'+--+putBucketNotification :: Text -- ^ 'pbnBucket'+                      -> NotificationConfiguration -- ^ 'pbnNotificationConfiguration'+                      -> PutBucketNotification+putBucketNotification p1 p2 = PutBucketNotification+    { _pbnBucket                    = p1+    , _pbnNotificationConfiguration = p2+    , _pbnContentMD5                = Nothing+    }++pbnBucket :: Lens' PutBucketNotification Text+pbnBucket = lens _pbnBucket (\s a -> s { _pbnBucket = a })++pbnContentMD5 :: Lens' PutBucketNotification (Maybe Text)+pbnContentMD5 = lens _pbnContentMD5 (\s a -> s { _pbnContentMD5 = a })++pbnNotificationConfiguration :: Lens' PutBucketNotification NotificationConfiguration+pbnNotificationConfiguration =+    lens _pbnNotificationConfiguration+        (\s a -> s { _pbnNotificationConfiguration = a })++data PutBucketNotificationResponse = PutBucketNotificationResponse+    deriving (Eq, Ord, Show, Generic)++-- | 'PutBucketNotificationResponse' constructor.+putBucketNotificationResponse :: PutBucketNotificationResponse+putBucketNotificationResponse = PutBucketNotificationResponse++instance ToPath PutBucketNotification where+    toPath PutBucketNotification{..} = mconcat+        [ "/"+        , toText _pbnBucket+        ]++instance ToQuery PutBucketNotification where+    toQuery = const "notification"++instance ToHeaders PutBucketNotification where+    toHeaders PutBucketNotification{..} = mconcat+        [ "Content-MD5" =: _pbnContentMD5+        ]++instance ToXMLRoot PutBucketNotification where+    toXMLRoot PutBucketNotification{..} = namespaced ns "PutBucketNotification"+        [ "NotificationConfiguration" =@ _pbnNotificationConfiguration+        ]++instance ToXML PutBucketNotification++instance AWSRequest PutBucketNotification where+    type Sv PutBucketNotification = S3+    type Rs PutBucketNotification = PutBucketNotificationResponse++    request  = put+    response = nullResponse PutBucketNotificationResponse
+ gen/Network/AWS/S3/PutBucketPolicy.hs view
@@ -0,0 +1,117 @@+{-# 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.S3.PutBucketPolicy+-- 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)++-- | Replaces a policy on a bucket. If the bucket already has a policy, the one+-- in this request completely replaces it.+--+-- <http://docs.aws.amazon.com/AmazonS3/latest/API/PutBucketPolicy.html>+module Network.AWS.S3.PutBucketPolicy+    (+    -- * Request+      PutBucketPolicy+    -- ** Request constructor+    , putBucketPolicy+    -- ** Request lenses+    , pbpBucket+    , pbpContentMD5+    , pbpPolicy++    -- * Response+    , PutBucketPolicyResponse+    -- ** Response constructor+    , putBucketPolicyResponse+    ) where++import Network.AWS.Prelude+import Network.AWS.Request.RestXML+import Network.AWS.S3.Types+import qualified GHC.Exts++data PutBucketPolicy = PutBucketPolicy+    { _pbpBucket     :: Text+    , _pbpContentMD5 :: Maybe Text+    , _pbpPolicy     :: Text+    } deriving (Eq, Ord, Show)++-- | 'PutBucketPolicy' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'pbpBucket' @::@ 'Text'+--+-- * 'pbpContentMD5' @::@ 'Maybe' 'Text'+--+-- * 'pbpPolicy' @::@ 'Text'+--+putBucketPolicy :: Text -- ^ 'pbpBucket'+                -> Text -- ^ 'pbpPolicy'+                -> PutBucketPolicy+putBucketPolicy p1 p2 = PutBucketPolicy+    { _pbpBucket     = p1+    , _pbpPolicy     = p2+    , _pbpContentMD5 = Nothing+    }++pbpBucket :: Lens' PutBucketPolicy Text+pbpBucket = lens _pbpBucket (\s a -> s { _pbpBucket = a })++pbpContentMD5 :: Lens' PutBucketPolicy (Maybe Text)+pbpContentMD5 = lens _pbpContentMD5 (\s a -> s { _pbpContentMD5 = a })++-- | The bucket policy as a JSON document.+pbpPolicy :: Lens' PutBucketPolicy Text+pbpPolicy = lens _pbpPolicy (\s a -> s { _pbpPolicy = a })++data PutBucketPolicyResponse = PutBucketPolicyResponse+    deriving (Eq, Ord, Show, Generic)++-- | 'PutBucketPolicyResponse' constructor.+putBucketPolicyResponse :: PutBucketPolicyResponse+putBucketPolicyResponse = PutBucketPolicyResponse++instance ToPath PutBucketPolicy where+    toPath PutBucketPolicy{..} = mconcat+        [ "/"+        , toText _pbpBucket+        ]++instance ToQuery PutBucketPolicy where+    toQuery = const "policy"++instance ToHeaders PutBucketPolicy where+    toHeaders PutBucketPolicy{..} = mconcat+        [ "Content-MD5" =: _pbpContentMD5+        ]++instance ToXMLRoot PutBucketPolicy where+    toXMLRoot PutBucketPolicy{..} = namespaced ns "PutBucketPolicy"+        [ "Policy" =@ _pbpPolicy+        ]++instance ToXML PutBucketPolicy++instance AWSRequest PutBucketPolicy where+    type Sv PutBucketPolicy = S3+    type Rs PutBucketPolicy = PutBucketPolicyResponse++    request  = put+    response = nullResponse PutBucketPolicyResponse
+ gen/Network/AWS/S3/PutBucketRequestPayment.hs view
@@ -0,0 +1,120 @@+{-# 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.S3.PutBucketRequestPayment+-- Copyright   : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>+-- License     : This Source Code Form is subject to the terms of+--               the Mozilla Public License, v. 2.0.+--               A copy of the MPL can be found in the LICENSE file or+--               you can obtain it at http://mozilla.org/MPL/2.0/.+-- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability   : experimental+-- Portability : non-portable (GHC extensions)++-- | Sets the request payment configuration for a bucket. By default, the bucket+-- owner pays for downloads from the bucket. This configuration parameter+-- enables the bucket owner (only) to specify that the person requesting the+-- download will be charged for the download.+--+-- <http://docs.aws.amazon.com/AmazonS3/latest/API/PutBucketRequestPayment.html>+module Network.AWS.S3.PutBucketRequestPayment+    (+    -- * Request+      PutBucketRequestPayment+    -- ** Request constructor+    , putBucketRequestPayment+    -- ** Request lenses+    , pbrpBucket+    , pbrpContentMD5+    , pbrpRequestPaymentConfiguration++    -- * Response+    , PutBucketRequestPaymentResponse+    -- ** Response constructor+    , putBucketRequestPaymentResponse+    ) where++import Network.AWS.Prelude+import Network.AWS.Request.RestXML+import Network.AWS.S3.Types+import qualified GHC.Exts++data PutBucketRequestPayment = PutBucketRequestPayment+    { _pbrpBucket                      :: Text+    , _pbrpContentMD5                  :: Maybe Text+    , _pbrpRequestPaymentConfiguration :: RequestPaymentConfiguration+    } deriving (Eq, Show)++-- | 'PutBucketRequestPayment' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'pbrpBucket' @::@ 'Text'+--+-- * 'pbrpContentMD5' @::@ 'Maybe' 'Text'+--+-- * 'pbrpRequestPaymentConfiguration' @::@ 'RequestPaymentConfiguration'+--+putBucketRequestPayment :: Text -- ^ 'pbrpBucket'+                        -> RequestPaymentConfiguration -- ^ 'pbrpRequestPaymentConfiguration'+                        -> PutBucketRequestPayment+putBucketRequestPayment p1 p2 = PutBucketRequestPayment+    { _pbrpBucket                      = p1+    , _pbrpRequestPaymentConfiguration = p2+    , _pbrpContentMD5                  = Nothing+    }++pbrpBucket :: Lens' PutBucketRequestPayment Text+pbrpBucket = lens _pbrpBucket (\s a -> s { _pbrpBucket = a })++pbrpContentMD5 :: Lens' PutBucketRequestPayment (Maybe Text)+pbrpContentMD5 = lens _pbrpContentMD5 (\s a -> s { _pbrpContentMD5 = a })++pbrpRequestPaymentConfiguration :: Lens' PutBucketRequestPayment RequestPaymentConfiguration+pbrpRequestPaymentConfiguration =+    lens _pbrpRequestPaymentConfiguration+        (\s a -> s { _pbrpRequestPaymentConfiguration = a })++data PutBucketRequestPaymentResponse = PutBucketRequestPaymentResponse+    deriving (Eq, Ord, Show, Generic)++-- | 'PutBucketRequestPaymentResponse' constructor.+putBucketRequestPaymentResponse :: PutBucketRequestPaymentResponse+putBucketRequestPaymentResponse = PutBucketRequestPaymentResponse++instance ToPath PutBucketRequestPayment where+    toPath PutBucketRequestPayment{..} = mconcat+        [ "/"+        , toText _pbrpBucket+        ]++instance ToQuery PutBucketRequestPayment where+    toQuery = const "requestPayment"++instance ToHeaders PutBucketRequestPayment where+    toHeaders PutBucketRequestPayment{..} = mconcat+        [ "Content-MD5" =: _pbrpContentMD5+        ]++instance ToXMLRoot PutBucketRequestPayment where+    toXMLRoot PutBucketRequestPayment{..} = namespaced ns "PutBucketRequestPayment"+        [ "RequestPaymentConfiguration" =@ _pbrpRequestPaymentConfiguration+        ]++instance ToXML PutBucketRequestPayment++instance AWSRequest PutBucketRequestPayment where+    type Sv PutBucketRequestPayment = S3+    type Rs PutBucketRequestPayment = PutBucketRequestPaymentResponse++    request  = put+    response = nullResponse PutBucketRequestPaymentResponse
+ gen/Network/AWS/S3/PutBucketTagging.hs view
@@ -0,0 +1,115 @@+{-# LANGUAGE DataKinds                   #-}+{-# LANGUAGE DeriveGeneric               #-}+{-# LANGUAGE FlexibleInstances           #-}+{-# LANGUAGE GeneralizedNewtypeDeriving  #-}+{-# LANGUAGE LambdaCase                  #-}+{-# LANGUAGE NoImplicitPrelude           #-}+{-# LANGUAGE OverloadedStrings           #-}+{-# LANGUAGE RecordWildCards             #-}+{-# LANGUAGE TypeFamilies                #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Module      : Network.AWS.S3.PutBucketTagging+-- Copyright   : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>+-- License     : This Source Code Form is subject to the terms of+--               the Mozilla Public License, v. 2.0.+--               A copy of the MPL can be found in the LICENSE file or+--               you can obtain it at http://mozilla.org/MPL/2.0/.+-- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability   : experimental+-- Portability : non-portable (GHC extensions)++-- | Sets the tags for a bucket.+--+-- <http://docs.aws.amazon.com/AmazonS3/latest/API/PutBucketTagging.html>+module Network.AWS.S3.PutBucketTagging+    (+    -- * Request+      PutBucketTagging+    -- ** Request constructor+    , putBucketTagging+    -- ** Request lenses+    , pbtBucket+    , pbtContentMD5+    , pbtTagging++    -- * Response+    , PutBucketTaggingResponse+    -- ** Response constructor+    , putBucketTaggingResponse+    ) where++import Network.AWS.Prelude+import Network.AWS.Request.RestXML+import Network.AWS.S3.Types+import qualified GHC.Exts++data PutBucketTagging = PutBucketTagging+    { _pbtBucket     :: Text+    , _pbtContentMD5 :: Maybe Text+    , _pbtTagging    :: Tagging+    } deriving (Eq, Show)++-- | 'PutBucketTagging' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'pbtBucket' @::@ 'Text'+--+-- * 'pbtContentMD5' @::@ 'Maybe' 'Text'+--+-- * 'pbtTagging' @::@ 'Tagging'+--+putBucketTagging :: Text -- ^ 'pbtBucket'+                 -> Tagging -- ^ 'pbtTagging'+                 -> PutBucketTagging+putBucketTagging p1 p2 = PutBucketTagging+    { _pbtBucket     = p1+    , _pbtTagging    = p2+    , _pbtContentMD5 = Nothing+    }++pbtBucket :: Lens' PutBucketTagging Text+pbtBucket = lens _pbtBucket (\s a -> s { _pbtBucket = a })++pbtContentMD5 :: Lens' PutBucketTagging (Maybe Text)+pbtContentMD5 = lens _pbtContentMD5 (\s a -> s { _pbtContentMD5 = a })++pbtTagging :: Lens' PutBucketTagging Tagging+pbtTagging = lens _pbtTagging (\s a -> s { _pbtTagging = a })++data PutBucketTaggingResponse = PutBucketTaggingResponse+    deriving (Eq, Ord, Show, Generic)++-- | 'PutBucketTaggingResponse' constructor.+putBucketTaggingResponse :: PutBucketTaggingResponse+putBucketTaggingResponse = PutBucketTaggingResponse++instance ToPath PutBucketTagging where+    toPath PutBucketTagging{..} = mconcat+        [ "/"+        , toText _pbtBucket+        ]++instance ToQuery PutBucketTagging where+    toQuery = const "tagging"++instance ToHeaders PutBucketTagging where+    toHeaders PutBucketTagging{..} = mconcat+        [ "Content-MD5" =: _pbtContentMD5+        ]++instance ToXMLRoot PutBucketTagging where+    toXMLRoot PutBucketTagging{..} = namespaced ns "PutBucketTagging"+        [ "Tagging" =@ _pbtTagging+        ]++instance ToXML PutBucketTagging++instance AWSRequest PutBucketTagging where+    type Sv PutBucketTagging = S3+    type Rs PutBucketTagging = PutBucketTaggingResponse++    request  = put+    response = nullResponse PutBucketTaggingResponse
+ gen/Network/AWS/S3/PutBucketVersioning.hs view
@@ -0,0 +1,129 @@+{-# LANGUAGE DataKinds                   #-}+{-# LANGUAGE DeriveGeneric               #-}+{-# LANGUAGE FlexibleInstances           #-}+{-# LANGUAGE GeneralizedNewtypeDeriving  #-}+{-# LANGUAGE LambdaCase                  #-}+{-# LANGUAGE NoImplicitPrelude           #-}+{-# LANGUAGE OverloadedStrings           #-}+{-# LANGUAGE RecordWildCards             #-}+{-# LANGUAGE TypeFamilies                #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Module      : Network.AWS.S3.PutBucketVersioning+-- Copyright   : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>+-- License     : This Source Code Form is subject to the terms of+--               the Mozilla Public License, v. 2.0.+--               A copy of the MPL can be found in the LICENSE file or+--               you can obtain it at http://mozilla.org/MPL/2.0/.+-- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability   : experimental+-- Portability : non-portable (GHC extensions)++-- | Sets the versioning state of an existing bucket. To set the versioning+-- state, you must be the bucket owner.+--+-- <http://docs.aws.amazon.com/AmazonS3/latest/API/PutBucketVersioning.html>+module Network.AWS.S3.PutBucketVersioning+    (+    -- * Request+      PutBucketVersioning+    -- ** Request constructor+    , putBucketVersioning+    -- ** Request lenses+    , pbvBucket+    , pbvContentMD5+    , pbvMFA+    , pbvVersioningConfiguration++    -- * Response+    , PutBucketVersioningResponse+    -- ** Response constructor+    , putBucketVersioningResponse+    ) where++import Network.AWS.Prelude+import Network.AWS.Request.RestXML+import Network.AWS.S3.Types+import qualified GHC.Exts++data PutBucketVersioning = PutBucketVersioning+    { _pbvBucket                  :: Text+    , _pbvContentMD5              :: Maybe Text+    , _pbvMFA                     :: Maybe Text+    , _pbvVersioningConfiguration :: VersioningConfiguration+    } deriving (Eq, Show)++-- | 'PutBucketVersioning' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'pbvBucket' @::@ 'Text'+--+-- * 'pbvContentMD5' @::@ 'Maybe' 'Text'+--+-- * 'pbvMFA' @::@ 'Maybe' 'Text'+--+-- * 'pbvVersioningConfiguration' @::@ 'VersioningConfiguration'+--+putBucketVersioning :: Text -- ^ 'pbvBucket'+                    -> VersioningConfiguration -- ^ 'pbvVersioningConfiguration'+                    -> PutBucketVersioning+putBucketVersioning p1 p2 = PutBucketVersioning+    { _pbvBucket                  = p1+    , _pbvVersioningConfiguration = p2+    , _pbvContentMD5              = Nothing+    , _pbvMFA                     = Nothing+    }++pbvBucket :: Lens' PutBucketVersioning Text+pbvBucket = lens _pbvBucket (\s a -> s { _pbvBucket = a })++pbvContentMD5 :: Lens' PutBucketVersioning (Maybe Text)+pbvContentMD5 = lens _pbvContentMD5 (\s a -> s { _pbvContentMD5 = a })++-- | The concatenation of the authentication device's serial number, a space,+-- and the value that is displayed on your authentication device.+pbvMFA :: Lens' PutBucketVersioning (Maybe Text)+pbvMFA = lens _pbvMFA (\s a -> s { _pbvMFA = a })++pbvVersioningConfiguration :: Lens' PutBucketVersioning VersioningConfiguration+pbvVersioningConfiguration =+    lens _pbvVersioningConfiguration+        (\s a -> s { _pbvVersioningConfiguration = a })++data PutBucketVersioningResponse = PutBucketVersioningResponse+    deriving (Eq, Ord, Show, Generic)++-- | 'PutBucketVersioningResponse' constructor.+putBucketVersioningResponse :: PutBucketVersioningResponse+putBucketVersioningResponse = PutBucketVersioningResponse++instance ToPath PutBucketVersioning where+    toPath PutBucketVersioning{..} = mconcat+        [ "/"+        , toText _pbvBucket+        ]++instance ToQuery PutBucketVersioning where+    toQuery = const "versioning"++instance ToHeaders PutBucketVersioning where+    toHeaders PutBucketVersioning{..} = mconcat+        [ "Content-MD5" =: _pbvContentMD5+        , "x-amz-mfa"   =: _pbvMFA+        ]++instance ToXMLRoot PutBucketVersioning where+    toXMLRoot PutBucketVersioning{..} = namespaced ns "PutBucketVersioning"+        [ "VersioningConfiguration" =@ _pbvVersioningConfiguration+        ]++instance ToXML PutBucketVersioning++instance AWSRequest PutBucketVersioning where+    type Sv PutBucketVersioning = S3+    type Rs PutBucketVersioning = PutBucketVersioningResponse++    request  = put+    response = nullResponse PutBucketVersioningResponse
+ gen/Network/AWS/S3/PutBucketWebsite.hs view
@@ -0,0 +1,116 @@+{-# 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.S3.PutBucketWebsite+-- 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)++-- | Set the website configuration for a bucket.+--+-- <http://docs.aws.amazon.com/AmazonS3/latest/API/PutBucketWebsite.html>+module Network.AWS.S3.PutBucketWebsite+    (+    -- * Request+      PutBucketWebsite+    -- ** Request constructor+    , putBucketWebsite+    -- ** Request lenses+    , pbwBucket+    , pbwContentMD5+    , pbwWebsiteConfiguration++    -- * Response+    , PutBucketWebsiteResponse+    -- ** Response constructor+    , putBucketWebsiteResponse+    ) where++import Network.AWS.Prelude+import Network.AWS.Request.RestXML+import Network.AWS.S3.Types+import qualified GHC.Exts++data PutBucketWebsite = PutBucketWebsite+    { _pbwBucket               :: Text+    , _pbwContentMD5           :: Maybe Text+    , _pbwWebsiteConfiguration :: WebsiteConfiguration+    } deriving (Eq, Show)++-- | 'PutBucketWebsite' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'pbwBucket' @::@ 'Text'+--+-- * 'pbwContentMD5' @::@ 'Maybe' 'Text'+--+-- * 'pbwWebsiteConfiguration' @::@ 'WebsiteConfiguration'+--+putBucketWebsite :: Text -- ^ 'pbwBucket'+                 -> WebsiteConfiguration -- ^ 'pbwWebsiteConfiguration'+                 -> PutBucketWebsite+putBucketWebsite p1 p2 = PutBucketWebsite+    { _pbwBucket               = p1+    , _pbwWebsiteConfiguration = p2+    , _pbwContentMD5           = Nothing+    }++pbwBucket :: Lens' PutBucketWebsite Text+pbwBucket = lens _pbwBucket (\s a -> s { _pbwBucket = a })++pbwContentMD5 :: Lens' PutBucketWebsite (Maybe Text)+pbwContentMD5 = lens _pbwContentMD5 (\s a -> s { _pbwContentMD5 = a })++pbwWebsiteConfiguration :: Lens' PutBucketWebsite WebsiteConfiguration+pbwWebsiteConfiguration =+    lens _pbwWebsiteConfiguration (\s a -> s { _pbwWebsiteConfiguration = a })++data PutBucketWebsiteResponse = PutBucketWebsiteResponse+    deriving (Eq, Ord, Show, Generic)++-- | 'PutBucketWebsiteResponse' constructor.+putBucketWebsiteResponse :: PutBucketWebsiteResponse+putBucketWebsiteResponse = PutBucketWebsiteResponse++instance ToPath PutBucketWebsite where+    toPath PutBucketWebsite{..} = mconcat+        [ "/"+        , toText _pbwBucket+        ]++instance ToQuery PutBucketWebsite where+    toQuery = const "website"++instance ToHeaders PutBucketWebsite where+    toHeaders PutBucketWebsite{..} = mconcat+        [ "Content-MD5" =: _pbwContentMD5+        ]++instance ToXMLRoot PutBucketWebsite where+    toXMLRoot PutBucketWebsite{..} = namespaced ns "PutBucketWebsite"+        [ "WebsiteConfiguration" =@ _pbwWebsiteConfiguration+        ]++instance ToXML PutBucketWebsite++instance AWSRequest PutBucketWebsite where+    type Sv PutBucketWebsite = S3+    type Rs PutBucketWebsite = PutBucketWebsiteResponse++    request  = put+    response = nullResponse PutBucketWebsiteResponse
+ gen/Network/AWS/S3/PutObject.hs view
@@ -0,0 +1,431 @@+{-# 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.S3.PutObject+-- 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)++-- | Adds an object to a bucket.+--+-- <http://docs.aws.amazon.com/AmazonS3/latest/API/PutObject.html>+module Network.AWS.S3.PutObject+    (+    -- * Request+      PutObject+    -- ** Request constructor+    , putObject+    -- ** Request lenses+    , poACL+    , poBody+    , poBucket+    , poCacheControl+    , poContentDisposition+    , poContentEncoding+    , poContentLanguage+    , poContentLength+    , poContentMD5+    , poContentType+    , poExpires+    , poGrantFullControl+    , poGrantRead+    , poGrantReadACP+    , poGrantWriteACP+    , poKey+    , poMetadata+    , poSSECustomerAlgorithm+    , poSSECustomerKey+    , poSSECustomerKeyMD5+    , poSSEKMSKeyId+    , poServerSideEncryption+    , poStorageClass+    , poWebsiteRedirectLocation++    -- * Response+    , PutObjectResponse+    -- ** Response constructor+    , putObjectResponse+    -- ** Response lenses+    , porETag+    , porExpiration+    , porSSECustomerAlgorithm+    , porSSECustomerKeyMD5+    , porSSEKMSKeyId+    , porServerSideEncryption+    , porVersionId+    ) where++import Network.AWS.Prelude+import Network.AWS.Request.RestXML+import Network.AWS.S3.Types+import qualified GHC.Exts++data PutObject = PutObject+    { _poACL                     :: Maybe Text+    , _poBody                    :: RqBody+    , _poBucket                  :: Text+    , _poCacheControl            :: Maybe Text+    , _poContentDisposition      :: Maybe Text+    , _poContentEncoding         :: Maybe Text+    , _poContentLanguage         :: Maybe Text+    , _poContentLength           :: Maybe Int+    , _poContentMD5              :: Maybe Text+    , _poContentType             :: Maybe Text+    , _poExpires                 :: Maybe RFC822+    , _poGrantFullControl        :: Maybe Text+    , _poGrantRead               :: Maybe Text+    , _poGrantReadACP            :: Maybe Text+    , _poGrantWriteACP           :: Maybe Text+    , _poKey                     :: Text+    , _poMetadata                :: Map (CI Text) Text+    , _poSSECustomerAlgorithm    :: Maybe Text+    , _poSSECustomerKey          :: Maybe (Sensitive Text)+    , _poSSECustomerKeyMD5       :: Maybe Text+    , _poSSEKMSKeyId             :: Maybe (Sensitive Text)+    , _poServerSideEncryption    :: Maybe Text+    , _poStorageClass            :: Maybe Text+    , _poWebsiteRedirectLocation :: Maybe Text+    } deriving (Show)++-- | 'PutObject' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'poACL' @::@ 'Maybe' 'Text'+--+-- * 'poBody' @::@ 'RqBody'+--+-- * 'poBucket' @::@ 'Text'+--+-- * 'poCacheControl' @::@ 'Maybe' 'Text'+--+-- * 'poContentDisposition' @::@ 'Maybe' 'Text'+--+-- * 'poContentEncoding' @::@ 'Maybe' 'Text'+--+-- * 'poContentLanguage' @::@ 'Maybe' 'Text'+--+-- * 'poContentLength' @::@ 'Maybe' 'Int'+--+-- * 'poContentMD5' @::@ 'Maybe' 'Text'+--+-- * 'poContentType' @::@ 'Maybe' 'Text'+--+-- * 'poExpires' @::@ 'Maybe' 'UTCTime'+--+-- * 'poGrantFullControl' @::@ 'Maybe' 'Text'+--+-- * 'poGrantRead' @::@ 'Maybe' 'Text'+--+-- * 'poGrantReadACP' @::@ 'Maybe' 'Text'+--+-- * 'poGrantWriteACP' @::@ 'Maybe' 'Text'+--+-- * 'poKey' @::@ 'Text'+--+-- * 'poMetadata' @::@ 'HashMap' ('CI' 'Text') 'Text'+--+-- * 'poSSECustomerAlgorithm' @::@ 'Maybe' 'Text'+--+-- * 'poSSECustomerKey' @::@ 'Maybe' 'Text'+--+-- * 'poSSECustomerKeyMD5' @::@ 'Maybe' 'Text'+--+-- * 'poSSEKMSKeyId' @::@ 'Maybe' 'Text'+--+-- * 'poServerSideEncryption' @::@ 'Maybe' 'Text'+--+-- * 'poStorageClass' @::@ 'Maybe' 'Text'+--+-- * 'poWebsiteRedirectLocation' @::@ 'Maybe' 'Text'+--+putObject :: RqBody -- ^ 'poBody'+          -> Text -- ^ 'poBucket'+          -> Text -- ^ 'poKey'+          -> PutObject+putObject p1 p2 p3 = PutObject+    { _poBody                    = p1+    , _poBucket                  = p2+    , _poKey                     = p3+    , _poACL                     = Nothing+    , _poCacheControl            = Nothing+    , _poContentDisposition      = Nothing+    , _poContentEncoding         = Nothing+    , _poContentLanguage         = Nothing+    , _poContentLength           = Nothing+    , _poContentMD5              = Nothing+    , _poContentType             = Nothing+    , _poExpires                 = Nothing+    , _poGrantFullControl        = Nothing+    , _poGrantRead               = Nothing+    , _poGrantReadACP            = Nothing+    , _poGrantWriteACP           = Nothing+    , _poMetadata                = mempty+    , _poServerSideEncryption    = Nothing+    , _poStorageClass            = Nothing+    , _poWebsiteRedirectLocation = Nothing+    , _poSSECustomerAlgorithm    = Nothing+    , _poSSECustomerKey          = Nothing+    , _poSSECustomerKeyMD5       = Nothing+    , _poSSEKMSKeyId             = Nothing+    }++-- | The canned ACL to apply to the object.+poACL :: Lens' PutObject (Maybe Text)+poACL = lens _poACL (\s a -> s { _poACL = a })++-- | Object data.+poBody :: Lens' PutObject RqBody+poBody = lens _poBody (\s a -> s { _poBody = a })++poBucket :: Lens' PutObject Text+poBucket = lens _poBucket (\s a -> s { _poBucket = a })++-- | Specifies caching behavior along the request/reply chain.+poCacheControl :: Lens' PutObject (Maybe Text)+poCacheControl = lens _poCacheControl (\s a -> s { _poCacheControl = a })++-- | Specifies presentational information for the object.+poContentDisposition :: Lens' PutObject (Maybe Text)+poContentDisposition =+    lens _poContentDisposition (\s a -> s { _poContentDisposition = a })++-- | Specifies what content encodings have been applied to the object and thus+-- what decoding mechanisms must be applied to obtain the media-type+-- referenced by the Content-Type header field.+poContentEncoding :: Lens' PutObject (Maybe Text)+poContentEncoding =+    lens _poContentEncoding (\s a -> s { _poContentEncoding = a })++-- | The language the content is in.+poContentLanguage :: Lens' PutObject (Maybe Text)+poContentLanguage =+    lens _poContentLanguage (\s a -> s { _poContentLanguage = a })++-- | Size of the body in bytes. This parameter is useful when the size of the+-- body cannot be determined automatically.+poContentLength :: Lens' PutObject (Maybe Int)+poContentLength = lens _poContentLength (\s a -> s { _poContentLength = a })++poContentMD5 :: Lens' PutObject (Maybe Text)+poContentMD5 = lens _poContentMD5 (\s a -> s { _poContentMD5 = a })++-- | A standard MIME type describing the format of the object data.+poContentType :: Lens' PutObject (Maybe Text)+poContentType = lens _poContentType (\s a -> s { _poContentType = a })++-- | The date and time at which the object is no longer cacheable.+poExpires :: Lens' PutObject (Maybe UTCTime)+poExpires = lens _poExpires (\s a -> s { _poExpires = a }) . mapping _Time++-- | Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the+-- object.+poGrantFullControl :: Lens' PutObject (Maybe Text)+poGrantFullControl =+    lens _poGrantFullControl (\s a -> s { _poGrantFullControl = a })++-- | Allows grantee to read the object data and its metadata.+poGrantRead :: Lens' PutObject (Maybe Text)+poGrantRead = lens _poGrantRead (\s a -> s { _poGrantRead = a })++-- | Allows grantee to read the object ACL.+poGrantReadACP :: Lens' PutObject (Maybe Text)+poGrantReadACP = lens _poGrantReadACP (\s a -> s { _poGrantReadACP = a })++-- | Allows grantee to write the ACL for the applicable object.+poGrantWriteACP :: Lens' PutObject (Maybe Text)+poGrantWriteACP = lens _poGrantWriteACP (\s a -> s { _poGrantWriteACP = a })++poKey :: Lens' PutObject Text+poKey = lens _poKey (\s a -> s { _poKey = a })++-- | A map of metadata to store with the object in S3.+poMetadata :: Lens' PutObject (HashMap (CI Text) Text)+poMetadata = lens _poMetadata (\s a -> s { _poMetadata = a }) . _Map++-- | Specifies the algorithm to use to when encrypting the object (e.g.,+-- AES256, aws:kms).+poSSECustomerAlgorithm :: Lens' PutObject (Maybe Text)+poSSECustomerAlgorithm =+    lens _poSSECustomerAlgorithm (\s a -> s { _poSSECustomerAlgorithm = a })++-- | Specifies the customer-provided encryption key for Amazon S3 to use in+-- encrypting data. This value is used to store the object and then it is+-- discarded; Amazon does not store the encryption key. The key must be+-- appropriate for use with the algorithm specified in the+-- x-amz-server-side&#x200B;-encryption&#x200B;-customer-algorithm header.+poSSECustomerKey :: Lens' PutObject (Maybe Text)+poSSECustomerKey = lens _poSSECustomerKey (\s a -> s { _poSSECustomerKey = a }) . mapping _Sensitive++-- | Specifies the 128-bit MD5 digest of the encryption key according to RFC+-- 1321. Amazon S3 uses this header for a message integrity check to ensure+-- the encryption key was transmitted without error.+poSSECustomerKeyMD5 :: Lens' PutObject (Maybe Text)+poSSECustomerKeyMD5 =+    lens _poSSECustomerKeyMD5 (\s a -> s { _poSSECustomerKeyMD5 = a })++-- | Specifies the AWS KMS key ID to use for object encryption.+poSSEKMSKeyId :: Lens' PutObject (Maybe Text)+poSSEKMSKeyId = lens _poSSEKMSKeyId (\s a -> s { _poSSEKMSKeyId = a }) . mapping _Sensitive++-- | The Server-side encryption algorithm used when storing this object in S3+-- (e.g., AES256, aws:kms).+poServerSideEncryption :: Lens' PutObject (Maybe Text)+poServerSideEncryption =+    lens _poServerSideEncryption (\s a -> s { _poServerSideEncryption = a })++-- | The type of storage to use for the object. Defaults to 'STANDARD'.+poStorageClass :: Lens' PutObject (Maybe Text)+poStorageClass = lens _poStorageClass (\s a -> s { _poStorageClass = a })++-- | If the bucket is configured as a website, redirects requests for this+-- object to another object in the same bucket or to an external URL. Amazon+-- S3 stores the value of this header in the object metadata.+poWebsiteRedirectLocation :: Lens' PutObject (Maybe Text)+poWebsiteRedirectLocation =+    lens _poWebsiteRedirectLocation+        (\s a -> s { _poWebsiteRedirectLocation = a })++data PutObjectResponse = PutObjectResponse+    { _porETag                 :: Maybe Text+    , _porExpiration           :: Maybe RFC822+    , _porSSECustomerAlgorithm :: Maybe Text+    , _porSSECustomerKeyMD5    :: Maybe Text+    , _porSSEKMSKeyId          :: Maybe (Sensitive Text)+    , _porServerSideEncryption :: Maybe Text+    , _porVersionId            :: Maybe Text+    } deriving (Eq, Ord, Show)++-- | 'PutObjectResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'porETag' @::@ 'Maybe' 'Text'+--+-- * 'porExpiration' @::@ 'Maybe' 'UTCTime'+--+-- * 'porSSECustomerAlgorithm' @::@ 'Maybe' 'Text'+--+-- * 'porSSECustomerKeyMD5' @::@ 'Maybe' 'Text'+--+-- * 'porSSEKMSKeyId' @::@ 'Maybe' 'Text'+--+-- * 'porServerSideEncryption' @::@ 'Maybe' 'Text'+--+-- * 'porVersionId' @::@ 'Maybe' 'Text'+--+putObjectResponse :: PutObjectResponse+putObjectResponse = PutObjectResponse+    { _porExpiration           = Nothing+    , _porETag                 = Nothing+    , _porServerSideEncryption = Nothing+    , _porVersionId            = Nothing+    , _porSSECustomerAlgorithm = Nothing+    , _porSSECustomerKeyMD5    = Nothing+    , _porSSEKMSKeyId          = Nothing+    }++-- | Entity tag for the uploaded object.+porETag :: Lens' PutObjectResponse (Maybe Text)+porETag = lens _porETag (\s a -> s { _porETag = a })++-- | If the object expiration is configured, this will contain the expiration+-- date (expiry-date) and rule ID (rule-id). The value of rule-id is URL+-- encoded.+porExpiration :: Lens' PutObjectResponse (Maybe UTCTime)+porExpiration = lens _porExpiration (\s a -> s { _porExpiration = a }) . mapping _Time++-- | If server-side encryption with a customer-provided encryption key was+-- requested, the response will include this header confirming the+-- encryption algorithm used.+porSSECustomerAlgorithm :: Lens' PutObjectResponse (Maybe Text)+porSSECustomerAlgorithm =+    lens _porSSECustomerAlgorithm (\s a -> s { _porSSECustomerAlgorithm = a })++-- | If server-side encryption with a customer-provided encryption key was+-- requested, the response will include this header to provide round trip+-- message integrity verification of the customer-provided encryption key.+porSSECustomerKeyMD5 :: Lens' PutObjectResponse (Maybe Text)+porSSECustomerKeyMD5 =+    lens _porSSECustomerKeyMD5 (\s a -> s { _porSSECustomerKeyMD5 = a })++-- | If present, specifies the AWS KMS key used to encrypt the object.+porSSEKMSKeyId :: Lens' PutObjectResponse (Maybe Text)+porSSEKMSKeyId = lens _porSSEKMSKeyId (\s a -> s { _porSSEKMSKeyId = a }) . mapping _Sensitive++-- | The Server-side encryption algorithm used when storing this object in S3+-- (e.g., AES256, aws:kms).+porServerSideEncryption :: Lens' PutObjectResponse (Maybe Text)+porServerSideEncryption =+    lens _porServerSideEncryption (\s a -> s { _porServerSideEncryption = a })++-- | Version of the object.+porVersionId :: Lens' PutObjectResponse (Maybe Text)+porVersionId = lens _porVersionId (\s a -> s { _porVersionId = a })++instance ToPath PutObject where+    toPath PutObject{..} = mconcat+        [ "/"+        , toText _poBucket+        , "/"+        , toText _poKey+        ]++instance ToQuery PutObject where+    toQuery = const mempty++instance ToHeaders PutObject where+    toHeaders PutObject{..} = mconcat+        [ "x-amz-acl"                                       =: _poACL+        , "Cache-Control"                                   =: _poCacheControl+        , "Content-Disposition"                             =: _poContentDisposition+        , "Content-Encoding"                                =: _poContentEncoding+        , "Content-Language"                                =: _poContentLanguage+        , "Content-Length"                                  =: _poContentLength+        , "Content-MD5"                                     =: _poContentMD5+        , "Content-Type"                                    =: _poContentType+        , "Expires"                                         =: _poExpires+        , "x-amz-grant-full-control"                        =: _poGrantFullControl+        , "x-amz-grant-read"                                =: _poGrantRead+        , "x-amz-grant-read-acp"                            =: _poGrantReadACP+        , "x-amz-grant-write-acp"                           =: _poGrantWriteACP+        , "x-amz-meta-"                                     =: _poMetadata+        , "x-amz-server-side-encryption"                    =: _poServerSideEncryption+        , "x-amz-storage-class"                             =: _poStorageClass+        , "x-amz-website-redirect-location"                 =: _poWebsiteRedirectLocation+        , "x-amz-server-side-encryption-customer-algorithm" =: _poSSECustomerAlgorithm+        , "x-amz-server-side-encryption-customer-key"       =: _poSSECustomerKey+        , "x-amz-server-side-encryption-customer-key-MD5"   =: _poSSECustomerKeyMD5+        , "x-amz-server-side-encryption-aws-kms-key-id"     =: _poSSEKMSKeyId+        ]++instance ToBody PutObject where+    toBody = toBody . _poBody++instance AWSRequest PutObject where+    type Sv PutObject = S3+    type Rs PutObject = PutObjectResponse++    request  = stream PUT+    response = headerResponse $ \h -> PutObjectResponse+        <$> h ~:? "ETag"+        <*> h ~:? "x-amz-expiration"+        <*> h ~:? "x-amz-server-side-encryption-customer-algorithm"+        <*> h ~:? "x-amz-server-side-encryption-customer-key-MD5"+        <*> h ~:? "x-amz-server-side-encryption-aws-kms-key-id"+        <*> h ~:? "x-amz-server-side-encryption"+        <*> h ~:? "x-amz-version-id"
+ gen/Network/AWS/S3/PutObjectAcl.hs view
@@ -0,0 +1,189 @@+{-# 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.S3.PutObjectAcl+-- 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)++-- | uses the acl subresource to set the access control list (ACL) permissions+-- for an object that already exists in a bucket.+--+-- <http://docs.aws.amazon.com/AmazonS3/latest/API/PutObjectAcl.html>+module Network.AWS.S3.PutObjectAcl+    (+    -- * Request+      PutObjectAcl+    -- ** Request constructor+    , putObjectAcl+    -- ** Request lenses+    , poaACL+    , poaAccessControlPolicy+    , poaBucket+    , poaContentMD5+    , poaGrantFullControl+    , poaGrantRead+    , poaGrantReadACP+    , poaGrantWrite+    , poaGrantWriteACP+    , poaKey++    -- * Response+    , PutObjectAclResponse+    -- ** Response constructor+    , putObjectAclResponse+    ) where++import Network.AWS.Prelude+import Network.AWS.Request.RestXML+import Network.AWS.S3.Types+import qualified GHC.Exts++data PutObjectAcl = PutObjectAcl+    { _poaACL                 :: Maybe Text+    , _poaAccessControlPolicy :: Maybe AccessControlPolicy+    , _poaBucket              :: Text+    , _poaContentMD5          :: Maybe Text+    , _poaGrantFullControl    :: Maybe Text+    , _poaGrantRead           :: Maybe Text+    , _poaGrantReadACP        :: Maybe Text+    , _poaGrantWrite          :: Maybe Text+    , _poaGrantWriteACP       :: Maybe Text+    , _poaKey                 :: Text+    } deriving (Eq, Show)++-- | 'PutObjectAcl' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'poaACL' @::@ 'Maybe' 'Text'+--+-- * 'poaAccessControlPolicy' @::@ 'Maybe' 'AccessControlPolicy'+--+-- * 'poaBucket' @::@ 'Text'+--+-- * 'poaContentMD5' @::@ 'Maybe' 'Text'+--+-- * 'poaGrantFullControl' @::@ 'Maybe' 'Text'+--+-- * 'poaGrantRead' @::@ 'Maybe' 'Text'+--+-- * 'poaGrantReadACP' @::@ 'Maybe' 'Text'+--+-- * 'poaGrantWrite' @::@ 'Maybe' 'Text'+--+-- * 'poaGrantWriteACP' @::@ 'Maybe' 'Text'+--+-- * 'poaKey' @::@ 'Text'+--+putObjectAcl :: Text -- ^ 'poaBucket'+             -> Text -- ^ 'poaKey'+             -> PutObjectAcl+putObjectAcl p1 p2 = PutObjectAcl+    { _poaBucket              = p1+    , _poaKey                 = p2+    , _poaACL                 = Nothing+    , _poaAccessControlPolicy = Nothing+    , _poaContentMD5          = Nothing+    , _poaGrantFullControl    = Nothing+    , _poaGrantRead           = Nothing+    , _poaGrantReadACP        = Nothing+    , _poaGrantWrite          = Nothing+    , _poaGrantWriteACP       = Nothing+    }++-- | The canned ACL to apply to the object.+poaACL :: Lens' PutObjectAcl (Maybe Text)+poaACL = lens _poaACL (\s a -> s { _poaACL = a })++poaAccessControlPolicy :: Lens' PutObjectAcl (Maybe AccessControlPolicy)+poaAccessControlPolicy =+    lens _poaAccessControlPolicy (\s a -> s { _poaAccessControlPolicy = a })++poaBucket :: Lens' PutObjectAcl Text+poaBucket = lens _poaBucket (\s a -> s { _poaBucket = a })++poaContentMD5 :: Lens' PutObjectAcl (Maybe Text)+poaContentMD5 = lens _poaContentMD5 (\s a -> s { _poaContentMD5 = a })++-- | Allows grantee the read, write, read ACP, and write ACP permissions on+-- the bucket.+poaGrantFullControl :: Lens' PutObjectAcl (Maybe Text)+poaGrantFullControl =+    lens _poaGrantFullControl (\s a -> s { _poaGrantFullControl = a })++-- | Allows grantee to list the objects in the bucket.+poaGrantRead :: Lens' PutObjectAcl (Maybe Text)+poaGrantRead = lens _poaGrantRead (\s a -> s { _poaGrantRead = a })++-- | Allows grantee to read the bucket ACL.+poaGrantReadACP :: Lens' PutObjectAcl (Maybe Text)+poaGrantReadACP = lens _poaGrantReadACP (\s a -> s { _poaGrantReadACP = a })++-- | Allows grantee to create, overwrite, and delete any object in the bucket.+poaGrantWrite :: Lens' PutObjectAcl (Maybe Text)+poaGrantWrite = lens _poaGrantWrite (\s a -> s { _poaGrantWrite = a })++-- | Allows grantee to write the ACL for the applicable bucket.+poaGrantWriteACP :: Lens' PutObjectAcl (Maybe Text)+poaGrantWriteACP = lens _poaGrantWriteACP (\s a -> s { _poaGrantWriteACP = a })++poaKey :: Lens' PutObjectAcl Text+poaKey = lens _poaKey (\s a -> s { _poaKey = a })++data PutObjectAclResponse = PutObjectAclResponse+    deriving (Eq, Ord, Show, Generic)++-- | 'PutObjectAclResponse' constructor.+putObjectAclResponse :: PutObjectAclResponse+putObjectAclResponse = PutObjectAclResponse++instance ToPath PutObjectAcl where+    toPath PutObjectAcl{..} = mconcat+        [ "/"+        , toText _poaBucket+        , "/"+        , toText _poaKey+        ]++instance ToQuery PutObjectAcl where+    toQuery = const "acl"++instance ToHeaders PutObjectAcl where+    toHeaders PutObjectAcl{..} = mconcat+        [ "x-amz-acl"                =: _poaACL+        , "Content-MD5"              =: _poaContentMD5+        , "x-amz-grant-full-control" =: _poaGrantFullControl+        , "x-amz-grant-read"         =: _poaGrantRead+        , "x-amz-grant-read-acp"     =: _poaGrantReadACP+        , "x-amz-grant-write"        =: _poaGrantWrite+        , "x-amz-grant-write-acp"    =: _poaGrantWriteACP+        ]++instance ToXMLRoot PutObjectAcl where+    toXMLRoot PutObjectAcl{..} = namespaced ns "PutObjectAcl"+        [ "AccessControlPolicy" =@ _poaAccessControlPolicy+        ]++instance ToXML PutObjectAcl++instance AWSRequest PutObjectAcl where+    type Sv PutObjectAcl = S3+    type Rs PutObjectAcl = PutObjectAclResponse++    request  = put+    response = nullResponse PutObjectAclResponse
+ gen/Network/AWS/S3/RestoreObject.hs view
@@ -0,0 +1,125 @@+{-# LANGUAGE DataKinds                   #-}+{-# LANGUAGE DeriveGeneric               #-}+{-# LANGUAGE FlexibleInstances           #-}+{-# LANGUAGE GeneralizedNewtypeDeriving  #-}+{-# LANGUAGE LambdaCase                  #-}+{-# LANGUAGE NoImplicitPrelude           #-}+{-# LANGUAGE OverloadedStrings           #-}+{-# LANGUAGE RecordWildCards             #-}+{-# LANGUAGE TypeFamilies                #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Module      : Network.AWS.S3.RestoreObject+-- 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)++-- | Restores an archived copy of an object back into Amazon S3.+--+-- <http://docs.aws.amazon.com/AmazonS3/latest/API/RestoreObject.html>+module Network.AWS.S3.RestoreObject+    (+    -- * Request+      RestoreObject+    -- ** Request constructor+    , restoreObject+    -- ** Request lenses+    , roBucket+    , roKey+    , roRestoreRequest+    , roVersionId++    -- * Response+    , RestoreObjectResponse+    -- ** Response constructor+    , restoreObjectResponse+    ) where++import Network.AWS.Prelude+import Network.AWS.Request.RestXML+import Network.AWS.S3.Types+import qualified GHC.Exts++data RestoreObject = RestoreObject+    { _roBucket         :: Text+    , _roKey            :: Text+    , _roRestoreRequest :: Maybe RestoreRequest+    , _roVersionId      :: Maybe Text+    } deriving (Eq, Show)++-- | 'RestoreObject' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'roBucket' @::@ 'Text'+--+-- * 'roKey' @::@ 'Text'+--+-- * 'roRestoreRequest' @::@ 'Maybe' 'RestoreRequest'+--+-- * 'roVersionId' @::@ 'Maybe' 'Text'+--+restoreObject :: Text -- ^ 'roBucket'+              -> Text -- ^ 'roKey'+              -> RestoreObject+restoreObject p1 p2 = RestoreObject+    { _roBucket         = p1+    , _roKey            = p2+    , _roVersionId      = Nothing+    , _roRestoreRequest = Nothing+    }++roBucket :: Lens' RestoreObject Text+roBucket = lens _roBucket (\s a -> s { _roBucket = a })++roKey :: Lens' RestoreObject Text+roKey = lens _roKey (\s a -> s { _roKey = a })++roRestoreRequest :: Lens' RestoreObject (Maybe RestoreRequest)+roRestoreRequest = lens _roRestoreRequest (\s a -> s { _roRestoreRequest = a })++roVersionId :: Lens' RestoreObject (Maybe Text)+roVersionId = lens _roVersionId (\s a -> s { _roVersionId = a })++data RestoreObjectResponse = RestoreObjectResponse+    deriving (Eq, Ord, Show, Generic)++-- | 'RestoreObjectResponse' constructor.+restoreObjectResponse :: RestoreObjectResponse+restoreObjectResponse = RestoreObjectResponse++instance ToPath RestoreObject where+    toPath RestoreObject{..} = mconcat+        [ "/"+        , toText _roBucket+        , "/"+        , toText _roKey+        ]++instance ToQuery RestoreObject where+    toQuery RestoreObject{..} = mconcat+        [ "restore"+        , "versionId" =? _roVersionId+        ]++instance ToHeaders RestoreObject++instance ToXMLRoot RestoreObject where+    toXMLRoot RestoreObject{..} = namespaced ns "RestoreObject"+        [ "RestoreRequest" =@ _roRestoreRequest+        ]++instance ToXML RestoreObject++instance AWSRequest RestoreObject where+    type Sv RestoreObject = S3+    type Rs RestoreObject = RestoreObjectResponse++    request  = post+    response = nullResponse RestoreObjectResponse
+ gen/Network/AWS/S3/Types.hs view
@@ -0,0 +1,3166 @@+{-# 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.S3.Types+-- Copyright   : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>+-- License     : This Source Code Form is subject to the terms of+--               the Mozilla Public License, v. 2.0.+--               A copy of the MPL can be found in the LICENSE file or+--               you can obtain it at http://mozilla.org/MPL/2.0/.+-- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability   : experimental+-- Portability : non-portable (GHC extensions)++module Network.AWS.S3.Types+    (+    -- * Service+      S3+    -- ** Error+    , RESTError+    -- ** XML+    , ns++    -- * Event+    , Event (..)++    -- * NoncurrentVersionExpiration+    , NoncurrentVersionExpiration+    , noncurrentVersionExpiration+    , nveNoncurrentDays++    -- * Transition+    , Transition+    , transition+    , tDate+    , tDays+    , tStorageClass++    -- * DeleteMarkerEntry+    , DeleteMarkerEntry+    , deleteMarkerEntry+    , dmeIsLatest+    , dmeKey+    , dmeLastModified+    , dmeOwner+    , dmeVersionId++    -- * ExpirationStatus+    , ExpirationStatus (..)++    -- * Part+    , Part+    , part+    , pETag+    , pLastModified+    , pPartNumber+    , pSize++    -- * VersioningConfiguration+    , VersioningConfiguration+    , versioningConfiguration+    , vcMFADelete+    , vcStatus++    -- * Tag+    , Tag+    , tag+    , tagKey+    , tagValue++    -- * ObjectStorageClass+    , ObjectStorageClass (..)++    -- * MetadataDirective+    , MetadataDirective (..)++    -- * RedirectAllRequestsTo+    , RedirectAllRequestsTo+    , redirectAllRequestsTo+    , rartHostName+    , rartProtocol++    -- * RoutingRule+    , RoutingRule+    , routingRule+    , rrCondition+    , rrRedirect++    -- * NotificationConfiguration+    , NotificationConfiguration+    , notificationConfiguration+    , ncCloudFunctionConfiguration+    , ncQueueConfiguration+    , ncTopicConfiguration++    -- * S3ServiceError+    , S3ServiceError+    , s3ServiceError+    , sseCode+    , sseKey+    , sseMessage+    , sseVersionId++    -- * ObjectCannedACL+    , ObjectCannedACL (..)++    -- * BucketVersioningStatus+    , BucketVersioningStatus (..)++    -- * DeletedObject+    , DeletedObject+    , deletedObject+    , do1DeleteMarker+    , do1DeleteMarkerVersionId+    , do1Key+    , do1VersionId++    -- * ObjectVersionStorageClass+    , ObjectVersionStorageClass (..)++    -- * CopyPartResult+    , CopyPartResult+    , copyPartResult+    , cprETag+    , cprLastModified++    -- * EncodingType+    , EncodingType (..)++    -- * RequestPaymentConfiguration+    , RequestPaymentConfiguration+    , requestPaymentConfiguration+    , rpcPayer++    -- * CORSRule+    , CORSRule+    , corsrule+    , corsrAllowedHeaders+    , corsrAllowedMethods+    , corsrAllowedOrigins+    , corsrExposeHeaders+    , corsrMaxAgeSeconds++    -- * WebsiteConfiguration+    , WebsiteConfiguration+    , websiteConfiguration+    , wcErrorDocument+    , wcIndexDocument+    , wcRedirectAllRequestsTo+    , wcRoutingRules++    -- * NoncurrentVersionTransition+    , NoncurrentVersionTransition+    , noncurrentVersionTransition+    , nvtNoncurrentDays+    , nvtStorageClass++    -- * Initiator+    , Initiator+    , initiator+    , iDisplayName+    , iID++    -- * ObjectIdentifier+    , ObjectIdentifier+    , objectIdentifier+    , oiKey+    , oiVersionId++    -- * Bucket+    , Bucket+    , bucket+    , bCreationDate+    , bName++    -- * Protocol+    , Protocol (..)++    -- * Grant+    , Grant+    , grant+    , gGrantee+    , gPermission++    -- * Rule+    , Rule+    , rule+    , rExpiration+    , rID+    , rNoncurrentVersionExpiration+    , rNoncurrentVersionTransition+    , rPrefix+    , rStatus+    , rTransition++    -- * TopicConfiguration+    , TopicConfiguration+    , topicConfiguration+    , tcEvent+    , tcEvents+    , tcId+    , tcTopic++    -- * QueueConfiguration+    , QueueConfiguration+    , queueConfiguration+    , qcEvent+    , qcEvents+    , qcId+    , qcQueue++    -- * Owner+    , Owner+    , owner+    , oDisplayName+    , oID++    -- * BucketLoggingStatus+    , BucketLoggingStatus+    , bucketLoggingStatus+    , blsLoggingEnabled++    -- * ErrorDocument+    , ErrorDocument+    , errorDocument+    , edKey++    -- * StorageClass+    , StorageClass (..)++    -- * ObjectVersion+    , ObjectVersion+    , objectVersion+    , ovETag+    , ovIsLatest+    , ovKey+    , ovLastModified+    , ovOwner+    , ovSize+    , ovStorageClass+    , ovVersionId++    -- * TargetGrant+    , TargetGrant+    , targetGrant+    , tgGrantee+    , tgPermission++    -- * MFADeleteStatus+    , MFADeleteStatus (..)++    -- * Payer+    , Payer (..)++    -- * Redirect+    , Redirect+    , redirect+    , rHostName+    , rHttpRedirectCode+    , rProtocol+    , rReplaceKeyPrefixWith+    , rReplaceKeyWith++    -- * BucketLogsPermission+    , BucketLogsPermission (..)++    -- * CompletedPart+    , CompletedPart+    , completedPart+    , cpETag+    , cpPartNumber++    -- * CreateBucketConfiguration+    , CreateBucketConfiguration+    , createBucketConfiguration+    , cbcLocationConstraint++    -- * Tagging+    , Tagging+    , tagging+    , tTagSet++    -- * LifecycleExpiration+    , LifecycleExpiration+    , lifecycleExpiration+    , leDate+    , leDays++    -- * CORSConfiguration+    , CORSConfiguration+    , corsconfiguration+    , corscCORSRules++    -- * Object+    , Object+    , object'+    , oETag+    , oKey+    , oLastModified+    , oOwner+    , oSize+    , oStorageClass++    -- * CommonPrefix+    , CommonPrefix+    , commonPrefix+    , cpPrefix++    -- * MultipartUpload+    , MultipartUpload+    , multipartUpload+    , muInitiated+    , muInitiator+    , muKey+    , muOwner+    , muStorageClass+    , muUploadId++    -- * Type+    , Type (..)++    -- * TransitionStorageClass+    , TransitionStorageClass (..)++    -- * CompletedMultipartUpload+    , CompletedMultipartUpload+    , completedMultipartUpload+    , cmuParts++    -- * Condition+    , Condition+    , condition+    , cHttpErrorCodeReturnedEquals+    , cKeyPrefixEquals++    -- * Permission+    , Permission (..)++    -- * AccessControlPolicy+    , AccessControlPolicy+    , accessControlPolicy+    , acpGrants+    , acpOwner++    -- * BucketCannedACL+    , BucketCannedACL (..)++    -- * MFADelete+    , MFADelete (..)++    -- * CloudFunctionConfiguration+    , CloudFunctionConfiguration+    , cloudFunctionConfiguration+    , cfcCloudFunction+    , cfcEvent+    , cfcEvents+    , cfcId+    , cfcInvocationRole++    -- * Grantee+    , Grantee+    , grantee+    , gDisplayName+    , gEmailAddress+    , gID+    , gType+    , gURI++    -- * LifecycleConfiguration+    , LifecycleConfiguration+    , lifecycleConfiguration+    , lcRules++    -- * LoggingEnabled+    , LoggingEnabled+    , loggingEnabled+    , leTargetBucket+    , leTargetGrants+    , leTargetPrefix++    -- * ServerSideEncryption+    , ServerSideEncryption (..)++    -- * IndexDocument+    , IndexDocument+    , indexDocument+    , idSuffix++    -- * CopyObjectResult+    , CopyObjectResult+    , copyObjectResult+    , corETag+    , corLastModified++    -- * Delete+    , Delete+    , delete'+    , dObjects+    , dQuiet++    -- * RestoreRequest+    , RestoreRequest+    , restoreRequest+    , rDays++    -- * Common+    , module Network.AWS.S3.Internal+    ) where++import Network.AWS.Error+import Network.AWS.Prelude+import Network.AWS.Signing.V4+import Network.AWS.S3.Internal+import qualified GHC.Exts++-- | Version @2006-03-01@ of the Amazon Simple Storage Service service.+data S3++instance AWSService S3 where+    type Sg S3 = V4+    type Er S3 = RESTError++    service = Service+        { _svcEndpoint     = global+        , _svcAbbrev       = "S3"+        , _svcPrefix       = "s3"+        , _svcVersion      = "2006-03-01"+        , _svcTargetPrefix = Nothing+        , _svcJSONVersion  = Nothing+        }++    handle = restError statusSuccess++ns :: Text+ns = "http://s3.amazonaws.com/doc/2006-03-01/"++data Event+    = S3ObjectCreatedCompleteMultipartUpload -- ^ s3:ObjectCreated:CompleteMultipartUpload+    | S3ObjectCreatedCopy                    -- ^ s3:ObjectCreated:Copy+    | S3ObjectCreatedPost                    -- ^ s3:ObjectCreated:Post+    | S3ObjectCreatedPut                     -- ^ s3:ObjectCreated:Put+    | S3ReducedRedundancyLostObject          -- ^ s3:ReducedRedundancyLostObject+      deriving (Eq, Ord, Show, Generic, Enum)++instance Hashable Event++instance FromText Event where+    parser = match "s3:ObjectCreated:CompleteMultipartUpload" S3ObjectCreatedCompleteMultipartUpload+         <|> match "s3:ObjectCreated:Copy"                    S3ObjectCreatedCopy+         <|> match "s3:ObjectCreated:Post"                    S3ObjectCreatedPost+         <|> match "s3:ObjectCreated:Put"                     S3ObjectCreatedPut+         <|> match "s3:ReducedRedundancyLostObject"           S3ReducedRedundancyLostObject++instance ToText Event where+    toText = \case+        S3ObjectCreatedCompleteMultipartUpload -> "s3:ObjectCreated:CompleteMultipartUpload"+        S3ObjectCreatedCopy                    -> "s3:ObjectCreated:Copy"+        S3ObjectCreatedPost                    -> "s3:ObjectCreated:Post"+        S3ObjectCreatedPut                     -> "s3:ObjectCreated:Put"+        S3ReducedRedundancyLostObject          -> "s3:ReducedRedundancyLostObject"++instance FromXML Event where+    parseXML = parseXMLText "Event"++instance ToXML Event where+    toXML = toXMLText++newtype NoncurrentVersionExpiration = NoncurrentVersionExpiration+    { _nveNoncurrentDays :: Int+    } deriving (Eq, Ord, Show, Enum, Num, Integral, Real)++-- | 'NoncurrentVersionExpiration' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'nveNoncurrentDays' @::@ 'Int'+--+noncurrentVersionExpiration :: Int -- ^ 'nveNoncurrentDays'+                            -> NoncurrentVersionExpiration+noncurrentVersionExpiration p1 = NoncurrentVersionExpiration+    { _nveNoncurrentDays = p1+    }++-- | Specifies the number of days an object is noncurrent before Amazon S3 can+-- perform the associated action. For information about the noncurrent days+-- calculations, see How Amazon S3 Calculates When an Object Became+-- Noncurrent in the Amazon Simple Storage Service Developer Guide.+nveNoncurrentDays :: Lens' NoncurrentVersionExpiration Int+nveNoncurrentDays =+    lens _nveNoncurrentDays (\s a -> s { _nveNoncurrentDays = a })++instance FromXML NoncurrentVersionExpiration where+    parseXML x = NoncurrentVersionExpiration+        <$> x .@  "NoncurrentDays"++instance ToXML NoncurrentVersionExpiration where+    toXML NoncurrentVersionExpiration{..} = nodes "NoncurrentVersionExpiration"+        [ "NoncurrentDays" =@ _nveNoncurrentDays+        ]++data Transition = Transition+    { _tDate         :: Maybe ISO8601+    , _tDays         :: Maybe Int+    , _tStorageClass :: Maybe Text+    } deriving (Eq, Ord, Show)++-- | 'Transition' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'tDate' @::@ 'Maybe' 'UTCTime'+--+-- * 'tDays' @::@ 'Maybe' 'Int'+--+-- * 'tStorageClass' @::@ 'Maybe' 'Text'+--+transition :: Transition+transition = Transition+    { _tDate         = Nothing+    , _tDays         = Nothing+    , _tStorageClass = Nothing+    }++-- | Indicates at what date the object is to be moved or deleted. Should be in+-- GMT ISO 8601 Format.+tDate :: Lens' Transition (Maybe UTCTime)+tDate = lens _tDate (\s a -> s { _tDate = a }) . mapping _Time++-- | Indicates the lifetime, in days, of the objects that are subject to the+-- rule. The value must be a non-zero positive integer.+tDays :: Lens' Transition (Maybe Int)+tDays = lens _tDays (\s a -> s { _tDays = a })++-- | The class of storage used to store the object.+tStorageClass :: Lens' Transition (Maybe Text)+tStorageClass = lens _tStorageClass (\s a -> s { _tStorageClass = a })++instance FromXML Transition where+    parseXML x = Transition+        <$> x .@? "Date"+        <*> x .@? "Days"+        <*> x .@? "StorageClass"++instance ToXML Transition where+    toXML Transition{..} = nodes "Transition"+        [ "Date"         =@ _tDate+        , "Days"         =@ _tDays+        , "StorageClass" =@ _tStorageClass+        ]++data DeleteMarkerEntry = DeleteMarkerEntry+    { _dmeIsLatest     :: Maybe Bool+    , _dmeKey          :: Maybe Text+    , _dmeLastModified :: Maybe RFC822+    , _dmeOwner        :: Maybe Owner+    , _dmeVersionId    :: Maybe Text+    } deriving (Eq, Show)++-- | 'DeleteMarkerEntry' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'dmeIsLatest' @::@ 'Maybe' 'Bool'+--+-- * 'dmeKey' @::@ 'Maybe' 'Text'+--+-- * 'dmeLastModified' @::@ 'Maybe' 'UTCTime'+--+-- * 'dmeOwner' @::@ 'Maybe' 'Owner'+--+-- * 'dmeVersionId' @::@ 'Maybe' 'Text'+--+deleteMarkerEntry :: DeleteMarkerEntry+deleteMarkerEntry = DeleteMarkerEntry+    { _dmeOwner        = Nothing+    , _dmeKey          = Nothing+    , _dmeVersionId    = Nothing+    , _dmeIsLatest     = Nothing+    , _dmeLastModified = Nothing+    }++-- | Specifies whether the object is (true) or is not (false) the latest+-- version of an object.+dmeIsLatest :: Lens' DeleteMarkerEntry (Maybe Bool)+dmeIsLatest = lens _dmeIsLatest (\s a -> s { _dmeIsLatest = a })++-- | The object key.+dmeKey :: Lens' DeleteMarkerEntry (Maybe Text)+dmeKey = lens _dmeKey (\s a -> s { _dmeKey = a })++-- | Date and time the object was last modified.+dmeLastModified :: Lens' DeleteMarkerEntry (Maybe UTCTime)+dmeLastModified = lens _dmeLastModified (\s a -> s { _dmeLastModified = a }) . mapping _Time++dmeOwner :: Lens' DeleteMarkerEntry (Maybe Owner)+dmeOwner = lens _dmeOwner (\s a -> s { _dmeOwner = a })++-- | Version ID of an object.+dmeVersionId :: Lens' DeleteMarkerEntry (Maybe Text)+dmeVersionId = lens _dmeVersionId (\s a -> s { _dmeVersionId = a })++instance FromXML DeleteMarkerEntry where+    parseXML x = DeleteMarkerEntry+        <$> x .@? "IsLatest"+        <*> x .@? "Key"+        <*> x .@? "LastModified"+        <*> x .@? "Owner"+        <*> x .@? "VersionId"++instance ToXML DeleteMarkerEntry where+    toXML DeleteMarkerEntry{..} = nodes "DeleteMarkerEntry"+        [ "Owner"        =@ _dmeOwner+        , "Key"          =@ _dmeKey+        , "VersionId"    =@ _dmeVersionId+        , "IsLatest"     =@ _dmeIsLatest+        , "LastModified" =@ _dmeLastModified+        ]++data ExpirationStatus+    = Disabled -- ^ Disabled+    | Enabled  -- ^ Enabled+      deriving (Eq, Ord, Show, Generic, Enum)++instance Hashable ExpirationStatus++instance FromText ExpirationStatus where+    parser = match "Disabled" Disabled+         <|> match "Enabled"  Enabled++instance ToText ExpirationStatus where+    toText = \case+        Disabled -> "Disabled"+        Enabled  -> "Enabled"++instance FromXML ExpirationStatus where+    parseXML = parseXMLText "ExpirationStatus"++instance ToXML ExpirationStatus where+    toXML = toXMLText++data Part = Part+    { _pETag         :: Maybe Text+    , _pLastModified :: Maybe RFC822+    , _pPartNumber   :: Maybe Int+    , _pSize         :: Maybe Int+    } deriving (Eq, Ord, Show)++-- | 'Part' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'pETag' @::@ 'Maybe' 'Text'+--+-- * 'pLastModified' @::@ 'Maybe' 'UTCTime'+--+-- * 'pPartNumber' @::@ 'Maybe' 'Int'+--+-- * 'pSize' @::@ 'Maybe' 'Int'+--+part :: Part+part = Part+    { _pPartNumber   = Nothing+    , _pLastModified = Nothing+    , _pETag         = Nothing+    , _pSize         = Nothing+    }++-- | Entity tag returned when the part was uploaded.+pETag :: Lens' Part (Maybe Text)+pETag = lens _pETag (\s a -> s { _pETag = a })++-- | Date and time at which the part was uploaded.+pLastModified :: Lens' Part (Maybe UTCTime)+pLastModified = lens _pLastModified (\s a -> s { _pLastModified = a }) . mapping _Time++-- | Part number identifying the part.+pPartNumber :: Lens' Part (Maybe Int)+pPartNumber = lens _pPartNumber (\s a -> s { _pPartNumber = a })++-- | Size of the uploaded part data.+pSize :: Lens' Part (Maybe Int)+pSize = lens _pSize (\s a -> s { _pSize = a })++instance FromXML Part where+    parseXML x = Part+        <$> x .@? "ETag"+        <*> x .@? "LastModified"+        <*> x .@? "PartNumber"+        <*> x .@? "Size"++instance ToXML Part where+    toXML Part{..} = nodes "Part"+        [ "PartNumber"   =@ _pPartNumber+        , "LastModified" =@ _pLastModified+        , "ETag"         =@ _pETag+        , "Size"         =@ _pSize+        ]++data VersioningConfiguration = VersioningConfiguration+    { _vcMFADelete :: Maybe Text+    , _vcStatus    :: Maybe Text+    } deriving (Eq, Ord, Show)++-- | 'VersioningConfiguration' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'vcMFADelete' @::@ 'Maybe' 'Text'+--+-- * 'vcStatus' @::@ 'Maybe' 'Text'+--+versioningConfiguration :: VersioningConfiguration+versioningConfiguration = VersioningConfiguration+    { _vcMFADelete = Nothing+    , _vcStatus    = Nothing+    }++-- | Specifies whether MFA delete is enabled in the bucket versioning+-- configuration. This element is only returned if the bucket has been+-- configured with MFA delete. If the bucket has never been so configured,+-- this element is not returned.+vcMFADelete :: Lens' VersioningConfiguration (Maybe Text)+vcMFADelete = lens _vcMFADelete (\s a -> s { _vcMFADelete = a })++-- | The versioning state of the bucket.+vcStatus :: Lens' VersioningConfiguration (Maybe Text)+vcStatus = lens _vcStatus (\s a -> s { _vcStatus = a })++instance FromXML VersioningConfiguration where+    parseXML x = VersioningConfiguration+        <$> x .@? "MfaDelete"+        <*> x .@? "Status"++instance ToXML VersioningConfiguration where+    toXML VersioningConfiguration{..} = nodes "VersioningConfiguration"+        [ "MfaDelete" =@ _vcMFADelete+        , "Status"    =@ _vcStatus+        ]++data Tag = Tag+    { _tagKey   :: Text+    , _tagValue :: Text+    } deriving (Eq, Ord, Show)++-- | 'Tag' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'tagKey' @::@ 'Text'+--+-- * 'tagValue' @::@ 'Text'+--+tag :: Text -- ^ 'tagKey'+    -> Text -- ^ 'tagValue'+    -> Tag+tag p1 p2 = Tag+    { _tagKey   = p1+    , _tagValue = p2+    }++-- | Name of the tag.+tagKey :: Lens' Tag Text+tagKey = lens _tagKey (\s a -> s { _tagKey = a })++-- | Value of the tag.+tagValue :: Lens' Tag Text+tagValue = lens _tagValue (\s a -> s { _tagValue = a })++instance FromXML Tag where+    parseXML x = Tag+        <$> x .@  "Key"+        <*> x .@  "Value"++instance ToXML Tag where+    toXML Tag{..} = nodes "Tag"+        [ "Key"   =@ _tagKey+        , "Value" =@ _tagValue+        ]++data ObjectStorageClass+    = Glacier           -- ^ GLACIER+    | ReducedRedundancy -- ^ REDUCED_REDUNDANCY+    | Standard          -- ^ STANDARD+      deriving (Eq, Ord, Show, Generic, Enum)++instance Hashable ObjectStorageClass++instance FromText ObjectStorageClass where+    parser = match "GLACIER"            Glacier+         <|> match "REDUCED_REDUNDANCY" ReducedRedundancy+         <|> match "STANDARD"           Standard++instance ToText ObjectStorageClass where+    toText = \case+        Glacier           -> "GLACIER"+        ReducedRedundancy -> "REDUCED_REDUNDANCY"+        Standard          -> "STANDARD"++instance FromXML ObjectStorageClass where+    parseXML = parseXMLText "ObjectStorageClass"++instance ToXML ObjectStorageClass where+    toXML = toXMLText++data MetadataDirective+    = Copy    -- ^ COPY+    | Replace -- ^ REPLACE+      deriving (Eq, Ord, Show, Generic, Enum)++instance Hashable MetadataDirective++instance FromText MetadataDirective where+    parser = match "COPY"    Copy+         <|> match "REPLACE" Replace++instance ToText MetadataDirective where+    toText = \case+        Copy    -> "COPY"+        Replace -> "REPLACE"++instance FromXML MetadataDirective where+    parseXML = parseXMLText "MetadataDirective"++instance ToXML MetadataDirective where+    toXML = toXMLText++data RedirectAllRequestsTo = RedirectAllRequestsTo+    { _rartHostName :: Text+    , _rartProtocol :: Maybe Text+    } deriving (Eq, Ord, Show)++-- | 'RedirectAllRequestsTo' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'rartHostName' @::@ 'Text'+--+-- * 'rartProtocol' @::@ 'Maybe' 'Text'+--+redirectAllRequestsTo :: Text -- ^ 'rartHostName'+                      -> RedirectAllRequestsTo+redirectAllRequestsTo p1 = RedirectAllRequestsTo+    { _rartHostName = p1+    , _rartProtocol = Nothing+    }++-- | Name of the host where requests will be redirected.+rartHostName :: Lens' RedirectAllRequestsTo Text+rartHostName = lens _rartHostName (\s a -> s { _rartHostName = a })++-- | Protocol to use (http, https) when redirecting requests. The default is+-- the protocol that is used in the original request.+rartProtocol :: Lens' RedirectAllRequestsTo (Maybe Text)+rartProtocol = lens _rartProtocol (\s a -> s { _rartProtocol = a })++instance FromXML RedirectAllRequestsTo where+    parseXML x = RedirectAllRequestsTo+        <$> x .@  "HostName"+        <*> x .@? "Protocol"++instance ToXML RedirectAllRequestsTo where+    toXML RedirectAllRequestsTo{..} = nodes "RedirectAllRequestsTo"+        [ "HostName" =@ _rartHostName+        , "Protocol" =@ _rartProtocol+        ]++data RoutingRule = RoutingRule+    { _rrCondition :: Maybe Condition+    , _rrRedirect  :: Redirect+    } deriving (Eq, Show)++-- | 'RoutingRule' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'rrCondition' @::@ 'Maybe' 'Condition'+--+-- * 'rrRedirect' @::@ 'Redirect'+--+routingRule :: Redirect -- ^ 'rrRedirect'+            -> RoutingRule+routingRule p1 = RoutingRule+    { _rrRedirect  = p1+    , _rrCondition = Nothing+    }++-- | A container for describing a condition that must be met for the specified+-- redirect to apply. For example, 1. If request is for pages in the /docs+-- folder, redirect to the /documents folder. 2. If request results in HTTP+-- error 4xx, redirect request to another host where you might process the+-- error.+rrCondition :: Lens' RoutingRule (Maybe Condition)+rrCondition = lens _rrCondition (\s a -> s { _rrCondition = a })++-- | Container for redirect information. You can redirect requests to another+-- host, to another page, or with another protocol. In the event of an+-- error, you can can specify a different error code to return.+rrRedirect :: Lens' RoutingRule Redirect+rrRedirect = lens _rrRedirect (\s a -> s { _rrRedirect = a })++instance FromXML RoutingRule where+    parseXML x = RoutingRule+        <$> x .@? "Condition"+        <*> x .@  "Redirect"++instance ToXML RoutingRule where+    toXML RoutingRule{..} = nodes "RoutingRule"+        [ "Condition" =@ _rrCondition+        , "Redirect"  =@ _rrRedirect+        ]++data NotificationConfiguration = NotificationConfiguration+    { _ncCloudFunctionConfiguration :: Maybe CloudFunctionConfiguration+    , _ncQueueConfiguration         :: Maybe QueueConfiguration+    , _ncTopicConfiguration         :: Maybe TopicConfiguration+    } deriving (Eq, Show)++-- | 'NotificationConfiguration' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'ncCloudFunctionConfiguration' @::@ 'Maybe' 'CloudFunctionConfiguration'+--+-- * 'ncQueueConfiguration' @::@ 'Maybe' 'QueueConfiguration'+--+-- * 'ncTopicConfiguration' @::@ 'Maybe' 'TopicConfiguration'+--+notificationConfiguration :: NotificationConfiguration+notificationConfiguration = NotificationConfiguration+    { _ncTopicConfiguration         = Nothing+    , _ncQueueConfiguration         = Nothing+    , _ncCloudFunctionConfiguration = Nothing+    }++ncCloudFunctionConfiguration :: Lens' NotificationConfiguration (Maybe CloudFunctionConfiguration)+ncCloudFunctionConfiguration =+    lens _ncCloudFunctionConfiguration+        (\s a -> s { _ncCloudFunctionConfiguration = a })++ncQueueConfiguration :: Lens' NotificationConfiguration (Maybe QueueConfiguration)+ncQueueConfiguration =+    lens _ncQueueConfiguration (\s a -> s { _ncQueueConfiguration = a })++ncTopicConfiguration :: Lens' NotificationConfiguration (Maybe TopicConfiguration)+ncTopicConfiguration =+    lens _ncTopicConfiguration (\s a -> s { _ncTopicConfiguration = a })++instance FromXML NotificationConfiguration where+    parseXML x = NotificationConfiguration+        <$> x .@? "CloudFunctionConfiguration"+        <*> x .@? "QueueConfiguration"+        <*> x .@? "TopicConfiguration"++instance ToXML NotificationConfiguration where+    toXML NotificationConfiguration{..} = nodes "NotificationConfiguration"+        [ "TopicConfiguration"         =@ _ncTopicConfiguration+        , "QueueConfiguration"         =@ _ncQueueConfiguration+        , "CloudFunctionConfiguration" =@ _ncCloudFunctionConfiguration+        ]++data S3ServiceError = S3ServiceError+    { _sseCode      :: Maybe Text+    , _sseKey       :: Maybe Text+    , _sseMessage   :: Maybe Text+    , _sseVersionId :: Maybe Text+    } deriving (Eq, Ord, Show)++-- | 'S3ServiceError' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'sseCode' @::@ 'Maybe' 'Text'+--+-- * 'sseKey' @::@ 'Maybe' 'Text'+--+-- * 'sseMessage' @::@ 'Maybe' 'Text'+--+-- * 'sseVersionId' @::@ 'Maybe' 'Text'+--+s3ServiceError :: S3ServiceError+s3ServiceError = S3ServiceError+    { _sseKey       = Nothing+    , _sseVersionId = Nothing+    , _sseCode      = Nothing+    , _sseMessage   = Nothing+    }++sseCode :: Lens' S3ServiceError (Maybe Text)+sseCode = lens _sseCode (\s a -> s { _sseCode = a })++sseKey :: Lens' S3ServiceError (Maybe Text)+sseKey = lens _sseKey (\s a -> s { _sseKey = a })++sseMessage :: Lens' S3ServiceError (Maybe Text)+sseMessage = lens _sseMessage (\s a -> s { _sseMessage = a })++sseVersionId :: Lens' S3ServiceError (Maybe Text)+sseVersionId = lens _sseVersionId (\s a -> s { _sseVersionId = a })++instance FromXML S3ServiceError where+    parseXML x = S3ServiceError+        <$> x .@? "Code"+        <*> x .@? "Key"+        <*> x .@? "Message"+        <*> x .@? "VersionId"++instance ToXML S3ServiceError where+    toXML S3ServiceError{..} = nodes "S3ServiceError"+        [ "Key"       =@ _sseKey+        , "VersionId" =@ _sseVersionId+        , "Code"      =@ _sseCode+        , "Message"   =@ _sseMessage+        ]++data ObjectCannedACL+    = AuthenticatedRead      -- ^ authenticated-read+    | BucketOwnerFullControl -- ^ bucket-owner-full-control+    | BucketOwnerRead        -- ^ bucket-owner-read+    | Private                -- ^ private+    | PublicRead             -- ^ public-read+    | PublicReadWrite        -- ^ public-read-write+      deriving (Eq, Ord, Show, Generic, Enum)++instance Hashable ObjectCannedACL++instance FromText ObjectCannedACL where+    parser = match "authenticated-read"        AuthenticatedRead+         <|> match "bucket-owner-full-control" BucketOwnerFullControl+         <|> match "bucket-owner-read"         BucketOwnerRead+         <|> match "private"                   Private+         <|> match "public-read"               PublicRead+         <|> match "public-read-write"         PublicReadWrite++instance ToText ObjectCannedACL where+    toText = \case+        AuthenticatedRead      -> "authenticated-read"+        BucketOwnerFullControl -> "bucket-owner-full-control"+        BucketOwnerRead        -> "bucket-owner-read"+        Private                -> "private"+        PublicRead             -> "public-read"+        PublicReadWrite        -> "public-read-write"++instance FromXML ObjectCannedACL where+    parseXML = parseXMLText "ObjectCannedACL"++instance ToXML ObjectCannedACL where+    toXML = toXMLText++data BucketVersioningStatus+    = BVSEnabled   -- ^ Enabled+    | BVSSuspended -- ^ Suspended+      deriving (Eq, Ord, Show, Generic, Enum)++instance Hashable BucketVersioningStatus++instance FromText BucketVersioningStatus where+    parser = match "Enabled"   BVSEnabled+         <|> match "Suspended" BVSSuspended++instance ToText BucketVersioningStatus where+    toText = \case+        BVSEnabled   -> "Enabled"+        BVSSuspended -> "Suspended"++instance FromXML BucketVersioningStatus where+    parseXML = parseXMLText "BucketVersioningStatus"++instance ToXML BucketVersioningStatus where+    toXML = toXMLText++data DeletedObject = DeletedObject+    { _do1DeleteMarker          :: Maybe Bool+    , _do1DeleteMarkerVersionId :: Maybe Text+    , _do1Key                   :: Maybe Text+    , _do1VersionId             :: Maybe Text+    } deriving (Eq, Ord, Show)++-- | 'DeletedObject' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'do1DeleteMarker' @::@ 'Maybe' 'Bool'+--+-- * 'do1DeleteMarkerVersionId' @::@ 'Maybe' 'Text'+--+-- * 'do1Key' @::@ 'Maybe' 'Text'+--+-- * 'do1VersionId' @::@ 'Maybe' 'Text'+--+deletedObject :: DeletedObject+deletedObject = DeletedObject+    { _do1Key                   = Nothing+    , _do1VersionId             = Nothing+    , _do1DeleteMarker          = Nothing+    , _do1DeleteMarkerVersionId = Nothing+    }++do1DeleteMarker :: Lens' DeletedObject (Maybe Bool)+do1DeleteMarker = lens _do1DeleteMarker (\s a -> s { _do1DeleteMarker = a })++do1DeleteMarkerVersionId :: Lens' DeletedObject (Maybe Text)+do1DeleteMarkerVersionId =+    lens _do1DeleteMarkerVersionId+        (\s a -> s { _do1DeleteMarkerVersionId = a })++do1Key :: Lens' DeletedObject (Maybe Text)+do1Key = lens _do1Key (\s a -> s { _do1Key = a })++do1VersionId :: Lens' DeletedObject (Maybe Text)+do1VersionId = lens _do1VersionId (\s a -> s { _do1VersionId = a })++instance FromXML DeletedObject where+    parseXML x = DeletedObject+        <$> x .@? "DeleteMarker"+        <*> x .@? "DeleteMarkerVersionId"+        <*> x .@? "Key"+        <*> x .@? "VersionId"++instance ToXML DeletedObject where+    toXML DeletedObject{..} = nodes "DeletedObject"+        [ "Key"                   =@ _do1Key+        , "VersionId"             =@ _do1VersionId+        , "DeleteMarker"          =@ _do1DeleteMarker+        , "DeleteMarkerVersionId" =@ _do1DeleteMarkerVersionId+        ]++data ObjectVersionStorageClass+    = OVSCStandard -- ^ STANDARD+      deriving (Eq, Ord, Show, Generic, Enum)++instance Hashable ObjectVersionStorageClass++instance FromText ObjectVersionStorageClass where+    parser = match "STANDARD" OVSCStandard++instance ToText ObjectVersionStorageClass where+    toText OVSCStandard = "STANDARD"++instance FromXML ObjectVersionStorageClass where+    parseXML = parseXMLText "ObjectVersionStorageClass"++instance ToXML ObjectVersionStorageClass where+    toXML = toXMLText++data CopyPartResult = CopyPartResult+    { _cprETag         :: Maybe Text+    , _cprLastModified :: Maybe RFC822+    } deriving (Eq, Ord, Show)++-- | 'CopyPartResult' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'cprETag' @::@ 'Maybe' 'Text'+--+-- * 'cprLastModified' @::@ 'Maybe' 'UTCTime'+--+copyPartResult :: CopyPartResult+copyPartResult = CopyPartResult+    { _cprETag         = Nothing+    , _cprLastModified = Nothing+    }++-- | Entity tag of the object.+cprETag :: Lens' CopyPartResult (Maybe Text)+cprETag = lens _cprETag (\s a -> s { _cprETag = a })++-- | Date and time at which the object was uploaded.+cprLastModified :: Lens' CopyPartResult (Maybe UTCTime)+cprLastModified = lens _cprLastModified (\s a -> s { _cprLastModified = a }) . mapping _Time++instance FromXML CopyPartResult where+    parseXML x = CopyPartResult+        <$> x .@? "ETag"+        <*> x .@? "LastModified"++instance ToXML CopyPartResult where+    toXML CopyPartResult{..} = nodes "CopyPartResult"+        [ "ETag"         =@ _cprETag+        , "LastModified" =@ _cprLastModified+        ]++data EncodingType+    = Url -- ^ url+      deriving (Eq, Ord, Show, Generic, Enum)++instance Hashable EncodingType++instance FromText EncodingType where+    parser = match "url" Url++instance ToText EncodingType where+    toText Url = "url"++instance FromXML EncodingType where+    parseXML = parseXMLText "EncodingType"++instance ToXML EncodingType where+    toXML = toXMLText++newtype RequestPaymentConfiguration = RequestPaymentConfiguration+    { _rpcPayer :: Text+    } deriving (Eq, Ord, Show, Monoid, IsString)++-- | 'RequestPaymentConfiguration' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'rpcPayer' @::@ 'Text'+--+requestPaymentConfiguration :: Text -- ^ 'rpcPayer'+                            -> RequestPaymentConfiguration+requestPaymentConfiguration p1 = RequestPaymentConfiguration+    { _rpcPayer = p1+    }++-- | Specifies who pays for the download and request fees.+rpcPayer :: Lens' RequestPaymentConfiguration Text+rpcPayer = lens _rpcPayer (\s a -> s { _rpcPayer = a })++instance FromXML RequestPaymentConfiguration where+    parseXML x = RequestPaymentConfiguration+        <$> x .@  "Payer"++instance ToXML RequestPaymentConfiguration where+    toXML RequestPaymentConfiguration{..} = nodes "RequestPaymentConfiguration"+        [ "Payer" =@ _rpcPayer+        ]++data CORSRule = CORSRule+    { _corsrAllowedHeaders :: List "AllowedHeader" Text+    , _corsrAllowedMethods :: List "AllowedMethod" Text+    , _corsrAllowedOrigins :: List "AllowedOrigin" Text+    , _corsrExposeHeaders  :: List "ExposeHeader" Text+    , _corsrMaxAgeSeconds  :: Maybe Int+    } deriving (Eq, Ord, Show)++-- | 'CORSRule' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'corsrAllowedHeaders' @::@ ['Text']+--+-- * 'corsrAllowedMethods' @::@ ['Text']+--+-- * 'corsrAllowedOrigins' @::@ ['Text']+--+-- * 'corsrExposeHeaders' @::@ ['Text']+--+-- * 'corsrMaxAgeSeconds' @::@ 'Maybe' 'Int'+--+corsrule :: [Text] -- ^ 'corsrAllowedHeaders'+         -> [Text] -- ^ 'corsrAllowedMethods'+         -> [Text] -- ^ 'corsrAllowedOrigins'+         -> [Text] -- ^ 'corsrExposeHeaders'+         -> CORSRule+corsrule p1 p2 p3 p4 = CORSRule+    { _corsrAllowedHeaders = withIso _List (const id) p1+    , _corsrAllowedMethods = withIso _List (const id) p2+    , _corsrAllowedOrigins = withIso _List (const id) p3+    , _corsrExposeHeaders  = withIso _List (const id) p4+    , _corsrMaxAgeSeconds  = Nothing+    }++-- | Specifies which headers are allowed in a pre-flight OPTIONS request.+corsrAllowedHeaders :: Lens' CORSRule [Text]+corsrAllowedHeaders =+    lens _corsrAllowedHeaders (\s a -> s { _corsrAllowedHeaders = a })+        . _List++-- | Identifies HTTP methods that the domain/origin specified in the rule is+-- allowed to execute.+corsrAllowedMethods :: Lens' CORSRule [Text]+corsrAllowedMethods =+    lens _corsrAllowedMethods (\s a -> s { _corsrAllowedMethods = a })+        . _List++-- | One or more origins you want customers to be able to access the bucket+-- from.+corsrAllowedOrigins :: Lens' CORSRule [Text]+corsrAllowedOrigins =+    lens _corsrAllowedOrigins (\s a -> s { _corsrAllowedOrigins = a })+        . _List++-- | One or more headers in the response that you want customers to be able to+-- access from their applications (for example, from a JavaScript+-- XMLHttpRequest object).+corsrExposeHeaders :: Lens' CORSRule [Text]+corsrExposeHeaders =+    lens _corsrExposeHeaders (\s a -> s { _corsrExposeHeaders = a })+        . _List++-- | The time in seconds that your browser is to cache the preflight response+-- for the specified resource.+corsrMaxAgeSeconds :: Lens' CORSRule (Maybe Int)+corsrMaxAgeSeconds =+    lens _corsrMaxAgeSeconds (\s a -> s { _corsrMaxAgeSeconds = a })++instance FromXML CORSRule where+    parseXML x = CORSRule+        <$> parseXML x+        <*> parseXML x+        <*> parseXML x+        <*> parseXML x+        <*> x .@? "MaxAgeSeconds"++instance ToXML CORSRule where+    toXML CORSRule{..} = nodes "CORSRule"+        [ unsafeToXML        _corsrAllowedHeaders+        , unsafeToXML        _corsrAllowedMethods+        , unsafeToXML        _corsrAllowedOrigins+        , unsafeToXML        _corsrExposeHeaders+        , "MaxAgeSeconds" =@ _corsrMaxAgeSeconds+        ]++data WebsiteConfiguration = WebsiteConfiguration+    { _wcErrorDocument         :: Maybe ErrorDocument+    , _wcIndexDocument         :: Maybe IndexDocument+    , _wcRedirectAllRequestsTo :: Maybe RedirectAllRequestsTo+    , _wcRoutingRules          :: List "RoutingRule" RoutingRule+    } deriving (Eq, Show)++-- | 'WebsiteConfiguration' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'wcErrorDocument' @::@ 'Maybe' 'ErrorDocument'+--+-- * 'wcIndexDocument' @::@ 'Maybe' 'IndexDocument'+--+-- * 'wcRedirectAllRequestsTo' @::@ 'Maybe' 'RedirectAllRequestsTo'+--+-- * 'wcRoutingRules' @::@ ['RoutingRule']+--+websiteConfiguration :: WebsiteConfiguration+websiteConfiguration = WebsiteConfiguration+    { _wcErrorDocument         = Nothing+    , _wcIndexDocument         = Nothing+    , _wcRedirectAllRequestsTo = Nothing+    , _wcRoutingRules          = mempty+    }++wcErrorDocument :: Lens' WebsiteConfiguration (Maybe ErrorDocument)+wcErrorDocument = lens _wcErrorDocument (\s a -> s { _wcErrorDocument = a })++wcIndexDocument :: Lens' WebsiteConfiguration (Maybe IndexDocument)+wcIndexDocument = lens _wcIndexDocument (\s a -> s { _wcIndexDocument = a })++wcRedirectAllRequestsTo :: Lens' WebsiteConfiguration (Maybe RedirectAllRequestsTo)+wcRedirectAllRequestsTo =+    lens _wcRedirectAllRequestsTo (\s a -> s { _wcRedirectAllRequestsTo = a })++wcRoutingRules :: Lens' WebsiteConfiguration [RoutingRule]+wcRoutingRules = lens _wcRoutingRules (\s a -> s { _wcRoutingRules = a }) . _List++instance FromXML WebsiteConfiguration where+    parseXML x = WebsiteConfiguration+        <$> x .@? "ErrorDocument"+        <*> x .@? "IndexDocument"+        <*> x .@? "RedirectAllRequestsTo"+        <*> x .@  "RoutingRules"++instance ToXML WebsiteConfiguration where+    toXML WebsiteConfiguration{..} = nodes "WebsiteConfiguration"+        [ "ErrorDocument"         =@ _wcErrorDocument+        , "IndexDocument"         =@ _wcIndexDocument+        , "RedirectAllRequestsTo" =@ _wcRedirectAllRequestsTo+        , "RoutingRules"          =@ _wcRoutingRules+        ]++data NoncurrentVersionTransition = NoncurrentVersionTransition+    { _nvtNoncurrentDays :: Int+    , _nvtStorageClass   :: Text+    } deriving (Eq, Ord, Show)++-- | 'NoncurrentVersionTransition' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'nvtNoncurrentDays' @::@ 'Int'+--+-- * 'nvtStorageClass' @::@ 'Text'+--+noncurrentVersionTransition :: Int -- ^ 'nvtNoncurrentDays'+                            -> Text -- ^ 'nvtStorageClass'+                            -> NoncurrentVersionTransition+noncurrentVersionTransition p1 p2 = NoncurrentVersionTransition+    { _nvtNoncurrentDays = p1+    , _nvtStorageClass   = p2+    }++-- | Specifies the number of days an object is noncurrent before Amazon S3 can+-- perform the associated action. For information about the noncurrent days+-- calculations, see How Amazon S3 Calculates When an Object Became+-- Noncurrent in the Amazon Simple Storage Service Developer Guide.+nvtNoncurrentDays :: Lens' NoncurrentVersionTransition Int+nvtNoncurrentDays =+    lens _nvtNoncurrentDays (\s a -> s { _nvtNoncurrentDays = a })++-- | The class of storage used to store the object.+nvtStorageClass :: Lens' NoncurrentVersionTransition Text+nvtStorageClass = lens _nvtStorageClass (\s a -> s { _nvtStorageClass = a })++instance FromXML NoncurrentVersionTransition where+    parseXML x = NoncurrentVersionTransition+        <$> x .@  "NoncurrentDays"+        <*> x .@  "StorageClass"++instance ToXML NoncurrentVersionTransition where+    toXML NoncurrentVersionTransition{..} = nodes "NoncurrentVersionTransition"+        [ "NoncurrentDays" =@ _nvtNoncurrentDays+        , "StorageClass"   =@ _nvtStorageClass+        ]++data Initiator = Initiator+    { _iDisplayName :: Maybe Text+    , _iID          :: Maybe Text+    } deriving (Eq, Ord, Show)++-- | 'Initiator' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'iDisplayName' @::@ 'Maybe' 'Text'+--+-- * 'iID' @::@ 'Maybe' 'Text'+--+initiator :: Initiator+initiator = Initiator+    { _iID          = Nothing+    , _iDisplayName = Nothing+    }++-- | Name of the Principal.+iDisplayName :: Lens' Initiator (Maybe Text)+iDisplayName = lens _iDisplayName (\s a -> s { _iDisplayName = a })++-- | If the principal is an AWS account, it provides the Canonical User ID. If+-- the principal is an IAM User, it provides a user ARN value.+iID :: Lens' Initiator (Maybe Text)+iID = lens _iID (\s a -> s { _iID = a })++instance FromXML Initiator where+    parseXML x = Initiator+        <$> x .@? "DisplayName"+        <*> x .@? "ID"++instance ToXML Initiator where+    toXML Initiator{..} = nodes "Initiator"+        [ "ID"          =@ _iID+        , "DisplayName" =@ _iDisplayName+        ]++data ObjectIdentifier = ObjectIdentifier+    { _oiKey       :: Text+    , _oiVersionId :: Maybe Text+    } deriving (Eq, Ord, Show)++-- | 'ObjectIdentifier' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'oiKey' @::@ 'Text'+--+-- * 'oiVersionId' @::@ 'Maybe' 'Text'+--+objectIdentifier :: Text -- ^ 'oiKey'+                 -> ObjectIdentifier+objectIdentifier p1 = ObjectIdentifier+    { _oiKey       = p1+    , _oiVersionId = Nothing+    }++-- | Key name of the object to delete.+oiKey :: Lens' ObjectIdentifier Text+oiKey = lens _oiKey (\s a -> s { _oiKey = a })++-- | VersionId for the specific version of the object to delete.+oiVersionId :: Lens' ObjectIdentifier (Maybe Text)+oiVersionId = lens _oiVersionId (\s a -> s { _oiVersionId = a })++instance FromXML ObjectIdentifier where+    parseXML x = ObjectIdentifier+        <$> x .@  "Key"+        <*> x .@? "VersionId"++instance ToXML ObjectIdentifier where+    toXML ObjectIdentifier{..} = nodes "ObjectIdentifier"+        [ "Key"       =@ _oiKey+        , "VersionId" =@ _oiVersionId+        ]++data Bucket = Bucket+    { _bCreationDate :: Maybe RFC822+    , _bName         :: Maybe Text+    } deriving (Eq, Ord, Show)++-- | 'Bucket' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'bCreationDate' @::@ 'Maybe' 'UTCTime'+--+-- * 'bName' @::@ 'Maybe' 'Text'+--+bucket :: Bucket+bucket = Bucket+    { _bName         = Nothing+    , _bCreationDate = Nothing+    }++-- | Date the bucket was created.+bCreationDate :: Lens' Bucket (Maybe UTCTime)+bCreationDate = lens _bCreationDate (\s a -> s { _bCreationDate = a }) . mapping _Time++-- | The name of the bucket.+bName :: Lens' Bucket (Maybe Text)+bName = lens _bName (\s a -> s { _bName = a })++instance FromXML Bucket where+    parseXML x = Bucket+        <$> x .@? "CreationDate"+        <*> x .@? "Name"++instance ToXML Bucket where+    toXML Bucket{..} = nodes "Bucket"+        [ "Name"         =@ _bName+        , "CreationDate" =@ _bCreationDate+        ]++data Protocol+    = Http  -- ^ http+    | Https -- ^ https+      deriving (Eq, Ord, Show, Generic, Enum)++instance Hashable Protocol++instance FromText Protocol where+    parser = match "http"  Http+         <|> match "https" Https++instance ToText Protocol where+    toText = \case+        Http  -> "http"+        Https -> "https"++instance FromXML Protocol where+    parseXML = parseXMLText "Protocol"++instance ToXML Protocol where+    toXML = toXMLText++data Grant = Grant+    { _gGrantee    :: Maybe Grantee+    , _gPermission :: Maybe Text+    } deriving (Eq, Show)++-- | 'Grant' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'gGrantee' @::@ 'Maybe' 'Grantee'+--+-- * 'gPermission' @::@ 'Maybe' 'Text'+--+grant :: Grant+grant = Grant+    { _gGrantee    = Nothing+    , _gPermission = Nothing+    }++gGrantee :: Lens' Grant (Maybe Grantee)+gGrantee = lens _gGrantee (\s a -> s { _gGrantee = a })++-- | Specifies the permission given to the grantee.+gPermission :: Lens' Grant (Maybe Text)+gPermission = lens _gPermission (\s a -> s { _gPermission = a })++instance FromXML Grant where+    parseXML x = Grant+        <$> x .@? "Grantee"+        <*> x .@? "Permission"++instance ToXMLRoot Grant where+    toXMLRoot Grant{..} = namespaced ns "Grant"+        [ "Grantee"    =@ _gGrantee+        , "Permission" =@ _gPermission+        ]++instance ToXML Grant++data Rule = Rule+    { _rExpiration                  :: Maybe LifecycleExpiration+    , _rID                          :: Maybe Text+    , _rNoncurrentVersionExpiration :: Maybe NoncurrentVersionExpiration+    , _rNoncurrentVersionTransition :: Maybe NoncurrentVersionTransition+    , _rPrefix                      :: Text+    , _rStatus                      :: Text+    , _rTransition                  :: Maybe Transition+    } deriving (Eq, Show)++-- | 'Rule' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'rExpiration' @::@ 'Maybe' 'LifecycleExpiration'+--+-- * 'rID' @::@ 'Maybe' 'Text'+--+-- * 'rNoncurrentVersionExpiration' @::@ 'Maybe' 'NoncurrentVersionExpiration'+--+-- * 'rNoncurrentVersionTransition' @::@ 'Maybe' 'NoncurrentVersionTransition'+--+-- * 'rPrefix' @::@ 'Text'+--+-- * 'rStatus' @::@ 'Text'+--+-- * 'rTransition' @::@ 'Maybe' 'Transition'+--+rule :: Text -- ^ 'rPrefix'+     -> Text -- ^ 'rStatus'+     -> Rule+rule p1 p2 = Rule+    { _rPrefix                      = p1+    , _rStatus                      = p2+    , _rExpiration                  = Nothing+    , _rID                          = Nothing+    , _rTransition                  = Nothing+    , _rNoncurrentVersionTransition = Nothing+    , _rNoncurrentVersionExpiration = Nothing+    }++rExpiration :: Lens' Rule (Maybe LifecycleExpiration)+rExpiration = lens _rExpiration (\s a -> s { _rExpiration = a })++-- | Unique identifier for the rule. The value cannot be longer than 255+-- characters.+rID :: Lens' Rule (Maybe Text)+rID = lens _rID (\s a -> s { _rID = a })++rNoncurrentVersionExpiration :: Lens' Rule (Maybe NoncurrentVersionExpiration)+rNoncurrentVersionExpiration =+    lens _rNoncurrentVersionExpiration+        (\s a -> s { _rNoncurrentVersionExpiration = a })++rNoncurrentVersionTransition :: Lens' Rule (Maybe NoncurrentVersionTransition)+rNoncurrentVersionTransition =+    lens _rNoncurrentVersionTransition+        (\s a -> s { _rNoncurrentVersionTransition = a })++-- | Prefix identifying one or more objects to which the rule applies.+rPrefix :: Lens' Rule Text+rPrefix = lens _rPrefix (\s a -> s { _rPrefix = a })++-- | If 'Enabled', the rule is currently being applied. If 'Disabled', the+-- rule is not currently being applied.+rStatus :: Lens' Rule Text+rStatus = lens _rStatus (\s a -> s { _rStatus = a })++rTransition :: Lens' Rule (Maybe Transition)+rTransition = lens _rTransition (\s a -> s { _rTransition = a })++instance FromXML Rule where+    parseXML x = Rule+        <$> x .@? "Expiration"+        <*> x .@? "ID"+        <*> x .@? "NoncurrentVersionExpiration"+        <*> x .@? "NoncurrentVersionTransition"+        <*> x .@  "Prefix"+        <*> x .@  "Status"+        <*> x .@? "Transition"++instance ToXML Rule where+    toXML Rule{..} = nodes "Rule"+        [ "Expiration"                  =@ _rExpiration+        , "ID"                          =@ _rID+        , "Prefix"                      =@ _rPrefix+        , "Status"                      =@ _rStatus+        , "Transition"                  =@ _rTransition+        , "NoncurrentVersionTransition" =@ _rNoncurrentVersionTransition+        , "NoncurrentVersionExpiration" =@ _rNoncurrentVersionExpiration+        ]++data TopicConfiguration = TopicConfiguration+    { _tcEvent  :: Maybe Text+    , _tcEvents :: List "Event" Text+    , _tcId     :: Maybe Text+    , _tcTopic  :: Maybe Text+    } deriving (Eq, Ord, Show)++-- | 'TopicConfiguration' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'tcEvent' @::@ 'Maybe' 'Text'+--+-- * 'tcEvents' @::@ ['Text']+--+-- * 'tcId' @::@ 'Maybe' 'Text'+--+-- * 'tcTopic' @::@ 'Maybe' 'Text'+--+topicConfiguration :: [Text] -- ^ 'tcEvents'+                   -> TopicConfiguration+topicConfiguration p1 = TopicConfiguration+    { _tcEvents = withIso _List (const id) p1+    , _tcId     = Nothing+    , _tcEvent  = Nothing+    , _tcTopic  = Nothing+    }++-- | Bucket event for which to send notifications.+tcEvent :: Lens' TopicConfiguration (Maybe Text)+tcEvent = lens _tcEvent (\s a -> s { _tcEvent = a })++tcEvents :: Lens' TopicConfiguration [Text]+tcEvents = lens _tcEvents (\s a -> s { _tcEvents = a }) . _List++tcId :: Lens' TopicConfiguration (Maybe Text)+tcId = lens _tcId (\s a -> s { _tcId = a })++-- | Amazon SNS topic to which Amazon S3 will publish a message to report the+-- specified events for the bucket.+tcTopic :: Lens' TopicConfiguration (Maybe Text)+tcTopic = lens _tcTopic (\s a -> s { _tcTopic = a })++instance FromXML TopicConfiguration where+    parseXML x = TopicConfiguration+        <$> x .@? "Event"+        <*> parseXML x+        <*> x .@? "Id"+        <*> x .@? "Topic"++instance ToXML TopicConfiguration where+    toXML TopicConfiguration{..} = nodes "TopicConfiguration"+        [ "Id"    =@ _tcId+        , unsafeToXML     _tcEvents+        , "Event" =@ _tcEvent+        , "Topic" =@ _tcTopic+        ]++data QueueConfiguration = QueueConfiguration+    { _qcEvent  :: Maybe Text+    , _qcEvents :: List "Event" Text+    , _qcId     :: Maybe Text+    , _qcQueue  :: Maybe Text+    } deriving (Eq, Ord, Show)++-- | 'QueueConfiguration' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'qcEvent' @::@ 'Maybe' 'Text'+--+-- * 'qcEvents' @::@ ['Text']+--+-- * 'qcId' @::@ 'Maybe' 'Text'+--+-- * 'qcQueue' @::@ 'Maybe' 'Text'+--+queueConfiguration :: [Text] -- ^ 'qcEvents'+                   -> QueueConfiguration+queueConfiguration p1 = QueueConfiguration+    { _qcEvents = withIso _List (const id) p1+    , _qcId     = Nothing+    , _qcEvent  = Nothing+    , _qcQueue  = Nothing+    }++qcEvent :: Lens' QueueConfiguration (Maybe Text)+qcEvent = lens _qcEvent (\s a -> s { _qcEvent = a })++qcEvents :: Lens' QueueConfiguration [Text]+qcEvents = lens _qcEvents (\s a -> s { _qcEvents = a }) . _List++qcId :: Lens' QueueConfiguration (Maybe Text)+qcId = lens _qcId (\s a -> s { _qcId = a })++qcQueue :: Lens' QueueConfiguration (Maybe Text)+qcQueue = lens _qcQueue (\s a -> s { _qcQueue = a })++instance FromXML QueueConfiguration where+    parseXML x = QueueConfiguration+        <$> x .@? "Event"+        <*> parseXML x+        <*> x .@? "Id"+        <*> x .@? "Queue"++instance ToXML QueueConfiguration where+    toXML QueueConfiguration{..} = nodes "QueueConfiguration"+        [ "Id"    =@ _qcId+        , "Event" =@ _qcEvent+        , unsafeToXML     _qcEvents+        , "Queue" =@ _qcQueue+        ]++data Owner = Owner+    { _oDisplayName :: Maybe Text+    , _oID          :: Maybe Text+    } deriving (Eq, Ord, Show)++-- | 'Owner' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'oDisplayName' @::@ 'Maybe' 'Text'+--+-- * 'oID' @::@ 'Maybe' 'Text'+--+owner :: Owner+owner = Owner+    { _oDisplayName = Nothing+    , _oID          = Nothing+    }++oDisplayName :: Lens' Owner (Maybe Text)+oDisplayName = lens _oDisplayName (\s a -> s { _oDisplayName = a })++oID :: Lens' Owner (Maybe Text)+oID = lens _oID (\s a -> s { _oID = a })++instance FromXML Owner where+    parseXML x = Owner+        <$> x .@? "DisplayName"+        <*> x .@? "ID"++instance ToXMLRoot Owner where+    toXMLRoot Owner{..} = namespaced ns "Owner"+        [ "DisplayName" =@ _oDisplayName+        , "ID"          =@ _oID+        ]++instance ToXML Owner++newtype BucketLoggingStatus = BucketLoggingStatus+    { _blsLoggingEnabled :: Maybe LoggingEnabled+    } deriving (Eq, Show)++-- | 'BucketLoggingStatus' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'blsLoggingEnabled' @::@ 'Maybe' 'LoggingEnabled'+--+bucketLoggingStatus :: BucketLoggingStatus+bucketLoggingStatus = BucketLoggingStatus+    { _blsLoggingEnabled = Nothing+    }++blsLoggingEnabled :: Lens' BucketLoggingStatus (Maybe LoggingEnabled)+blsLoggingEnabled =+    lens _blsLoggingEnabled (\s a -> s { _blsLoggingEnabled = a })++instance FromXML BucketLoggingStatus where+    parseXML x = BucketLoggingStatus+        <$> x .@? "LoggingEnabled"++instance ToXML BucketLoggingStatus where+    toXML BucketLoggingStatus{..} = nodes "BucketLoggingStatus"+        [ "LoggingEnabled" =@ _blsLoggingEnabled+        ]++newtype ErrorDocument = ErrorDocument+    { _edKey :: Text+    } deriving (Eq, Ord, Show, Monoid, IsString)++-- | 'ErrorDocument' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'edKey' @::@ 'Text'+--+errorDocument :: Text -- ^ 'edKey'+              -> ErrorDocument+errorDocument p1 = ErrorDocument+    { _edKey = p1+    }++-- | The object key name to use when a 4XX class error occurs.+edKey :: Lens' ErrorDocument Text+edKey = lens _edKey (\s a -> s { _edKey = a })++instance FromXML ErrorDocument where+    parseXML x = ErrorDocument+        <$> x .@  "Key"++instance ToXML ErrorDocument where+    toXML ErrorDocument{..} = nodes "ErrorDocument"+        [ "Key" =@ _edKey+        ]++data StorageClass+    = SCReducedRedundancy -- ^ REDUCED_REDUNDANCY+    | SCStandard          -- ^ STANDARD+      deriving (Eq, Ord, Show, Generic, Enum)++instance Hashable StorageClass++instance FromText StorageClass where+    parser = match "REDUCED_REDUNDANCY" SCReducedRedundancy+         <|> match "STANDARD"           SCStandard++instance ToText StorageClass where+    toText = \case+        SCReducedRedundancy -> "REDUCED_REDUNDANCY"+        SCStandard          -> "STANDARD"++instance FromXML StorageClass where+    parseXML = parseXMLText "StorageClass"++instance ToXML StorageClass where+    toXML = toXMLText++data ObjectVersion = ObjectVersion+    { _ovETag         :: Maybe Text+    , _ovIsLatest     :: Maybe Bool+    , _ovKey          :: Maybe Text+    , _ovLastModified :: Maybe RFC822+    , _ovOwner        :: Maybe Owner+    , _ovSize         :: Maybe Int+    , _ovStorageClass :: Maybe Text+    , _ovVersionId    :: Maybe Text+    } deriving (Eq, Show)++-- | 'ObjectVersion' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'ovETag' @::@ 'Maybe' 'Text'+--+-- * 'ovIsLatest' @::@ 'Maybe' 'Bool'+--+-- * 'ovKey' @::@ 'Maybe' 'Text'+--+-- * 'ovLastModified' @::@ 'Maybe' 'UTCTime'+--+-- * 'ovOwner' @::@ 'Maybe' 'Owner'+--+-- * 'ovSize' @::@ 'Maybe' 'Int'+--+-- * 'ovStorageClass' @::@ 'Maybe' 'Text'+--+-- * 'ovVersionId' @::@ 'Maybe' 'Text'+--+objectVersion :: ObjectVersion+objectVersion = ObjectVersion+    { _ovETag         = Nothing+    , _ovSize         = Nothing+    , _ovStorageClass = Nothing+    , _ovKey          = Nothing+    , _ovVersionId    = Nothing+    , _ovIsLatest     = Nothing+    , _ovLastModified = Nothing+    , _ovOwner        = Nothing+    }++ovETag :: Lens' ObjectVersion (Maybe Text)+ovETag = lens _ovETag (\s a -> s { _ovETag = a })++-- | Specifies whether the object is (true) or is not (false) the latest+-- version of an object.+ovIsLatest :: Lens' ObjectVersion (Maybe Bool)+ovIsLatest = lens _ovIsLatest (\s a -> s { _ovIsLatest = a })++-- | The object key.+ovKey :: Lens' ObjectVersion (Maybe Text)+ovKey = lens _ovKey (\s a -> s { _ovKey = a })++-- | Date and time the object was last modified.+ovLastModified :: Lens' ObjectVersion (Maybe UTCTime)+ovLastModified = lens _ovLastModified (\s a -> s { _ovLastModified = a }) . mapping _Time++ovOwner :: Lens' ObjectVersion (Maybe Owner)+ovOwner = lens _ovOwner (\s a -> s { _ovOwner = a })++-- | Size in bytes of the object.+ovSize :: Lens' ObjectVersion (Maybe Int)+ovSize = lens _ovSize (\s a -> s { _ovSize = a })++-- | The class of storage used to store the object.+ovStorageClass :: Lens' ObjectVersion (Maybe Text)+ovStorageClass = lens _ovStorageClass (\s a -> s { _ovStorageClass = a })++-- | Version ID of an object.+ovVersionId :: Lens' ObjectVersion (Maybe Text)+ovVersionId = lens _ovVersionId (\s a -> s { _ovVersionId = a })++instance FromXML ObjectVersion where+    parseXML x = ObjectVersion+        <$> x .@? "ETag"+        <*> x .@? "IsLatest"+        <*> x .@? "Key"+        <*> x .@? "LastModified"+        <*> x .@? "Owner"+        <*> x .@? "Size"+        <*> x .@? "StorageClass"+        <*> x .@? "VersionId"++instance ToXML ObjectVersion where+    toXML ObjectVersion{..} = nodes "ObjectVersion"+        [ "ETag"         =@ _ovETag+        , "Size"         =@ _ovSize+        , "StorageClass" =@ _ovStorageClass+        , "Key"          =@ _ovKey+        , "VersionId"    =@ _ovVersionId+        , "IsLatest"     =@ _ovIsLatest+        , "LastModified" =@ _ovLastModified+        , "Owner"        =@ _ovOwner+        ]++data TargetGrant = TargetGrant+    { _tgGrantee    :: Maybe Grantee+    , _tgPermission :: Maybe Text+    } deriving (Eq, Show)++-- | 'TargetGrant' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'tgGrantee' @::@ 'Maybe' 'Grantee'+--+-- * 'tgPermission' @::@ 'Maybe' 'Text'+--+targetGrant :: TargetGrant+targetGrant = TargetGrant+    { _tgGrantee    = Nothing+    , _tgPermission = Nothing+    }++tgGrantee :: Lens' TargetGrant (Maybe Grantee)+tgGrantee = lens _tgGrantee (\s a -> s { _tgGrantee = a })++-- | Logging permissions assigned to the Grantee for the bucket.+tgPermission :: Lens' TargetGrant (Maybe Text)+tgPermission = lens _tgPermission (\s a -> s { _tgPermission = a })++instance FromXML TargetGrant where+    parseXML x = TargetGrant+        <$> x .@? "Grantee"+        <*> x .@? "Permission"++instance ToXML TargetGrant where+    toXML TargetGrant{..} = nodes "TargetGrant"+        [ "Grantee"    =@ _tgGrantee+        , "Permission" =@ _tgPermission+        ]++data MFADeleteStatus+    = MFADSDisabled -- ^ Disabled+    | MFADSEnabled  -- ^ Enabled+      deriving (Eq, Ord, Show, Generic, Enum)++instance Hashable MFADeleteStatus++instance FromText MFADeleteStatus where+    parser = match "Disabled" MFADSDisabled+         <|> match "Enabled"  MFADSEnabled++instance ToText MFADeleteStatus where+    toText = \case+        MFADSDisabled -> "Disabled"+        MFADSEnabled  -> "Enabled"++instance FromXML MFADeleteStatus where+    parseXML = parseXMLText "MFADeleteStatus"++instance ToXML MFADeleteStatus where+    toXML = toXMLText++data Payer+    = BucketOwner -- ^ BucketOwner+    | Requester   -- ^ Requester+      deriving (Eq, Ord, Show, Generic, Enum)++instance Hashable Payer++instance FromText Payer where+    parser = match "BucketOwner" BucketOwner+         <|> match "Requester"   Requester++instance ToText Payer where+    toText = \case+        BucketOwner -> "BucketOwner"+        Requester   -> "Requester"++instance FromXML Payer where+    parseXML = parseXMLText "Payer"++instance ToXML Payer where+    toXML = toXMLText++data Redirect = Redirect+    { _rHostName             :: Maybe Text+    , _rHttpRedirectCode     :: Maybe Text+    , _rProtocol             :: Maybe Text+    , _rReplaceKeyPrefixWith :: Maybe Text+    , _rReplaceKeyWith       :: Maybe Text+    } deriving (Eq, Ord, Show)++-- | 'Redirect' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'rHostName' @::@ 'Maybe' 'Text'+--+-- * 'rHttpRedirectCode' @::@ 'Maybe' 'Text'+--+-- * 'rProtocol' @::@ 'Maybe' 'Text'+--+-- * 'rReplaceKeyPrefixWith' @::@ 'Maybe' 'Text'+--+-- * 'rReplaceKeyWith' @::@ 'Maybe' 'Text'+--+redirect :: Redirect+redirect = Redirect+    { _rHostName             = Nothing+    , _rHttpRedirectCode     = Nothing+    , _rProtocol             = Nothing+    , _rReplaceKeyPrefixWith = Nothing+    , _rReplaceKeyWith       = Nothing+    }++-- | The host name to use in the redirect request.+rHostName :: Lens' Redirect (Maybe Text)+rHostName = lens _rHostName (\s a -> s { _rHostName = a })++-- | The HTTP redirect code to use on the response. Not required if one of the+-- siblings is present.+rHttpRedirectCode :: Lens' Redirect (Maybe Text)+rHttpRedirectCode =+    lens _rHttpRedirectCode (\s a -> s { _rHttpRedirectCode = a })++-- | Protocol to use (http, https) when redirecting requests. The default is+-- the protocol that is used in the original request.+rProtocol :: Lens' Redirect (Maybe Text)+rProtocol = lens _rProtocol (\s a -> s { _rProtocol = a })++-- | The object key prefix to use in the redirect request. For example, to+-- redirect requests for all pages with prefix docs/ (objects in the docs/+-- folder) to documents/, you can set a condition block with KeyPrefixEquals+-- set to docs/ and in the Redirect set ReplaceKeyPrefixWith to /documents.+-- Not required if one of the siblings is present. Can be present only if+-- ReplaceKeyWith is not provided.+rReplaceKeyPrefixWith :: Lens' Redirect (Maybe Text)+rReplaceKeyPrefixWith =+    lens _rReplaceKeyPrefixWith (\s a -> s { _rReplaceKeyPrefixWith = a })++-- | The specific object key to use in the redirect request. For example,+-- redirect request to error.html. Not required if one of the sibling is+-- present. Can be present only if ReplaceKeyPrefixWith is not provided.+rReplaceKeyWith :: Lens' Redirect (Maybe Text)+rReplaceKeyWith = lens _rReplaceKeyWith (\s a -> s { _rReplaceKeyWith = a })++instance FromXML Redirect where+    parseXML x = Redirect+        <$> x .@? "HostName"+        <*> x .@? "HttpRedirectCode"+        <*> x .@? "Protocol"+        <*> x .@? "ReplaceKeyPrefixWith"+        <*> x .@? "ReplaceKeyWith"++instance ToXML Redirect where+    toXML Redirect{..} = nodes "Redirect"+        [ "HostName"             =@ _rHostName+        , "HttpRedirectCode"     =@ _rHttpRedirectCode+        , "Protocol"             =@ _rProtocol+        , "ReplaceKeyPrefixWith" =@ _rReplaceKeyPrefixWith+        , "ReplaceKeyWith"       =@ _rReplaceKeyWith+        ]++data BucketLogsPermission+    = FullControl -- ^ FULL_CONTROL+    | Read        -- ^ READ+    | Write       -- ^ WRITE+      deriving (Eq, Ord, Show, Generic, Enum)++instance Hashable BucketLogsPermission++instance FromText BucketLogsPermission where+    parser = match "FULL_CONTROL" FullControl+         <|> match "READ"         Read+         <|> match "WRITE"        Write++instance ToText BucketLogsPermission where+    toText = \case+        FullControl -> "FULL_CONTROL"+        Read        -> "READ"+        Write       -> "WRITE"++instance FromXML BucketLogsPermission where+    parseXML = parseXMLText "BucketLogsPermission"++instance ToXML BucketLogsPermission where+    toXML = toXMLText++data CompletedPart = CompletedPart+    { _cpETag       :: Maybe Text+    , _cpPartNumber :: Maybe Int+    } deriving (Eq, Ord, Show)++-- | 'CompletedPart' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'cpETag' @::@ 'Maybe' 'Text'+--+-- * 'cpPartNumber' @::@ 'Maybe' 'Int'+--+completedPart :: CompletedPart+completedPart = CompletedPart+    { _cpETag       = Nothing+    , _cpPartNumber = Nothing+    }++-- | Entity tag returned when the part was uploaded.+cpETag :: Lens' CompletedPart (Maybe Text)+cpETag = lens _cpETag (\s a -> s { _cpETag = a })++-- | Part number that identifies the part.+cpPartNumber :: Lens' CompletedPart (Maybe Int)+cpPartNumber = lens _cpPartNumber (\s a -> s { _cpPartNumber = a })++instance FromXML CompletedPart where+    parseXML x = CompletedPart+        <$> x .@? "ETag"+        <*> x .@? "PartNumber"++instance ToXML CompletedPart where+    toXML CompletedPart{..} = nodes "CompletedPart"+        [ "ETag"       =@ _cpETag+        , "PartNumber" =@ _cpPartNumber+        ]++newtype CreateBucketConfiguration = CreateBucketConfiguration+    { _cbcLocationConstraint :: Maybe Text+    } deriving (Eq, Ord, Show, Monoid)++-- | 'CreateBucketConfiguration' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'cbcLocationConstraint' @::@ 'Maybe' 'Text'+--+createBucketConfiguration :: CreateBucketConfiguration+createBucketConfiguration = CreateBucketConfiguration+    { _cbcLocationConstraint = Nothing+    }++-- | Specifies the region where the bucket will be created.+cbcLocationConstraint :: Lens' CreateBucketConfiguration (Maybe Text)+cbcLocationConstraint =+    lens _cbcLocationConstraint (\s a -> s { _cbcLocationConstraint = a })++instance FromXML CreateBucketConfiguration where+    parseXML x = CreateBucketConfiguration+        <$> x .@? "LocationConstraint"++instance ToXML CreateBucketConfiguration where+    toXML CreateBucketConfiguration{..} = nodes "CreateBucketConfiguration"+        [ "LocationConstraint" =@ _cbcLocationConstraint+        ]++newtype Tagging = Tagging+    { _tTagSet :: List "Tag" Tag+    } deriving (Eq, Show, Monoid, Semigroup)++instance GHC.Exts.IsList Tagging where+    type Item Tagging = Tag++    fromList = Tagging . GHC.Exts.fromList+    toList   = GHC.Exts.toList . _tTagSet++-- | 'Tagging' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'tTagSet' @::@ ['Tag']+--+tagging :: Tagging+tagging = Tagging+    { _tTagSet = mempty+    }++tTagSet :: Lens' Tagging [Tag]+tTagSet = lens _tTagSet (\s a -> s { _tTagSet = a }) . _List++instance FromXML Tagging where+    parseXML x = Tagging+        <$> x .@  "TagSet"++instance ToXML Tagging where+    toXML Tagging{..} = nodes "Tagging"+        [ "TagSet" =@ _tTagSet+        ]++data LifecycleExpiration = LifecycleExpiration+    { _leDate :: Maybe ISO8601+    , _leDays :: Maybe Int+    } deriving (Eq, Ord, Show)++-- | 'LifecycleExpiration' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'leDate' @::@ 'Maybe' 'UTCTime'+--+-- * 'leDays' @::@ 'Maybe' 'Int'+--+lifecycleExpiration :: LifecycleExpiration+lifecycleExpiration = LifecycleExpiration+    { _leDate = Nothing+    , _leDays = Nothing+    }++-- | Indicates at what date the object is to be moved or deleted. Should be in+-- GMT ISO 8601 Format.+leDate :: Lens' LifecycleExpiration (Maybe UTCTime)+leDate = lens _leDate (\s a -> s { _leDate = a }) . mapping _Time++-- | Indicates the lifetime, in days, of the objects that are subject to the+-- rule. The value must be a non-zero positive integer.+leDays :: Lens' LifecycleExpiration (Maybe Int)+leDays = lens _leDays (\s a -> s { _leDays = a })++instance FromXML LifecycleExpiration where+    parseXML x = LifecycleExpiration+        <$> x .@? "Date"+        <*> x .@? "Days"++instance ToXML LifecycleExpiration where+    toXML LifecycleExpiration{..} = nodes "LifecycleExpiration"+        [ "Date" =@ _leDate+        , "Days" =@ _leDays+        ]++newtype CORSConfiguration = CORSConfiguration+    { _corscCORSRules :: List "CORSRule" CORSRule+    } deriving (Eq, Show, Monoid, Semigroup)++-- | 'CORSConfiguration' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'corscCORSRules' @::@ ['CORSRule']+--+corsconfiguration :: [CORSRule] -- ^ 'corscCORSRules'+                  -> CORSConfiguration+corsconfiguration p1 = CORSConfiguration+    { _corscCORSRules = withIso _List (const id) p1+    }++corscCORSRules :: Lens' CORSConfiguration [CORSRule]+corscCORSRules = lens _corscCORSRules (\s a -> s { _corscCORSRules = a }) . _List++instance FromXML CORSConfiguration where+    parseXML x = CORSConfiguration+        <$> parseXML x++instance ToXML CORSConfiguration where+    toXML CORSConfiguration{..} = nodes "CORSConfiguration"+        [ unsafeToXML     _corscCORSRules+        ]++data Object = Object+    { _oETag         :: Text+    , _oKey          :: Text+    , _oLastModified :: RFC822+    , _oOwner        :: Owner+    , _oSize         :: Int+    , _oStorageClass :: Text+    } deriving (Eq, Show)++-- | 'Object' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'oETag' @::@ 'Text'+--+-- * 'oKey' @::@ 'Text'+--+-- * 'oLastModified' @::@ 'UTCTime'+--+-- * 'oOwner' @::@ 'Owner'+--+-- * 'oSize' @::@ 'Int'+--+-- * 'oStorageClass' @::@ 'Text'+--+object' :: Text -- ^ 'oKey'+        -> UTCTime -- ^ 'oLastModified'+        -> Text -- ^ 'oETag'+        -> Int -- ^ 'oSize'+        -> Text -- ^ 'oStorageClass'+        -> Owner -- ^ 'oOwner'+        -> Object+object' p1 p2 p3 p4 p5 p6 = Object+    { _oKey          = p1+    , _oLastModified = withIso _Time (const id) p2+    , _oETag         = p3+    , _oSize         = p4+    , _oStorageClass = p5+    , _oOwner        = p6+    }++oETag :: Lens' Object Text+oETag = lens _oETag (\s a -> s { _oETag = a })++oKey :: Lens' Object Text+oKey = lens _oKey (\s a -> s { _oKey = a })++oLastModified :: Lens' Object UTCTime+oLastModified = lens _oLastModified (\s a -> s { _oLastModified = a }) . _Time++oOwner :: Lens' Object Owner+oOwner = lens _oOwner (\s a -> s { _oOwner = a })++oSize :: Lens' Object Int+oSize = lens _oSize (\s a -> s { _oSize = a })++-- | The class of storage used to store the object.+oStorageClass :: Lens' Object Text+oStorageClass = lens _oStorageClass (\s a -> s { _oStorageClass = a })++instance FromXML Object where+    parseXML x = Object+        <$> x .@  "ETag"+        <*> x .@  "Key"+        <*> x .@  "LastModified"+        <*> x .@  "Owner"+        <*> x .@  "Size"+        <*> x .@  "StorageClass"++instance ToXML Object where+    toXML Object{..} = nodes "Object"+        [ "Key"          =@ _oKey+        , "LastModified" =@ _oLastModified+        , "ETag"         =@ _oETag+        , "Size"         =@ _oSize+        , "StorageClass" =@ _oStorageClass+        , "Owner"        =@ _oOwner+        ]++newtype CommonPrefix = CommonPrefix+    { _cpPrefix :: Maybe Text+    } deriving (Eq, Ord, Show, Monoid)++-- | 'CommonPrefix' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'cpPrefix' @::@ 'Maybe' 'Text'+--+commonPrefix :: CommonPrefix+commonPrefix = CommonPrefix+    { _cpPrefix = Nothing+    }++cpPrefix :: Lens' CommonPrefix (Maybe Text)+cpPrefix = lens _cpPrefix (\s a -> s { _cpPrefix = a })++instance FromXML CommonPrefix where+    parseXML x = CommonPrefix+        <$> x .@? "Prefix"++instance ToXMLRoot CommonPrefix where+    toXMLRoot CommonPrefix{..} = namespaced ns "CommonPrefix"+        [ "Prefix" =@ _cpPrefix+        ]++instance ToXML CommonPrefix++data MultipartUpload = MultipartUpload+    { _muInitiated    :: Maybe RFC822+    , _muInitiator    :: Maybe Initiator+    , _muKey          :: Maybe Text+    , _muOwner        :: Maybe Owner+    , _muStorageClass :: Maybe Text+    , _muUploadId     :: Maybe Text+    } deriving (Eq, Show)++-- | 'MultipartUpload' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'muInitiated' @::@ 'Maybe' 'UTCTime'+--+-- * 'muInitiator' @::@ 'Maybe' 'Initiator'+--+-- * 'muKey' @::@ 'Maybe' 'Text'+--+-- * 'muOwner' @::@ 'Maybe' 'Owner'+--+-- * 'muStorageClass' @::@ 'Maybe' 'Text'+--+-- * 'muUploadId' @::@ 'Maybe' 'Text'+--+multipartUpload :: MultipartUpload+multipartUpload = MultipartUpload+    { _muUploadId     = Nothing+    , _muKey          = Nothing+    , _muInitiated    = Nothing+    , _muStorageClass = Nothing+    , _muOwner        = Nothing+    , _muInitiator    = Nothing+    }++-- | Date and time at which the multipart upload was initiated.+muInitiated :: Lens' MultipartUpload (Maybe UTCTime)+muInitiated = lens _muInitiated (\s a -> s { _muInitiated = a }) . mapping _Time++-- | Identifies who initiated the multipart upload.+muInitiator :: Lens' MultipartUpload (Maybe Initiator)+muInitiator = lens _muInitiator (\s a -> s { _muInitiator = a })++-- | Key of the object for which the multipart upload was initiated.+muKey :: Lens' MultipartUpload (Maybe Text)+muKey = lens _muKey (\s a -> s { _muKey = a })++muOwner :: Lens' MultipartUpload (Maybe Owner)+muOwner = lens _muOwner (\s a -> s { _muOwner = a })++-- | The class of storage used to store the object.+muStorageClass :: Lens' MultipartUpload (Maybe Text)+muStorageClass = lens _muStorageClass (\s a -> s { _muStorageClass = a })++-- | Upload ID that identifies the multipart upload.+muUploadId :: Lens' MultipartUpload (Maybe Text)+muUploadId = lens _muUploadId (\s a -> s { _muUploadId = a })++instance FromXML MultipartUpload where+    parseXML x = MultipartUpload+        <$> x .@? "Initiated"+        <*> x .@? "Initiator"+        <*> x .@? "Key"+        <*> x .@? "Owner"+        <*> x .@? "StorageClass"+        <*> x .@? "UploadId"++instance ToXML MultipartUpload where+    toXML MultipartUpload{..} = nodes "MultipartUpload"+        [ "UploadId"     =@ _muUploadId+        , "Key"          =@ _muKey+        , "Initiated"    =@ _muInitiated+        , "StorageClass" =@ _muStorageClass+        , "Owner"        =@ _muOwner+        , "Initiator"    =@ _muInitiator+        ]++data Type+    = AmazonCustomerByEmail -- ^ AmazonCustomerByEmail+    | CanonicalUser         -- ^ CanonicalUser+    | Group                 -- ^ Group+      deriving (Eq, Ord, Show, Generic, Enum)++instance Hashable Type++instance FromText Type where+    parser = match "AmazonCustomerByEmail" AmazonCustomerByEmail+         <|> match "CanonicalUser"         CanonicalUser+         <|> match "Group"                 Group++instance ToText Type where+    toText = \case+        AmazonCustomerByEmail -> "AmazonCustomerByEmail"+        CanonicalUser         -> "CanonicalUser"+        Group                 -> "Group"++instance FromXML Type where+    parseXML = parseXMLText "Type"++instance ToXML Type where+    toXML = toXMLText++data TransitionStorageClass+    = TSCGlacier -- ^ GLACIER+      deriving (Eq, Ord, Show, Generic, Enum)++instance Hashable TransitionStorageClass++instance FromText TransitionStorageClass where+    parser = match "GLACIER" TSCGlacier++instance ToText TransitionStorageClass where+    toText TSCGlacier = "GLACIER"++instance FromXML TransitionStorageClass where+    parseXML = parseXMLText "TransitionStorageClass"++instance ToXML TransitionStorageClass where+    toXML = toXMLText++newtype CompletedMultipartUpload = CompletedMultipartUpload+    { _cmuParts :: List "Part" CompletedPart+    } deriving (Eq, Show, Monoid, Semigroup)++-- | 'CompletedMultipartUpload' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'cmuParts' @::@ ['CompletedPart']+--+completedMultipartUpload :: [CompletedPart] -- ^ 'cmuParts'+                         -> CompletedMultipartUpload+completedMultipartUpload p1 = CompletedMultipartUpload+    { _cmuParts = withIso _List (const id) p1+    }++cmuParts :: Lens' CompletedMultipartUpload [CompletedPart]+cmuParts = lens _cmuParts (\s a -> s { _cmuParts = a }) . _List++instance FromXML CompletedMultipartUpload where+    parseXML x = CompletedMultipartUpload+        <$> parseXML x++instance ToXML CompletedMultipartUpload where+    toXML CompletedMultipartUpload{..} = nodes "CompletedMultipartUpload"+        [ unsafeToXML     _cmuParts+        ]++data Condition = Condition+    { _cHttpErrorCodeReturnedEquals :: Maybe Text+    , _cKeyPrefixEquals             :: Maybe Text+    } deriving (Eq, Ord, Show)++-- | 'Condition' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'cHttpErrorCodeReturnedEquals' @::@ 'Maybe' 'Text'+--+-- * 'cKeyPrefixEquals' @::@ 'Maybe' 'Text'+--+condition :: Condition+condition = Condition+    { _cHttpErrorCodeReturnedEquals = Nothing+    , _cKeyPrefixEquals             = Nothing+    }++-- | The HTTP error code when the redirect is applied. In the event of an+-- error, if the error code equals this value, then the specified redirect+-- is applied. Required when parent element Condition is specified and+-- sibling KeyPrefixEquals is not specified. If both are specified, then+-- both must be true for the redirect to be applied.+cHttpErrorCodeReturnedEquals :: Lens' Condition (Maybe Text)+cHttpErrorCodeReturnedEquals =+    lens _cHttpErrorCodeReturnedEquals+        (\s a -> s { _cHttpErrorCodeReturnedEquals = a })++-- | The object key name prefix when the redirect is applied. For example, to+-- redirect requests for ExamplePage.html, the key prefix will be+-- ExamplePage.html. To redirect request for all pages with the prefix+-- docs/, the key prefix will be /docs, which identifies all objects in the+-- docs/ folder. Required when the parent element Condition is specified and+-- sibling HttpErrorCodeReturnedEquals is not specified. If both conditions+-- are specified, both must be true for the redirect to be applied.+cKeyPrefixEquals :: Lens' Condition (Maybe Text)+cKeyPrefixEquals = lens _cKeyPrefixEquals (\s a -> s { _cKeyPrefixEquals = a })++instance FromXML Condition where+    parseXML x = Condition+        <$> x .@? "HttpErrorCodeReturnedEquals"+        <*> x .@? "KeyPrefixEquals"++instance ToXML Condition where+    toXML Condition{..} = nodes "Condition"+        [ "HttpErrorCodeReturnedEquals" =@ _cHttpErrorCodeReturnedEquals+        , "KeyPrefixEquals"             =@ _cKeyPrefixEquals+        ]++data Permission+    = PFullControl -- ^ FULL_CONTROL+    | PRead        -- ^ READ+    | PReadAcp     -- ^ READ_ACP+    | PWrite       -- ^ WRITE+    | PWriteAcp    -- ^ WRITE_ACP+      deriving (Eq, Ord, Show, Generic, Enum)++instance Hashable Permission++instance FromText Permission where+    parser = match "FULL_CONTROL" PFullControl+         <|> match "READ"         PRead+         <|> match "READ_ACP"     PReadAcp+         <|> match "WRITE"        PWrite+         <|> match "WRITE_ACP"    PWriteAcp++instance ToText Permission where+    toText = \case+        PFullControl -> "FULL_CONTROL"+        PRead        -> "READ"+        PReadAcp     -> "READ_ACP"+        PWrite       -> "WRITE"+        PWriteAcp    -> "WRITE_ACP"++instance FromXML Permission where+    parseXML = parseXMLText "Permission"++instance ToXML Permission where+    toXML = toXMLText++data AccessControlPolicy = AccessControlPolicy+    { _acpGrants :: List "Grant" Grant+    , _acpOwner  :: Maybe Owner+    } deriving (Eq, Show)++-- | 'AccessControlPolicy' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'acpGrants' @::@ ['Grant']+--+-- * 'acpOwner' @::@ 'Maybe' 'Owner'+--+accessControlPolicy :: AccessControlPolicy+accessControlPolicy = AccessControlPolicy+    { _acpGrants = mempty+    , _acpOwner  = Nothing+    }++-- | A list of grants.+acpGrants :: Lens' AccessControlPolicy [Grant]+acpGrants = lens _acpGrants (\s a -> s { _acpGrants = a }) . _List++acpOwner :: Lens' AccessControlPolicy (Maybe Owner)+acpOwner = lens _acpOwner (\s a -> s { _acpOwner = a })++instance FromXML AccessControlPolicy where+    parseXML x = AccessControlPolicy+        <$> x .@  "AccessControlList"+        <*> x .@? "Owner"++instance ToXMLRoot AccessControlPolicy where+    toXMLRoot AccessControlPolicy{..} = namespaced ns "AccessControlPolicy"+        [ "AccessControlList" =@ _acpGrants+        , "Owner"             =@ _acpOwner+        ]++instance ToXML AccessControlPolicy++data BucketCannedACL+    = CannedAuthenticatedRead -- ^ authenticated-read+    | CannedPrivate           -- ^ private+    | CannedPublicRead        -- ^ public-read+    | CannedPublicReadWrite   -- ^ public-read-write+      deriving (Eq, Ord, Show, Generic, Enum)++instance Hashable BucketCannedACL++instance FromText BucketCannedACL where+    parser = match "authenticated-read" CannedAuthenticatedRead+         <|> match "private"            CannedPrivate+         <|> match "public-read"        CannedPublicRead+         <|> match "public-read-write"  CannedPublicReadWrite++instance ToText BucketCannedACL where+    toText = \case+        CannedAuthenticatedRead -> "authenticated-read"+        CannedPrivate           -> "private"+        CannedPublicRead        -> "public-read"+        CannedPublicReadWrite   -> "public-read-write"++instance FromXML BucketCannedACL where+    parseXML = parseXMLText "BucketCannedACL"++instance ToXML BucketCannedACL where+    toXML = toXMLText++data MFADelete+    = MFADDisabled -- ^ Disabled+    | MFADEnabled  -- ^ Enabled+      deriving (Eq, Ord, Show, Generic, Enum)++instance Hashable MFADelete++instance FromText MFADelete where+    parser = match "Disabled" MFADDisabled+         <|> match "Enabled"  MFADEnabled++instance ToText MFADelete where+    toText = \case+        MFADDisabled -> "Disabled"+        MFADEnabled  -> "Enabled"++instance FromXML MFADelete where+    parseXML = parseXMLText "MFADelete"++instance ToXML MFADelete where+    toXML = toXMLText++data CloudFunctionConfiguration = CloudFunctionConfiguration+    { _cfcCloudFunction  :: Maybe Text+    , _cfcEvent          :: Maybe Text+    , _cfcEvents         :: List "Event" Text+    , _cfcId             :: Maybe Text+    , _cfcInvocationRole :: Maybe Text+    } deriving (Eq, Ord, Show)++-- | 'CloudFunctionConfiguration' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'cfcCloudFunction' @::@ 'Maybe' 'Text'+--+-- * 'cfcEvent' @::@ 'Maybe' 'Text'+--+-- * 'cfcEvents' @::@ ['Text']+--+-- * 'cfcId' @::@ 'Maybe' 'Text'+--+-- * 'cfcInvocationRole' @::@ 'Maybe' 'Text'+--+cloudFunctionConfiguration :: [Text] -- ^ 'cfcEvents'+                           -> CloudFunctionConfiguration+cloudFunctionConfiguration p1 = CloudFunctionConfiguration+    { _cfcEvents         = withIso _List (const id) p1+    , _cfcId             = Nothing+    , _cfcEvent          = Nothing+    , _cfcCloudFunction  = Nothing+    , _cfcInvocationRole = Nothing+    }++cfcCloudFunction :: Lens' CloudFunctionConfiguration (Maybe Text)+cfcCloudFunction = lens _cfcCloudFunction (\s a -> s { _cfcCloudFunction = a })++cfcEvent :: Lens' CloudFunctionConfiguration (Maybe Text)+cfcEvent = lens _cfcEvent (\s a -> s { _cfcEvent = a })++cfcEvents :: Lens' CloudFunctionConfiguration [Text]+cfcEvents = lens _cfcEvents (\s a -> s { _cfcEvents = a }) . _List++cfcId :: Lens' CloudFunctionConfiguration (Maybe Text)+cfcId = lens _cfcId (\s a -> s { _cfcId = a })++cfcInvocationRole :: Lens' CloudFunctionConfiguration (Maybe Text)+cfcInvocationRole =+    lens _cfcInvocationRole (\s a -> s { _cfcInvocationRole = a })++instance FromXML CloudFunctionConfiguration where+    parseXML x = CloudFunctionConfiguration+        <$> x .@? "CloudFunction"+        <*> x .@? "Event"+        <*> parseXML x+        <*> x .@? "Id"+        <*> x .@? "InvocationRole"++instance ToXML CloudFunctionConfiguration where+    toXML CloudFunctionConfiguration{..} = nodes "CloudFunctionConfiguration"+        [ "Id"             =@ _cfcId+        , "Event"          =@ _cfcEvent+        , unsafeToXML         _cfcEvents+        , "CloudFunction"  =@ _cfcCloudFunction+        , "InvocationRole" =@ _cfcInvocationRole+        ]++data Grantee = Grantee+    { _gDisplayName  :: Maybe Text+    , _gEmailAddress :: Maybe Text+    , _gID           :: Maybe Text+    , _gType         :: Text+    , _gURI          :: Maybe Text+    } deriving (Eq, Ord, Show)++-- | 'Grantee' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'gDisplayName' @::@ 'Maybe' 'Text'+--+-- * 'gEmailAddress' @::@ 'Maybe' 'Text'+--+-- * 'gID' @::@ 'Maybe' 'Text'+--+-- * 'gType' @::@ 'Text'+--+-- * 'gURI' @::@ 'Maybe' 'Text'+--+grantee :: Text -- ^ 'gType'+        -> Grantee+grantee p1 = Grantee+    { _gType         = p1+    , _gDisplayName  = Nothing+    , _gEmailAddress = Nothing+    , _gID           = Nothing+    , _gURI          = Nothing+    }++-- | Screen name of the grantee.+gDisplayName :: Lens' Grantee (Maybe Text)+gDisplayName = lens _gDisplayName (\s a -> s { _gDisplayName = a })++-- | Email address of the grantee.+gEmailAddress :: Lens' Grantee (Maybe Text)+gEmailAddress = lens _gEmailAddress (\s a -> s { _gEmailAddress = a })++-- | The canonical user ID of the grantee.+gID :: Lens' Grantee (Maybe Text)+gID = lens _gID (\s a -> s { _gID = a })++-- | Type of grantee.+gType :: Lens' Grantee Text+gType = lens _gType (\s a -> s { _gType = a })++-- | URI of the grantee group.+gURI :: Lens' Grantee (Maybe Text)+gURI = lens _gURI (\s a -> s { _gURI = a })++instance FromXML Grantee where+    parseXML x = Grantee+        <$> x .@? "DisplayName"+        <*> x .@? "EmailAddress"+        <*> x .@? "ID"+        <*> x .@  "Type"+        <*> x .@? "URI"++instance ToXML Grantee where+    toXML Grantee{..} = nodes "Grantee"+        [ "DisplayName"  =@ _gDisplayName+        , "EmailAddress" =@ _gEmailAddress+        , "ID"           =@ _gID+        , "Type"         =@ _gType+        , "URI"          =@ _gURI+        ]++newtype LifecycleConfiguration = LifecycleConfiguration+    { _lcRules :: List "Rule" Rule+    } deriving (Eq, Show, Monoid, Semigroup)++-- | 'LifecycleConfiguration' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'lcRules' @::@ ['Rule']+--+lifecycleConfiguration :: [Rule] -- ^ 'lcRules'+                       -> LifecycleConfiguration+lifecycleConfiguration p1 = LifecycleConfiguration+    { _lcRules = withIso _List (const id) p1+    }++lcRules :: Lens' LifecycleConfiguration [Rule]+lcRules = lens _lcRules (\s a -> s { _lcRules = a }) . _List++instance FromXML LifecycleConfiguration where+    parseXML x = LifecycleConfiguration+        <$> parseXML x++instance ToXML LifecycleConfiguration where+    toXML LifecycleConfiguration{..} = nodes "LifecycleConfiguration"+        [ unsafeToXML     _lcRules+        ]++data LoggingEnabled = LoggingEnabled+    { _leTargetBucket :: Maybe Text+    , _leTargetGrants :: List "Grant" TargetGrant+    , _leTargetPrefix :: Maybe Text+    } deriving (Eq, Show)++-- | 'LoggingEnabled' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'leTargetBucket' @::@ 'Maybe' 'Text'+--+-- * 'leTargetGrants' @::@ ['TargetGrant']+--+-- * 'leTargetPrefix' @::@ 'Maybe' 'Text'+--+loggingEnabled :: LoggingEnabled+loggingEnabled = LoggingEnabled+    { _leTargetBucket = Nothing+    , _leTargetGrants = mempty+    , _leTargetPrefix = Nothing+    }++-- | Specifies the bucket where you want Amazon S3 to store server access+-- logs. You can have your logs delivered to any bucket that you own,+-- including the same bucket that is being logged. You can also configure+-- multiple buckets to deliver their logs to the same target bucket. In this+-- case you should choose a different TargetPrefix for each source bucket so+-- that the delivered log files can be distinguished by key.+leTargetBucket :: Lens' LoggingEnabled (Maybe Text)+leTargetBucket = lens _leTargetBucket (\s a -> s { _leTargetBucket = a })++leTargetGrants :: Lens' LoggingEnabled [TargetGrant]+leTargetGrants = lens _leTargetGrants (\s a -> s { _leTargetGrants = a }) . _List++-- | This element lets you specify a prefix for the keys that the log files+-- will be stored under.+leTargetPrefix :: Lens' LoggingEnabled (Maybe Text)+leTargetPrefix = lens _leTargetPrefix (\s a -> s { _leTargetPrefix = a })++instance FromXML LoggingEnabled where+    parseXML x = LoggingEnabled+        <$> x .@? "TargetBucket"+        <*> x .@  "TargetGrants"+        <*> x .@? "TargetPrefix"++instance ToXML LoggingEnabled where+    toXML LoggingEnabled{..} = nodes "LoggingEnabled"+        [ "TargetBucket" =@ _leTargetBucket+        , "TargetGrants" =@ _leTargetGrants+        , "TargetPrefix" =@ _leTargetPrefix+        ]++data ServerSideEncryption+    = AES256 -- ^ AES256+      deriving (Eq, Ord, Show, Generic, Enum)++instance Hashable ServerSideEncryption++instance FromText ServerSideEncryption where+    parser = match "AES256" AES256++instance ToText ServerSideEncryption where+    toText AES256 = "AES256"++instance FromXML ServerSideEncryption where+    parseXML = parseXMLText "ServerSideEncryption"++instance ToXML ServerSideEncryption where+    toXML = toXMLText++newtype IndexDocument = IndexDocument+    { _idSuffix :: Text+    } deriving (Eq, Ord, Show, Monoid, IsString)++-- | 'IndexDocument' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'idSuffix' @::@ 'Text'+--+indexDocument :: Text -- ^ 'idSuffix'+              -> IndexDocument+indexDocument p1 = IndexDocument+    { _idSuffix = p1+    }++-- | A suffix that is appended to a request that is for a directory on the+-- website endpoint (e.g. if the suffix is index.html and you make a request+-- to samplebucket/images/ the data that is returned will be for the object+-- with the key name images/index.html) The suffix must not be empty and+-- must not include a slash character.+idSuffix :: Lens' IndexDocument Text+idSuffix = lens _idSuffix (\s a -> s { _idSuffix = a })++instance FromXML IndexDocument where+    parseXML x = IndexDocument+        <$> x .@  "Suffix"++instance ToXML IndexDocument where+    toXML IndexDocument{..} = nodes "IndexDocument"+        [ "Suffix" =@ _idSuffix+        ]++data CopyObjectResult = CopyObjectResult+    { _corETag         :: Maybe Text+    , _corLastModified :: Maybe RFC822+    } deriving (Eq, Ord, Show)++-- | 'CopyObjectResult' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'corETag' @::@ 'Maybe' 'Text'+--+-- * 'corLastModified' @::@ 'Maybe' 'UTCTime'+--+copyObjectResult :: CopyObjectResult+copyObjectResult = CopyObjectResult+    { _corETag         = Nothing+    , _corLastModified = Nothing+    }++corETag :: Lens' CopyObjectResult (Maybe Text)+corETag = lens _corETag (\s a -> s { _corETag = a })++corLastModified :: Lens' CopyObjectResult (Maybe UTCTime)+corLastModified = lens _corLastModified (\s a -> s { _corLastModified = a }) . mapping _Time++instance FromXML CopyObjectResult where+    parseXML x = CopyObjectResult+        <$> x .@? "ETag"+        <*> x .@? "LastModified"++instance ToXML CopyObjectResult where+    toXML CopyObjectResult{..} = nodes "CopyObjectResult"+        [ "ETag"         =@ _corETag+        , "LastModified" =@ _corLastModified+        ]++data Delete = Delete+    { _dObjects :: List "Object" ObjectIdentifier+    , _dQuiet   :: Maybe Bool+    } deriving (Eq, Show)++-- | 'Delete' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'dObjects' @::@ ['ObjectIdentifier']+--+-- * 'dQuiet' @::@ 'Maybe' 'Bool'+--+delete' :: [ObjectIdentifier] -- ^ 'dObjects'+        -> Delete+delete' p1 = Delete+    { _dObjects = withIso _List (const id) p1+    , _dQuiet   = Nothing+    }++dObjects :: Lens' Delete [ObjectIdentifier]+dObjects = lens _dObjects (\s a -> s { _dObjects = a }) . _List++-- | Element to enable quiet mode for the request. When you add this element,+-- you must set its value to true.+dQuiet :: Lens' Delete (Maybe Bool)+dQuiet = lens _dQuiet (\s a -> s { _dQuiet = a })++instance FromXML Delete where+    parseXML x = Delete+        <$> parseXML x+        <*> x .@? "Quiet"++instance ToXML Delete where+    toXML Delete{..} = nodes "Delete"+        [ unsafeToXML     _dObjects+        , "Quiet"  =@ _dQuiet+        ]++newtype RestoreRequest = RestoreRequest+    { _rDays :: Int+    } deriving (Eq, Ord, Show, Enum, Num, Integral, Real)++-- | 'RestoreRequest' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'rDays' @::@ 'Int'+--+restoreRequest :: Int -- ^ 'rDays'+               -> RestoreRequest+restoreRequest p1 = RestoreRequest+    { _rDays = p1+    }++-- | Lifetime of the active copy in days.+rDays :: Lens' RestoreRequest Int+rDays = lens _rDays (\s a -> s { _rDays = a })++instance FromXML RestoreRequest where+    parseXML x = RestoreRequest+        <$> x .@  "Days"++instance ToXML RestoreRequest where+    toXML RestoreRequest{..} = nodes "RestoreRequest"+        [ "Days" =@ _rDays+        ]
+ gen/Network/AWS/S3/UploadPart.hs view
@@ -0,0 +1,275 @@+{-# 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.S3.UploadPart+-- 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)++-- | Uploads a part in a multipart upload. Note: After you initiate multipart+-- upload and upload one or more parts, you must either complete or abort+-- multipart upload in order to stop getting charged for storage of the+-- uploaded parts. Only after you either complete or abort multipart upload,+-- Amazon S3 frees up the parts storage and stops charging you for the parts+-- storage.+--+-- <http://docs.aws.amazon.com/AmazonS3/latest/API/UploadPart.html>+module Network.AWS.S3.UploadPart+    (+    -- * Request+      UploadPart+    -- ** Request constructor+    , uploadPart+    -- ** Request lenses+    , upBody+    , upBucket+    , upContentLength+    , upContentMD5+    , upKey+    , upPartNumber+    , upSSECustomerAlgorithm+    , upSSECustomerKey+    , upSSECustomerKeyMD5+    , upSSEKMSKeyId+    , upUploadId++    -- * Response+    , UploadPartResponse+    -- ** Response constructor+    , uploadPartResponse+    -- ** Response lenses+    , uprETag+    , uprSSECustomerAlgorithm+    , uprSSECustomerKeyMD5+    , uprSSEKMSKeyId+    , uprServerSideEncryption+    ) where++import Network.AWS.Prelude+import Network.AWS.Request.RestXML+import Network.AWS.S3.Types+import qualified GHC.Exts++data UploadPart = UploadPart+    { _upBody                 :: RqBody+    , _upBucket               :: Text+    , _upContentLength        :: Maybe Int+    , _upContentMD5           :: Maybe Text+    , _upKey                  :: Text+    , _upPartNumber           :: Int+    , _upSSECustomerAlgorithm :: Maybe Text+    , _upSSECustomerKey       :: Maybe (Sensitive Text)+    , _upSSECustomerKeyMD5    :: Maybe Text+    , _upSSEKMSKeyId          :: Maybe (Sensitive Text)+    , _upUploadId             :: Text+    } deriving (Show)++-- | 'UploadPart' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'upBody' @::@ 'RqBody'+--+-- * 'upBucket' @::@ 'Text'+--+-- * 'upContentLength' @::@ 'Maybe' 'Int'+--+-- * 'upContentMD5' @::@ 'Maybe' 'Text'+--+-- * 'upKey' @::@ 'Text'+--+-- * 'upPartNumber' @::@ 'Int'+--+-- * 'upSSECustomerAlgorithm' @::@ 'Maybe' 'Text'+--+-- * 'upSSECustomerKey' @::@ 'Maybe' 'Text'+--+-- * 'upSSECustomerKeyMD5' @::@ 'Maybe' 'Text'+--+-- * 'upSSEKMSKeyId' @::@ 'Maybe' 'Text'+--+-- * 'upUploadId' @::@ 'Text'+--+uploadPart :: RqBody -- ^ 'upBody'+           -> Text -- ^ 'upBucket'+           -> Text -- ^ 'upKey'+           -> Int -- ^ 'upPartNumber'+           -> Text -- ^ 'upUploadId'+           -> UploadPart+uploadPart p1 p2 p3 p4 p5 = UploadPart+    { _upBody                 = p1+    , _upBucket               = p2+    , _upKey                  = p3+    , _upPartNumber           = p4+    , _upUploadId             = p5+    , _upContentLength        = Nothing+    , _upContentMD5           = Nothing+    , _upSSECustomerAlgorithm = Nothing+    , _upSSECustomerKey       = Nothing+    , _upSSECustomerKeyMD5    = Nothing+    , _upSSEKMSKeyId          = Nothing+    }++upBody :: Lens' UploadPart RqBody+upBody = lens _upBody (\s a -> s { _upBody = a })++upBucket :: Lens' UploadPart Text+upBucket = lens _upBucket (\s a -> s { _upBucket = a })++-- | Size of the body in bytes. This parameter is useful when the size of the+-- body cannot be determined automatically.+upContentLength :: Lens' UploadPart (Maybe Int)+upContentLength = lens _upContentLength (\s a -> s { _upContentLength = a })++upContentMD5 :: Lens' UploadPart (Maybe Text)+upContentMD5 = lens _upContentMD5 (\s a -> s { _upContentMD5 = a })++upKey :: Lens' UploadPart Text+upKey = lens _upKey (\s a -> s { _upKey = a })++-- | Part number of part being uploaded.+upPartNumber :: Lens' UploadPart Int+upPartNumber = lens _upPartNumber (\s a -> s { _upPartNumber = a })++-- | Specifies the algorithm to use to when encrypting the object (e.g.,+-- AES256, aws:kms).+upSSECustomerAlgorithm :: Lens' UploadPart (Maybe Text)+upSSECustomerAlgorithm =+    lens _upSSECustomerAlgorithm (\s a -> s { _upSSECustomerAlgorithm = a })++-- | Specifies the customer-provided encryption key for Amazon S3 to use in+-- encrypting data. This value is used to store the object and then it is+-- discarded; Amazon does not store the encryption key. The key must be+-- appropriate for use with the algorithm specified in the+-- x-amz-server-side&#x200B;-encryption&#x200B;-customer-algorithm header.+-- This must be the same encryption key specified in the initiate multipart+-- upload request.+upSSECustomerKey :: Lens' UploadPart (Maybe Text)+upSSECustomerKey = lens _upSSECustomerKey (\s a -> s { _upSSECustomerKey = a }) . mapping _Sensitive++-- | Specifies the 128-bit MD5 digest of the encryption key according to RFC+-- 1321. Amazon S3 uses this header for a message integrity check to ensure+-- the encryption key was transmitted without error.+upSSECustomerKeyMD5 :: Lens' UploadPart (Maybe Text)+upSSECustomerKeyMD5 =+    lens _upSSECustomerKeyMD5 (\s a -> s { _upSSECustomerKeyMD5 = a })++-- | Specifies the AWS KMS key ID to use for object encryption.+upSSEKMSKeyId :: Lens' UploadPart (Maybe Text)+upSSEKMSKeyId = lens _upSSEKMSKeyId (\s a -> s { _upSSEKMSKeyId = a }) . mapping _Sensitive++-- | Upload ID identifying the multipart upload whose part is being uploaded.+upUploadId :: Lens' UploadPart Text+upUploadId = lens _upUploadId (\s a -> s { _upUploadId = a })++data UploadPartResponse = UploadPartResponse+    { _uprETag                 :: Maybe Text+    , _uprSSECustomerAlgorithm :: Maybe Text+    , _uprSSECustomerKeyMD5    :: Maybe Text+    , _uprSSEKMSKeyId          :: Maybe (Sensitive Text)+    , _uprServerSideEncryption :: Maybe Text+    } deriving (Eq, Ord, Show)++-- | 'UploadPartResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'uprETag' @::@ 'Maybe' 'Text'+--+-- * 'uprSSECustomerAlgorithm' @::@ 'Maybe' 'Text'+--+-- * 'uprSSECustomerKeyMD5' @::@ 'Maybe' 'Text'+--+-- * 'uprSSEKMSKeyId' @::@ 'Maybe' 'Text'+--+-- * 'uprServerSideEncryption' @::@ 'Maybe' 'Text'+--+uploadPartResponse :: UploadPartResponse+uploadPartResponse = UploadPartResponse+    { _uprServerSideEncryption = Nothing+    , _uprETag                 = Nothing+    , _uprSSECustomerAlgorithm = Nothing+    , _uprSSECustomerKeyMD5    = Nothing+    , _uprSSEKMSKeyId          = Nothing+    }++-- | Entity tag for the uploaded object.+uprETag :: Lens' UploadPartResponse (Maybe Text)+uprETag = lens _uprETag (\s a -> s { _uprETag = a })++-- | If server-side encryption with a customer-provided encryption key was+-- requested, the response will include this header confirming the+-- encryption algorithm used.+uprSSECustomerAlgorithm :: Lens' UploadPartResponse (Maybe Text)+uprSSECustomerAlgorithm =+    lens _uprSSECustomerAlgorithm (\s a -> s { _uprSSECustomerAlgorithm = a })++-- | If server-side encryption with a customer-provided encryption key was+-- requested, the response will include this header to provide round trip+-- message integrity verification of the customer-provided encryption key.+uprSSECustomerKeyMD5 :: Lens' UploadPartResponse (Maybe Text)+uprSSECustomerKeyMD5 =+    lens _uprSSECustomerKeyMD5 (\s a -> s { _uprSSECustomerKeyMD5 = a })++-- | If present, specifies the AWS KMS key used to encrypt the object.+uprSSEKMSKeyId :: Lens' UploadPartResponse (Maybe Text)+uprSSEKMSKeyId = lens _uprSSEKMSKeyId (\s a -> s { _uprSSEKMSKeyId = a }) . mapping _Sensitive++-- | The Server-side encryption algorithm used when storing this object in S3+-- (e.g., AES256, aws:kms).+uprServerSideEncryption :: Lens' UploadPartResponse (Maybe Text)+uprServerSideEncryption =+    lens _uprServerSideEncryption (\s a -> s { _uprServerSideEncryption = a })++instance ToPath UploadPart where+    toPath UploadPart{..} = mconcat+        [ "/"+        , toText _upBucket+        , "/"+        , toText _upKey+        ]++instance ToQuery UploadPart where+    toQuery UploadPart{..} = mconcat+        [ "partNumber" =? _upPartNumber+        , "uploadId"   =? _upUploadId+        ]++instance ToHeaders UploadPart where+    toHeaders UploadPart{..} = mconcat+        [ "Content-Length"                                  =: _upContentLength+        , "Content-MD5"                                     =: _upContentMD5+        , "x-amz-server-side-encryption-customer-algorithm" =: _upSSECustomerAlgorithm+        , "x-amz-server-side-encryption-customer-key"       =: _upSSECustomerKey+        , "x-amz-server-side-encryption-customer-key-MD5"   =: _upSSECustomerKeyMD5+        , "x-amz-server-side-encryption-aws-kms-key-id"     =: _upSSEKMSKeyId+        ]++instance ToBody UploadPart where+    toBody = toBody . _upBody++instance AWSRequest UploadPart where+    type Sv UploadPart = S3+    type Rs UploadPart = UploadPartResponse++    request  = stream PUT+    response = headerResponse $ \h -> UploadPartResponse+        <$> h ~:? "ETag"+        <*> h ~:? "x-amz-server-side-encryption-customer-algorithm"+        <*> h ~:? "x-amz-server-side-encryption-customer-key-MD5"+        <*> h ~:? "x-amz-server-side-encryption-aws-kms-key-id"+        <*> h ~:? "x-amz-server-side-encryption"
+ gen/Network/AWS/S3/UploadPartCopy.hs view
@@ -0,0 +1,381 @@+{-# 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.S3.UploadPartCopy+-- 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)++-- | Uploads a part by copying data from an existing object as data source.+--+-- <http://docs.aws.amazon.com/AmazonS3/latest/API/UploadPartCopy.html>+module Network.AWS.S3.UploadPartCopy+    (+    -- * Request+      UploadPartCopy+    -- ** Request constructor+    , uploadPartCopy+    -- ** Request lenses+    , upcBucket+    , upcCopySource+    , upcCopySourceIfMatch+    , upcCopySourceIfModifiedSince+    , upcCopySourceIfNoneMatch+    , upcCopySourceIfUnmodifiedSince+    , upcCopySourceRange+    , upcCopySourceSSECustomerAlgorithm+    , upcCopySourceSSECustomerKey+    , upcCopySourceSSECustomerKeyMD5+    , upcCopySourceSSEKMSKeyId+    , upcKey+    , upcPartNumber+    , upcSSECustomerAlgorithm+    , upcSSECustomerKey+    , upcSSECustomerKeyMD5+    , upcUploadId++    -- * Response+    , UploadPartCopyResponse+    -- ** Response constructor+    , uploadPartCopyResponse+    -- ** Response lenses+    , upcrCopyPartResult+    , upcrCopySourceVersionId+    , upcrSSECustomerAlgorithm+    , upcrSSECustomerKeyMD5+    , upcrSSEKMSKeyId+    , upcrServerSideEncryption+    ) where++import Network.AWS.Prelude+import Network.AWS.Request.RestXML+import Network.AWS.S3.Types+import qualified GHC.Exts++data UploadPartCopy = UploadPartCopy+    { _upcBucket                         :: Text+    , _upcCopySource                     :: Text+    , _upcCopySourceIfMatch              :: Maybe Text+    , _upcCopySourceIfModifiedSince      :: Maybe RFC822+    , _upcCopySourceIfNoneMatch          :: Maybe Text+    , _upcCopySourceIfUnmodifiedSince    :: Maybe RFC822+    , _upcCopySourceRange                :: Maybe Text+    , _upcCopySourceSSECustomerAlgorithm :: Maybe Text+    , _upcCopySourceSSECustomerKey       :: Maybe (Sensitive Text)+    , _upcCopySourceSSECustomerKeyMD5    :: Maybe Text+    , _upcCopySourceSSEKMSKeyId          :: Maybe (Sensitive Text)+    , _upcKey                            :: Text+    , _upcPartNumber                     :: Int+    , _upcSSECustomerAlgorithm           :: Maybe Text+    , _upcSSECustomerKey                 :: Maybe (Sensitive Text)+    , _upcSSECustomerKeyMD5              :: Maybe Text+    , _upcUploadId                       :: Text+    } deriving (Eq, Ord, Show)++-- | 'UploadPartCopy' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'upcBucket' @::@ 'Text'+--+-- * 'upcCopySource' @::@ 'Text'+--+-- * 'upcCopySourceIfMatch' @::@ 'Maybe' 'Text'+--+-- * 'upcCopySourceIfModifiedSince' @::@ 'Maybe' 'UTCTime'+--+-- * 'upcCopySourceIfNoneMatch' @::@ 'Maybe' 'Text'+--+-- * 'upcCopySourceIfUnmodifiedSince' @::@ 'Maybe' 'UTCTime'+--+-- * 'upcCopySourceRange' @::@ 'Maybe' 'Text'+--+-- * 'upcCopySourceSSECustomerAlgorithm' @::@ 'Maybe' 'Text'+--+-- * 'upcCopySourceSSECustomerKey' @::@ 'Maybe' 'Text'+--+-- * 'upcCopySourceSSECustomerKeyMD5' @::@ 'Maybe' 'Text'+--+-- * 'upcCopySourceSSEKMSKeyId' @::@ 'Maybe' 'Text'+--+-- * 'upcKey' @::@ 'Text'+--+-- * 'upcPartNumber' @::@ 'Int'+--+-- * 'upcSSECustomerAlgorithm' @::@ 'Maybe' 'Text'+--+-- * 'upcSSECustomerKey' @::@ 'Maybe' 'Text'+--+-- * 'upcSSECustomerKeyMD5' @::@ 'Maybe' 'Text'+--+-- * 'upcUploadId' @::@ 'Text'+--+uploadPartCopy :: Text -- ^ 'upcBucket'+               -> Text -- ^ 'upcCopySource'+               -> Text -- ^ 'upcKey'+               -> Int -- ^ 'upcPartNumber'+               -> Text -- ^ 'upcUploadId'+               -> UploadPartCopy+uploadPartCopy p1 p2 p3 p4 p5 = UploadPartCopy+    { _upcBucket                         = p1+    , _upcCopySource                     = p2+    , _upcKey                            = p3+    , _upcPartNumber                     = p4+    , _upcUploadId                       = p5+    , _upcCopySourceIfMatch              = Nothing+    , _upcCopySourceIfModifiedSince      = Nothing+    , _upcCopySourceIfNoneMatch          = Nothing+    , _upcCopySourceIfUnmodifiedSince    = Nothing+    , _upcCopySourceRange                = Nothing+    , _upcSSECustomerAlgorithm           = Nothing+    , _upcSSECustomerKey                 = Nothing+    , _upcSSECustomerKeyMD5              = Nothing+    , _upcCopySourceSSECustomerAlgorithm = Nothing+    , _upcCopySourceSSECustomerKey       = Nothing+    , _upcCopySourceSSECustomerKeyMD5    = Nothing+    , _upcCopySourceSSEKMSKeyId          = Nothing+    }++upcBucket :: Lens' UploadPartCopy Text+upcBucket = lens _upcBucket (\s a -> s { _upcBucket = a })++-- | The name of the source bucket and key name of the source object,+-- separated by a slash (/). Must be URL-encoded.+upcCopySource :: Lens' UploadPartCopy Text+upcCopySource = lens _upcCopySource (\s a -> s { _upcCopySource = a })++-- | Copies the object if its entity tag (ETag) matches the specified tag.+upcCopySourceIfMatch :: Lens' UploadPartCopy (Maybe Text)+upcCopySourceIfMatch =+    lens _upcCopySourceIfMatch (\s a -> s { _upcCopySourceIfMatch = a })++-- | Copies the object if it has been modified since the specified time.+upcCopySourceIfModifiedSince :: Lens' UploadPartCopy (Maybe UTCTime)+upcCopySourceIfModifiedSince =+    lens _upcCopySourceIfModifiedSince+        (\s a -> s { _upcCopySourceIfModifiedSince = a })+            . mapping _Time++-- | Copies the object if its entity tag (ETag) is different than the+-- specified ETag.+upcCopySourceIfNoneMatch :: Lens' UploadPartCopy (Maybe Text)+upcCopySourceIfNoneMatch =+    lens _upcCopySourceIfNoneMatch+        (\s a -> s { _upcCopySourceIfNoneMatch = a })++-- | Copies the object if it hasn't been modified since the specified time.+upcCopySourceIfUnmodifiedSince :: Lens' UploadPartCopy (Maybe UTCTime)+upcCopySourceIfUnmodifiedSince =+    lens _upcCopySourceIfUnmodifiedSince+        (\s a -> s { _upcCopySourceIfUnmodifiedSince = a })+            . mapping _Time++-- | The range of bytes to copy from the source object. The range value must+-- use the form bytes=first-last, where the first and last are the+-- zero-based byte offsets to copy. For example, bytes=0-9 indicates that+-- you want to copy the first ten bytes of the source. You can copy a range+-- only if the source object is greater than 5 GB.+upcCopySourceRange :: Lens' UploadPartCopy (Maybe Text)+upcCopySourceRange =+    lens _upcCopySourceRange (\s a -> s { _upcCopySourceRange = a })++-- | Specifies the algorithm to use when decrypting the source object (e.g.,+-- AES256).+upcCopySourceSSECustomerAlgorithm :: Lens' UploadPartCopy (Maybe Text)+upcCopySourceSSECustomerAlgorithm =+    lens _upcCopySourceSSECustomerAlgorithm+        (\s a -> s { _upcCopySourceSSECustomerAlgorithm = a })++-- | Specifies the customer-provided encryption key for Amazon S3 to use to+-- decrypt the source object. The encryption key provided in this header+-- must be one that was used when the source object was created.+upcCopySourceSSECustomerKey :: Lens' UploadPartCopy (Maybe Text)+upcCopySourceSSECustomerKey =+    lens _upcCopySourceSSECustomerKey+        (\s a -> s { _upcCopySourceSSECustomerKey = a })+            . mapping _Sensitive++-- | Specifies the 128-bit MD5 digest of the encryption key according to RFC+-- 1321. Amazon S3 uses this header for a message integrity check to ensure+-- the encryption key was transmitted without error.+upcCopySourceSSECustomerKeyMD5 :: Lens' UploadPartCopy (Maybe Text)+upcCopySourceSSECustomerKeyMD5 =+    lens _upcCopySourceSSECustomerKeyMD5+        (\s a -> s { _upcCopySourceSSECustomerKeyMD5 = a })++-- | Specifies the AWS KMS key ID to use for object encryption.+upcCopySourceSSEKMSKeyId :: Lens' UploadPartCopy (Maybe Text)+upcCopySourceSSEKMSKeyId =+    lens _upcCopySourceSSEKMSKeyId+        (\s a -> s { _upcCopySourceSSEKMSKeyId = a })+            . mapping _Sensitive++upcKey :: Lens' UploadPartCopy Text+upcKey = lens _upcKey (\s a -> s { _upcKey = a })++-- | Part number of part being copied.+upcPartNumber :: Lens' UploadPartCopy Int+upcPartNumber = lens _upcPartNumber (\s a -> s { _upcPartNumber = a })++-- | Specifies the algorithm to use to when encrypting the object (e.g.,+-- AES256, aws:kms).+upcSSECustomerAlgorithm :: Lens' UploadPartCopy (Maybe Text)+upcSSECustomerAlgorithm =+    lens _upcSSECustomerAlgorithm (\s a -> s { _upcSSECustomerAlgorithm = a })++-- | Specifies the customer-provided encryption key for Amazon S3 to use in+-- encrypting data. This value is used to store the object and then it is+-- discarded; Amazon does not store the encryption key. The key must be+-- appropriate for use with the algorithm specified in the+-- x-amz-server-side&#x200B;-encryption&#x200B;-customer-algorithm header.+-- This must be the same encryption key specified in the initiate multipart+-- upload request.+upcSSECustomerKey :: Lens' UploadPartCopy (Maybe Text)+upcSSECustomerKey =+    lens _upcSSECustomerKey (\s a -> s { _upcSSECustomerKey = a })+        . mapping _Sensitive++-- | Specifies the 128-bit MD5 digest of the encryption key according to RFC+-- 1321. Amazon S3 uses this header for a message integrity check to ensure+-- the encryption key was transmitted without error.+upcSSECustomerKeyMD5 :: Lens' UploadPartCopy (Maybe Text)+upcSSECustomerKeyMD5 =+    lens _upcSSECustomerKeyMD5 (\s a -> s { _upcSSECustomerKeyMD5 = a })++-- | Upload ID identifying the multipart upload whose part is being copied.+upcUploadId :: Lens' UploadPartCopy Text+upcUploadId = lens _upcUploadId (\s a -> s { _upcUploadId = a })++data UploadPartCopyResponse = UploadPartCopyResponse+    { _upcrCopyPartResult       :: Maybe CopyPartResult+    , _upcrCopySourceVersionId  :: Maybe Text+    , _upcrSSECustomerAlgorithm :: Maybe Text+    , _upcrSSECustomerKeyMD5    :: Maybe Text+    , _upcrSSEKMSKeyId          :: Maybe (Sensitive Text)+    , _upcrServerSideEncryption :: Maybe Text+    } deriving (Eq, Show)++-- | 'UploadPartCopyResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'upcrCopyPartResult' @::@ 'Maybe' 'CopyPartResult'+--+-- * 'upcrCopySourceVersionId' @::@ 'Maybe' 'Text'+--+-- * 'upcrSSECustomerAlgorithm' @::@ 'Maybe' 'Text'+--+-- * 'upcrSSECustomerKeyMD5' @::@ 'Maybe' 'Text'+--+-- * 'upcrSSEKMSKeyId' @::@ 'Maybe' 'Text'+--+-- * 'upcrServerSideEncryption' @::@ 'Maybe' 'Text'+--+uploadPartCopyResponse :: UploadPartCopyResponse+uploadPartCopyResponse = UploadPartCopyResponse+    { _upcrCopySourceVersionId  = Nothing+    , _upcrCopyPartResult       = Nothing+    , _upcrServerSideEncryption = Nothing+    , _upcrSSECustomerAlgorithm = Nothing+    , _upcrSSECustomerKeyMD5    = Nothing+    , _upcrSSEKMSKeyId          = Nothing+    }++upcrCopyPartResult :: Lens' UploadPartCopyResponse (Maybe CopyPartResult)+upcrCopyPartResult =+    lens _upcrCopyPartResult (\s a -> s { _upcrCopyPartResult = a })++-- | The version of the source object that was copied, if you have enabled+-- versioning on the source bucket.+upcrCopySourceVersionId :: Lens' UploadPartCopyResponse (Maybe Text)+upcrCopySourceVersionId =+    lens _upcrCopySourceVersionId (\s a -> s { _upcrCopySourceVersionId = a })++-- | If server-side encryption with a customer-provided encryption key was+-- requested, the response will include this header confirming the+-- encryption algorithm used.+upcrSSECustomerAlgorithm :: Lens' UploadPartCopyResponse (Maybe Text)+upcrSSECustomerAlgorithm =+    lens _upcrSSECustomerAlgorithm+        (\s a -> s { _upcrSSECustomerAlgorithm = a })++-- | If server-side encryption with a customer-provided encryption key was+-- requested, the response will include this header to provide round trip+-- message integrity verification of the customer-provided encryption key.+upcrSSECustomerKeyMD5 :: Lens' UploadPartCopyResponse (Maybe Text)+upcrSSECustomerKeyMD5 =+    lens _upcrSSECustomerKeyMD5 (\s a -> s { _upcrSSECustomerKeyMD5 = a })++-- | If present, specifies the AWS KMS key used to encrypt the object.+upcrSSEKMSKeyId :: Lens' UploadPartCopyResponse (Maybe Text)+upcrSSEKMSKeyId = lens _upcrSSEKMSKeyId (\s a -> s { _upcrSSEKMSKeyId = a }) . mapping _Sensitive++-- | The Server-side encryption algorithm used when storing this object in S3+-- (e.g., AES256, aws:kms).+upcrServerSideEncryption :: Lens' UploadPartCopyResponse (Maybe Text)+upcrServerSideEncryption =+    lens _upcrServerSideEncryption+        (\s a -> s { _upcrServerSideEncryption = a })++instance ToPath UploadPartCopy where+    toPath UploadPartCopy{..} = mconcat+        [ "/"+        , toText _upcBucket+        , "/"+        , toText _upcKey+        ]++instance ToQuery UploadPartCopy where+    toQuery UploadPartCopy{..} = mconcat+        [ "partNumber" =? _upcPartNumber+        , "uploadId"   =? _upcUploadId+        ]++instance ToHeaders UploadPartCopy where+    toHeaders UploadPartCopy{..} = mconcat+        [ "x-amz-copy-source"                                           =: _upcCopySource+        , "x-amz-copy-source-if-match"                                  =: _upcCopySourceIfMatch+        , "x-amz-copy-source-if-modified-since"                         =: _upcCopySourceIfModifiedSince+        , "x-amz-copy-source-if-none-match"                             =: _upcCopySourceIfNoneMatch+        , "x-amz-copy-source-if-unmodified-since"                       =: _upcCopySourceIfUnmodifiedSince+        , "x-amz-copy-source-range"                                     =: _upcCopySourceRange+        , "x-amz-server-side-encryption-customer-algorithm"             =: _upcSSECustomerAlgorithm+        , "x-amz-server-side-encryption-customer-key"                   =: _upcSSECustomerKey+        , "x-amz-server-side-encryption-customer-key-MD5"               =: _upcSSECustomerKeyMD5+        , "x-amz-copy-source-server-side-encryption-customer-algorithm" =: _upcCopySourceSSECustomerAlgorithm+        , "x-amz-copy-source-server-side-encryption-customer-key"       =: _upcCopySourceSSECustomerKey+        , "x-amz-copy-source-server-side-encryption-customer-key-MD5"   =: _upcCopySourceSSECustomerKeyMD5+        , "x-amz-server-side-encryption-aws-kms-key-id"                 =: _upcCopySourceSSEKMSKeyId+        ]++instance ToXMLRoot UploadPartCopy where+    toXMLRoot = const (namespaced ns "UploadPartCopy" [])++instance ToXML UploadPartCopy++instance AWSRequest UploadPartCopy where+    type Sv UploadPartCopy = S3+    type Rs UploadPartCopy = UploadPartCopyResponse++    request  = put+    response = xmlHeaderResponse $ \h x -> UploadPartCopyResponse+        <$> x .@? "CopyPartResult"+        <*> h ~:? "x-amz-copy-source-version-id"+        <*> h ~:? "x-amz-server-side-encryption-customer-algorithm"+        <*> h ~:? "x-amz-server-side-encryption-customer-key-MD5"+        <*> h ~:? "x-amz-server-side-encryption-aws-kms-key-id"+        <*> h ~:? "x-amz-server-side-encryption"
+ src/Network/AWS/S3/Internal.hs view
@@ -0,0 +1,82 @@+{-# LANGUAGE DeriveGeneric              #-}+{-# LANGUAGE GeneralizedNewtypeDeriving #-}++-- Module      : Network.AWS.S3.Internal+-- Copyright   : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>+-- License     : This Source Code Form is subject to the terms of+--               the Mozilla Public License, v. 2.0.+--               A copy of the MPL can be found in the LICENSE file or+--               you can obtain it at http://mozilla.org/MPL/2.0/.+-- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability   : experimental+-- Portability : non-portable (GHC extensions)++module Network.AWS.S3.Internal+    ( module Network.AWS.S3.Internal+    , Region+    ) where++import Data.String+import GHC.Generics+import Network.AWS.Prelude+import Network.AWS.Types (Region)++newtype BucketName = BucketName Text+    deriving+        ( Eq+        , Ord+        , Show+        , Generic+        , IsString+        , FromText+        , ToText+        , ToByteString+        , FromXML+        , ToXML+        , ToQuery+        )++newtype ObjectKey = ObjectKey Text+    deriving+        ( Eq+        , Ord+        , Show+        , Generic+        , IsString+        , FromText+        , ToText+        , ToByteString+        , FromXML+        , ToXML+        , ToQuery+        )++newtype ObjectVersionId = ObjectVersionId Text+    deriving+        ( Eq+        , Ord+        , Show+        , Generic+        , IsString+        , FromText+        , ToText+        , ToByteString+        , FromXML+        , ToXML+        , ToQuery+        )++newtype ETag = ETag Text+    deriving+        ( Eq+        , Ord+        , Show+        , Generic+        , IsString+        , FromText+        , ToText+        , ToByteString+        , FromXML+        , ToXML+        , ToQuery+        )