packages feed

amazonka-rds-data (empty) → 2.0

raw patch · 37 files changed

+3973/−0 lines, 37 filesdep +amazonka-coredep +amazonka-rds-datadep +amazonka-test

Dependencies added: amazonka-core, amazonka-rds-data, 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 RDS DataService SDK++* [Version](#version)+* [Description](#description)+* [Contribute](#contribute)+* [Licence](#licence)+++## Version+ +`2.0` - Derived from API version @2018-08-01@ of the AWS service descriptions, licensed under Apache 2.0.++## Description++Documentation is available via [Hackage](http://hackage.haskell.org/package/amazonka-rds-data)+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.RDSData](http://hackage.haskell.org/package/amazonka-rds-data/docs/Amazonka-RDSData.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-rds-data` 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-rds-data.cabal view
@@ -0,0 +1,98 @@+cabal-version:      2.2+name:               amazonka-rds-data+version:            2.0+synopsis:           Amazon RDS DataService 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-08-01@ 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.RDSData.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.RDSData" 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-rds-data++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.RDSData+    Amazonka.RDSData.BatchExecuteStatement+    Amazonka.RDSData.BeginTransaction+    Amazonka.RDSData.CommitTransaction+    Amazonka.RDSData.ExecuteStatement+    Amazonka.RDSData.Lens+    Amazonka.RDSData.RollbackTransaction+    Amazonka.RDSData.Types+    Amazonka.RDSData.Types.ArrayValue+    Amazonka.RDSData.Types.ColumnMetadata+    Amazonka.RDSData.Types.DecimalReturnType+    Amazonka.RDSData.Types.Field+    Amazonka.RDSData.Types.LongReturnType+    Amazonka.RDSData.Types.RecordsFormatType+    Amazonka.RDSData.Types.ResultSetOptions+    Amazonka.RDSData.Types.SqlParameter+    Amazonka.RDSData.Types.TypeHint+    Amazonka.RDSData.Types.UpdateResult+    Amazonka.RDSData.Waiters++  build-depends:+    , amazonka-core  >=2.0  && <2.1+    , base           >=4.12 && <5++test-suite amazonka-rds-data-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.Gen.RDSData+    Test.Amazonka.RDSData+    Test.Amazonka.RDSData.Internal++  build-depends:+    , amazonka-core         >=2.0 && <2.1+    , amazonka-rds-data+    , amazonka-test         >=2.0 && <2.1+    , base+    , bytestring+    , case-insensitive+    , tasty+    , tasty-hunit+    , text+    , time+    , unordered-containers
+ fixture/BatchExecuteStatement.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/rds-data/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  rds-data.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/BatchExecuteStatementResponse.proto view
+ fixture/BeginTransaction.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/rds-data/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  rds-data.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/BeginTransactionResponse.proto view
+ fixture/CommitTransaction.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/rds-data/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  rds-data.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/CommitTransactionResponse.proto view
+ fixture/ExecuteStatement.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/rds-data/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  rds-data.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/ExecuteStatementResponse.proto view
+ fixture/RollbackTransaction.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/rds-data/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  rds-data.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/RollbackTransactionResponse.proto view
+ gen/Amazonka/RDSData.hs view
@@ -0,0 +1,164 @@+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- |+-- Module      : Amazonka.RDSData+-- 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-08-01@ of the AWS service descriptions, licensed under Apache 2.0.+--+-- Amazon RDS Data Service+--+-- Amazon RDS provides an HTTP endpoint to run SQL statements on an Amazon+-- Aurora Serverless v1 DB cluster. To run these statements, you work with+-- the Data Service API.+--+-- The Data Service API isn\'t supported on Amazon Aurora Serverless v2 DB+-- clusters.+--+-- For more information about the Data Service API, see+-- <https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/data-api.html Using the Data API>+-- in the /Amazon Aurora User Guide/.+module Amazonka.RDSData+  ( -- * Service Configuration+    defaultService,++    -- * Errors+    -- $errors++    -- ** AccessDeniedException+    _AccessDeniedException,++    -- ** BadRequestException+    _BadRequestException,++    -- ** ForbiddenException+    _ForbiddenException,++    -- ** InternalServerErrorException+    _InternalServerErrorException,++    -- ** NotFoundException+    _NotFoundException,++    -- ** ServiceUnavailableError+    _ServiceUnavailableError,++    -- ** StatementTimeoutException+    _StatementTimeoutException,++    -- * Waiters+    -- $waiters++    -- * Operations+    -- $operations++    -- ** BatchExecuteStatement+    BatchExecuteStatement (BatchExecuteStatement'),+    newBatchExecuteStatement,+    BatchExecuteStatementResponse (BatchExecuteStatementResponse'),+    newBatchExecuteStatementResponse,++    -- ** BeginTransaction+    BeginTransaction (BeginTransaction'),+    newBeginTransaction,+    BeginTransactionResponse (BeginTransactionResponse'),+    newBeginTransactionResponse,++    -- ** CommitTransaction+    CommitTransaction (CommitTransaction'),+    newCommitTransaction,+    CommitTransactionResponse (CommitTransactionResponse'),+    newCommitTransactionResponse,++    -- ** ExecuteStatement+    ExecuteStatement (ExecuteStatement'),+    newExecuteStatement,+    ExecuteStatementResponse (ExecuteStatementResponse'),+    newExecuteStatementResponse,++    -- ** RollbackTransaction+    RollbackTransaction (RollbackTransaction'),+    newRollbackTransaction,+    RollbackTransactionResponse (RollbackTransactionResponse'),+    newRollbackTransactionResponse,++    -- * Types++    -- ** DecimalReturnType+    DecimalReturnType (..),++    -- ** LongReturnType+    LongReturnType (..),++    -- ** RecordsFormatType+    RecordsFormatType (..),++    -- ** TypeHint+    TypeHint (..),++    -- ** ArrayValue+    ArrayValue (ArrayValue'),+    newArrayValue,++    -- ** ColumnMetadata+    ColumnMetadata (ColumnMetadata'),+    newColumnMetadata,++    -- ** Field+    Field (Field'),+    newField,++    -- ** ResultSetOptions+    ResultSetOptions (ResultSetOptions'),+    newResultSetOptions,++    -- ** SqlParameter+    SqlParameter (SqlParameter'),+    newSqlParameter,++    -- ** UpdateResult+    UpdateResult (UpdateResult'),+    newUpdateResult,+  )+where++import Amazonka.RDSData.BatchExecuteStatement+import Amazonka.RDSData.BeginTransaction+import Amazonka.RDSData.CommitTransaction+import Amazonka.RDSData.ExecuteStatement+import Amazonka.RDSData.Lens+import Amazonka.RDSData.RollbackTransaction+import Amazonka.RDSData.Types+import Amazonka.RDSData.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 'RDSData'.++-- $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/RDSData/BatchExecuteStatement.hs view
@@ -0,0 +1,350 @@+{-# 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.RDSData.BatchExecuteStatement+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Runs a batch SQL statement over an array of data.+--+-- You can run bulk update and insert operations for multiple records using+-- a DML statement with different parameter sets. Bulk operations can+-- provide a significant performance improvement over individual insert and+-- update operations.+--+-- If a call isn\'t part of a transaction because it doesn\'t include the+-- @transactionID@ parameter, changes that result from the call are+-- committed automatically.+--+-- There isn\'t a fixed upper limit on the number of parameter sets.+-- However, the maximum size of the HTTP request submitted through the Data+-- API is 4 MiB. If the request exceeds this limit, the Data API returns an+-- error and doesn\'t process the request. This 4-MiB limit includes the+-- size of the HTTP headers and the JSON notation in the request. Thus, the+-- number of parameter sets that you can include depends on a combination+-- of factors, such as the size of the SQL statement and the size of each+-- parameter set.+--+-- The response size limit is 1 MiB. If the call returns more than 1 MiB of+-- response data, the call is terminated.+module Amazonka.RDSData.BatchExecuteStatement+  ( -- * Creating a Request+    BatchExecuteStatement (..),+    newBatchExecuteStatement,++    -- * Request Lenses+    batchExecuteStatement_database,+    batchExecuteStatement_parameterSets,+    batchExecuteStatement_schema,+    batchExecuteStatement_transactionId,+    batchExecuteStatement_resourceArn,+    batchExecuteStatement_secretArn,+    batchExecuteStatement_sql,++    -- * Destructuring the Response+    BatchExecuteStatementResponse (..),+    newBatchExecuteStatementResponse,++    -- * Response Lenses+    batchExecuteStatementResponse_updateResults,+    batchExecuteStatementResponse_httpStatus,+  )+where++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 Amazonka.RDSData.Types+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | The request parameters represent the input of a SQL statement over an+-- array of data.+--+-- /See:/ 'newBatchExecuteStatement' smart constructor.+data BatchExecuteStatement = BatchExecuteStatement'+  { -- | The name of the database.+    database :: Prelude.Maybe Prelude.Text,+    -- | The parameter set for the batch operation.+    --+    -- The SQL statement is executed as many times as the number of parameter+    -- sets provided. To execute a SQL statement with no parameters, use one of+    -- the following options:+    --+    -- -   Specify one or more empty parameter sets.+    --+    -- -   Use the @ExecuteStatement@ operation instead of the+    --     @BatchExecuteStatement@ operation.+    --+    -- Array parameters are not supported.+    parameterSets :: Prelude.Maybe [[SqlParameter]],+    -- | The name of the database schema.+    --+    -- Currently, the @schema@ parameter isn\'t supported.+    schema :: Prelude.Maybe Prelude.Text,+    -- | The identifier of a transaction that was started by using the+    -- @BeginTransaction@ operation. Specify the transaction ID of the+    -- transaction that you want to include the SQL statement in.+    --+    -- If the SQL statement is not part of a transaction, don\'t set this+    -- parameter.+    transactionId :: Prelude.Maybe Prelude.Text,+    -- | The Amazon Resource Name (ARN) of the Aurora Serverless DB cluster.+    resourceArn :: Prelude.Text,+    -- | The ARN of the secret that enables access to the DB cluster. Enter the+    -- database user name and password for the credentials in the secret.+    --+    -- For information about creating the secret, see+    -- <https://docs.aws.amazon.com/secretsmanager/latest/userguide/create_database_secret.html Create a database secret>.+    secretArn :: Prelude.Text,+    -- | The SQL statement to run. Don\'t include a semicolon (;) at the end of+    -- the SQL statement.+    sql :: Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'BatchExecuteStatement' 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:+--+-- 'database', 'batchExecuteStatement_database' - The name of the database.+--+-- 'parameterSets', 'batchExecuteStatement_parameterSets' - The parameter set for the batch operation.+--+-- The SQL statement is executed as many times as the number of parameter+-- sets provided. To execute a SQL statement with no parameters, use one of+-- the following options:+--+-- -   Specify one or more empty parameter sets.+--+-- -   Use the @ExecuteStatement@ operation instead of the+--     @BatchExecuteStatement@ operation.+--+-- Array parameters are not supported.+--+-- 'schema', 'batchExecuteStatement_schema' - The name of the database schema.+--+-- Currently, the @schema@ parameter isn\'t supported.+--+-- 'transactionId', 'batchExecuteStatement_transactionId' - The identifier of a transaction that was started by using the+-- @BeginTransaction@ operation. Specify the transaction ID of the+-- transaction that you want to include the SQL statement in.+--+-- If the SQL statement is not part of a transaction, don\'t set this+-- parameter.+--+-- 'resourceArn', 'batchExecuteStatement_resourceArn' - The Amazon Resource Name (ARN) of the Aurora Serverless DB cluster.+--+-- 'secretArn', 'batchExecuteStatement_secretArn' - The ARN of the secret that enables access to the DB cluster. Enter the+-- database user name and password for the credentials in the secret.+--+-- For information about creating the secret, see+-- <https://docs.aws.amazon.com/secretsmanager/latest/userguide/create_database_secret.html Create a database secret>.+--+-- 'sql', 'batchExecuteStatement_sql' - The SQL statement to run. Don\'t include a semicolon (;) at the end of+-- the SQL statement.+newBatchExecuteStatement ::+  -- | 'resourceArn'+  Prelude.Text ->+  -- | 'secretArn'+  Prelude.Text ->+  -- | 'sql'+  Prelude.Text ->+  BatchExecuteStatement+newBatchExecuteStatement+  pResourceArn_+  pSecretArn_+  pSql_ =+    BatchExecuteStatement'+      { database = Prelude.Nothing,+        parameterSets = Prelude.Nothing,+        schema = Prelude.Nothing,+        transactionId = Prelude.Nothing,+        resourceArn = pResourceArn_,+        secretArn = pSecretArn_,+        sql = pSql_+      }++-- | The name of the database.+batchExecuteStatement_database :: Lens.Lens' BatchExecuteStatement (Prelude.Maybe Prelude.Text)+batchExecuteStatement_database = Lens.lens (\BatchExecuteStatement' {database} -> database) (\s@BatchExecuteStatement' {} a -> s {database = a} :: BatchExecuteStatement)++-- | The parameter set for the batch operation.+--+-- The SQL statement is executed as many times as the number of parameter+-- sets provided. To execute a SQL statement with no parameters, use one of+-- the following options:+--+-- -   Specify one or more empty parameter sets.+--+-- -   Use the @ExecuteStatement@ operation instead of the+--     @BatchExecuteStatement@ operation.+--+-- Array parameters are not supported.+batchExecuteStatement_parameterSets :: Lens.Lens' BatchExecuteStatement (Prelude.Maybe [[SqlParameter]])+batchExecuteStatement_parameterSets = Lens.lens (\BatchExecuteStatement' {parameterSets} -> parameterSets) (\s@BatchExecuteStatement' {} a -> s {parameterSets = a} :: BatchExecuteStatement) Prelude.. Lens.mapping Lens.coerced++-- | The name of the database schema.+--+-- Currently, the @schema@ parameter isn\'t supported.+batchExecuteStatement_schema :: Lens.Lens' BatchExecuteStatement (Prelude.Maybe Prelude.Text)+batchExecuteStatement_schema = Lens.lens (\BatchExecuteStatement' {schema} -> schema) (\s@BatchExecuteStatement' {} a -> s {schema = a} :: BatchExecuteStatement)++-- | The identifier of a transaction that was started by using the+-- @BeginTransaction@ operation. Specify the transaction ID of the+-- transaction that you want to include the SQL statement in.+--+-- If the SQL statement is not part of a transaction, don\'t set this+-- parameter.+batchExecuteStatement_transactionId :: Lens.Lens' BatchExecuteStatement (Prelude.Maybe Prelude.Text)+batchExecuteStatement_transactionId = Lens.lens (\BatchExecuteStatement' {transactionId} -> transactionId) (\s@BatchExecuteStatement' {} a -> s {transactionId = a} :: BatchExecuteStatement)++-- | The Amazon Resource Name (ARN) of the Aurora Serverless DB cluster.+batchExecuteStatement_resourceArn :: Lens.Lens' BatchExecuteStatement Prelude.Text+batchExecuteStatement_resourceArn = Lens.lens (\BatchExecuteStatement' {resourceArn} -> resourceArn) (\s@BatchExecuteStatement' {} a -> s {resourceArn = a} :: BatchExecuteStatement)++-- | The ARN of the secret that enables access to the DB cluster. Enter the+-- database user name and password for the credentials in the secret.+--+-- For information about creating the secret, see+-- <https://docs.aws.amazon.com/secretsmanager/latest/userguide/create_database_secret.html Create a database secret>.+batchExecuteStatement_secretArn :: Lens.Lens' BatchExecuteStatement Prelude.Text+batchExecuteStatement_secretArn = Lens.lens (\BatchExecuteStatement' {secretArn} -> secretArn) (\s@BatchExecuteStatement' {} a -> s {secretArn = a} :: BatchExecuteStatement)++-- | The SQL statement to run. Don\'t include a semicolon (;) at the end of+-- the SQL statement.+batchExecuteStatement_sql :: Lens.Lens' BatchExecuteStatement Prelude.Text+batchExecuteStatement_sql = Lens.lens (\BatchExecuteStatement' {sql} -> sql) (\s@BatchExecuteStatement' {} a -> s {sql = a} :: BatchExecuteStatement)++instance Core.AWSRequest BatchExecuteStatement where+  type+    AWSResponse BatchExecuteStatement =+      BatchExecuteStatementResponse+  request overrides =+    Request.postJSON (overrides defaultService)+  response =+    Response.receiveJSON+      ( \s h x ->+          BatchExecuteStatementResponse'+            Prelude.<$> (x Data..?> "updateResults" Core..!@ Prelude.mempty)+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+      )++instance Prelude.Hashable BatchExecuteStatement where+  hashWithSalt _salt BatchExecuteStatement' {..} =+    _salt+      `Prelude.hashWithSalt` database+      `Prelude.hashWithSalt` parameterSets+      `Prelude.hashWithSalt` schema+      `Prelude.hashWithSalt` transactionId+      `Prelude.hashWithSalt` resourceArn+      `Prelude.hashWithSalt` secretArn+      `Prelude.hashWithSalt` sql++instance Prelude.NFData BatchExecuteStatement where+  rnf BatchExecuteStatement' {..} =+    Prelude.rnf database+      `Prelude.seq` Prelude.rnf parameterSets+      `Prelude.seq` Prelude.rnf schema+      `Prelude.seq` Prelude.rnf transactionId+      `Prelude.seq` Prelude.rnf resourceArn+      `Prelude.seq` Prelude.rnf secretArn+      `Prelude.seq` Prelude.rnf sql++instance Data.ToHeaders BatchExecuteStatement where+  toHeaders =+    Prelude.const+      ( Prelude.mconcat+          [ "Content-Type"+              Data.=# ( "application/x-amz-json-1.1" ::+                          Prelude.ByteString+                      )+          ]+      )++instance Data.ToJSON BatchExecuteStatement where+  toJSON BatchExecuteStatement' {..} =+    Data.object+      ( Prelude.catMaybes+          [ ("database" Data..=) Prelude.<$> database,+            ("parameterSets" Data..=) Prelude.<$> parameterSets,+            ("schema" Data..=) Prelude.<$> schema,+            ("transactionId" Data..=) Prelude.<$> transactionId,+            Prelude.Just ("resourceArn" Data..= resourceArn),+            Prelude.Just ("secretArn" Data..= secretArn),+            Prelude.Just ("sql" Data..= sql)+          ]+      )++instance Data.ToPath BatchExecuteStatement where+  toPath = Prelude.const "/BatchExecute"++instance Data.ToQuery BatchExecuteStatement where+  toQuery = Prelude.const Prelude.mempty++-- | The response elements represent the output of a SQL statement over an+-- array of data.+--+-- /See:/ 'newBatchExecuteStatementResponse' smart constructor.+data BatchExecuteStatementResponse = BatchExecuteStatementResponse'+  { -- | The execution results of each batch entry.+    updateResults :: Prelude.Maybe [UpdateResult],+    -- | The response's http status code.+    httpStatus :: Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'BatchExecuteStatementResponse' 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:+--+-- 'updateResults', 'batchExecuteStatementResponse_updateResults' - The execution results of each batch entry.+--+-- 'httpStatus', 'batchExecuteStatementResponse_httpStatus' - The response's http status code.+newBatchExecuteStatementResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  BatchExecuteStatementResponse+newBatchExecuteStatementResponse pHttpStatus_ =+  BatchExecuteStatementResponse'+    { updateResults =+        Prelude.Nothing,+      httpStatus = pHttpStatus_+    }++-- | The execution results of each batch entry.+batchExecuteStatementResponse_updateResults :: Lens.Lens' BatchExecuteStatementResponse (Prelude.Maybe [UpdateResult])+batchExecuteStatementResponse_updateResults = Lens.lens (\BatchExecuteStatementResponse' {updateResults} -> updateResults) (\s@BatchExecuteStatementResponse' {} a -> s {updateResults = a} :: BatchExecuteStatementResponse) Prelude.. Lens.mapping Lens.coerced++-- | The response's http status code.+batchExecuteStatementResponse_httpStatus :: Lens.Lens' BatchExecuteStatementResponse Prelude.Int+batchExecuteStatementResponse_httpStatus = Lens.lens (\BatchExecuteStatementResponse' {httpStatus} -> httpStatus) (\s@BatchExecuteStatementResponse' {} a -> s {httpStatus = a} :: BatchExecuteStatementResponse)++instance Prelude.NFData BatchExecuteStatementResponse where+  rnf BatchExecuteStatementResponse' {..} =+    Prelude.rnf updateResults+      `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/RDSData/BeginTransaction.hs view
@@ -0,0 +1,227 @@+{-# 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.RDSData.BeginTransaction+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Starts a SQL transaction.+--+-- A transaction can run for a maximum of 24 hours. A transaction is+-- terminated and rolled back automatically after 24 hours.+--+-- A transaction times out if no calls use its transaction ID in three+-- minutes. If a transaction times out before it\'s committed, it\'s rolled+-- back automatically.+--+-- DDL statements inside a transaction cause an implicit commit. We+-- recommend that you run each DDL statement in a separate+-- @ExecuteStatement@ call with @continueAfterTimeout@ enabled.+module Amazonka.RDSData.BeginTransaction+  ( -- * Creating a Request+    BeginTransaction (..),+    newBeginTransaction,++    -- * Request Lenses+    beginTransaction_database,+    beginTransaction_schema,+    beginTransaction_resourceArn,+    beginTransaction_secretArn,++    -- * Destructuring the Response+    BeginTransactionResponse (..),+    newBeginTransactionResponse,++    -- * Response Lenses+    beginTransactionResponse_transactionId,+    beginTransactionResponse_httpStatus,+  )+where++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 Amazonka.RDSData.Types+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | The request parameters represent the input of a request to start a SQL+-- transaction.+--+-- /See:/ 'newBeginTransaction' smart constructor.+data BeginTransaction = BeginTransaction'+  { -- | The name of the database.+    database :: Prelude.Maybe Prelude.Text,+    -- | The name of the database schema.+    schema :: Prelude.Maybe Prelude.Text,+    -- | The Amazon Resource Name (ARN) of the Aurora Serverless DB cluster.+    resourceArn :: Prelude.Text,+    -- | The name or ARN of the secret that enables access to the DB cluster.+    secretArn :: Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'BeginTransaction' 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:+--+-- 'database', 'beginTransaction_database' - The name of the database.+--+-- 'schema', 'beginTransaction_schema' - The name of the database schema.+--+-- 'resourceArn', 'beginTransaction_resourceArn' - The Amazon Resource Name (ARN) of the Aurora Serverless DB cluster.+--+-- 'secretArn', 'beginTransaction_secretArn' - The name or ARN of the secret that enables access to the DB cluster.+newBeginTransaction ::+  -- | 'resourceArn'+  Prelude.Text ->+  -- | 'secretArn'+  Prelude.Text ->+  BeginTransaction+newBeginTransaction pResourceArn_ pSecretArn_ =+  BeginTransaction'+    { database = Prelude.Nothing,+      schema = Prelude.Nothing,+      resourceArn = pResourceArn_,+      secretArn = pSecretArn_+    }++-- | The name of the database.+beginTransaction_database :: Lens.Lens' BeginTransaction (Prelude.Maybe Prelude.Text)+beginTransaction_database = Lens.lens (\BeginTransaction' {database} -> database) (\s@BeginTransaction' {} a -> s {database = a} :: BeginTransaction)++-- | The name of the database schema.+beginTransaction_schema :: Lens.Lens' BeginTransaction (Prelude.Maybe Prelude.Text)+beginTransaction_schema = Lens.lens (\BeginTransaction' {schema} -> schema) (\s@BeginTransaction' {} a -> s {schema = a} :: BeginTransaction)++-- | The Amazon Resource Name (ARN) of the Aurora Serverless DB cluster.+beginTransaction_resourceArn :: Lens.Lens' BeginTransaction Prelude.Text+beginTransaction_resourceArn = Lens.lens (\BeginTransaction' {resourceArn} -> resourceArn) (\s@BeginTransaction' {} a -> s {resourceArn = a} :: BeginTransaction)++-- | The name or ARN of the secret that enables access to the DB cluster.+beginTransaction_secretArn :: Lens.Lens' BeginTransaction Prelude.Text+beginTransaction_secretArn = Lens.lens (\BeginTransaction' {secretArn} -> secretArn) (\s@BeginTransaction' {} a -> s {secretArn = a} :: BeginTransaction)++instance Core.AWSRequest BeginTransaction where+  type+    AWSResponse BeginTransaction =+      BeginTransactionResponse+  request overrides =+    Request.postJSON (overrides defaultService)+  response =+    Response.receiveJSON+      ( \s h x ->+          BeginTransactionResponse'+            Prelude.<$> (x Data..?> "transactionId")+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+      )++instance Prelude.Hashable BeginTransaction where+  hashWithSalt _salt BeginTransaction' {..} =+    _salt+      `Prelude.hashWithSalt` database+      `Prelude.hashWithSalt` schema+      `Prelude.hashWithSalt` resourceArn+      `Prelude.hashWithSalt` secretArn++instance Prelude.NFData BeginTransaction where+  rnf BeginTransaction' {..} =+    Prelude.rnf database+      `Prelude.seq` Prelude.rnf schema+      `Prelude.seq` Prelude.rnf resourceArn+      `Prelude.seq` Prelude.rnf secretArn++instance Data.ToHeaders BeginTransaction where+  toHeaders =+    Prelude.const+      ( Prelude.mconcat+          [ "Content-Type"+              Data.=# ( "application/x-amz-json-1.1" ::+                          Prelude.ByteString+                      )+          ]+      )++instance Data.ToJSON BeginTransaction where+  toJSON BeginTransaction' {..} =+    Data.object+      ( Prelude.catMaybes+          [ ("database" Data..=) Prelude.<$> database,+            ("schema" Data..=) Prelude.<$> schema,+            Prelude.Just ("resourceArn" Data..= resourceArn),+            Prelude.Just ("secretArn" Data..= secretArn)+          ]+      )++instance Data.ToPath BeginTransaction where+  toPath = Prelude.const "/BeginTransaction"++instance Data.ToQuery BeginTransaction where+  toQuery = Prelude.const Prelude.mempty++-- | The response elements represent the output of a request to start a SQL+-- transaction.+--+-- /See:/ 'newBeginTransactionResponse' smart constructor.+data BeginTransactionResponse = BeginTransactionResponse'+  { -- | The transaction ID of the transaction started by the call.+    transactionId :: Prelude.Maybe Prelude.Text,+    -- | The response's http status code.+    httpStatus :: Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'BeginTransactionResponse' 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:+--+-- 'transactionId', 'beginTransactionResponse_transactionId' - The transaction ID of the transaction started by the call.+--+-- 'httpStatus', 'beginTransactionResponse_httpStatus' - The response's http status code.+newBeginTransactionResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  BeginTransactionResponse+newBeginTransactionResponse pHttpStatus_ =+  BeginTransactionResponse'+    { transactionId =+        Prelude.Nothing,+      httpStatus = pHttpStatus_+    }++-- | The transaction ID of the transaction started by the call.+beginTransactionResponse_transactionId :: Lens.Lens' BeginTransactionResponse (Prelude.Maybe Prelude.Text)+beginTransactionResponse_transactionId = Lens.lens (\BeginTransactionResponse' {transactionId} -> transactionId) (\s@BeginTransactionResponse' {} a -> s {transactionId = a} :: BeginTransactionResponse)++-- | The response's http status code.+beginTransactionResponse_httpStatus :: Lens.Lens' BeginTransactionResponse Prelude.Int+beginTransactionResponse_httpStatus = Lens.lens (\BeginTransactionResponse' {httpStatus} -> httpStatus) (\s@BeginTransactionResponse' {} a -> s {httpStatus = a} :: BeginTransactionResponse)++instance Prelude.NFData BeginTransactionResponse where+  rnf BeginTransactionResponse' {..} =+    Prelude.rnf transactionId+      `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/RDSData/CommitTransaction.hs view
@@ -0,0 +1,210 @@+{-# 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.RDSData.CommitTransaction+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Ends a SQL transaction started with the @BeginTransaction@ operation and+-- commits the changes.+module Amazonka.RDSData.CommitTransaction+  ( -- * Creating a Request+    CommitTransaction (..),+    newCommitTransaction,++    -- * Request Lenses+    commitTransaction_resourceArn,+    commitTransaction_secretArn,+    commitTransaction_transactionId,++    -- * Destructuring the Response+    CommitTransactionResponse (..),+    newCommitTransactionResponse,++    -- * Response Lenses+    commitTransactionResponse_transactionStatus,+    commitTransactionResponse_httpStatus,+  )+where++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 Amazonka.RDSData.Types+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | The request parameters represent the input of a commit transaction+-- request.+--+-- /See:/ 'newCommitTransaction' smart constructor.+data CommitTransaction = CommitTransaction'+  { -- | The Amazon Resource Name (ARN) of the Aurora Serverless DB cluster.+    resourceArn :: Prelude.Text,+    -- | The name or ARN of the secret that enables access to the DB cluster.+    secretArn :: Prelude.Text,+    -- | The identifier of the transaction to end and commit.+    transactionId :: Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'CommitTransaction' 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:+--+-- 'resourceArn', 'commitTransaction_resourceArn' - The Amazon Resource Name (ARN) of the Aurora Serverless DB cluster.+--+-- 'secretArn', 'commitTransaction_secretArn' - The name or ARN of the secret that enables access to the DB cluster.+--+-- 'transactionId', 'commitTransaction_transactionId' - The identifier of the transaction to end and commit.+newCommitTransaction ::+  -- | 'resourceArn'+  Prelude.Text ->+  -- | 'secretArn'+  Prelude.Text ->+  -- | 'transactionId'+  Prelude.Text ->+  CommitTransaction+newCommitTransaction+  pResourceArn_+  pSecretArn_+  pTransactionId_ =+    CommitTransaction'+      { resourceArn = pResourceArn_,+        secretArn = pSecretArn_,+        transactionId = pTransactionId_+      }++-- | The Amazon Resource Name (ARN) of the Aurora Serverless DB cluster.+commitTransaction_resourceArn :: Lens.Lens' CommitTransaction Prelude.Text+commitTransaction_resourceArn = Lens.lens (\CommitTransaction' {resourceArn} -> resourceArn) (\s@CommitTransaction' {} a -> s {resourceArn = a} :: CommitTransaction)++-- | The name or ARN of the secret that enables access to the DB cluster.+commitTransaction_secretArn :: Lens.Lens' CommitTransaction Prelude.Text+commitTransaction_secretArn = Lens.lens (\CommitTransaction' {secretArn} -> secretArn) (\s@CommitTransaction' {} a -> s {secretArn = a} :: CommitTransaction)++-- | The identifier of the transaction to end and commit.+commitTransaction_transactionId :: Lens.Lens' CommitTransaction Prelude.Text+commitTransaction_transactionId = Lens.lens (\CommitTransaction' {transactionId} -> transactionId) (\s@CommitTransaction' {} a -> s {transactionId = a} :: CommitTransaction)++instance Core.AWSRequest CommitTransaction where+  type+    AWSResponse CommitTransaction =+      CommitTransactionResponse+  request overrides =+    Request.postJSON (overrides defaultService)+  response =+    Response.receiveJSON+      ( \s h x ->+          CommitTransactionResponse'+            Prelude.<$> (x Data..?> "transactionStatus")+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+      )++instance Prelude.Hashable CommitTransaction where+  hashWithSalt _salt CommitTransaction' {..} =+    _salt+      `Prelude.hashWithSalt` resourceArn+      `Prelude.hashWithSalt` secretArn+      `Prelude.hashWithSalt` transactionId++instance Prelude.NFData CommitTransaction where+  rnf CommitTransaction' {..} =+    Prelude.rnf resourceArn+      `Prelude.seq` Prelude.rnf secretArn+      `Prelude.seq` Prelude.rnf transactionId++instance Data.ToHeaders CommitTransaction where+  toHeaders =+    Prelude.const+      ( Prelude.mconcat+          [ "Content-Type"+              Data.=# ( "application/x-amz-json-1.1" ::+                          Prelude.ByteString+                      )+          ]+      )++instance Data.ToJSON CommitTransaction where+  toJSON CommitTransaction' {..} =+    Data.object+      ( Prelude.catMaybes+          [ Prelude.Just ("resourceArn" Data..= resourceArn),+            Prelude.Just ("secretArn" Data..= secretArn),+            Prelude.Just+              ("transactionId" Data..= transactionId)+          ]+      )++instance Data.ToPath CommitTransaction where+  toPath = Prelude.const "/CommitTransaction"++instance Data.ToQuery CommitTransaction where+  toQuery = Prelude.const Prelude.mempty++-- | The response elements represent the output of a commit transaction+-- request.+--+-- /See:/ 'newCommitTransactionResponse' smart constructor.+data CommitTransactionResponse = CommitTransactionResponse'+  { -- | The status of the commit operation.+    transactionStatus :: Prelude.Maybe Prelude.Text,+    -- | The response's http status code.+    httpStatus :: Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'CommitTransactionResponse' 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:+--+-- 'transactionStatus', 'commitTransactionResponse_transactionStatus' - The status of the commit operation.+--+-- 'httpStatus', 'commitTransactionResponse_httpStatus' - The response's http status code.+newCommitTransactionResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  CommitTransactionResponse+newCommitTransactionResponse pHttpStatus_ =+  CommitTransactionResponse'+    { transactionStatus =+        Prelude.Nothing,+      httpStatus = pHttpStatus_+    }++-- | The status of the commit operation.+commitTransactionResponse_transactionStatus :: Lens.Lens' CommitTransactionResponse (Prelude.Maybe Prelude.Text)+commitTransactionResponse_transactionStatus = Lens.lens (\CommitTransactionResponse' {transactionStatus} -> transactionStatus) (\s@CommitTransactionResponse' {} a -> s {transactionStatus = a} :: CommitTransactionResponse)++-- | The response's http status code.+commitTransactionResponse_httpStatus :: Lens.Lens' CommitTransactionResponse Prelude.Int+commitTransactionResponse_httpStatus = Lens.lens (\CommitTransactionResponse' {httpStatus} -> httpStatus) (\s@CommitTransactionResponse' {} a -> s {httpStatus = a} :: CommitTransactionResponse)++instance Prelude.NFData CommitTransactionResponse where+  rnf CommitTransactionResponse' {..} =+    Prelude.rnf transactionStatus+      `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/RDSData/ExecuteStatement.hs view
@@ -0,0 +1,486 @@+{-# 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.RDSData.ExecuteStatement+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Runs a SQL statement against a database.+--+-- If a call isn\'t part of a transaction because it doesn\'t include the+-- @transactionID@ parameter, changes that result from the call are+-- committed automatically.+--+-- If the binary response data from the database is more than 1 MB, the+-- call is terminated.+module Amazonka.RDSData.ExecuteStatement+  ( -- * Creating a Request+    ExecuteStatement (..),+    newExecuteStatement,++    -- * Request Lenses+    executeStatement_continueAfterTimeout,+    executeStatement_database,+    executeStatement_formatRecordsAs,+    executeStatement_includeResultMetadata,+    executeStatement_parameters,+    executeStatement_resultSetOptions,+    executeStatement_schema,+    executeStatement_transactionId,+    executeStatement_resourceArn,+    executeStatement_secretArn,+    executeStatement_sql,++    -- * Destructuring the Response+    ExecuteStatementResponse (..),+    newExecuteStatementResponse,++    -- * Response Lenses+    executeStatementResponse_columnMetadata,+    executeStatementResponse_formattedRecords,+    executeStatementResponse_generatedFields,+    executeStatementResponse_numberOfRecordsUpdated,+    executeStatementResponse_records,+    executeStatementResponse_httpStatus,+  )+where++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 Amazonka.RDSData.Types+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | The request parameters represent the input of a request to run a SQL+-- statement against a database.+--+-- /See:/ 'newExecuteStatement' smart constructor.+data ExecuteStatement = ExecuteStatement'+  { -- | A value that indicates whether to continue running the statement after+    -- the call times out. By default, the statement stops running when the+    -- call times out.+    --+    -- For DDL statements, we recommend continuing to run the statement after+    -- the call times out. When a DDL statement terminates before it is+    -- finished running, it can result in errors and possibly corrupted data+    -- structures.+    continueAfterTimeout :: Prelude.Maybe Prelude.Bool,+    -- | The name of the database.+    database :: Prelude.Maybe Prelude.Text,+    -- | A value that indicates whether to format the result set as a single JSON+    -- string. This parameter only applies to @SELECT@ statements and is+    -- ignored for other types of statements. Allowed values are @NONE@ and+    -- @JSON@. The default value is @NONE@. The result is returned in the+    -- @formattedRecords@ field.+    --+    -- For usage information about the JSON format for result sets, see+    -- <https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/data-api.html Using the Data API>+    -- in the /Amazon Aurora User Guide/.+    formatRecordsAs :: Prelude.Maybe RecordsFormatType,+    -- | A value that indicates whether to include metadata in the results.+    includeResultMetadata :: Prelude.Maybe Prelude.Bool,+    -- | The parameters for the SQL statement.+    --+    -- Array parameters are not supported.+    parameters :: Prelude.Maybe [SqlParameter],+    -- | Options that control how the result set is returned.+    resultSetOptions :: Prelude.Maybe ResultSetOptions,+    -- | The name of the database schema.+    --+    -- Currently, the @schema@ parameter isn\'t supported.+    schema :: Prelude.Maybe Prelude.Text,+    -- | The identifier of a transaction that was started by using the+    -- @BeginTransaction@ operation. Specify the transaction ID of the+    -- transaction that you want to include the SQL statement in.+    --+    -- If the SQL statement is not part of a transaction, don\'t set this+    -- parameter.+    transactionId :: Prelude.Maybe Prelude.Text,+    -- | The Amazon Resource Name (ARN) of the Aurora Serverless DB cluster.+    resourceArn :: Prelude.Text,+    -- | The ARN of the secret that enables access to the DB cluster. Enter the+    -- database user name and password for the credentials in the secret.+    --+    -- For information about creating the secret, see+    -- <https://docs.aws.amazon.com/secretsmanager/latest/userguide/create_database_secret.html Create a database secret>.+    secretArn :: Prelude.Text,+    -- | The SQL statement to run.+    sql :: Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ExecuteStatement' 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:+--+-- 'continueAfterTimeout', 'executeStatement_continueAfterTimeout' - A value that indicates whether to continue running the statement after+-- the call times out. By default, the statement stops running when the+-- call times out.+--+-- For DDL statements, we recommend continuing to run the statement after+-- the call times out. When a DDL statement terminates before it is+-- finished running, it can result in errors and possibly corrupted data+-- structures.+--+-- 'database', 'executeStatement_database' - The name of the database.+--+-- 'formatRecordsAs', 'executeStatement_formatRecordsAs' - A value that indicates whether to format the result set as a single JSON+-- string. This parameter only applies to @SELECT@ statements and is+-- ignored for other types of statements. Allowed values are @NONE@ and+-- @JSON@. The default value is @NONE@. The result is returned in the+-- @formattedRecords@ field.+--+-- For usage information about the JSON format for result sets, see+-- <https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/data-api.html Using the Data API>+-- in the /Amazon Aurora User Guide/.+--+-- 'includeResultMetadata', 'executeStatement_includeResultMetadata' - A value that indicates whether to include metadata in the results.+--+-- 'parameters', 'executeStatement_parameters' - The parameters for the SQL statement.+--+-- Array parameters are not supported.+--+-- 'resultSetOptions', 'executeStatement_resultSetOptions' - Options that control how the result set is returned.+--+-- 'schema', 'executeStatement_schema' - The name of the database schema.+--+-- Currently, the @schema@ parameter isn\'t supported.+--+-- 'transactionId', 'executeStatement_transactionId' - The identifier of a transaction that was started by using the+-- @BeginTransaction@ operation. Specify the transaction ID of the+-- transaction that you want to include the SQL statement in.+--+-- If the SQL statement is not part of a transaction, don\'t set this+-- parameter.+--+-- 'resourceArn', 'executeStatement_resourceArn' - The Amazon Resource Name (ARN) of the Aurora Serverless DB cluster.+--+-- 'secretArn', 'executeStatement_secretArn' - The ARN of the secret that enables access to the DB cluster. Enter the+-- database user name and password for the credentials in the secret.+--+-- For information about creating the secret, see+-- <https://docs.aws.amazon.com/secretsmanager/latest/userguide/create_database_secret.html Create a database secret>.+--+-- 'sql', 'executeStatement_sql' - The SQL statement to run.+newExecuteStatement ::+  -- | 'resourceArn'+  Prelude.Text ->+  -- | 'secretArn'+  Prelude.Text ->+  -- | 'sql'+  Prelude.Text ->+  ExecuteStatement+newExecuteStatement pResourceArn_ pSecretArn_ pSql_ =+  ExecuteStatement'+    { continueAfterTimeout =+        Prelude.Nothing,+      database = Prelude.Nothing,+      formatRecordsAs = Prelude.Nothing,+      includeResultMetadata = Prelude.Nothing,+      parameters = Prelude.Nothing,+      resultSetOptions = Prelude.Nothing,+      schema = Prelude.Nothing,+      transactionId = Prelude.Nothing,+      resourceArn = pResourceArn_,+      secretArn = pSecretArn_,+      sql = pSql_+    }++-- | A value that indicates whether to continue running the statement after+-- the call times out. By default, the statement stops running when the+-- call times out.+--+-- For DDL statements, we recommend continuing to run the statement after+-- the call times out. When a DDL statement terminates before it is+-- finished running, it can result in errors and possibly corrupted data+-- structures.+executeStatement_continueAfterTimeout :: Lens.Lens' ExecuteStatement (Prelude.Maybe Prelude.Bool)+executeStatement_continueAfterTimeout = Lens.lens (\ExecuteStatement' {continueAfterTimeout} -> continueAfterTimeout) (\s@ExecuteStatement' {} a -> s {continueAfterTimeout = a} :: ExecuteStatement)++-- | The name of the database.+executeStatement_database :: Lens.Lens' ExecuteStatement (Prelude.Maybe Prelude.Text)+executeStatement_database = Lens.lens (\ExecuteStatement' {database} -> database) (\s@ExecuteStatement' {} a -> s {database = a} :: ExecuteStatement)++-- | A value that indicates whether to format the result set as a single JSON+-- string. This parameter only applies to @SELECT@ statements and is+-- ignored for other types of statements. Allowed values are @NONE@ and+-- @JSON@. The default value is @NONE@. The result is returned in the+-- @formattedRecords@ field.+--+-- For usage information about the JSON format for result sets, see+-- <https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/data-api.html Using the Data API>+-- in the /Amazon Aurora User Guide/.+executeStatement_formatRecordsAs :: Lens.Lens' ExecuteStatement (Prelude.Maybe RecordsFormatType)+executeStatement_formatRecordsAs = Lens.lens (\ExecuteStatement' {formatRecordsAs} -> formatRecordsAs) (\s@ExecuteStatement' {} a -> s {formatRecordsAs = a} :: ExecuteStatement)++-- | A value that indicates whether to include metadata in the results.+executeStatement_includeResultMetadata :: Lens.Lens' ExecuteStatement (Prelude.Maybe Prelude.Bool)+executeStatement_includeResultMetadata = Lens.lens (\ExecuteStatement' {includeResultMetadata} -> includeResultMetadata) (\s@ExecuteStatement' {} a -> s {includeResultMetadata = a} :: ExecuteStatement)++-- | The parameters for the SQL statement.+--+-- Array parameters are not supported.+executeStatement_parameters :: Lens.Lens' ExecuteStatement (Prelude.Maybe [SqlParameter])+executeStatement_parameters = Lens.lens (\ExecuteStatement' {parameters} -> parameters) (\s@ExecuteStatement' {} a -> s {parameters = a} :: ExecuteStatement) Prelude.. Lens.mapping Lens.coerced++-- | Options that control how the result set is returned.+executeStatement_resultSetOptions :: Lens.Lens' ExecuteStatement (Prelude.Maybe ResultSetOptions)+executeStatement_resultSetOptions = Lens.lens (\ExecuteStatement' {resultSetOptions} -> resultSetOptions) (\s@ExecuteStatement' {} a -> s {resultSetOptions = a} :: ExecuteStatement)++-- | The name of the database schema.+--+-- Currently, the @schema@ parameter isn\'t supported.+executeStatement_schema :: Lens.Lens' ExecuteStatement (Prelude.Maybe Prelude.Text)+executeStatement_schema = Lens.lens (\ExecuteStatement' {schema} -> schema) (\s@ExecuteStatement' {} a -> s {schema = a} :: ExecuteStatement)++-- | The identifier of a transaction that was started by using the+-- @BeginTransaction@ operation. Specify the transaction ID of the+-- transaction that you want to include the SQL statement in.+--+-- If the SQL statement is not part of a transaction, don\'t set this+-- parameter.+executeStatement_transactionId :: Lens.Lens' ExecuteStatement (Prelude.Maybe Prelude.Text)+executeStatement_transactionId = Lens.lens (\ExecuteStatement' {transactionId} -> transactionId) (\s@ExecuteStatement' {} a -> s {transactionId = a} :: ExecuteStatement)++-- | The Amazon Resource Name (ARN) of the Aurora Serverless DB cluster.+executeStatement_resourceArn :: Lens.Lens' ExecuteStatement Prelude.Text+executeStatement_resourceArn = Lens.lens (\ExecuteStatement' {resourceArn} -> resourceArn) (\s@ExecuteStatement' {} a -> s {resourceArn = a} :: ExecuteStatement)++-- | The ARN of the secret that enables access to the DB cluster. Enter the+-- database user name and password for the credentials in the secret.+--+-- For information about creating the secret, see+-- <https://docs.aws.amazon.com/secretsmanager/latest/userguide/create_database_secret.html Create a database secret>.+executeStatement_secretArn :: Lens.Lens' ExecuteStatement Prelude.Text+executeStatement_secretArn = Lens.lens (\ExecuteStatement' {secretArn} -> secretArn) (\s@ExecuteStatement' {} a -> s {secretArn = a} :: ExecuteStatement)++-- | The SQL statement to run.+executeStatement_sql :: Lens.Lens' ExecuteStatement Prelude.Text+executeStatement_sql = Lens.lens (\ExecuteStatement' {sql} -> sql) (\s@ExecuteStatement' {} a -> s {sql = a} :: ExecuteStatement)++instance Core.AWSRequest ExecuteStatement where+  type+    AWSResponse ExecuteStatement =+      ExecuteStatementResponse+  request overrides =+    Request.postJSON (overrides defaultService)+  response =+    Response.receiveJSON+      ( \s h x ->+          ExecuteStatementResponse'+            Prelude.<$> (x Data..?> "columnMetadata" Core..!@ Prelude.mempty)+            Prelude.<*> (x Data..?> "formattedRecords")+            Prelude.<*> ( x+                            Data..?> "generatedFields"+                            Core..!@ Prelude.mempty+                        )+            Prelude.<*> (x Data..?> "numberOfRecordsUpdated")+            Prelude.<*> (x Data..?> "records" Core..!@ Prelude.mempty)+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+      )++instance Prelude.Hashable ExecuteStatement where+  hashWithSalt _salt ExecuteStatement' {..} =+    _salt+      `Prelude.hashWithSalt` continueAfterTimeout+      `Prelude.hashWithSalt` database+      `Prelude.hashWithSalt` formatRecordsAs+      `Prelude.hashWithSalt` includeResultMetadata+      `Prelude.hashWithSalt` parameters+      `Prelude.hashWithSalt` resultSetOptions+      `Prelude.hashWithSalt` schema+      `Prelude.hashWithSalt` transactionId+      `Prelude.hashWithSalt` resourceArn+      `Prelude.hashWithSalt` secretArn+      `Prelude.hashWithSalt` sql++instance Prelude.NFData ExecuteStatement where+  rnf ExecuteStatement' {..} =+    Prelude.rnf continueAfterTimeout+      `Prelude.seq` Prelude.rnf database+      `Prelude.seq` Prelude.rnf formatRecordsAs+      `Prelude.seq` Prelude.rnf includeResultMetadata+      `Prelude.seq` Prelude.rnf parameters+      `Prelude.seq` Prelude.rnf resultSetOptions+      `Prelude.seq` Prelude.rnf schema+      `Prelude.seq` Prelude.rnf transactionId+      `Prelude.seq` Prelude.rnf resourceArn+      `Prelude.seq` Prelude.rnf secretArn+      `Prelude.seq` Prelude.rnf sql++instance Data.ToHeaders ExecuteStatement where+  toHeaders =+    Prelude.const+      ( Prelude.mconcat+          [ "Content-Type"+              Data.=# ( "application/x-amz-json-1.1" ::+                          Prelude.ByteString+                      )+          ]+      )++instance Data.ToJSON ExecuteStatement where+  toJSON ExecuteStatement' {..} =+    Data.object+      ( Prelude.catMaybes+          [ ("continueAfterTimeout" Data..=)+              Prelude.<$> continueAfterTimeout,+            ("database" Data..=) Prelude.<$> database,+            ("formatRecordsAs" Data..=)+              Prelude.<$> formatRecordsAs,+            ("includeResultMetadata" Data..=)+              Prelude.<$> includeResultMetadata,+            ("parameters" Data..=) Prelude.<$> parameters,+            ("resultSetOptions" Data..=)+              Prelude.<$> resultSetOptions,+            ("schema" Data..=) Prelude.<$> schema,+            ("transactionId" Data..=) Prelude.<$> transactionId,+            Prelude.Just ("resourceArn" Data..= resourceArn),+            Prelude.Just ("secretArn" Data..= secretArn),+            Prelude.Just ("sql" Data..= sql)+          ]+      )++instance Data.ToPath ExecuteStatement where+  toPath = Prelude.const "/Execute"++instance Data.ToQuery ExecuteStatement where+  toQuery = Prelude.const Prelude.mempty++-- | The response elements represent the output of a request to run a SQL+-- statement against a database.+--+-- /See:/ 'newExecuteStatementResponse' smart constructor.+data ExecuteStatementResponse = ExecuteStatementResponse'+  { -- | Metadata for the columns included in the results. This field is blank if+    -- the @formatRecordsAs@ parameter is set to @JSON@.+    columnMetadata :: Prelude.Maybe [ColumnMetadata],+    -- | A string value that represents the result set of a @SELECT@ statement in+    -- JSON format. This value is only present when the @formatRecordsAs@+    -- parameter is set to @JSON@.+    --+    -- The size limit for this field is currently 10 MB. If the JSON-formatted+    -- string representing the result set requires more than 10 MB, the call+    -- returns an error.+    formattedRecords :: Prelude.Maybe Prelude.Text,+    -- | Values for fields generated during a DML request.+    --+    -- >  <note> <p>The <code>generatedFields</code> data isn't supported by Aurora PostgreSQL. To get the values of generated fields, use the <code>RETURNING</code> clause. For more information, see <a href="https://www.postgresql.org/docs/10/dml-returning.html">Returning Data From Modified Rows</a> in the PostgreSQL documentation.</p> </note>+    generatedFields :: Prelude.Maybe [Field],+    -- | The number of records updated by the request.+    numberOfRecordsUpdated :: Prelude.Maybe Prelude.Integer,+    -- | The records returned by the SQL statement. This field is blank if the+    -- @formatRecordsAs@ parameter is set to @JSON@.+    records :: Prelude.Maybe [[Field]],+    -- | The response's http status code.+    httpStatus :: Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ExecuteStatementResponse' 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:+--+-- 'columnMetadata', 'executeStatementResponse_columnMetadata' - Metadata for the columns included in the results. This field is blank if+-- the @formatRecordsAs@ parameter is set to @JSON@.+--+-- 'formattedRecords', 'executeStatementResponse_formattedRecords' - A string value that represents the result set of a @SELECT@ statement in+-- JSON format. This value is only present when the @formatRecordsAs@+-- parameter is set to @JSON@.+--+-- The size limit for this field is currently 10 MB. If the JSON-formatted+-- string representing the result set requires more than 10 MB, the call+-- returns an error.+--+-- 'generatedFields', 'executeStatementResponse_generatedFields' - Values for fields generated during a DML request.+--+-- >  <note> <p>The <code>generatedFields</code> data isn't supported by Aurora PostgreSQL. To get the values of generated fields, use the <code>RETURNING</code> clause. For more information, see <a href="https://www.postgresql.org/docs/10/dml-returning.html">Returning Data From Modified Rows</a> in the PostgreSQL documentation.</p> </note>+--+-- 'numberOfRecordsUpdated', 'executeStatementResponse_numberOfRecordsUpdated' - The number of records updated by the request.+--+-- 'records', 'executeStatementResponse_records' - The records returned by the SQL statement. This field is blank if the+-- @formatRecordsAs@ parameter is set to @JSON@.+--+-- 'httpStatus', 'executeStatementResponse_httpStatus' - The response's http status code.+newExecuteStatementResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  ExecuteStatementResponse+newExecuteStatementResponse pHttpStatus_ =+  ExecuteStatementResponse'+    { columnMetadata =+        Prelude.Nothing,+      formattedRecords = Prelude.Nothing,+      generatedFields = Prelude.Nothing,+      numberOfRecordsUpdated = Prelude.Nothing,+      records = Prelude.Nothing,+      httpStatus = pHttpStatus_+    }++-- | Metadata for the columns included in the results. This field is blank if+-- the @formatRecordsAs@ parameter is set to @JSON@.+executeStatementResponse_columnMetadata :: Lens.Lens' ExecuteStatementResponse (Prelude.Maybe [ColumnMetadata])+executeStatementResponse_columnMetadata = Lens.lens (\ExecuteStatementResponse' {columnMetadata} -> columnMetadata) (\s@ExecuteStatementResponse' {} a -> s {columnMetadata = a} :: ExecuteStatementResponse) Prelude.. Lens.mapping Lens.coerced++-- | A string value that represents the result set of a @SELECT@ statement in+-- JSON format. This value is only present when the @formatRecordsAs@+-- parameter is set to @JSON@.+--+-- The size limit for this field is currently 10 MB. If the JSON-formatted+-- string representing the result set requires more than 10 MB, the call+-- returns an error.+executeStatementResponse_formattedRecords :: Lens.Lens' ExecuteStatementResponse (Prelude.Maybe Prelude.Text)+executeStatementResponse_formattedRecords = Lens.lens (\ExecuteStatementResponse' {formattedRecords} -> formattedRecords) (\s@ExecuteStatementResponse' {} a -> s {formattedRecords = a} :: ExecuteStatementResponse)++-- | Values for fields generated during a DML request.+--+-- >  <note> <p>The <code>generatedFields</code> data isn't supported by Aurora PostgreSQL. To get the values of generated fields, use the <code>RETURNING</code> clause. For more information, see <a href="https://www.postgresql.org/docs/10/dml-returning.html">Returning Data From Modified Rows</a> in the PostgreSQL documentation.</p> </note>+executeStatementResponse_generatedFields :: Lens.Lens' ExecuteStatementResponse (Prelude.Maybe [Field])+executeStatementResponse_generatedFields = Lens.lens (\ExecuteStatementResponse' {generatedFields} -> generatedFields) (\s@ExecuteStatementResponse' {} a -> s {generatedFields = a} :: ExecuteStatementResponse) Prelude.. Lens.mapping Lens.coerced++-- | The number of records updated by the request.+executeStatementResponse_numberOfRecordsUpdated :: Lens.Lens' ExecuteStatementResponse (Prelude.Maybe Prelude.Integer)+executeStatementResponse_numberOfRecordsUpdated = Lens.lens (\ExecuteStatementResponse' {numberOfRecordsUpdated} -> numberOfRecordsUpdated) (\s@ExecuteStatementResponse' {} a -> s {numberOfRecordsUpdated = a} :: ExecuteStatementResponse)++-- | The records returned by the SQL statement. This field is blank if the+-- @formatRecordsAs@ parameter is set to @JSON@.+executeStatementResponse_records :: Lens.Lens' ExecuteStatementResponse (Prelude.Maybe [[Field]])+executeStatementResponse_records = Lens.lens (\ExecuteStatementResponse' {records} -> records) (\s@ExecuteStatementResponse' {} a -> s {records = a} :: ExecuteStatementResponse) Prelude.. Lens.mapping Lens.coerced++-- | The response's http status code.+executeStatementResponse_httpStatus :: Lens.Lens' ExecuteStatementResponse Prelude.Int+executeStatementResponse_httpStatus = Lens.lens (\ExecuteStatementResponse' {httpStatus} -> httpStatus) (\s@ExecuteStatementResponse' {} a -> s {httpStatus = a} :: ExecuteStatementResponse)++instance Prelude.NFData ExecuteStatementResponse where+  rnf ExecuteStatementResponse' {..} =+    Prelude.rnf columnMetadata+      `Prelude.seq` Prelude.rnf formattedRecords+      `Prelude.seq` Prelude.rnf generatedFields+      `Prelude.seq` Prelude.rnf numberOfRecordsUpdated+      `Prelude.seq` Prelude.rnf records+      `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/RDSData/Lens.hs view
@@ -0,0 +1,127 @@+{-# 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.RDSData.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.RDSData.Lens+  ( -- * Operations++    -- ** BatchExecuteStatement+    batchExecuteStatement_database,+    batchExecuteStatement_parameterSets,+    batchExecuteStatement_schema,+    batchExecuteStatement_transactionId,+    batchExecuteStatement_resourceArn,+    batchExecuteStatement_secretArn,+    batchExecuteStatement_sql,+    batchExecuteStatementResponse_updateResults,+    batchExecuteStatementResponse_httpStatus,++    -- ** BeginTransaction+    beginTransaction_database,+    beginTransaction_schema,+    beginTransaction_resourceArn,+    beginTransaction_secretArn,+    beginTransactionResponse_transactionId,+    beginTransactionResponse_httpStatus,++    -- ** CommitTransaction+    commitTransaction_resourceArn,+    commitTransaction_secretArn,+    commitTransaction_transactionId,+    commitTransactionResponse_transactionStatus,+    commitTransactionResponse_httpStatus,++    -- ** ExecuteStatement+    executeStatement_continueAfterTimeout,+    executeStatement_database,+    executeStatement_formatRecordsAs,+    executeStatement_includeResultMetadata,+    executeStatement_parameters,+    executeStatement_resultSetOptions,+    executeStatement_schema,+    executeStatement_transactionId,+    executeStatement_resourceArn,+    executeStatement_secretArn,+    executeStatement_sql,+    executeStatementResponse_columnMetadata,+    executeStatementResponse_formattedRecords,+    executeStatementResponse_generatedFields,+    executeStatementResponse_numberOfRecordsUpdated,+    executeStatementResponse_records,+    executeStatementResponse_httpStatus,++    -- ** RollbackTransaction+    rollbackTransaction_resourceArn,+    rollbackTransaction_secretArn,+    rollbackTransaction_transactionId,+    rollbackTransactionResponse_transactionStatus,+    rollbackTransactionResponse_httpStatus,++    -- * Types++    -- ** ArrayValue+    arrayValue_arrayValues,+    arrayValue_booleanValues,+    arrayValue_doubleValues,+    arrayValue_longValues,+    arrayValue_stringValues,++    -- ** ColumnMetadata+    columnMetadata_arrayBaseColumnType,+    columnMetadata_isAutoIncrement,+    columnMetadata_isCaseSensitive,+    columnMetadata_isCurrency,+    columnMetadata_isSigned,+    columnMetadata_label,+    columnMetadata_name,+    columnMetadata_nullable,+    columnMetadata_precision,+    columnMetadata_scale,+    columnMetadata_schemaName,+    columnMetadata_tableName,+    columnMetadata_type,+    columnMetadata_typeName,++    -- ** Field+    field_arrayValue,+    field_blobValue,+    field_booleanValue,+    field_doubleValue,+    field_isNull,+    field_longValue,+    field_stringValue,++    -- ** ResultSetOptions+    resultSetOptions_decimalReturnType,+    resultSetOptions_longReturnType,++    -- ** SqlParameter+    sqlParameter_name,+    sqlParameter_typeHint,+    sqlParameter_value,++    -- ** UpdateResult+    updateResult_generatedFields,+  )+where++import Amazonka.RDSData.BatchExecuteStatement+import Amazonka.RDSData.BeginTransaction+import Amazonka.RDSData.CommitTransaction+import Amazonka.RDSData.ExecuteStatement+import Amazonka.RDSData.RollbackTransaction+import Amazonka.RDSData.Types.ArrayValue+import Amazonka.RDSData.Types.ColumnMetadata+import Amazonka.RDSData.Types.Field+import Amazonka.RDSData.Types.ResultSetOptions+import Amazonka.RDSData.Types.SqlParameter+import Amazonka.RDSData.Types.UpdateResult
+ gen/Amazonka/RDSData/RollbackTransaction.hs view
@@ -0,0 +1,210 @@+{-# 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.RDSData.RollbackTransaction+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Performs a rollback of a transaction. Rolling back a transaction cancels+-- its changes.+module Amazonka.RDSData.RollbackTransaction+  ( -- * Creating a Request+    RollbackTransaction (..),+    newRollbackTransaction,++    -- * Request Lenses+    rollbackTransaction_resourceArn,+    rollbackTransaction_secretArn,+    rollbackTransaction_transactionId,++    -- * Destructuring the Response+    RollbackTransactionResponse (..),+    newRollbackTransactionResponse,++    -- * Response Lenses+    rollbackTransactionResponse_transactionStatus,+    rollbackTransactionResponse_httpStatus,+  )+where++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 Amazonka.RDSData.Types+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | The request parameters represent the input of a request to perform a+-- rollback of a transaction.+--+-- /See:/ 'newRollbackTransaction' smart constructor.+data RollbackTransaction = RollbackTransaction'+  { -- | The Amazon Resource Name (ARN) of the Aurora Serverless DB cluster.+    resourceArn :: Prelude.Text,+    -- | The name or ARN of the secret that enables access to the DB cluster.+    secretArn :: Prelude.Text,+    -- | The identifier of the transaction to roll back.+    transactionId :: Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'RollbackTransaction' 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:+--+-- 'resourceArn', 'rollbackTransaction_resourceArn' - The Amazon Resource Name (ARN) of the Aurora Serverless DB cluster.+--+-- 'secretArn', 'rollbackTransaction_secretArn' - The name or ARN of the secret that enables access to the DB cluster.+--+-- 'transactionId', 'rollbackTransaction_transactionId' - The identifier of the transaction to roll back.+newRollbackTransaction ::+  -- | 'resourceArn'+  Prelude.Text ->+  -- | 'secretArn'+  Prelude.Text ->+  -- | 'transactionId'+  Prelude.Text ->+  RollbackTransaction+newRollbackTransaction+  pResourceArn_+  pSecretArn_+  pTransactionId_ =+    RollbackTransaction'+      { resourceArn = pResourceArn_,+        secretArn = pSecretArn_,+        transactionId = pTransactionId_+      }++-- | The Amazon Resource Name (ARN) of the Aurora Serverless DB cluster.+rollbackTransaction_resourceArn :: Lens.Lens' RollbackTransaction Prelude.Text+rollbackTransaction_resourceArn = Lens.lens (\RollbackTransaction' {resourceArn} -> resourceArn) (\s@RollbackTransaction' {} a -> s {resourceArn = a} :: RollbackTransaction)++-- | The name or ARN of the secret that enables access to the DB cluster.+rollbackTransaction_secretArn :: Lens.Lens' RollbackTransaction Prelude.Text+rollbackTransaction_secretArn = Lens.lens (\RollbackTransaction' {secretArn} -> secretArn) (\s@RollbackTransaction' {} a -> s {secretArn = a} :: RollbackTransaction)++-- | The identifier of the transaction to roll back.+rollbackTransaction_transactionId :: Lens.Lens' RollbackTransaction Prelude.Text+rollbackTransaction_transactionId = Lens.lens (\RollbackTransaction' {transactionId} -> transactionId) (\s@RollbackTransaction' {} a -> s {transactionId = a} :: RollbackTransaction)++instance Core.AWSRequest RollbackTransaction where+  type+    AWSResponse RollbackTransaction =+      RollbackTransactionResponse+  request overrides =+    Request.postJSON (overrides defaultService)+  response =+    Response.receiveJSON+      ( \s h x ->+          RollbackTransactionResponse'+            Prelude.<$> (x Data..?> "transactionStatus")+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+      )++instance Prelude.Hashable RollbackTransaction where+  hashWithSalt _salt RollbackTransaction' {..} =+    _salt+      `Prelude.hashWithSalt` resourceArn+      `Prelude.hashWithSalt` secretArn+      `Prelude.hashWithSalt` transactionId++instance Prelude.NFData RollbackTransaction where+  rnf RollbackTransaction' {..} =+    Prelude.rnf resourceArn+      `Prelude.seq` Prelude.rnf secretArn+      `Prelude.seq` Prelude.rnf transactionId++instance Data.ToHeaders RollbackTransaction where+  toHeaders =+    Prelude.const+      ( Prelude.mconcat+          [ "Content-Type"+              Data.=# ( "application/x-amz-json-1.1" ::+                          Prelude.ByteString+                      )+          ]+      )++instance Data.ToJSON RollbackTransaction where+  toJSON RollbackTransaction' {..} =+    Data.object+      ( Prelude.catMaybes+          [ Prelude.Just ("resourceArn" Data..= resourceArn),+            Prelude.Just ("secretArn" Data..= secretArn),+            Prelude.Just+              ("transactionId" Data..= transactionId)+          ]+      )++instance Data.ToPath RollbackTransaction where+  toPath = Prelude.const "/RollbackTransaction"++instance Data.ToQuery RollbackTransaction where+  toQuery = Prelude.const Prelude.mempty++-- | The response elements represent the output of a request to perform a+-- rollback of a transaction.+--+-- /See:/ 'newRollbackTransactionResponse' smart constructor.+data RollbackTransactionResponse = RollbackTransactionResponse'+  { -- | The status of the rollback operation.+    transactionStatus :: Prelude.Maybe Prelude.Text,+    -- | The response's http status code.+    httpStatus :: Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'RollbackTransactionResponse' 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:+--+-- 'transactionStatus', 'rollbackTransactionResponse_transactionStatus' - The status of the rollback operation.+--+-- 'httpStatus', 'rollbackTransactionResponse_httpStatus' - The response's http status code.+newRollbackTransactionResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  RollbackTransactionResponse+newRollbackTransactionResponse pHttpStatus_ =+  RollbackTransactionResponse'+    { transactionStatus =+        Prelude.Nothing,+      httpStatus = pHttpStatus_+    }++-- | The status of the rollback operation.+rollbackTransactionResponse_transactionStatus :: Lens.Lens' RollbackTransactionResponse (Prelude.Maybe Prelude.Text)+rollbackTransactionResponse_transactionStatus = Lens.lens (\RollbackTransactionResponse' {transactionStatus} -> transactionStatus) (\s@RollbackTransactionResponse' {} a -> s {transactionStatus = a} :: RollbackTransactionResponse)++-- | The response's http status code.+rollbackTransactionResponse_httpStatus :: Lens.Lens' RollbackTransactionResponse Prelude.Int+rollbackTransactionResponse_httpStatus = Lens.lens (\RollbackTransactionResponse' {httpStatus} -> httpStatus) (\s@RollbackTransactionResponse' {} a -> s {httpStatus = a} :: RollbackTransactionResponse)++instance Prelude.NFData RollbackTransactionResponse where+  rnf RollbackTransactionResponse' {..} =+    Prelude.rnf transactionStatus+      `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/RDSData/Types.hs view
@@ -0,0 +1,239 @@+{-# 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.RDSData.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.RDSData.Types+  ( -- * Service Configuration+    defaultService,++    -- * Errors+    _AccessDeniedException,+    _BadRequestException,+    _ForbiddenException,+    _InternalServerErrorException,+    _NotFoundException,+    _ServiceUnavailableError,+    _StatementTimeoutException,++    -- * DecimalReturnType+    DecimalReturnType (..),++    -- * LongReturnType+    LongReturnType (..),++    -- * RecordsFormatType+    RecordsFormatType (..),++    -- * TypeHint+    TypeHint (..),++    -- * ArrayValue+    ArrayValue (..),+    newArrayValue,+    arrayValue_arrayValues,+    arrayValue_booleanValues,+    arrayValue_doubleValues,+    arrayValue_longValues,+    arrayValue_stringValues,++    -- * ColumnMetadata+    ColumnMetadata (..),+    newColumnMetadata,+    columnMetadata_arrayBaseColumnType,+    columnMetadata_isAutoIncrement,+    columnMetadata_isCaseSensitive,+    columnMetadata_isCurrency,+    columnMetadata_isSigned,+    columnMetadata_label,+    columnMetadata_name,+    columnMetadata_nullable,+    columnMetadata_precision,+    columnMetadata_scale,+    columnMetadata_schemaName,+    columnMetadata_tableName,+    columnMetadata_type,+    columnMetadata_typeName,++    -- * Field+    Field (..),+    newField,+    field_arrayValue,+    field_blobValue,+    field_booleanValue,+    field_doubleValue,+    field_isNull,+    field_longValue,+    field_stringValue,++    -- * ResultSetOptions+    ResultSetOptions (..),+    newResultSetOptions,+    resultSetOptions_decimalReturnType,+    resultSetOptions_longReturnType,++    -- * SqlParameter+    SqlParameter (..),+    newSqlParameter,+    sqlParameter_name,+    sqlParameter_typeHint,+    sqlParameter_value,++    -- * UpdateResult+    UpdateResult (..),+    newUpdateResult,+    updateResult_generatedFields,+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Prelude as Prelude+import Amazonka.RDSData.Types.ArrayValue+import Amazonka.RDSData.Types.ColumnMetadata+import Amazonka.RDSData.Types.DecimalReturnType+import Amazonka.RDSData.Types.Field+import Amazonka.RDSData.Types.LongReturnType+import Amazonka.RDSData.Types.RecordsFormatType+import Amazonka.RDSData.Types.ResultSetOptions+import Amazonka.RDSData.Types.SqlParameter+import Amazonka.RDSData.Types.TypeHint+import Amazonka.RDSData.Types.UpdateResult+import qualified Amazonka.Sign.V4 as Sign++-- | API version @2018-08-01@ of the Amazon RDS DataService SDK configuration.+defaultService :: Core.Service+defaultService =+  Core.Service+    { Core.abbrev = "RDSData",+      Core.signer = Sign.v4,+      Core.endpointPrefix = "rds-data",+      Core.signingName = "rds-data",+      Core.version = "2018-08-01",+      Core.s3AddressingStyle = Core.S3AddressingStyleAuto,+      Core.endpoint = Core.defaultEndpoint defaultService,+      Core.timeout = Prelude.Just 70,+      Core.check = Core.statusSuccess,+      Core.error = Core.parseJSONError "RDSData",+      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++-- | You do not have sufficient access to perform this action.+_AccessDeniedException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_AccessDeniedException =+  Core._MatchServiceError+    defaultService+    "AccessDeniedException"+    Prelude.. Core.hasStatus 403++-- | There is an error in the call or in a SQL statement.+_BadRequestException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_BadRequestException =+  Core._MatchServiceError+    defaultService+    "BadRequestException"+    Prelude.. Core.hasStatus 400++-- | There are insufficient privileges to make the call.+_ForbiddenException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_ForbiddenException =+  Core._MatchServiceError+    defaultService+    "ForbiddenException"+    Prelude.. Core.hasStatus 403++-- | An internal error occurred.+_InternalServerErrorException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_InternalServerErrorException =+  Core._MatchServiceError+    defaultService+    "InternalServerErrorException"+    Prelude.. Core.hasStatus 500++-- | The @resourceArn@, @secretArn@, or @transactionId@ value can\'t be+-- found.+_NotFoundException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_NotFoundException =+  Core._MatchServiceError+    defaultService+    "NotFoundException"+    Prelude.. Core.hasStatus 404++-- | The service specified by the @resourceArn@ parameter is not available.+_ServiceUnavailableError :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_ServiceUnavailableError =+  Core._MatchServiceError+    defaultService+    "ServiceUnavailableError"+    Prelude.. Core.hasStatus 503++-- | The execution of the SQL statement timed out.+_StatementTimeoutException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_StatementTimeoutException =+  Core._MatchServiceError+    defaultService+    "StatementTimeoutException"+    Prelude.. Core.hasStatus 400
+ gen/Amazonka/RDSData/Types/ArrayValue.hs view
@@ -0,0 +1,132 @@+{-# 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.RDSData.Types.ArrayValue+-- 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.RDSData.Types.ArrayValue where++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++-- | Contains an array.+--+-- /See:/ 'newArrayValue' smart constructor.+data ArrayValue = ArrayValue'+  { -- | An array of arrays.+    arrayValues :: Prelude.Maybe [ArrayValue],+    -- | An array of Boolean values.+    booleanValues :: Prelude.Maybe [Prelude.Bool],+    -- | An array of floating-point numbers.+    doubleValues :: Prelude.Maybe [Prelude.Double],+    -- | An array of integers.+    longValues :: Prelude.Maybe [Prelude.Integer],+    -- | An array of strings.+    stringValues :: Prelude.Maybe [Prelude.Text]+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ArrayValue' 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:+--+-- 'arrayValues', 'arrayValue_arrayValues' - An array of arrays.+--+-- 'booleanValues', 'arrayValue_booleanValues' - An array of Boolean values.+--+-- 'doubleValues', 'arrayValue_doubleValues' - An array of floating-point numbers.+--+-- 'longValues', 'arrayValue_longValues' - An array of integers.+--+-- 'stringValues', 'arrayValue_stringValues' - An array of strings.+newArrayValue ::+  ArrayValue+newArrayValue =+  ArrayValue'+    { arrayValues = Prelude.Nothing,+      booleanValues = Prelude.Nothing,+      doubleValues = Prelude.Nothing,+      longValues = Prelude.Nothing,+      stringValues = Prelude.Nothing+    }++-- | An array of arrays.+arrayValue_arrayValues :: Lens.Lens' ArrayValue (Prelude.Maybe [ArrayValue])+arrayValue_arrayValues = Lens.lens (\ArrayValue' {arrayValues} -> arrayValues) (\s@ArrayValue' {} a -> s {arrayValues = a} :: ArrayValue) Prelude.. Lens.mapping Lens.coerced++-- | An array of Boolean values.+arrayValue_booleanValues :: Lens.Lens' ArrayValue (Prelude.Maybe [Prelude.Bool])+arrayValue_booleanValues = Lens.lens (\ArrayValue' {booleanValues} -> booleanValues) (\s@ArrayValue' {} a -> s {booleanValues = a} :: ArrayValue) Prelude.. Lens.mapping Lens.coerced++-- | An array of floating-point numbers.+arrayValue_doubleValues :: Lens.Lens' ArrayValue (Prelude.Maybe [Prelude.Double])+arrayValue_doubleValues = Lens.lens (\ArrayValue' {doubleValues} -> doubleValues) (\s@ArrayValue' {} a -> s {doubleValues = a} :: ArrayValue) Prelude.. Lens.mapping Lens.coerced++-- | An array of integers.+arrayValue_longValues :: Lens.Lens' ArrayValue (Prelude.Maybe [Prelude.Integer])+arrayValue_longValues = Lens.lens (\ArrayValue' {longValues} -> longValues) (\s@ArrayValue' {} a -> s {longValues = a} :: ArrayValue) Prelude.. Lens.mapping Lens.coerced++-- | An array of strings.+arrayValue_stringValues :: Lens.Lens' ArrayValue (Prelude.Maybe [Prelude.Text])+arrayValue_stringValues = Lens.lens (\ArrayValue' {stringValues} -> stringValues) (\s@ArrayValue' {} a -> s {stringValues = a} :: ArrayValue) Prelude.. Lens.mapping Lens.coerced++instance Data.FromJSON ArrayValue where+  parseJSON =+    Data.withObject+      "ArrayValue"+      ( \x ->+          ArrayValue'+            Prelude.<$> (x Data..:? "arrayValues" Data..!= Prelude.mempty)+            Prelude.<*> (x Data..:? "booleanValues" Data..!= Prelude.mempty)+            Prelude.<*> (x Data..:? "doubleValues" Data..!= Prelude.mempty)+            Prelude.<*> (x Data..:? "longValues" Data..!= Prelude.mempty)+            Prelude.<*> (x Data..:? "stringValues" Data..!= Prelude.mempty)+      )++instance Prelude.Hashable ArrayValue where+  hashWithSalt _salt ArrayValue' {..} =+    _salt+      `Prelude.hashWithSalt` arrayValues+      `Prelude.hashWithSalt` booleanValues+      `Prelude.hashWithSalt` doubleValues+      `Prelude.hashWithSalt` longValues+      `Prelude.hashWithSalt` stringValues++instance Prelude.NFData ArrayValue where+  rnf ArrayValue' {..} =+    Prelude.rnf arrayValues+      `Prelude.seq` Prelude.rnf booleanValues+      `Prelude.seq` Prelude.rnf doubleValues+      `Prelude.seq` Prelude.rnf longValues+      `Prelude.seq` Prelude.rnf stringValues++instance Data.ToJSON ArrayValue where+  toJSON ArrayValue' {..} =+    Data.object+      ( Prelude.catMaybes+          [ ("arrayValues" Data..=) Prelude.<$> arrayValues,+            ("booleanValues" Data..=) Prelude.<$> booleanValues,+            ("doubleValues" Data..=) Prelude.<$> doubleValues,+            ("longValues" Data..=) Prelude.<$> longValues,+            ("stringValues" Data..=) Prelude.<$> stringValues+          ]+      )
+ gen/Amazonka/RDSData/Types/ColumnMetadata.hs view
@@ -0,0 +1,229 @@+{-# 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.RDSData.Types.ColumnMetadata+-- 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.RDSData.Types.ColumnMetadata where++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++-- | Contains the metadata for a column.+--+-- /See:/ 'newColumnMetadata' smart constructor.+data ColumnMetadata = ColumnMetadata'+  { -- | The type of the column.+    arrayBaseColumnType :: Prelude.Maybe Prelude.Int,+    -- | A value that indicates whether the column increments automatically.+    isAutoIncrement :: Prelude.Maybe Prelude.Bool,+    -- | A value that indicates whether the column is case-sensitive.+    isCaseSensitive :: Prelude.Maybe Prelude.Bool,+    -- | A value that indicates whether the column contains currency values.+    isCurrency :: Prelude.Maybe Prelude.Bool,+    -- | A value that indicates whether an integer column is signed.+    isSigned :: Prelude.Maybe Prelude.Bool,+    -- | The label for the column.+    label :: Prelude.Maybe Prelude.Text,+    -- | The name of the column.+    name :: Prelude.Maybe Prelude.Text,+    -- | A value that indicates whether the column is nullable.+    nullable :: Prelude.Maybe Prelude.Int,+    -- | The precision value of a decimal number column.+    precision :: Prelude.Maybe Prelude.Int,+    -- | The scale value of a decimal number column.+    scale :: Prelude.Maybe Prelude.Int,+    -- | The name of the schema that owns the table that includes the column.+    schemaName :: Prelude.Maybe Prelude.Text,+    -- | The name of the table that includes the column.+    tableName :: Prelude.Maybe Prelude.Text,+    -- | The type of the column.+    type' :: Prelude.Maybe Prelude.Int,+    -- | The database-specific data type of the column.+    typeName :: Prelude.Maybe Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ColumnMetadata' 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:+--+-- 'arrayBaseColumnType', 'columnMetadata_arrayBaseColumnType' - The type of the column.+--+-- 'isAutoIncrement', 'columnMetadata_isAutoIncrement' - A value that indicates whether the column increments automatically.+--+-- 'isCaseSensitive', 'columnMetadata_isCaseSensitive' - A value that indicates whether the column is case-sensitive.+--+-- 'isCurrency', 'columnMetadata_isCurrency' - A value that indicates whether the column contains currency values.+--+-- 'isSigned', 'columnMetadata_isSigned' - A value that indicates whether an integer column is signed.+--+-- 'label', 'columnMetadata_label' - The label for the column.+--+-- 'name', 'columnMetadata_name' - The name of the column.+--+-- 'nullable', 'columnMetadata_nullable' - A value that indicates whether the column is nullable.+--+-- 'precision', 'columnMetadata_precision' - The precision value of a decimal number column.+--+-- 'scale', 'columnMetadata_scale' - The scale value of a decimal number column.+--+-- 'schemaName', 'columnMetadata_schemaName' - The name of the schema that owns the table that includes the column.+--+-- 'tableName', 'columnMetadata_tableName' - The name of the table that includes the column.+--+-- 'type'', 'columnMetadata_type' - The type of the column.+--+-- 'typeName', 'columnMetadata_typeName' - The database-specific data type of the column.+newColumnMetadata ::+  ColumnMetadata+newColumnMetadata =+  ColumnMetadata'+    { arrayBaseColumnType =+        Prelude.Nothing,+      isAutoIncrement = Prelude.Nothing,+      isCaseSensitive = Prelude.Nothing,+      isCurrency = Prelude.Nothing,+      isSigned = Prelude.Nothing,+      label = Prelude.Nothing,+      name = Prelude.Nothing,+      nullable = Prelude.Nothing,+      precision = Prelude.Nothing,+      scale = Prelude.Nothing,+      schemaName = Prelude.Nothing,+      tableName = Prelude.Nothing,+      type' = Prelude.Nothing,+      typeName = Prelude.Nothing+    }++-- | The type of the column.+columnMetadata_arrayBaseColumnType :: Lens.Lens' ColumnMetadata (Prelude.Maybe Prelude.Int)+columnMetadata_arrayBaseColumnType = Lens.lens (\ColumnMetadata' {arrayBaseColumnType} -> arrayBaseColumnType) (\s@ColumnMetadata' {} a -> s {arrayBaseColumnType = a} :: ColumnMetadata)++-- | A value that indicates whether the column increments automatically.+columnMetadata_isAutoIncrement :: Lens.Lens' ColumnMetadata (Prelude.Maybe Prelude.Bool)+columnMetadata_isAutoIncrement = Lens.lens (\ColumnMetadata' {isAutoIncrement} -> isAutoIncrement) (\s@ColumnMetadata' {} a -> s {isAutoIncrement = a} :: ColumnMetadata)++-- | A value that indicates whether the column is case-sensitive.+columnMetadata_isCaseSensitive :: Lens.Lens' ColumnMetadata (Prelude.Maybe Prelude.Bool)+columnMetadata_isCaseSensitive = Lens.lens (\ColumnMetadata' {isCaseSensitive} -> isCaseSensitive) (\s@ColumnMetadata' {} a -> s {isCaseSensitive = a} :: ColumnMetadata)++-- | A value that indicates whether the column contains currency values.+columnMetadata_isCurrency :: Lens.Lens' ColumnMetadata (Prelude.Maybe Prelude.Bool)+columnMetadata_isCurrency = Lens.lens (\ColumnMetadata' {isCurrency} -> isCurrency) (\s@ColumnMetadata' {} a -> s {isCurrency = a} :: ColumnMetadata)++-- | A value that indicates whether an integer column is signed.+columnMetadata_isSigned :: Lens.Lens' ColumnMetadata (Prelude.Maybe Prelude.Bool)+columnMetadata_isSigned = Lens.lens (\ColumnMetadata' {isSigned} -> isSigned) (\s@ColumnMetadata' {} a -> s {isSigned = a} :: ColumnMetadata)++-- | The label for the column.+columnMetadata_label :: Lens.Lens' ColumnMetadata (Prelude.Maybe Prelude.Text)+columnMetadata_label = Lens.lens (\ColumnMetadata' {label} -> label) (\s@ColumnMetadata' {} a -> s {label = a} :: ColumnMetadata)++-- | The name of the column.+columnMetadata_name :: Lens.Lens' ColumnMetadata (Prelude.Maybe Prelude.Text)+columnMetadata_name = Lens.lens (\ColumnMetadata' {name} -> name) (\s@ColumnMetadata' {} a -> s {name = a} :: ColumnMetadata)++-- | A value that indicates whether the column is nullable.+columnMetadata_nullable :: Lens.Lens' ColumnMetadata (Prelude.Maybe Prelude.Int)+columnMetadata_nullable = Lens.lens (\ColumnMetadata' {nullable} -> nullable) (\s@ColumnMetadata' {} a -> s {nullable = a} :: ColumnMetadata)++-- | The precision value of a decimal number column.+columnMetadata_precision :: Lens.Lens' ColumnMetadata (Prelude.Maybe Prelude.Int)+columnMetadata_precision = Lens.lens (\ColumnMetadata' {precision} -> precision) (\s@ColumnMetadata' {} a -> s {precision = a} :: ColumnMetadata)++-- | The scale value of a decimal number column.+columnMetadata_scale :: Lens.Lens' ColumnMetadata (Prelude.Maybe Prelude.Int)+columnMetadata_scale = Lens.lens (\ColumnMetadata' {scale} -> scale) (\s@ColumnMetadata' {} a -> s {scale = a} :: ColumnMetadata)++-- | The name of the schema that owns the table that includes the column.+columnMetadata_schemaName :: Lens.Lens' ColumnMetadata (Prelude.Maybe Prelude.Text)+columnMetadata_schemaName = Lens.lens (\ColumnMetadata' {schemaName} -> schemaName) (\s@ColumnMetadata' {} a -> s {schemaName = a} :: ColumnMetadata)++-- | The name of the table that includes the column.+columnMetadata_tableName :: Lens.Lens' ColumnMetadata (Prelude.Maybe Prelude.Text)+columnMetadata_tableName = Lens.lens (\ColumnMetadata' {tableName} -> tableName) (\s@ColumnMetadata' {} a -> s {tableName = a} :: ColumnMetadata)++-- | The type of the column.+columnMetadata_type :: Lens.Lens' ColumnMetadata (Prelude.Maybe Prelude.Int)+columnMetadata_type = Lens.lens (\ColumnMetadata' {type'} -> type') (\s@ColumnMetadata' {} a -> s {type' = a} :: ColumnMetadata)++-- | The database-specific data type of the column.+columnMetadata_typeName :: Lens.Lens' ColumnMetadata (Prelude.Maybe Prelude.Text)+columnMetadata_typeName = Lens.lens (\ColumnMetadata' {typeName} -> typeName) (\s@ColumnMetadata' {} a -> s {typeName = a} :: ColumnMetadata)++instance Data.FromJSON ColumnMetadata where+  parseJSON =+    Data.withObject+      "ColumnMetadata"+      ( \x ->+          ColumnMetadata'+            Prelude.<$> (x Data..:? "arrayBaseColumnType")+            Prelude.<*> (x Data..:? "isAutoIncrement")+            Prelude.<*> (x Data..:? "isCaseSensitive")+            Prelude.<*> (x Data..:? "isCurrency")+            Prelude.<*> (x Data..:? "isSigned")+            Prelude.<*> (x Data..:? "label")+            Prelude.<*> (x Data..:? "name")+            Prelude.<*> (x Data..:? "nullable")+            Prelude.<*> (x Data..:? "precision")+            Prelude.<*> (x Data..:? "scale")+            Prelude.<*> (x Data..:? "schemaName")+            Prelude.<*> (x Data..:? "tableName")+            Prelude.<*> (x Data..:? "type")+            Prelude.<*> (x Data..:? "typeName")+      )++instance Prelude.Hashable ColumnMetadata where+  hashWithSalt _salt ColumnMetadata' {..} =+    _salt+      `Prelude.hashWithSalt` arrayBaseColumnType+      `Prelude.hashWithSalt` isAutoIncrement+      `Prelude.hashWithSalt` isCaseSensitive+      `Prelude.hashWithSalt` isCurrency+      `Prelude.hashWithSalt` isSigned+      `Prelude.hashWithSalt` label+      `Prelude.hashWithSalt` name+      `Prelude.hashWithSalt` nullable+      `Prelude.hashWithSalt` precision+      `Prelude.hashWithSalt` scale+      `Prelude.hashWithSalt` schemaName+      `Prelude.hashWithSalt` tableName+      `Prelude.hashWithSalt` type'+      `Prelude.hashWithSalt` typeName++instance Prelude.NFData ColumnMetadata where+  rnf ColumnMetadata' {..} =+    Prelude.rnf arrayBaseColumnType+      `Prelude.seq` Prelude.rnf isAutoIncrement+      `Prelude.seq` Prelude.rnf isCaseSensitive+      `Prelude.seq` Prelude.rnf isCurrency+      `Prelude.seq` Prelude.rnf isSigned+      `Prelude.seq` Prelude.rnf label+      `Prelude.seq` Prelude.rnf name+      `Prelude.seq` Prelude.rnf nullable+      `Prelude.seq` Prelude.rnf precision+      `Prelude.seq` Prelude.rnf scale+      `Prelude.seq` Prelude.rnf schemaName+      `Prelude.seq` Prelude.rnf tableName+      `Prelude.seq` Prelude.rnf type'+      `Prelude.seq` Prelude.rnf typeName
+ gen/Amazonka/RDSData/Types/DecimalReturnType.hs view
@@ -0,0 +1,71 @@+{-# 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.RDSData.Types.DecimalReturnType+-- 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.RDSData.Types.DecimalReturnType+  ( DecimalReturnType+      ( ..,+        DecimalReturnType_DOUBLE_OR_LONG,+        DecimalReturnType_STRING+      ),+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype DecimalReturnType = DecimalReturnType'+  { fromDecimalReturnType ::+      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 DecimalReturnType_DOUBLE_OR_LONG :: DecimalReturnType+pattern DecimalReturnType_DOUBLE_OR_LONG = DecimalReturnType' "DOUBLE_OR_LONG"++pattern DecimalReturnType_STRING :: DecimalReturnType+pattern DecimalReturnType_STRING = DecimalReturnType' "STRING"++{-# COMPLETE+  DecimalReturnType_DOUBLE_OR_LONG,+  DecimalReturnType_STRING,+  DecimalReturnType'+  #-}
+ gen/Amazonka/RDSData/Types/Field.hs view
@@ -0,0 +1,167 @@+{-# 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.RDSData.Types.Field+-- 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.RDSData.Types.Field where++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 Amazonka.RDSData.Types.ArrayValue++-- | Contains a value.+--+-- /See:/ 'newField' smart constructor.+data Field = Field'+  { -- | An array of values.+    arrayValue :: Prelude.Maybe ArrayValue,+    -- | A value of BLOB data type.+    blobValue :: Prelude.Maybe Data.Base64,+    -- | A value of Boolean data type.+    booleanValue :: Prelude.Maybe Prelude.Bool,+    -- | A value of double data type.+    doubleValue :: Prelude.Maybe Prelude.Double,+    -- | A NULL value.+    isNull :: Prelude.Maybe Prelude.Bool,+    -- | A value of long data type.+    longValue :: Prelude.Maybe Prelude.Integer,+    -- | A value of string data type.+    stringValue :: Prelude.Maybe Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'Field' 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:+--+-- 'arrayValue', 'field_arrayValue' - An array of values.+--+-- 'blobValue', 'field_blobValue' - A value of BLOB data type.--+-- -- /Note:/ This 'Lens' automatically encodes and decodes Base64 data.+-- -- The underlying isomorphism will encode to Base64 representation during+-- -- serialisation, and decode from Base64 representation during deserialisation.+-- -- This 'Lens' accepts and returns only raw unencoded data.+--+-- 'booleanValue', 'field_booleanValue' - A value of Boolean data type.+--+-- 'doubleValue', 'field_doubleValue' - A value of double data type.+--+-- 'isNull', 'field_isNull' - A NULL value.+--+-- 'longValue', 'field_longValue' - A value of long data type.+--+-- 'stringValue', 'field_stringValue' - A value of string data type.+newField ::+  Field+newField =+  Field'+    { arrayValue = Prelude.Nothing,+      blobValue = Prelude.Nothing,+      booleanValue = Prelude.Nothing,+      doubleValue = Prelude.Nothing,+      isNull = Prelude.Nothing,+      longValue = Prelude.Nothing,+      stringValue = Prelude.Nothing+    }++-- | An array of values.+field_arrayValue :: Lens.Lens' Field (Prelude.Maybe ArrayValue)+field_arrayValue = Lens.lens (\Field' {arrayValue} -> arrayValue) (\s@Field' {} a -> s {arrayValue = a} :: Field)++-- | A value of BLOB data type.--+-- -- /Note:/ This 'Lens' automatically encodes and decodes Base64 data.+-- -- The underlying isomorphism will encode to Base64 representation during+-- -- serialisation, and decode from Base64 representation during deserialisation.+-- -- This 'Lens' accepts and returns only raw unencoded data.+field_blobValue :: Lens.Lens' Field (Prelude.Maybe Prelude.ByteString)+field_blobValue = Lens.lens (\Field' {blobValue} -> blobValue) (\s@Field' {} a -> s {blobValue = a} :: Field) Prelude.. Lens.mapping Data._Base64++-- | A value of Boolean data type.+field_booleanValue :: Lens.Lens' Field (Prelude.Maybe Prelude.Bool)+field_booleanValue = Lens.lens (\Field' {booleanValue} -> booleanValue) (\s@Field' {} a -> s {booleanValue = a} :: Field)++-- | A value of double data type.+field_doubleValue :: Lens.Lens' Field (Prelude.Maybe Prelude.Double)+field_doubleValue = Lens.lens (\Field' {doubleValue} -> doubleValue) (\s@Field' {} a -> s {doubleValue = a} :: Field)++-- | A NULL value.+field_isNull :: Lens.Lens' Field (Prelude.Maybe Prelude.Bool)+field_isNull = Lens.lens (\Field' {isNull} -> isNull) (\s@Field' {} a -> s {isNull = a} :: Field)++-- | A value of long data type.+field_longValue :: Lens.Lens' Field (Prelude.Maybe Prelude.Integer)+field_longValue = Lens.lens (\Field' {longValue} -> longValue) (\s@Field' {} a -> s {longValue = a} :: Field)++-- | A value of string data type.+field_stringValue :: Lens.Lens' Field (Prelude.Maybe Prelude.Text)+field_stringValue = Lens.lens (\Field' {stringValue} -> stringValue) (\s@Field' {} a -> s {stringValue = a} :: Field)++instance Data.FromJSON Field where+  parseJSON =+    Data.withObject+      "Field"+      ( \x ->+          Field'+            Prelude.<$> (x Data..:? "arrayValue")+            Prelude.<*> (x Data..:? "blobValue")+            Prelude.<*> (x Data..:? "booleanValue")+            Prelude.<*> (x Data..:? "doubleValue")+            Prelude.<*> (x Data..:? "isNull")+            Prelude.<*> (x Data..:? "longValue")+            Prelude.<*> (x Data..:? "stringValue")+      )++instance Prelude.Hashable Field where+  hashWithSalt _salt Field' {..} =+    _salt+      `Prelude.hashWithSalt` arrayValue+      `Prelude.hashWithSalt` blobValue+      `Prelude.hashWithSalt` booleanValue+      `Prelude.hashWithSalt` doubleValue+      `Prelude.hashWithSalt` isNull+      `Prelude.hashWithSalt` longValue+      `Prelude.hashWithSalt` stringValue++instance Prelude.NFData Field where+  rnf Field' {..} =+    Prelude.rnf arrayValue+      `Prelude.seq` Prelude.rnf blobValue+      `Prelude.seq` Prelude.rnf booleanValue+      `Prelude.seq` Prelude.rnf doubleValue+      `Prelude.seq` Prelude.rnf isNull+      `Prelude.seq` Prelude.rnf longValue+      `Prelude.seq` Prelude.rnf stringValue++instance Data.ToJSON Field where+  toJSON Field' {..} =+    Data.object+      ( Prelude.catMaybes+          [ ("arrayValue" Data..=) Prelude.<$> arrayValue,+            ("blobValue" Data..=) Prelude.<$> blobValue,+            ("booleanValue" Data..=) Prelude.<$> booleanValue,+            ("doubleValue" Data..=) Prelude.<$> doubleValue,+            ("isNull" Data..=) Prelude.<$> isNull,+            ("longValue" Data..=) Prelude.<$> longValue,+            ("stringValue" Data..=) Prelude.<$> stringValue+          ]+      )
+ gen/Amazonka/RDSData/Types/LongReturnType.hs view
@@ -0,0 +1,71 @@+{-# 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.RDSData.Types.LongReturnType+-- 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.RDSData.Types.LongReturnType+  ( LongReturnType+      ( ..,+        LongReturnType_LONG,+        LongReturnType_STRING+      ),+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype LongReturnType = LongReturnType'+  { fromLongReturnType ::+      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 LongReturnType_LONG :: LongReturnType+pattern LongReturnType_LONG = LongReturnType' "LONG"++pattern LongReturnType_STRING :: LongReturnType+pattern LongReturnType_STRING = LongReturnType' "STRING"++{-# COMPLETE+  LongReturnType_LONG,+  LongReturnType_STRING,+  LongReturnType'+  #-}
+ gen/Amazonka/RDSData/Types/RecordsFormatType.hs view
@@ -0,0 +1,71 @@+{-# 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.RDSData.Types.RecordsFormatType+-- 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.RDSData.Types.RecordsFormatType+  ( RecordsFormatType+      ( ..,+        RecordsFormatType_JSON,+        RecordsFormatType_NONE+      ),+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype RecordsFormatType = RecordsFormatType'+  { fromRecordsFormatType ::+      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 RecordsFormatType_JSON :: RecordsFormatType+pattern RecordsFormatType_JSON = RecordsFormatType' "JSON"++pattern RecordsFormatType_NONE :: RecordsFormatType+pattern RecordsFormatType_NONE = RecordsFormatType' "NONE"++{-# COMPLETE+  RecordsFormatType_JSON,+  RecordsFormatType_NONE,+  RecordsFormatType'+  #-}
+ gen/Amazonka/RDSData/Types/ResultSetOptions.hs view
@@ -0,0 +1,121 @@+{-# 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.RDSData.Types.ResultSetOptions+-- 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.RDSData.Types.ResultSetOptions where++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 Amazonka.RDSData.Types.DecimalReturnType+import Amazonka.RDSData.Types.LongReturnType++-- | Options that control how the result set is returned.+--+-- /See:/ 'newResultSetOptions' smart constructor.+data ResultSetOptions = ResultSetOptions'+  { -- | A value that indicates how a field of @DECIMAL@ type is represented in+    -- the response. The value of @STRING@, the default, specifies that it is+    -- converted to a String value. The value of @DOUBLE_OR_LONG@ specifies+    -- that it is converted to a Long value if its scale is 0, or to a Double+    -- value otherwise.+    --+    -- Conversion to Double or Long can result in roundoff errors due to+    -- precision loss. We recommend converting to String, especially when+    -- working with currency values.+    decimalReturnType :: Prelude.Maybe DecimalReturnType,+    -- | A value that indicates how a field of @LONG@ type is represented.+    -- Allowed values are @LONG@ and @STRING@. The default is @LONG@. Specify+    -- @STRING@ if the length or precision of numeric values might cause+    -- truncation or rounding errors.+    longReturnType :: Prelude.Maybe LongReturnType+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ResultSetOptions' 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:+--+-- 'decimalReturnType', 'resultSetOptions_decimalReturnType' - A value that indicates how a field of @DECIMAL@ type is represented in+-- the response. The value of @STRING@, the default, specifies that it is+-- converted to a String value. The value of @DOUBLE_OR_LONG@ specifies+-- that it is converted to a Long value if its scale is 0, or to a Double+-- value otherwise.+--+-- Conversion to Double or Long can result in roundoff errors due to+-- precision loss. We recommend converting to String, especially when+-- working with currency values.+--+-- 'longReturnType', 'resultSetOptions_longReturnType' - A value that indicates how a field of @LONG@ type is represented.+-- Allowed values are @LONG@ and @STRING@. The default is @LONG@. Specify+-- @STRING@ if the length or precision of numeric values might cause+-- truncation or rounding errors.+newResultSetOptions ::+  ResultSetOptions+newResultSetOptions =+  ResultSetOptions'+    { decimalReturnType =+        Prelude.Nothing,+      longReturnType = Prelude.Nothing+    }++-- | A value that indicates how a field of @DECIMAL@ type is represented in+-- the response. The value of @STRING@, the default, specifies that it is+-- converted to a String value. The value of @DOUBLE_OR_LONG@ specifies+-- that it is converted to a Long value if its scale is 0, or to a Double+-- value otherwise.+--+-- Conversion to Double or Long can result in roundoff errors due to+-- precision loss. We recommend converting to String, especially when+-- working with currency values.+resultSetOptions_decimalReturnType :: Lens.Lens' ResultSetOptions (Prelude.Maybe DecimalReturnType)+resultSetOptions_decimalReturnType = Lens.lens (\ResultSetOptions' {decimalReturnType} -> decimalReturnType) (\s@ResultSetOptions' {} a -> s {decimalReturnType = a} :: ResultSetOptions)++-- | A value that indicates how a field of @LONG@ type is represented.+-- Allowed values are @LONG@ and @STRING@. The default is @LONG@. Specify+-- @STRING@ if the length or precision of numeric values might cause+-- truncation or rounding errors.+resultSetOptions_longReturnType :: Lens.Lens' ResultSetOptions (Prelude.Maybe LongReturnType)+resultSetOptions_longReturnType = Lens.lens (\ResultSetOptions' {longReturnType} -> longReturnType) (\s@ResultSetOptions' {} a -> s {longReturnType = a} :: ResultSetOptions)++instance Prelude.Hashable ResultSetOptions where+  hashWithSalt _salt ResultSetOptions' {..} =+    _salt+      `Prelude.hashWithSalt` decimalReturnType+      `Prelude.hashWithSalt` longReturnType++instance Prelude.NFData ResultSetOptions where+  rnf ResultSetOptions' {..} =+    Prelude.rnf decimalReturnType+      `Prelude.seq` Prelude.rnf longReturnType++instance Data.ToJSON ResultSetOptions where+  toJSON ResultSetOptions' {..} =+    Data.object+      ( Prelude.catMaybes+          [ ("decimalReturnType" Data..=)+              Prelude.<$> decimalReturnType,+            ("longReturnType" Data..=)+              Prelude.<$> longReturnType+          ]+      )
+ gen/Amazonka/RDSData/Types/SqlParameter.hs view
@@ -0,0 +1,163 @@+{-# 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.RDSData.Types.SqlParameter+-- 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.RDSData.Types.SqlParameter where++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 Amazonka.RDSData.Types.Field+import Amazonka.RDSData.Types.TypeHint++-- | A parameter used in a SQL statement.+--+-- /See:/ 'newSqlParameter' smart constructor.+data SqlParameter = SqlParameter'+  { -- | The name of the parameter.+    name :: Prelude.Maybe Prelude.Text,+    -- | A hint that specifies the correct object type for data type mapping.+    -- Possible values are as follows:+    --+    -- -   @DATE@ - The corresponding @String@ parameter value is sent as an+    --     object of @DATE@ type to the database. The accepted format is+    --     @YYYY-MM-DD@.+    --+    -- -   @DECIMAL@ - The corresponding @String@ parameter value is sent as an+    --     object of @DECIMAL@ type to the database.+    --+    -- -   @JSON@ - The corresponding @String@ parameter value is sent as an+    --     object of @JSON@ type to the database.+    --+    -- -   @TIME@ - The corresponding @String@ parameter value is sent as an+    --     object of @TIME@ type to the database. The accepted format is+    --     @HH:MM:SS[.FFF]@.+    --+    -- -   @TIMESTAMP@ - The corresponding @String@ parameter value is sent as+    --     an object of @TIMESTAMP@ type to the database. The accepted format+    --     is @YYYY-MM-DD HH:MM:SS[.FFF]@.+    --+    -- -   @UUID@ - The corresponding @String@ parameter value is sent as an+    --     object of @UUID@ type to the database.+    typeHint :: Prelude.Maybe TypeHint,+    -- | The value of the parameter.+    value :: Prelude.Maybe Field+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'SqlParameter' 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:+--+-- 'name', 'sqlParameter_name' - The name of the parameter.+--+-- 'typeHint', 'sqlParameter_typeHint' - A hint that specifies the correct object type for data type mapping.+-- Possible values are as follows:+--+-- -   @DATE@ - The corresponding @String@ parameter value is sent as an+--     object of @DATE@ type to the database. The accepted format is+--     @YYYY-MM-DD@.+--+-- -   @DECIMAL@ - The corresponding @String@ parameter value is sent as an+--     object of @DECIMAL@ type to the database.+--+-- -   @JSON@ - The corresponding @String@ parameter value is sent as an+--     object of @JSON@ type to the database.+--+-- -   @TIME@ - The corresponding @String@ parameter value is sent as an+--     object of @TIME@ type to the database. The accepted format is+--     @HH:MM:SS[.FFF]@.+--+-- -   @TIMESTAMP@ - The corresponding @String@ parameter value is sent as+--     an object of @TIMESTAMP@ type to the database. The accepted format+--     is @YYYY-MM-DD HH:MM:SS[.FFF]@.+--+-- -   @UUID@ - The corresponding @String@ parameter value is sent as an+--     object of @UUID@ type to the database.+--+-- 'value', 'sqlParameter_value' - The value of the parameter.+newSqlParameter ::+  SqlParameter+newSqlParameter =+  SqlParameter'+    { name = Prelude.Nothing,+      typeHint = Prelude.Nothing,+      value = Prelude.Nothing+    }++-- | The name of the parameter.+sqlParameter_name :: Lens.Lens' SqlParameter (Prelude.Maybe Prelude.Text)+sqlParameter_name = Lens.lens (\SqlParameter' {name} -> name) (\s@SqlParameter' {} a -> s {name = a} :: SqlParameter)++-- | A hint that specifies the correct object type for data type mapping.+-- Possible values are as follows:+--+-- -   @DATE@ - The corresponding @String@ parameter value is sent as an+--     object of @DATE@ type to the database. The accepted format is+--     @YYYY-MM-DD@.+--+-- -   @DECIMAL@ - The corresponding @String@ parameter value is sent as an+--     object of @DECIMAL@ type to the database.+--+-- -   @JSON@ - The corresponding @String@ parameter value is sent as an+--     object of @JSON@ type to the database.+--+-- -   @TIME@ - The corresponding @String@ parameter value is sent as an+--     object of @TIME@ type to the database. The accepted format is+--     @HH:MM:SS[.FFF]@.+--+-- -   @TIMESTAMP@ - The corresponding @String@ parameter value is sent as+--     an object of @TIMESTAMP@ type to the database. The accepted format+--     is @YYYY-MM-DD HH:MM:SS[.FFF]@.+--+-- -   @UUID@ - The corresponding @String@ parameter value is sent as an+--     object of @UUID@ type to the database.+sqlParameter_typeHint :: Lens.Lens' SqlParameter (Prelude.Maybe TypeHint)+sqlParameter_typeHint = Lens.lens (\SqlParameter' {typeHint} -> typeHint) (\s@SqlParameter' {} a -> s {typeHint = a} :: SqlParameter)++-- | The value of the parameter.+sqlParameter_value :: Lens.Lens' SqlParameter (Prelude.Maybe Field)+sqlParameter_value = Lens.lens (\SqlParameter' {value} -> value) (\s@SqlParameter' {} a -> s {value = a} :: SqlParameter)++instance Prelude.Hashable SqlParameter where+  hashWithSalt _salt SqlParameter' {..} =+    _salt+      `Prelude.hashWithSalt` name+      `Prelude.hashWithSalt` typeHint+      `Prelude.hashWithSalt` value++instance Prelude.NFData SqlParameter where+  rnf SqlParameter' {..} =+    Prelude.rnf name+      `Prelude.seq` Prelude.rnf typeHint+      `Prelude.seq` Prelude.rnf value++instance Data.ToJSON SqlParameter where+  toJSON SqlParameter' {..} =+    Data.object+      ( Prelude.catMaybes+          [ ("name" Data..=) Prelude.<$> name,+            ("typeHint" Data..=) Prelude.<$> typeHint,+            ("value" Data..=) Prelude.<$> value+          ]+      )
+ gen/Amazonka/RDSData/Types/TypeHint.hs view
@@ -0,0 +1,91 @@+{-# 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.RDSData.Types.TypeHint+-- 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.RDSData.Types.TypeHint+  ( TypeHint+      ( ..,+        TypeHint_DATE,+        TypeHint_DECIMAL,+        TypeHint_JSON,+        TypeHint_TIME,+        TypeHint_TIMESTAMP,+        TypeHint_UUID+      ),+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype TypeHint = TypeHint'+  { fromTypeHint ::+      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 TypeHint_DATE :: TypeHint+pattern TypeHint_DATE = TypeHint' "DATE"++pattern TypeHint_DECIMAL :: TypeHint+pattern TypeHint_DECIMAL = TypeHint' "DECIMAL"++pattern TypeHint_JSON :: TypeHint+pattern TypeHint_JSON = TypeHint' "JSON"++pattern TypeHint_TIME :: TypeHint+pattern TypeHint_TIME = TypeHint' "TIME"++pattern TypeHint_TIMESTAMP :: TypeHint+pattern TypeHint_TIMESTAMP = TypeHint' "TIMESTAMP"++pattern TypeHint_UUID :: TypeHint+pattern TypeHint_UUID = TypeHint' "UUID"++{-# COMPLETE+  TypeHint_DATE,+  TypeHint_DECIMAL,+  TypeHint_JSON,+  TypeHint_TIME,+  TypeHint_TIMESTAMP,+  TypeHint_UUID,+  TypeHint'+  #-}
+ gen/Amazonka/RDSData/Types/UpdateResult.hs view
@@ -0,0 +1,72 @@+{-# 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.RDSData.Types.UpdateResult+-- 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.RDSData.Types.UpdateResult where++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 Amazonka.RDSData.Types.Field++-- | The response elements represent the results of an update.+--+-- /See:/ 'newUpdateResult' smart constructor.+data UpdateResult = UpdateResult'+  { -- | Values for fields generated during the request.+    generatedFields :: Prelude.Maybe [Field]+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'UpdateResult' 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:+--+-- 'generatedFields', 'updateResult_generatedFields' - Values for fields generated during the request.+newUpdateResult ::+  UpdateResult+newUpdateResult =+  UpdateResult' {generatedFields = Prelude.Nothing}++-- | Values for fields generated during the request.+updateResult_generatedFields :: Lens.Lens' UpdateResult (Prelude.Maybe [Field])+updateResult_generatedFields = Lens.lens (\UpdateResult' {generatedFields} -> generatedFields) (\s@UpdateResult' {} a -> s {generatedFields = a} :: UpdateResult) Prelude.. Lens.mapping Lens.coerced++instance Data.FromJSON UpdateResult where+  parseJSON =+    Data.withObject+      "UpdateResult"+      ( \x ->+          UpdateResult'+            Prelude.<$> ( x+                            Data..:? "generatedFields"+                            Data..!= Prelude.mempty+                        )+      )++instance Prelude.Hashable UpdateResult where+  hashWithSalt _salt UpdateResult' {..} =+    _salt `Prelude.hashWithSalt` generatedFields++instance Prelude.NFData UpdateResult where+  rnf UpdateResult' {..} = Prelude.rnf generatedFields
+ gen/Amazonka/RDSData/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.RDSData.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.RDSData.Waiters where++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 Amazonka.RDSData.Lens+import Amazonka.RDSData.Types
+ 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.RDSData+import Test.Amazonka.RDSData.Internal+import Test.Tasty++main :: IO ()+main =+  defaultMain $+    testGroup+      "RDSData"+      [ testGroup "tests" tests,+        testGroup "fixtures" fixtures+      ]
+ test/Test/Amazonka/Gen/RDSData.hs view
@@ -0,0 +1,138 @@+{-# 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.RDSData+-- 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.RDSData where++import Amazonka.RDSData+import qualified Data.Proxy as Proxy+import Test.Amazonka.Fixture+import Test.Amazonka.Prelude+import Test.Amazonka.RDSData.Internal+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"+--         [ requestBatchExecuteStatement $+--             newBatchExecuteStatement+--+--         , requestBeginTransaction $+--             newBeginTransaction+--+--         , requestCommitTransaction $+--             newCommitTransaction+--+--         , requestExecuteStatement $+--             newExecuteStatement+--+--         , requestRollbackTransaction $+--             newRollbackTransaction+--+--           ]++--     , testGroup "response"+--         [ responseBatchExecuteStatement $+--             newBatchExecuteStatementResponse+--+--         , responseBeginTransaction $+--             newBeginTransactionResponse+--+--         , responseCommitTransaction $+--             newCommitTransactionResponse+--+--         , responseExecuteStatement $+--             newExecuteStatementResponse+--+--         , responseRollbackTransaction $+--             newRollbackTransactionResponse+--+--           ]+--     ]++-- Requests++requestBatchExecuteStatement :: BatchExecuteStatement -> TestTree+requestBatchExecuteStatement =+  req+    "BatchExecuteStatement"+    "fixture/BatchExecuteStatement.yaml"++requestBeginTransaction :: BeginTransaction -> TestTree+requestBeginTransaction =+  req+    "BeginTransaction"+    "fixture/BeginTransaction.yaml"++requestCommitTransaction :: CommitTransaction -> TestTree+requestCommitTransaction =+  req+    "CommitTransaction"+    "fixture/CommitTransaction.yaml"++requestExecuteStatement :: ExecuteStatement -> TestTree+requestExecuteStatement =+  req+    "ExecuteStatement"+    "fixture/ExecuteStatement.yaml"++requestRollbackTransaction :: RollbackTransaction -> TestTree+requestRollbackTransaction =+  req+    "RollbackTransaction"+    "fixture/RollbackTransaction.yaml"++-- Responses++responseBatchExecuteStatement :: BatchExecuteStatementResponse -> TestTree+responseBatchExecuteStatement =+  res+    "BatchExecuteStatementResponse"+    "fixture/BatchExecuteStatementResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy BatchExecuteStatement)++responseBeginTransaction :: BeginTransactionResponse -> TestTree+responseBeginTransaction =+  res+    "BeginTransactionResponse"+    "fixture/BeginTransactionResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy BeginTransaction)++responseCommitTransaction :: CommitTransactionResponse -> TestTree+responseCommitTransaction =+  res+    "CommitTransactionResponse"+    "fixture/CommitTransactionResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy CommitTransaction)++responseExecuteStatement :: ExecuteStatementResponse -> TestTree+responseExecuteStatement =+  res+    "ExecuteStatementResponse"+    "fixture/ExecuteStatementResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy ExecuteStatement)++responseRollbackTransaction :: RollbackTransactionResponse -> TestTree+responseRollbackTransaction =+  res+    "RollbackTransactionResponse"+    "fixture/RollbackTransactionResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy RollbackTransaction)
+ test/Test/Amazonka/RDSData.hs view
@@ -0,0 +1,20 @@+-- |+-- Module      : Test.Amazonka.RDSData+-- 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.RDSData+  ( tests,+    fixtures,+  )+where++import Test.Tasty (TestTree)++tests :: [TestTree]+tests = []++fixtures :: [TestTree]+fixtures = []
+ test/Test/Amazonka/RDSData/Internal.hs view
@@ -0,0 +1,8 @@+-- |+-- Module      : Test.Amazonka.RDSData.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.RDSData.Internal where