packages feed

amazonka-backupstorage (empty) → 2.0

raw patch · 43 files changed

+3938/−0 lines, 43 filesdep +amazonka-backupstoragedep +amazonka-coredep +amazonka-test

Dependencies added: amazonka-backupstorage, amazonka-core, amazonka-test, base, bytestring, case-insensitive, tasty, tasty-hunit, text, time, unordered-containers

Files

+ LICENSE view
@@ -0,0 +1,367 @@+Mozilla Public License Version 2.0+==================================++1. Definitions+--------------++1.1. "Contributor"+    means each individual or legal entity that creates, contributes to+    the creation of, or owns Covered Software.++1.2. "Contributor Version"+    means the combination of the Contributions of others (if any) used+    by a Contributor and that particular Contributor's Contribution.++1.3. "Contribution"+    means Covered Software of a particular Contributor.++1.4. "Covered Software"+    means Source Code Form to which the initial Contributor has attached+    the notice in Exhibit A, the Executable Form of such Source Code+    Form, and Modifications of such Source Code Form, in each case+    including portions thereof.++1.5. "Incompatible With Secondary Licenses"+    means++    (a) that the initial Contributor has attached the notice described+        in Exhibit B to the Covered Software; or++    (b) that the Covered Software was made available under the terms of+        version 1.1 or earlier of the License, but not also under the+        terms of a Secondary License.++1.6. "Executable Form"+    means any form of the work other than Source Code Form.++1.7. "Larger Work"+    means a work that combines Covered Software with other material, in+    a separate file or files, that is not Covered Software.++1.8. "License"+    means this document.++1.9. "Licensable"+    means having the right to grant, to the maximum extent possible,+    whether at the time of the initial grant or subsequently, any and+    all of the rights conveyed by this License.++1.10. "Modifications"+    means any of the following:++    (a) any file in Source Code Form that results from an addition to,+        deletion from, or modification of the contents of Covered+        Software; or++    (b) any new file in Source Code Form that contains any Covered+        Software.++1.11. "Patent Claims" of a Contributor+    means any patent claim(s), including without limitation, method,+    process, and apparatus claims, in any patent Licensable by such+    Contributor that would be infringed, but for the grant of the+    License, by the making, using, selling, offering for sale, having+    made, import, or transfer of either its Contributions or its+    Contributor Version.++1.12. "Secondary License"+    means either the GNU General Public License, Version 2.0, the GNU+    Lesser General Public License, Version 2.1, the GNU Affero General+    Public License, Version 3.0, or any later versions of those+    licenses.++1.13. "Source Code Form"+    means the form of the work preferred for making modifications.++1.14. "You" (or "Your")+    means an individual or a legal entity exercising rights under this+    License. For legal entities, "You" includes any entity that+    controls, is controlled by, or is under common control with You. For+    purposes of this definition, "control" means (a) the power, direct+    or indirect, to cause the direction or management of such entity,+    whether by contract or otherwise, or (b) ownership of more than+    fifty percent (50%) of the outstanding shares or beneficial+    ownership of such entity.++2. License Grants and Conditions+--------------------------------++2.1. Grants++Each Contributor hereby grants You a world-wide, royalty-free,+non-exclusive license:++(a) under intellectual property rights (other than patent or trademark)+    Licensable by such Contributor to use, reproduce, make available,+    modify, display, perform, distribute, and otherwise exploit its+    Contributions, either on an unmodified basis, with Modifications, or+    as part of a Larger Work; and++(b) under Patent Claims of such Contributor to make, use, sell, offer+    for sale, have made, import, and otherwise transfer either its+    Contributions or its Contributor Version.++2.2. Effective Date++The licenses granted in Section 2.1 with respect to any Contribution+become effective for each Contribution on the date the Contributor first+distributes such Contribution.++2.3. Limitations on Grant Scope++The licenses granted in this Section 2 are the only rights granted under+this License. No additional rights or licenses will be implied from the+distribution or licensing of Covered Software under this License.+Notwithstanding Section 2.1(b) above, no patent license is granted by a+Contributor:++(a) for any code that a Contributor has removed from Covered Software;+    or++(b) for infringements caused by: (i) Your and any other third party's+    modifications of Covered Software, or (ii) the combination of its+    Contributions with other software (except as part of its Contributor+    Version); or++(c) under Patent Claims infringed by Covered Software in the absence of+    its Contributions.++This License does not grant any rights in the trademarks, service marks,+or logos of any Contributor (except as may be necessary to comply with+the notice requirements in Section 3.4).++2.4. Subsequent Licenses++No Contributor makes additional grants as a result of Your choice to+distribute the Covered Software under a subsequent version of this+License (see Section 10.2) or under the terms of a Secondary License (if+permitted under the terms of Section 3.3).++2.5. Representation++Each Contributor represents that the Contributor believes its+Contributions are its original creation(s) or it has sufficient rights+to grant the rights to its Contributions conveyed by this License.++2.6. Fair Use++This License is not intended to limit any rights You have under+applicable copyright doctrines of fair use, fair dealing, or other+equivalents.++2.7. Conditions++Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted+in Section 2.1.++3. Responsibilities+-------------------++3.1. Distribution of Source Form++All distribution of Covered Software in Source Code Form, including any+Modifications that You create or to which You contribute, must be under+the terms of this License. You must inform recipients that the Source+Code Form of the Covered Software is governed by the terms of this+License, and how they can obtain a copy of this License. You may not+attempt to alter or restrict the recipients' rights in the Source Code+Form.++3.2. Distribution of Executable Form++If You distribute Covered Software in Executable Form then:++(a) such Covered Software must also be made available in Source Code+    Form, as described in Section 3.1, and You must inform recipients of+    the Executable Form how they can obtain a copy of such Source Code+    Form by reasonable means in a timely manner, at a charge no more+    than the cost of distribution to the recipient; and++(b) You may distribute such Executable Form under the terms of this+    License, or sublicense it under different terms, provided that the+    license for the Executable Form does not attempt to limit or alter+    the recipients' rights in the Source Code Form under this License.++3.3. Distribution of a Larger Work++You may create and distribute a Larger Work under terms of Your choice,+provided that You also comply with the requirements of this License for+the Covered Software. If the Larger Work is a combination of Covered+Software with a work governed by one or more Secondary Licenses, and the+Covered Software is not Incompatible With Secondary Licenses, this+License permits You to additionally distribute such Covered Software+under the terms of such Secondary License(s), so that the recipient of+the Larger Work may, at their option, further distribute the Covered+Software under the terms of either this License or such Secondary+License(s).++3.4. Notices++You may not remove or alter the substance of any license notices+(including copyright notices, patent notices, disclaimers of warranty,+or limitations of liability) contained within the Source Code Form of+the Covered Software, except that You may alter any license notices to+the extent required to remedy known factual inaccuracies.++3.5. Application of Additional Terms++You may choose to offer, and to charge a fee for, warranty, support,+indemnity or liability obligations to one or more recipients of Covered+Software. However, You may do so only on Your own behalf, and not on+behalf of any Contributor. You must make it absolutely clear that any+such warranty, support, indemnity, or liability obligation is offered by+You alone, and You hereby agree to indemnify every Contributor for any+liability incurred by such Contributor as a result of warranty, support,+indemnity or liability terms You offer. You may include additional+disclaimers of warranty and limitations of liability specific to any+jurisdiction.++4. Inability to Comply Due to Statute or Regulation+---------------------------------------------------++If it is impossible for You to comply with any of the terms of this+License with respect to some or all of the Covered Software due to+statute, judicial order, or regulation then You must: (a) comply with+the terms of this License to the maximum extent possible; and (b)+describe the limitations and the code they affect. Such description must+be placed in a text file included with all distributions of the Covered+Software under this License. Except to the extent prohibited by statute+or regulation, such description must be sufficiently detailed for a+recipient of ordinary skill to be able to understand it.++5. Termination+--------------++5.1. The rights granted under this License will terminate automatically+if You fail to comply with any of its terms. However, if You become+compliant, then the rights granted under this License from a particular+Contributor are reinstated (a) provisionally, unless and until such+Contributor explicitly and finally terminates Your grants, and (b) on an+ongoing basis, if such Contributor fails to notify You of the+non-compliance by some reasonable means prior to 60 days after You have+come back into compliance. Moreover, Your grants from a particular+Contributor are reinstated on an ongoing basis if such Contributor+notifies You of the non-compliance by some reasonable means, this is the+first time You have received notice of non-compliance with this License+from such Contributor, and You become compliant prior to 30 days after+Your receipt of the notice.++5.2. If You initiate litigation against any entity by asserting a patent+infringement claim (excluding declaratory judgment actions,+counter-claims, and cross-claims) alleging that a Contributor Version+directly or indirectly infringes any patent, then the rights granted to+You by any and all Contributors for the Covered Software under Section+2.1 of this License shall terminate.++5.3. In the event of termination under Sections 5.1 or 5.2 above, all+end user license agreements (excluding distributors and resellers) which+have been validly granted by You or Your distributors under this License+prior to termination shall survive termination.++************************************************************************+*                                                                      *+*  6. Disclaimer of Warranty                                           *+*  -------------------------                                           *+*                                                                      *+*  Covered Software is provided under this License on an "as is"       *+*  basis, without warranty of any kind, either expressed, implied, or  *+*  statutory, including, without limitation, warranties that the       *+*  Covered Software is free of defects, merchantable, fit for a        *+*  particular purpose or non-infringing. The entire risk as to the     *+*  quality and performance of the Covered Software is with You.        *+*  Should any Covered Software prove defective in any respect, You     *+*  (not any Contributor) assume the cost of any necessary servicing,   *+*  repair, or correction. This disclaimer of warranty constitutes an   *+*  essential part of this License. No use of any Covered Software is   *+*  authorized under this License except under this disclaimer.         *+*                                                                      *+************************************************************************++************************************************************************+*                                                                      *+*  7. Limitation of Liability                                          *+*  --------------------------                                          *+*                                                                      *+*  Under no circumstances and under no legal theory, whether tort      *+*  (including negligence), contract, or otherwise, shall any           *+*  Contributor, or anyone who distributes Covered Software as          *+*  permitted above, be liable to You for any direct, indirect,         *+*  special, incidental, or consequential damages of any character      *+*  including, without limitation, damages for lost profits, loss of    *+*  goodwill, work stoppage, computer failure or malfunction, or any    *+*  and all other commercial damages or losses, even if such party      *+*  shall have been informed of the possibility of such damages. This   *+*  limitation of liability shall not apply to liability for death or   *+*  personal injury resulting from such party's negligence to the       *+*  extent applicable law prohibits such limitation. Some               *+*  jurisdictions do not allow the exclusion or limitation of           *+*  incidental or consequential damages, so this exclusion and          *+*  limitation may not apply to You.                                    *+*                                                                      *+************************************************************************++8. Litigation+-------------++Any litigation relating to this License may be brought only in the+courts of a jurisdiction where the defendant maintains its principal+place of business and such litigation shall be governed by laws of that+jurisdiction, without reference to its conflict-of-law provisions.+Nothing in this Section shall prevent a party's ability to bring+cross-claims or counter-claims.++9. Miscellaneous+----------------++This License represents the complete agreement concerning the subject+matter hereof. If any provision of this License is held to be+unenforceable, such provision shall be reformed only to the extent+necessary to make it enforceable. Any law or regulation which provides+that the language of a contract shall be construed against the drafter+shall not be used to construe this License against a Contributor.++10. Versions of the License+---------------------------++10.1. New Versions++Mozilla Foundation is the license steward. Except as provided in Section+10.3, no one other than the license steward has the right to modify or+publish new versions of this License. Each version will be given a+distinguishing version number.++10.2. Effect of New Versions++You may distribute the Covered Software under the terms of the version+of the License under which You originally received the Covered Software,+or under the terms of any subsequent version published by the license+steward.++10.3. Modified Versions++If you create software not governed by this License, and you want to+create a new license for such software, you may create and use a+modified version of this License if you rename the license and remove+any references to the name of the license steward (except to note that+such modified license differs from this License).++10.4. Distributing Source Code Form that is Incompatible With Secondary+Licenses++If You choose to distribute Source Code Form that is Incompatible With+Secondary Licenses under the terms of this version of the License, the+notice described in Exhibit B of this License must be attached.++Exhibit A - Source Code Form License Notice+-------------------------------------------++  This Source Code Form is subject to the terms of the Mozilla Public+  License, v. 2.0. If a copy of the MPL was not distributed with this+  file, You can obtain one at http://mozilla.org/MPL/2.0/.++If it is not possible or desirable to put the notice in a particular+file, then You may include the notice in a location (such as a LICENSE+file in a relevant directory) where a recipient would be likely to look+for such a notice.++You may add additional accurate notices of copyright ownership.
+ README.md view
@@ -0,0 +1,44 @@+# Amazon Backup Storage SDK++* [Version](#version)+* [Description](#description)+* [Contribute](#contribute)+* [Licence](#licence)+++## Version+ +`2.0` - Derived from API version @2018-04-10@ of the AWS service descriptions, licensed under Apache 2.0.++## Description++Documentation is available via [Hackage](http://hackage.haskell.org/package/amazonka-backupstorage)+and the [AWS API Reference](https://aws.amazon.com/documentation/).++The types from this library are intended to be used with [amazonka](http://hackage.haskell.org/package/amazonka),+which provides mechanisms for specifying AuthN/AuthZ information, sending requests,+and receiving responses.++Lenses are used for constructing and manipulating types,+due to the depth of nesting of AWS types and transparency regarding+de/serialisation into more palatable Haskell values.+The provided lenses should be compatible with any of the major lens libraries+[lens](http://hackage.haskell.org/package/lens) or [lens-family-core](http://hackage.haskell.org/package/lens-family-core).++See [Amazonka.BackupStorage](http://hackage.haskell.org/package/amazonka-backupstorage/docs/Amazonka-BackupStorage.html)+or [the AWS documentation](https://aws.amazon.com/documentation/) to get started.+++## Contribute++For any problems, comments, or feedback please create an issue [here on GitHub](https://github.com/brendanhay/amazonka/issues).++> _Note:_ this library is an auto-generated Haskell package. Please see `amazonka-gen` for more information.+++## Licence++`amazonka-backupstorage` is released under the [Mozilla Public License Version 2.0](http://www.mozilla.org/MPL/).++Parts of the code are derived from AWS service descriptions, licensed under Apache 2.0.+Source files subject to this contain an additional licensing clause in their header.
+ amazonka-backupstorage.cabal view
@@ -0,0 +1,96 @@+cabal-version:      2.2+name:               amazonka-backupstorage+version:            2.0+synopsis:           Amazon Backup Storage SDK.+homepage:           https://github.com/brendanhay/amazonka+bug-reports:        https://github.com/brendanhay/amazonka/issues+license:            MPL-2.0+license-file:       LICENSE+author:             Brendan Hay+maintainer:+  Brendan Hay <brendan.g.hay+amazonka@gmail.com>, Jack Kelly <jack@jackkelly.name>++copyright:          Copyright (c) 2013-2023 Brendan Hay+category:           AWS+build-type:         Simple+extra-source-files:+  fixture/*.proto+  fixture/*.yaml+  README.md+  src/.gitkeep++description:+  Derived from API version @2018-04-10@ of the AWS service descriptions, licensed under Apache 2.0.+  .+  The types from this library are intended to be used with <http://hackage.haskell.org/package/amazonka amazonka>,+  which provides mechanisms for specifying AuthN/AuthZ information, sending requests, and receiving responses.+  .+  It is recommended to use generic lenses or optics from packages such as <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify optional fields and deconstruct responses.+  .+  Generated lenses can be found in "Amazonka.BackupStorage.Lens" and are+  suitable for use with a lens package such as <http://hackage.haskell.org/package/lens lens> or <http://hackage.haskell.org/package/lens-family-core lens-family-core>.+  .+  See "Amazonka.BackupStorage" and the <https://aws.amazon.com/documentation/ AWS documentation> to get started.++source-repository head+  type:     git+  location: git://github.com/brendanhay/amazonka.git+  subdir:   amazonka-backupstorage++library+  default-language: Haskell2010+  hs-source-dirs:   src gen+  ghc-options:+    -Wall -fwarn-incomplete-uni-patterns+    -fwarn-incomplete-record-updates -funbox-strict-fields++  exposed-modules:+    Amazonka.BackupStorage+    Amazonka.BackupStorage.DeleteObject+    Amazonka.BackupStorage.GetChunk+    Amazonka.BackupStorage.GetObjectMetadata+    Amazonka.BackupStorage.Lens+    Amazonka.BackupStorage.ListChunks+    Amazonka.BackupStorage.ListObjects+    Amazonka.BackupStorage.NotifyObjectComplete+    Amazonka.BackupStorage.PutChunk+    Amazonka.BackupStorage.PutObject+    Amazonka.BackupStorage.StartObject+    Amazonka.BackupStorage.Types+    Amazonka.BackupStorage.Types.BackupObject+    Amazonka.BackupStorage.Types.Chunk+    Amazonka.BackupStorage.Types.DataChecksumAlgorithm+    Amazonka.BackupStorage.Types.SummaryChecksumAlgorithm+    Amazonka.BackupStorage.Waiters++  build-depends:+    , amazonka-core  >=2.0  && <2.1+    , base           >=4.12 && <5++test-suite amazonka-backupstorage-test+  type:             exitcode-stdio-1.0+  default-language: Haskell2010+  hs-source-dirs:   test+  main-is:          Main.hs+  ghc-options:      -Wall -threaded++  -- This section is encoded by the template and any modules added by+  -- hand outside these namespaces will not correctly be added to the+  -- distribution package.+  other-modules:+    Test.Amazonka.BackupStorage+    Test.Amazonka.BackupStorage.Internal+    Test.Amazonka.Gen.BackupStorage++  build-depends:+    , amazonka-backupstorage+    , amazonka-core           >=2.0 && <2.1+    , amazonka-test           >=2.0 && <2.1+    , base+    , bytestring+    , case-insensitive+    , tasty+    , tasty-hunit+    , text+    , time+    , unordered-containers
+ fixture/DeleteObject.yaml view
@@ -0,0 +1,10 @@+---+method: DELETE+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/backupstorage/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  backupstorage.us-east-1.amazonaws.com+  Content-Type:          application/x-www-form-urlencoded; charset=utf-8+  X-Amz-Content-SHA256:  abcdef+  X-Amz-Date:            20091028T223200Z+body:+  ''
+ fixture/DeleteObjectResponse.proto view
+ fixture/GetChunk.yaml view
@@ -0,0 +1,10 @@+---+method: GET+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/backupstorage/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  backupstorage.us-east-1.amazonaws.com+  Content-Type:          application/x-www-form-urlencoded; charset=utf-8+  X-Amz-Content-SHA256:  abcdef+  X-Amz-Date:            20091028T223200Z+body:+  ''
+ fixture/GetChunkResponse.proto view
+ fixture/GetObjectMetadata.yaml view
@@ -0,0 +1,10 @@+---+method: GET+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/backupstorage/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  backupstorage.us-east-1.amazonaws.com+  Content-Type:          application/x-www-form-urlencoded; charset=utf-8+  X-Amz-Content-SHA256:  abcdef+  X-Amz-Date:            20091028T223200Z+body:+  ''
+ fixture/GetObjectMetadataResponse.proto view
+ fixture/ListChunks.yaml view
@@ -0,0 +1,10 @@+---+method: GET+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/backupstorage/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  backupstorage.us-east-1.amazonaws.com+  Content-Type:          application/x-www-form-urlencoded; charset=utf-8+  X-Amz-Content-SHA256:  abcdef+  X-Amz-Date:            20091028T223200Z+body:+  ''
+ fixture/ListChunksResponse.proto view
+ fixture/ListObjects.yaml view
@@ -0,0 +1,10 @@+---+method: GET+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/backupstorage/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  backupstorage.us-east-1.amazonaws.com+  Content-Type:          application/x-www-form-urlencoded; charset=utf-8+  X-Amz-Content-SHA256:  abcdef+  X-Amz-Date:            20091028T223200Z+body:+  ''
+ fixture/ListObjectsResponse.proto view
+ fixture/NotifyObjectComplete.yaml view
@@ -0,0 +1,10 @@+---+method: PUT+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/backupstorage/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  backupstorage.us-east-1.amazonaws.com+  Content-Type:          application/x-www-form-urlencoded; charset=utf-8+  X-Amz-Content-SHA256:  abcdef+  X-Amz-Date:            20091028T223200Z+body:+  ''
+ fixture/NotifyObjectCompleteResponse.proto view
+ fixture/PutChunk.yaml view
@@ -0,0 +1,10 @@+---+method: PUT+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/backupstorage/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  backupstorage.us-east-1.amazonaws.com+  Content-Type:          application/x-www-form-urlencoded; charset=utf-8+  X-Amz-Content-SHA256:  abcdef+  X-Amz-Date:            20091028T223200Z+body:+  ''
+ fixture/PutChunkResponse.proto view
+ fixture/PutObject.yaml view
@@ -0,0 +1,10 @@+---+method: PUT+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/backupstorage/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  backupstorage.us-east-1.amazonaws.com+  Content-Type:          application/x-www-form-urlencoded; charset=utf-8+  X-Amz-Content-SHA256:  abcdef+  X-Amz-Date:            20091028T223200Z+body:+  ''
+ fixture/PutObjectResponse.proto view
+ fixture/StartObject.yaml view
@@ -0,0 +1,10 @@+---+method: PUT+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/backupstorage/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  backupstorage.us-east-1.amazonaws.com+  Content-Type:          application/x-www-form-urlencoded; charset=utf-8+  X-Amz-Content-SHA256:  abcdef+  X-Amz-Date:            20091028T223200Z+body:+  ''
+ fixture/StartObjectResponse.proto view
+ gen/Amazonka/BackupStorage.hs view
@@ -0,0 +1,168 @@+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- |+-- Module      : Amazonka.BackupStorage+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Derived from API version @2018-04-10@ of the AWS service descriptions, licensed under Apache 2.0.+--+-- The frontend service for Cryo Storage.+module Amazonka.BackupStorage+  ( -- * Service Configuration+    defaultService,++    -- * Errors+    -- $errors++    -- ** AccessDeniedException+    _AccessDeniedException,++    -- ** DataAlreadyExistsException+    _DataAlreadyExistsException,++    -- ** IllegalArgumentException+    _IllegalArgumentException,++    -- ** KMSInvalidKeyUsageException+    _KMSInvalidKeyUsageException,++    -- ** NotReadableInputStreamException+    _NotReadableInputStreamException,++    -- ** ResourceNotFoundException+    _ResourceNotFoundException,++    -- ** RetryableException+    _RetryableException,++    -- ** ServiceInternalException+    _ServiceInternalException,++    -- ** ServiceUnavailableException+    _ServiceUnavailableException,++    -- ** ThrottlingException+    _ThrottlingException,++    -- * Waiters+    -- $waiters++    -- * Operations+    -- $operations++    -- ** DeleteObject+    DeleteObject (DeleteObject'),+    newDeleteObject,+    DeleteObjectResponse (DeleteObjectResponse'),+    newDeleteObjectResponse,++    -- ** GetChunk+    GetChunk (GetChunk'),+    newGetChunk,+    GetChunkResponse (GetChunkResponse'),+    newGetChunkResponse,++    -- ** GetObjectMetadata+    GetObjectMetadata (GetObjectMetadata'),+    newGetObjectMetadata,+    GetObjectMetadataResponse (GetObjectMetadataResponse'),+    newGetObjectMetadataResponse,++    -- ** ListChunks+    ListChunks (ListChunks'),+    newListChunks,+    ListChunksResponse (ListChunksResponse'),+    newListChunksResponse,++    -- ** ListObjects+    ListObjects (ListObjects'),+    newListObjects,+    ListObjectsResponse (ListObjectsResponse'),+    newListObjectsResponse,++    -- ** NotifyObjectComplete+    NotifyObjectComplete (NotifyObjectComplete'),+    newNotifyObjectComplete,+    NotifyObjectCompleteResponse (NotifyObjectCompleteResponse'),+    newNotifyObjectCompleteResponse,++    -- ** PutChunk+    PutChunk (PutChunk'),+    newPutChunk,+    PutChunkResponse (PutChunkResponse'),+    newPutChunkResponse,++    -- ** PutObject+    PutObject (PutObject'),+    newPutObject,+    PutObjectResponse (PutObjectResponse'),+    newPutObjectResponse,++    -- ** StartObject+    StartObject (StartObject'),+    newStartObject,+    StartObjectResponse (StartObjectResponse'),+    newStartObjectResponse,++    -- * Types++    -- ** DataChecksumAlgorithm+    DataChecksumAlgorithm (..),++    -- ** SummaryChecksumAlgorithm+    SummaryChecksumAlgorithm (..),++    -- ** BackupObject+    BackupObject (BackupObject'),+    newBackupObject,++    -- ** Chunk+    Chunk (Chunk'),+    newChunk,+  )+where++import Amazonka.BackupStorage.DeleteObject+import Amazonka.BackupStorage.GetChunk+import Amazonka.BackupStorage.GetObjectMetadata+import Amazonka.BackupStorage.Lens+import Amazonka.BackupStorage.ListChunks+import Amazonka.BackupStorage.ListObjects+import Amazonka.BackupStorage.NotifyObjectComplete+import Amazonka.BackupStorage.PutChunk+import Amazonka.BackupStorage.PutObject+import Amazonka.BackupStorage.StartObject+import Amazonka.BackupStorage.Types+import Amazonka.BackupStorage.Waiters++-- $errors+-- Error matchers are designed for use with the functions provided by+-- <http://hackage.haskell.org/package/lens/docs/Control-Exception-Lens.html Control.Exception.Lens>.+-- This allows catching (and rethrowing) service specific errors returned+-- by 'BackupStorage'.++-- $operations+-- Some AWS operations return results that are incomplete and require subsequent+-- requests in order to obtain the entire result set. The process of sending+-- subsequent requests to continue where a previous request left off is called+-- pagination. For example, the 'ListObjects' operation of Amazon S3 returns up to+-- 1000 objects at a time, and you must send subsequent requests with the+-- appropriate Marker in order to retrieve the next page of results.+--+-- Operations that have an 'AWSPager' instance can transparently perform subsequent+-- requests, correctly setting Markers and other request facets to iterate through+-- the entire result set of a truncated API operation. Operations which support+-- this have an additional note in the documentation.+--+-- Many operations have the ability to filter results on the server side. See the+-- individual operation parameters for details.++-- $waiters+-- Waiters poll by repeatedly sending a request until some remote success condition+-- configured by the 'Wait' specification is fulfilled. The 'Wait' specification+-- determines how many attempts should be made, in addition to delay and retry strategies.
+ gen/Amazonka/BackupStorage/DeleteObject.hs view
@@ -0,0 +1,142 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Amazonka.BackupStorage.DeleteObject+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Delete Object from the incremental base Backup.+module Amazonka.BackupStorage.DeleteObject+  ( -- * Creating a Request+    DeleteObject (..),+    newDeleteObject,++    -- * Request Lenses+    deleteObject_backupJobId,+    deleteObject_objectName,++    -- * Destructuring the Response+    DeleteObjectResponse (..),+    newDeleteObjectResponse,+  )+where++import Amazonka.BackupStorage.Types+import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newDeleteObject' smart constructor.+data DeleteObject = DeleteObject'+  { -- | Backup job Id for the in-progress backup.+    backupJobId :: Prelude.Text,+    -- | The name of the Object.+    objectName :: Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DeleteObject' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'backupJobId', 'deleteObject_backupJobId' - Backup job Id for the in-progress backup.+--+-- 'objectName', 'deleteObject_objectName' - The name of the Object.+newDeleteObject ::+  -- | 'backupJobId'+  Prelude.Text ->+  -- | 'objectName'+  Prelude.Text ->+  DeleteObject+newDeleteObject pBackupJobId_ pObjectName_ =+  DeleteObject'+    { backupJobId = pBackupJobId_,+      objectName = pObjectName_+    }++-- | Backup job Id for the in-progress backup.+deleteObject_backupJobId :: Lens.Lens' DeleteObject Prelude.Text+deleteObject_backupJobId = Lens.lens (\DeleteObject' {backupJobId} -> backupJobId) (\s@DeleteObject' {} a -> s {backupJobId = a} :: DeleteObject)++-- | The name of the Object.+deleteObject_objectName :: Lens.Lens' DeleteObject Prelude.Text+deleteObject_objectName = Lens.lens (\DeleteObject' {objectName} -> objectName) (\s@DeleteObject' {} a -> s {objectName = a} :: DeleteObject)++instance Core.AWSRequest DeleteObject where+  type AWSResponse DeleteObject = DeleteObjectResponse+  request overrides =+    Request.delete (overrides defaultService)+  response = Response.receiveNull DeleteObjectResponse'++instance Prelude.Hashable DeleteObject where+  hashWithSalt _salt DeleteObject' {..} =+    _salt+      `Prelude.hashWithSalt` backupJobId+      `Prelude.hashWithSalt` objectName++instance Prelude.NFData DeleteObject where+  rnf DeleteObject' {..} =+    Prelude.rnf backupJobId+      `Prelude.seq` Prelude.rnf objectName++instance Data.ToHeaders DeleteObject where+  toHeaders =+    Prelude.const+      ( Prelude.mconcat+          [ "Content-Type"+              Data.=# ( "application/x-amz-json-1.1" ::+                          Prelude.ByteString+                      )+          ]+      )++instance Data.ToPath DeleteObject where+  toPath DeleteObject' {..} =+    Prelude.mconcat+      [ "/backup-jobs/",+        Data.toBS backupJobId,+        "/object/",+        Data.toBS objectName+      ]++instance Data.ToQuery DeleteObject where+  toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newDeleteObjectResponse' smart constructor.+data DeleteObjectResponse = DeleteObjectResponse'+  {+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DeleteObjectResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+newDeleteObjectResponse ::+  DeleteObjectResponse+newDeleteObjectResponse = DeleteObjectResponse'++instance Prelude.NFData DeleteObjectResponse where+  rnf _ = ()
+ gen/Amazonka/BackupStorage/GetChunk.hs view
@@ -0,0 +1,219 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Amazonka.BackupStorage.GetChunk+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Gets the specified object\'s chunk.+module Amazonka.BackupStorage.GetChunk+  ( -- * Creating a Request+    GetChunk (..),+    newGetChunk,++    -- * Request Lenses+    getChunk_storageJobId,+    getChunk_chunkToken,++    -- * Destructuring the Response+    GetChunkResponse (..),+    newGetChunkResponse,++    -- * Response Lenses+    getChunkResponse_httpStatus,+    getChunkResponse_length,+    getChunkResponse_checksum,+    getChunkResponse_checksumAlgorithm,+    getChunkResponse_data,+  )+where++import Amazonka.BackupStorage.Types+import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newGetChunk' smart constructor.+data GetChunk = GetChunk'+  { -- | Storage job id+    storageJobId :: Prelude.Text,+    -- | Chunk token+    chunkToken :: Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'GetChunk' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'storageJobId', 'getChunk_storageJobId' - Storage job id+--+-- 'chunkToken', 'getChunk_chunkToken' - Chunk token+newGetChunk ::+  -- | 'storageJobId'+  Prelude.Text ->+  -- | 'chunkToken'+  Prelude.Text ->+  GetChunk+newGetChunk pStorageJobId_ pChunkToken_ =+  GetChunk'+    { storageJobId = pStorageJobId_,+      chunkToken = pChunkToken_+    }++-- | Storage job id+getChunk_storageJobId :: Lens.Lens' GetChunk Prelude.Text+getChunk_storageJobId = Lens.lens (\GetChunk' {storageJobId} -> storageJobId) (\s@GetChunk' {} a -> s {storageJobId = a} :: GetChunk)++-- | Chunk token+getChunk_chunkToken :: Lens.Lens' GetChunk Prelude.Text+getChunk_chunkToken = Lens.lens (\GetChunk' {chunkToken} -> chunkToken) (\s@GetChunk' {} a -> s {chunkToken = a} :: GetChunk)++instance Core.AWSRequest GetChunk where+  type AWSResponse GetChunk = GetChunkResponse+  request overrides =+    Request.get (overrides defaultService)+  response =+    Response.receiveBody+      ( \s h x ->+          GetChunkResponse'+            Prelude.<$> (Prelude.pure (Prelude.fromEnum s))+            Prelude.<*> (h Data..# "x-amz-data-length")+            Prelude.<*> (h Data..# "x-amz-checksum")+            Prelude.<*> (h Data..# "x-amz-checksum-algorithm")+            Prelude.<*> (Prelude.pure x)+      )++instance Prelude.Hashable GetChunk where+  hashWithSalt _salt GetChunk' {..} =+    _salt+      `Prelude.hashWithSalt` storageJobId+      `Prelude.hashWithSalt` chunkToken++instance Prelude.NFData GetChunk where+  rnf GetChunk' {..} =+    Prelude.rnf storageJobId+      `Prelude.seq` Prelude.rnf chunkToken++instance Data.ToHeaders GetChunk where+  toHeaders =+    Prelude.const+      ( Prelude.mconcat+          [ "Content-Type"+              Data.=# ( "application/x-amz-json-1.1" ::+                          Prelude.ByteString+                      )+          ]+      )++instance Data.ToPath GetChunk where+  toPath GetChunk' {..} =+    Prelude.mconcat+      [ "/restore-jobs/",+        Data.toBS storageJobId,+        "/chunk/",+        Data.toBS chunkToken+      ]++instance Data.ToQuery GetChunk where+  toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newGetChunkResponse' smart constructor.+data GetChunkResponse = GetChunkResponse'+  { -- | The response's http status code.+    httpStatus :: Prelude.Int,+    -- | Data length+    length :: Prelude.Integer,+    -- | Data checksum+    checksum :: Prelude.Text,+    -- | Checksum algorithm+    checksumAlgorithm :: DataChecksumAlgorithm,+    -- | Chunk data+    data' :: Data.ResponseBody+  }+  deriving (Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'GetChunkResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'httpStatus', 'getChunkResponse_httpStatus' - The response's http status code.+--+-- 'length', 'getChunkResponse_length' - Data length+--+-- 'checksum', 'getChunkResponse_checksum' - Data checksum+--+-- 'checksumAlgorithm', 'getChunkResponse_checksumAlgorithm' - Checksum algorithm+--+-- 'data'', 'getChunkResponse_data' - Chunk data+newGetChunkResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  -- | 'length'+  Prelude.Integer ->+  -- | 'checksum'+  Prelude.Text ->+  -- | 'checksumAlgorithm'+  DataChecksumAlgorithm ->+  -- | 'data''+  Data.ResponseBody ->+  GetChunkResponse+newGetChunkResponse+  pHttpStatus_+  pLength_+  pChecksum_+  pChecksumAlgorithm_+  pData_ =+    GetChunkResponse'+      { httpStatus = pHttpStatus_,+        length = pLength_,+        checksum = pChecksum_,+        checksumAlgorithm = pChecksumAlgorithm_,+        data' = pData_+      }++-- | The response's http status code.+getChunkResponse_httpStatus :: Lens.Lens' GetChunkResponse Prelude.Int+getChunkResponse_httpStatus = Lens.lens (\GetChunkResponse' {httpStatus} -> httpStatus) (\s@GetChunkResponse' {} a -> s {httpStatus = a} :: GetChunkResponse)++-- | Data length+getChunkResponse_length :: Lens.Lens' GetChunkResponse Prelude.Integer+getChunkResponse_length = Lens.lens (\GetChunkResponse' {length} -> length) (\s@GetChunkResponse' {} a -> s {length = a} :: GetChunkResponse)++-- | Data checksum+getChunkResponse_checksum :: Lens.Lens' GetChunkResponse Prelude.Text+getChunkResponse_checksum = Lens.lens (\GetChunkResponse' {checksum} -> checksum) (\s@GetChunkResponse' {} a -> s {checksum = a} :: GetChunkResponse)++-- | Checksum algorithm+getChunkResponse_checksumAlgorithm :: Lens.Lens' GetChunkResponse DataChecksumAlgorithm+getChunkResponse_checksumAlgorithm = Lens.lens (\GetChunkResponse' {checksumAlgorithm} -> checksumAlgorithm) (\s@GetChunkResponse' {} a -> s {checksumAlgorithm = a} :: GetChunkResponse)++-- | Chunk data+getChunkResponse_data :: Lens.Lens' GetChunkResponse Data.ResponseBody+getChunkResponse_data = Lens.lens (\GetChunkResponse' {data'} -> data') (\s@GetChunkResponse' {} a -> s {data' = a} :: GetChunkResponse)
+ gen/Amazonka/BackupStorage/GetObjectMetadata.hs view
@@ -0,0 +1,225 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Amazonka.BackupStorage.GetObjectMetadata+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Get metadata associated with an Object.+module Amazonka.BackupStorage.GetObjectMetadata+  ( -- * Creating a Request+    GetObjectMetadata (..),+    newGetObjectMetadata,++    -- * Request Lenses+    getObjectMetadata_storageJobId,+    getObjectMetadata_objectToken,++    -- * Destructuring the Response+    GetObjectMetadataResponse (..),+    newGetObjectMetadataResponse,++    -- * Response Lenses+    getObjectMetadataResponse_metadataBlobChecksum,+    getObjectMetadataResponse_metadataBlobChecksumAlgorithm,+    getObjectMetadataResponse_metadataBlobLength,+    getObjectMetadataResponse_metadataString,+    getObjectMetadataResponse_httpStatus,+    getObjectMetadataResponse_metadataBlob,+  )+where++import Amazonka.BackupStorage.Types+import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newGetObjectMetadata' smart constructor.+data GetObjectMetadata = GetObjectMetadata'+  { -- | Backup job id for the in-progress backup.+    storageJobId :: Prelude.Text,+    -- | Object token.+    objectToken :: Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'GetObjectMetadata' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'storageJobId', 'getObjectMetadata_storageJobId' - Backup job id for the in-progress backup.+--+-- 'objectToken', 'getObjectMetadata_objectToken' - Object token.+newGetObjectMetadata ::+  -- | 'storageJobId'+  Prelude.Text ->+  -- | 'objectToken'+  Prelude.Text ->+  GetObjectMetadata+newGetObjectMetadata pStorageJobId_ pObjectToken_ =+  GetObjectMetadata'+    { storageJobId = pStorageJobId_,+      objectToken = pObjectToken_+    }++-- | Backup job id for the in-progress backup.+getObjectMetadata_storageJobId :: Lens.Lens' GetObjectMetadata Prelude.Text+getObjectMetadata_storageJobId = Lens.lens (\GetObjectMetadata' {storageJobId} -> storageJobId) (\s@GetObjectMetadata' {} a -> s {storageJobId = a} :: GetObjectMetadata)++-- | Object token.+getObjectMetadata_objectToken :: Lens.Lens' GetObjectMetadata Prelude.Text+getObjectMetadata_objectToken = Lens.lens (\GetObjectMetadata' {objectToken} -> objectToken) (\s@GetObjectMetadata' {} a -> s {objectToken = a} :: GetObjectMetadata)++instance Core.AWSRequest GetObjectMetadata where+  type+    AWSResponse GetObjectMetadata =+      GetObjectMetadataResponse+  request overrides =+    Request.get (overrides defaultService)+  response =+    Response.receiveBody+      ( \s h x ->+          GetObjectMetadataResponse'+            Prelude.<$> (h Data..#? "x-amz-checksum")+            Prelude.<*> (h Data..#? "x-amz-checksum-algorithm")+            Prelude.<*> (h Data..#? "x-amz-data-length")+            Prelude.<*> (h Data..#? "x-amz-metadata-string")+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+            Prelude.<*> (Prelude.pure x)+      )++instance Prelude.Hashable GetObjectMetadata where+  hashWithSalt _salt GetObjectMetadata' {..} =+    _salt+      `Prelude.hashWithSalt` storageJobId+      `Prelude.hashWithSalt` objectToken++instance Prelude.NFData GetObjectMetadata where+  rnf GetObjectMetadata' {..} =+    Prelude.rnf storageJobId+      `Prelude.seq` Prelude.rnf objectToken++instance Data.ToHeaders GetObjectMetadata where+  toHeaders =+    Prelude.const+      ( Prelude.mconcat+          [ "Content-Type"+              Data.=# ( "application/x-amz-json-1.1" ::+                          Prelude.ByteString+                      )+          ]+      )++instance Data.ToPath GetObjectMetadata where+  toPath GetObjectMetadata' {..} =+    Prelude.mconcat+      [ "/restore-jobs/",+        Data.toBS storageJobId,+        "/object/",+        Data.toBS objectToken,+        "/metadata"+      ]++instance Data.ToQuery GetObjectMetadata where+  toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newGetObjectMetadataResponse' smart constructor.+data GetObjectMetadataResponse = GetObjectMetadataResponse'+  { -- | MetadataBlob checksum.+    metadataBlobChecksum :: Prelude.Maybe Prelude.Text,+    -- | Checksum algorithm.+    metadataBlobChecksumAlgorithm :: Prelude.Maybe DataChecksumAlgorithm,+    -- | The size of MetadataBlob.+    metadataBlobLength :: Prelude.Maybe Prelude.Integer,+    -- | Metadata string.+    metadataString :: Prelude.Maybe Prelude.Text,+    -- | The response's http status code.+    httpStatus :: Prelude.Int,+    -- | Metadata blob.+    metadataBlob :: Data.ResponseBody+  }+  deriving (Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'GetObjectMetadataResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'metadataBlobChecksum', 'getObjectMetadataResponse_metadataBlobChecksum' - MetadataBlob checksum.+--+-- 'metadataBlobChecksumAlgorithm', 'getObjectMetadataResponse_metadataBlobChecksumAlgorithm' - Checksum algorithm.+--+-- 'metadataBlobLength', 'getObjectMetadataResponse_metadataBlobLength' - The size of MetadataBlob.+--+-- 'metadataString', 'getObjectMetadataResponse_metadataString' - Metadata string.+--+-- 'httpStatus', 'getObjectMetadataResponse_httpStatus' - The response's http status code.+--+-- 'metadataBlob', 'getObjectMetadataResponse_metadataBlob' - Metadata blob.+newGetObjectMetadataResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  -- | 'metadataBlob'+  Data.ResponseBody ->+  GetObjectMetadataResponse+newGetObjectMetadataResponse+  pHttpStatus_+  pMetadataBlob_ =+    GetObjectMetadataResponse'+      { metadataBlobChecksum =+          Prelude.Nothing,+        metadataBlobChecksumAlgorithm = Prelude.Nothing,+        metadataBlobLength = Prelude.Nothing,+        metadataString = Prelude.Nothing,+        httpStatus = pHttpStatus_,+        metadataBlob = pMetadataBlob_+      }++-- | MetadataBlob checksum.+getObjectMetadataResponse_metadataBlobChecksum :: Lens.Lens' GetObjectMetadataResponse (Prelude.Maybe Prelude.Text)+getObjectMetadataResponse_metadataBlobChecksum = Lens.lens (\GetObjectMetadataResponse' {metadataBlobChecksum} -> metadataBlobChecksum) (\s@GetObjectMetadataResponse' {} a -> s {metadataBlobChecksum = a} :: GetObjectMetadataResponse)++-- | Checksum algorithm.+getObjectMetadataResponse_metadataBlobChecksumAlgorithm :: Lens.Lens' GetObjectMetadataResponse (Prelude.Maybe DataChecksumAlgorithm)+getObjectMetadataResponse_metadataBlobChecksumAlgorithm = Lens.lens (\GetObjectMetadataResponse' {metadataBlobChecksumAlgorithm} -> metadataBlobChecksumAlgorithm) (\s@GetObjectMetadataResponse' {} a -> s {metadataBlobChecksumAlgorithm = a} :: GetObjectMetadataResponse)++-- | The size of MetadataBlob.+getObjectMetadataResponse_metadataBlobLength :: Lens.Lens' GetObjectMetadataResponse (Prelude.Maybe Prelude.Integer)+getObjectMetadataResponse_metadataBlobLength = Lens.lens (\GetObjectMetadataResponse' {metadataBlobLength} -> metadataBlobLength) (\s@GetObjectMetadataResponse' {} a -> s {metadataBlobLength = a} :: GetObjectMetadataResponse)++-- | Metadata string.+getObjectMetadataResponse_metadataString :: Lens.Lens' GetObjectMetadataResponse (Prelude.Maybe Prelude.Text)+getObjectMetadataResponse_metadataString = Lens.lens (\GetObjectMetadataResponse' {metadataString} -> metadataString) (\s@GetObjectMetadataResponse' {} a -> s {metadataString = a} :: GetObjectMetadataResponse)++-- | The response's http status code.+getObjectMetadataResponse_httpStatus :: Lens.Lens' GetObjectMetadataResponse Prelude.Int+getObjectMetadataResponse_httpStatus = Lens.lens (\GetObjectMetadataResponse' {httpStatus} -> httpStatus) (\s@GetObjectMetadataResponse' {} a -> s {httpStatus = a} :: GetObjectMetadataResponse)++-- | Metadata blob.+getObjectMetadataResponse_metadataBlob :: Lens.Lens' GetObjectMetadataResponse Data.ResponseBody+getObjectMetadataResponse_metadataBlob = Lens.lens (\GetObjectMetadataResponse' {metadataBlob} -> metadataBlob) (\s@GetObjectMetadataResponse' {} a -> s {metadataBlob = a} :: GetObjectMetadataResponse)
+ gen/Amazonka/BackupStorage/Lens.hs view
@@ -0,0 +1,140 @@+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Amazonka.BackupStorage.Lens+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+module Amazonka.BackupStorage.Lens+  ( -- * Operations++    -- ** DeleteObject+    deleteObject_backupJobId,+    deleteObject_objectName,++    -- ** GetChunk+    getChunk_storageJobId,+    getChunk_chunkToken,+    getChunkResponse_httpStatus,+    getChunkResponse_length,+    getChunkResponse_checksum,+    getChunkResponse_checksumAlgorithm,+    getChunkResponse_data,++    -- ** GetObjectMetadata+    getObjectMetadata_storageJobId,+    getObjectMetadata_objectToken,+    getObjectMetadataResponse_metadataBlobChecksum,+    getObjectMetadataResponse_metadataBlobChecksumAlgorithm,+    getObjectMetadataResponse_metadataBlobLength,+    getObjectMetadataResponse_metadataString,+    getObjectMetadataResponse_httpStatus,+    getObjectMetadataResponse_metadataBlob,++    -- ** ListChunks+    listChunks_maxResults,+    listChunks_nextToken,+    listChunks_storageJobId,+    listChunks_objectToken,+    listChunksResponse_nextToken,+    listChunksResponse_httpStatus,+    listChunksResponse_chunkList,++    -- ** ListObjects+    listObjects_createdAfter,+    listObjects_createdBefore,+    listObjects_maxResults,+    listObjects_nextToken,+    listObjects_startingObjectName,+    listObjects_startingObjectPrefix,+    listObjects_storageJobId,+    listObjectsResponse_nextToken,+    listObjectsResponse_httpStatus,+    listObjectsResponse_objectList,++    -- ** NotifyObjectComplete+    notifyObjectComplete_metadataBlobChecksum,+    notifyObjectComplete_metadataBlobChecksumAlgorithm,+    notifyObjectComplete_metadataBlobLength,+    notifyObjectComplete_metadataString,+    notifyObjectComplete_backupJobId,+    notifyObjectComplete_uploadId,+    notifyObjectComplete_objectChecksum,+    notifyObjectComplete_objectChecksumAlgorithm,+    notifyObjectComplete_metadataBlob,+    notifyObjectCompleteResponse_httpStatus,+    notifyObjectCompleteResponse_objectChecksum,+    notifyObjectCompleteResponse_objectChecksumAlgorithm,++    -- ** PutChunk+    putChunk_backupJobId,+    putChunk_uploadId,+    putChunk_chunkIndex,+    putChunk_length,+    putChunk_checksum,+    putChunk_checksumAlgorithm,+    putChunk_data,+    putChunkResponse_httpStatus,+    putChunkResponse_chunkChecksum,+    putChunkResponse_chunkChecksumAlgorithm,++    -- ** PutObject+    putObject_inlineChunkChecksum,+    putObject_inlineChunkChecksumAlgorithm,+    putObject_inlineChunkLength,+    putObject_metadataString,+    putObject_objectChecksum,+    putObject_objectChecksumAlgorithm,+    putObject_throwOnDuplicate,+    putObject_backupJobId,+    putObject_objectName,+    putObject_inlineChunk,+    putObjectResponse_httpStatus,+    putObjectResponse_inlineChunkChecksum,+    putObjectResponse_inlineChunkChecksumAlgorithm,+    putObjectResponse_objectChecksum,+    putObjectResponse_objectChecksumAlgorithm,++    -- ** StartObject+    startObject_throwOnDuplicate,+    startObject_backupJobId,+    startObject_objectName,+    startObjectResponse_httpStatus,+    startObjectResponse_uploadId,++    -- * Types++    -- ** BackupObject+    backupObject_chunksCount,+    backupObject_metadataString,+    backupObject_name,+    backupObject_objectChecksum,+    backupObject_objectChecksumAlgorithm,+    backupObject_objectToken,++    -- ** Chunk+    chunk_index,+    chunk_length,+    chunk_checksum,+    chunk_checksumAlgorithm,+    chunk_chunkToken,+  )+where++import Amazonka.BackupStorage.DeleteObject+import Amazonka.BackupStorage.GetChunk+import Amazonka.BackupStorage.GetObjectMetadata+import Amazonka.BackupStorage.ListChunks+import Amazonka.BackupStorage.ListObjects+import Amazonka.BackupStorage.NotifyObjectComplete+import Amazonka.BackupStorage.PutChunk+import Amazonka.BackupStorage.PutObject+import Amazonka.BackupStorage.StartObject+import Amazonka.BackupStorage.Types.BackupObject+import Amazonka.BackupStorage.Types.Chunk
+ gen/Amazonka/BackupStorage/ListChunks.hs view
@@ -0,0 +1,219 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Amazonka.BackupStorage.ListChunks+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- List chunks in a given Object+module Amazonka.BackupStorage.ListChunks+  ( -- * Creating a Request+    ListChunks (..),+    newListChunks,++    -- * Request Lenses+    listChunks_maxResults,+    listChunks_nextToken,+    listChunks_storageJobId,+    listChunks_objectToken,++    -- * Destructuring the Response+    ListChunksResponse (..),+    newListChunksResponse,++    -- * Response Lenses+    listChunksResponse_nextToken,+    listChunksResponse_httpStatus,+    listChunksResponse_chunkList,+  )+where++import Amazonka.BackupStorage.Types+import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newListChunks' smart constructor.+data ListChunks = ListChunks'+  { -- | Maximum number of chunks+    maxResults :: Prelude.Maybe Prelude.Natural,+    -- | Pagination token+    nextToken :: Prelude.Maybe Prelude.Text,+    -- | Storage job id+    storageJobId :: Prelude.Text,+    -- | Object token+    objectToken :: Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListChunks' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'maxResults', 'listChunks_maxResults' - Maximum number of chunks+--+-- 'nextToken', 'listChunks_nextToken' - Pagination token+--+-- 'storageJobId', 'listChunks_storageJobId' - Storage job id+--+-- 'objectToken', 'listChunks_objectToken' - Object token+newListChunks ::+  -- | 'storageJobId'+  Prelude.Text ->+  -- | 'objectToken'+  Prelude.Text ->+  ListChunks+newListChunks pStorageJobId_ pObjectToken_ =+  ListChunks'+    { maxResults = Prelude.Nothing,+      nextToken = Prelude.Nothing,+      storageJobId = pStorageJobId_,+      objectToken = pObjectToken_+    }++-- | Maximum number of chunks+listChunks_maxResults :: Lens.Lens' ListChunks (Prelude.Maybe Prelude.Natural)+listChunks_maxResults = Lens.lens (\ListChunks' {maxResults} -> maxResults) (\s@ListChunks' {} a -> s {maxResults = a} :: ListChunks)++-- | Pagination token+listChunks_nextToken :: Lens.Lens' ListChunks (Prelude.Maybe Prelude.Text)+listChunks_nextToken = Lens.lens (\ListChunks' {nextToken} -> nextToken) (\s@ListChunks' {} a -> s {nextToken = a} :: ListChunks)++-- | Storage job id+listChunks_storageJobId :: Lens.Lens' ListChunks Prelude.Text+listChunks_storageJobId = Lens.lens (\ListChunks' {storageJobId} -> storageJobId) (\s@ListChunks' {} a -> s {storageJobId = a} :: ListChunks)++-- | Object token+listChunks_objectToken :: Lens.Lens' ListChunks Prelude.Text+listChunks_objectToken = Lens.lens (\ListChunks' {objectToken} -> objectToken) (\s@ListChunks' {} a -> s {objectToken = a} :: ListChunks)++instance Core.AWSRequest ListChunks where+  type AWSResponse ListChunks = ListChunksResponse+  request overrides =+    Request.get (overrides defaultService)+  response =+    Response.receiveJSON+      ( \s h x ->+          ListChunksResponse'+            Prelude.<$> (x Data..?> "NextToken")+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+            Prelude.<*> (x Data..?> "ChunkList" Core..!@ Prelude.mempty)+      )++instance Prelude.Hashable ListChunks where+  hashWithSalt _salt ListChunks' {..} =+    _salt+      `Prelude.hashWithSalt` maxResults+      `Prelude.hashWithSalt` nextToken+      `Prelude.hashWithSalt` storageJobId+      `Prelude.hashWithSalt` objectToken++instance Prelude.NFData ListChunks where+  rnf ListChunks' {..} =+    Prelude.rnf maxResults+      `Prelude.seq` Prelude.rnf nextToken+      `Prelude.seq` Prelude.rnf storageJobId+      `Prelude.seq` Prelude.rnf objectToken++instance Data.ToHeaders ListChunks where+  toHeaders =+    Prelude.const+      ( Prelude.mconcat+          [ "Content-Type"+              Data.=# ( "application/x-amz-json-1.1" ::+                          Prelude.ByteString+                      )+          ]+      )++instance Data.ToPath ListChunks where+  toPath ListChunks' {..} =+    Prelude.mconcat+      [ "/restore-jobs/",+        Data.toBS storageJobId,+        "/chunks/",+        Data.toBS objectToken,+        "/list"+      ]++instance Data.ToQuery ListChunks where+  toQuery ListChunks' {..} =+    Prelude.mconcat+      [ "max-results" Data.=: maxResults,+        "next-token" Data.=: nextToken+      ]++-- | /See:/ 'newListChunksResponse' smart constructor.+data ListChunksResponse = ListChunksResponse'+  { -- | Pagination token+    nextToken :: Prelude.Maybe Prelude.Text,+    -- | The response's http status code.+    httpStatus :: Prelude.Int,+    -- | List of chunks+    chunkList :: [Chunk]+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListChunksResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'nextToken', 'listChunksResponse_nextToken' - Pagination token+--+-- 'httpStatus', 'listChunksResponse_httpStatus' - The response's http status code.+--+-- 'chunkList', 'listChunksResponse_chunkList' - List of chunks+newListChunksResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  ListChunksResponse+newListChunksResponse pHttpStatus_ =+  ListChunksResponse'+    { nextToken = Prelude.Nothing,+      httpStatus = pHttpStatus_,+      chunkList = Prelude.mempty+    }++-- | Pagination token+listChunksResponse_nextToken :: Lens.Lens' ListChunksResponse (Prelude.Maybe Prelude.Text)+listChunksResponse_nextToken = Lens.lens (\ListChunksResponse' {nextToken} -> nextToken) (\s@ListChunksResponse' {} a -> s {nextToken = a} :: ListChunksResponse)++-- | The response's http status code.+listChunksResponse_httpStatus :: Lens.Lens' ListChunksResponse Prelude.Int+listChunksResponse_httpStatus = Lens.lens (\ListChunksResponse' {httpStatus} -> httpStatus) (\s@ListChunksResponse' {} a -> s {httpStatus = a} :: ListChunksResponse)++-- | List of chunks+listChunksResponse_chunkList :: Lens.Lens' ListChunksResponse [Chunk]+listChunksResponse_chunkList = Lens.lens (\ListChunksResponse' {chunkList} -> chunkList) (\s@ListChunksResponse' {} a -> s {chunkList = a} :: ListChunksResponse) Prelude.. Lens.coerced++instance Prelude.NFData ListChunksResponse where+  rnf ListChunksResponse' {..} =+    Prelude.rnf nextToken+      `Prelude.seq` Prelude.rnf httpStatus+      `Prelude.seq` Prelude.rnf chunkList
+ gen/Amazonka/BackupStorage/ListObjects.hs view
@@ -0,0 +1,262 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Amazonka.BackupStorage.ListObjects+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- List all Objects in a given Backup.+module Amazonka.BackupStorage.ListObjects+  ( -- * Creating a Request+    ListObjects (..),+    newListObjects,++    -- * Request Lenses+    listObjects_createdAfter,+    listObjects_createdBefore,+    listObjects_maxResults,+    listObjects_nextToken,+    listObjects_startingObjectName,+    listObjects_startingObjectPrefix,+    listObjects_storageJobId,++    -- * Destructuring the Response+    ListObjectsResponse (..),+    newListObjectsResponse,++    -- * Response Lenses+    listObjectsResponse_nextToken,+    listObjectsResponse_httpStatus,+    listObjectsResponse_objectList,+  )+where++import Amazonka.BackupStorage.Types+import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newListObjects' smart constructor.+data ListObjects = ListObjects'+  { -- | (Optional) Created after filter+    createdAfter :: Prelude.Maybe Data.POSIX,+    -- | (Optional) Created before filter+    createdBefore :: Prelude.Maybe Data.POSIX,+    -- | Maximum objects count+    maxResults :: Prelude.Maybe Prelude.Natural,+    -- | Pagination token+    nextToken :: Prelude.Maybe Prelude.Text,+    -- | Optional, specifies the starting Object name to list from. Ignored if+    -- NextToken is not NULL+    startingObjectName :: Prelude.Maybe Prelude.Text,+    -- | Optional, specifies the starting Object prefix to list from. Ignored if+    -- NextToken is not NULL+    startingObjectPrefix :: Prelude.Maybe Prelude.Text,+    -- | Storage job id+    storageJobId :: Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListObjects' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'createdAfter', 'listObjects_createdAfter' - (Optional) Created after filter+--+-- 'createdBefore', 'listObjects_createdBefore' - (Optional) Created before filter+--+-- 'maxResults', 'listObjects_maxResults' - Maximum objects count+--+-- 'nextToken', 'listObjects_nextToken' - Pagination token+--+-- 'startingObjectName', 'listObjects_startingObjectName' - Optional, specifies the starting Object name to list from. Ignored if+-- NextToken is not NULL+--+-- 'startingObjectPrefix', 'listObjects_startingObjectPrefix' - Optional, specifies the starting Object prefix to list from. Ignored if+-- NextToken is not NULL+--+-- 'storageJobId', 'listObjects_storageJobId' - Storage job id+newListObjects ::+  -- | 'storageJobId'+  Prelude.Text ->+  ListObjects+newListObjects pStorageJobId_ =+  ListObjects'+    { createdAfter = Prelude.Nothing,+      createdBefore = Prelude.Nothing,+      maxResults = Prelude.Nothing,+      nextToken = Prelude.Nothing,+      startingObjectName = Prelude.Nothing,+      startingObjectPrefix = Prelude.Nothing,+      storageJobId = pStorageJobId_+    }++-- | (Optional) Created after filter+listObjects_createdAfter :: Lens.Lens' ListObjects (Prelude.Maybe Prelude.UTCTime)+listObjects_createdAfter = Lens.lens (\ListObjects' {createdAfter} -> createdAfter) (\s@ListObjects' {} a -> s {createdAfter = a} :: ListObjects) Prelude.. Lens.mapping Data._Time++-- | (Optional) Created before filter+listObjects_createdBefore :: Lens.Lens' ListObjects (Prelude.Maybe Prelude.UTCTime)+listObjects_createdBefore = Lens.lens (\ListObjects' {createdBefore} -> createdBefore) (\s@ListObjects' {} a -> s {createdBefore = a} :: ListObjects) Prelude.. Lens.mapping Data._Time++-- | Maximum objects count+listObjects_maxResults :: Lens.Lens' ListObjects (Prelude.Maybe Prelude.Natural)+listObjects_maxResults = Lens.lens (\ListObjects' {maxResults} -> maxResults) (\s@ListObjects' {} a -> s {maxResults = a} :: ListObjects)++-- | Pagination token+listObjects_nextToken :: Lens.Lens' ListObjects (Prelude.Maybe Prelude.Text)+listObjects_nextToken = Lens.lens (\ListObjects' {nextToken} -> nextToken) (\s@ListObjects' {} a -> s {nextToken = a} :: ListObjects)++-- | Optional, specifies the starting Object name to list from. Ignored if+-- NextToken is not NULL+listObjects_startingObjectName :: Lens.Lens' ListObjects (Prelude.Maybe Prelude.Text)+listObjects_startingObjectName = Lens.lens (\ListObjects' {startingObjectName} -> startingObjectName) (\s@ListObjects' {} a -> s {startingObjectName = a} :: ListObjects)++-- | Optional, specifies the starting Object prefix to list from. Ignored if+-- NextToken is not NULL+listObjects_startingObjectPrefix :: Lens.Lens' ListObjects (Prelude.Maybe Prelude.Text)+listObjects_startingObjectPrefix = Lens.lens (\ListObjects' {startingObjectPrefix} -> startingObjectPrefix) (\s@ListObjects' {} a -> s {startingObjectPrefix = a} :: ListObjects)++-- | Storage job id+listObjects_storageJobId :: Lens.Lens' ListObjects Prelude.Text+listObjects_storageJobId = Lens.lens (\ListObjects' {storageJobId} -> storageJobId) (\s@ListObjects' {} a -> s {storageJobId = a} :: ListObjects)++instance Core.AWSRequest ListObjects where+  type AWSResponse ListObjects = ListObjectsResponse+  request overrides =+    Request.get (overrides defaultService)+  response =+    Response.receiveJSON+      ( \s h x ->+          ListObjectsResponse'+            Prelude.<$> (x Data..?> "NextToken")+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+            Prelude.<*> (x Data..?> "ObjectList" Core..!@ Prelude.mempty)+      )++instance Prelude.Hashable ListObjects where+  hashWithSalt _salt ListObjects' {..} =+    _salt+      `Prelude.hashWithSalt` createdAfter+      `Prelude.hashWithSalt` createdBefore+      `Prelude.hashWithSalt` maxResults+      `Prelude.hashWithSalt` nextToken+      `Prelude.hashWithSalt` startingObjectName+      `Prelude.hashWithSalt` startingObjectPrefix+      `Prelude.hashWithSalt` storageJobId++instance Prelude.NFData ListObjects where+  rnf ListObjects' {..} =+    Prelude.rnf createdAfter+      `Prelude.seq` Prelude.rnf createdBefore+      `Prelude.seq` Prelude.rnf maxResults+      `Prelude.seq` Prelude.rnf nextToken+      `Prelude.seq` Prelude.rnf startingObjectName+      `Prelude.seq` Prelude.rnf startingObjectPrefix+      `Prelude.seq` Prelude.rnf storageJobId++instance Data.ToHeaders ListObjects where+  toHeaders =+    Prelude.const+      ( Prelude.mconcat+          [ "Content-Type"+              Data.=# ( "application/x-amz-json-1.1" ::+                          Prelude.ByteString+                      )+          ]+      )++instance Data.ToPath ListObjects where+  toPath ListObjects' {..} =+    Prelude.mconcat+      [ "/restore-jobs/",+        Data.toBS storageJobId,+        "/objects/list"+      ]++instance Data.ToQuery ListObjects where+  toQuery ListObjects' {..} =+    Prelude.mconcat+      [ "created-after" Data.=: createdAfter,+        "created-before" Data.=: createdBefore,+        "max-results" Data.=: maxResults,+        "next-token" Data.=: nextToken,+        "starting-object-name" Data.=: startingObjectName,+        "starting-object-prefix"+          Data.=: startingObjectPrefix+      ]++-- | /See:/ 'newListObjectsResponse' smart constructor.+data ListObjectsResponse = ListObjectsResponse'+  { -- | Pagination token+    nextToken :: Prelude.Maybe Prelude.Text,+    -- | The response's http status code.+    httpStatus :: Prelude.Int,+    -- | Object list+    objectList :: [BackupObject]+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListObjectsResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'nextToken', 'listObjectsResponse_nextToken' - Pagination token+--+-- 'httpStatus', 'listObjectsResponse_httpStatus' - The response's http status code.+--+-- 'objectList', 'listObjectsResponse_objectList' - Object list+newListObjectsResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  ListObjectsResponse+newListObjectsResponse pHttpStatus_ =+  ListObjectsResponse'+    { nextToken = Prelude.Nothing,+      httpStatus = pHttpStatus_,+      objectList = Prelude.mempty+    }++-- | Pagination token+listObjectsResponse_nextToken :: Lens.Lens' ListObjectsResponse (Prelude.Maybe Prelude.Text)+listObjectsResponse_nextToken = Lens.lens (\ListObjectsResponse' {nextToken} -> nextToken) (\s@ListObjectsResponse' {} a -> s {nextToken = a} :: ListObjectsResponse)++-- | The response's http status code.+listObjectsResponse_httpStatus :: Lens.Lens' ListObjectsResponse Prelude.Int+listObjectsResponse_httpStatus = Lens.lens (\ListObjectsResponse' {httpStatus} -> httpStatus) (\s@ListObjectsResponse' {} a -> s {httpStatus = a} :: ListObjectsResponse)++-- | Object list+listObjectsResponse_objectList :: Lens.Lens' ListObjectsResponse [BackupObject]+listObjectsResponse_objectList = Lens.lens (\ListObjectsResponse' {objectList} -> objectList) (\s@ListObjectsResponse' {} a -> s {objectList = a} :: ListObjectsResponse) Prelude.. Lens.coerced++instance Prelude.NFData ListObjectsResponse where+  rnf ListObjectsResponse' {..} =+    Prelude.rnf nextToken+      `Prelude.seq` Prelude.rnf httpStatus+      `Prelude.seq` Prelude.rnf objectList
+ gen/Amazonka/BackupStorage/NotifyObjectComplete.hs view
@@ -0,0 +1,289 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Amazonka.BackupStorage.NotifyObjectComplete+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Complete upload+module Amazonka.BackupStorage.NotifyObjectComplete+  ( -- * Creating a Request+    NotifyObjectComplete (..),+    newNotifyObjectComplete,++    -- * Request Lenses+    notifyObjectComplete_metadataBlobChecksum,+    notifyObjectComplete_metadataBlobChecksumAlgorithm,+    notifyObjectComplete_metadataBlobLength,+    notifyObjectComplete_metadataString,+    notifyObjectComplete_backupJobId,+    notifyObjectComplete_uploadId,+    notifyObjectComplete_objectChecksum,+    notifyObjectComplete_objectChecksumAlgorithm,+    notifyObjectComplete_metadataBlob,++    -- * Destructuring the Response+    NotifyObjectCompleteResponse (..),+    newNotifyObjectCompleteResponse,++    -- * Response Lenses+    notifyObjectCompleteResponse_httpStatus,+    notifyObjectCompleteResponse_objectChecksum,+    notifyObjectCompleteResponse_objectChecksumAlgorithm,+  )+where++import Amazonka.BackupStorage.Types+import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newNotifyObjectComplete' smart constructor.+data NotifyObjectComplete = NotifyObjectComplete'+  { -- | Checksum of MetadataBlob.+    metadataBlobChecksum :: Prelude.Maybe Prelude.Text,+    -- | Checksum algorithm.+    metadataBlobChecksumAlgorithm :: Prelude.Maybe DataChecksumAlgorithm,+    -- | The size of MetadataBlob.+    metadataBlobLength :: Prelude.Maybe Prelude.Integer,+    -- | Optional metadata associated with an Object. Maximum string length is+    -- 256 bytes.+    metadataString :: Prelude.Maybe Prelude.Text,+    -- | Backup job Id for the in-progress backup+    backupJobId :: Prelude.Text,+    -- | Upload Id for the in-progress upload+    uploadId :: Prelude.Text,+    -- | Object checksum+    objectChecksum :: Prelude.Text,+    -- | Checksum algorithm+    objectChecksumAlgorithm :: SummaryChecksumAlgorithm,+    -- | Optional metadata associated with an Object. Maximum length is 4MB.+    metadataBlob :: Data.HashedBody+  }+  deriving (Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'NotifyObjectComplete' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'metadataBlobChecksum', 'notifyObjectComplete_metadataBlobChecksum' - Checksum of MetadataBlob.+--+-- 'metadataBlobChecksumAlgorithm', 'notifyObjectComplete_metadataBlobChecksumAlgorithm' - Checksum algorithm.+--+-- 'metadataBlobLength', 'notifyObjectComplete_metadataBlobLength' - The size of MetadataBlob.+--+-- 'metadataString', 'notifyObjectComplete_metadataString' - Optional metadata associated with an Object. Maximum string length is+-- 256 bytes.+--+-- 'backupJobId', 'notifyObjectComplete_backupJobId' - Backup job Id for the in-progress backup+--+-- 'uploadId', 'notifyObjectComplete_uploadId' - Upload Id for the in-progress upload+--+-- 'objectChecksum', 'notifyObjectComplete_objectChecksum' - Object checksum+--+-- 'objectChecksumAlgorithm', 'notifyObjectComplete_objectChecksumAlgorithm' - Checksum algorithm+--+-- 'metadataBlob', 'notifyObjectComplete_metadataBlob' - Optional metadata associated with an Object. Maximum length is 4MB.+newNotifyObjectComplete ::+  -- | 'backupJobId'+  Prelude.Text ->+  -- | 'uploadId'+  Prelude.Text ->+  -- | 'objectChecksum'+  Prelude.Text ->+  -- | 'objectChecksumAlgorithm'+  SummaryChecksumAlgorithm ->+  -- | 'metadataBlob'+  Data.HashedBody ->+  NotifyObjectComplete+newNotifyObjectComplete+  pBackupJobId_+  pUploadId_+  pObjectChecksum_+  pObjectChecksumAlgorithm_+  pMetadataBlob_ =+    NotifyObjectComplete'+      { metadataBlobChecksum =+          Prelude.Nothing,+        metadataBlobChecksumAlgorithm = Prelude.Nothing,+        metadataBlobLength = Prelude.Nothing,+        metadataString = Prelude.Nothing,+        backupJobId = pBackupJobId_,+        uploadId = pUploadId_,+        objectChecksum = pObjectChecksum_,+        objectChecksumAlgorithm = pObjectChecksumAlgorithm_,+        metadataBlob = pMetadataBlob_+      }++-- | Checksum of MetadataBlob.+notifyObjectComplete_metadataBlobChecksum :: Lens.Lens' NotifyObjectComplete (Prelude.Maybe Prelude.Text)+notifyObjectComplete_metadataBlobChecksum = Lens.lens (\NotifyObjectComplete' {metadataBlobChecksum} -> metadataBlobChecksum) (\s@NotifyObjectComplete' {} a -> s {metadataBlobChecksum = a} :: NotifyObjectComplete)++-- | Checksum algorithm.+notifyObjectComplete_metadataBlobChecksumAlgorithm :: Lens.Lens' NotifyObjectComplete (Prelude.Maybe DataChecksumAlgorithm)+notifyObjectComplete_metadataBlobChecksumAlgorithm = Lens.lens (\NotifyObjectComplete' {metadataBlobChecksumAlgorithm} -> metadataBlobChecksumAlgorithm) (\s@NotifyObjectComplete' {} a -> s {metadataBlobChecksumAlgorithm = a} :: NotifyObjectComplete)++-- | The size of MetadataBlob.+notifyObjectComplete_metadataBlobLength :: Lens.Lens' NotifyObjectComplete (Prelude.Maybe Prelude.Integer)+notifyObjectComplete_metadataBlobLength = Lens.lens (\NotifyObjectComplete' {metadataBlobLength} -> metadataBlobLength) (\s@NotifyObjectComplete' {} a -> s {metadataBlobLength = a} :: NotifyObjectComplete)++-- | Optional metadata associated with an Object. Maximum string length is+-- 256 bytes.+notifyObjectComplete_metadataString :: Lens.Lens' NotifyObjectComplete (Prelude.Maybe Prelude.Text)+notifyObjectComplete_metadataString = Lens.lens (\NotifyObjectComplete' {metadataString} -> metadataString) (\s@NotifyObjectComplete' {} a -> s {metadataString = a} :: NotifyObjectComplete)++-- | Backup job Id for the in-progress backup+notifyObjectComplete_backupJobId :: Lens.Lens' NotifyObjectComplete Prelude.Text+notifyObjectComplete_backupJobId = Lens.lens (\NotifyObjectComplete' {backupJobId} -> backupJobId) (\s@NotifyObjectComplete' {} a -> s {backupJobId = a} :: NotifyObjectComplete)++-- | Upload Id for the in-progress upload+notifyObjectComplete_uploadId :: Lens.Lens' NotifyObjectComplete Prelude.Text+notifyObjectComplete_uploadId = Lens.lens (\NotifyObjectComplete' {uploadId} -> uploadId) (\s@NotifyObjectComplete' {} a -> s {uploadId = a} :: NotifyObjectComplete)++-- | Object checksum+notifyObjectComplete_objectChecksum :: Lens.Lens' NotifyObjectComplete Prelude.Text+notifyObjectComplete_objectChecksum = Lens.lens (\NotifyObjectComplete' {objectChecksum} -> objectChecksum) (\s@NotifyObjectComplete' {} a -> s {objectChecksum = a} :: NotifyObjectComplete)++-- | Checksum algorithm+notifyObjectComplete_objectChecksumAlgorithm :: Lens.Lens' NotifyObjectComplete SummaryChecksumAlgorithm+notifyObjectComplete_objectChecksumAlgorithm = Lens.lens (\NotifyObjectComplete' {objectChecksumAlgorithm} -> objectChecksumAlgorithm) (\s@NotifyObjectComplete' {} a -> s {objectChecksumAlgorithm = a} :: NotifyObjectComplete)++-- | Optional metadata associated with an Object. Maximum length is 4MB.+notifyObjectComplete_metadataBlob :: Lens.Lens' NotifyObjectComplete Data.HashedBody+notifyObjectComplete_metadataBlob = Lens.lens (\NotifyObjectComplete' {metadataBlob} -> metadataBlob) (\s@NotifyObjectComplete' {} a -> s {metadataBlob = a} :: NotifyObjectComplete)++instance Core.AWSRequest NotifyObjectComplete where+  type+    AWSResponse NotifyObjectComplete =+      NotifyObjectCompleteResponse+  request overrides =+    Request.putBody (overrides defaultService)+  response =+    Response.receiveJSON+      ( \s h x ->+          NotifyObjectCompleteResponse'+            Prelude.<$> (Prelude.pure (Prelude.fromEnum s))+            Prelude.<*> (x Data..:> "ObjectChecksum")+            Prelude.<*> (x Data..:> "ObjectChecksumAlgorithm")+      )++instance Data.ToBody NotifyObjectComplete where+  toBody NotifyObjectComplete' {..} =+    Data.toBody metadataBlob++instance Data.ToHeaders NotifyObjectComplete where+  toHeaders =+    Prelude.const+      ( Prelude.mconcat+          [ "Content-Type"+              Data.=# ( "application/x-amz-json-1.1" ::+                          Prelude.ByteString+                      )+          ]+      )++instance Data.ToPath NotifyObjectComplete where+  toPath NotifyObjectComplete' {..} =+    Prelude.mconcat+      [ "/backup-jobs/",+        Data.toBS backupJobId,+        "/object/",+        Data.toBS uploadId,+        "/complete"+      ]++instance Data.ToQuery NotifyObjectComplete where+  toQuery NotifyObjectComplete' {..} =+    Prelude.mconcat+      [ "metadata-checksum" Data.=: metadataBlobChecksum,+        "metadata-checksum-algorithm"+          Data.=: metadataBlobChecksumAlgorithm,+        "metadata-blob-length" Data.=: metadataBlobLength,+        "metadata-string" Data.=: metadataString,+        "checksum" Data.=: objectChecksum,+        "checksum-algorithm" Data.=: objectChecksumAlgorithm+      ]++-- | /See:/ 'newNotifyObjectCompleteResponse' smart constructor.+data NotifyObjectCompleteResponse = NotifyObjectCompleteResponse'+  { -- | The response's http status code.+    httpStatus :: Prelude.Int,+    -- | Object checksum+    objectChecksum :: Prelude.Text,+    -- | Checksum algorithm+    objectChecksumAlgorithm :: SummaryChecksumAlgorithm+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'NotifyObjectCompleteResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'httpStatus', 'notifyObjectCompleteResponse_httpStatus' - The response's http status code.+--+-- 'objectChecksum', 'notifyObjectCompleteResponse_objectChecksum' - Object checksum+--+-- 'objectChecksumAlgorithm', 'notifyObjectCompleteResponse_objectChecksumAlgorithm' - Checksum algorithm+newNotifyObjectCompleteResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  -- | 'objectChecksum'+  Prelude.Text ->+  -- | 'objectChecksumAlgorithm'+  SummaryChecksumAlgorithm ->+  NotifyObjectCompleteResponse+newNotifyObjectCompleteResponse+  pHttpStatus_+  pObjectChecksum_+  pObjectChecksumAlgorithm_ =+    NotifyObjectCompleteResponse'+      { httpStatus =+          pHttpStatus_,+        objectChecksum = pObjectChecksum_,+        objectChecksumAlgorithm =+          pObjectChecksumAlgorithm_+      }++-- | The response's http status code.+notifyObjectCompleteResponse_httpStatus :: Lens.Lens' NotifyObjectCompleteResponse Prelude.Int+notifyObjectCompleteResponse_httpStatus = Lens.lens (\NotifyObjectCompleteResponse' {httpStatus} -> httpStatus) (\s@NotifyObjectCompleteResponse' {} a -> s {httpStatus = a} :: NotifyObjectCompleteResponse)++-- | Object checksum+notifyObjectCompleteResponse_objectChecksum :: Lens.Lens' NotifyObjectCompleteResponse Prelude.Text+notifyObjectCompleteResponse_objectChecksum = Lens.lens (\NotifyObjectCompleteResponse' {objectChecksum} -> objectChecksum) (\s@NotifyObjectCompleteResponse' {} a -> s {objectChecksum = a} :: NotifyObjectCompleteResponse)++-- | Checksum algorithm+notifyObjectCompleteResponse_objectChecksumAlgorithm :: Lens.Lens' NotifyObjectCompleteResponse SummaryChecksumAlgorithm+notifyObjectCompleteResponse_objectChecksumAlgorithm = Lens.lens (\NotifyObjectCompleteResponse' {objectChecksumAlgorithm} -> objectChecksumAlgorithm) (\s@NotifyObjectCompleteResponse' {} a -> s {objectChecksumAlgorithm = a} :: NotifyObjectCompleteResponse)++instance Prelude.NFData NotifyObjectCompleteResponse where+  rnf NotifyObjectCompleteResponse' {..} =+    Prelude.rnf httpStatus+      `Prelude.seq` Prelude.rnf objectChecksum+      `Prelude.seq` Prelude.rnf objectChecksumAlgorithm
+ gen/Amazonka/BackupStorage/PutChunk.hs view
@@ -0,0 +1,263 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Amazonka.BackupStorage.PutChunk+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Upload chunk.+module Amazonka.BackupStorage.PutChunk+  ( -- * Creating a Request+    PutChunk (..),+    newPutChunk,++    -- * Request Lenses+    putChunk_backupJobId,+    putChunk_uploadId,+    putChunk_chunkIndex,+    putChunk_length,+    putChunk_checksum,+    putChunk_checksumAlgorithm,+    putChunk_data,++    -- * Destructuring the Response+    PutChunkResponse (..),+    newPutChunkResponse,++    -- * Response Lenses+    putChunkResponse_httpStatus,+    putChunkResponse_chunkChecksum,+    putChunkResponse_chunkChecksumAlgorithm,+  )+where++import Amazonka.BackupStorage.Types+import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newPutChunk' smart constructor.+data PutChunk = PutChunk'+  { -- | Backup job Id for the in-progress backup.+    backupJobId :: Prelude.Text,+    -- | Upload Id for the in-progress upload.+    uploadId :: Prelude.Text,+    -- | Describes this chunk\'s position relative to the other chunks+    chunkIndex :: Prelude.Integer,+    -- | Data length+    length :: Prelude.Integer,+    -- | Data checksum+    checksum :: Prelude.Text,+    -- | Checksum algorithm+    checksumAlgorithm :: DataChecksumAlgorithm,+    -- | Data to be uploaded+    data' :: Data.HashedBody+  }+  deriving (Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'PutChunk' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'backupJobId', 'putChunk_backupJobId' - Backup job Id for the in-progress backup.+--+-- 'uploadId', 'putChunk_uploadId' - Upload Id for the in-progress upload.+--+-- 'chunkIndex', 'putChunk_chunkIndex' - Describes this chunk\'s position relative to the other chunks+--+-- 'length', 'putChunk_length' - Data length+--+-- 'checksum', 'putChunk_checksum' - Data checksum+--+-- 'checksumAlgorithm', 'putChunk_checksumAlgorithm' - Checksum algorithm+--+-- 'data'', 'putChunk_data' - Data to be uploaded+newPutChunk ::+  -- | 'backupJobId'+  Prelude.Text ->+  -- | 'uploadId'+  Prelude.Text ->+  -- | 'chunkIndex'+  Prelude.Integer ->+  -- | 'length'+  Prelude.Integer ->+  -- | 'checksum'+  Prelude.Text ->+  -- | 'checksumAlgorithm'+  DataChecksumAlgorithm ->+  -- | 'data''+  Data.HashedBody ->+  PutChunk+newPutChunk+  pBackupJobId_+  pUploadId_+  pChunkIndex_+  pLength_+  pChecksum_+  pChecksumAlgorithm_+  pData_ =+    PutChunk'+      { backupJobId = pBackupJobId_,+        uploadId = pUploadId_,+        chunkIndex = pChunkIndex_,+        length = pLength_,+        checksum = pChecksum_,+        checksumAlgorithm = pChecksumAlgorithm_,+        data' = pData_+      }++-- | Backup job Id for the in-progress backup.+putChunk_backupJobId :: Lens.Lens' PutChunk Prelude.Text+putChunk_backupJobId = Lens.lens (\PutChunk' {backupJobId} -> backupJobId) (\s@PutChunk' {} a -> s {backupJobId = a} :: PutChunk)++-- | Upload Id for the in-progress upload.+putChunk_uploadId :: Lens.Lens' PutChunk Prelude.Text+putChunk_uploadId = Lens.lens (\PutChunk' {uploadId} -> uploadId) (\s@PutChunk' {} a -> s {uploadId = a} :: PutChunk)++-- | Describes this chunk\'s position relative to the other chunks+putChunk_chunkIndex :: Lens.Lens' PutChunk Prelude.Integer+putChunk_chunkIndex = Lens.lens (\PutChunk' {chunkIndex} -> chunkIndex) (\s@PutChunk' {} a -> s {chunkIndex = a} :: PutChunk)++-- | Data length+putChunk_length :: Lens.Lens' PutChunk Prelude.Integer+putChunk_length = Lens.lens (\PutChunk' {length} -> length) (\s@PutChunk' {} a -> s {length = a} :: PutChunk)++-- | Data checksum+putChunk_checksum :: Lens.Lens' PutChunk Prelude.Text+putChunk_checksum = Lens.lens (\PutChunk' {checksum} -> checksum) (\s@PutChunk' {} a -> s {checksum = a} :: PutChunk)++-- | Checksum algorithm+putChunk_checksumAlgorithm :: Lens.Lens' PutChunk DataChecksumAlgorithm+putChunk_checksumAlgorithm = Lens.lens (\PutChunk' {checksumAlgorithm} -> checksumAlgorithm) (\s@PutChunk' {} a -> s {checksumAlgorithm = a} :: PutChunk)++-- | Data to be uploaded+putChunk_data :: Lens.Lens' PutChunk Data.HashedBody+putChunk_data = Lens.lens (\PutChunk' {data'} -> data') (\s@PutChunk' {} a -> s {data' = a} :: PutChunk)++instance Core.AWSRequest PutChunk where+  type AWSResponse PutChunk = PutChunkResponse+  request overrides =+    Request.putBody (overrides defaultService)+  response =+    Response.receiveJSON+      ( \s h x ->+          PutChunkResponse'+            Prelude.<$> (Prelude.pure (Prelude.fromEnum s))+            Prelude.<*> (x Data..:> "ChunkChecksum")+            Prelude.<*> (x Data..:> "ChunkChecksumAlgorithm")+      )++instance Data.ToBody PutChunk where+  toBody PutChunk' {..} = Data.toBody data'++instance Data.ToHeaders PutChunk where+  toHeaders =+    Prelude.const+      ( Prelude.mconcat+          [ "Content-Type"+              Data.=# ( "application/x-amz-json-1.1" ::+                          Prelude.ByteString+                      )+          ]+      )++instance Data.ToPath PutChunk where+  toPath PutChunk' {..} =+    Prelude.mconcat+      [ "/backup-jobs/",+        Data.toBS backupJobId,+        "/chunk/",+        Data.toBS uploadId,+        "/",+        Data.toBS chunkIndex+      ]++instance Data.ToQuery PutChunk where+  toQuery PutChunk' {..} =+    Prelude.mconcat+      [ "length" Data.=: length,+        "checksum" Data.=: checksum,+        "checksum-algorithm" Data.=: checksumAlgorithm+      ]++-- | /See:/ 'newPutChunkResponse' smart constructor.+data PutChunkResponse = PutChunkResponse'+  { -- | The response's http status code.+    httpStatus :: Prelude.Int,+    -- | Chunk checksum+    chunkChecksum :: Prelude.Text,+    -- | Checksum algorithm+    chunkChecksumAlgorithm :: DataChecksumAlgorithm+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'PutChunkResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'httpStatus', 'putChunkResponse_httpStatus' - The response's http status code.+--+-- 'chunkChecksum', 'putChunkResponse_chunkChecksum' - Chunk checksum+--+-- 'chunkChecksumAlgorithm', 'putChunkResponse_chunkChecksumAlgorithm' - Checksum algorithm+newPutChunkResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  -- | 'chunkChecksum'+  Prelude.Text ->+  -- | 'chunkChecksumAlgorithm'+  DataChecksumAlgorithm ->+  PutChunkResponse+newPutChunkResponse+  pHttpStatus_+  pChunkChecksum_+  pChunkChecksumAlgorithm_ =+    PutChunkResponse'+      { httpStatus = pHttpStatus_,+        chunkChecksum = pChunkChecksum_,+        chunkChecksumAlgorithm = pChunkChecksumAlgorithm_+      }++-- | The response's http status code.+putChunkResponse_httpStatus :: Lens.Lens' PutChunkResponse Prelude.Int+putChunkResponse_httpStatus = Lens.lens (\PutChunkResponse' {httpStatus} -> httpStatus) (\s@PutChunkResponse' {} a -> s {httpStatus = a} :: PutChunkResponse)++-- | Chunk checksum+putChunkResponse_chunkChecksum :: Lens.Lens' PutChunkResponse Prelude.Text+putChunkResponse_chunkChecksum = Lens.lens (\PutChunkResponse' {chunkChecksum} -> chunkChecksum) (\s@PutChunkResponse' {} a -> s {chunkChecksum = a} :: PutChunkResponse)++-- | Checksum algorithm+putChunkResponse_chunkChecksumAlgorithm :: Lens.Lens' PutChunkResponse DataChecksumAlgorithm+putChunkResponse_chunkChecksumAlgorithm = Lens.lens (\PutChunkResponse' {chunkChecksumAlgorithm} -> chunkChecksumAlgorithm) (\s@PutChunkResponse' {} a -> s {chunkChecksumAlgorithm = a} :: PutChunkResponse)++instance Prelude.NFData PutChunkResponse where+  rnf PutChunkResponse' {..} =+    Prelude.rnf httpStatus+      `Prelude.seq` Prelude.rnf chunkChecksum+      `Prelude.seq` Prelude.rnf chunkChecksumAlgorithm
+ gen/Amazonka/BackupStorage/PutObject.hs view
@@ -0,0 +1,318 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Amazonka.BackupStorage.PutObject+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Upload object that can store object metadata String and data blob in+-- single API call using inline chunk field.+module Amazonka.BackupStorage.PutObject+  ( -- * Creating a Request+    PutObject (..),+    newPutObject,++    -- * Request Lenses+    putObject_inlineChunkChecksum,+    putObject_inlineChunkChecksumAlgorithm,+    putObject_inlineChunkLength,+    putObject_metadataString,+    putObject_objectChecksum,+    putObject_objectChecksumAlgorithm,+    putObject_throwOnDuplicate,+    putObject_backupJobId,+    putObject_objectName,+    putObject_inlineChunk,++    -- * Destructuring the Response+    PutObjectResponse (..),+    newPutObjectResponse,++    -- * Response Lenses+    putObjectResponse_httpStatus,+    putObjectResponse_inlineChunkChecksum,+    putObjectResponse_inlineChunkChecksumAlgorithm,+    putObjectResponse_objectChecksum,+    putObjectResponse_objectChecksumAlgorithm,+  )+where++import Amazonka.BackupStorage.Types+import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newPutObject' smart constructor.+data PutObject = PutObject'+  { -- | Inline chunk checksum+    inlineChunkChecksum :: Prelude.Maybe Prelude.Text,+    -- | Inline chunk checksum algorithm+    inlineChunkChecksumAlgorithm :: Prelude.Maybe Prelude.Text,+    -- | Length of the inline chunk data.+    inlineChunkLength :: Prelude.Maybe Prelude.Integer,+    -- | Store user defined metadata like backup checksum, disk ids, restore+    -- metadata etc.+    metadataString :: Prelude.Maybe Prelude.Text,+    -- | object checksum+    objectChecksum :: Prelude.Maybe Prelude.Text,+    -- | object checksum algorithm+    objectChecksumAlgorithm :: Prelude.Maybe SummaryChecksumAlgorithm,+    -- | Throw an exception if Object name is already exist.+    throwOnDuplicate :: Prelude.Maybe Prelude.Bool,+    -- | Backup job Id for the in-progress backup.+    backupJobId :: Prelude.Text,+    -- | The name of the Object to be uploaded.+    objectName :: Prelude.Text,+    -- | Inline chunk data to be uploaded.+    inlineChunk :: Data.HashedBody+  }+  deriving (Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'PutObject' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'inlineChunkChecksum', 'putObject_inlineChunkChecksum' - Inline chunk checksum+--+-- 'inlineChunkChecksumAlgorithm', 'putObject_inlineChunkChecksumAlgorithm' - Inline chunk checksum algorithm+--+-- 'inlineChunkLength', 'putObject_inlineChunkLength' - Length of the inline chunk data.+--+-- 'metadataString', 'putObject_metadataString' - Store user defined metadata like backup checksum, disk ids, restore+-- metadata etc.+--+-- 'objectChecksum', 'putObject_objectChecksum' - object checksum+--+-- 'objectChecksumAlgorithm', 'putObject_objectChecksumAlgorithm' - object checksum algorithm+--+-- 'throwOnDuplicate', 'putObject_throwOnDuplicate' - Throw an exception if Object name is already exist.+--+-- 'backupJobId', 'putObject_backupJobId' - Backup job Id for the in-progress backup.+--+-- 'objectName', 'putObject_objectName' - The name of the Object to be uploaded.+--+-- 'inlineChunk', 'putObject_inlineChunk' - Inline chunk data to be uploaded.+newPutObject ::+  -- | 'backupJobId'+  Prelude.Text ->+  -- | 'objectName'+  Prelude.Text ->+  -- | 'inlineChunk'+  Data.HashedBody ->+  PutObject+newPutObject pBackupJobId_ pObjectName_ pInlineChunk_ =+  PutObject'+    { inlineChunkChecksum = Prelude.Nothing,+      inlineChunkChecksumAlgorithm = Prelude.Nothing,+      inlineChunkLength = Prelude.Nothing,+      metadataString = Prelude.Nothing,+      objectChecksum = Prelude.Nothing,+      objectChecksumAlgorithm = Prelude.Nothing,+      throwOnDuplicate = Prelude.Nothing,+      backupJobId = pBackupJobId_,+      objectName = pObjectName_,+      inlineChunk = pInlineChunk_+    }++-- | Inline chunk checksum+putObject_inlineChunkChecksum :: Lens.Lens' PutObject (Prelude.Maybe Prelude.Text)+putObject_inlineChunkChecksum = Lens.lens (\PutObject' {inlineChunkChecksum} -> inlineChunkChecksum) (\s@PutObject' {} a -> s {inlineChunkChecksum = a} :: PutObject)++-- | Inline chunk checksum algorithm+putObject_inlineChunkChecksumAlgorithm :: Lens.Lens' PutObject (Prelude.Maybe Prelude.Text)+putObject_inlineChunkChecksumAlgorithm = Lens.lens (\PutObject' {inlineChunkChecksumAlgorithm} -> inlineChunkChecksumAlgorithm) (\s@PutObject' {} a -> s {inlineChunkChecksumAlgorithm = a} :: PutObject)++-- | Length of the inline chunk data.+putObject_inlineChunkLength :: Lens.Lens' PutObject (Prelude.Maybe Prelude.Integer)+putObject_inlineChunkLength = Lens.lens (\PutObject' {inlineChunkLength} -> inlineChunkLength) (\s@PutObject' {} a -> s {inlineChunkLength = a} :: PutObject)++-- | Store user defined metadata like backup checksum, disk ids, restore+-- metadata etc.+putObject_metadataString :: Lens.Lens' PutObject (Prelude.Maybe Prelude.Text)+putObject_metadataString = Lens.lens (\PutObject' {metadataString} -> metadataString) (\s@PutObject' {} a -> s {metadataString = a} :: PutObject)++-- | object checksum+putObject_objectChecksum :: Lens.Lens' PutObject (Prelude.Maybe Prelude.Text)+putObject_objectChecksum = Lens.lens (\PutObject' {objectChecksum} -> objectChecksum) (\s@PutObject' {} a -> s {objectChecksum = a} :: PutObject)++-- | object checksum algorithm+putObject_objectChecksumAlgorithm :: Lens.Lens' PutObject (Prelude.Maybe SummaryChecksumAlgorithm)+putObject_objectChecksumAlgorithm = Lens.lens (\PutObject' {objectChecksumAlgorithm} -> objectChecksumAlgorithm) (\s@PutObject' {} a -> s {objectChecksumAlgorithm = a} :: PutObject)++-- | Throw an exception if Object name is already exist.+putObject_throwOnDuplicate :: Lens.Lens' PutObject (Prelude.Maybe Prelude.Bool)+putObject_throwOnDuplicate = Lens.lens (\PutObject' {throwOnDuplicate} -> throwOnDuplicate) (\s@PutObject' {} a -> s {throwOnDuplicate = a} :: PutObject)++-- | Backup job Id for the in-progress backup.+putObject_backupJobId :: Lens.Lens' PutObject Prelude.Text+putObject_backupJobId = Lens.lens (\PutObject' {backupJobId} -> backupJobId) (\s@PutObject' {} a -> s {backupJobId = a} :: PutObject)++-- | The name of the Object to be uploaded.+putObject_objectName :: Lens.Lens' PutObject Prelude.Text+putObject_objectName = Lens.lens (\PutObject' {objectName} -> objectName) (\s@PutObject' {} a -> s {objectName = a} :: PutObject)++-- | Inline chunk data to be uploaded.+putObject_inlineChunk :: Lens.Lens' PutObject Data.HashedBody+putObject_inlineChunk = Lens.lens (\PutObject' {inlineChunk} -> inlineChunk) (\s@PutObject' {} a -> s {inlineChunk = a} :: PutObject)++instance Core.AWSRequest PutObject where+  type AWSResponse PutObject = PutObjectResponse+  request overrides =+    Request.putBody (overrides defaultService)+  response =+    Response.receiveJSON+      ( \s h x ->+          PutObjectResponse'+            Prelude.<$> (Prelude.pure (Prelude.fromEnum s))+            Prelude.<*> (x Data..:> "InlineChunkChecksum")+            Prelude.<*> (x Data..:> "InlineChunkChecksumAlgorithm")+            Prelude.<*> (x Data..:> "ObjectChecksum")+            Prelude.<*> (x Data..:> "ObjectChecksumAlgorithm")+      )++instance Data.ToBody PutObject where+  toBody PutObject' {..} = Data.toBody inlineChunk++instance Data.ToHeaders PutObject where+  toHeaders =+    Prelude.const+      ( Prelude.mconcat+          [ "Content-Type"+              Data.=# ( "application/x-amz-json-1.1" ::+                          Prelude.ByteString+                      )+          ]+      )++instance Data.ToPath PutObject where+  toPath PutObject' {..} =+    Prelude.mconcat+      [ "/backup-jobs/",+        Data.toBS backupJobId,+        "/object/",+        Data.toBS objectName,+        "/put-object"+      ]++instance Data.ToQuery PutObject where+  toQuery PutObject' {..} =+    Prelude.mconcat+      [ "checksum" Data.=: inlineChunkChecksum,+        "checksum-algorithm"+          Data.=: inlineChunkChecksumAlgorithm,+        "length" Data.=: inlineChunkLength,+        "metadata-string" Data.=: metadataString,+        "object-checksum" Data.=: objectChecksum,+        "object-checksum-algorithm"+          Data.=: objectChecksumAlgorithm,+        "throwOnDuplicate" Data.=: throwOnDuplicate+      ]++-- | /See:/ 'newPutObjectResponse' smart constructor.+data PutObjectResponse = PutObjectResponse'+  { -- | The response's http status code.+    httpStatus :: Prelude.Int,+    -- | Inline chunk checksum+    inlineChunkChecksum :: Prelude.Text,+    -- | Inline chunk checksum algorithm+    inlineChunkChecksumAlgorithm :: DataChecksumAlgorithm,+    -- | object checksum+    objectChecksum :: Prelude.Text,+    -- | object checksum algorithm+    objectChecksumAlgorithm :: SummaryChecksumAlgorithm+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'PutObjectResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'httpStatus', 'putObjectResponse_httpStatus' - The response's http status code.+--+-- 'inlineChunkChecksum', 'putObjectResponse_inlineChunkChecksum' - Inline chunk checksum+--+-- 'inlineChunkChecksumAlgorithm', 'putObjectResponse_inlineChunkChecksumAlgorithm' - Inline chunk checksum algorithm+--+-- 'objectChecksum', 'putObjectResponse_objectChecksum' - object checksum+--+-- 'objectChecksumAlgorithm', 'putObjectResponse_objectChecksumAlgorithm' - object checksum algorithm+newPutObjectResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  -- | 'inlineChunkChecksum'+  Prelude.Text ->+  -- | 'inlineChunkChecksumAlgorithm'+  DataChecksumAlgorithm ->+  -- | 'objectChecksum'+  Prelude.Text ->+  -- | 'objectChecksumAlgorithm'+  SummaryChecksumAlgorithm ->+  PutObjectResponse+newPutObjectResponse+  pHttpStatus_+  pInlineChunkChecksum_+  pInlineChunkChecksumAlgorithm_+  pObjectChecksum_+  pObjectChecksumAlgorithm_ =+    PutObjectResponse'+      { httpStatus = pHttpStatus_,+        inlineChunkChecksum = pInlineChunkChecksum_,+        inlineChunkChecksumAlgorithm =+          pInlineChunkChecksumAlgorithm_,+        objectChecksum = pObjectChecksum_,+        objectChecksumAlgorithm = pObjectChecksumAlgorithm_+      }++-- | The response's http status code.+putObjectResponse_httpStatus :: Lens.Lens' PutObjectResponse Prelude.Int+putObjectResponse_httpStatus = Lens.lens (\PutObjectResponse' {httpStatus} -> httpStatus) (\s@PutObjectResponse' {} a -> s {httpStatus = a} :: PutObjectResponse)++-- | Inline chunk checksum+putObjectResponse_inlineChunkChecksum :: Lens.Lens' PutObjectResponse Prelude.Text+putObjectResponse_inlineChunkChecksum = Lens.lens (\PutObjectResponse' {inlineChunkChecksum} -> inlineChunkChecksum) (\s@PutObjectResponse' {} a -> s {inlineChunkChecksum = a} :: PutObjectResponse)++-- | Inline chunk checksum algorithm+putObjectResponse_inlineChunkChecksumAlgorithm :: Lens.Lens' PutObjectResponse DataChecksumAlgorithm+putObjectResponse_inlineChunkChecksumAlgorithm = Lens.lens (\PutObjectResponse' {inlineChunkChecksumAlgorithm} -> inlineChunkChecksumAlgorithm) (\s@PutObjectResponse' {} a -> s {inlineChunkChecksumAlgorithm = a} :: PutObjectResponse)++-- | object checksum+putObjectResponse_objectChecksum :: Lens.Lens' PutObjectResponse Prelude.Text+putObjectResponse_objectChecksum = Lens.lens (\PutObjectResponse' {objectChecksum} -> objectChecksum) (\s@PutObjectResponse' {} a -> s {objectChecksum = a} :: PutObjectResponse)++-- | object checksum algorithm+putObjectResponse_objectChecksumAlgorithm :: Lens.Lens' PutObjectResponse SummaryChecksumAlgorithm+putObjectResponse_objectChecksumAlgorithm = Lens.lens (\PutObjectResponse' {objectChecksumAlgorithm} -> objectChecksumAlgorithm) (\s@PutObjectResponse' {} a -> s {objectChecksumAlgorithm = a} :: PutObjectResponse)++instance Prelude.NFData PutObjectResponse where+  rnf PutObjectResponse' {..} =+    Prelude.rnf httpStatus+      `Prelude.seq` Prelude.rnf inlineChunkChecksum+      `Prelude.seq` Prelude.rnf inlineChunkChecksumAlgorithm+      `Prelude.seq` Prelude.rnf objectChecksum+      `Prelude.seq` Prelude.rnf objectChecksumAlgorithm
+ gen/Amazonka/BackupStorage/StartObject.hs view
@@ -0,0 +1,201 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Amazonka.BackupStorage.StartObject+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Start upload containing one or many chunks.+module Amazonka.BackupStorage.StartObject+  ( -- * Creating a Request+    StartObject (..),+    newStartObject,++    -- * Request Lenses+    startObject_throwOnDuplicate,+    startObject_backupJobId,+    startObject_objectName,++    -- * Destructuring the Response+    StartObjectResponse (..),+    newStartObjectResponse,++    -- * Response Lenses+    startObjectResponse_httpStatus,+    startObjectResponse_uploadId,+  )+where++import Amazonka.BackupStorage.Types+import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newStartObject' smart constructor.+data StartObject = StartObject'+  { -- | Throw an exception if Object name is already exist.+    throwOnDuplicate :: Prelude.Maybe Prelude.Bool,+    -- | Backup job Id for the in-progress backup+    backupJobId :: Prelude.Text,+    -- | Name for the object.+    objectName :: Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'StartObject' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'throwOnDuplicate', 'startObject_throwOnDuplicate' - Throw an exception if Object name is already exist.+--+-- 'backupJobId', 'startObject_backupJobId' - Backup job Id for the in-progress backup+--+-- 'objectName', 'startObject_objectName' - Name for the object.+newStartObject ::+  -- | 'backupJobId'+  Prelude.Text ->+  -- | 'objectName'+  Prelude.Text ->+  StartObject+newStartObject pBackupJobId_ pObjectName_ =+  StartObject'+    { throwOnDuplicate = Prelude.Nothing,+      backupJobId = pBackupJobId_,+      objectName = pObjectName_+    }++-- | Throw an exception if Object name is already exist.+startObject_throwOnDuplicate :: Lens.Lens' StartObject (Prelude.Maybe Prelude.Bool)+startObject_throwOnDuplicate = Lens.lens (\StartObject' {throwOnDuplicate} -> throwOnDuplicate) (\s@StartObject' {} a -> s {throwOnDuplicate = a} :: StartObject)++-- | Backup job Id for the in-progress backup+startObject_backupJobId :: Lens.Lens' StartObject Prelude.Text+startObject_backupJobId = Lens.lens (\StartObject' {backupJobId} -> backupJobId) (\s@StartObject' {} a -> s {backupJobId = a} :: StartObject)++-- | Name for the object.+startObject_objectName :: Lens.Lens' StartObject Prelude.Text+startObject_objectName = Lens.lens (\StartObject' {objectName} -> objectName) (\s@StartObject' {} a -> s {objectName = a} :: StartObject)++instance Core.AWSRequest StartObject where+  type AWSResponse StartObject = StartObjectResponse+  request overrides =+    Request.putJSON (overrides defaultService)+  response =+    Response.receiveJSON+      ( \s h x ->+          StartObjectResponse'+            Prelude.<$> (Prelude.pure (Prelude.fromEnum s))+            Prelude.<*> (x Data..:> "UploadId")+      )++instance Prelude.Hashable StartObject where+  hashWithSalt _salt StartObject' {..} =+    _salt+      `Prelude.hashWithSalt` throwOnDuplicate+      `Prelude.hashWithSalt` backupJobId+      `Prelude.hashWithSalt` objectName++instance Prelude.NFData StartObject where+  rnf StartObject' {..} =+    Prelude.rnf throwOnDuplicate+      `Prelude.seq` Prelude.rnf backupJobId+      `Prelude.seq` Prelude.rnf objectName++instance Data.ToHeaders StartObject where+  toHeaders =+    Prelude.const+      ( Prelude.mconcat+          [ "Content-Type"+              Data.=# ( "application/x-amz-json-1.1" ::+                          Prelude.ByteString+                      )+          ]+      )++instance Data.ToJSON StartObject where+  toJSON StartObject' {..} =+    Data.object+      ( Prelude.catMaybes+          [ ("ThrowOnDuplicate" Data..=)+              Prelude.<$> throwOnDuplicate+          ]+      )++instance Data.ToPath StartObject where+  toPath StartObject' {..} =+    Prelude.mconcat+      [ "/backup-jobs/",+        Data.toBS backupJobId,+        "/object/",+        Data.toBS objectName+      ]++instance Data.ToQuery StartObject where+  toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newStartObjectResponse' smart constructor.+data StartObjectResponse = StartObjectResponse'+  { -- | The response's http status code.+    httpStatus :: Prelude.Int,+    -- | Upload Id for a given upload.+    uploadId :: Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'StartObjectResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'httpStatus', 'startObjectResponse_httpStatus' - The response's http status code.+--+-- 'uploadId', 'startObjectResponse_uploadId' - Upload Id for a given upload.+newStartObjectResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  -- | 'uploadId'+  Prelude.Text ->+  StartObjectResponse+newStartObjectResponse pHttpStatus_ pUploadId_ =+  StartObjectResponse'+    { httpStatus = pHttpStatus_,+      uploadId = pUploadId_+    }++-- | The response's http status code.+startObjectResponse_httpStatus :: Lens.Lens' StartObjectResponse Prelude.Int+startObjectResponse_httpStatus = Lens.lens (\StartObjectResponse' {httpStatus} -> httpStatus) (\s@StartObjectResponse' {} a -> s {httpStatus = a} :: StartObjectResponse)++-- | Upload Id for a given upload.+startObjectResponse_uploadId :: Lens.Lens' StartObjectResponse Prelude.Text+startObjectResponse_uploadId = Lens.lens (\StartObjectResponse' {uploadId} -> uploadId) (\s@StartObjectResponse' {} a -> s {uploadId = a} :: StartObjectResponse)++instance Prelude.NFData StartObjectResponse where+  rnf StartObjectResponse' {..} =+    Prelude.rnf httpStatus+      `Prelude.seq` Prelude.rnf uploadId
+ gen/Amazonka/BackupStorage/Types.hs view
@@ -0,0 +1,223 @@+{-# LANGUAGE DisambiguateRecordFields #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Amazonka.BackupStorage.Types+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+module Amazonka.BackupStorage.Types+  ( -- * Service Configuration+    defaultService,++    -- * Errors+    _AccessDeniedException,+    _DataAlreadyExistsException,+    _IllegalArgumentException,+    _KMSInvalidKeyUsageException,+    _NotReadableInputStreamException,+    _ResourceNotFoundException,+    _RetryableException,+    _ServiceInternalException,+    _ServiceUnavailableException,+    _ThrottlingException,++    -- * DataChecksumAlgorithm+    DataChecksumAlgorithm (..),++    -- * SummaryChecksumAlgorithm+    SummaryChecksumAlgorithm (..),++    -- * BackupObject+    BackupObject (..),+    newBackupObject,+    backupObject_chunksCount,+    backupObject_metadataString,+    backupObject_name,+    backupObject_objectChecksum,+    backupObject_objectChecksumAlgorithm,+    backupObject_objectToken,++    -- * Chunk+    Chunk (..),+    newChunk,+    chunk_index,+    chunk_length,+    chunk_checksum,+    chunk_checksumAlgorithm,+    chunk_chunkToken,+  )+where++import Amazonka.BackupStorage.Types.BackupObject+import Amazonka.BackupStorage.Types.Chunk+import Amazonka.BackupStorage.Types.DataChecksumAlgorithm+import Amazonka.BackupStorage.Types.SummaryChecksumAlgorithm+import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Sign.V4 as Sign++-- | API version @2018-04-10@ of the Amazon Backup Storage SDK configuration.+defaultService :: Core.Service+defaultService =+  Core.Service+    { Core.abbrev = "BackupStorage",+      Core.signer = Sign.v4,+      Core.endpointPrefix = "backupstorage",+      Core.signingName = "backup-storage",+      Core.version = "2018-04-10",+      Core.s3AddressingStyle = Core.S3AddressingStyleAuto,+      Core.endpoint = Core.defaultEndpoint defaultService,+      Core.timeout = Prelude.Just 70,+      Core.check = Core.statusSuccess,+      Core.error = Core.parseJSONError "BackupStorage",+      Core.retry = retry+    }+  where+    retry =+      Core.Exponential+        { Core.base = 5.0e-2,+          Core.growth = 2,+          Core.attempts = 5,+          Core.check = check+        }+    check e+      | Lens.has (Core.hasStatus 502) e =+          Prelude.Just "bad_gateway"+      | Lens.has (Core.hasStatus 504) e =+          Prelude.Just "gateway_timeout"+      | Lens.has (Core.hasStatus 500) e =+          Prelude.Just "general_server_error"+      | Lens.has (Core.hasStatus 509) e =+          Prelude.Just "limit_exceeded"+      | Lens.has+          ( Core.hasCode "RequestThrottledException"+              Prelude.. Core.hasStatus 400+          )+          e =+          Prelude.Just "request_throttled_exception"+      | Lens.has (Core.hasStatus 503) e =+          Prelude.Just "service_unavailable"+      | Lens.has+          ( Core.hasCode "ThrottledException"+              Prelude.. Core.hasStatus 400+          )+          e =+          Prelude.Just "throttled_exception"+      | Lens.has+          ( Core.hasCode "Throttling"+              Prelude.. Core.hasStatus 400+          )+          e =+          Prelude.Just "throttling"+      | Lens.has+          ( Core.hasCode "ThrottlingException"+              Prelude.. Core.hasStatus 400+          )+          e =+          Prelude.Just "throttling_exception"+      | Lens.has+          ( Core.hasCode+              "ProvisionedThroughputExceededException"+              Prelude.. Core.hasStatus 400+          )+          e =+          Prelude.Just "throughput_exceeded"+      | Lens.has (Core.hasStatus 429) e =+          Prelude.Just "too_many_requests"+      | Prelude.otherwise = Prelude.Nothing++-- | Prism for AccessDeniedException' errors.+_AccessDeniedException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_AccessDeniedException =+  Core._MatchServiceError+    defaultService+    "AccessDeniedException"+    Prelude.. Core.hasStatus 403++-- | Non-retryable exception. Attempted to create already existing object or+-- chunk. This message contains a checksum of already presented data.+_DataAlreadyExistsException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_DataAlreadyExistsException =+  Core._MatchServiceError+    defaultService+    "DataAlreadyExistsException"+    Prelude.. Core.hasStatus 400++-- | Non-retryable exception, indicates client error (wrong argument passed+-- to API). See exception message for details.+_IllegalArgumentException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_IllegalArgumentException =+  Core._MatchServiceError+    defaultService+    "IllegalArgumentException"+    Prelude.. Core.hasStatus 400++-- | Non-retryable exception. Indicates the KMS key usage is incorrect. See+-- exception message for details.+_KMSInvalidKeyUsageException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_KMSInvalidKeyUsageException =+  Core._MatchServiceError+    defaultService+    "KMSInvalidKeyUsageException"+    Prelude.. Core.hasStatus 400++-- | Retryalble exception. Indicated issues while reading an input stream due+-- to the networking issues or connection drop on the client side.+_NotReadableInputStreamException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_NotReadableInputStreamException =+  Core._MatchServiceError+    defaultService+    "NotReadableInputStreamException"+    Prelude.. Core.hasStatus 400++-- | Non-retryable exception. Attempted to make an operation on non-existing+-- or expired resource.+_ResourceNotFoundException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_ResourceNotFoundException =+  Core._MatchServiceError+    defaultService+    "ResourceNotFoundException"+    Prelude.. Core.hasStatus 404++-- | Retryable exception. In general indicates internal failure that can be+-- fixed by retry.+_RetryableException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_RetryableException =+  Core._MatchServiceError+    defaultService+    "RetryableException"+    Prelude.. Core.hasStatus 500++-- | Deprecated. To be removed from the model.+_ServiceInternalException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_ServiceInternalException =+  Core._MatchServiceError+    defaultService+    "ServiceInternalException"+    Prelude.. Core.hasStatus 500++-- | Retryable exception, indicates internal server error.+_ServiceUnavailableException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_ServiceUnavailableException =+  Core._MatchServiceError+    defaultService+    "ServiceUnavailableException"+    Prelude.. Core.hasStatus 503++-- | Increased rate over throttling limits. Can be retried with exponential+-- backoff.+_ThrottlingException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_ThrottlingException =+  Core._MatchServiceError+    defaultService+    "ThrottlingException"+    Prelude.. Core.hasStatus 429
+ gen/Amazonka/BackupStorage/Types/BackupObject.hs view
@@ -0,0 +1,145 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Amazonka.BackupStorage.Types.BackupObject+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+module Amazonka.BackupStorage.Types.BackupObject where++import Amazonka.BackupStorage.Types.SummaryChecksumAlgorithm+import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++-- | Object+--+-- /See:/ 'newBackupObject' smart constructor.+data BackupObject = BackupObject'+  { -- | Number of chunks in object+    chunksCount :: Prelude.Maybe Prelude.Integer,+    -- | Metadata string associated with the Object+    metadataString :: Prelude.Maybe Prelude.Text,+    -- | Object name+    name :: Prelude.Text,+    -- | Object checksum+    objectChecksum :: Prelude.Text,+    -- | Checksum algorithm+    objectChecksumAlgorithm :: SummaryChecksumAlgorithm,+    -- | Object token+    objectToken :: Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'BackupObject' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'chunksCount', 'backupObject_chunksCount' - Number of chunks in object+--+-- 'metadataString', 'backupObject_metadataString' - Metadata string associated with the Object+--+-- 'name', 'backupObject_name' - Object name+--+-- 'objectChecksum', 'backupObject_objectChecksum' - Object checksum+--+-- 'objectChecksumAlgorithm', 'backupObject_objectChecksumAlgorithm' - Checksum algorithm+--+-- 'objectToken', 'backupObject_objectToken' - Object token+newBackupObject ::+  -- | 'name'+  Prelude.Text ->+  -- | 'objectChecksum'+  Prelude.Text ->+  -- | 'objectChecksumAlgorithm'+  SummaryChecksumAlgorithm ->+  -- | 'objectToken'+  Prelude.Text ->+  BackupObject+newBackupObject+  pName_+  pObjectChecksum_+  pObjectChecksumAlgorithm_+  pObjectToken_ =+    BackupObject'+      { chunksCount = Prelude.Nothing,+        metadataString = Prelude.Nothing,+        name = pName_,+        objectChecksum = pObjectChecksum_,+        objectChecksumAlgorithm = pObjectChecksumAlgorithm_,+        objectToken = pObjectToken_+      }++-- | Number of chunks in object+backupObject_chunksCount :: Lens.Lens' BackupObject (Prelude.Maybe Prelude.Integer)+backupObject_chunksCount = Lens.lens (\BackupObject' {chunksCount} -> chunksCount) (\s@BackupObject' {} a -> s {chunksCount = a} :: BackupObject)++-- | Metadata string associated with the Object+backupObject_metadataString :: Lens.Lens' BackupObject (Prelude.Maybe Prelude.Text)+backupObject_metadataString = Lens.lens (\BackupObject' {metadataString} -> metadataString) (\s@BackupObject' {} a -> s {metadataString = a} :: BackupObject)++-- | Object name+backupObject_name :: Lens.Lens' BackupObject Prelude.Text+backupObject_name = Lens.lens (\BackupObject' {name} -> name) (\s@BackupObject' {} a -> s {name = a} :: BackupObject)++-- | Object checksum+backupObject_objectChecksum :: Lens.Lens' BackupObject Prelude.Text+backupObject_objectChecksum = Lens.lens (\BackupObject' {objectChecksum} -> objectChecksum) (\s@BackupObject' {} a -> s {objectChecksum = a} :: BackupObject)++-- | Checksum algorithm+backupObject_objectChecksumAlgorithm :: Lens.Lens' BackupObject SummaryChecksumAlgorithm+backupObject_objectChecksumAlgorithm = Lens.lens (\BackupObject' {objectChecksumAlgorithm} -> objectChecksumAlgorithm) (\s@BackupObject' {} a -> s {objectChecksumAlgorithm = a} :: BackupObject)++-- | Object token+backupObject_objectToken :: Lens.Lens' BackupObject Prelude.Text+backupObject_objectToken = Lens.lens (\BackupObject' {objectToken} -> objectToken) (\s@BackupObject' {} a -> s {objectToken = a} :: BackupObject)++instance Data.FromJSON BackupObject where+  parseJSON =+    Data.withObject+      "BackupObject"+      ( \x ->+          BackupObject'+            Prelude.<$> (x Data..:? "ChunksCount")+            Prelude.<*> (x Data..:? "MetadataString")+            Prelude.<*> (x Data..: "Name")+            Prelude.<*> (x Data..: "ObjectChecksum")+            Prelude.<*> (x Data..: "ObjectChecksumAlgorithm")+            Prelude.<*> (x Data..: "ObjectToken")+      )++instance Prelude.Hashable BackupObject where+  hashWithSalt _salt BackupObject' {..} =+    _salt+      `Prelude.hashWithSalt` chunksCount+      `Prelude.hashWithSalt` metadataString+      `Prelude.hashWithSalt` name+      `Prelude.hashWithSalt` objectChecksum+      `Prelude.hashWithSalt` objectChecksumAlgorithm+      `Prelude.hashWithSalt` objectToken++instance Prelude.NFData BackupObject where+  rnf BackupObject' {..} =+    Prelude.rnf chunksCount+      `Prelude.seq` Prelude.rnf metadataString+      `Prelude.seq` Prelude.rnf name+      `Prelude.seq` Prelude.rnf objectChecksum+      `Prelude.seq` Prelude.rnf objectChecksumAlgorithm+      `Prelude.seq` Prelude.rnf objectToken
+ gen/Amazonka/BackupStorage/Types/Chunk.hs view
@@ -0,0 +1,136 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Amazonka.BackupStorage.Types.Chunk+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+module Amazonka.BackupStorage.Types.Chunk where++import Amazonka.BackupStorage.Types.DataChecksumAlgorithm+import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++-- | Chunk+--+-- /See:/ 'newChunk' smart constructor.+data Chunk = Chunk'+  { -- | Chunk index+    index :: Prelude.Integer,+    -- | Chunk length+    length :: Prelude.Integer,+    -- | Chunk checksum+    checksum :: Prelude.Text,+    -- | Checksum algorithm+    checksumAlgorithm :: DataChecksumAlgorithm,+    -- | Chunk token+    chunkToken :: Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'Chunk' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'index', 'chunk_index' - Chunk index+--+-- 'length', 'chunk_length' - Chunk length+--+-- 'checksum', 'chunk_checksum' - Chunk checksum+--+-- 'checksumAlgorithm', 'chunk_checksumAlgorithm' - Checksum algorithm+--+-- 'chunkToken', 'chunk_chunkToken' - Chunk token+newChunk ::+  -- | 'index'+  Prelude.Integer ->+  -- | 'length'+  Prelude.Integer ->+  -- | 'checksum'+  Prelude.Text ->+  -- | 'checksumAlgorithm'+  DataChecksumAlgorithm ->+  -- | 'chunkToken'+  Prelude.Text ->+  Chunk+newChunk+  pIndex_+  pLength_+  pChecksum_+  pChecksumAlgorithm_+  pChunkToken_ =+    Chunk'+      { index = pIndex_,+        length = pLength_,+        checksum = pChecksum_,+        checksumAlgorithm = pChecksumAlgorithm_,+        chunkToken = pChunkToken_+      }++-- | Chunk index+chunk_index :: Lens.Lens' Chunk Prelude.Integer+chunk_index = Lens.lens (\Chunk' {index} -> index) (\s@Chunk' {} a -> s {index = a} :: Chunk)++-- | Chunk length+chunk_length :: Lens.Lens' Chunk Prelude.Integer+chunk_length = Lens.lens (\Chunk' {length} -> length) (\s@Chunk' {} a -> s {length = a} :: Chunk)++-- | Chunk checksum+chunk_checksum :: Lens.Lens' Chunk Prelude.Text+chunk_checksum = Lens.lens (\Chunk' {checksum} -> checksum) (\s@Chunk' {} a -> s {checksum = a} :: Chunk)++-- | Checksum algorithm+chunk_checksumAlgorithm :: Lens.Lens' Chunk DataChecksumAlgorithm+chunk_checksumAlgorithm = Lens.lens (\Chunk' {checksumAlgorithm} -> checksumAlgorithm) (\s@Chunk' {} a -> s {checksumAlgorithm = a} :: Chunk)++-- | Chunk token+chunk_chunkToken :: Lens.Lens' Chunk Prelude.Text+chunk_chunkToken = Lens.lens (\Chunk' {chunkToken} -> chunkToken) (\s@Chunk' {} a -> s {chunkToken = a} :: Chunk)++instance Data.FromJSON Chunk where+  parseJSON =+    Data.withObject+      "Chunk"+      ( \x ->+          Chunk'+            Prelude.<$> (x Data..: "Index")+            Prelude.<*> (x Data..: "Length")+            Prelude.<*> (x Data..: "Checksum")+            Prelude.<*> (x Data..: "ChecksumAlgorithm")+            Prelude.<*> (x Data..: "ChunkToken")+      )++instance Prelude.Hashable Chunk where+  hashWithSalt _salt Chunk' {..} =+    _salt+      `Prelude.hashWithSalt` index+      `Prelude.hashWithSalt` length+      `Prelude.hashWithSalt` checksum+      `Prelude.hashWithSalt` checksumAlgorithm+      `Prelude.hashWithSalt` chunkToken++instance Prelude.NFData Chunk where+  rnf Chunk' {..} =+    Prelude.rnf index+      `Prelude.seq` Prelude.rnf length+      `Prelude.seq` Prelude.rnf checksum+      `Prelude.seq` Prelude.rnf checksumAlgorithm+      `Prelude.seq` Prelude.rnf chunkToken
+ gen/Amazonka/BackupStorage/Types/DataChecksumAlgorithm.hs view
@@ -0,0 +1,66 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DerivingStrategies #-}+{-# LANGUAGE GeneralizedNewtypeDeriving #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE PatternSynonyms #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Amazonka.BackupStorage.Types.DataChecksumAlgorithm+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+module Amazonka.BackupStorage.Types.DataChecksumAlgorithm+  ( DataChecksumAlgorithm+      ( ..,+        DataChecksumAlgorithm_SHA256+      ),+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype DataChecksumAlgorithm = DataChecksumAlgorithm'+  { fromDataChecksumAlgorithm ::+      Data.Text+  }+  deriving stock+    ( Prelude.Show,+      Prelude.Read,+      Prelude.Eq,+      Prelude.Ord,+      Prelude.Generic+    )+  deriving newtype+    ( Prelude.Hashable,+      Prelude.NFData,+      Data.FromText,+      Data.ToText,+      Data.ToByteString,+      Data.ToLog,+      Data.ToHeader,+      Data.ToQuery,+      Data.FromJSON,+      Data.FromJSONKey,+      Data.ToJSON,+      Data.ToJSONKey,+      Data.FromXML,+      Data.ToXML+    )++pattern DataChecksumAlgorithm_SHA256 :: DataChecksumAlgorithm+pattern DataChecksumAlgorithm_SHA256 = DataChecksumAlgorithm' "SHA256"++{-# COMPLETE+  DataChecksumAlgorithm_SHA256,+  DataChecksumAlgorithm'+  #-}
+ gen/Amazonka/BackupStorage/Types/SummaryChecksumAlgorithm.hs view
@@ -0,0 +1,66 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DerivingStrategies #-}+{-# LANGUAGE GeneralizedNewtypeDeriving #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE PatternSynonyms #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Amazonka.BackupStorage.Types.SummaryChecksumAlgorithm+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+module Amazonka.BackupStorage.Types.SummaryChecksumAlgorithm+  ( SummaryChecksumAlgorithm+      ( ..,+        SummaryChecksumAlgorithm_SUMMARY+      ),+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype SummaryChecksumAlgorithm = SummaryChecksumAlgorithm'+  { fromSummaryChecksumAlgorithm ::+      Data.Text+  }+  deriving stock+    ( Prelude.Show,+      Prelude.Read,+      Prelude.Eq,+      Prelude.Ord,+      Prelude.Generic+    )+  deriving newtype+    ( Prelude.Hashable,+      Prelude.NFData,+      Data.FromText,+      Data.ToText,+      Data.ToByteString,+      Data.ToLog,+      Data.ToHeader,+      Data.ToQuery,+      Data.FromJSON,+      Data.FromJSONKey,+      Data.ToJSON,+      Data.ToJSONKey,+      Data.FromXML,+      Data.ToXML+    )++pattern SummaryChecksumAlgorithm_SUMMARY :: SummaryChecksumAlgorithm+pattern SummaryChecksumAlgorithm_SUMMARY = SummaryChecksumAlgorithm' "SUMMARY"++{-# COMPLETE+  SummaryChecksumAlgorithm_SUMMARY,+  SummaryChecksumAlgorithm'+  #-}
+ gen/Amazonka/BackupStorage/Waiters.hs view
@@ -0,0 +1,24 @@+{-# LANGUAGE DisambiguateRecordFields #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Amazonka.BackupStorage.Waiters+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+module Amazonka.BackupStorage.Waiters where++import Amazonka.BackupStorage.Lens+import Amazonka.BackupStorage.Types+import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude
+ src/.gitkeep view
+ test/Main.hs view
@@ -0,0 +1,23 @@+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- |+-- Module      : Main+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+module Main (main) where++import Test.Amazonka.BackupStorage+import Test.Amazonka.BackupStorage.Internal+import Test.Tasty++main :: IO ()+main =+  defaultMain $+    testGroup+      "BackupStorage"+      [ testGroup "tests" tests,+        testGroup "fixtures" fixtures+      ]
+ test/Test/Amazonka/BackupStorage.hs view
@@ -0,0 +1,20 @@+-- |+-- Module      : Test.Amazonka.BackupStorage+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+module Test.Amazonka.BackupStorage+  ( tests,+    fixtures,+  )+where++import Test.Tasty (TestTree)++tests :: [TestTree]+tests = []++fixtures :: [TestTree]+fixtures = []
+ test/Test/Amazonka/BackupStorage/Internal.hs view
@@ -0,0 +1,8 @@+-- |+-- Module      : Test.Amazonka.BackupStorage.Internal+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+module Test.Amazonka.BackupStorage.Internal where
+ test/Test/Amazonka/Gen/BackupStorage.hs view
@@ -0,0 +1,184 @@+{-# OPTIONS_GHC -fno-warn-orphans #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Test.Amazonka.Gen.BackupStorage+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+module Test.Amazonka.Gen.BackupStorage where++import Amazonka.BackupStorage+import qualified Data.Proxy as Proxy+import Test.Amazonka.BackupStorage.Internal+import Test.Amazonka.Fixture+import Test.Amazonka.Prelude+import Test.Tasty++-- Auto-generated: the actual test selection needs to be manually placed into+-- the top-level so that real test data can be incrementally added.+--+-- This commented snippet is what the entire set should look like:++-- fixtures :: TestTree+-- fixtures =+--     [ testGroup "request"+--         [ requestDeleteObject $+--             newDeleteObject+--+--         , requestGetChunk $+--             newGetChunk+--+--         , requestGetObjectMetadata $+--             newGetObjectMetadata+--+--         , requestListChunks $+--             newListChunks+--+--         , requestListObjects $+--             newListObjects+--+--         , requestNotifyObjectComplete $+--             newNotifyObjectComplete+--+--         , requestPutChunk $+--             newPutChunk+--+--         , requestPutObject $+--             newPutObject+--+--         , requestStartObject $+--             newStartObject+--+--           ]++--     , testGroup "response"+--         [ responseDeleteObject $+--             newDeleteObjectResponse+--+--         , responseGetChunk $+--             newGetChunkResponse+--+--         , responseGetObjectMetadata $+--             newGetObjectMetadataResponse+--+--         , responseListChunks $+--             newListChunksResponse+--+--         , responseListObjects $+--             newListObjectsResponse+--+--         , responseNotifyObjectComplete $+--             newNotifyObjectCompleteResponse+--+--         , responsePutChunk $+--             newPutChunkResponse+--+--         , responsePutObject $+--             newPutObjectResponse+--+--         , responseStartObject $+--             newStartObjectResponse+--+--           ]+--     ]++-- Requests++requestDeleteObject :: DeleteObject -> TestTree+requestDeleteObject =+  req+    "DeleteObject"+    "fixture/DeleteObject.yaml"++requestGetChunk :: GetChunk -> TestTree+requestGetChunk =+  req+    "GetChunk"+    "fixture/GetChunk.yaml"++requestGetObjectMetadata :: GetObjectMetadata -> TestTree+requestGetObjectMetadata =+  req+    "GetObjectMetadata"+    "fixture/GetObjectMetadata.yaml"++requestListChunks :: ListChunks -> TestTree+requestListChunks =+  req+    "ListChunks"+    "fixture/ListChunks.yaml"++requestListObjects :: ListObjects -> TestTree+requestListObjects =+  req+    "ListObjects"+    "fixture/ListObjects.yaml"++requestStartObject :: StartObject -> TestTree+requestStartObject =+  req+    "StartObject"+    "fixture/StartObject.yaml"++-- Responses++responseDeleteObject :: DeleteObjectResponse -> TestTree+responseDeleteObject =+  res+    "DeleteObjectResponse"+    "fixture/DeleteObjectResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy DeleteObject)++responseListChunks :: ListChunksResponse -> TestTree+responseListChunks =+  res+    "ListChunksResponse"+    "fixture/ListChunksResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy ListChunks)++responseListObjects :: ListObjectsResponse -> TestTree+responseListObjects =+  res+    "ListObjectsResponse"+    "fixture/ListObjectsResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy ListObjects)++responseNotifyObjectComplete :: NotifyObjectCompleteResponse -> TestTree+responseNotifyObjectComplete =+  res+    "NotifyObjectCompleteResponse"+    "fixture/NotifyObjectCompleteResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy NotifyObjectComplete)++responsePutChunk :: PutChunkResponse -> TestTree+responsePutChunk =+  res+    "PutChunkResponse"+    "fixture/PutChunkResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy PutChunk)++responsePutObject :: PutObjectResponse -> TestTree+responsePutObject =+  res+    "PutObjectResponse"+    "fixture/PutObjectResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy PutObject)++responseStartObject :: StartObjectResponse -> TestTree+responseStartObject =+  res+    "StartObjectResponse"+    "fixture/StartObjectResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy StartObject)