amazonka-codecommit (empty) → 1.0.0
raw patch · 24 files changed
+3083/−0 lines, 24 filesdep +amazonka-codecommitdep +amazonka-coredep +amazonka-testsetup-changed
Dependencies added: amazonka-codecommit, amazonka-core, amazonka-test, base, bytestring, lens, tasty, tasty-hunit, text, time, unordered-containers
Files
- LICENSE +373/−0
- README.md +54/−0
- Setup.hs +2/−0
- amazonka-codecommit.cabal +104/−0
- gen/Network/AWS/CodeCommit.hs +222/−0
- gen/Network/AWS/CodeCommit/BatchGetRepositories.hs +149/−0
- gen/Network/AWS/CodeCommit/CreateBranch.hs +130/−0
- gen/Network/AWS/CodeCommit/CreateRepository.hs +145/−0
- gen/Network/AWS/CodeCommit/DeleteRepository.hs +135/−0
- gen/Network/AWS/CodeCommit/GetBranch.hs +140/−0
- gen/Network/AWS/CodeCommit/GetRepository.hs +136/−0
- gen/Network/AWS/CodeCommit/ListBranches.hs +150/−0
- gen/Network/AWS/CodeCommit/ListRepositories.hs +166/−0
- gen/Network/AWS/CodeCommit/Types.hs +232/−0
- gen/Network/AWS/CodeCommit/Types/Product.hs +209/−0
- gen/Network/AWS/CodeCommit/Types/Sum.hs +70/−0
- gen/Network/AWS/CodeCommit/UpdateDefaultBranch.hs +119/−0
- gen/Network/AWS/CodeCommit/UpdateRepositoryDescription.hs +124/−0
- gen/Network/AWS/CodeCommit/UpdateRepositoryName.hs +114/−0
- gen/Network/AWS/CodeCommit/Waiters.hs +20/−0
- test/Main.hs +21/−0
- test/Test/AWS/CodeCommit.hs +26/−0
- test/Test/AWS/CodeCommit/Internal.hs +16/−0
- test/Test/AWS/Gen/CodeCommit.hs +226/−0
+ LICENSE view
@@ -0,0 +1,373 @@+Mozilla Public License Version 2.0+==================================++1. Definitions+--------------++1.1. "Contributor"+ means each individual or legal entity that creates, contributes to+ the creation of, or owns Covered Software.++1.2. "Contributor Version"+ means the combination of the Contributions of others (if any) used+ by a Contributor and that particular Contributor's Contribution.++1.3. "Contribution"+ means Covered Software of a particular Contributor.++1.4. "Covered Software"+ means Source Code Form to which the initial Contributor has attached+ the notice in Exhibit A, the Executable Form of such Source Code+ Form, and Modifications of such Source Code Form, in each case+ including portions thereof.++1.5. "Incompatible With Secondary Licenses"+ means++ (a) that the initial Contributor has attached the notice described+ in Exhibit B to the Covered Software; or++ (b) that the Covered Software was made available under the terms of+ version 1.1 or earlier of the License, but not also under the+ terms of a Secondary License.++1.6. "Executable Form"+ means any form of the work other than Source Code Form.++1.7. "Larger Work"+ means a work that combines Covered Software with other material, in+ a separate file or files, that is not Covered Software.++1.8. "License"+ means this document.++1.9. "Licensable"+ means having the right to grant, to the maximum extent possible,+ whether at the time of the initial grant or subsequently, any and+ all of the rights conveyed by this License.++1.10. "Modifications"+ means any of the following:++ (a) any file in Source Code Form that results from an addition to,+ deletion from, or modification of the contents of Covered+ Software; or++ (b) any new file in Source Code Form that contains any Covered+ Software.++1.11. "Patent Claims" of a Contributor+ means any patent claim(s), including without limitation, method,+ process, and apparatus claims, in any patent Licensable by such+ Contributor that would be infringed, but for the grant of the+ License, by the making, using, selling, offering for sale, having+ made, import, or transfer of either its Contributions or its+ Contributor Version.++1.12. "Secondary License"+ means either the GNU General Public License, Version 2.0, the GNU+ Lesser General Public License, Version 2.1, the GNU Affero General+ Public License, Version 3.0, or any later versions of those+ licenses.++1.13. "Source Code Form"+ means the form of the work preferred for making modifications.++1.14. "You" (or "Your")+ means an individual or a legal entity exercising rights under this+ License. For legal entities, "You" includes any entity that+ controls, is controlled by, or is under common control with You. For+ purposes of this definition, "control" means (a) the power, direct+ or indirect, to cause the direction or management of such entity,+ whether by contract or otherwise, or (b) ownership of more than+ fifty percent (50%) of the outstanding shares or beneficial+ ownership of such entity.++2. License Grants and Conditions+--------------------------------++2.1. Grants++Each Contributor hereby grants You a world-wide, royalty-free,+non-exclusive license:++(a) under intellectual property rights (other than patent or trademark)+ Licensable by such Contributor to use, reproduce, make available,+ modify, display, perform, distribute, and otherwise exploit its+ Contributions, either on an unmodified basis, with Modifications, or+ as part of a Larger Work; and++(b) under Patent Claims of such Contributor to make, use, sell, offer+ for sale, have made, import, and otherwise transfer either its+ Contributions or its Contributor Version.++2.2. Effective Date++The licenses granted in Section 2.1 with respect to any Contribution+become effective for each Contribution on the date the Contributor first+distributes such Contribution.++2.3. Limitations on Grant Scope++The licenses granted in this Section 2 are the only rights granted under+this License. No additional rights or licenses will be implied from the+distribution or licensing of Covered Software under this License.+Notwithstanding Section 2.1(b) above, no patent license is granted by a+Contributor:++(a) for any code that a Contributor has removed from Covered Software;+ or++(b) for infringements caused by: (i) Your and any other third party's+ modifications of Covered Software, or (ii) the combination of its+ Contributions with other software (except as part of its Contributor+ Version); or++(c) under Patent Claims infringed by Covered Software in the absence of+ its Contributions.++This License does not grant any rights in the trademarks, service marks,+or logos of any Contributor (except as may be necessary to comply with+the notice requirements in Section 3.4).++2.4. Subsequent Licenses++No Contributor makes additional grants as a result of Your choice to+distribute the Covered Software under a subsequent version of this+License (see Section 10.2) or under the terms of a Secondary License (if+permitted under the terms of Section 3.3).++2.5. Representation++Each Contributor represents that the Contributor believes its+Contributions are its original creation(s) or it has sufficient rights+to grant the rights to its Contributions conveyed by this License.++2.6. Fair Use++This License is not intended to limit any rights You have under+applicable copyright doctrines of fair use, fair dealing, or other+equivalents.++2.7. Conditions++Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted+in Section 2.1.++3. Responsibilities+-------------------++3.1. Distribution of Source Form++All distribution of Covered Software in Source Code Form, including any+Modifications that You create or to which You contribute, must be under+the terms of this License. You must inform recipients that the Source+Code Form of the Covered Software is governed by the terms of this+License, and how they can obtain a copy of this License. You may not+attempt to alter or restrict the recipients' rights in the Source Code+Form.++3.2. Distribution of Executable Form++If You distribute Covered Software in Executable Form then:++(a) such Covered Software must also be made available in Source Code+ Form, as described in Section 3.1, and You must inform recipients of+ the Executable Form how they can obtain a copy of such Source Code+ Form by reasonable means in a timely manner, at a charge no more+ than the cost of distribution to the recipient; and++(b) You may distribute such Executable Form under the terms of this+ License, or sublicense it under different terms, provided that the+ license for the Executable Form does not attempt to limit or alter+ the recipients' rights in the Source Code Form under this License.++3.3. Distribution of a Larger Work++You may create and distribute a Larger Work under terms of Your choice,+provided that You also comply with the requirements of this License for+the Covered Software. If the Larger Work is a combination of Covered+Software with a work governed by one or more Secondary Licenses, and the+Covered Software is not Incompatible With Secondary Licenses, this+License permits You to additionally distribute such Covered Software+under the terms of such Secondary License(s), so that the recipient of+the Larger Work may, at their option, further distribute the Covered+Software under the terms of either this License or such Secondary+License(s).++3.4. Notices++You may not remove or alter the substance of any license notices+(including copyright notices, patent notices, disclaimers of warranty,+or limitations of liability) contained within the Source Code Form of+the Covered Software, except that You may alter any license notices to+the extent required to remedy known factual inaccuracies.++3.5. Application of Additional Terms++You may choose to offer, and to charge a fee for, warranty, support,+indemnity or liability obligations to one or more recipients of Covered+Software. However, You may do so only on Your own behalf, and not on+behalf of any Contributor. You must make it absolutely clear that any+such warranty, support, indemnity, or liability obligation is offered by+You alone, and You hereby agree to indemnify every Contributor for any+liability incurred by such Contributor as a result of warranty, support,+indemnity or liability terms You offer. You may include additional+disclaimers of warranty and limitations of liability specific to any+jurisdiction.++4. Inability to Comply Due to Statute or Regulation+---------------------------------------------------++If it is impossible for You to comply with any of the terms of this+License with respect to some or all of the Covered Software due to+statute, judicial order, or regulation then You must: (a) comply with+the terms of this License to the maximum extent possible; and (b)+describe the limitations and the code they affect. Such description must+be placed in a text file included with all distributions of the Covered+Software under this License. Except to the extent prohibited by statute+or regulation, such description must be sufficiently detailed for a+recipient of ordinary skill to be able to understand it.++5. Termination+--------------++5.1. The rights granted under this License will terminate automatically+if You fail to comply with any of its terms. However, if You become+compliant, then the rights granted under this License from a particular+Contributor are reinstated (a) provisionally, unless and until such+Contributor explicitly and finally terminates Your grants, and (b) on an+ongoing basis, if such Contributor fails to notify You of the+non-compliance by some reasonable means prior to 60 days after You have+come back into compliance. Moreover, Your grants from a particular+Contributor are reinstated on an ongoing basis if such Contributor+notifies You of the non-compliance by some reasonable means, this is the+first time You have received notice of non-compliance with this License+from such Contributor, and You become compliant prior to 30 days after+Your receipt of the notice.++5.2. If You initiate litigation against any entity by asserting a patent+infringement claim (excluding declaratory judgment actions,+counter-claims, and cross-claims) alleging that a Contributor Version+directly or indirectly infringes any patent, then the rights granted to+You by any and all Contributors for the Covered Software under Section+2.1 of this License shall terminate.++5.3. In the event of termination under Sections 5.1 or 5.2 above, all+end user license agreements (excluding distributors and resellers) which+have been validly granted by You or Your distributors under this License+prior to termination shall survive termination.++************************************************************************+* *+* 6. Disclaimer of Warranty *+* ------------------------- *+* *+* Covered Software is provided under this License on an "as is" *+* basis, without warranty of any kind, either expressed, implied, or *+* statutory, including, without limitation, warranties that the *+* Covered Software is free of defects, merchantable, fit for a *+* particular purpose or non-infringing. The entire risk as to the *+* quality and performance of the Covered Software is with You. *+* Should any Covered Software prove defective in any respect, You *+* (not any Contributor) assume the cost of any necessary servicing, *+* repair, or correction. This disclaimer of warranty constitutes an *+* essential part of this License. No use of any Covered Software is *+* authorized under this License except under this disclaimer. *+* *+************************************************************************++************************************************************************+* *+* 7. Limitation of Liability *+* -------------------------- *+* *+* Under no circumstances and under no legal theory, whether tort *+* (including negligence), contract, or otherwise, shall any *+* Contributor, or anyone who distributes Covered Software as *+* permitted above, be liable to You for any direct, indirect, *+* special, incidental, or consequential damages of any character *+* including, without limitation, damages for lost profits, loss of *+* goodwill, work stoppage, computer failure or malfunction, or any *+* and all other commercial damages or losses, even if such party *+* shall have been informed of the possibility of such damages. This *+* limitation of liability shall not apply to liability for death or *+* personal injury resulting from such party's negligence to the *+* extent applicable law prohibits such limitation. Some *+* jurisdictions do not allow the exclusion or limitation of *+* incidental or consequential damages, so this exclusion and *+* limitation may not apply to You. *+* *+************************************************************************++8. Litigation+-------------++Any litigation relating to this License may be brought only in the+courts of a jurisdiction where the defendant maintains its principal+place of business and such litigation shall be governed by laws of that+jurisdiction, without reference to its conflict-of-law provisions.+Nothing in this Section shall prevent a party's ability to bring+cross-claims or counter-claims.++9. Miscellaneous+----------------++This License represents the complete agreement concerning the subject+matter hereof. If any provision of this License is held to be+unenforceable, such provision shall be reformed only to the extent+necessary to make it enforceable. Any law or regulation which provides+that the language of a contract shall be construed against the drafter+shall not be used to construe this License against a Contributor.++10. Versions of the License+---------------------------++10.1. New Versions++Mozilla Foundation is the license steward. Except as provided in Section+10.3, no one other than the license steward has the right to modify or+publish new versions of this License. Each version will be given a+distinguishing version number.++10.2. Effect of New Versions++You may distribute the Covered Software under the terms of the version+of the License under which You originally received the Covered Software,+or under the terms of any subsequent version published by the license+steward.++10.3. Modified Versions++If you create software not governed by this License, and you want to+create a new license for such software, you may create and use a+modified version of this License if you rename the license and remove+any references to the name of the license steward (except to note that+such modified license differs from this License).++10.4. Distributing Source Code Form that is Incompatible With Secondary+Licenses++If You choose to distribute Source Code Form that is Incompatible With+Secondary Licenses under the terms of this version of the License, the+notice described in Exhibit B of this License must be attached.++Exhibit A - Source Code Form License Notice+-------------------------------------------++ This Source Code Form is subject to the terms of the Mozilla Public+ License, v. 2.0. If a copy of the MPL was not distributed with this+ file, You can obtain one at http://mozilla.org/MPL/2.0/.++If it is not possible or desirable to put the notice in a particular+file, then You may include the notice in a location (such as a LICENSE+file in a relevant directory) where a recipient would be likely to look+for such a notice.++You may add additional accurate notices of copyright ownership.++Exhibit B - "Incompatible With Secondary Licenses" Notice+---------------------------------------------------------++ This Source Code Form is "Incompatible With Secondary Licenses", as+ defined by the Mozilla Public License, v. 2.0.
+ README.md view
@@ -0,0 +1,54 @@+# Amazon CodeCommit SDK++* [Version](#version)+* [Description](#description)+* [Contribute](#contribute)+* [Licence](#licence)+++## Version++`1.0.0`+++## Description++AWS CodeCommit++This is the /AWS CodeCommit API Reference/. This reference provides+descriptions of the AWS CodeCommit API.++You can use the AWS CodeCommit API to work with the following objects:++- Repositories+- Branches+- Commits++For information about how to use AWS CodeCommit, see the /AWS CodeCommit+User Guide/.++Documentation is available via [Hackage](http://hackage.haskell.org/package/amazonka-codecommit)+and the [AWS API Reference](http://docs.aws.amazon.com/codecommit/latest/APIReference/Welcome.html).++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 and sending requests.++Use of lenses is required for constructing and manipulating types.+This is due to the amount 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).++## 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-codecommit` is released under the [Mozilla Public License Version 2.0](http://www.mozilla.org/MPL/).++Parts of the code are derived from AWS service descriptions, licensed under Apache 2.0.+Source files subject to this contain an additional licensing clause in their header.
+ Setup.hs view
@@ -0,0 +1,2 @@+import Distribution.Simple+main = defaultMain
+ amazonka-codecommit.cabal view
@@ -0,0 +1,104 @@+name: amazonka-codecommit+version: 1.0.0+synopsis: Amazon CodeCommit SDK.+homepage: https://github.com/brendanhay/amazonka+license: OtherLicense+license-file: LICENSE+author: Brendan Hay+maintainer: Brendan Hay <brendan.g.hay@gmail.com>+copyright: Copyright (c) 2013-2015 Brendan Hay+category: Network, AWS, Cloud, Distributed Computing+build-type: Simple+extra-source-files: README.md+cabal-version: >= 1.10++description:+ AWS CodeCommit++ This is the /AWS CodeCommit API Reference/. This reference provides+ descriptions of the AWS CodeCommit API.++ You can use the AWS CodeCommit API to work with the following objects:++ - Repositories+ - Branches+ - Commits++ For information about how to use AWS CodeCommit, see the /AWS CodeCommit+ User Guide/.+ .+ 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 and sending requests.+ .+ Use of lenses is required for constructing and manipulating types.+ This is due to the amount of nesting of AWS types and transparency regarding+ de/serialisation into more palatable Haskell values.+ The provided lenses should be compatible with any of the major lens libraries+ such as <http://hackage.haskell.org/package/lens lens> or+ <http://hackage.haskell.org/package/lens-family-core lens-family-core>.+ .+ See "Network.AWS.CodeCommit" and the <http://docs.aws.amazon.com/codecommit/latest/APIReference/Welcome.html AWS API Reference>+ to get started.++source-repository head+ type: git+ location: git://github.com/brendanhay/amazonka.git++library+ default-language: Haskell2010+ hs-source-dirs: src gen++ ghc-options: -Wall++ exposed-modules:+ Network.AWS.CodeCommit+ , Network.AWS.CodeCommit.BatchGetRepositories+ , Network.AWS.CodeCommit.CreateBranch+ , Network.AWS.CodeCommit.CreateRepository+ , Network.AWS.CodeCommit.DeleteRepository+ , Network.AWS.CodeCommit.GetBranch+ , Network.AWS.CodeCommit.GetRepository+ , Network.AWS.CodeCommit.ListBranches+ , Network.AWS.CodeCommit.ListRepositories+ , Network.AWS.CodeCommit.Types+ , Network.AWS.CodeCommit.UpdateDefaultBranch+ , Network.AWS.CodeCommit.UpdateRepositoryDescription+ , Network.AWS.CodeCommit.UpdateRepositoryName+ , Network.AWS.CodeCommit.Waiters++ other-modules:+ Network.AWS.CodeCommit.Types.Product+ , Network.AWS.CodeCommit.Types.Sum++ build-depends:+ amazonka-core == 1.0.0.*+ , base >= 4.7 && < 5++test-suite amazonka-codecommit-test+ type: exitcode-stdio-1.0+ default-language: Haskell2010+ hs-source-dirs: test+ main-is: Main.hs++ ghc-options: -Wall -threaded++ -- This is not comprehensive if modules have manually been added.+ -- It exists to ensure cabal 'somewhat' detects test module changes.+ other-modules:+ Test.AWS.CodeCommit+ , Test.AWS.Gen.CodeCommit+ , Test.AWS.CodeCommit.Internal++ build-depends:+ amazonka-core == 1.0.0+ , amazonka-test == 1.0.0+ , amazonka-codecommit == 1.0.0+ , base+ , bytestring+ , lens+ , tasty+ , tasty-hunit+ , text+ , time+ , unordered-containers
+ gen/Network/AWS/CodeCommit.hs view
@@ -0,0 +1,222 @@+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.CodeCommit+-- Copyright : (c) 2013-2015 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- AWS CodeCommit+--+-- This is the /AWS CodeCommit API Reference/. This reference provides+-- descriptions of the AWS CodeCommit API.+--+-- You can use the AWS CodeCommit API to work with the following objects:+--+-- - Repositories+-- - Branches+-- - Commits+--+-- For information about how to use AWS CodeCommit, see the /AWS CodeCommit+-- User Guide/.+--+-- /See:/ <http://docs.aws.amazon.com/codecommit/latest/APIReference/Welcome.html AWS API Reference>+module Network.AWS.CodeCommit+ (+ -- * Service+ CodeCommit++ -- * Errors+ -- $errors++ -- ** InvalidContinuationTokenException+ , _InvalidContinuationTokenException++ -- ** EncryptionKeyNotFoundException+ , _EncryptionKeyNotFoundException++ -- ** RepositoryNameExistsException+ , _RepositoryNameExistsException++ -- ** MaximumRepositoryNamesExceededException+ , _MaximumRepositoryNamesExceededException++ -- ** InvalidRepositoryDescriptionException+ , _InvalidRepositoryDescriptionException++ -- ** BranchNameRequiredException+ , _BranchNameRequiredException++ -- ** InvalidBranchNameException+ , _InvalidBranchNameException++ -- ** EncryptionKeyUnavailableException+ , _EncryptionKeyUnavailableException++ -- ** InvalidOrderException+ , _InvalidOrderException++ -- ** BranchDoesNotExistException+ , _BranchDoesNotExistException++ -- ** RepositoryNamesRequiredException+ , _RepositoryNamesRequiredException++ -- ** RepositoryDoesNotExistException+ , _RepositoryDoesNotExistException++ -- ** EncryptionIntegrityChecksFailedException+ , _EncryptionIntegrityChecksFailedException++ -- ** EncryptionKeyAccessDeniedException+ , _EncryptionKeyAccessDeniedException++ -- ** BranchNameExistsException+ , _BranchNameExistsException++ -- ** EncryptionKeyDisabledException+ , _EncryptionKeyDisabledException++ -- ** InvalidSortByException+ , _InvalidSortByException++ -- ** CommitIdRequiredException+ , _CommitIdRequiredException++ -- ** InvalidCommitIdException+ , _InvalidCommitIdException++ -- ** CommitDoesNotExistException+ , _CommitDoesNotExistException++ -- ** RepositoryLimitExceededException+ , _RepositoryLimitExceededException++ -- ** InvalidRepositoryNameException+ , _InvalidRepositoryNameException++ -- ** RepositoryNameRequiredException+ , _RepositoryNameRequiredException++ -- * Waiters+ -- $waiters++ -- * Operations+ -- $operations++ -- ** UpdateRepositoryName+ , module Network.AWS.CodeCommit.UpdateRepositoryName++ -- ** GetBranch+ , module Network.AWS.CodeCommit.GetBranch++ -- ** UpdateRepositoryDescription+ , module Network.AWS.CodeCommit.UpdateRepositoryDescription++ -- ** ListBranches+ , module Network.AWS.CodeCommit.ListBranches++ -- ** CreateBranch+ , module Network.AWS.CodeCommit.CreateBranch++ -- ** UpdateDefaultBranch+ , module Network.AWS.CodeCommit.UpdateDefaultBranch++ -- ** CreateRepository+ , module Network.AWS.CodeCommit.CreateRepository++ -- ** ListRepositories+ , module Network.AWS.CodeCommit.ListRepositories++ -- ** GetRepository+ , module Network.AWS.CodeCommit.GetRepository++ -- ** DeleteRepository+ , module Network.AWS.CodeCommit.DeleteRepository++ -- ** BatchGetRepositories+ , module Network.AWS.CodeCommit.BatchGetRepositories++ -- * Types++ -- ** OrderEnum+ , OrderEnum (..)++ -- ** SortByEnum+ , SortByEnum (..)++ -- ** BranchInfo+ , BranchInfo+ , branchInfo+ , biCommitId+ , biBranchName++ -- ** RepositoryMetadata+ , RepositoryMetadata+ , repositoryMetadata+ , rmRepositoryDescription+ , rmLastModifiedDate+ , rmARN+ , rmCloneURLHTTP+ , rmAccountId+ , rmDefaultBranch+ , rmRepositoryId+ , rmCreationDate+ , rmRepositoryName+ , rmCloneURLSSH++ -- ** RepositoryNameIdPair+ , RepositoryNameIdPair+ , repositoryNameIdPair+ , rnipRepositoryId+ , rnipRepositoryName+ ) where++import Network.AWS.CodeCommit.BatchGetRepositories+import Network.AWS.CodeCommit.CreateBranch+import Network.AWS.CodeCommit.CreateRepository+import Network.AWS.CodeCommit.DeleteRepository+import Network.AWS.CodeCommit.GetBranch+import Network.AWS.CodeCommit.GetRepository+import Network.AWS.CodeCommit.ListBranches+import Network.AWS.CodeCommit.ListRepositories+import Network.AWS.CodeCommit.Types+import Network.AWS.CodeCommit.UpdateDefaultBranch+import Network.AWS.CodeCommit.UpdateRepositoryDescription+import Network.AWS.CodeCommit.UpdateRepositoryName+import Network.AWS.CodeCommit.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 'CodeCommit'.+-}++{- $operations+Some AWS operations return results that are incomplete and require subsequent+requests in order to obtain the entire result set. The process of sending+subsequent requests to continue where a previous request left off is called+pagination. For example, the 'ListObjects' operation of Amazon S3 returns up to+1000 objects at a time, and you must send subsequent requests with the+appropriate Marker in order to retrieve the next page of results.++Operations that have an 'AWSPager' instance can transparently perform subsequent+requests, correctly setting Markers and other request facets to iterate through+the entire result set of a truncated API operation. Operations which support+this have an additional note in the documentation.++Many operations have the ability to filter results on the server side. See the+individual operation parameters for details.+-}++{- $waiters+Waiters poll by repeatedly sending a request until some remote success condition+configured by the 'Wait' specification is fulfilled. The 'Wait' specification+determines how many attempts should be made, in addition to delay and retry strategies.+-}
+ gen/Network/AWS/CodeCommit/BatchGetRepositories.hs view
@@ -0,0 +1,149 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.CodeCommit.BatchGetRepositories+-- Copyright : (c) 2013-2015 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Gets information about one or more repositories.+--+-- The description field for a repository accepts all HTML characters and+-- all valid Unicode characters. Applications that do not HTML-encode the+-- description and display it in a web page could expose users to+-- potentially malicious code. Make sure that you HTML-encode the+-- description field in any application that uses this API to display the+-- repository description on a web page.+--+-- /See:/ <http://docs.aws.amazon.com/codecommit/latest/APIReference/API_BatchGetRepositories.html AWS API Reference> for BatchGetRepositories.+module Network.AWS.CodeCommit.BatchGetRepositories+ (+ -- * Creating a Request+ batchGetRepositories+ , BatchGetRepositories+ -- * Request Lenses+ , bgrRepositoryNames++ -- * Destructuring the Response+ , batchGetRepositoriesResponse+ , BatchGetRepositoriesResponse+ -- * Response Lenses+ , bgrrsRepositories+ , bgrrsRepositoriesNotFound+ , bgrrsStatus+ ) where++import Network.AWS.CodeCommit.Types+import Network.AWS.CodeCommit.Types.Product+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | Represents the input of a batch get repositories operation.+--+-- /See:/ 'batchGetRepositories' smart constructor.+newtype BatchGetRepositories = BatchGetRepositories'+ { _bgrRepositoryNames :: [Text]+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'BatchGetRepositories' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'bgrRepositoryNames'+batchGetRepositories+ :: BatchGetRepositories+batchGetRepositories =+ BatchGetRepositories'+ { _bgrRepositoryNames = mempty+ }++-- | The names of the repositories to get information about.+bgrRepositoryNames :: Lens' BatchGetRepositories [Text]+bgrRepositoryNames = lens _bgrRepositoryNames (\ s a -> s{_bgrRepositoryNames = a}) . _Coerce;++instance AWSRequest BatchGetRepositories where+ type Sv BatchGetRepositories = CodeCommit+ type Rs BatchGetRepositories =+ BatchGetRepositoriesResponse+ request = postJSON+ response+ = receiveJSON+ (\ s h x ->+ BatchGetRepositoriesResponse' <$>+ (x .?> "repositories" .!@ mempty) <*>+ (x .?> "repositoriesNotFound" .!@ mempty)+ <*> (pure (fromEnum s)))++instance ToHeaders BatchGetRepositories where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("CodeCommit_20150413.BatchGetRepositories" ::+ ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON BatchGetRepositories where+ toJSON BatchGetRepositories'{..}+ = object ["repositoryNames" .= _bgrRepositoryNames]++instance ToPath BatchGetRepositories where+ toPath = const "/"++instance ToQuery BatchGetRepositories where+ toQuery = const mempty++-- | Represents the output of a batch get repositories operation.+--+-- /See:/ 'batchGetRepositoriesResponse' smart constructor.+data BatchGetRepositoriesResponse = BatchGetRepositoriesResponse'+ { _bgrrsRepositories :: !(Maybe [RepositoryMetadata])+ , _bgrrsRepositoriesNotFound :: !(Maybe [Text])+ , _bgrrsStatus :: !Int+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'BatchGetRepositoriesResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'bgrrsRepositories'+--+-- * 'bgrrsRepositoriesNotFound'+--+-- * 'bgrrsStatus'+batchGetRepositoriesResponse+ :: Int -- ^ 'bgrrsStatus'+ -> BatchGetRepositoriesResponse+batchGetRepositoriesResponse pStatus_ =+ BatchGetRepositoriesResponse'+ { _bgrrsRepositories = Nothing+ , _bgrrsRepositoriesNotFound = Nothing+ , _bgrrsStatus = pStatus_+ }++-- | A list of repositories returned by the batch get repositories operation.+bgrrsRepositories :: Lens' BatchGetRepositoriesResponse [RepositoryMetadata]+bgrrsRepositories = lens _bgrrsRepositories (\ s a -> s{_bgrrsRepositories = a}) . _Default . _Coerce;++-- | Returns a list of repository names for which information could not be+-- found.+bgrrsRepositoriesNotFound :: Lens' BatchGetRepositoriesResponse [Text]+bgrrsRepositoriesNotFound = lens _bgrrsRepositoriesNotFound (\ s a -> s{_bgrrsRepositoriesNotFound = a}) . _Default . _Coerce;++-- | The response status code.+bgrrsStatus :: Lens' BatchGetRepositoriesResponse Int+bgrrsStatus = lens _bgrrsStatus (\ s a -> s{_bgrrsStatus = a});
+ gen/Network/AWS/CodeCommit/CreateBranch.hs view
@@ -0,0 +1,130 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.CodeCommit.CreateBranch+-- Copyright : (c) 2013-2015 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Creates a new branch in a repository and points the branch to a commit.+--+-- Calling the create branch operation does not set a repository\'s default+-- branch. To do this, call the update default branch operation.+--+-- /See:/ <http://docs.aws.amazon.com/codecommit/latest/APIReference/API_CreateBranch.html AWS API Reference> for CreateBranch.+module Network.AWS.CodeCommit.CreateBranch+ (+ -- * Creating a Request+ createBranch+ , CreateBranch+ -- * Request Lenses+ , cbRepositoryName+ , cbBranchName+ , cbCommitId++ -- * Destructuring the Response+ , createBranchResponse+ , CreateBranchResponse+ ) where++import Network.AWS.CodeCommit.Types+import Network.AWS.CodeCommit.Types.Product+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | Represents the input of a create branch operation.+--+-- /See:/ 'createBranch' smart constructor.+data CreateBranch = CreateBranch'+ { _cbRepositoryName :: !Text+ , _cbBranchName :: !Text+ , _cbCommitId :: !Text+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'CreateBranch' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'cbRepositoryName'+--+-- * 'cbBranchName'+--+-- * 'cbCommitId'+createBranch+ :: Text -- ^ 'cbRepositoryName'+ -> Text -- ^ 'cbBranchName'+ -> Text -- ^ 'cbCommitId'+ -> CreateBranch+createBranch pRepositoryName_ pBranchName_ pCommitId_ =+ CreateBranch'+ { _cbRepositoryName = pRepositoryName_+ , _cbBranchName = pBranchName_+ , _cbCommitId = pCommitId_+ }++-- | The name of the repository in which you want to create the new branch.+cbRepositoryName :: Lens' CreateBranch Text+cbRepositoryName = lens _cbRepositoryName (\ s a -> s{_cbRepositoryName = a});++-- | The name of the new branch to create.+cbBranchName :: Lens' CreateBranch Text+cbBranchName = lens _cbBranchName (\ s a -> s{_cbBranchName = a});++-- | The ID of the commit to point the new branch to.+--+-- If this commit ID is not specified, the new branch will point to the+-- commit that is pointed to by the repository\'s default branch.+cbCommitId :: Lens' CreateBranch Text+cbCommitId = lens _cbCommitId (\ s a -> s{_cbCommitId = a});++instance AWSRequest CreateBranch where+ type Sv CreateBranch = CodeCommit+ type Rs CreateBranch = CreateBranchResponse+ request = postJSON+ response = receiveNull CreateBranchResponse'++instance ToHeaders CreateBranch where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("CodeCommit_20150413.CreateBranch" :: ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON CreateBranch where+ toJSON CreateBranch'{..}+ = object+ ["repositoryName" .= _cbRepositoryName,+ "branchName" .= _cbBranchName,+ "commitId" .= _cbCommitId]++instance ToPath CreateBranch where+ toPath = const "/"++instance ToQuery CreateBranch where+ toQuery = const mempty++-- | /See:/ 'createBranchResponse' smart constructor.+data CreateBranchResponse =+ CreateBranchResponse'+ deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'CreateBranchResponse' with the minimum fields required to make a request.+--+createBranchResponse+ :: CreateBranchResponse+createBranchResponse = CreateBranchResponse'
+ gen/Network/AWS/CodeCommit/CreateRepository.hs view
@@ -0,0 +1,145 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.CodeCommit.CreateRepository+-- Copyright : (c) 2013-2015 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Creates a new, empty repository.+--+-- /See:/ <http://docs.aws.amazon.com/codecommit/latest/APIReference/API_CreateRepository.html AWS API Reference> for CreateRepository.+module Network.AWS.CodeCommit.CreateRepository+ (+ -- * Creating a Request+ createRepository+ , CreateRepository+ -- * Request Lenses+ , crRepositoryDescription+ , crRepositoryName++ -- * Destructuring the Response+ , createRepositoryResponse+ , CreateRepositoryResponse+ -- * Response Lenses+ , crrsRepositoryMetadata+ , crrsStatus+ ) where++import Network.AWS.CodeCommit.Types+import Network.AWS.CodeCommit.Types.Product+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | Represents the input of a create repository operation.+--+-- /See:/ 'createRepository' smart constructor.+data CreateRepository = CreateRepository'+ { _crRepositoryDescription :: !(Maybe Text)+ , _crRepositoryName :: !Text+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'CreateRepository' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'crRepositoryDescription'+--+-- * 'crRepositoryName'+createRepository+ :: Text -- ^ 'crRepositoryName'+ -> CreateRepository+createRepository pRepositoryName_ =+ CreateRepository'+ { _crRepositoryDescription = Nothing+ , _crRepositoryName = pRepositoryName_+ }++-- | A comment or description about the new repository.+crRepositoryDescription :: Lens' CreateRepository (Maybe Text)+crRepositoryDescription = lens _crRepositoryDescription (\ s a -> s{_crRepositoryDescription = a});++-- | The name of the new repository to be created.+--+-- The repository name must be unique across the calling AWS account. In+-- addition, repository names are restricted to alphanumeric characters.+-- The suffix \".git\" is prohibited.+crRepositoryName :: Lens' CreateRepository Text+crRepositoryName = lens _crRepositoryName (\ s a -> s{_crRepositoryName = a});++instance AWSRequest CreateRepository where+ type Sv CreateRepository = CodeCommit+ type Rs CreateRepository = CreateRepositoryResponse+ request = postJSON+ response+ = receiveJSON+ (\ s h x ->+ CreateRepositoryResponse' <$>+ (x .?> "repositoryMetadata") <*> (pure (fromEnum s)))++instance ToHeaders CreateRepository where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("CodeCommit_20150413.CreateRepository" ::+ ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON CreateRepository where+ toJSON CreateRepository'{..}+ = object+ ["repositoryDescription" .= _crRepositoryDescription,+ "repositoryName" .= _crRepositoryName]++instance ToPath CreateRepository where+ toPath = const "/"++instance ToQuery CreateRepository where+ toQuery = const mempty++-- | Represents the output of a create repository operation.+--+-- /See:/ 'createRepositoryResponse' smart constructor.+data CreateRepositoryResponse = CreateRepositoryResponse'+ { _crrsRepositoryMetadata :: !(Maybe RepositoryMetadata)+ , _crrsStatus :: !Int+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'CreateRepositoryResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'crrsRepositoryMetadata'+--+-- * 'crrsStatus'+createRepositoryResponse+ :: Int -- ^ 'crrsStatus'+ -> CreateRepositoryResponse+createRepositoryResponse pStatus_ =+ CreateRepositoryResponse'+ { _crrsRepositoryMetadata = Nothing+ , _crrsStatus = pStatus_+ }++-- | Information about the newly created repository.+crrsRepositoryMetadata :: Lens' CreateRepositoryResponse (Maybe RepositoryMetadata)+crrsRepositoryMetadata = lens _crrsRepositoryMetadata (\ s a -> s{_crrsRepositoryMetadata = a});++-- | The response status code.+crrsStatus :: Lens' CreateRepositoryResponse Int+crrsStatus = lens _crrsStatus (\ s a -> s{_crrsStatus = a});
+ gen/Network/AWS/CodeCommit/DeleteRepository.hs view
@@ -0,0 +1,135 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.CodeCommit.DeleteRepository+-- Copyright : (c) 2013-2015 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Deletes a repository. If a specified repository was already deleted, a+-- null repository ID will be returned.+--+-- Deleting a repository also deletes all associated objects and metadata.+-- After a repository is deleted, all future push calls to the deleted+-- repository will fail.+--+-- /See:/ <http://docs.aws.amazon.com/codecommit/latest/APIReference/API_DeleteRepository.html AWS API Reference> for DeleteRepository.+module Network.AWS.CodeCommit.DeleteRepository+ (+ -- * Creating a Request+ deleteRepository+ , DeleteRepository+ -- * Request Lenses+ , drRepositoryName++ -- * Destructuring the Response+ , deleteRepositoryResponse+ , DeleteRepositoryResponse+ -- * Response Lenses+ , drrsRepositoryId+ , drrsStatus+ ) where++import Network.AWS.CodeCommit.Types+import Network.AWS.CodeCommit.Types.Product+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | Represents the input of a delete repository operation.+--+-- /See:/ 'deleteRepository' smart constructor.+newtype DeleteRepository = DeleteRepository'+ { _drRepositoryName :: Text+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'DeleteRepository' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'drRepositoryName'+deleteRepository+ :: Text -- ^ 'drRepositoryName'+ -> DeleteRepository+deleteRepository pRepositoryName_ =+ DeleteRepository'+ { _drRepositoryName = pRepositoryName_+ }++-- | The name of the repository to delete.+drRepositoryName :: Lens' DeleteRepository Text+drRepositoryName = lens _drRepositoryName (\ s a -> s{_drRepositoryName = a});++instance AWSRequest DeleteRepository where+ type Sv DeleteRepository = CodeCommit+ type Rs DeleteRepository = DeleteRepositoryResponse+ request = postJSON+ response+ = receiveJSON+ (\ s h x ->+ DeleteRepositoryResponse' <$>+ (x .?> "repositoryId") <*> (pure (fromEnum s)))++instance ToHeaders DeleteRepository where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("CodeCommit_20150413.DeleteRepository" ::+ ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON DeleteRepository where+ toJSON DeleteRepository'{..}+ = object ["repositoryName" .= _drRepositoryName]++instance ToPath DeleteRepository where+ toPath = const "/"++instance ToQuery DeleteRepository where+ toQuery = const mempty++-- | Represents the output of a delete repository operation.+--+-- /See:/ 'deleteRepositoryResponse' smart constructor.+data DeleteRepositoryResponse = DeleteRepositoryResponse'+ { _drrsRepositoryId :: !(Maybe Text)+ , _drrsStatus :: !Int+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'DeleteRepositoryResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'drrsRepositoryId'+--+-- * 'drrsStatus'+deleteRepositoryResponse+ :: Int -- ^ 'drrsStatus'+ -> DeleteRepositoryResponse+deleteRepositoryResponse pStatus_ =+ DeleteRepositoryResponse'+ { _drrsRepositoryId = Nothing+ , _drrsStatus = pStatus_+ }++-- | The ID of the repository that was deleted.+drrsRepositoryId :: Lens' DeleteRepositoryResponse (Maybe Text)+drrsRepositoryId = lens _drrsRepositoryId (\ s a -> s{_drrsRepositoryId = a});++-- | The response status code.+drrsStatus :: Lens' DeleteRepositoryResponse Int+drrsStatus = lens _drrsStatus (\ s a -> s{_drrsStatus = a});
+ gen/Network/AWS/CodeCommit/GetBranch.hs view
@@ -0,0 +1,140 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.CodeCommit.GetBranch+-- Copyright : (c) 2013-2015 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Retrieves information about a repository branch, including its name and+-- the last commit ID.+--+-- /See:/ <http://docs.aws.amazon.com/codecommit/latest/APIReference/API_GetBranch.html AWS API Reference> for GetBranch.+module Network.AWS.CodeCommit.GetBranch+ (+ -- * Creating a Request+ getBranch+ , GetBranch+ -- * Request Lenses+ , gbBranchName+ , gbRepositoryName++ -- * Destructuring the Response+ , getBranchResponse+ , GetBranchResponse+ -- * Response Lenses+ , gbrsBranch+ , gbrsStatus+ ) where++import Network.AWS.CodeCommit.Types+import Network.AWS.CodeCommit.Types.Product+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | Represents the input of a get branch operation.+--+-- /See:/ 'getBranch' smart constructor.+data GetBranch = GetBranch'+ { _gbBranchName :: !(Maybe Text)+ , _gbRepositoryName :: !(Maybe Text)+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'GetBranch' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'gbBranchName'+--+-- * 'gbRepositoryName'+getBranch+ :: GetBranch+getBranch =+ GetBranch'+ { _gbBranchName = Nothing+ , _gbRepositoryName = Nothing+ }++-- | The name of the branch for which you want to retrieve information.+gbBranchName :: Lens' GetBranch (Maybe Text)+gbBranchName = lens _gbBranchName (\ s a -> s{_gbBranchName = a});++-- | Undocumented member.+gbRepositoryName :: Lens' GetBranch (Maybe Text)+gbRepositoryName = lens _gbRepositoryName (\ s a -> s{_gbRepositoryName = a});++instance AWSRequest GetBranch where+ type Sv GetBranch = CodeCommit+ type Rs GetBranch = GetBranchResponse+ request = postJSON+ response+ = receiveJSON+ (\ s h x ->+ GetBranchResponse' <$>+ (x .?> "branch") <*> (pure (fromEnum s)))++instance ToHeaders GetBranch where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("CodeCommit_20150413.GetBranch" :: ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON GetBranch where+ toJSON GetBranch'{..}+ = object+ ["branchName" .= _gbBranchName,+ "repositoryName" .= _gbRepositoryName]++instance ToPath GetBranch where+ toPath = const "/"++instance ToQuery GetBranch where+ toQuery = const mempty++-- | Represents the output of a get branch operation.+--+-- /See:/ 'getBranchResponse' smart constructor.+data GetBranchResponse = GetBranchResponse'+ { _gbrsBranch :: !(Maybe BranchInfo)+ , _gbrsStatus :: !Int+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'GetBranchResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'gbrsBranch'+--+-- * 'gbrsStatus'+getBranchResponse+ :: Int -- ^ 'gbrsStatus'+ -> GetBranchResponse+getBranchResponse pStatus_ =+ GetBranchResponse'+ { _gbrsBranch = Nothing+ , _gbrsStatus = pStatus_+ }++-- | The name of the branch.+gbrsBranch :: Lens' GetBranchResponse (Maybe BranchInfo)+gbrsBranch = lens _gbrsBranch (\ s a -> s{_gbrsBranch = a});++-- | The response status code.+gbrsStatus :: Lens' GetBranchResponse Int+gbrsStatus = lens _gbrsStatus (\ s a -> s{_gbrsStatus = a});
+ gen/Network/AWS/CodeCommit/GetRepository.hs view
@@ -0,0 +1,136 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.CodeCommit.GetRepository+-- Copyright : (c) 2013-2015 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Gets information about a repository.+--+-- The description field for a repository accepts all HTML characters and+-- all valid Unicode characters. Applications that do not HTML-encode the+-- description and display it in a web page could expose users to+-- potentially malicious code. Make sure that you HTML-encode the+-- description field in any application that uses this API to display the+-- repository description on a web page.+--+-- /See:/ <http://docs.aws.amazon.com/codecommit/latest/APIReference/API_GetRepository.html AWS API Reference> for GetRepository.+module Network.AWS.CodeCommit.GetRepository+ (+ -- * Creating a Request+ getRepository+ , GetRepository+ -- * Request Lenses+ , grRepositoryName++ -- * Destructuring the Response+ , getRepositoryResponse+ , GetRepositoryResponse+ -- * Response Lenses+ , grrsRepositoryMetadata+ , grrsStatus+ ) where++import Network.AWS.CodeCommit.Types+import Network.AWS.CodeCommit.Types.Product+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | Represents the input of a get repository operation.+--+-- /See:/ 'getRepository' smart constructor.+newtype GetRepository = GetRepository'+ { _grRepositoryName :: Text+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'GetRepository' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'grRepositoryName'+getRepository+ :: Text -- ^ 'grRepositoryName'+ -> GetRepository+getRepository pRepositoryName_ =+ GetRepository'+ { _grRepositoryName = pRepositoryName_+ }++-- | The name of the repository to get information about.+grRepositoryName :: Lens' GetRepository Text+grRepositoryName = lens _grRepositoryName (\ s a -> s{_grRepositoryName = a});++instance AWSRequest GetRepository where+ type Sv GetRepository = CodeCommit+ type Rs GetRepository = GetRepositoryResponse+ request = postJSON+ response+ = receiveJSON+ (\ s h x ->+ GetRepositoryResponse' <$>+ (x .?> "repositoryMetadata") <*> (pure (fromEnum s)))++instance ToHeaders GetRepository where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("CodeCommit_20150413.GetRepository" :: ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON GetRepository where+ toJSON GetRepository'{..}+ = object ["repositoryName" .= _grRepositoryName]++instance ToPath GetRepository where+ toPath = const "/"++instance ToQuery GetRepository where+ toQuery = const mempty++-- | Represents the output of a get repository operation.+--+-- /See:/ 'getRepositoryResponse' smart constructor.+data GetRepositoryResponse = GetRepositoryResponse'+ { _grrsRepositoryMetadata :: !(Maybe RepositoryMetadata)+ , _grrsStatus :: !Int+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'GetRepositoryResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'grrsRepositoryMetadata'+--+-- * 'grrsStatus'+getRepositoryResponse+ :: Int -- ^ 'grrsStatus'+ -> GetRepositoryResponse+getRepositoryResponse pStatus_ =+ GetRepositoryResponse'+ { _grrsRepositoryMetadata = Nothing+ , _grrsStatus = pStatus_+ }++-- | Information about the repository.+grrsRepositoryMetadata :: Lens' GetRepositoryResponse (Maybe RepositoryMetadata)+grrsRepositoryMetadata = lens _grrsRepositoryMetadata (\ s a -> s{_grrsRepositoryMetadata = a});++-- | The response status code.+grrsStatus :: Lens' GetRepositoryResponse Int+grrsStatus = lens _grrsStatus (\ s a -> s{_grrsStatus = a});
+ gen/Network/AWS/CodeCommit/ListBranches.hs view
@@ -0,0 +1,150 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.CodeCommit.ListBranches+-- Copyright : (c) 2013-2015 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Gets information about one or more branches in a repository.+--+-- /See:/ <http://docs.aws.amazon.com/codecommit/latest/APIReference/API_ListBranches.html AWS API Reference> for ListBranches.+module Network.AWS.CodeCommit.ListBranches+ (+ -- * Creating a Request+ listBranches+ , ListBranches+ -- * Request Lenses+ , lbNextToken+ , lbRepositoryName++ -- * Destructuring the Response+ , listBranchesResponse+ , ListBranchesResponse+ -- * Response Lenses+ , lbrsBranches+ , lbrsNextToken+ , lbrsStatus+ ) where++import Network.AWS.CodeCommit.Types+import Network.AWS.CodeCommit.Types.Product+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | Represents the input of a list branches operation.+--+-- /See:/ 'listBranches' smart constructor.+data ListBranches = ListBranches'+ { _lbNextToken :: !(Maybe Text)+ , _lbRepositoryName :: !Text+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'ListBranches' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'lbNextToken'+--+-- * 'lbRepositoryName'+listBranches+ :: Text -- ^ 'lbRepositoryName'+ -> ListBranches+listBranches pRepositoryName_ =+ ListBranches'+ { _lbNextToken = Nothing+ , _lbRepositoryName = pRepositoryName_+ }++-- | An enumeration token that allows the operation to batch the results.+lbNextToken :: Lens' ListBranches (Maybe Text)+lbNextToken = lens _lbNextToken (\ s a -> s{_lbNextToken = a});++-- | The name of the repository that contains the branches.+lbRepositoryName :: Lens' ListBranches Text+lbRepositoryName = lens _lbRepositoryName (\ s a -> s{_lbRepositoryName = a});++instance AWSRequest ListBranches where+ type Sv ListBranches = CodeCommit+ type Rs ListBranches = ListBranchesResponse+ request = postJSON+ response+ = receiveJSON+ (\ s h x ->+ ListBranchesResponse' <$>+ (x .?> "branches" .!@ mempty) <*> (x .?> "nextToken")+ <*> (pure (fromEnum s)))++instance ToHeaders ListBranches where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("CodeCommit_20150413.ListBranches" :: ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON ListBranches where+ toJSON ListBranches'{..}+ = object+ ["nextToken" .= _lbNextToken,+ "repositoryName" .= _lbRepositoryName]++instance ToPath ListBranches where+ toPath = const "/"++instance ToQuery ListBranches where+ toQuery = const mempty++-- | Represents the output of a list branches operation.+--+-- /See:/ 'listBranchesResponse' smart constructor.+data ListBranchesResponse = ListBranchesResponse'+ { _lbrsBranches :: !(Maybe [Text])+ , _lbrsNextToken :: !(Maybe Text)+ , _lbrsStatus :: !Int+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'ListBranchesResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'lbrsBranches'+--+-- * 'lbrsNextToken'+--+-- * 'lbrsStatus'+listBranchesResponse+ :: Int -- ^ 'lbrsStatus'+ -> ListBranchesResponse+listBranchesResponse pStatus_ =+ ListBranchesResponse'+ { _lbrsBranches = Nothing+ , _lbrsNextToken = Nothing+ , _lbrsStatus = pStatus_+ }++-- | The list of branch names.+lbrsBranches :: Lens' ListBranchesResponse [Text]+lbrsBranches = lens _lbrsBranches (\ s a -> s{_lbrsBranches = a}) . _Default . _Coerce;++-- | An enumeration token that returns the batch of the results.+lbrsNextToken :: Lens' ListBranchesResponse (Maybe Text)+lbrsNextToken = lens _lbrsNextToken (\ s a -> s{_lbrsNextToken = a});++-- | The response status code.+lbrsStatus :: Lens' ListBranchesResponse Int+lbrsStatus = lens _lbrsStatus (\ s a -> s{_lbrsStatus = a});
+ gen/Network/AWS/CodeCommit/ListRepositories.hs view
@@ -0,0 +1,166 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.CodeCommit.ListRepositories+-- Copyright : (c) 2013-2015 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Gets information about one or more repositories.+--+-- /See:/ <http://docs.aws.amazon.com/codecommit/latest/APIReference/API_ListRepositories.html AWS API Reference> for ListRepositories.+module Network.AWS.CodeCommit.ListRepositories+ (+ -- * Creating a Request+ listRepositories+ , ListRepositories+ -- * Request Lenses+ , lrNextToken+ , lrOrder+ , lrSortBy++ -- * Destructuring the Response+ , listRepositoriesResponse+ , ListRepositoriesResponse+ -- * Response Lenses+ , lrrsNextToken+ , lrrsRepositories+ , lrrsStatus+ ) where++import Network.AWS.CodeCommit.Types+import Network.AWS.CodeCommit.Types.Product+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | Represents the input of a list repositories operation.+--+-- /See:/ 'listRepositories' smart constructor.+data ListRepositories = ListRepositories'+ { _lrNextToken :: !(Maybe Text)+ , _lrOrder :: !(Maybe OrderEnum)+ , _lrSortBy :: !(Maybe SortByEnum)+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'ListRepositories' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'lrNextToken'+--+-- * 'lrOrder'+--+-- * 'lrSortBy'+listRepositories+ :: ListRepositories+listRepositories =+ ListRepositories'+ { _lrNextToken = Nothing+ , _lrOrder = Nothing+ , _lrSortBy = Nothing+ }++-- | An enumeration token that allows the operation to batch the results of+-- the operation. Batch sizes are 1,000 for list repository operations.+-- When the client sends the token back to AWS CodeCommit, another page of+-- 1,000 records is retrieved.+lrNextToken :: Lens' ListRepositories (Maybe Text)+lrNextToken = lens _lrNextToken (\ s a -> s{_lrNextToken = a});++-- | The order in which to sort the results of a list repositories operation.+lrOrder :: Lens' ListRepositories (Maybe OrderEnum)+lrOrder = lens _lrOrder (\ s a -> s{_lrOrder = a});++-- | The criteria used to sort the results of a list repositories operation.+lrSortBy :: Lens' ListRepositories (Maybe SortByEnum)+lrSortBy = lens _lrSortBy (\ s a -> s{_lrSortBy = a});++instance AWSRequest ListRepositories where+ type Sv ListRepositories = CodeCommit+ type Rs ListRepositories = ListRepositoriesResponse+ request = postJSON+ response+ = receiveJSON+ (\ s h x ->+ ListRepositoriesResponse' <$>+ (x .?> "nextToken") <*>+ (x .?> "repositories" .!@ mempty)+ <*> (pure (fromEnum s)))++instance ToHeaders ListRepositories where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("CodeCommit_20150413.ListRepositories" ::+ ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON ListRepositories where+ toJSON ListRepositories'{..}+ = object+ ["nextToken" .= _lrNextToken, "order" .= _lrOrder,+ "sortBy" .= _lrSortBy]++instance ToPath ListRepositories where+ toPath = const "/"++instance ToQuery ListRepositories where+ toQuery = const mempty++-- | Represents the output of a list repositories operation.+--+-- /See:/ 'listRepositoriesResponse' smart constructor.+data ListRepositoriesResponse = ListRepositoriesResponse'+ { _lrrsNextToken :: !(Maybe Text)+ , _lrrsRepositories :: !(Maybe [RepositoryNameIdPair])+ , _lrrsStatus :: !Int+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'ListRepositoriesResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'lrrsNextToken'+--+-- * 'lrrsRepositories'+--+-- * 'lrrsStatus'+listRepositoriesResponse+ :: Int -- ^ 'lrrsStatus'+ -> ListRepositoriesResponse+listRepositoriesResponse pStatus_ =+ ListRepositoriesResponse'+ { _lrrsNextToken = Nothing+ , _lrrsRepositories = Nothing+ , _lrrsStatus = pStatus_+ }++-- | An enumeration token that allows the operation to batch the results of+-- the operation. Batch sizes are 1,000 for list repository operations.+-- When the client sends the token back to AWS CodeCommit, another page of+-- 1,000 records is retrieved.+lrrsNextToken :: Lens' ListRepositoriesResponse (Maybe Text)+lrrsNextToken = lens _lrrsNextToken (\ s a -> s{_lrrsNextToken = a});++-- | Lists the repositories called by the list repositories operation.+lrrsRepositories :: Lens' ListRepositoriesResponse [RepositoryNameIdPair]+lrrsRepositories = lens _lrrsRepositories (\ s a -> s{_lrrsRepositories = a}) . _Default . _Coerce;++-- | The response status code.+lrrsStatus :: Lens' ListRepositoriesResponse Int+lrrsStatus = lens _lrrsStatus (\ s a -> s{_lrrsStatus = a});
+ gen/Network/AWS/CodeCommit/Types.hs view
@@ -0,0 +1,232 @@+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE TypeFamilies #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.CodeCommit.Types+-- Copyright : (c) 2013-2015 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+module Network.AWS.CodeCommit.Types+ (+ -- * Service+ CodeCommit++ -- * Errors+ , _InvalidContinuationTokenException+ , _EncryptionKeyNotFoundException+ , _RepositoryNameExistsException+ , _MaximumRepositoryNamesExceededException+ , _InvalidRepositoryDescriptionException+ , _BranchNameRequiredException+ , _InvalidBranchNameException+ , _EncryptionKeyUnavailableException+ , _InvalidOrderException+ , _BranchDoesNotExistException+ , _RepositoryNamesRequiredException+ , _RepositoryDoesNotExistException+ , _EncryptionIntegrityChecksFailedException+ , _EncryptionKeyAccessDeniedException+ , _BranchNameExistsException+ , _EncryptionKeyDisabledException+ , _InvalidSortByException+ , _CommitIdRequiredException+ , _InvalidCommitIdException+ , _CommitDoesNotExistException+ , _RepositoryLimitExceededException+ , _InvalidRepositoryNameException+ , _RepositoryNameRequiredException++ -- * OrderEnum+ , OrderEnum (..)++ -- * SortByEnum+ , SortByEnum (..)++ -- * BranchInfo+ , BranchInfo+ , branchInfo+ , biCommitId+ , biBranchName++ -- * RepositoryMetadata+ , RepositoryMetadata+ , repositoryMetadata+ , rmRepositoryDescription+ , rmLastModifiedDate+ , rmARN+ , rmCloneURLHTTP+ , rmAccountId+ , rmDefaultBranch+ , rmRepositoryId+ , rmCreationDate+ , rmRepositoryName+ , rmCloneURLSSH++ -- * RepositoryNameIdPair+ , RepositoryNameIdPair+ , repositoryNameIdPair+ , rnipRepositoryId+ , rnipRepositoryName+ ) where++import Network.AWS.CodeCommit.Types.Product+import Network.AWS.CodeCommit.Types.Sum+import Network.AWS.Prelude+import Network.AWS.Sign.V4++-- | Version @2015-04-13@ of the Amazon CodeCommit SDK.+data CodeCommit++instance AWSService CodeCommit where+ type Sg CodeCommit = V4+ service = const svc+ where+ svc =+ Service+ { _svcAbbrev = "CodeCommit"+ , _svcPrefix = "codecommit"+ , _svcVersion = "2015-04-13"+ , _svcEndpoint = defaultEndpoint svc+ , _svcTimeout = Just 70+ , _svcStatus = statusSuccess+ , _svcError = parseJSONError+ , _svcRetry = retry+ }+ retry =+ Exponential+ { _retryBase = 5.0e-2+ , _retryGrowth = 2+ , _retryAttempts = 5+ , _retryCheck = check+ }+ check e+ | has (hasCode "ThrottlingException" . hasStatus 400) e =+ Just "throttling_exception"+ | has (hasCode "Throttling" . hasStatus 400) e = Just "throttling"+ | has (hasStatus 503) e = Just "service_unavailable"+ | has (hasStatus 500) e = Just "general_server_error"+ | has (hasStatus 509) e = Just "limit_exceeded"+ | otherwise = Nothing++-- | The specified continuation token is not valid.+_InvalidContinuationTokenException :: AsError a => Getting (First ServiceError) a ServiceError+_InvalidContinuationTokenException =+ _ServiceError . hasCode "InvalidContinuationTokenException"++-- | No encryption key was found.+_EncryptionKeyNotFoundException :: AsError a => Getting (First ServiceError) a ServiceError+_EncryptionKeyNotFoundException =+ _ServiceError . hasCode "EncryptionKeyNotFoundException"++-- | The specified repository name already exists.+_RepositoryNameExistsException :: AsError a => Getting (First ServiceError) a ServiceError+_RepositoryNameExistsException =+ _ServiceError . hasCode "RepositoryNameExistsException"++-- | The maximum number of allowed repository names was exceeded. Currently,+-- this number is 25.+_MaximumRepositoryNamesExceededException :: AsError a => Getting (First ServiceError) a ServiceError+_MaximumRepositoryNamesExceededException =+ _ServiceError . hasCode "MaximumRepositoryNamesExceededException"++-- | The specified repository description is not valid.+_InvalidRepositoryDescriptionException :: AsError a => Getting (First ServiceError) a ServiceError+_InvalidRepositoryDescriptionException =+ _ServiceError . hasCode "InvalidRepositoryDescriptionException"++-- | A branch name is required but was not specified.+_BranchNameRequiredException :: AsError a => Getting (First ServiceError) a ServiceError+_BranchNameRequiredException =+ _ServiceError . hasCode "BranchNameRequiredException"++-- | The specified branch name is not valid.+_InvalidBranchNameException :: AsError a => Getting (First ServiceError) a ServiceError+_InvalidBranchNameException =+ _ServiceError . hasCode "InvalidBranchNameException"++-- | The encryption key is not available.+_EncryptionKeyUnavailableException :: AsError a => Getting (First ServiceError) a ServiceError+_EncryptionKeyUnavailableException =+ _ServiceError . hasCode "EncryptionKeyUnavailableException"++-- | The specified sort order is not valid.+_InvalidOrderException :: AsError a => Getting (First ServiceError) a ServiceError+_InvalidOrderException = _ServiceError . hasCode "InvalidOrderException"++-- | The specified branch does not exist.+_BranchDoesNotExistException :: AsError a => Getting (First ServiceError) a ServiceError+_BranchDoesNotExistException =+ _ServiceError . hasCode "BranchDoesNotExistException"++-- | A repository names object is required but was not specified.+_RepositoryNamesRequiredException :: AsError a => Getting (First ServiceError) a ServiceError+_RepositoryNamesRequiredException =+ _ServiceError . hasCode "RepositoryNamesRequiredException"++-- | The specified repository does not exist.+_RepositoryDoesNotExistException :: AsError a => Getting (First ServiceError) a ServiceError+_RepositoryDoesNotExistException =+ _ServiceError . hasCode "RepositoryDoesNotExistException"++-- | An encryption integrity check failed.+_EncryptionIntegrityChecksFailedException :: AsError a => Getting (First ServiceError) a ServiceError+_EncryptionIntegrityChecksFailedException =+ _ServiceError . hasCode "EncryptionIntegrityChecksFailedException"++-- | An encryption key could not be accessed.+_EncryptionKeyAccessDeniedException :: AsError a => Getting (First ServiceError) a ServiceError+_EncryptionKeyAccessDeniedException =+ _ServiceError . hasCode "EncryptionKeyAccessDeniedException"++-- | The specified branch name already exists.+_BranchNameExistsException :: AsError a => Getting (First ServiceError) a ServiceError+_BranchNameExistsException =+ _ServiceError . hasCode "BranchNameExistsException"++-- | The encryption key is disabled.+_EncryptionKeyDisabledException :: AsError a => Getting (First ServiceError) a ServiceError+_EncryptionKeyDisabledException =+ _ServiceError . hasCode "EncryptionKeyDisabledException"++-- | The specified sort by value is not valid.+_InvalidSortByException :: AsError a => Getting (First ServiceError) a ServiceError+_InvalidSortByException = _ServiceError . hasCode "InvalidSortByException"++-- | A commit ID was not specified.+_CommitIdRequiredException :: AsError a => Getting (First ServiceError) a ServiceError+_CommitIdRequiredException =+ _ServiceError . hasCode "CommitIdRequiredException"++-- | The specified commit ID is not valid.+_InvalidCommitIdException :: AsError a => Getting (First ServiceError) a ServiceError+_InvalidCommitIdException = _ServiceError . hasCode "InvalidCommitIdException"++-- | The specified commit does not exist or no commit was specified, and the+-- specified repository has no default branch.+_CommitDoesNotExistException :: AsError a => Getting (First ServiceError) a ServiceError+_CommitDoesNotExistException =+ _ServiceError . hasCode "CommitDoesNotExistException"++-- | A repository resource limit was exceeded.+_RepositoryLimitExceededException :: AsError a => Getting (First ServiceError) a ServiceError+_RepositoryLimitExceededException =+ _ServiceError . hasCode "RepositoryLimitExceededException"++-- | At least one specified repository name is not valid.+--+-- This exception only occurs when a specified repository name is not+-- valid. Other exceptions occur when a required repository parameter is+-- missing, or when a specified repository does not exist.+_InvalidRepositoryNameException :: AsError a => Getting (First ServiceError) a ServiceError+_InvalidRepositoryNameException =+ _ServiceError . hasCode "InvalidRepositoryNameException"++-- | A repository name is required but was not specified.+_RepositoryNameRequiredException :: AsError a => Getting (First ServiceError) a ServiceError+_RepositoryNameRequiredException =+ _ServiceError . hasCode "RepositoryNameRequiredException"
+ gen/Network/AWS/CodeCommit/Types/Product.hs view
@@ -0,0 +1,209 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.CodeCommit.Types.Product+-- Copyright : (c) 2013-2015 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+module Network.AWS.CodeCommit.Types.Product where++import Network.AWS.CodeCommit.Types.Sum+import Network.AWS.Prelude++-- | Returns information about a branch.+--+-- /See:/ 'branchInfo' smart constructor.+data BranchInfo = BranchInfo'+ { _biCommitId :: !(Maybe Text)+ , _biBranchName :: !(Maybe Text)+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'BranchInfo' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'biCommitId'+--+-- * 'biBranchName'+branchInfo+ :: BranchInfo+branchInfo =+ BranchInfo'+ { _biCommitId = Nothing+ , _biBranchName = Nothing+ }++-- | The ID of the last commit made to the branch.+biCommitId :: Lens' BranchInfo (Maybe Text)+biCommitId = lens _biCommitId (\ s a -> s{_biCommitId = a});++-- | The name of the branch.+biBranchName :: Lens' BranchInfo (Maybe Text)+biBranchName = lens _biBranchName (\ s a -> s{_biBranchName = a});++instance FromJSON BranchInfo where+ parseJSON+ = withObject "BranchInfo"+ (\ x ->+ BranchInfo' <$>+ (x .:? "commitId") <*> (x .:? "branchName"))++-- | Information about a repository.+--+-- /See:/ 'repositoryMetadata' smart constructor.+data RepositoryMetadata = RepositoryMetadata'+ { _rmRepositoryDescription :: !(Maybe Text)+ , _rmLastModifiedDate :: !(Maybe POSIX)+ , _rmARN :: !(Maybe Text)+ , _rmCloneURLHTTP :: !(Maybe Text)+ , _rmAccountId :: !(Maybe Text)+ , _rmDefaultBranch :: !(Maybe Text)+ , _rmRepositoryId :: !(Maybe Text)+ , _rmCreationDate :: !(Maybe POSIX)+ , _rmRepositoryName :: !(Maybe Text)+ , _rmCloneURLSSH :: !(Maybe Text)+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'RepositoryMetadata' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'rmRepositoryDescription'+--+-- * 'rmLastModifiedDate'+--+-- * 'rmARN'+--+-- * 'rmCloneURLHTTP'+--+-- * 'rmAccountId'+--+-- * 'rmDefaultBranch'+--+-- * 'rmRepositoryId'+--+-- * 'rmCreationDate'+--+-- * 'rmRepositoryName'+--+-- * 'rmCloneURLSSH'+repositoryMetadata+ :: RepositoryMetadata+repositoryMetadata =+ RepositoryMetadata'+ { _rmRepositoryDescription = Nothing+ , _rmLastModifiedDate = Nothing+ , _rmARN = Nothing+ , _rmCloneURLHTTP = Nothing+ , _rmAccountId = Nothing+ , _rmDefaultBranch = Nothing+ , _rmRepositoryId = Nothing+ , _rmCreationDate = Nothing+ , _rmRepositoryName = Nothing+ , _rmCloneURLSSH = Nothing+ }++-- | A comment or description about the repository.+rmRepositoryDescription :: Lens' RepositoryMetadata (Maybe Text)+rmRepositoryDescription = lens _rmRepositoryDescription (\ s a -> s{_rmRepositoryDescription = a});++-- | The date and time the repository was last modified, in timestamp format.+rmLastModifiedDate :: Lens' RepositoryMetadata (Maybe UTCTime)+rmLastModifiedDate = lens _rmLastModifiedDate (\ s a -> s{_rmLastModifiedDate = a}) . mapping _Time;++-- | The Amazon Resource Name (ARN) of the repository.+rmARN :: Lens' RepositoryMetadata (Maybe Text)+rmARN = lens _rmARN (\ s a -> s{_rmARN = a});++-- | The URL to use for cloning the repository over HTTPS.+rmCloneURLHTTP :: Lens' RepositoryMetadata (Maybe Text)+rmCloneURLHTTP = lens _rmCloneURLHTTP (\ s a -> s{_rmCloneURLHTTP = a});++-- | The ID of the AWS account associated with the repository.+rmAccountId :: Lens' RepositoryMetadata (Maybe Text)+rmAccountId = lens _rmAccountId (\ s a -> s{_rmAccountId = a});++-- | The repository\'s default branch name.+rmDefaultBranch :: Lens' RepositoryMetadata (Maybe Text)+rmDefaultBranch = lens _rmDefaultBranch (\ s a -> s{_rmDefaultBranch = a});++-- | The ID of the repository.+rmRepositoryId :: Lens' RepositoryMetadata (Maybe Text)+rmRepositoryId = lens _rmRepositoryId (\ s a -> s{_rmRepositoryId = a});++-- | The date and time the repository was created, in timestamp format.+rmCreationDate :: Lens' RepositoryMetadata (Maybe UTCTime)+rmCreationDate = lens _rmCreationDate (\ s a -> s{_rmCreationDate = a}) . mapping _Time;++-- | The repository\'s name.+rmRepositoryName :: Lens' RepositoryMetadata (Maybe Text)+rmRepositoryName = lens _rmRepositoryName (\ s a -> s{_rmRepositoryName = a});++-- | The URL to use for cloning the repository over SSH.+rmCloneURLSSH :: Lens' RepositoryMetadata (Maybe Text)+rmCloneURLSSH = lens _rmCloneURLSSH (\ s a -> s{_rmCloneURLSSH = a});++instance FromJSON RepositoryMetadata where+ parseJSON+ = withObject "RepositoryMetadata"+ (\ x ->+ RepositoryMetadata' <$>+ (x .:? "repositoryDescription") <*>+ (x .:? "lastModifiedDate")+ <*> (x .:? "Arn")+ <*> (x .:? "cloneUrlHttp")+ <*> (x .:? "accountId")+ <*> (x .:? "defaultBranch")+ <*> (x .:? "repositoryId")+ <*> (x .:? "creationDate")+ <*> (x .:? "repositoryName")+ <*> (x .:? "cloneUrlSsh"))++-- | Information about a repository name and ID.+--+-- /See:/ 'repositoryNameIdPair' smart constructor.+data RepositoryNameIdPair = RepositoryNameIdPair'+ { _rnipRepositoryId :: !(Maybe Text)+ , _rnipRepositoryName :: !(Maybe Text)+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'RepositoryNameIdPair' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'rnipRepositoryId'+--+-- * 'rnipRepositoryName'+repositoryNameIdPair+ :: RepositoryNameIdPair+repositoryNameIdPair =+ RepositoryNameIdPair'+ { _rnipRepositoryId = Nothing+ , _rnipRepositoryName = Nothing+ }++-- | The ID associated with the repository name.+rnipRepositoryId :: Lens' RepositoryNameIdPair (Maybe Text)+rnipRepositoryId = lens _rnipRepositoryId (\ s a -> s{_rnipRepositoryId = a});++-- | Undocumented member.+rnipRepositoryName :: Lens' RepositoryNameIdPair (Maybe Text)+rnipRepositoryName = lens _rnipRepositoryName (\ s a -> s{_rnipRepositoryName = a});++instance FromJSON RepositoryNameIdPair where+ parseJSON+ = withObject "RepositoryNameIdPair"+ (\ x ->+ RepositoryNameIdPair' <$>+ (x .:? "repositoryId") <*> (x .:? "repositoryName"))
+ gen/Network/AWS/CodeCommit/Types/Sum.hs view
@@ -0,0 +1,70 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE OverloadedStrings #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.CodeCommit.Types.Sum+-- Copyright : (c) 2013-2015 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+module Network.AWS.CodeCommit.Types.Sum where++import Network.AWS.Prelude++data OrderEnum+ = Ascending+ | Descending+ deriving (Eq,Ord,Read,Show,Enum,Data,Typeable,Generic)++instance FromText OrderEnum where+ parser = takeLowerText >>= \case+ "ascending" -> pure Ascending+ "descending" -> pure Descending+ e -> fromTextError $ "Failure parsing OrderEnum from value: '" <> e+ <> "'. Accepted values: ascending, descending"++instance ToText OrderEnum where+ toText = \case+ Ascending -> "ascending"+ Descending -> "descending"++instance Hashable OrderEnum+instance ToByteString OrderEnum+instance ToQuery OrderEnum+instance ToHeader OrderEnum++instance ToJSON OrderEnum where+ toJSON = toJSONText++data SortByEnum+ = LastModifiedDate+ | RepositoryName+ deriving (Eq,Ord,Read,Show,Enum,Data,Typeable,Generic)++instance FromText SortByEnum where+ parser = takeLowerText >>= \case+ "lastmodifieddate" -> pure LastModifiedDate+ "repositoryname" -> pure RepositoryName+ e -> fromTextError $ "Failure parsing SortByEnum from value: '" <> e+ <> "'. Accepted values: lastmodifieddate, repositoryname"++instance ToText SortByEnum where+ toText = \case+ LastModifiedDate -> "lastmodifieddate"+ RepositoryName -> "repositoryname"++instance Hashable SortByEnum+instance ToByteString SortByEnum+instance ToQuery SortByEnum+instance ToHeader SortByEnum++instance ToJSON SortByEnum where+ toJSON = toJSONText
+ gen/Network/AWS/CodeCommit/UpdateDefaultBranch.hs view
@@ -0,0 +1,119 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.CodeCommit.UpdateDefaultBranch+-- Copyright : (c) 2013-2015 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Sets or changes the default branch name for the specified repository.+--+-- If you use this operation to change the default branch name to the+-- current default branch name, a success message is returned even though+-- the default branch did not change.+--+-- /See:/ <http://docs.aws.amazon.com/codecommit/latest/APIReference/API_UpdateDefaultBranch.html AWS API Reference> for UpdateDefaultBranch.+module Network.AWS.CodeCommit.UpdateDefaultBranch+ (+ -- * Creating a Request+ updateDefaultBranch+ , UpdateDefaultBranch+ -- * Request Lenses+ , udbRepositoryName+ , udbDefaultBranchName++ -- * Destructuring the Response+ , updateDefaultBranchResponse+ , UpdateDefaultBranchResponse+ ) where++import Network.AWS.CodeCommit.Types+import Network.AWS.CodeCommit.Types.Product+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | Represents the input of an update default branch operation.+--+-- /See:/ 'updateDefaultBranch' smart constructor.+data UpdateDefaultBranch = UpdateDefaultBranch'+ { _udbRepositoryName :: !Text+ , _udbDefaultBranchName :: !Text+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'UpdateDefaultBranch' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'udbRepositoryName'+--+-- * 'udbDefaultBranchName'+updateDefaultBranch+ :: Text -- ^ 'udbRepositoryName'+ -> Text -- ^ 'udbDefaultBranchName'+ -> UpdateDefaultBranch+updateDefaultBranch pRepositoryName_ pDefaultBranchName_ =+ UpdateDefaultBranch'+ { _udbRepositoryName = pRepositoryName_+ , _udbDefaultBranchName = pDefaultBranchName_+ }++-- | The name of the repository to set or change the default branch for.+udbRepositoryName :: Lens' UpdateDefaultBranch Text+udbRepositoryName = lens _udbRepositoryName (\ s a -> s{_udbRepositoryName = a});++-- | The name of the branch to set as the default.+udbDefaultBranchName :: Lens' UpdateDefaultBranch Text+udbDefaultBranchName = lens _udbDefaultBranchName (\ s a -> s{_udbDefaultBranchName = a});++instance AWSRequest UpdateDefaultBranch where+ type Sv UpdateDefaultBranch = CodeCommit+ type Rs UpdateDefaultBranch =+ UpdateDefaultBranchResponse+ request = postJSON+ response = receiveNull UpdateDefaultBranchResponse'++instance ToHeaders UpdateDefaultBranch where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("CodeCommit_20150413.UpdateDefaultBranch" ::+ ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON UpdateDefaultBranch where+ toJSON UpdateDefaultBranch'{..}+ = object+ ["repositoryName" .= _udbRepositoryName,+ "defaultBranchName" .= _udbDefaultBranchName]++instance ToPath UpdateDefaultBranch where+ toPath = const "/"++instance ToQuery UpdateDefaultBranch where+ toQuery = const mempty++-- | /See:/ 'updateDefaultBranchResponse' smart constructor.+data UpdateDefaultBranchResponse =+ UpdateDefaultBranchResponse'+ deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'UpdateDefaultBranchResponse' with the minimum fields required to make a request.+--+updateDefaultBranchResponse+ :: UpdateDefaultBranchResponse+updateDefaultBranchResponse = UpdateDefaultBranchResponse'
+ gen/Network/AWS/CodeCommit/UpdateRepositoryDescription.hs view
@@ -0,0 +1,124 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.CodeCommit.UpdateRepositoryDescription+-- Copyright : (c) 2013-2015 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Sets or changes the comment or description for a repository.+--+-- The description field for a repository accepts all HTML characters and+-- all valid Unicode characters. Applications that do not HTML-encode the+-- description and display it in a web page could expose users to+-- potentially malicious code. Make sure that you HTML-encode the+-- description field in any application that uses this API to display the+-- repository description on a web page.+--+-- /See:/ <http://docs.aws.amazon.com/codecommit/latest/APIReference/API_UpdateRepositoryDescription.html AWS API Reference> for UpdateRepositoryDescription.+module Network.AWS.CodeCommit.UpdateRepositoryDescription+ (+ -- * Creating a Request+ updateRepositoryDescription+ , UpdateRepositoryDescription+ -- * Request Lenses+ , urdRepositoryDescription+ , urdRepositoryName++ -- * Destructuring the Response+ , updateRepositoryDescriptionResponse+ , UpdateRepositoryDescriptionResponse+ ) where++import Network.AWS.CodeCommit.Types+import Network.AWS.CodeCommit.Types.Product+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | Represents the input of an update repository description operation.+--+-- /See:/ 'updateRepositoryDescription' smart constructor.+data UpdateRepositoryDescription = UpdateRepositoryDescription'+ { _urdRepositoryDescription :: !(Maybe Text)+ , _urdRepositoryName :: !Text+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'UpdateRepositoryDescription' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'urdRepositoryDescription'+--+-- * 'urdRepositoryName'+updateRepositoryDescription+ :: Text -- ^ 'urdRepositoryName'+ -> UpdateRepositoryDescription+updateRepositoryDescription pRepositoryName_ =+ UpdateRepositoryDescription'+ { _urdRepositoryDescription = Nothing+ , _urdRepositoryName = pRepositoryName_+ }++-- | The new comment or description for the specified repository.+urdRepositoryDescription :: Lens' UpdateRepositoryDescription (Maybe Text)+urdRepositoryDescription = lens _urdRepositoryDescription (\ s a -> s{_urdRepositoryDescription = a});++-- | The name of the repository to set or change the comment or description+-- for.+urdRepositoryName :: Lens' UpdateRepositoryDescription Text+urdRepositoryName = lens _urdRepositoryName (\ s a -> s{_urdRepositoryName = a});++instance AWSRequest UpdateRepositoryDescription where+ type Sv UpdateRepositoryDescription = CodeCommit+ type Rs UpdateRepositoryDescription =+ UpdateRepositoryDescriptionResponse+ request = postJSON+ response+ = receiveNull UpdateRepositoryDescriptionResponse'++instance ToHeaders UpdateRepositoryDescription where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("CodeCommit_20150413.UpdateRepositoryDescription" ::+ ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON UpdateRepositoryDescription where+ toJSON UpdateRepositoryDescription'{..}+ = object+ ["repositoryDescription" .=+ _urdRepositoryDescription,+ "repositoryName" .= _urdRepositoryName]++instance ToPath UpdateRepositoryDescription where+ toPath = const "/"++instance ToQuery UpdateRepositoryDescription where+ toQuery = const mempty++-- | /See:/ 'updateRepositoryDescriptionResponse' smart constructor.+data UpdateRepositoryDescriptionResponse =+ UpdateRepositoryDescriptionResponse'+ deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'UpdateRepositoryDescriptionResponse' with the minimum fields required to make a request.+--+updateRepositoryDescriptionResponse+ :: UpdateRepositoryDescriptionResponse+updateRepositoryDescriptionResponse = UpdateRepositoryDescriptionResponse'
+ gen/Network/AWS/CodeCommit/UpdateRepositoryName.hs view
@@ -0,0 +1,114 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.CodeCommit.UpdateRepositoryName+-- Copyright : (c) 2013-2015 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Renames a repository.+--+-- /See:/ <http://docs.aws.amazon.com/codecommit/latest/APIReference/API_UpdateRepositoryName.html AWS API Reference> for UpdateRepositoryName.+module Network.AWS.CodeCommit.UpdateRepositoryName+ (+ -- * Creating a Request+ updateRepositoryName+ , UpdateRepositoryName+ -- * Request Lenses+ , urnOldName+ , urnNewName++ -- * Destructuring the Response+ , updateRepositoryNameResponse+ , UpdateRepositoryNameResponse+ ) where++import Network.AWS.CodeCommit.Types+import Network.AWS.CodeCommit.Types.Product+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | Represents the input of an update repository description operation.+--+-- /See:/ 'updateRepositoryName' smart constructor.+data UpdateRepositoryName = UpdateRepositoryName'+ { _urnOldName :: !Text+ , _urnNewName :: !Text+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'UpdateRepositoryName' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'urnOldName'+--+-- * 'urnNewName'+updateRepositoryName+ :: Text -- ^ 'urnOldName'+ -> Text -- ^ 'urnNewName'+ -> UpdateRepositoryName+updateRepositoryName pOldName_ pNewName_ =+ UpdateRepositoryName'+ { _urnOldName = pOldName_+ , _urnNewName = pNewName_+ }++-- | Undocumented member.+urnOldName :: Lens' UpdateRepositoryName Text+urnOldName = lens _urnOldName (\ s a -> s{_urnOldName = a});++-- | Undocumented member.+urnNewName :: Lens' UpdateRepositoryName Text+urnNewName = lens _urnNewName (\ s a -> s{_urnNewName = a});++instance AWSRequest UpdateRepositoryName where+ type Sv UpdateRepositoryName = CodeCommit+ type Rs UpdateRepositoryName =+ UpdateRepositoryNameResponse+ request = postJSON+ response = receiveNull UpdateRepositoryNameResponse'++instance ToHeaders UpdateRepositoryName where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("CodeCommit_20150413.UpdateRepositoryName" ::+ ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON UpdateRepositoryName where+ toJSON UpdateRepositoryName'{..}+ = object+ ["oldName" .= _urnOldName, "newName" .= _urnNewName]++instance ToPath UpdateRepositoryName where+ toPath = const "/"++instance ToQuery UpdateRepositoryName where+ toQuery = const mempty++-- | /See:/ 'updateRepositoryNameResponse' smart constructor.+data UpdateRepositoryNameResponse =+ UpdateRepositoryNameResponse'+ deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'UpdateRepositoryNameResponse' with the minimum fields required to make a request.+--+updateRepositoryNameResponse+ :: UpdateRepositoryNameResponse+updateRepositoryNameResponse = UpdateRepositoryNameResponse'
+ gen/Network/AWS/CodeCommit/Waiters.hs view
@@ -0,0 +1,20 @@+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.CodeCommit.Waiters+-- Copyright : (c) 2013-2015 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+module Network.AWS.CodeCommit.Waiters where++import Network.AWS.CodeCommit.Types+import Network.AWS.Prelude+import Network.AWS.Waiter
+ test/Main.hs view
@@ -0,0 +1,21 @@+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- |+-- Module : Main+-- Copyright : (c) 2013-2015 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+module Main (main) where++import Test.Tasty+import Test.AWS.CodeCommit+import Test.AWS.CodeCommit.Internal++main :: IO ()+main = defaultMain $ testGroup "CodeCommit"+ [ testGroup "tests" tests+ , testGroup "fixtures" fixtures+ ]
+ test/Test/AWS/CodeCommit.hs view
@@ -0,0 +1,26 @@+{-# LANGUAGE OverloadedStrings #-}++-- Module : Test.AWS.CodeCommit+-- Copyright : (c) 2013-2015 Brendan Hay+-- License : This Source Code Form is subject to the terms of+-- the Mozilla Public License, v. 2.0.+-- A copy of the MPL can be found in the LICENSE file or+-- you can obtain it at http://mozilla.org/MPL/2.0/.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : experimental+-- Portability : non-portable (GHC extensions)++module Test.AWS.CodeCommit+ ( tests+ , fixtures+ ) where++import Network.AWS.CodeCommit+import Test.AWS.Gen.CodeCommit+import Test.Tasty++tests :: [TestTree]+tests = []++fixtures :: [TestTree]+fixtures = []
+ test/Test/AWS/CodeCommit/Internal.hs view
@@ -0,0 +1,16 @@+{-# LANGUAGE OverloadedStrings #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Module : Test.AWS.CodeCommit.Internal+-- Copyright : (c) 2013-2015 Brendan Hay+-- License : This Source Code Form is subject to the terms of+-- the Mozilla Public License, v. 2.0.+-- A copy of the MPL can be found in the LICENSE file or+-- you can obtain it at http://mozilla.org/MPL/2.0/.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : experimental+-- Portability : non-portable (GHC extensions)++module Test.AWS.CodeCommit.Internal where++import Test.AWS.Prelude
+ test/Test/AWS/Gen/CodeCommit.hs view
@@ -0,0 +1,226 @@+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-orphans #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Test.AWS.Gen.CodeCommit+-- Copyright : (c) 2013-2015 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+module Test.AWS.Gen.CodeCommit where++import Data.Proxy+import Test.AWS.Fixture+import Test.AWS.Prelude+import Test.Tasty+import Network.AWS.CodeCommit+import Test.AWS.CodeCommit.Internal++-- Auto-generated: the actual test selection needs to be manually placed into+-- the top-level so that real test data can be incrementally added.+--+-- This commented snippet is what the entire set should look like:++-- fixtures :: TestTree+-- fixtures =+-- [ testGroup "request"+-- [ testUpdateRepositoryName $+-- updateRepositoryName+--+-- , testGetBranch $+-- getBranch+--+-- , testUpdateRepositoryDescription $+-- updateRepositoryDescription+--+-- , testListBranches $+-- listBranches+--+-- , testCreateBranch $+-- createBranch+--+-- , testUpdateDefaultBranch $+-- updateDefaultBranch+--+-- , testCreateRepository $+-- createRepository+--+-- , testListRepositories $+-- listRepositories+--+-- , testGetRepository $+-- getRepository+--+-- , testDeleteRepository $+-- deleteRepository+--+-- , testBatchGetRepositories $+-- batchGetRepositories+--+-- ]++-- , testGroup "response"+-- [ testUpdateRepositoryNameResponse $+-- updateRepositoryNameResponse+--+-- , testGetBranchResponse $+-- getBranchResponse+--+-- , testUpdateRepositoryDescriptionResponse $+-- updateRepositoryDescriptionResponse+--+-- , testListBranchesResponse $+-- listBranchesResponse+--+-- , testCreateBranchResponse $+-- createBranchResponse+--+-- , testUpdateDefaultBranchResponse $+-- updateDefaultBranchResponse+--+-- , testCreateRepositoryResponse $+-- createRepositoryResponse+--+-- , testListRepositoriesResponse $+-- listRepositoriesResponse+--+-- , testGetRepositoryResponse $+-- getRepositoryResponse+--+-- , testDeleteRepositoryResponse $+-- deleteRepositoryResponse+--+-- , testBatchGetRepositoriesResponse $+-- batchGetRepositoriesResponse+--+-- ]+-- ]++-- Requests++testUpdateRepositoryName :: UpdateRepositoryName -> TestTree+testUpdateRepositoryName = req+ "UpdateRepositoryName"+ "fixture/UpdateRepositoryName"++testGetBranch :: GetBranch -> TestTree+testGetBranch = req+ "GetBranch"+ "fixture/GetBranch"++testUpdateRepositoryDescription :: UpdateRepositoryDescription -> TestTree+testUpdateRepositoryDescription = req+ "UpdateRepositoryDescription"+ "fixture/UpdateRepositoryDescription"++testListBranches :: ListBranches -> TestTree+testListBranches = req+ "ListBranches"+ "fixture/ListBranches"++testCreateBranch :: CreateBranch -> TestTree+testCreateBranch = req+ "CreateBranch"+ "fixture/CreateBranch"++testUpdateDefaultBranch :: UpdateDefaultBranch -> TestTree+testUpdateDefaultBranch = req+ "UpdateDefaultBranch"+ "fixture/UpdateDefaultBranch"++testCreateRepository :: CreateRepository -> TestTree+testCreateRepository = req+ "CreateRepository"+ "fixture/CreateRepository"++testListRepositories :: ListRepositories -> TestTree+testListRepositories = req+ "ListRepositories"+ "fixture/ListRepositories"++testGetRepository :: GetRepository -> TestTree+testGetRepository = req+ "GetRepository"+ "fixture/GetRepository"++testDeleteRepository :: DeleteRepository -> TestTree+testDeleteRepository = req+ "DeleteRepository"+ "fixture/DeleteRepository"++testBatchGetRepositories :: BatchGetRepositories -> TestTree+testBatchGetRepositories = req+ "BatchGetRepositories"+ "fixture/BatchGetRepositories"++-- Responses++testUpdateRepositoryNameResponse :: UpdateRepositoryNameResponse -> TestTree+testUpdateRepositoryNameResponse = res+ "UpdateRepositoryNameResponse"+ "fixture/UpdateRepositoryNameResponse"+ (Proxy :: Proxy UpdateRepositoryName)++testGetBranchResponse :: GetBranchResponse -> TestTree+testGetBranchResponse = res+ "GetBranchResponse"+ "fixture/GetBranchResponse"+ (Proxy :: Proxy GetBranch)++testUpdateRepositoryDescriptionResponse :: UpdateRepositoryDescriptionResponse -> TestTree+testUpdateRepositoryDescriptionResponse = res+ "UpdateRepositoryDescriptionResponse"+ "fixture/UpdateRepositoryDescriptionResponse"+ (Proxy :: Proxy UpdateRepositoryDescription)++testListBranchesResponse :: ListBranchesResponse -> TestTree+testListBranchesResponse = res+ "ListBranchesResponse"+ "fixture/ListBranchesResponse"+ (Proxy :: Proxy ListBranches)++testCreateBranchResponse :: CreateBranchResponse -> TestTree+testCreateBranchResponse = res+ "CreateBranchResponse"+ "fixture/CreateBranchResponse"+ (Proxy :: Proxy CreateBranch)++testUpdateDefaultBranchResponse :: UpdateDefaultBranchResponse -> TestTree+testUpdateDefaultBranchResponse = res+ "UpdateDefaultBranchResponse"+ "fixture/UpdateDefaultBranchResponse"+ (Proxy :: Proxy UpdateDefaultBranch)++testCreateRepositoryResponse :: CreateRepositoryResponse -> TestTree+testCreateRepositoryResponse = res+ "CreateRepositoryResponse"+ "fixture/CreateRepositoryResponse"+ (Proxy :: Proxy CreateRepository)++testListRepositoriesResponse :: ListRepositoriesResponse -> TestTree+testListRepositoriesResponse = res+ "ListRepositoriesResponse"+ "fixture/ListRepositoriesResponse"+ (Proxy :: Proxy ListRepositories)++testGetRepositoryResponse :: GetRepositoryResponse -> TestTree+testGetRepositoryResponse = res+ "GetRepositoryResponse"+ "fixture/GetRepositoryResponse"+ (Proxy :: Proxy GetRepository)++testDeleteRepositoryResponse :: DeleteRepositoryResponse -> TestTree+testDeleteRepositoryResponse = res+ "DeleteRepositoryResponse"+ "fixture/DeleteRepositoryResponse"+ (Proxy :: Proxy DeleteRepository)++testBatchGetRepositoriesResponse :: BatchGetRepositoriesResponse -> TestTree+testBatchGetRepositoriesResponse = res+ "BatchGetRepositoriesResponse"+ "fixture/BatchGetRepositoriesResponse"+ (Proxy :: Proxy BatchGetRepositories)