packages feed

amazonka-codestar-notifications (empty) → 2.0

raw patch · 64 files changed

+5797/−0 lines, 64 filesdep +amazonka-codestar-notificationsdep +amazonka-coredep +amazonka-test

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

Files

+ LICENSE view
@@ -0,0 +1,367 @@+Mozilla Public License Version 2.0+==================================++1. Definitions+--------------++1.1. "Contributor"+    means each individual or legal entity that creates, contributes to+    the creation of, or owns Covered Software.++1.2. "Contributor Version"+    means the combination of the Contributions of others (if any) used+    by a Contributor and that particular Contributor's Contribution.++1.3. "Contribution"+    means Covered Software of a particular Contributor.++1.4. "Covered Software"+    means Source Code Form to which the initial Contributor has attached+    the notice in Exhibit A, the Executable Form of such Source Code+    Form, and Modifications of such Source Code Form, in each case+    including portions thereof.++1.5. "Incompatible With Secondary Licenses"+    means++    (a) that the initial Contributor has attached the notice described+        in Exhibit B to the Covered Software; or++    (b) that the Covered Software was made available under the terms of+        version 1.1 or earlier of the License, but not also under the+        terms of a Secondary License.++1.6. "Executable Form"+    means any form of the work other than Source Code Form.++1.7. "Larger Work"+    means a work that combines Covered Software with other material, in+    a separate file or files, that is not Covered Software.++1.8. "License"+    means this document.++1.9. "Licensable"+    means having the right to grant, to the maximum extent possible,+    whether at the time of the initial grant or subsequently, any and+    all of the rights conveyed by this License.++1.10. "Modifications"+    means any of the following:++    (a) any file in Source Code Form that results from an addition to,+        deletion from, or modification of the contents of Covered+        Software; or++    (b) any new file in Source Code Form that contains any Covered+        Software.++1.11. "Patent Claims" of a Contributor+    means any patent claim(s), including without limitation, method,+    process, and apparatus claims, in any patent Licensable by such+    Contributor that would be infringed, but for the grant of the+    License, by the making, using, selling, offering for sale, having+    made, import, or transfer of either its Contributions or its+    Contributor Version.++1.12. "Secondary License"+    means either the GNU General Public License, Version 2.0, the GNU+    Lesser General Public License, Version 2.1, the GNU Affero General+    Public License, Version 3.0, or any later versions of those+    licenses.++1.13. "Source Code Form"+    means the form of the work preferred for making modifications.++1.14. "You" (or "Your")+    means an individual or a legal entity exercising rights under this+    License. For legal entities, "You" includes any entity that+    controls, is controlled by, or is under common control with You. For+    purposes of this definition, "control" means (a) the power, direct+    or indirect, to cause the direction or management of such entity,+    whether by contract or otherwise, or (b) ownership of more than+    fifty percent (50%) of the outstanding shares or beneficial+    ownership of such entity.++2. License Grants and Conditions+--------------------------------++2.1. Grants++Each Contributor hereby grants You a world-wide, royalty-free,+non-exclusive license:++(a) under intellectual property rights (other than patent or trademark)+    Licensable by such Contributor to use, reproduce, make available,+    modify, display, perform, distribute, and otherwise exploit its+    Contributions, either on an unmodified basis, with Modifications, or+    as part of a Larger Work; and++(b) under Patent Claims of such Contributor to make, use, sell, offer+    for sale, have made, import, and otherwise transfer either its+    Contributions or its Contributor Version.++2.2. Effective Date++The licenses granted in Section 2.1 with respect to any Contribution+become effective for each Contribution on the date the Contributor first+distributes such Contribution.++2.3. Limitations on Grant Scope++The licenses granted in this Section 2 are the only rights granted under+this License. No additional rights or licenses will be implied from the+distribution or licensing of Covered Software under this License.+Notwithstanding Section 2.1(b) above, no patent license is granted by a+Contributor:++(a) for any code that a Contributor has removed from Covered Software;+    or++(b) for infringements caused by: (i) Your and any other third party's+    modifications of Covered Software, or (ii) the combination of its+    Contributions with other software (except as part of its Contributor+    Version); or++(c) under Patent Claims infringed by Covered Software in the absence of+    its Contributions.++This License does not grant any rights in the trademarks, service marks,+or logos of any Contributor (except as may be necessary to comply with+the notice requirements in Section 3.4).++2.4. Subsequent Licenses++No Contributor makes additional grants as a result of Your choice to+distribute the Covered Software under a subsequent version of this+License (see Section 10.2) or under the terms of a Secondary License (if+permitted under the terms of Section 3.3).++2.5. Representation++Each Contributor represents that the Contributor believes its+Contributions are its original creation(s) or it has sufficient rights+to grant the rights to its Contributions conveyed by this License.++2.6. Fair Use++This License is not intended to limit any rights You have under+applicable copyright doctrines of fair use, fair dealing, or other+equivalents.++2.7. Conditions++Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted+in Section 2.1.++3. Responsibilities+-------------------++3.1. Distribution of Source Form++All distribution of Covered Software in Source Code Form, including any+Modifications that You create or to which You contribute, must be under+the terms of this License. You must inform recipients that the Source+Code Form of the Covered Software is governed by the terms of this+License, and how they can obtain a copy of this License. You may not+attempt to alter or restrict the recipients' rights in the Source Code+Form.++3.2. Distribution of Executable Form++If You distribute Covered Software in Executable Form then:++(a) such Covered Software must also be made available in Source Code+    Form, as described in Section 3.1, and You must inform recipients of+    the Executable Form how they can obtain a copy of such Source Code+    Form by reasonable means in a timely manner, at a charge no more+    than the cost of distribution to the recipient; and++(b) You may distribute such Executable Form under the terms of this+    License, or sublicense it under different terms, provided that the+    license for the Executable Form does not attempt to limit or alter+    the recipients' rights in the Source Code Form under this License.++3.3. Distribution of a Larger Work++You may create and distribute a Larger Work under terms of Your choice,+provided that You also comply with the requirements of this License for+the Covered Software. If the Larger Work is a combination of Covered+Software with a work governed by one or more Secondary Licenses, and the+Covered Software is not Incompatible With Secondary Licenses, this+License permits You to additionally distribute such Covered Software+under the terms of such Secondary License(s), so that the recipient of+the Larger Work may, at their option, further distribute the Covered+Software under the terms of either this License or such Secondary+License(s).++3.4. Notices++You may not remove or alter the substance of any license notices+(including copyright notices, patent notices, disclaimers of warranty,+or limitations of liability) contained within the Source Code Form of+the Covered Software, except that You may alter any license notices to+the extent required to remedy known factual inaccuracies.++3.5. Application of Additional Terms++You may choose to offer, and to charge a fee for, warranty, support,+indemnity or liability obligations to one or more recipients of Covered+Software. However, You may do so only on Your own behalf, and not on+behalf of any Contributor. You must make it absolutely clear that any+such warranty, support, indemnity, or liability obligation is offered by+You alone, and You hereby agree to indemnify every Contributor for any+liability incurred by such Contributor as a result of warranty, support,+indemnity or liability terms You offer. You may include additional+disclaimers of warranty and limitations of liability specific to any+jurisdiction.++4. Inability to Comply Due to Statute or Regulation+---------------------------------------------------++If it is impossible for You to comply with any of the terms of this+License with respect to some or all of the Covered Software due to+statute, judicial order, or regulation then You must: (a) comply with+the terms of this License to the maximum extent possible; and (b)+describe the limitations and the code they affect. Such description must+be placed in a text file included with all distributions of the Covered+Software under this License. Except to the extent prohibited by statute+or regulation, such description must be sufficiently detailed for a+recipient of ordinary skill to be able to understand it.++5. Termination+--------------++5.1. The rights granted under this License will terminate automatically+if You fail to comply with any of its terms. However, if You become+compliant, then the rights granted under this License from a particular+Contributor are reinstated (a) provisionally, unless and until such+Contributor explicitly and finally terminates Your grants, and (b) on an+ongoing basis, if such Contributor fails to notify You of the+non-compliance by some reasonable means prior to 60 days after You have+come back into compliance. Moreover, Your grants from a particular+Contributor are reinstated on an ongoing basis if such Contributor+notifies You of the non-compliance by some reasonable means, this is the+first time You have received notice of non-compliance with this License+from such Contributor, and You become compliant prior to 30 days after+Your receipt of the notice.++5.2. If You initiate litigation against any entity by asserting a patent+infringement claim (excluding declaratory judgment actions,+counter-claims, and cross-claims) alleging that a Contributor Version+directly or indirectly infringes any patent, then the rights granted to+You by any and all Contributors for the Covered Software under Section+2.1 of this License shall terminate.++5.3. In the event of termination under Sections 5.1 or 5.2 above, all+end user license agreements (excluding distributors and resellers) which+have been validly granted by You or Your distributors under this License+prior to termination shall survive termination.++************************************************************************+*                                                                      *+*  6. Disclaimer of Warranty                                           *+*  -------------------------                                           *+*                                                                      *+*  Covered Software is provided under this License on an "as is"       *+*  basis, without warranty of any kind, either expressed, implied, or  *+*  statutory, including, without limitation, warranties that the       *+*  Covered Software is free of defects, merchantable, fit for a        *+*  particular purpose or non-infringing. The entire risk as to the     *+*  quality and performance of the Covered Software is with You.        *+*  Should any Covered Software prove defective in any respect, You     *+*  (not any Contributor) assume the cost of any necessary servicing,   *+*  repair, or correction. This disclaimer of warranty constitutes an   *+*  essential part of this License. No use of any Covered Software is   *+*  authorized under this License except under this disclaimer.         *+*                                                                      *+************************************************************************++************************************************************************+*                                                                      *+*  7. Limitation of Liability                                          *+*  --------------------------                                          *+*                                                                      *+*  Under no circumstances and under no legal theory, whether tort      *+*  (including negligence), contract, or otherwise, shall any           *+*  Contributor, or anyone who distributes Covered Software as          *+*  permitted above, be liable to You for any direct, indirect,         *+*  special, incidental, or consequential damages of any character      *+*  including, without limitation, damages for lost profits, loss of    *+*  goodwill, work stoppage, computer failure or malfunction, or any    *+*  and all other commercial damages or losses, even if such party      *+*  shall have been informed of the possibility of such damages. This   *+*  limitation of liability shall not apply to liability for death or   *+*  personal injury resulting from such party's negligence to the       *+*  extent applicable law prohibits such limitation. Some               *+*  jurisdictions do not allow the exclusion or limitation of           *+*  incidental or consequential damages, so this exclusion and          *+*  limitation may not apply to You.                                    *+*                                                                      *+************************************************************************++8. Litigation+-------------++Any litigation relating to this License may be brought only in the+courts of a jurisdiction where the defendant maintains its principal+place of business and such litigation shall be governed by laws of that+jurisdiction, without reference to its conflict-of-law provisions.+Nothing in this Section shall prevent a party's ability to bring+cross-claims or counter-claims.++9. Miscellaneous+----------------++This License represents the complete agreement concerning the subject+matter hereof. If any provision of this License is held to be+unenforceable, such provision shall be reformed only to the extent+necessary to make it enforceable. Any law or regulation which provides+that the language of a contract shall be construed against the drafter+shall not be used to construe this License against a Contributor.++10. Versions of the License+---------------------------++10.1. New Versions++Mozilla Foundation is the license steward. Except as provided in Section+10.3, no one other than the license steward has the right to modify or+publish new versions of this License. Each version will be given a+distinguishing version number.++10.2. Effect of New Versions++You may distribute the Covered Software under the terms of the version+of the License under which You originally received the Covered Software,+or under the terms of any subsequent version published by the license+steward.++10.3. Modified Versions++If you create software not governed by this License, and you want to+create a new license for such software, you may create and use a+modified version of this License if you rename the license and remove+any references to the name of the license steward (except to note that+such modified license differs from this License).++10.4. Distributing Source Code Form that is Incompatible With Secondary+Licenses++If You choose to distribute Source Code Form that is Incompatible With+Secondary Licenses under the terms of this version of the License, the+notice described in Exhibit B of this License must be attached.++Exhibit A - Source Code Form License Notice+-------------------------------------------++  This Source Code Form is subject to the terms of the Mozilla Public+  License, v. 2.0. If a copy of the MPL was not distributed with this+  file, You can obtain one at http://mozilla.org/MPL/2.0/.++If it is not possible or desirable to put the notice in a particular+file, then You may include the notice in a location (such as a LICENSE+file in a relevant directory) where a recipient would be likely to look+for such a notice.++You may add additional accurate notices of copyright ownership.
+ README.md view
@@ -0,0 +1,44 @@+# Amazon CodeStar Notifications SDK++* [Version](#version)+* [Description](#description)+* [Contribute](#contribute)+* [Licence](#licence)+++## Version+ +`2.0` - Derived from API version @2019-10-15@ of the AWS service descriptions, licensed under Apache 2.0.++## Description++Documentation is available via [Hackage](http://hackage.haskell.org/package/amazonka-codestar-notifications)+and the [AWS API Reference](https://aws.amazon.com/documentation/).++The types from this library are intended to be used with [amazonka](http://hackage.haskell.org/package/amazonka),+which provides mechanisms for specifying AuthN/AuthZ information, sending requests,+and receiving responses.++Lenses are used for constructing and manipulating types,+due to the depth of nesting of AWS types and transparency regarding+de/serialisation into more palatable Haskell values.+The provided lenses should be compatible with any of the major lens libraries+[lens](http://hackage.haskell.org/package/lens) or [lens-family-core](http://hackage.haskell.org/package/lens-family-core).++See [Amazonka.CodeStarNotifications](http://hackage.haskell.org/package/amazonka-codestar-notifications/docs/Amazonka-CodeStarNotifications.html)+or [the AWS documentation](https://aws.amazon.com/documentation/) to get started.+++## Contribute++For any problems, comments, or feedback please create an issue [here on GitHub](https://github.com/brendanhay/amazonka/issues).++> _Note:_ this library is an auto-generated Haskell package. Please see `amazonka-gen` for more information.+++## Licence++`amazonka-codestar-notifications` is released under the [Mozilla Public License Version 2.0](http://www.mozilla.org/MPL/).++Parts of the code are derived from AWS service descriptions, licensed under Apache 2.0.+Source files subject to this contain an additional licensing clause in their header.
+ amazonka-codestar-notifications.cabal view
@@ -0,0 +1,109 @@+cabal-version:      2.2+name:               amazonka-codestar-notifications+version:            2.0+synopsis:           Amazon CodeStar Notifications SDK.+homepage:           https://github.com/brendanhay/amazonka+bug-reports:        https://github.com/brendanhay/amazonka/issues+license:            MPL-2.0+license-file:       LICENSE+author:             Brendan Hay+maintainer:+  Brendan Hay <brendan.g.hay+amazonka@gmail.com>, Jack Kelly <jack@jackkelly.name>++copyright:          Copyright (c) 2013-2023 Brendan Hay+category:           AWS+build-type:         Simple+extra-source-files:+  fixture/*.proto+  fixture/*.yaml+  README.md+  src/.gitkeep++description:+  Derived from API version @2019-10-15@ of the AWS service descriptions, licensed under Apache 2.0.+  .+  The types from this library are intended to be used with <http://hackage.haskell.org/package/amazonka amazonka>,+  which provides mechanisms for specifying AuthN/AuthZ information, sending requests, and receiving responses.+  .+  It is recommended to use generic lenses or optics from packages such as <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify optional fields and deconstruct responses.+  .+  Generated lenses can be found in "Amazonka.CodeStarNotifications.Lens" and are+  suitable for use with a lens package such as <http://hackage.haskell.org/package/lens lens> or <http://hackage.haskell.org/package/lens-family-core lens-family-core>.+  .+  See "Amazonka.CodeStarNotifications" and the <https://aws.amazon.com/documentation/ AWS documentation> to get started.++source-repository head+  type:     git+  location: git://github.com/brendanhay/amazonka.git+  subdir:   amazonka-codestar-notifications++library+  default-language: Haskell2010+  hs-source-dirs:   src gen+  ghc-options:+    -Wall -fwarn-incomplete-uni-patterns+    -fwarn-incomplete-record-updates -funbox-strict-fields++  exposed-modules:+    Amazonka.CodeStarNotifications+    Amazonka.CodeStarNotifications.CreateNotificationRule+    Amazonka.CodeStarNotifications.DeleteNotificationRule+    Amazonka.CodeStarNotifications.DeleteTarget+    Amazonka.CodeStarNotifications.DescribeNotificationRule+    Amazonka.CodeStarNotifications.Lens+    Amazonka.CodeStarNotifications.ListEventTypes+    Amazonka.CodeStarNotifications.ListNotificationRules+    Amazonka.CodeStarNotifications.ListTagsForResource+    Amazonka.CodeStarNotifications.ListTargets+    Amazonka.CodeStarNotifications.Subscribe+    Amazonka.CodeStarNotifications.TagResource+    Amazonka.CodeStarNotifications.Types+    Amazonka.CodeStarNotifications.Types.DetailType+    Amazonka.CodeStarNotifications.Types.EventTypeSummary+    Amazonka.CodeStarNotifications.Types.ListEventTypesFilter+    Amazonka.CodeStarNotifications.Types.ListEventTypesFilterName+    Amazonka.CodeStarNotifications.Types.ListNotificationRulesFilter+    Amazonka.CodeStarNotifications.Types.ListNotificationRulesFilterName+    Amazonka.CodeStarNotifications.Types.ListTargetsFilter+    Amazonka.CodeStarNotifications.Types.ListTargetsFilterName+    Amazonka.CodeStarNotifications.Types.NotificationRuleStatus+    Amazonka.CodeStarNotifications.Types.NotificationRuleSummary+    Amazonka.CodeStarNotifications.Types.Target+    Amazonka.CodeStarNotifications.Types.TargetStatus+    Amazonka.CodeStarNotifications.Types.TargetSummary+    Amazonka.CodeStarNotifications.Unsubscribe+    Amazonka.CodeStarNotifications.UntagResource+    Amazonka.CodeStarNotifications.UpdateNotificationRule+    Amazonka.CodeStarNotifications.Waiters++  build-depends:+    , amazonka-core  >=2.0  && <2.1+    , base           >=4.12 && <5++test-suite amazonka-codestar-notifications-test+  type:             exitcode-stdio-1.0+  default-language: Haskell2010+  hs-source-dirs:   test+  main-is:          Main.hs+  ghc-options:      -Wall -threaded++  -- This section is encoded by the template and any modules added by+  -- hand outside these namespaces will not correctly be added to the+  -- distribution package.+  other-modules:+    Test.Amazonka.CodeStarNotifications+    Test.Amazonka.CodeStarNotifications.Internal+    Test.Amazonka.Gen.CodeStarNotifications++  build-depends:+    , amazonka-codestar-notifications+    , amazonka-core                    >=2.0 && <2.1+    , amazonka-test                    >=2.0 && <2.1+    , base+    , bytestring+    , case-insensitive+    , tasty+    , tasty-hunit+    , text+    , time+    , unordered-containers
+ fixture/CreateNotificationRule.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/codestar-notifications/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  codestar-notifications.us-east-1.amazonaws.com+  Content-Type:          application/x-www-form-urlencoded; charset=utf-8+  X-Amz-Content-SHA256:  abcdef+  X-Amz-Date:            20091028T223200Z+body:+  ''
+ fixture/CreateNotificationRuleResponse.proto view
+ fixture/DeleteNotificationRule.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/codestar-notifications/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  codestar-notifications.us-east-1.amazonaws.com+  Content-Type:          application/x-www-form-urlencoded; charset=utf-8+  X-Amz-Content-SHA256:  abcdef+  X-Amz-Date:            20091028T223200Z+body:+  ''
+ fixture/DeleteNotificationRuleResponse.proto view
+ fixture/DeleteTarget.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/codestar-notifications/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  codestar-notifications.us-east-1.amazonaws.com+  Content-Type:          application/x-www-form-urlencoded; charset=utf-8+  X-Amz-Content-SHA256:  abcdef+  X-Amz-Date:            20091028T223200Z+body:+  ''
+ fixture/DeleteTargetResponse.proto view
+ fixture/DescribeNotificationRule.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/codestar-notifications/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  codestar-notifications.us-east-1.amazonaws.com+  Content-Type:          application/x-www-form-urlencoded; charset=utf-8+  X-Amz-Content-SHA256:  abcdef+  X-Amz-Date:            20091028T223200Z+body:+  ''
+ fixture/DescribeNotificationRuleResponse.proto view
+ fixture/ListEventTypes.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/codestar-notifications/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  codestar-notifications.us-east-1.amazonaws.com+  Content-Type:          application/x-www-form-urlencoded; charset=utf-8+  X-Amz-Content-SHA256:  abcdef+  X-Amz-Date:            20091028T223200Z+body:+  ''
+ fixture/ListEventTypesResponse.proto view
+ fixture/ListNotificationRules.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/codestar-notifications/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  codestar-notifications.us-east-1.amazonaws.com+  Content-Type:          application/x-www-form-urlencoded; charset=utf-8+  X-Amz-Content-SHA256:  abcdef+  X-Amz-Date:            20091028T223200Z+body:+  ''
+ fixture/ListNotificationRulesResponse.proto view
+ fixture/ListTagsForResource.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/codestar-notifications/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  codestar-notifications.us-east-1.amazonaws.com+  Content-Type:          application/x-www-form-urlencoded; charset=utf-8+  X-Amz-Content-SHA256:  abcdef+  X-Amz-Date:            20091028T223200Z+body:+  ''
+ fixture/ListTagsForResourceResponse.proto view
+ fixture/ListTargets.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/codestar-notifications/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  codestar-notifications.us-east-1.amazonaws.com+  Content-Type:          application/x-www-form-urlencoded; charset=utf-8+  X-Amz-Content-SHA256:  abcdef+  X-Amz-Date:            20091028T223200Z+body:+  ''
+ fixture/ListTargetsResponse.proto view
+ fixture/Subscribe.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/codestar-notifications/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  codestar-notifications.us-east-1.amazonaws.com+  Content-Type:          application/x-www-form-urlencoded; charset=utf-8+  X-Amz-Content-SHA256:  abcdef+  X-Amz-Date:            20091028T223200Z+body:+  ''
+ fixture/SubscribeResponse.proto view
+ fixture/TagResource.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/codestar-notifications/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  codestar-notifications.us-east-1.amazonaws.com+  Content-Type:          application/x-www-form-urlencoded; charset=utf-8+  X-Amz-Content-SHA256:  abcdef+  X-Amz-Date:            20091028T223200Z+body:+  ''
+ fixture/TagResourceResponse.proto view
+ fixture/Unsubscribe.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/codestar-notifications/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  codestar-notifications.us-east-1.amazonaws.com+  Content-Type:          application/x-www-form-urlencoded; charset=utf-8+  X-Amz-Content-SHA256:  abcdef+  X-Amz-Date:            20091028T223200Z+body:+  ''
+ fixture/UnsubscribeResponse.proto view
+ fixture/UntagResource.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/codestar-notifications/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  codestar-notifications.us-east-1.amazonaws.com+  Content-Type:          application/x-www-form-urlencoded; charset=utf-8+  X-Amz-Content-SHA256:  abcdef+  X-Amz-Date:            20091028T223200Z+body:+  ''
+ fixture/UntagResourceResponse.proto view
+ fixture/UpdateNotificationRule.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/codestar-notifications/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  codestar-notifications.us-east-1.amazonaws.com+  Content-Type:          application/x-www-form-urlencoded; charset=utf-8+  X-Amz-Content-SHA256:  abcdef+  X-Amz-Date:            20091028T223200Z+body:+  ''
+ fixture/UpdateNotificationRuleResponse.proto view
+ gen/Amazonka/CodeStarNotifications.hs view
@@ -0,0 +1,272 @@+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- |+-- Module      : Amazonka.CodeStarNotifications+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Derived from API version @2019-10-15@ of the AWS service descriptions, licensed under Apache 2.0.+--+-- This AWS CodeStar Notifications API Reference provides descriptions and+-- usage examples of the operations and data types for the AWS CodeStar+-- Notifications API. You can use the AWS CodeStar Notifications API to+-- work with the following objects:+--+-- Notification rules, by calling the following:+--+-- -   CreateNotificationRule, which creates a notification rule for a+--     resource in your account.+--+-- -   DeleteNotificationRule, which deletes a notification rule.+--+-- -   DescribeNotificationRule, which provides information about a+--     notification rule.+--+-- -   ListNotificationRules, which lists the notification rules associated+--     with your account.+--+-- -   UpdateNotificationRule, which changes the name, events, or targets+--     associated with a notification rule.+--+-- -   Subscribe, which subscribes a target to a notification rule.+--+-- -   Unsubscribe, which removes a target from a notification rule.+--+-- Targets, by calling the following:+--+-- -   DeleteTarget, which removes a notification rule target from a+--     notification rule.+--+-- -   ListTargets, which lists the targets associated with a notification+--     rule.+--+-- Events, by calling the following:+--+-- -   ListEventTypes, which lists the event types you can include in a+--     notification rule.+--+-- Tags, by calling the following:+--+-- -   ListTagsForResource, which lists the tags already associated with a+--     notification rule in your account.+--+-- -   TagResource, which associates a tag you provide with a notification+--     rule in your account.+--+-- -   UntagResource, which removes a tag from a notification rule in your+--     account.+--+-- For information about how to use AWS CodeStar Notifications, see the+-- <https://docs.aws.amazon.com/dtconsole/latest/userguide/what-is-dtconsole.html Amazon Web Services Developer Tools Console User Guide>.+module Amazonka.CodeStarNotifications+  ( -- * Service Configuration+    defaultService,++    -- * Errors+    -- $errors++    -- ** AccessDeniedException+    _AccessDeniedException,++    -- ** ConcurrentModificationException+    _ConcurrentModificationException,++    -- ** ConfigurationException+    _ConfigurationException,++    -- ** InvalidNextTokenException+    _InvalidNextTokenException,++    -- ** LimitExceededException+    _LimitExceededException,++    -- ** ResourceAlreadyExistsException+    _ResourceAlreadyExistsException,++    -- ** ResourceNotFoundException+    _ResourceNotFoundException,++    -- ** ValidationException+    _ValidationException,++    -- * Waiters+    -- $waiters++    -- * Operations+    -- $operations++    -- ** CreateNotificationRule+    CreateNotificationRule (CreateNotificationRule'),+    newCreateNotificationRule,+    CreateNotificationRuleResponse (CreateNotificationRuleResponse'),+    newCreateNotificationRuleResponse,++    -- ** DeleteNotificationRule+    DeleteNotificationRule (DeleteNotificationRule'),+    newDeleteNotificationRule,+    DeleteNotificationRuleResponse (DeleteNotificationRuleResponse'),+    newDeleteNotificationRuleResponse,++    -- ** DeleteTarget+    DeleteTarget (DeleteTarget'),+    newDeleteTarget,+    DeleteTargetResponse (DeleteTargetResponse'),+    newDeleteTargetResponse,++    -- ** DescribeNotificationRule+    DescribeNotificationRule (DescribeNotificationRule'),+    newDescribeNotificationRule,+    DescribeNotificationRuleResponse (DescribeNotificationRuleResponse'),+    newDescribeNotificationRuleResponse,++    -- ** ListEventTypes (Paginated)+    ListEventTypes (ListEventTypes'),+    newListEventTypes,+    ListEventTypesResponse (ListEventTypesResponse'),+    newListEventTypesResponse,++    -- ** ListNotificationRules (Paginated)+    ListNotificationRules (ListNotificationRules'),+    newListNotificationRules,+    ListNotificationRulesResponse (ListNotificationRulesResponse'),+    newListNotificationRulesResponse,++    -- ** ListTagsForResource+    ListTagsForResource (ListTagsForResource'),+    newListTagsForResource,+    ListTagsForResourceResponse (ListTagsForResourceResponse'),+    newListTagsForResourceResponse,++    -- ** ListTargets (Paginated)+    ListTargets (ListTargets'),+    newListTargets,+    ListTargetsResponse (ListTargetsResponse'),+    newListTargetsResponse,++    -- ** Subscribe+    Subscribe (Subscribe'),+    newSubscribe,+    SubscribeResponse (SubscribeResponse'),+    newSubscribeResponse,++    -- ** TagResource+    TagResource (TagResource'),+    newTagResource,+    TagResourceResponse (TagResourceResponse'),+    newTagResourceResponse,++    -- ** Unsubscribe+    Unsubscribe (Unsubscribe'),+    newUnsubscribe,+    UnsubscribeResponse (UnsubscribeResponse'),+    newUnsubscribeResponse,++    -- ** UntagResource+    UntagResource (UntagResource'),+    newUntagResource,+    UntagResourceResponse (UntagResourceResponse'),+    newUntagResourceResponse,++    -- ** UpdateNotificationRule+    UpdateNotificationRule (UpdateNotificationRule'),+    newUpdateNotificationRule,+    UpdateNotificationRuleResponse (UpdateNotificationRuleResponse'),+    newUpdateNotificationRuleResponse,++    -- * Types++    -- ** DetailType+    DetailType (..),++    -- ** ListEventTypesFilterName+    ListEventTypesFilterName (..),++    -- ** ListNotificationRulesFilterName+    ListNotificationRulesFilterName (..),++    -- ** ListTargetsFilterName+    ListTargetsFilterName (..),++    -- ** NotificationRuleStatus+    NotificationRuleStatus (..),++    -- ** TargetStatus+    TargetStatus (..),++    -- ** EventTypeSummary+    EventTypeSummary (EventTypeSummary'),+    newEventTypeSummary,++    -- ** ListEventTypesFilter+    ListEventTypesFilter (ListEventTypesFilter'),+    newListEventTypesFilter,++    -- ** ListNotificationRulesFilter+    ListNotificationRulesFilter (ListNotificationRulesFilter'),+    newListNotificationRulesFilter,++    -- ** ListTargetsFilter+    ListTargetsFilter (ListTargetsFilter'),+    newListTargetsFilter,++    -- ** NotificationRuleSummary+    NotificationRuleSummary (NotificationRuleSummary'),+    newNotificationRuleSummary,++    -- ** Target+    Target (Target'),+    newTarget,++    -- ** TargetSummary+    TargetSummary (TargetSummary'),+    newTargetSummary,+  )+where++import Amazonka.CodeStarNotifications.CreateNotificationRule+import Amazonka.CodeStarNotifications.DeleteNotificationRule+import Amazonka.CodeStarNotifications.DeleteTarget+import Amazonka.CodeStarNotifications.DescribeNotificationRule+import Amazonka.CodeStarNotifications.Lens+import Amazonka.CodeStarNotifications.ListEventTypes+import Amazonka.CodeStarNotifications.ListNotificationRules+import Amazonka.CodeStarNotifications.ListTagsForResource+import Amazonka.CodeStarNotifications.ListTargets+import Amazonka.CodeStarNotifications.Subscribe+import Amazonka.CodeStarNotifications.TagResource+import Amazonka.CodeStarNotifications.Types+import Amazonka.CodeStarNotifications.Unsubscribe+import Amazonka.CodeStarNotifications.UntagResource+import Amazonka.CodeStarNotifications.UpdateNotificationRule+import Amazonka.CodeStarNotifications.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 'CodeStarNotifications'.++-- $operations+-- Some AWS operations return results that are incomplete and require subsequent+-- requests in order to obtain the entire result set. The process of sending+-- subsequent requests to continue where a previous request left off is called+-- pagination. For example, the 'ListObjects' operation of Amazon S3 returns up to+-- 1000 objects at a time, and you must send subsequent requests with the+-- appropriate Marker in order to retrieve the next page of results.+--+-- Operations that have an 'AWSPager' instance can transparently perform subsequent+-- requests, correctly setting Markers and other request facets to iterate through+-- the entire result set of a truncated API operation. Operations which support+-- this have an additional note in the documentation.+--+-- Many operations have the ability to filter results on the server side. See the+-- individual operation parameters for details.++-- $waiters+-- Waiters poll by repeatedly sending a request until some remote success condition+-- configured by the 'Wait' specification is fulfilled. The 'Wait' specification+-- determines how many attempts should be made, in addition to delay and retry strategies.
+ gen/Amazonka/CodeStarNotifications/CreateNotificationRule.hs view
@@ -0,0 +1,341 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Amazonka.CodeStarNotifications.CreateNotificationRule+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Creates a notification rule for a resource. The rule specifies the+-- events you want notifications about and the targets (such as Chatbot+-- topics or Chatbot clients configured for Slack) where you want to+-- receive them.+module Amazonka.CodeStarNotifications.CreateNotificationRule+  ( -- * Creating a Request+    CreateNotificationRule (..),+    newCreateNotificationRule,++    -- * Request Lenses+    createNotificationRule_clientRequestToken,+    createNotificationRule_status,+    createNotificationRule_tags,+    createNotificationRule_name,+    createNotificationRule_eventTypeIds,+    createNotificationRule_resource,+    createNotificationRule_targets,+    createNotificationRule_detailType,++    -- * Destructuring the Response+    CreateNotificationRuleResponse (..),+    newCreateNotificationRuleResponse,++    -- * Response Lenses+    createNotificationRuleResponse_arn,+    createNotificationRuleResponse_httpStatus,+  )+where++import Amazonka.CodeStarNotifications.Types+import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newCreateNotificationRule' smart constructor.+data CreateNotificationRule = CreateNotificationRule'+  { -- | A unique, client-generated idempotency token that, when provided in a+    -- request, ensures the request cannot be repeated with a changed+    -- parameter. If a request with the same parameters is received and a token+    -- is included, the request returns information about the initial request+    -- that used that token.+    --+    -- The Amazon Web Services SDKs prepopulate client request tokens. If you+    -- are using an Amazon Web Services SDK, an idempotency token is created+    -- for you.+    clientRequestToken :: Prelude.Maybe Prelude.Text,+    -- | The status of the notification rule. The default value is @ENABLED@. If+    -- the status is set to @DISABLED@, notifications aren\'t sent for the+    -- notification rule.+    status :: Prelude.Maybe NotificationRuleStatus,+    -- | A list of tags to apply to this notification rule. Key names cannot+    -- start with \"@aws@\".+    tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),+    -- | The name for the notification rule. Notification rule names must be+    -- unique in your Amazon Web Services account.+    name :: Data.Sensitive Prelude.Text,+    -- | A list of event types associated with this notification rule. For a list+    -- of allowed events, see EventTypeSummary.+    eventTypeIds :: [Prelude.Text],+    -- | The Amazon Resource Name (ARN) of the resource to associate with the+    -- notification rule. Supported resources include pipelines in+    -- CodePipeline, repositories in CodeCommit, and build projects in+    -- CodeBuild.+    resource :: Prelude.Text,+    -- | A list of Amazon Resource Names (ARNs) of Amazon Simple Notification+    -- Service topics and Chatbot clients to associate with the notification+    -- rule.+    targets :: [Target],+    -- | The level of detail to include in the notifications for this resource.+    -- @BASIC@ will include only the contents of the event as it would appear+    -- in Amazon CloudWatch. @FULL@ will include any supplemental information+    -- provided by AWS CodeStar Notifications and\/or the service for the+    -- resource for which the notification is created.+    detailType :: DetailType+  }+  deriving (Prelude.Eq, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'CreateNotificationRule' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'clientRequestToken', 'createNotificationRule_clientRequestToken' - A unique, client-generated idempotency token that, when provided in a+-- request, ensures the request cannot be repeated with a changed+-- parameter. If a request with the same parameters is received and a token+-- is included, the request returns information about the initial request+-- that used that token.+--+-- The Amazon Web Services SDKs prepopulate client request tokens. If you+-- are using an Amazon Web Services SDK, an idempotency token is created+-- for you.+--+-- 'status', 'createNotificationRule_status' - The status of the notification rule. The default value is @ENABLED@. If+-- the status is set to @DISABLED@, notifications aren\'t sent for the+-- notification rule.+--+-- 'tags', 'createNotificationRule_tags' - A list of tags to apply to this notification rule. Key names cannot+-- start with \"@aws@\".+--+-- 'name', 'createNotificationRule_name' - The name for the notification rule. Notification rule names must be+-- unique in your Amazon Web Services account.+--+-- 'eventTypeIds', 'createNotificationRule_eventTypeIds' - A list of event types associated with this notification rule. For a list+-- of allowed events, see EventTypeSummary.+--+-- 'resource', 'createNotificationRule_resource' - The Amazon Resource Name (ARN) of the resource to associate with the+-- notification rule. Supported resources include pipelines in+-- CodePipeline, repositories in CodeCommit, and build projects in+-- CodeBuild.+--+-- 'targets', 'createNotificationRule_targets' - A list of Amazon Resource Names (ARNs) of Amazon Simple Notification+-- Service topics and Chatbot clients to associate with the notification+-- rule.+--+-- 'detailType', 'createNotificationRule_detailType' - The level of detail to include in the notifications for this resource.+-- @BASIC@ will include only the contents of the event as it would appear+-- in Amazon CloudWatch. @FULL@ will include any supplemental information+-- provided by AWS CodeStar Notifications and\/or the service for the+-- resource for which the notification is created.+newCreateNotificationRule ::+  -- | 'name'+  Prelude.Text ->+  -- | 'resource'+  Prelude.Text ->+  -- | 'detailType'+  DetailType ->+  CreateNotificationRule+newCreateNotificationRule+  pName_+  pResource_+  pDetailType_ =+    CreateNotificationRule'+      { clientRequestToken =+          Prelude.Nothing,+        status = Prelude.Nothing,+        tags = Prelude.Nothing,+        name = Data._Sensitive Lens.# pName_,+        eventTypeIds = Prelude.mempty,+        resource = pResource_,+        targets = Prelude.mempty,+        detailType = pDetailType_+      }++-- | A unique, client-generated idempotency token that, when provided in a+-- request, ensures the request cannot be repeated with a changed+-- parameter. If a request with the same parameters is received and a token+-- is included, the request returns information about the initial request+-- that used that token.+--+-- The Amazon Web Services SDKs prepopulate client request tokens. If you+-- are using an Amazon Web Services SDK, an idempotency token is created+-- for you.+createNotificationRule_clientRequestToken :: Lens.Lens' CreateNotificationRule (Prelude.Maybe Prelude.Text)+createNotificationRule_clientRequestToken = Lens.lens (\CreateNotificationRule' {clientRequestToken} -> clientRequestToken) (\s@CreateNotificationRule' {} a -> s {clientRequestToken = a} :: CreateNotificationRule)++-- | The status of the notification rule. The default value is @ENABLED@. If+-- the status is set to @DISABLED@, notifications aren\'t sent for the+-- notification rule.+createNotificationRule_status :: Lens.Lens' CreateNotificationRule (Prelude.Maybe NotificationRuleStatus)+createNotificationRule_status = Lens.lens (\CreateNotificationRule' {status} -> status) (\s@CreateNotificationRule' {} a -> s {status = a} :: CreateNotificationRule)++-- | A list of tags to apply to this notification rule. Key names cannot+-- start with \"@aws@\".+createNotificationRule_tags :: Lens.Lens' CreateNotificationRule (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))+createNotificationRule_tags = Lens.lens (\CreateNotificationRule' {tags} -> tags) (\s@CreateNotificationRule' {} a -> s {tags = a} :: CreateNotificationRule) Prelude.. Lens.mapping Lens.coerced++-- | The name for the notification rule. Notification rule names must be+-- unique in your Amazon Web Services account.+createNotificationRule_name :: Lens.Lens' CreateNotificationRule Prelude.Text+createNotificationRule_name = Lens.lens (\CreateNotificationRule' {name} -> name) (\s@CreateNotificationRule' {} a -> s {name = a} :: CreateNotificationRule) Prelude.. Data._Sensitive++-- | A list of event types associated with this notification rule. For a list+-- of allowed events, see EventTypeSummary.+createNotificationRule_eventTypeIds :: Lens.Lens' CreateNotificationRule [Prelude.Text]+createNotificationRule_eventTypeIds = Lens.lens (\CreateNotificationRule' {eventTypeIds} -> eventTypeIds) (\s@CreateNotificationRule' {} a -> s {eventTypeIds = a} :: CreateNotificationRule) Prelude.. Lens.coerced++-- | The Amazon Resource Name (ARN) of the resource to associate with the+-- notification rule. Supported resources include pipelines in+-- CodePipeline, repositories in CodeCommit, and build projects in+-- CodeBuild.+createNotificationRule_resource :: Lens.Lens' CreateNotificationRule Prelude.Text+createNotificationRule_resource = Lens.lens (\CreateNotificationRule' {resource} -> resource) (\s@CreateNotificationRule' {} a -> s {resource = a} :: CreateNotificationRule)++-- | A list of Amazon Resource Names (ARNs) of Amazon Simple Notification+-- Service topics and Chatbot clients to associate with the notification+-- rule.+createNotificationRule_targets :: Lens.Lens' CreateNotificationRule [Target]+createNotificationRule_targets = Lens.lens (\CreateNotificationRule' {targets} -> targets) (\s@CreateNotificationRule' {} a -> s {targets = a} :: CreateNotificationRule) Prelude.. Lens.coerced++-- | The level of detail to include in the notifications for this resource.+-- @BASIC@ will include only the contents of the event as it would appear+-- in Amazon CloudWatch. @FULL@ will include any supplemental information+-- provided by AWS CodeStar Notifications and\/or the service for the+-- resource for which the notification is created.+createNotificationRule_detailType :: Lens.Lens' CreateNotificationRule DetailType+createNotificationRule_detailType = Lens.lens (\CreateNotificationRule' {detailType} -> detailType) (\s@CreateNotificationRule' {} a -> s {detailType = a} :: CreateNotificationRule)++instance Core.AWSRequest CreateNotificationRule where+  type+    AWSResponse CreateNotificationRule =+      CreateNotificationRuleResponse+  request overrides =+    Request.postJSON (overrides defaultService)+  response =+    Response.receiveJSON+      ( \s h x ->+          CreateNotificationRuleResponse'+            Prelude.<$> (x Data..?> "Arn")+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+      )++instance Prelude.Hashable CreateNotificationRule where+  hashWithSalt _salt CreateNotificationRule' {..} =+    _salt+      `Prelude.hashWithSalt` clientRequestToken+      `Prelude.hashWithSalt` status+      `Prelude.hashWithSalt` tags+      `Prelude.hashWithSalt` name+      `Prelude.hashWithSalt` eventTypeIds+      `Prelude.hashWithSalt` resource+      `Prelude.hashWithSalt` targets+      `Prelude.hashWithSalt` detailType++instance Prelude.NFData CreateNotificationRule where+  rnf CreateNotificationRule' {..} =+    Prelude.rnf clientRequestToken+      `Prelude.seq` Prelude.rnf status+      `Prelude.seq` Prelude.rnf tags+      `Prelude.seq` Prelude.rnf name+      `Prelude.seq` Prelude.rnf eventTypeIds+      `Prelude.seq` Prelude.rnf resource+      `Prelude.seq` Prelude.rnf targets+      `Prelude.seq` Prelude.rnf detailType++instance Data.ToHeaders CreateNotificationRule where+  toHeaders =+    Prelude.const+      ( Prelude.mconcat+          [ "Content-Type"+              Data.=# ( "application/x-amz-json-1.1" ::+                          Prelude.ByteString+                      )+          ]+      )++instance Data.ToJSON CreateNotificationRule where+  toJSON CreateNotificationRule' {..} =+    Data.object+      ( Prelude.catMaybes+          [ ("ClientRequestToken" Data..=)+              Prelude.<$> clientRequestToken,+            ("Status" Data..=) Prelude.<$> status,+            ("Tags" Data..=) Prelude.<$> tags,+            Prelude.Just ("Name" Data..= name),+            Prelude.Just ("EventTypeIds" Data..= eventTypeIds),+            Prelude.Just ("Resource" Data..= resource),+            Prelude.Just ("Targets" Data..= targets),+            Prelude.Just ("DetailType" Data..= detailType)+          ]+      )++instance Data.ToPath CreateNotificationRule where+  toPath = Prelude.const "/createNotificationRule"++instance Data.ToQuery CreateNotificationRule where+  toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newCreateNotificationRuleResponse' smart constructor.+data CreateNotificationRuleResponse = CreateNotificationRuleResponse'+  { -- | The Amazon Resource Name (ARN) of the notification rule.+    arn :: Prelude.Maybe Prelude.Text,+    -- | The response's http status code.+    httpStatus :: Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'CreateNotificationRuleResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'arn', 'createNotificationRuleResponse_arn' - The Amazon Resource Name (ARN) of the notification rule.+--+-- 'httpStatus', 'createNotificationRuleResponse_httpStatus' - The response's http status code.+newCreateNotificationRuleResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  CreateNotificationRuleResponse+newCreateNotificationRuleResponse pHttpStatus_ =+  CreateNotificationRuleResponse'+    { arn =+        Prelude.Nothing,+      httpStatus = pHttpStatus_+    }++-- | The Amazon Resource Name (ARN) of the notification rule.+createNotificationRuleResponse_arn :: Lens.Lens' CreateNotificationRuleResponse (Prelude.Maybe Prelude.Text)+createNotificationRuleResponse_arn = Lens.lens (\CreateNotificationRuleResponse' {arn} -> arn) (\s@CreateNotificationRuleResponse' {} a -> s {arn = a} :: CreateNotificationRuleResponse)++-- | The response's http status code.+createNotificationRuleResponse_httpStatus :: Lens.Lens' CreateNotificationRuleResponse Prelude.Int+createNotificationRuleResponse_httpStatus = Lens.lens (\CreateNotificationRuleResponse' {httpStatus} -> httpStatus) (\s@CreateNotificationRuleResponse' {} a -> s {httpStatus = a} :: CreateNotificationRuleResponse)++instance+  Prelude.NFData+    CreateNotificationRuleResponse+  where+  rnf CreateNotificationRuleResponse' {..} =+    Prelude.rnf arn+      `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/CodeStarNotifications/DeleteNotificationRule.hs view
@@ -0,0 +1,170 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Amazonka.CodeStarNotifications.DeleteNotificationRule+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Deletes a notification rule for a resource.+module Amazonka.CodeStarNotifications.DeleteNotificationRule+  ( -- * Creating a Request+    DeleteNotificationRule (..),+    newDeleteNotificationRule,++    -- * Request Lenses+    deleteNotificationRule_arn,++    -- * Destructuring the Response+    DeleteNotificationRuleResponse (..),+    newDeleteNotificationRuleResponse,++    -- * Response Lenses+    deleteNotificationRuleResponse_arn,+    deleteNotificationRuleResponse_httpStatus,+  )+where++import Amazonka.CodeStarNotifications.Types+import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newDeleteNotificationRule' smart constructor.+data DeleteNotificationRule = DeleteNotificationRule'+  { -- | The Amazon Resource Name (ARN) of the notification rule you want to+    -- delete.+    arn :: Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DeleteNotificationRule' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'arn', 'deleteNotificationRule_arn' - The Amazon Resource Name (ARN) of the notification rule you want to+-- delete.+newDeleteNotificationRule ::+  -- | 'arn'+  Prelude.Text ->+  DeleteNotificationRule+newDeleteNotificationRule pArn_ =+  DeleteNotificationRule' {arn = pArn_}++-- | The Amazon Resource Name (ARN) of the notification rule you want to+-- delete.+deleteNotificationRule_arn :: Lens.Lens' DeleteNotificationRule Prelude.Text+deleteNotificationRule_arn = Lens.lens (\DeleteNotificationRule' {arn} -> arn) (\s@DeleteNotificationRule' {} a -> s {arn = a} :: DeleteNotificationRule)++instance Core.AWSRequest DeleteNotificationRule where+  type+    AWSResponse DeleteNotificationRule =+      DeleteNotificationRuleResponse+  request overrides =+    Request.postJSON (overrides defaultService)+  response =+    Response.receiveJSON+      ( \s h x ->+          DeleteNotificationRuleResponse'+            Prelude.<$> (x Data..?> "Arn")+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+      )++instance Prelude.Hashable DeleteNotificationRule where+  hashWithSalt _salt DeleteNotificationRule' {..} =+    _salt `Prelude.hashWithSalt` arn++instance Prelude.NFData DeleteNotificationRule where+  rnf DeleteNotificationRule' {..} = Prelude.rnf arn++instance Data.ToHeaders DeleteNotificationRule where+  toHeaders =+    Prelude.const+      ( Prelude.mconcat+          [ "Content-Type"+              Data.=# ( "application/x-amz-json-1.1" ::+                          Prelude.ByteString+                      )+          ]+      )++instance Data.ToJSON DeleteNotificationRule where+  toJSON DeleteNotificationRule' {..} =+    Data.object+      ( Prelude.catMaybes+          [Prelude.Just ("Arn" Data..= arn)]+      )++instance Data.ToPath DeleteNotificationRule where+  toPath = Prelude.const "/deleteNotificationRule"++instance Data.ToQuery DeleteNotificationRule where+  toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newDeleteNotificationRuleResponse' smart constructor.+data DeleteNotificationRuleResponse = DeleteNotificationRuleResponse'+  { -- | The Amazon Resource Name (ARN) of the deleted notification rule.+    arn :: Prelude.Maybe Prelude.Text,+    -- | The response's http status code.+    httpStatus :: Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DeleteNotificationRuleResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'arn', 'deleteNotificationRuleResponse_arn' - The Amazon Resource Name (ARN) of the deleted notification rule.+--+-- 'httpStatus', 'deleteNotificationRuleResponse_httpStatus' - The response's http status code.+newDeleteNotificationRuleResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  DeleteNotificationRuleResponse+newDeleteNotificationRuleResponse pHttpStatus_ =+  DeleteNotificationRuleResponse'+    { arn =+        Prelude.Nothing,+      httpStatus = pHttpStatus_+    }++-- | The Amazon Resource Name (ARN) of the deleted notification rule.+deleteNotificationRuleResponse_arn :: Lens.Lens' DeleteNotificationRuleResponse (Prelude.Maybe Prelude.Text)+deleteNotificationRuleResponse_arn = Lens.lens (\DeleteNotificationRuleResponse' {arn} -> arn) (\s@DeleteNotificationRuleResponse' {} a -> s {arn = a} :: DeleteNotificationRuleResponse)++-- | The response's http status code.+deleteNotificationRuleResponse_httpStatus :: Lens.Lens' DeleteNotificationRuleResponse Prelude.Int+deleteNotificationRuleResponse_httpStatus = Lens.lens (\DeleteNotificationRuleResponse' {httpStatus} -> httpStatus) (\s@DeleteNotificationRuleResponse' {} a -> s {httpStatus = a} :: DeleteNotificationRuleResponse)++instance+  Prelude.NFData+    DeleteNotificationRuleResponse+  where+  rnf DeleteNotificationRuleResponse' {..} =+    Prelude.rnf arn+      `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/CodeStarNotifications/DeleteTarget.hs view
@@ -0,0 +1,181 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Amazonka.CodeStarNotifications.DeleteTarget+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Deletes a specified target for notifications.+module Amazonka.CodeStarNotifications.DeleteTarget+  ( -- * Creating a Request+    DeleteTarget (..),+    newDeleteTarget,++    -- * Request Lenses+    deleteTarget_forceUnsubscribeAll,+    deleteTarget_targetAddress,++    -- * Destructuring the Response+    DeleteTargetResponse (..),+    newDeleteTargetResponse,++    -- * Response Lenses+    deleteTargetResponse_httpStatus,+  )+where++import Amazonka.CodeStarNotifications.Types+import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newDeleteTarget' smart constructor.+data DeleteTarget = DeleteTarget'+  { -- | A Boolean value that can be used to delete all associations with this+    -- Chatbot topic. The default value is FALSE. If set to TRUE, all+    -- associations between that target and every notification rule in your+    -- Amazon Web Services account are deleted.+    forceUnsubscribeAll :: Prelude.Maybe Prelude.Bool,+    -- | The Amazon Resource Name (ARN) of the Chatbot topic or Chatbot client to+    -- delete.+    targetAddress :: Data.Sensitive Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DeleteTarget' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'forceUnsubscribeAll', 'deleteTarget_forceUnsubscribeAll' - A Boolean value that can be used to delete all associations with this+-- Chatbot topic. The default value is FALSE. If set to TRUE, all+-- associations between that target and every notification rule in your+-- Amazon Web Services account are deleted.+--+-- 'targetAddress', 'deleteTarget_targetAddress' - The Amazon Resource Name (ARN) of the Chatbot topic or Chatbot client to+-- delete.+newDeleteTarget ::+  -- | 'targetAddress'+  Prelude.Text ->+  DeleteTarget+newDeleteTarget pTargetAddress_ =+  DeleteTarget'+    { forceUnsubscribeAll =+        Prelude.Nothing,+      targetAddress =+        Data._Sensitive Lens.# pTargetAddress_+    }++-- | A Boolean value that can be used to delete all associations with this+-- Chatbot topic. The default value is FALSE. If set to TRUE, all+-- associations between that target and every notification rule in your+-- Amazon Web Services account are deleted.+deleteTarget_forceUnsubscribeAll :: Lens.Lens' DeleteTarget (Prelude.Maybe Prelude.Bool)+deleteTarget_forceUnsubscribeAll = Lens.lens (\DeleteTarget' {forceUnsubscribeAll} -> forceUnsubscribeAll) (\s@DeleteTarget' {} a -> s {forceUnsubscribeAll = a} :: DeleteTarget)++-- | The Amazon Resource Name (ARN) of the Chatbot topic or Chatbot client to+-- delete.+deleteTarget_targetAddress :: Lens.Lens' DeleteTarget Prelude.Text+deleteTarget_targetAddress = Lens.lens (\DeleteTarget' {targetAddress} -> targetAddress) (\s@DeleteTarget' {} a -> s {targetAddress = a} :: DeleteTarget) Prelude.. Data._Sensitive++instance Core.AWSRequest DeleteTarget where+  type AWSResponse DeleteTarget = DeleteTargetResponse+  request overrides =+    Request.postJSON (overrides defaultService)+  response =+    Response.receiveEmpty+      ( \s h x ->+          DeleteTargetResponse'+            Prelude.<$> (Prelude.pure (Prelude.fromEnum s))+      )++instance Prelude.Hashable DeleteTarget where+  hashWithSalt _salt DeleteTarget' {..} =+    _salt+      `Prelude.hashWithSalt` forceUnsubscribeAll+      `Prelude.hashWithSalt` targetAddress++instance Prelude.NFData DeleteTarget where+  rnf DeleteTarget' {..} =+    Prelude.rnf forceUnsubscribeAll+      `Prelude.seq` Prelude.rnf targetAddress++instance Data.ToHeaders DeleteTarget where+  toHeaders =+    Prelude.const+      ( Prelude.mconcat+          [ "Content-Type"+              Data.=# ( "application/x-amz-json-1.1" ::+                          Prelude.ByteString+                      )+          ]+      )++instance Data.ToJSON DeleteTarget where+  toJSON DeleteTarget' {..} =+    Data.object+      ( Prelude.catMaybes+          [ ("ForceUnsubscribeAll" Data..=)+              Prelude.<$> forceUnsubscribeAll,+            Prelude.Just+              ("TargetAddress" Data..= targetAddress)+          ]+      )++instance Data.ToPath DeleteTarget where+  toPath = Prelude.const "/deleteTarget"++instance Data.ToQuery DeleteTarget where+  toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newDeleteTargetResponse' smart constructor.+data DeleteTargetResponse = DeleteTargetResponse'+  { -- | The response's http status code.+    httpStatus :: Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DeleteTargetResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'httpStatus', 'deleteTargetResponse_httpStatus' - The response's http status code.+newDeleteTargetResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  DeleteTargetResponse+newDeleteTargetResponse pHttpStatus_ =+  DeleteTargetResponse' {httpStatus = pHttpStatus_}++-- | The response's http status code.+deleteTargetResponse_httpStatus :: Lens.Lens' DeleteTargetResponse Prelude.Int+deleteTargetResponse_httpStatus = Lens.lens (\DeleteTargetResponse' {httpStatus} -> httpStatus) (\s@DeleteTargetResponse' {} a -> s {httpStatus = a} :: DeleteTargetResponse)++instance Prelude.NFData DeleteTargetResponse where+  rnf DeleteTargetResponse' {..} =+    Prelude.rnf httpStatus
+ gen/Amazonka/CodeStarNotifications/DescribeNotificationRule.hs view
@@ -0,0 +1,318 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Amazonka.CodeStarNotifications.DescribeNotificationRule+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Returns information about a specified notification rule.+module Amazonka.CodeStarNotifications.DescribeNotificationRule+  ( -- * Creating a Request+    DescribeNotificationRule (..),+    newDescribeNotificationRule,++    -- * Request Lenses+    describeNotificationRule_arn,++    -- * Destructuring the Response+    DescribeNotificationRuleResponse (..),+    newDescribeNotificationRuleResponse,++    -- * Response Lenses+    describeNotificationRuleResponse_createdBy,+    describeNotificationRuleResponse_createdTimestamp,+    describeNotificationRuleResponse_detailType,+    describeNotificationRuleResponse_eventTypes,+    describeNotificationRuleResponse_lastModifiedTimestamp,+    describeNotificationRuleResponse_name,+    describeNotificationRuleResponse_resource,+    describeNotificationRuleResponse_status,+    describeNotificationRuleResponse_tags,+    describeNotificationRuleResponse_targets,+    describeNotificationRuleResponse_httpStatus,+    describeNotificationRuleResponse_arn,+  )+where++import Amazonka.CodeStarNotifications.Types+import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newDescribeNotificationRule' smart constructor.+data DescribeNotificationRule = DescribeNotificationRule'+  { -- | The Amazon Resource Name (ARN) of the notification rule.+    arn :: Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DescribeNotificationRule' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'arn', 'describeNotificationRule_arn' - The Amazon Resource Name (ARN) of the notification rule.+newDescribeNotificationRule ::+  -- | 'arn'+  Prelude.Text ->+  DescribeNotificationRule+newDescribeNotificationRule pArn_ =+  DescribeNotificationRule' {arn = pArn_}++-- | The Amazon Resource Name (ARN) of the notification rule.+describeNotificationRule_arn :: Lens.Lens' DescribeNotificationRule Prelude.Text+describeNotificationRule_arn = Lens.lens (\DescribeNotificationRule' {arn} -> arn) (\s@DescribeNotificationRule' {} a -> s {arn = a} :: DescribeNotificationRule)++instance Core.AWSRequest DescribeNotificationRule where+  type+    AWSResponse DescribeNotificationRule =+      DescribeNotificationRuleResponse+  request overrides =+    Request.postJSON (overrides defaultService)+  response =+    Response.receiveJSON+      ( \s h x ->+          DescribeNotificationRuleResponse'+            Prelude.<$> (x Data..?> "CreatedBy")+            Prelude.<*> (x Data..?> "CreatedTimestamp")+            Prelude.<*> (x Data..?> "DetailType")+            Prelude.<*> (x Data..?> "EventTypes" Core..!@ Prelude.mempty)+            Prelude.<*> (x Data..?> "LastModifiedTimestamp")+            Prelude.<*> (x Data..?> "Name")+            Prelude.<*> (x Data..?> "Resource")+            Prelude.<*> (x Data..?> "Status")+            Prelude.<*> (x Data..?> "Tags" Core..!@ Prelude.mempty)+            Prelude.<*> (x Data..?> "Targets" Core..!@ Prelude.mempty)+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+            Prelude.<*> (x Data..:> "Arn")+      )++instance Prelude.Hashable DescribeNotificationRule where+  hashWithSalt _salt DescribeNotificationRule' {..} =+    _salt `Prelude.hashWithSalt` arn++instance Prelude.NFData DescribeNotificationRule where+  rnf DescribeNotificationRule' {..} = Prelude.rnf arn++instance Data.ToHeaders DescribeNotificationRule where+  toHeaders =+    Prelude.const+      ( Prelude.mconcat+          [ "Content-Type"+              Data.=# ( "application/x-amz-json-1.1" ::+                          Prelude.ByteString+                      )+          ]+      )++instance Data.ToJSON DescribeNotificationRule where+  toJSON DescribeNotificationRule' {..} =+    Data.object+      ( Prelude.catMaybes+          [Prelude.Just ("Arn" Data..= arn)]+      )++instance Data.ToPath DescribeNotificationRule where+  toPath = Prelude.const "/describeNotificationRule"++instance Data.ToQuery DescribeNotificationRule where+  toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newDescribeNotificationRuleResponse' smart constructor.+data DescribeNotificationRuleResponse = DescribeNotificationRuleResponse'+  { -- | The name or email alias of the person who created the notification rule.+    createdBy :: Prelude.Maybe Prelude.Text,+    -- | The date and time the notification rule was created, in timestamp+    -- format.+    createdTimestamp :: Prelude.Maybe Data.POSIX,+    -- | The level of detail included in the notifications for this resource.+    -- BASIC will include only the contents of the event as it would appear in+    -- Amazon CloudWatch. FULL will include any supplemental information+    -- provided by AWS CodeStar Notifications and\/or the service for the+    -- resource for which the notification is created.+    detailType :: Prelude.Maybe DetailType,+    -- | A list of the event types associated with the notification rule.+    eventTypes :: Prelude.Maybe [EventTypeSummary],+    -- | The date and time the notification rule was most recently updated, in+    -- timestamp format.+    lastModifiedTimestamp :: Prelude.Maybe Data.POSIX,+    -- | The name of the notification rule.+    name :: Prelude.Maybe (Data.Sensitive Prelude.Text),+    -- | The Amazon Resource Name (ARN) of the resource associated with the+    -- notification rule.+    resource :: Prelude.Maybe Prelude.Text,+    -- | The status of the notification rule. Valid statuses are on (sending+    -- notifications) or off (not sending notifications).+    status :: Prelude.Maybe NotificationRuleStatus,+    -- | The tags associated with the notification rule.+    tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),+    -- | A list of the Chatbot topics and Chatbot clients associated with the+    -- notification rule.+    targets :: Prelude.Maybe [TargetSummary],+    -- | The response's http status code.+    httpStatus :: Prelude.Int,+    -- | The Amazon Resource Name (ARN) of the notification rule.+    arn :: Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DescribeNotificationRuleResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'createdBy', 'describeNotificationRuleResponse_createdBy' - The name or email alias of the person who created the notification rule.+--+-- 'createdTimestamp', 'describeNotificationRuleResponse_createdTimestamp' - The date and time the notification rule was created, in timestamp+-- format.+--+-- 'detailType', 'describeNotificationRuleResponse_detailType' - The level of detail included in the notifications for this resource.+-- BASIC will include only the contents of the event as it would appear in+-- Amazon CloudWatch. FULL will include any supplemental information+-- provided by AWS CodeStar Notifications and\/or the service for the+-- resource for which the notification is created.+--+-- 'eventTypes', 'describeNotificationRuleResponse_eventTypes' - A list of the event types associated with the notification rule.+--+-- 'lastModifiedTimestamp', 'describeNotificationRuleResponse_lastModifiedTimestamp' - The date and time the notification rule was most recently updated, in+-- timestamp format.+--+-- 'name', 'describeNotificationRuleResponse_name' - The name of the notification rule.+--+-- 'resource', 'describeNotificationRuleResponse_resource' - The Amazon Resource Name (ARN) of the resource associated with the+-- notification rule.+--+-- 'status', 'describeNotificationRuleResponse_status' - The status of the notification rule. Valid statuses are on (sending+-- notifications) or off (not sending notifications).+--+-- 'tags', 'describeNotificationRuleResponse_tags' - The tags associated with the notification rule.+--+-- 'targets', 'describeNotificationRuleResponse_targets' - A list of the Chatbot topics and Chatbot clients associated with the+-- notification rule.+--+-- 'httpStatus', 'describeNotificationRuleResponse_httpStatus' - The response's http status code.+--+-- 'arn', 'describeNotificationRuleResponse_arn' - The Amazon Resource Name (ARN) of the notification rule.+newDescribeNotificationRuleResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  -- | 'arn'+  Prelude.Text ->+  DescribeNotificationRuleResponse+newDescribeNotificationRuleResponse+  pHttpStatus_+  pArn_ =+    DescribeNotificationRuleResponse'+      { createdBy =+          Prelude.Nothing,+        createdTimestamp = Prelude.Nothing,+        detailType = Prelude.Nothing,+        eventTypes = Prelude.Nothing,+        lastModifiedTimestamp = Prelude.Nothing,+        name = Prelude.Nothing,+        resource = Prelude.Nothing,+        status = Prelude.Nothing,+        tags = Prelude.Nothing,+        targets = Prelude.Nothing,+        httpStatus = pHttpStatus_,+        arn = pArn_+      }++-- | The name or email alias of the person who created the notification rule.+describeNotificationRuleResponse_createdBy :: Lens.Lens' DescribeNotificationRuleResponse (Prelude.Maybe Prelude.Text)+describeNotificationRuleResponse_createdBy = Lens.lens (\DescribeNotificationRuleResponse' {createdBy} -> createdBy) (\s@DescribeNotificationRuleResponse' {} a -> s {createdBy = a} :: DescribeNotificationRuleResponse)++-- | The date and time the notification rule was created, in timestamp+-- format.+describeNotificationRuleResponse_createdTimestamp :: Lens.Lens' DescribeNotificationRuleResponse (Prelude.Maybe Prelude.UTCTime)+describeNotificationRuleResponse_createdTimestamp = Lens.lens (\DescribeNotificationRuleResponse' {createdTimestamp} -> createdTimestamp) (\s@DescribeNotificationRuleResponse' {} a -> s {createdTimestamp = a} :: DescribeNotificationRuleResponse) Prelude.. Lens.mapping Data._Time++-- | The level of detail included in the notifications for this resource.+-- BASIC will include only the contents of the event as it would appear in+-- Amazon CloudWatch. FULL will include any supplemental information+-- provided by AWS CodeStar Notifications and\/or the service for the+-- resource for which the notification is created.+describeNotificationRuleResponse_detailType :: Lens.Lens' DescribeNotificationRuleResponse (Prelude.Maybe DetailType)+describeNotificationRuleResponse_detailType = Lens.lens (\DescribeNotificationRuleResponse' {detailType} -> detailType) (\s@DescribeNotificationRuleResponse' {} a -> s {detailType = a} :: DescribeNotificationRuleResponse)++-- | A list of the event types associated with the notification rule.+describeNotificationRuleResponse_eventTypes :: Lens.Lens' DescribeNotificationRuleResponse (Prelude.Maybe [EventTypeSummary])+describeNotificationRuleResponse_eventTypes = Lens.lens (\DescribeNotificationRuleResponse' {eventTypes} -> eventTypes) (\s@DescribeNotificationRuleResponse' {} a -> s {eventTypes = a} :: DescribeNotificationRuleResponse) Prelude.. Lens.mapping Lens.coerced++-- | The date and time the notification rule was most recently updated, in+-- timestamp format.+describeNotificationRuleResponse_lastModifiedTimestamp :: Lens.Lens' DescribeNotificationRuleResponse (Prelude.Maybe Prelude.UTCTime)+describeNotificationRuleResponse_lastModifiedTimestamp = Lens.lens (\DescribeNotificationRuleResponse' {lastModifiedTimestamp} -> lastModifiedTimestamp) (\s@DescribeNotificationRuleResponse' {} a -> s {lastModifiedTimestamp = a} :: DescribeNotificationRuleResponse) Prelude.. Lens.mapping Data._Time++-- | The name of the notification rule.+describeNotificationRuleResponse_name :: Lens.Lens' DescribeNotificationRuleResponse (Prelude.Maybe Prelude.Text)+describeNotificationRuleResponse_name = Lens.lens (\DescribeNotificationRuleResponse' {name} -> name) (\s@DescribeNotificationRuleResponse' {} a -> s {name = a} :: DescribeNotificationRuleResponse) Prelude.. Lens.mapping Data._Sensitive++-- | The Amazon Resource Name (ARN) of the resource associated with the+-- notification rule.+describeNotificationRuleResponse_resource :: Lens.Lens' DescribeNotificationRuleResponse (Prelude.Maybe Prelude.Text)+describeNotificationRuleResponse_resource = Lens.lens (\DescribeNotificationRuleResponse' {resource} -> resource) (\s@DescribeNotificationRuleResponse' {} a -> s {resource = a} :: DescribeNotificationRuleResponse)++-- | The status of the notification rule. Valid statuses are on (sending+-- notifications) or off (not sending notifications).+describeNotificationRuleResponse_status :: Lens.Lens' DescribeNotificationRuleResponse (Prelude.Maybe NotificationRuleStatus)+describeNotificationRuleResponse_status = Lens.lens (\DescribeNotificationRuleResponse' {status} -> status) (\s@DescribeNotificationRuleResponse' {} a -> s {status = a} :: DescribeNotificationRuleResponse)++-- | The tags associated with the notification rule.+describeNotificationRuleResponse_tags :: Lens.Lens' DescribeNotificationRuleResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))+describeNotificationRuleResponse_tags = Lens.lens (\DescribeNotificationRuleResponse' {tags} -> tags) (\s@DescribeNotificationRuleResponse' {} a -> s {tags = a} :: DescribeNotificationRuleResponse) Prelude.. Lens.mapping Lens.coerced++-- | A list of the Chatbot topics and Chatbot clients associated with the+-- notification rule.+describeNotificationRuleResponse_targets :: Lens.Lens' DescribeNotificationRuleResponse (Prelude.Maybe [TargetSummary])+describeNotificationRuleResponse_targets = Lens.lens (\DescribeNotificationRuleResponse' {targets} -> targets) (\s@DescribeNotificationRuleResponse' {} a -> s {targets = a} :: DescribeNotificationRuleResponse) Prelude.. Lens.mapping Lens.coerced++-- | The response's http status code.+describeNotificationRuleResponse_httpStatus :: Lens.Lens' DescribeNotificationRuleResponse Prelude.Int+describeNotificationRuleResponse_httpStatus = Lens.lens (\DescribeNotificationRuleResponse' {httpStatus} -> httpStatus) (\s@DescribeNotificationRuleResponse' {} a -> s {httpStatus = a} :: DescribeNotificationRuleResponse)++-- | The Amazon Resource Name (ARN) of the notification rule.+describeNotificationRuleResponse_arn :: Lens.Lens' DescribeNotificationRuleResponse Prelude.Text+describeNotificationRuleResponse_arn = Lens.lens (\DescribeNotificationRuleResponse' {arn} -> arn) (\s@DescribeNotificationRuleResponse' {} a -> s {arn = a} :: DescribeNotificationRuleResponse)++instance+  Prelude.NFData+    DescribeNotificationRuleResponse+  where+  rnf DescribeNotificationRuleResponse' {..} =+    Prelude.rnf createdBy+      `Prelude.seq` Prelude.rnf createdTimestamp+      `Prelude.seq` Prelude.rnf detailType+      `Prelude.seq` Prelude.rnf eventTypes+      `Prelude.seq` Prelude.rnf lastModifiedTimestamp+      `Prelude.seq` Prelude.rnf name+      `Prelude.seq` Prelude.rnf resource+      `Prelude.seq` Prelude.rnf status+      `Prelude.seq` Prelude.rnf tags+      `Prelude.seq` Prelude.rnf targets+      `Prelude.seq` Prelude.rnf httpStatus+      `Prelude.seq` Prelude.rnf arn
+ gen/Amazonka/CodeStarNotifications/Lens.hs view
@@ -0,0 +1,170 @@+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Amazonka.CodeStarNotifications.Lens+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+module Amazonka.CodeStarNotifications.Lens+  ( -- * Operations++    -- ** CreateNotificationRule+    createNotificationRule_clientRequestToken,+    createNotificationRule_status,+    createNotificationRule_tags,+    createNotificationRule_name,+    createNotificationRule_eventTypeIds,+    createNotificationRule_resource,+    createNotificationRule_targets,+    createNotificationRule_detailType,+    createNotificationRuleResponse_arn,+    createNotificationRuleResponse_httpStatus,++    -- ** DeleteNotificationRule+    deleteNotificationRule_arn,+    deleteNotificationRuleResponse_arn,+    deleteNotificationRuleResponse_httpStatus,++    -- ** DeleteTarget+    deleteTarget_forceUnsubscribeAll,+    deleteTarget_targetAddress,+    deleteTargetResponse_httpStatus,++    -- ** DescribeNotificationRule+    describeNotificationRule_arn,+    describeNotificationRuleResponse_createdBy,+    describeNotificationRuleResponse_createdTimestamp,+    describeNotificationRuleResponse_detailType,+    describeNotificationRuleResponse_eventTypes,+    describeNotificationRuleResponse_lastModifiedTimestamp,+    describeNotificationRuleResponse_name,+    describeNotificationRuleResponse_resource,+    describeNotificationRuleResponse_status,+    describeNotificationRuleResponse_tags,+    describeNotificationRuleResponse_targets,+    describeNotificationRuleResponse_httpStatus,+    describeNotificationRuleResponse_arn,++    -- ** ListEventTypes+    listEventTypes_filters,+    listEventTypes_maxResults,+    listEventTypes_nextToken,+    listEventTypesResponse_eventTypes,+    listEventTypesResponse_nextToken,+    listEventTypesResponse_httpStatus,++    -- ** ListNotificationRules+    listNotificationRules_filters,+    listNotificationRules_maxResults,+    listNotificationRules_nextToken,+    listNotificationRulesResponse_nextToken,+    listNotificationRulesResponse_notificationRules,+    listNotificationRulesResponse_httpStatus,++    -- ** ListTagsForResource+    listTagsForResource_arn,+    listTagsForResourceResponse_tags,+    listTagsForResourceResponse_httpStatus,++    -- ** ListTargets+    listTargets_filters,+    listTargets_maxResults,+    listTargets_nextToken,+    listTargetsResponse_nextToken,+    listTargetsResponse_targets,+    listTargetsResponse_httpStatus,++    -- ** Subscribe+    subscribe_clientRequestToken,+    subscribe_arn,+    subscribe_target,+    subscribeResponse_arn,+    subscribeResponse_httpStatus,++    -- ** TagResource+    tagResource_arn,+    tagResource_tags,+    tagResourceResponse_tags,+    tagResourceResponse_httpStatus,++    -- ** Unsubscribe+    unsubscribe_arn,+    unsubscribe_targetAddress,+    unsubscribeResponse_httpStatus,+    unsubscribeResponse_arn,++    -- ** UntagResource+    untagResource_arn,+    untagResource_tagKeys,+    untagResourceResponse_httpStatus,++    -- ** UpdateNotificationRule+    updateNotificationRule_detailType,+    updateNotificationRule_eventTypeIds,+    updateNotificationRule_name,+    updateNotificationRule_status,+    updateNotificationRule_targets,+    updateNotificationRule_arn,+    updateNotificationRuleResponse_httpStatus,++    -- * Types++    -- ** EventTypeSummary+    eventTypeSummary_eventTypeId,+    eventTypeSummary_eventTypeName,+    eventTypeSummary_resourceType,+    eventTypeSummary_serviceName,++    -- ** ListEventTypesFilter+    listEventTypesFilter_name,+    listEventTypesFilter_value,++    -- ** ListNotificationRulesFilter+    listNotificationRulesFilter_name,+    listNotificationRulesFilter_value,++    -- ** ListTargetsFilter+    listTargetsFilter_name,+    listTargetsFilter_value,++    -- ** NotificationRuleSummary+    notificationRuleSummary_arn,+    notificationRuleSummary_id,++    -- ** Target+    target_targetAddress,+    target_targetType,++    -- ** TargetSummary+    targetSummary_targetAddress,+    targetSummary_targetStatus,+    targetSummary_targetType,+  )+where++import Amazonka.CodeStarNotifications.CreateNotificationRule+import Amazonka.CodeStarNotifications.DeleteNotificationRule+import Amazonka.CodeStarNotifications.DeleteTarget+import Amazonka.CodeStarNotifications.DescribeNotificationRule+import Amazonka.CodeStarNotifications.ListEventTypes+import Amazonka.CodeStarNotifications.ListNotificationRules+import Amazonka.CodeStarNotifications.ListTagsForResource+import Amazonka.CodeStarNotifications.ListTargets+import Amazonka.CodeStarNotifications.Subscribe+import Amazonka.CodeStarNotifications.TagResource+import Amazonka.CodeStarNotifications.Types.EventTypeSummary+import Amazonka.CodeStarNotifications.Types.ListEventTypesFilter+import Amazonka.CodeStarNotifications.Types.ListNotificationRulesFilter+import Amazonka.CodeStarNotifications.Types.ListTargetsFilter+import Amazonka.CodeStarNotifications.Types.NotificationRuleSummary+import Amazonka.CodeStarNotifications.Types.Target+import Amazonka.CodeStarNotifications.Types.TargetSummary+import Amazonka.CodeStarNotifications.Unsubscribe+import Amazonka.CodeStarNotifications.UntagResource+import Amazonka.CodeStarNotifications.UpdateNotificationRule
+ gen/Amazonka/CodeStarNotifications/ListEventTypes.hs view
@@ -0,0 +1,245 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Amazonka.CodeStarNotifications.ListEventTypes+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Returns information about the event types available for configuring+-- notifications.+--+-- This operation returns paginated results.+module Amazonka.CodeStarNotifications.ListEventTypes+  ( -- * Creating a Request+    ListEventTypes (..),+    newListEventTypes,++    -- * Request Lenses+    listEventTypes_filters,+    listEventTypes_maxResults,+    listEventTypes_nextToken,++    -- * Destructuring the Response+    ListEventTypesResponse (..),+    newListEventTypesResponse,++    -- * Response Lenses+    listEventTypesResponse_eventTypes,+    listEventTypesResponse_nextToken,+    listEventTypesResponse_httpStatus,+  )+where++import Amazonka.CodeStarNotifications.Types+import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newListEventTypes' smart constructor.+data ListEventTypes = ListEventTypes'+  { -- | The filters to use to return information by service or resource type.+    filters :: Prelude.Maybe [ListEventTypesFilter],+    -- | A non-negative integer used to limit the number of returned results. The+    -- default number is 50. The maximum number of results that can be returned+    -- is 100.+    maxResults :: Prelude.Maybe Prelude.Natural,+    -- | An enumeration token that, when provided in a request, returns the next+    -- batch of the results.+    nextToken :: Prelude.Maybe Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListEventTypes' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'filters', 'listEventTypes_filters' - The filters to use to return information by service or resource type.+--+-- 'maxResults', 'listEventTypes_maxResults' - A non-negative integer used to limit the number of returned results. The+-- default number is 50. The maximum number of results that can be returned+-- is 100.+--+-- 'nextToken', 'listEventTypes_nextToken' - An enumeration token that, when provided in a request, returns the next+-- batch of the results.+newListEventTypes ::+  ListEventTypes+newListEventTypes =+  ListEventTypes'+    { filters = Prelude.Nothing,+      maxResults = Prelude.Nothing,+      nextToken = Prelude.Nothing+    }++-- | The filters to use to return information by service or resource type.+listEventTypes_filters :: Lens.Lens' ListEventTypes (Prelude.Maybe [ListEventTypesFilter])+listEventTypes_filters = Lens.lens (\ListEventTypes' {filters} -> filters) (\s@ListEventTypes' {} a -> s {filters = a} :: ListEventTypes) Prelude.. Lens.mapping Lens.coerced++-- | A non-negative integer used to limit the number of returned results. The+-- default number is 50. The maximum number of results that can be returned+-- is 100.+listEventTypes_maxResults :: Lens.Lens' ListEventTypes (Prelude.Maybe Prelude.Natural)+listEventTypes_maxResults = Lens.lens (\ListEventTypes' {maxResults} -> maxResults) (\s@ListEventTypes' {} a -> s {maxResults = a} :: ListEventTypes)++-- | An enumeration token that, when provided in a request, returns the next+-- batch of the results.+listEventTypes_nextToken :: Lens.Lens' ListEventTypes (Prelude.Maybe Prelude.Text)+listEventTypes_nextToken = Lens.lens (\ListEventTypes' {nextToken} -> nextToken) (\s@ListEventTypes' {} a -> s {nextToken = a} :: ListEventTypes)++instance Core.AWSPager ListEventTypes where+  page rq rs+    | Core.stop+        ( rs+            Lens.^? listEventTypesResponse_nextToken+            Prelude.. Lens._Just+        ) =+        Prelude.Nothing+    | Core.stop+        ( rs+            Lens.^? listEventTypesResponse_eventTypes+            Prelude.. Lens._Just+        ) =+        Prelude.Nothing+    | Prelude.otherwise =+        Prelude.Just+          Prelude.$ rq+          Prelude.& listEventTypes_nextToken+          Lens..~ rs+          Lens.^? listEventTypesResponse_nextToken+          Prelude.. Lens._Just++instance Core.AWSRequest ListEventTypes where+  type+    AWSResponse ListEventTypes =+      ListEventTypesResponse+  request overrides =+    Request.postJSON (overrides defaultService)+  response =+    Response.receiveJSON+      ( \s h x ->+          ListEventTypesResponse'+            Prelude.<$> (x Data..?> "EventTypes" Core..!@ Prelude.mempty)+            Prelude.<*> (x Data..?> "NextToken")+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+      )++instance Prelude.Hashable ListEventTypes where+  hashWithSalt _salt ListEventTypes' {..} =+    _salt+      `Prelude.hashWithSalt` filters+      `Prelude.hashWithSalt` maxResults+      `Prelude.hashWithSalt` nextToken++instance Prelude.NFData ListEventTypes where+  rnf ListEventTypes' {..} =+    Prelude.rnf filters+      `Prelude.seq` Prelude.rnf maxResults+      `Prelude.seq` Prelude.rnf nextToken++instance Data.ToHeaders ListEventTypes where+  toHeaders =+    Prelude.const+      ( Prelude.mconcat+          [ "Content-Type"+              Data.=# ( "application/x-amz-json-1.1" ::+                          Prelude.ByteString+                      )+          ]+      )++instance Data.ToJSON ListEventTypes where+  toJSON ListEventTypes' {..} =+    Data.object+      ( Prelude.catMaybes+          [ ("Filters" Data..=) Prelude.<$> filters,+            ("MaxResults" Data..=) Prelude.<$> maxResults,+            ("NextToken" Data..=) Prelude.<$> nextToken+          ]+      )++instance Data.ToPath ListEventTypes where+  toPath = Prelude.const "/listEventTypes"++instance Data.ToQuery ListEventTypes where+  toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newListEventTypesResponse' smart constructor.+data ListEventTypesResponse = ListEventTypesResponse'+  { -- | Information about each event, including service name, resource type,+    -- event ID, and event name.+    eventTypes :: Prelude.Maybe [EventTypeSummary],+    -- | An enumeration token that can be used in a request to return the next+    -- batch of the results.+    nextToken :: Prelude.Maybe Prelude.Text,+    -- | The response's http status code.+    httpStatus :: Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListEventTypesResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'eventTypes', 'listEventTypesResponse_eventTypes' - Information about each event, including service name, resource type,+-- event ID, and event name.+--+-- 'nextToken', 'listEventTypesResponse_nextToken' - An enumeration token that can be used in a request to return the next+-- batch of the results.+--+-- 'httpStatus', 'listEventTypesResponse_httpStatus' - The response's http status code.+newListEventTypesResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  ListEventTypesResponse+newListEventTypesResponse pHttpStatus_ =+  ListEventTypesResponse'+    { eventTypes =+        Prelude.Nothing,+      nextToken = Prelude.Nothing,+      httpStatus = pHttpStatus_+    }++-- | Information about each event, including service name, resource type,+-- event ID, and event name.+listEventTypesResponse_eventTypes :: Lens.Lens' ListEventTypesResponse (Prelude.Maybe [EventTypeSummary])+listEventTypesResponse_eventTypes = Lens.lens (\ListEventTypesResponse' {eventTypes} -> eventTypes) (\s@ListEventTypesResponse' {} a -> s {eventTypes = a} :: ListEventTypesResponse) Prelude.. Lens.mapping Lens.coerced++-- | An enumeration token that can be used in a request to return the next+-- batch of the results.+listEventTypesResponse_nextToken :: Lens.Lens' ListEventTypesResponse (Prelude.Maybe Prelude.Text)+listEventTypesResponse_nextToken = Lens.lens (\ListEventTypesResponse' {nextToken} -> nextToken) (\s@ListEventTypesResponse' {} a -> s {nextToken = a} :: ListEventTypesResponse)++-- | The response's http status code.+listEventTypesResponse_httpStatus :: Lens.Lens' ListEventTypesResponse Prelude.Int+listEventTypesResponse_httpStatus = Lens.lens (\ListEventTypesResponse' {httpStatus} -> httpStatus) (\s@ListEventTypesResponse' {} a -> s {httpStatus = a} :: ListEventTypesResponse)++instance Prelude.NFData ListEventTypesResponse where+  rnf ListEventTypesResponse' {..} =+    Prelude.rnf eventTypes+      `Prelude.seq` Prelude.rnf nextToken+      `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/CodeStarNotifications/ListNotificationRules.hs view
@@ -0,0 +1,260 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Amazonka.CodeStarNotifications.ListNotificationRules+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Returns a list of the notification rules for an Amazon Web Services+-- account.+--+-- This operation returns paginated results.+module Amazonka.CodeStarNotifications.ListNotificationRules+  ( -- * Creating a Request+    ListNotificationRules (..),+    newListNotificationRules,++    -- * Request Lenses+    listNotificationRules_filters,+    listNotificationRules_maxResults,+    listNotificationRules_nextToken,++    -- * Destructuring the Response+    ListNotificationRulesResponse (..),+    newListNotificationRulesResponse,++    -- * Response Lenses+    listNotificationRulesResponse_nextToken,+    listNotificationRulesResponse_notificationRules,+    listNotificationRulesResponse_httpStatus,+  )+where++import Amazonka.CodeStarNotifications.Types+import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newListNotificationRules' smart constructor.+data ListNotificationRules = ListNotificationRules'+  { -- | The filters to use to return information by service or resource type.+    -- For valid values, see ListNotificationRulesFilter.+    --+    -- A filter with the same name can appear more than once when used with OR+    -- statements. Filters with different names should be applied with AND+    -- statements.+    filters :: Prelude.Maybe [ListNotificationRulesFilter],+    -- | A non-negative integer used to limit the number of returned results. The+    -- maximum number of results that can be returned is 100.+    maxResults :: Prelude.Maybe Prelude.Natural,+    -- | An enumeration token that, when provided in a request, returns the next+    -- batch of the results.+    nextToken :: Prelude.Maybe Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListNotificationRules' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'filters', 'listNotificationRules_filters' - The filters to use to return information by service or resource type.+-- For valid values, see ListNotificationRulesFilter.+--+-- A filter with the same name can appear more than once when used with OR+-- statements. Filters with different names should be applied with AND+-- statements.+--+-- 'maxResults', 'listNotificationRules_maxResults' - A non-negative integer used to limit the number of returned results. The+-- maximum number of results that can be returned is 100.+--+-- 'nextToken', 'listNotificationRules_nextToken' - An enumeration token that, when provided in a request, returns the next+-- batch of the results.+newListNotificationRules ::+  ListNotificationRules+newListNotificationRules =+  ListNotificationRules'+    { filters = Prelude.Nothing,+      maxResults = Prelude.Nothing,+      nextToken = Prelude.Nothing+    }++-- | The filters to use to return information by service or resource type.+-- For valid values, see ListNotificationRulesFilter.+--+-- A filter with the same name can appear more than once when used with OR+-- statements. Filters with different names should be applied with AND+-- statements.+listNotificationRules_filters :: Lens.Lens' ListNotificationRules (Prelude.Maybe [ListNotificationRulesFilter])+listNotificationRules_filters = Lens.lens (\ListNotificationRules' {filters} -> filters) (\s@ListNotificationRules' {} a -> s {filters = a} :: ListNotificationRules) Prelude.. Lens.mapping Lens.coerced++-- | A non-negative integer used to limit the number of returned results. The+-- maximum number of results that can be returned is 100.+listNotificationRules_maxResults :: Lens.Lens' ListNotificationRules (Prelude.Maybe Prelude.Natural)+listNotificationRules_maxResults = Lens.lens (\ListNotificationRules' {maxResults} -> maxResults) (\s@ListNotificationRules' {} a -> s {maxResults = a} :: ListNotificationRules)++-- | An enumeration token that, when provided in a request, returns the next+-- batch of the results.+listNotificationRules_nextToken :: Lens.Lens' ListNotificationRules (Prelude.Maybe Prelude.Text)+listNotificationRules_nextToken = Lens.lens (\ListNotificationRules' {nextToken} -> nextToken) (\s@ListNotificationRules' {} a -> s {nextToken = a} :: ListNotificationRules)++instance Core.AWSPager ListNotificationRules where+  page rq rs+    | Core.stop+        ( rs+            Lens.^? listNotificationRulesResponse_nextToken+            Prelude.. Lens._Just+        ) =+        Prelude.Nothing+    | Core.stop+        ( rs+            Lens.^? listNotificationRulesResponse_notificationRules+            Prelude.. Lens._Just+        ) =+        Prelude.Nothing+    | Prelude.otherwise =+        Prelude.Just+          Prelude.$ rq+          Prelude.& listNotificationRules_nextToken+          Lens..~ rs+          Lens.^? listNotificationRulesResponse_nextToken+          Prelude.. Lens._Just++instance Core.AWSRequest ListNotificationRules where+  type+    AWSResponse ListNotificationRules =+      ListNotificationRulesResponse+  request overrides =+    Request.postJSON (overrides defaultService)+  response =+    Response.receiveJSON+      ( \s h x ->+          ListNotificationRulesResponse'+            Prelude.<$> (x Data..?> "NextToken")+            Prelude.<*> ( x+                            Data..?> "NotificationRules"+                            Core..!@ Prelude.mempty+                        )+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+      )++instance Prelude.Hashable ListNotificationRules where+  hashWithSalt _salt ListNotificationRules' {..} =+    _salt+      `Prelude.hashWithSalt` filters+      `Prelude.hashWithSalt` maxResults+      `Prelude.hashWithSalt` nextToken++instance Prelude.NFData ListNotificationRules where+  rnf ListNotificationRules' {..} =+    Prelude.rnf filters+      `Prelude.seq` Prelude.rnf maxResults+      `Prelude.seq` Prelude.rnf nextToken++instance Data.ToHeaders ListNotificationRules where+  toHeaders =+    Prelude.const+      ( Prelude.mconcat+          [ "Content-Type"+              Data.=# ( "application/x-amz-json-1.1" ::+                          Prelude.ByteString+                      )+          ]+      )++instance Data.ToJSON ListNotificationRules where+  toJSON ListNotificationRules' {..} =+    Data.object+      ( Prelude.catMaybes+          [ ("Filters" Data..=) Prelude.<$> filters,+            ("MaxResults" Data..=) Prelude.<$> maxResults,+            ("NextToken" Data..=) Prelude.<$> nextToken+          ]+      )++instance Data.ToPath ListNotificationRules where+  toPath = Prelude.const "/listNotificationRules"++instance Data.ToQuery ListNotificationRules where+  toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newListNotificationRulesResponse' smart constructor.+data ListNotificationRulesResponse = ListNotificationRulesResponse'+  { -- | An enumeration token that can be used in a request to return the next+    -- batch of the results.+    nextToken :: Prelude.Maybe Prelude.Text,+    -- | The list of notification rules for the Amazon Web Services account, by+    -- Amazon Resource Name (ARN) and ID.+    notificationRules :: Prelude.Maybe [NotificationRuleSummary],+    -- | The response's http status code.+    httpStatus :: Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListNotificationRulesResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'nextToken', 'listNotificationRulesResponse_nextToken' - An enumeration token that can be used in a request to return the next+-- batch of the results.+--+-- 'notificationRules', 'listNotificationRulesResponse_notificationRules' - The list of notification rules for the Amazon Web Services account, by+-- Amazon Resource Name (ARN) and ID.+--+-- 'httpStatus', 'listNotificationRulesResponse_httpStatus' - The response's http status code.+newListNotificationRulesResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  ListNotificationRulesResponse+newListNotificationRulesResponse pHttpStatus_ =+  ListNotificationRulesResponse'+    { nextToken =+        Prelude.Nothing,+      notificationRules = Prelude.Nothing,+      httpStatus = pHttpStatus_+    }++-- | An enumeration token that can be used in a request to return the next+-- batch of the results.+listNotificationRulesResponse_nextToken :: Lens.Lens' ListNotificationRulesResponse (Prelude.Maybe Prelude.Text)+listNotificationRulesResponse_nextToken = Lens.lens (\ListNotificationRulesResponse' {nextToken} -> nextToken) (\s@ListNotificationRulesResponse' {} a -> s {nextToken = a} :: ListNotificationRulesResponse)++-- | The list of notification rules for the Amazon Web Services account, by+-- Amazon Resource Name (ARN) and ID.+listNotificationRulesResponse_notificationRules :: Lens.Lens' ListNotificationRulesResponse (Prelude.Maybe [NotificationRuleSummary])+listNotificationRulesResponse_notificationRules = Lens.lens (\ListNotificationRulesResponse' {notificationRules} -> notificationRules) (\s@ListNotificationRulesResponse' {} a -> s {notificationRules = a} :: ListNotificationRulesResponse) Prelude.. Lens.mapping Lens.coerced++-- | The response's http status code.+listNotificationRulesResponse_httpStatus :: Lens.Lens' ListNotificationRulesResponse Prelude.Int+listNotificationRulesResponse_httpStatus = Lens.lens (\ListNotificationRulesResponse' {httpStatus} -> httpStatus) (\s@ListNotificationRulesResponse' {} a -> s {httpStatus = a} :: ListNotificationRulesResponse)++instance Prelude.NFData ListNotificationRulesResponse where+  rnf ListNotificationRulesResponse' {..} =+    Prelude.rnf nextToken+      `Prelude.seq` Prelude.rnf notificationRules+      `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/CodeStarNotifications/ListTagsForResource.hs view
@@ -0,0 +1,164 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Amazonka.CodeStarNotifications.ListTagsForResource+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Returns a list of the tags associated with a notification rule.+module Amazonka.CodeStarNotifications.ListTagsForResource+  ( -- * Creating a Request+    ListTagsForResource (..),+    newListTagsForResource,++    -- * Request Lenses+    listTagsForResource_arn,++    -- * Destructuring the Response+    ListTagsForResourceResponse (..),+    newListTagsForResourceResponse,++    -- * Response Lenses+    listTagsForResourceResponse_tags,+    listTagsForResourceResponse_httpStatus,+  )+where++import Amazonka.CodeStarNotifications.Types+import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newListTagsForResource' smart constructor.+data ListTagsForResource = ListTagsForResource'+  { -- | The Amazon Resource Name (ARN) for the notification rule.+    arn :: Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListTagsForResource' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'arn', 'listTagsForResource_arn' - The Amazon Resource Name (ARN) for the notification rule.+newListTagsForResource ::+  -- | 'arn'+  Prelude.Text ->+  ListTagsForResource+newListTagsForResource pArn_ =+  ListTagsForResource' {arn = pArn_}++-- | The Amazon Resource Name (ARN) for the notification rule.+listTagsForResource_arn :: Lens.Lens' ListTagsForResource Prelude.Text+listTagsForResource_arn = Lens.lens (\ListTagsForResource' {arn} -> arn) (\s@ListTagsForResource' {} a -> s {arn = a} :: ListTagsForResource)++instance Core.AWSRequest ListTagsForResource where+  type+    AWSResponse ListTagsForResource =+      ListTagsForResourceResponse+  request overrides =+    Request.postJSON (overrides defaultService)+  response =+    Response.receiveJSON+      ( \s h x ->+          ListTagsForResourceResponse'+            Prelude.<$> (x Data..?> "Tags" Core..!@ Prelude.mempty)+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+      )++instance Prelude.Hashable ListTagsForResource where+  hashWithSalt _salt ListTagsForResource' {..} =+    _salt `Prelude.hashWithSalt` arn++instance Prelude.NFData ListTagsForResource where+  rnf ListTagsForResource' {..} = Prelude.rnf arn++instance Data.ToHeaders ListTagsForResource where+  toHeaders =+    Prelude.const+      ( Prelude.mconcat+          [ "Content-Type"+              Data.=# ( "application/x-amz-json-1.1" ::+                          Prelude.ByteString+                      )+          ]+      )++instance Data.ToJSON ListTagsForResource where+  toJSON ListTagsForResource' {..} =+    Data.object+      ( Prelude.catMaybes+          [Prelude.Just ("Arn" Data..= arn)]+      )++instance Data.ToPath ListTagsForResource where+  toPath = Prelude.const "/listTagsForResource"++instance Data.ToQuery ListTagsForResource where+  toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newListTagsForResourceResponse' smart constructor.+data ListTagsForResourceResponse = ListTagsForResourceResponse'+  { -- | The tags associated with the notification rule.+    tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),+    -- | The response's http status code.+    httpStatus :: Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListTagsForResourceResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'tags', 'listTagsForResourceResponse_tags' - The tags associated with the notification rule.+--+-- 'httpStatus', 'listTagsForResourceResponse_httpStatus' - The response's http status code.+newListTagsForResourceResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  ListTagsForResourceResponse+newListTagsForResourceResponse pHttpStatus_ =+  ListTagsForResourceResponse'+    { tags =+        Prelude.Nothing,+      httpStatus = pHttpStatus_+    }++-- | The tags associated with the notification rule.+listTagsForResourceResponse_tags :: Lens.Lens' ListTagsForResourceResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))+listTagsForResourceResponse_tags = Lens.lens (\ListTagsForResourceResponse' {tags} -> tags) (\s@ListTagsForResourceResponse' {} a -> s {tags = a} :: ListTagsForResourceResponse) Prelude.. Lens.mapping Lens.coerced++-- | The response's http status code.+listTagsForResourceResponse_httpStatus :: Lens.Lens' ListTagsForResourceResponse Prelude.Int+listTagsForResourceResponse_httpStatus = Lens.lens (\ListTagsForResourceResponse' {httpStatus} -> httpStatus) (\s@ListTagsForResourceResponse' {} a -> s {httpStatus = a} :: ListTagsForResourceResponse)++instance Prelude.NFData ListTagsForResourceResponse where+  rnf ListTagsForResourceResponse' {..} =+    Prelude.rnf tags+      `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/CodeStarNotifications/ListTargets.hs view
@@ -0,0 +1,251 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Amazonka.CodeStarNotifications.ListTargets+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Returns a list of the notification rule targets for an Amazon Web+-- Services account.+--+-- This operation returns paginated results.+module Amazonka.CodeStarNotifications.ListTargets+  ( -- * Creating a Request+    ListTargets (..),+    newListTargets,++    -- * Request Lenses+    listTargets_filters,+    listTargets_maxResults,+    listTargets_nextToken,++    -- * Destructuring the Response+    ListTargetsResponse (..),+    newListTargetsResponse,++    -- * Response Lenses+    listTargetsResponse_nextToken,+    listTargetsResponse_targets,+    listTargetsResponse_httpStatus,+  )+where++import Amazonka.CodeStarNotifications.Types+import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newListTargets' smart constructor.+data ListTargets = ListTargets'+  { -- | The filters to use to return information by service or resource type.+    -- Valid filters include target type, target address, and target status.+    --+    -- A filter with the same name can appear more than once when used with OR+    -- statements. Filters with different names should be applied with AND+    -- statements.+    filters :: Prelude.Maybe [ListTargetsFilter],+    -- | A non-negative integer used to limit the number of returned results. The+    -- maximum number of results that can be returned is 100.+    maxResults :: Prelude.Maybe Prelude.Natural,+    -- | An enumeration token that, when provided in a request, returns the next+    -- batch of the results.+    nextToken :: Prelude.Maybe Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListTargets' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'filters', 'listTargets_filters' - The filters to use to return information by service or resource type.+-- Valid filters include target type, target address, and target status.+--+-- A filter with the same name can appear more than once when used with OR+-- statements. Filters with different names should be applied with AND+-- statements.+--+-- 'maxResults', 'listTargets_maxResults' - A non-negative integer used to limit the number of returned results. The+-- maximum number of results that can be returned is 100.+--+-- 'nextToken', 'listTargets_nextToken' - An enumeration token that, when provided in a request, returns the next+-- batch of the results.+newListTargets ::+  ListTargets+newListTargets =+  ListTargets'+    { filters = Prelude.Nothing,+      maxResults = Prelude.Nothing,+      nextToken = Prelude.Nothing+    }++-- | The filters to use to return information by service or resource type.+-- Valid filters include target type, target address, and target status.+--+-- A filter with the same name can appear more than once when used with OR+-- statements. Filters with different names should be applied with AND+-- statements.+listTargets_filters :: Lens.Lens' ListTargets (Prelude.Maybe [ListTargetsFilter])+listTargets_filters = Lens.lens (\ListTargets' {filters} -> filters) (\s@ListTargets' {} a -> s {filters = a} :: ListTargets) Prelude.. Lens.mapping Lens.coerced++-- | A non-negative integer used to limit the number of returned results. The+-- maximum number of results that can be returned is 100.+listTargets_maxResults :: Lens.Lens' ListTargets (Prelude.Maybe Prelude.Natural)+listTargets_maxResults = Lens.lens (\ListTargets' {maxResults} -> maxResults) (\s@ListTargets' {} a -> s {maxResults = a} :: ListTargets)++-- | An enumeration token that, when provided in a request, returns the next+-- batch of the results.+listTargets_nextToken :: Lens.Lens' ListTargets (Prelude.Maybe Prelude.Text)+listTargets_nextToken = Lens.lens (\ListTargets' {nextToken} -> nextToken) (\s@ListTargets' {} a -> s {nextToken = a} :: ListTargets)++instance Core.AWSPager ListTargets where+  page rq rs+    | Core.stop+        ( rs+            Lens.^? listTargetsResponse_nextToken+            Prelude.. Lens._Just+        ) =+        Prelude.Nothing+    | Core.stop+        ( rs+            Lens.^? listTargetsResponse_targets+            Prelude.. Lens._Just+        ) =+        Prelude.Nothing+    | Prelude.otherwise =+        Prelude.Just+          Prelude.$ rq+          Prelude.& listTargets_nextToken+          Lens..~ rs+          Lens.^? listTargetsResponse_nextToken+          Prelude.. Lens._Just++instance Core.AWSRequest ListTargets where+  type AWSResponse ListTargets = ListTargetsResponse+  request overrides =+    Request.postJSON (overrides defaultService)+  response =+    Response.receiveJSON+      ( \s h x ->+          ListTargetsResponse'+            Prelude.<$> (x Data..?> "NextToken")+            Prelude.<*> (x Data..?> "Targets" Core..!@ Prelude.mempty)+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+      )++instance Prelude.Hashable ListTargets where+  hashWithSalt _salt ListTargets' {..} =+    _salt+      `Prelude.hashWithSalt` filters+      `Prelude.hashWithSalt` maxResults+      `Prelude.hashWithSalt` nextToken++instance Prelude.NFData ListTargets where+  rnf ListTargets' {..} =+    Prelude.rnf filters+      `Prelude.seq` Prelude.rnf maxResults+      `Prelude.seq` Prelude.rnf nextToken++instance Data.ToHeaders ListTargets where+  toHeaders =+    Prelude.const+      ( Prelude.mconcat+          [ "Content-Type"+              Data.=# ( "application/x-amz-json-1.1" ::+                          Prelude.ByteString+                      )+          ]+      )++instance Data.ToJSON ListTargets where+  toJSON ListTargets' {..} =+    Data.object+      ( Prelude.catMaybes+          [ ("Filters" Data..=) Prelude.<$> filters,+            ("MaxResults" Data..=) Prelude.<$> maxResults,+            ("NextToken" Data..=) Prelude.<$> nextToken+          ]+      )++instance Data.ToPath ListTargets where+  toPath = Prelude.const "/listTargets"++instance Data.ToQuery ListTargets where+  toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newListTargetsResponse' smart constructor.+data ListTargetsResponse = ListTargetsResponse'+  { -- | An enumeration token that can be used in a request to return the next+    -- batch of results.+    nextToken :: Prelude.Maybe Prelude.Text,+    -- | The list of notification rule targets.+    targets :: Prelude.Maybe [TargetSummary],+    -- | The response's http status code.+    httpStatus :: Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListTargetsResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'nextToken', 'listTargetsResponse_nextToken' - An enumeration token that can be used in a request to return the next+-- batch of results.+--+-- 'targets', 'listTargetsResponse_targets' - The list of notification rule targets.+--+-- 'httpStatus', 'listTargetsResponse_httpStatus' - The response's http status code.+newListTargetsResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  ListTargetsResponse+newListTargetsResponse pHttpStatus_ =+  ListTargetsResponse'+    { nextToken = Prelude.Nothing,+      targets = Prelude.Nothing,+      httpStatus = pHttpStatus_+    }++-- | An enumeration token that can be used in a request to return the next+-- batch of results.+listTargetsResponse_nextToken :: Lens.Lens' ListTargetsResponse (Prelude.Maybe Prelude.Text)+listTargetsResponse_nextToken = Lens.lens (\ListTargetsResponse' {nextToken} -> nextToken) (\s@ListTargetsResponse' {} a -> s {nextToken = a} :: ListTargetsResponse)++-- | The list of notification rule targets.+listTargetsResponse_targets :: Lens.Lens' ListTargetsResponse (Prelude.Maybe [TargetSummary])+listTargetsResponse_targets = Lens.lens (\ListTargetsResponse' {targets} -> targets) (\s@ListTargetsResponse' {} a -> s {targets = a} :: ListTargetsResponse) Prelude.. Lens.mapping Lens.coerced++-- | The response's http status code.+listTargetsResponse_httpStatus :: Lens.Lens' ListTargetsResponse Prelude.Int+listTargetsResponse_httpStatus = Lens.lens (\ListTargetsResponse' {httpStatus} -> httpStatus) (\s@ListTargetsResponse' {} a -> s {httpStatus = a} :: ListTargetsResponse)++instance Prelude.NFData ListTargetsResponse where+  rnf ListTargetsResponse' {..} =+    Prelude.rnf nextToken+      `Prelude.seq` Prelude.rnf targets+      `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/CodeStarNotifications/Subscribe.hs view
@@ -0,0 +1,205 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Amazonka.CodeStarNotifications.Subscribe+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Creates an association between a notification rule and an Chatbot topic+-- or Chatbot client so that the associated target can receive+-- notifications when the events described in the rule are triggered.+module Amazonka.CodeStarNotifications.Subscribe+  ( -- * Creating a Request+    Subscribe (..),+    newSubscribe,++    -- * Request Lenses+    subscribe_clientRequestToken,+    subscribe_arn,+    subscribe_target,++    -- * Destructuring the Response+    SubscribeResponse (..),+    newSubscribeResponse,++    -- * Response Lenses+    subscribeResponse_arn,+    subscribeResponse_httpStatus,+  )+where++import Amazonka.CodeStarNotifications.Types+import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newSubscribe' smart constructor.+data Subscribe = Subscribe'+  { -- | An enumeration token that, when provided in a request, returns the next+    -- batch of the results.+    clientRequestToken :: Prelude.Maybe Prelude.Text,+    -- | The Amazon Resource Name (ARN) of the notification rule for which you+    -- want to create the association.+    arn :: Prelude.Text,+    target :: Target+  }+  deriving (Prelude.Eq, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'Subscribe' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'clientRequestToken', 'subscribe_clientRequestToken' - An enumeration token that, when provided in a request, returns the next+-- batch of the results.+--+-- 'arn', 'subscribe_arn' - The Amazon Resource Name (ARN) of the notification rule for which you+-- want to create the association.+--+-- 'target', 'subscribe_target' - Undocumented member.+newSubscribe ::+  -- | 'arn'+  Prelude.Text ->+  -- | 'target'+  Target ->+  Subscribe+newSubscribe pArn_ pTarget_ =+  Subscribe'+    { clientRequestToken = Prelude.Nothing,+      arn = pArn_,+      target = pTarget_+    }++-- | An enumeration token that, when provided in a request, returns the next+-- batch of the results.+subscribe_clientRequestToken :: Lens.Lens' Subscribe (Prelude.Maybe Prelude.Text)+subscribe_clientRequestToken = Lens.lens (\Subscribe' {clientRequestToken} -> clientRequestToken) (\s@Subscribe' {} a -> s {clientRequestToken = a} :: Subscribe)++-- | The Amazon Resource Name (ARN) of the notification rule for which you+-- want to create the association.+subscribe_arn :: Lens.Lens' Subscribe Prelude.Text+subscribe_arn = Lens.lens (\Subscribe' {arn} -> arn) (\s@Subscribe' {} a -> s {arn = a} :: Subscribe)++-- | Undocumented member.+subscribe_target :: Lens.Lens' Subscribe Target+subscribe_target = Lens.lens (\Subscribe' {target} -> target) (\s@Subscribe' {} a -> s {target = a} :: Subscribe)++instance Core.AWSRequest Subscribe where+  type AWSResponse Subscribe = SubscribeResponse+  request overrides =+    Request.postJSON (overrides defaultService)+  response =+    Response.receiveJSON+      ( \s h x ->+          SubscribeResponse'+            Prelude.<$> (x Data..?> "Arn")+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+      )++instance Prelude.Hashable Subscribe where+  hashWithSalt _salt Subscribe' {..} =+    _salt+      `Prelude.hashWithSalt` clientRequestToken+      `Prelude.hashWithSalt` arn+      `Prelude.hashWithSalt` target++instance Prelude.NFData Subscribe where+  rnf Subscribe' {..} =+    Prelude.rnf clientRequestToken+      `Prelude.seq` Prelude.rnf arn+      `Prelude.seq` Prelude.rnf target++instance Data.ToHeaders Subscribe where+  toHeaders =+    Prelude.const+      ( Prelude.mconcat+          [ "Content-Type"+              Data.=# ( "application/x-amz-json-1.1" ::+                          Prelude.ByteString+                      )+          ]+      )++instance Data.ToJSON Subscribe where+  toJSON Subscribe' {..} =+    Data.object+      ( Prelude.catMaybes+          [ ("ClientRequestToken" Data..=)+              Prelude.<$> clientRequestToken,+            Prelude.Just ("Arn" Data..= arn),+            Prelude.Just ("Target" Data..= target)+          ]+      )++instance Data.ToPath Subscribe where+  toPath = Prelude.const "/subscribe"++instance Data.ToQuery Subscribe where+  toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newSubscribeResponse' smart constructor.+data SubscribeResponse = SubscribeResponse'+  { -- | The Amazon Resource Name (ARN) of the notification rule for which you+    -- have created assocations.+    arn :: Prelude.Maybe Prelude.Text,+    -- | The response's http status code.+    httpStatus :: Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'SubscribeResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'arn', 'subscribeResponse_arn' - The Amazon Resource Name (ARN) of the notification rule for which you+-- have created assocations.+--+-- 'httpStatus', 'subscribeResponse_httpStatus' - The response's http status code.+newSubscribeResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  SubscribeResponse+newSubscribeResponse pHttpStatus_ =+  SubscribeResponse'+    { arn = Prelude.Nothing,+      httpStatus = pHttpStatus_+    }++-- | The Amazon Resource Name (ARN) of the notification rule for which you+-- have created assocations.+subscribeResponse_arn :: Lens.Lens' SubscribeResponse (Prelude.Maybe Prelude.Text)+subscribeResponse_arn = Lens.lens (\SubscribeResponse' {arn} -> arn) (\s@SubscribeResponse' {} a -> s {arn = a} :: SubscribeResponse)++-- | The response's http status code.+subscribeResponse_httpStatus :: Lens.Lens' SubscribeResponse Prelude.Int+subscribeResponse_httpStatus = Lens.lens (\SubscribeResponse' {httpStatus} -> httpStatus) (\s@SubscribeResponse' {} a -> s {httpStatus = a} :: SubscribeResponse)++instance Prelude.NFData SubscribeResponse where+  rnf SubscribeResponse' {..} =+    Prelude.rnf arn+      `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/CodeStarNotifications/TagResource.hs view
@@ -0,0 +1,178 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Amazonka.CodeStarNotifications.TagResource+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Associates a set of provided tags with a notification rule.+module Amazonka.CodeStarNotifications.TagResource+  ( -- * Creating a Request+    TagResource (..),+    newTagResource,++    -- * Request Lenses+    tagResource_arn,+    tagResource_tags,++    -- * Destructuring the Response+    TagResourceResponse (..),+    newTagResourceResponse,++    -- * Response Lenses+    tagResourceResponse_tags,+    tagResourceResponse_httpStatus,+  )+where++import Amazonka.CodeStarNotifications.Types+import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newTagResource' smart constructor.+data TagResource = TagResource'+  { -- | The Amazon Resource Name (ARN) of the notification rule to tag.+    arn :: Prelude.Text,+    -- | The list of tags to associate with the resource. Tag key names cannot+    -- start with \"@aws@\".+    tags :: Prelude.HashMap Prelude.Text Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'TagResource' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'arn', 'tagResource_arn' - The Amazon Resource Name (ARN) of the notification rule to tag.+--+-- 'tags', 'tagResource_tags' - The list of tags to associate with the resource. Tag key names cannot+-- start with \"@aws@\".+newTagResource ::+  -- | 'arn'+  Prelude.Text ->+  TagResource+newTagResource pArn_ =+  TagResource' {arn = pArn_, tags = Prelude.mempty}++-- | The Amazon Resource Name (ARN) of the notification rule to tag.+tagResource_arn :: Lens.Lens' TagResource Prelude.Text+tagResource_arn = Lens.lens (\TagResource' {arn} -> arn) (\s@TagResource' {} a -> s {arn = a} :: TagResource)++-- | The list of tags to associate with the resource. Tag key names cannot+-- start with \"@aws@\".+tagResource_tags :: Lens.Lens' TagResource (Prelude.HashMap Prelude.Text Prelude.Text)+tagResource_tags = Lens.lens (\TagResource' {tags} -> tags) (\s@TagResource' {} a -> s {tags = a} :: TagResource) Prelude.. Lens.coerced++instance Core.AWSRequest TagResource where+  type AWSResponse TagResource = TagResourceResponse+  request overrides =+    Request.postJSON (overrides defaultService)+  response =+    Response.receiveJSON+      ( \s h x ->+          TagResourceResponse'+            Prelude.<$> (x Data..?> "Tags" Core..!@ Prelude.mempty)+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+      )++instance Prelude.Hashable TagResource where+  hashWithSalt _salt TagResource' {..} =+    _salt+      `Prelude.hashWithSalt` arn+      `Prelude.hashWithSalt` tags++instance Prelude.NFData TagResource where+  rnf TagResource' {..} =+    Prelude.rnf arn `Prelude.seq` Prelude.rnf tags++instance Data.ToHeaders TagResource where+  toHeaders =+    Prelude.const+      ( Prelude.mconcat+          [ "Content-Type"+              Data.=# ( "application/x-amz-json-1.1" ::+                          Prelude.ByteString+                      )+          ]+      )++instance Data.ToJSON TagResource where+  toJSON TagResource' {..} =+    Data.object+      ( Prelude.catMaybes+          [ Prelude.Just ("Arn" Data..= arn),+            Prelude.Just ("Tags" Data..= tags)+          ]+      )++instance Data.ToPath TagResource where+  toPath = Prelude.const "/tagResource"++instance Data.ToQuery TagResource where+  toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newTagResourceResponse' smart constructor.+data TagResourceResponse = TagResourceResponse'+  { -- | The list of tags associated with the resource.+    tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),+    -- | The response's http status code.+    httpStatus :: Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'TagResourceResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'tags', 'tagResourceResponse_tags' - The list of tags associated with the resource.+--+-- 'httpStatus', 'tagResourceResponse_httpStatus' - The response's http status code.+newTagResourceResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  TagResourceResponse+newTagResourceResponse pHttpStatus_ =+  TagResourceResponse'+    { tags = Prelude.Nothing,+      httpStatus = pHttpStatus_+    }++-- | The list of tags associated with the resource.+tagResourceResponse_tags :: Lens.Lens' TagResourceResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))+tagResourceResponse_tags = Lens.lens (\TagResourceResponse' {tags} -> tags) (\s@TagResourceResponse' {} a -> s {tags = a} :: TagResourceResponse) Prelude.. Lens.mapping Lens.coerced++-- | The response's http status code.+tagResourceResponse_httpStatus :: Lens.Lens' TagResourceResponse Prelude.Int+tagResourceResponse_httpStatus = Lens.lens (\TagResourceResponse' {httpStatus} -> httpStatus) (\s@TagResourceResponse' {} a -> s {httpStatus = a} :: TagResourceResponse)++instance Prelude.NFData TagResourceResponse where+  rnf TagResourceResponse' {..} =+    Prelude.rnf tags+      `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/CodeStarNotifications/Types.hs view
@@ -0,0 +1,254 @@+{-# LANGUAGE DisambiguateRecordFields #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Amazonka.CodeStarNotifications.Types+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+module Amazonka.CodeStarNotifications.Types+  ( -- * Service Configuration+    defaultService,++    -- * Errors+    _AccessDeniedException,+    _ConcurrentModificationException,+    _ConfigurationException,+    _InvalidNextTokenException,+    _LimitExceededException,+    _ResourceAlreadyExistsException,+    _ResourceNotFoundException,+    _ValidationException,++    -- * DetailType+    DetailType (..),++    -- * ListEventTypesFilterName+    ListEventTypesFilterName (..),++    -- * ListNotificationRulesFilterName+    ListNotificationRulesFilterName (..),++    -- * ListTargetsFilterName+    ListTargetsFilterName (..),++    -- * NotificationRuleStatus+    NotificationRuleStatus (..),++    -- * TargetStatus+    TargetStatus (..),++    -- * EventTypeSummary+    EventTypeSummary (..),+    newEventTypeSummary,+    eventTypeSummary_eventTypeId,+    eventTypeSummary_eventTypeName,+    eventTypeSummary_resourceType,+    eventTypeSummary_serviceName,++    -- * ListEventTypesFilter+    ListEventTypesFilter (..),+    newListEventTypesFilter,+    listEventTypesFilter_name,+    listEventTypesFilter_value,++    -- * ListNotificationRulesFilter+    ListNotificationRulesFilter (..),+    newListNotificationRulesFilter,+    listNotificationRulesFilter_name,+    listNotificationRulesFilter_value,++    -- * ListTargetsFilter+    ListTargetsFilter (..),+    newListTargetsFilter,+    listTargetsFilter_name,+    listTargetsFilter_value,++    -- * NotificationRuleSummary+    NotificationRuleSummary (..),+    newNotificationRuleSummary,+    notificationRuleSummary_arn,+    notificationRuleSummary_id,++    -- * Target+    Target (..),+    newTarget,+    target_targetAddress,+    target_targetType,++    -- * TargetSummary+    TargetSummary (..),+    newTargetSummary,+    targetSummary_targetAddress,+    targetSummary_targetStatus,+    targetSummary_targetType,+  )+where++import Amazonka.CodeStarNotifications.Types.DetailType+import Amazonka.CodeStarNotifications.Types.EventTypeSummary+import Amazonka.CodeStarNotifications.Types.ListEventTypesFilter+import Amazonka.CodeStarNotifications.Types.ListEventTypesFilterName+import Amazonka.CodeStarNotifications.Types.ListNotificationRulesFilter+import Amazonka.CodeStarNotifications.Types.ListNotificationRulesFilterName+import Amazonka.CodeStarNotifications.Types.ListTargetsFilter+import Amazonka.CodeStarNotifications.Types.ListTargetsFilterName+import Amazonka.CodeStarNotifications.Types.NotificationRuleStatus+import Amazonka.CodeStarNotifications.Types.NotificationRuleSummary+import Amazonka.CodeStarNotifications.Types.Target+import Amazonka.CodeStarNotifications.Types.TargetStatus+import Amazonka.CodeStarNotifications.Types.TargetSummary+import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Sign.V4 as Sign++-- | API version @2019-10-15@ of the Amazon CodeStar Notifications SDK configuration.+defaultService :: Core.Service+defaultService =+  Core.Service+    { Core.abbrev = "CodeStarNotifications",+      Core.signer = Sign.v4,+      Core.endpointPrefix = "codestar-notifications",+      Core.signingName = "codestar-notifications",+      Core.version = "2019-10-15",+      Core.s3AddressingStyle = Core.S3AddressingStyleAuto,+      Core.endpoint = Core.defaultEndpoint defaultService,+      Core.timeout = Prelude.Just 70,+      Core.check = Core.statusSuccess,+      Core.error =+        Core.parseJSONError "CodeStarNotifications",+      Core.retry = retry+    }+  where+    retry =+      Core.Exponential+        { Core.base = 5.0e-2,+          Core.growth = 2,+          Core.attempts = 5,+          Core.check = check+        }+    check e+      | Lens.has (Core.hasStatus 502) e =+          Prelude.Just "bad_gateway"+      | Lens.has (Core.hasStatus 504) e =+          Prelude.Just "gateway_timeout"+      | Lens.has (Core.hasStatus 500) e =+          Prelude.Just "general_server_error"+      | Lens.has (Core.hasStatus 509) e =+          Prelude.Just "limit_exceeded"+      | Lens.has+          ( Core.hasCode "RequestThrottledException"+              Prelude.. Core.hasStatus 400+          )+          e =+          Prelude.Just "request_throttled_exception"+      | Lens.has (Core.hasStatus 503) e =+          Prelude.Just "service_unavailable"+      | Lens.has+          ( Core.hasCode "ThrottledException"+              Prelude.. Core.hasStatus 400+          )+          e =+          Prelude.Just "throttled_exception"+      | Lens.has+          ( Core.hasCode "Throttling"+              Prelude.. Core.hasStatus 400+          )+          e =+          Prelude.Just "throttling"+      | Lens.has+          ( Core.hasCode "ThrottlingException"+              Prelude.. Core.hasStatus 400+          )+          e =+          Prelude.Just "throttling_exception"+      | Lens.has+          ( Core.hasCode+              "ProvisionedThroughputExceededException"+              Prelude.. Core.hasStatus 400+          )+          e =+          Prelude.Just "throughput_exceeded"+      | Lens.has (Core.hasStatus 429) e =+          Prelude.Just "too_many_requests"+      | Prelude.otherwise = Prelude.Nothing++-- | AWS CodeStar Notifications can\'t create the notification rule because+-- you do not have sufficient permissions.+_AccessDeniedException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_AccessDeniedException =+  Core._MatchServiceError+    defaultService+    "AccessDeniedException"+    Prelude.. Core.hasStatus 403++-- | AWS CodeStar Notifications can\'t complete the request because the+-- resource is being modified by another process. Wait a few minutes and+-- try again.+_ConcurrentModificationException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_ConcurrentModificationException =+  Core._MatchServiceError+    defaultService+    "ConcurrentModificationException"+    Prelude.. Core.hasStatus 400++-- | Some or all of the configuration is incomplete, missing, or not valid.+_ConfigurationException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_ConfigurationException =+  Core._MatchServiceError+    defaultService+    "ConfigurationException"+    Prelude.. Core.hasStatus 400++-- | The value for the enumeration token used in the request to return the+-- next batch of the results is not valid.+_InvalidNextTokenException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_InvalidNextTokenException =+  Core._MatchServiceError+    defaultService+    "InvalidNextTokenException"+    Prelude.. Core.hasStatus 400++-- | One of the AWS CodeStar Notifications limits has been exceeded. Limits+-- apply to accounts, notification rules, notifications, resources, and+-- targets. For more information, see Limits.+_LimitExceededException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_LimitExceededException =+  Core._MatchServiceError+    defaultService+    "LimitExceededException"+    Prelude.. Core.hasStatus 400++-- | A resource with the same name or ID already exists. Notification rule+-- names must be unique in your Amazon Web Services account.+_ResourceAlreadyExistsException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_ResourceAlreadyExistsException =+  Core._MatchServiceError+    defaultService+    "ResourceAlreadyExistsException"+    Prelude.. Core.hasStatus 409++-- | AWS CodeStar Notifications can\'t find a resource that matches the+-- provided ARN.+_ResourceNotFoundException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_ResourceNotFoundException =+  Core._MatchServiceError+    defaultService+    "ResourceNotFoundException"+    Prelude.. Core.hasStatus 404++-- | One or more parameter values are not valid.+_ValidationException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_ValidationException =+  Core._MatchServiceError+    defaultService+    "ValidationException"+    Prelude.. Core.hasStatus 400
+ gen/Amazonka/CodeStarNotifications/Types/DetailType.hs view
@@ -0,0 +1,71 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DerivingStrategies #-}+{-# LANGUAGE GeneralizedNewtypeDeriving #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE PatternSynonyms #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Amazonka.CodeStarNotifications.Types.DetailType+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+module Amazonka.CodeStarNotifications.Types.DetailType+  ( DetailType+      ( ..,+        DetailType_BASIC,+        DetailType_FULL+      ),+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype DetailType = DetailType'+  { fromDetailType ::+      Data.Text+  }+  deriving stock+    ( Prelude.Show,+      Prelude.Read,+      Prelude.Eq,+      Prelude.Ord,+      Prelude.Generic+    )+  deriving newtype+    ( Prelude.Hashable,+      Prelude.NFData,+      Data.FromText,+      Data.ToText,+      Data.ToByteString,+      Data.ToLog,+      Data.ToHeader,+      Data.ToQuery,+      Data.FromJSON,+      Data.FromJSONKey,+      Data.ToJSON,+      Data.ToJSONKey,+      Data.FromXML,+      Data.ToXML+    )++pattern DetailType_BASIC :: DetailType+pattern DetailType_BASIC = DetailType' "BASIC"++pattern DetailType_FULL :: DetailType+pattern DetailType_FULL = DetailType' "FULL"++{-# COMPLETE+  DetailType_BASIC,+  DetailType_FULL,+  DetailType'+  #-}
+ gen/Amazonka/CodeStarNotifications/Types/EventTypeSummary.hs view
@@ -0,0 +1,118 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Amazonka.CodeStarNotifications.Types.EventTypeSummary+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+module Amazonka.CodeStarNotifications.Types.EventTypeSummary where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++-- | Returns information about an event that has triggered a notification+-- rule.+--+-- /See:/ 'newEventTypeSummary' smart constructor.+data EventTypeSummary = EventTypeSummary'+  { -- | The system-generated ID of the event. For a complete list of event types+    -- and IDs, see+    -- <https://docs.aws.amazon.com/codestar-notifications/latest/userguide/concepts.html#concepts-api Notification concepts>+    -- in the /Developer Tools Console User Guide/.+    eventTypeId :: Prelude.Maybe Prelude.Text,+    -- | The name of the event.+    eventTypeName :: Prelude.Maybe Prelude.Text,+    -- | The resource type of the event.+    resourceType :: Prelude.Maybe Prelude.Text,+    -- | The name of the service for which the event applies.+    serviceName :: Prelude.Maybe Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'EventTypeSummary' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'eventTypeId', 'eventTypeSummary_eventTypeId' - The system-generated ID of the event. For a complete list of event types+-- and IDs, see+-- <https://docs.aws.amazon.com/codestar-notifications/latest/userguide/concepts.html#concepts-api Notification concepts>+-- in the /Developer Tools Console User Guide/.+--+-- 'eventTypeName', 'eventTypeSummary_eventTypeName' - The name of the event.+--+-- 'resourceType', 'eventTypeSummary_resourceType' - The resource type of the event.+--+-- 'serviceName', 'eventTypeSummary_serviceName' - The name of the service for which the event applies.+newEventTypeSummary ::+  EventTypeSummary+newEventTypeSummary =+  EventTypeSummary'+    { eventTypeId = Prelude.Nothing,+      eventTypeName = Prelude.Nothing,+      resourceType = Prelude.Nothing,+      serviceName = Prelude.Nothing+    }++-- | The system-generated ID of the event. For a complete list of event types+-- and IDs, see+-- <https://docs.aws.amazon.com/codestar-notifications/latest/userguide/concepts.html#concepts-api Notification concepts>+-- in the /Developer Tools Console User Guide/.+eventTypeSummary_eventTypeId :: Lens.Lens' EventTypeSummary (Prelude.Maybe Prelude.Text)+eventTypeSummary_eventTypeId = Lens.lens (\EventTypeSummary' {eventTypeId} -> eventTypeId) (\s@EventTypeSummary' {} a -> s {eventTypeId = a} :: EventTypeSummary)++-- | The name of the event.+eventTypeSummary_eventTypeName :: Lens.Lens' EventTypeSummary (Prelude.Maybe Prelude.Text)+eventTypeSummary_eventTypeName = Lens.lens (\EventTypeSummary' {eventTypeName} -> eventTypeName) (\s@EventTypeSummary' {} a -> s {eventTypeName = a} :: EventTypeSummary)++-- | The resource type of the event.+eventTypeSummary_resourceType :: Lens.Lens' EventTypeSummary (Prelude.Maybe Prelude.Text)+eventTypeSummary_resourceType = Lens.lens (\EventTypeSummary' {resourceType} -> resourceType) (\s@EventTypeSummary' {} a -> s {resourceType = a} :: EventTypeSummary)++-- | The name of the service for which the event applies.+eventTypeSummary_serviceName :: Lens.Lens' EventTypeSummary (Prelude.Maybe Prelude.Text)+eventTypeSummary_serviceName = Lens.lens (\EventTypeSummary' {serviceName} -> serviceName) (\s@EventTypeSummary' {} a -> s {serviceName = a} :: EventTypeSummary)++instance Data.FromJSON EventTypeSummary where+  parseJSON =+    Data.withObject+      "EventTypeSummary"+      ( \x ->+          EventTypeSummary'+            Prelude.<$> (x Data..:? "EventTypeId")+            Prelude.<*> (x Data..:? "EventTypeName")+            Prelude.<*> (x Data..:? "ResourceType")+            Prelude.<*> (x Data..:? "ServiceName")+      )++instance Prelude.Hashable EventTypeSummary where+  hashWithSalt _salt EventTypeSummary' {..} =+    _salt+      `Prelude.hashWithSalt` eventTypeId+      `Prelude.hashWithSalt` eventTypeName+      `Prelude.hashWithSalt` resourceType+      `Prelude.hashWithSalt` serviceName++instance Prelude.NFData EventTypeSummary where+  rnf EventTypeSummary' {..} =+    Prelude.rnf eventTypeId+      `Prelude.seq` Prelude.rnf eventTypeName+      `Prelude.seq` Prelude.rnf resourceType+      `Prelude.seq` Prelude.rnf serviceName
+ gen/Amazonka/CodeStarNotifications/Types/ListEventTypesFilter.hs view
@@ -0,0 +1,91 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Amazonka.CodeStarNotifications.Types.ListEventTypesFilter+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+module Amazonka.CodeStarNotifications.Types.ListEventTypesFilter where++import Amazonka.CodeStarNotifications.Types.ListEventTypesFilterName+import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++-- | Information about a filter to apply to the list of returned event types.+-- You can filter by resource type or service name.+--+-- /See:/ 'newListEventTypesFilter' smart constructor.+data ListEventTypesFilter = ListEventTypesFilter'+  { -- | The system-generated name of the filter type you want to filter by.+    name :: ListEventTypesFilterName,+    -- | The name of the resource type (for example, pipeline) or service name+    -- (for example, CodePipeline) that you want to filter by.+    value :: Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListEventTypesFilter' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'name', 'listEventTypesFilter_name' - The system-generated name of the filter type you want to filter by.+--+-- 'value', 'listEventTypesFilter_value' - The name of the resource type (for example, pipeline) or service name+-- (for example, CodePipeline) that you want to filter by.+newListEventTypesFilter ::+  -- | 'name'+  ListEventTypesFilterName ->+  -- | 'value'+  Prelude.Text ->+  ListEventTypesFilter+newListEventTypesFilter pName_ pValue_ =+  ListEventTypesFilter'+    { name = pName_,+      value = pValue_+    }++-- | The system-generated name of the filter type you want to filter by.+listEventTypesFilter_name :: Lens.Lens' ListEventTypesFilter ListEventTypesFilterName+listEventTypesFilter_name = Lens.lens (\ListEventTypesFilter' {name} -> name) (\s@ListEventTypesFilter' {} a -> s {name = a} :: ListEventTypesFilter)++-- | The name of the resource type (for example, pipeline) or service name+-- (for example, CodePipeline) that you want to filter by.+listEventTypesFilter_value :: Lens.Lens' ListEventTypesFilter Prelude.Text+listEventTypesFilter_value = Lens.lens (\ListEventTypesFilter' {value} -> value) (\s@ListEventTypesFilter' {} a -> s {value = a} :: ListEventTypesFilter)++instance Prelude.Hashable ListEventTypesFilter where+  hashWithSalt _salt ListEventTypesFilter' {..} =+    _salt+      `Prelude.hashWithSalt` name+      `Prelude.hashWithSalt` value++instance Prelude.NFData ListEventTypesFilter where+  rnf ListEventTypesFilter' {..} =+    Prelude.rnf name `Prelude.seq` Prelude.rnf value++instance Data.ToJSON ListEventTypesFilter where+  toJSON ListEventTypesFilter' {..} =+    Data.object+      ( Prelude.catMaybes+          [ Prelude.Just ("Name" Data..= name),+            Prelude.Just ("Value" Data..= value)+          ]+      )
+ gen/Amazonka/CodeStarNotifications/Types/ListEventTypesFilterName.hs view
@@ -0,0 +1,71 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DerivingStrategies #-}+{-# LANGUAGE GeneralizedNewtypeDeriving #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE PatternSynonyms #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Amazonka.CodeStarNotifications.Types.ListEventTypesFilterName+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+module Amazonka.CodeStarNotifications.Types.ListEventTypesFilterName+  ( ListEventTypesFilterName+      ( ..,+        ListEventTypesFilterName_RESOURCE_TYPE,+        ListEventTypesFilterName_SERVICE_NAME+      ),+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype ListEventTypesFilterName = ListEventTypesFilterName'+  { fromListEventTypesFilterName ::+      Data.Text+  }+  deriving stock+    ( Prelude.Show,+      Prelude.Read,+      Prelude.Eq,+      Prelude.Ord,+      Prelude.Generic+    )+  deriving newtype+    ( Prelude.Hashable,+      Prelude.NFData,+      Data.FromText,+      Data.ToText,+      Data.ToByteString,+      Data.ToLog,+      Data.ToHeader,+      Data.ToQuery,+      Data.FromJSON,+      Data.FromJSONKey,+      Data.ToJSON,+      Data.ToJSONKey,+      Data.FromXML,+      Data.ToXML+    )++pattern ListEventTypesFilterName_RESOURCE_TYPE :: ListEventTypesFilterName+pattern ListEventTypesFilterName_RESOURCE_TYPE = ListEventTypesFilterName' "RESOURCE_TYPE"++pattern ListEventTypesFilterName_SERVICE_NAME :: ListEventTypesFilterName+pattern ListEventTypesFilterName_SERVICE_NAME = ListEventTypesFilterName' "SERVICE_NAME"++{-# COMPLETE+  ListEventTypesFilterName_RESOURCE_TYPE,+  ListEventTypesFilterName_SERVICE_NAME,+  ListEventTypesFilterName'+  #-}
+ gen/Amazonka/CodeStarNotifications/Types/ListNotificationRulesFilter.hs view
@@ -0,0 +1,100 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Amazonka.CodeStarNotifications.Types.ListNotificationRulesFilter+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+module Amazonka.CodeStarNotifications.Types.ListNotificationRulesFilter where++import Amazonka.CodeStarNotifications.Types.ListNotificationRulesFilterName+import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++-- | Information about a filter to apply to the list of returned notification+-- rules. You can filter by event type, owner, resource, or target.+--+-- /See:/ 'newListNotificationRulesFilter' smart constructor.+data ListNotificationRulesFilter = ListNotificationRulesFilter'+  { -- | The name of the attribute you want to use to filter the returned+    -- notification rules.+    name :: ListNotificationRulesFilterName,+    -- | The value of the attribute you want to use to filter the returned+    -- notification rules. For example, if you specify filtering by /RESOURCE/+    -- in Name, you might specify the ARN of a pipeline in CodePipeline for the+    -- value.+    value :: Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListNotificationRulesFilter' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'name', 'listNotificationRulesFilter_name' - The name of the attribute you want to use to filter the returned+-- notification rules.+--+-- 'value', 'listNotificationRulesFilter_value' - The value of the attribute you want to use to filter the returned+-- notification rules. For example, if you specify filtering by /RESOURCE/+-- in Name, you might specify the ARN of a pipeline in CodePipeline for the+-- value.+newListNotificationRulesFilter ::+  -- | 'name'+  ListNotificationRulesFilterName ->+  -- | 'value'+  Prelude.Text ->+  ListNotificationRulesFilter+newListNotificationRulesFilter pName_ pValue_ =+  ListNotificationRulesFilter'+    { name = pName_,+      value = pValue_+    }++-- | The name of the attribute you want to use to filter the returned+-- notification rules.+listNotificationRulesFilter_name :: Lens.Lens' ListNotificationRulesFilter ListNotificationRulesFilterName+listNotificationRulesFilter_name = Lens.lens (\ListNotificationRulesFilter' {name} -> name) (\s@ListNotificationRulesFilter' {} a -> s {name = a} :: ListNotificationRulesFilter)++-- | The value of the attribute you want to use to filter the returned+-- notification rules. For example, if you specify filtering by /RESOURCE/+-- in Name, you might specify the ARN of a pipeline in CodePipeline for the+-- value.+listNotificationRulesFilter_value :: Lens.Lens' ListNotificationRulesFilter Prelude.Text+listNotificationRulesFilter_value = Lens.lens (\ListNotificationRulesFilter' {value} -> value) (\s@ListNotificationRulesFilter' {} a -> s {value = a} :: ListNotificationRulesFilter)++instance Prelude.Hashable ListNotificationRulesFilter where+  hashWithSalt _salt ListNotificationRulesFilter' {..} =+    _salt+      `Prelude.hashWithSalt` name+      `Prelude.hashWithSalt` value++instance Prelude.NFData ListNotificationRulesFilter where+  rnf ListNotificationRulesFilter' {..} =+    Prelude.rnf name `Prelude.seq` Prelude.rnf value++instance Data.ToJSON ListNotificationRulesFilter where+  toJSON ListNotificationRulesFilter' {..} =+    Data.object+      ( Prelude.catMaybes+          [ Prelude.Just ("Name" Data..= name),+            Prelude.Just ("Value" Data..= value)+          ]+      )
+ gen/Amazonka/CodeStarNotifications/Types/ListNotificationRulesFilterName.hs view
@@ -0,0 +1,81 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DerivingStrategies #-}+{-# LANGUAGE GeneralizedNewtypeDeriving #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE PatternSynonyms #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Amazonka.CodeStarNotifications.Types.ListNotificationRulesFilterName+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+module Amazonka.CodeStarNotifications.Types.ListNotificationRulesFilterName+  ( ListNotificationRulesFilterName+      ( ..,+        ListNotificationRulesFilterName_CREATED_BY,+        ListNotificationRulesFilterName_EVENT_TYPE_ID,+        ListNotificationRulesFilterName_RESOURCE,+        ListNotificationRulesFilterName_TARGET_ADDRESS+      ),+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype ListNotificationRulesFilterName = ListNotificationRulesFilterName'+  { fromListNotificationRulesFilterName ::+      Data.Text+  }+  deriving stock+    ( Prelude.Show,+      Prelude.Read,+      Prelude.Eq,+      Prelude.Ord,+      Prelude.Generic+    )+  deriving newtype+    ( Prelude.Hashable,+      Prelude.NFData,+      Data.FromText,+      Data.ToText,+      Data.ToByteString,+      Data.ToLog,+      Data.ToHeader,+      Data.ToQuery,+      Data.FromJSON,+      Data.FromJSONKey,+      Data.ToJSON,+      Data.ToJSONKey,+      Data.FromXML,+      Data.ToXML+    )++pattern ListNotificationRulesFilterName_CREATED_BY :: ListNotificationRulesFilterName+pattern ListNotificationRulesFilterName_CREATED_BY = ListNotificationRulesFilterName' "CREATED_BY"++pattern ListNotificationRulesFilterName_EVENT_TYPE_ID :: ListNotificationRulesFilterName+pattern ListNotificationRulesFilterName_EVENT_TYPE_ID = ListNotificationRulesFilterName' "EVENT_TYPE_ID"++pattern ListNotificationRulesFilterName_RESOURCE :: ListNotificationRulesFilterName+pattern ListNotificationRulesFilterName_RESOURCE = ListNotificationRulesFilterName' "RESOURCE"++pattern ListNotificationRulesFilterName_TARGET_ADDRESS :: ListNotificationRulesFilterName+pattern ListNotificationRulesFilterName_TARGET_ADDRESS = ListNotificationRulesFilterName' "TARGET_ADDRESS"++{-# COMPLETE+  ListNotificationRulesFilterName_CREATED_BY,+  ListNotificationRulesFilterName_EVENT_TYPE_ID,+  ListNotificationRulesFilterName_RESOURCE,+  ListNotificationRulesFilterName_TARGET_ADDRESS,+  ListNotificationRulesFilterName'+  #-}
+ gen/Amazonka/CodeStarNotifications/Types/ListTargetsFilter.hs view
@@ -0,0 +1,97 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Amazonka.CodeStarNotifications.Types.ListTargetsFilter+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+module Amazonka.CodeStarNotifications.Types.ListTargetsFilter where++import Amazonka.CodeStarNotifications.Types.ListTargetsFilterName+import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++-- | Information about a filter to apply to the list of returned targets. You+-- can filter by target type, address, or status. For example, to filter+-- results to notification rules that have active Chatbot topics as+-- targets, you could specify a ListTargetsFilter Name as @TargetType@ and+-- a Value of @SNS@, and a Name of @TARGET_STATUS@ and a Value of @ACTIVE@.+--+-- /See:/ 'newListTargetsFilter' smart constructor.+data ListTargetsFilter = ListTargetsFilter'+  { -- | The name of the attribute you want to use to filter the returned+    -- targets.+    name :: ListTargetsFilterName,+    -- | The value of the attribute you want to use to filter the returned+    -- targets. For example, if you specify @SNS@ for the Target type, you+    -- could specify an Amazon Resource Name (ARN) for a topic as the value.+    value :: Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListTargetsFilter' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'name', 'listTargetsFilter_name' - The name of the attribute you want to use to filter the returned+-- targets.+--+-- 'value', 'listTargetsFilter_value' - The value of the attribute you want to use to filter the returned+-- targets. For example, if you specify @SNS@ for the Target type, you+-- could specify an Amazon Resource Name (ARN) for a topic as the value.+newListTargetsFilter ::+  -- | 'name'+  ListTargetsFilterName ->+  -- | 'value'+  Prelude.Text ->+  ListTargetsFilter+newListTargetsFilter pName_ pValue_ =+  ListTargetsFilter' {name = pName_, value = pValue_}++-- | The name of the attribute you want to use to filter the returned+-- targets.+listTargetsFilter_name :: Lens.Lens' ListTargetsFilter ListTargetsFilterName+listTargetsFilter_name = Lens.lens (\ListTargetsFilter' {name} -> name) (\s@ListTargetsFilter' {} a -> s {name = a} :: ListTargetsFilter)++-- | The value of the attribute you want to use to filter the returned+-- targets. For example, if you specify @SNS@ for the Target type, you+-- could specify an Amazon Resource Name (ARN) for a topic as the value.+listTargetsFilter_value :: Lens.Lens' ListTargetsFilter Prelude.Text+listTargetsFilter_value = Lens.lens (\ListTargetsFilter' {value} -> value) (\s@ListTargetsFilter' {} a -> s {value = a} :: ListTargetsFilter)++instance Prelude.Hashable ListTargetsFilter where+  hashWithSalt _salt ListTargetsFilter' {..} =+    _salt+      `Prelude.hashWithSalt` name+      `Prelude.hashWithSalt` value++instance Prelude.NFData ListTargetsFilter where+  rnf ListTargetsFilter' {..} =+    Prelude.rnf name `Prelude.seq` Prelude.rnf value++instance Data.ToJSON ListTargetsFilter where+  toJSON ListTargetsFilter' {..} =+    Data.object+      ( Prelude.catMaybes+          [ Prelude.Just ("Name" Data..= name),+            Prelude.Just ("Value" Data..= value)+          ]+      )
+ gen/Amazonka/CodeStarNotifications/Types/ListTargetsFilterName.hs view
@@ -0,0 +1,76 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DerivingStrategies #-}+{-# LANGUAGE GeneralizedNewtypeDeriving #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE PatternSynonyms #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Amazonka.CodeStarNotifications.Types.ListTargetsFilterName+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+module Amazonka.CodeStarNotifications.Types.ListTargetsFilterName+  ( ListTargetsFilterName+      ( ..,+        ListTargetsFilterName_TARGET_ADDRESS,+        ListTargetsFilterName_TARGET_STATUS,+        ListTargetsFilterName_TARGET_TYPE+      ),+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype ListTargetsFilterName = ListTargetsFilterName'+  { fromListTargetsFilterName ::+      Data.Text+  }+  deriving stock+    ( Prelude.Show,+      Prelude.Read,+      Prelude.Eq,+      Prelude.Ord,+      Prelude.Generic+    )+  deriving newtype+    ( Prelude.Hashable,+      Prelude.NFData,+      Data.FromText,+      Data.ToText,+      Data.ToByteString,+      Data.ToLog,+      Data.ToHeader,+      Data.ToQuery,+      Data.FromJSON,+      Data.FromJSONKey,+      Data.ToJSON,+      Data.ToJSONKey,+      Data.FromXML,+      Data.ToXML+    )++pattern ListTargetsFilterName_TARGET_ADDRESS :: ListTargetsFilterName+pattern ListTargetsFilterName_TARGET_ADDRESS = ListTargetsFilterName' "TARGET_ADDRESS"++pattern ListTargetsFilterName_TARGET_STATUS :: ListTargetsFilterName+pattern ListTargetsFilterName_TARGET_STATUS = ListTargetsFilterName' "TARGET_STATUS"++pattern ListTargetsFilterName_TARGET_TYPE :: ListTargetsFilterName+pattern ListTargetsFilterName_TARGET_TYPE = ListTargetsFilterName' "TARGET_TYPE"++{-# COMPLETE+  ListTargetsFilterName_TARGET_ADDRESS,+  ListTargetsFilterName_TARGET_STATUS,+  ListTargetsFilterName_TARGET_TYPE,+  ListTargetsFilterName'+  #-}
+ gen/Amazonka/CodeStarNotifications/Types/NotificationRuleStatus.hs view
@@ -0,0 +1,71 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DerivingStrategies #-}+{-# LANGUAGE GeneralizedNewtypeDeriving #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE PatternSynonyms #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Amazonka.CodeStarNotifications.Types.NotificationRuleStatus+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+module Amazonka.CodeStarNotifications.Types.NotificationRuleStatus+  ( NotificationRuleStatus+      ( ..,+        NotificationRuleStatus_DISABLED,+        NotificationRuleStatus_ENABLED+      ),+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype NotificationRuleStatus = NotificationRuleStatus'+  { fromNotificationRuleStatus ::+      Data.Text+  }+  deriving stock+    ( Prelude.Show,+      Prelude.Read,+      Prelude.Eq,+      Prelude.Ord,+      Prelude.Generic+    )+  deriving newtype+    ( Prelude.Hashable,+      Prelude.NFData,+      Data.FromText,+      Data.ToText,+      Data.ToByteString,+      Data.ToLog,+      Data.ToHeader,+      Data.ToQuery,+      Data.FromJSON,+      Data.FromJSONKey,+      Data.ToJSON,+      Data.ToJSONKey,+      Data.FromXML,+      Data.ToXML+    )++pattern NotificationRuleStatus_DISABLED :: NotificationRuleStatus+pattern NotificationRuleStatus_DISABLED = NotificationRuleStatus' "DISABLED"++pattern NotificationRuleStatus_ENABLED :: NotificationRuleStatus+pattern NotificationRuleStatus_ENABLED = NotificationRuleStatus' "ENABLED"++{-# COMPLETE+  NotificationRuleStatus_DISABLED,+  NotificationRuleStatus_ENABLED,+  NotificationRuleStatus'+  #-}
+ gen/Amazonka/CodeStarNotifications/Types/NotificationRuleSummary.hs view
@@ -0,0 +1,83 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Amazonka.CodeStarNotifications.Types.NotificationRuleSummary+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+module Amazonka.CodeStarNotifications.Types.NotificationRuleSummary where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++-- | Information about a specified notification rule.+--+-- /See:/ 'newNotificationRuleSummary' smart constructor.+data NotificationRuleSummary = NotificationRuleSummary'+  { -- | The Amazon Resource Name (ARN) of the notification rule.+    arn :: Prelude.Maybe Prelude.Text,+    -- | The unique ID of the notification rule.+    id :: Prelude.Maybe Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'NotificationRuleSummary' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'arn', 'notificationRuleSummary_arn' - The Amazon Resource Name (ARN) of the notification rule.+--+-- 'id', 'notificationRuleSummary_id' - The unique ID of the notification rule.+newNotificationRuleSummary ::+  NotificationRuleSummary+newNotificationRuleSummary =+  NotificationRuleSummary'+    { arn = Prelude.Nothing,+      id = Prelude.Nothing+    }++-- | The Amazon Resource Name (ARN) of the notification rule.+notificationRuleSummary_arn :: Lens.Lens' NotificationRuleSummary (Prelude.Maybe Prelude.Text)+notificationRuleSummary_arn = Lens.lens (\NotificationRuleSummary' {arn} -> arn) (\s@NotificationRuleSummary' {} a -> s {arn = a} :: NotificationRuleSummary)++-- | The unique ID of the notification rule.+notificationRuleSummary_id :: Lens.Lens' NotificationRuleSummary (Prelude.Maybe Prelude.Text)+notificationRuleSummary_id = Lens.lens (\NotificationRuleSummary' {id} -> id) (\s@NotificationRuleSummary' {} a -> s {id = a} :: NotificationRuleSummary)++instance Data.FromJSON NotificationRuleSummary where+  parseJSON =+    Data.withObject+      "NotificationRuleSummary"+      ( \x ->+          NotificationRuleSummary'+            Prelude.<$> (x Data..:? "Arn")+            Prelude.<*> (x Data..:? "Id")+      )++instance Prelude.Hashable NotificationRuleSummary where+  hashWithSalt _salt NotificationRuleSummary' {..} =+    _salt+      `Prelude.hashWithSalt` arn+      `Prelude.hashWithSalt` id++instance Prelude.NFData NotificationRuleSummary where+  rnf NotificationRuleSummary' {..} =+    Prelude.rnf arn `Prelude.seq` Prelude.rnf id
+ gen/Amazonka/CodeStarNotifications/Types/Target.hs view
@@ -0,0 +1,96 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Amazonka.CodeStarNotifications.Types.Target+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+module Amazonka.CodeStarNotifications.Types.Target where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++-- | Information about the Chatbot topics or Chatbot clients associated with+-- a notification rule.+--+-- /See:/ 'newTarget' smart constructor.+data Target = Target'+  { -- | The Amazon Resource Name (ARN) of the Chatbot topic or Chatbot client.+    targetAddress :: Prelude.Maybe (Data.Sensitive Prelude.Text),+    -- | The target type. Can be an Chatbot topic or Chatbot client.+    --+    -- -   Chatbot topics are specified as @SNS@.+    --+    -- -   Chatbot clients are specified as @AWSChatbotSlack@.+    targetType :: Prelude.Maybe Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'Target' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'targetAddress', 'target_targetAddress' - The Amazon Resource Name (ARN) of the Chatbot topic or Chatbot client.+--+-- 'targetType', 'target_targetType' - The target type. Can be an Chatbot topic or Chatbot client.+--+-- -   Chatbot topics are specified as @SNS@.+--+-- -   Chatbot clients are specified as @AWSChatbotSlack@.+newTarget ::+  Target+newTarget =+  Target'+    { targetAddress = Prelude.Nothing,+      targetType = Prelude.Nothing+    }++-- | The Amazon Resource Name (ARN) of the Chatbot topic or Chatbot client.+target_targetAddress :: Lens.Lens' Target (Prelude.Maybe Prelude.Text)+target_targetAddress = Lens.lens (\Target' {targetAddress} -> targetAddress) (\s@Target' {} a -> s {targetAddress = a} :: Target) Prelude.. Lens.mapping Data._Sensitive++-- | The target type. Can be an Chatbot topic or Chatbot client.+--+-- -   Chatbot topics are specified as @SNS@.+--+-- -   Chatbot clients are specified as @AWSChatbotSlack@.+target_targetType :: Lens.Lens' Target (Prelude.Maybe Prelude.Text)+target_targetType = Lens.lens (\Target' {targetType} -> targetType) (\s@Target' {} a -> s {targetType = a} :: Target)++instance Prelude.Hashable Target where+  hashWithSalt _salt Target' {..} =+    _salt+      `Prelude.hashWithSalt` targetAddress+      `Prelude.hashWithSalt` targetType++instance Prelude.NFData Target where+  rnf Target' {..} =+    Prelude.rnf targetAddress+      `Prelude.seq` Prelude.rnf targetType++instance Data.ToJSON Target where+  toJSON Target' {..} =+    Data.object+      ( Prelude.catMaybes+          [ ("TargetAddress" Data..=) Prelude.<$> targetAddress,+            ("TargetType" Data..=) Prelude.<$> targetType+          ]+      )
+ gen/Amazonka/CodeStarNotifications/Types/TargetStatus.hs view
@@ -0,0 +1,86 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DerivingStrategies #-}+{-# LANGUAGE GeneralizedNewtypeDeriving #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE PatternSynonyms #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Amazonka.CodeStarNotifications.Types.TargetStatus+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+module Amazonka.CodeStarNotifications.Types.TargetStatus+  ( TargetStatus+      ( ..,+        TargetStatus_ACTIVE,+        TargetStatus_DEACTIVATED,+        TargetStatus_INACTIVE,+        TargetStatus_PENDING,+        TargetStatus_UNREACHABLE+      ),+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype TargetStatus = TargetStatus'+  { fromTargetStatus ::+      Data.Text+  }+  deriving stock+    ( Prelude.Show,+      Prelude.Read,+      Prelude.Eq,+      Prelude.Ord,+      Prelude.Generic+    )+  deriving newtype+    ( Prelude.Hashable,+      Prelude.NFData,+      Data.FromText,+      Data.ToText,+      Data.ToByteString,+      Data.ToLog,+      Data.ToHeader,+      Data.ToQuery,+      Data.FromJSON,+      Data.FromJSONKey,+      Data.ToJSON,+      Data.ToJSONKey,+      Data.FromXML,+      Data.ToXML+    )++pattern TargetStatus_ACTIVE :: TargetStatus+pattern TargetStatus_ACTIVE = TargetStatus' "ACTIVE"++pattern TargetStatus_DEACTIVATED :: TargetStatus+pattern TargetStatus_DEACTIVATED = TargetStatus' "DEACTIVATED"++pattern TargetStatus_INACTIVE :: TargetStatus+pattern TargetStatus_INACTIVE = TargetStatus' "INACTIVE"++pattern TargetStatus_PENDING :: TargetStatus+pattern TargetStatus_PENDING = TargetStatus' "PENDING"++pattern TargetStatus_UNREACHABLE :: TargetStatus+pattern TargetStatus_UNREACHABLE = TargetStatus' "UNREACHABLE"++{-# COMPLETE+  TargetStatus_ACTIVE,+  TargetStatus_DEACTIVATED,+  TargetStatus_INACTIVE,+  TargetStatus_PENDING,+  TargetStatus_UNREACHABLE,+  TargetStatus'+  #-}
+ gen/Amazonka/CodeStarNotifications/Types/TargetSummary.hs view
@@ -0,0 +1,109 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Amazonka.CodeStarNotifications.Types.TargetSummary+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+module Amazonka.CodeStarNotifications.Types.TargetSummary where++import Amazonka.CodeStarNotifications.Types.TargetStatus+import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++-- | Information about the targets specified for a notification rule.+--+-- /See:/ 'newTargetSummary' smart constructor.+data TargetSummary = TargetSummary'+  { -- | The Amazon Resource Name (ARN) of the Chatbot topic or Chatbot client.+    targetAddress :: Prelude.Maybe (Data.Sensitive Prelude.Text),+    -- | The status of the target.+    targetStatus :: Prelude.Maybe TargetStatus,+    -- | The type of the target (for example, @SNS@).+    --+    -- -   Chatbot topics are specified as @SNS@.+    --+    -- -   Chatbot clients are specified as @AWSChatbotSlack@.+    targetType :: Prelude.Maybe Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'TargetSummary' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'targetAddress', 'targetSummary_targetAddress' - The Amazon Resource Name (ARN) of the Chatbot topic or Chatbot client.+--+-- 'targetStatus', 'targetSummary_targetStatus' - The status of the target.+--+-- 'targetType', 'targetSummary_targetType' - The type of the target (for example, @SNS@).+--+-- -   Chatbot topics are specified as @SNS@.+--+-- -   Chatbot clients are specified as @AWSChatbotSlack@.+newTargetSummary ::+  TargetSummary+newTargetSummary =+  TargetSummary'+    { targetAddress = Prelude.Nothing,+      targetStatus = Prelude.Nothing,+      targetType = Prelude.Nothing+    }++-- | The Amazon Resource Name (ARN) of the Chatbot topic or Chatbot client.+targetSummary_targetAddress :: Lens.Lens' TargetSummary (Prelude.Maybe Prelude.Text)+targetSummary_targetAddress = Lens.lens (\TargetSummary' {targetAddress} -> targetAddress) (\s@TargetSummary' {} a -> s {targetAddress = a} :: TargetSummary) Prelude.. Lens.mapping Data._Sensitive++-- | The status of the target.+targetSummary_targetStatus :: Lens.Lens' TargetSummary (Prelude.Maybe TargetStatus)+targetSummary_targetStatus = Lens.lens (\TargetSummary' {targetStatus} -> targetStatus) (\s@TargetSummary' {} a -> s {targetStatus = a} :: TargetSummary)++-- | The type of the target (for example, @SNS@).+--+-- -   Chatbot topics are specified as @SNS@.+--+-- -   Chatbot clients are specified as @AWSChatbotSlack@.+targetSummary_targetType :: Lens.Lens' TargetSummary (Prelude.Maybe Prelude.Text)+targetSummary_targetType = Lens.lens (\TargetSummary' {targetType} -> targetType) (\s@TargetSummary' {} a -> s {targetType = a} :: TargetSummary)++instance Data.FromJSON TargetSummary where+  parseJSON =+    Data.withObject+      "TargetSummary"+      ( \x ->+          TargetSummary'+            Prelude.<$> (x Data..:? "TargetAddress")+            Prelude.<*> (x Data..:? "TargetStatus")+            Prelude.<*> (x Data..:? "TargetType")+      )++instance Prelude.Hashable TargetSummary where+  hashWithSalt _salt TargetSummary' {..} =+    _salt+      `Prelude.hashWithSalt` targetAddress+      `Prelude.hashWithSalt` targetStatus+      `Prelude.hashWithSalt` targetType++instance Prelude.NFData TargetSummary where+  rnf TargetSummary' {..} =+    Prelude.rnf targetAddress+      `Prelude.seq` Prelude.rnf targetStatus+      `Prelude.seq` Prelude.rnf targetType
+ gen/Amazonka/CodeStarNotifications/Unsubscribe.hs view
@@ -0,0 +1,190 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Amazonka.CodeStarNotifications.Unsubscribe+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Removes an association between a notification rule and an Chatbot topic+-- so that subscribers to that topic stop receiving notifications when the+-- events described in the rule are triggered.+module Amazonka.CodeStarNotifications.Unsubscribe+  ( -- * Creating a Request+    Unsubscribe (..),+    newUnsubscribe,++    -- * Request Lenses+    unsubscribe_arn,+    unsubscribe_targetAddress,++    -- * Destructuring the Response+    UnsubscribeResponse (..),+    newUnsubscribeResponse,++    -- * Response Lenses+    unsubscribeResponse_httpStatus,+    unsubscribeResponse_arn,+  )+where++import Amazonka.CodeStarNotifications.Types+import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newUnsubscribe' smart constructor.+data Unsubscribe = Unsubscribe'+  { -- | The Amazon Resource Name (ARN) of the notification rule.+    arn :: Prelude.Text,+    -- | The ARN of the Chatbot topic to unsubscribe from the notification rule.+    targetAddress :: Data.Sensitive Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'Unsubscribe' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'arn', 'unsubscribe_arn' - The Amazon Resource Name (ARN) of the notification rule.+--+-- 'targetAddress', 'unsubscribe_targetAddress' - The ARN of the Chatbot topic to unsubscribe from the notification rule.+newUnsubscribe ::+  -- | 'arn'+  Prelude.Text ->+  -- | 'targetAddress'+  Prelude.Text ->+  Unsubscribe+newUnsubscribe pArn_ pTargetAddress_ =+  Unsubscribe'+    { arn = pArn_,+      targetAddress =+        Data._Sensitive Lens.# pTargetAddress_+    }++-- | The Amazon Resource Name (ARN) of the notification rule.+unsubscribe_arn :: Lens.Lens' Unsubscribe Prelude.Text+unsubscribe_arn = Lens.lens (\Unsubscribe' {arn} -> arn) (\s@Unsubscribe' {} a -> s {arn = a} :: Unsubscribe)++-- | The ARN of the Chatbot topic to unsubscribe from the notification rule.+unsubscribe_targetAddress :: Lens.Lens' Unsubscribe Prelude.Text+unsubscribe_targetAddress = Lens.lens (\Unsubscribe' {targetAddress} -> targetAddress) (\s@Unsubscribe' {} a -> s {targetAddress = a} :: Unsubscribe) Prelude.. Data._Sensitive++instance Core.AWSRequest Unsubscribe where+  type AWSResponse Unsubscribe = UnsubscribeResponse+  request overrides =+    Request.postJSON (overrides defaultService)+  response =+    Response.receiveJSON+      ( \s h x ->+          UnsubscribeResponse'+            Prelude.<$> (Prelude.pure (Prelude.fromEnum s))+            Prelude.<*> (x Data..:> "Arn")+      )++instance Prelude.Hashable Unsubscribe where+  hashWithSalt _salt Unsubscribe' {..} =+    _salt+      `Prelude.hashWithSalt` arn+      `Prelude.hashWithSalt` targetAddress++instance Prelude.NFData Unsubscribe where+  rnf Unsubscribe' {..} =+    Prelude.rnf arn+      `Prelude.seq` Prelude.rnf targetAddress++instance Data.ToHeaders Unsubscribe where+  toHeaders =+    Prelude.const+      ( Prelude.mconcat+          [ "Content-Type"+              Data.=# ( "application/x-amz-json-1.1" ::+                          Prelude.ByteString+                      )+          ]+      )++instance Data.ToJSON Unsubscribe where+  toJSON Unsubscribe' {..} =+    Data.object+      ( Prelude.catMaybes+          [ Prelude.Just ("Arn" Data..= arn),+            Prelude.Just+              ("TargetAddress" Data..= targetAddress)+          ]+      )++instance Data.ToPath Unsubscribe where+  toPath = Prelude.const "/unsubscribe"++instance Data.ToQuery Unsubscribe where+  toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newUnsubscribeResponse' smart constructor.+data UnsubscribeResponse = UnsubscribeResponse'+  { -- | The response's http status code.+    httpStatus :: Prelude.Int,+    -- | The Amazon Resource Name (ARN) of the the notification rule from which+    -- you have removed a subscription.+    arn :: Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'UnsubscribeResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'httpStatus', 'unsubscribeResponse_httpStatus' - The response's http status code.+--+-- 'arn', 'unsubscribeResponse_arn' - The Amazon Resource Name (ARN) of the the notification rule from which+-- you have removed a subscription.+newUnsubscribeResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  -- | 'arn'+  Prelude.Text ->+  UnsubscribeResponse+newUnsubscribeResponse pHttpStatus_ pArn_ =+  UnsubscribeResponse'+    { httpStatus = pHttpStatus_,+      arn = pArn_+    }++-- | The response's http status code.+unsubscribeResponse_httpStatus :: Lens.Lens' UnsubscribeResponse Prelude.Int+unsubscribeResponse_httpStatus = Lens.lens (\UnsubscribeResponse' {httpStatus} -> httpStatus) (\s@UnsubscribeResponse' {} a -> s {httpStatus = a} :: UnsubscribeResponse)++-- | The Amazon Resource Name (ARN) of the the notification rule from which+-- you have removed a subscription.+unsubscribeResponse_arn :: Lens.Lens' UnsubscribeResponse Prelude.Text+unsubscribeResponse_arn = Lens.lens (\UnsubscribeResponse' {arn} -> arn) (\s@UnsubscribeResponse' {} a -> s {arn = a} :: UnsubscribeResponse)++instance Prelude.NFData UnsubscribeResponse where+  rnf UnsubscribeResponse' {..} =+    Prelude.rnf httpStatus+      `Prelude.seq` Prelude.rnf arn
+ gen/Amazonka/CodeStarNotifications/UntagResource.hs view
@@ -0,0 +1,167 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Amazonka.CodeStarNotifications.UntagResource+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Removes the association between one or more provided tags and a+-- notification rule.+module Amazonka.CodeStarNotifications.UntagResource+  ( -- * Creating a Request+    UntagResource (..),+    newUntagResource,++    -- * Request Lenses+    untagResource_arn,+    untagResource_tagKeys,++    -- * Destructuring the Response+    UntagResourceResponse (..),+    newUntagResourceResponse,++    -- * Response Lenses+    untagResourceResponse_httpStatus,+  )+where++import Amazonka.CodeStarNotifications.Types+import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newUntagResource' smart constructor.+data UntagResource = UntagResource'+  { -- | The Amazon Resource Name (ARN) of the notification rule from which to+    -- remove the tags.+    arn :: Prelude.Text,+    -- | The key names of the tags to remove.+    tagKeys :: [Prelude.Text]+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'UntagResource' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'arn', 'untagResource_arn' - The Amazon Resource Name (ARN) of the notification rule from which to+-- remove the tags.+--+-- 'tagKeys', 'untagResource_tagKeys' - The key names of the tags to remove.+newUntagResource ::+  -- | 'arn'+  Prelude.Text ->+  UntagResource+newUntagResource pArn_ =+  UntagResource'+    { arn = pArn_,+      tagKeys = Prelude.mempty+    }++-- | The Amazon Resource Name (ARN) of the notification rule from which to+-- remove the tags.+untagResource_arn :: Lens.Lens' UntagResource Prelude.Text+untagResource_arn = Lens.lens (\UntagResource' {arn} -> arn) (\s@UntagResource' {} a -> s {arn = a} :: UntagResource)++-- | The key names of the tags to remove.+untagResource_tagKeys :: Lens.Lens' UntagResource [Prelude.Text]+untagResource_tagKeys = Lens.lens (\UntagResource' {tagKeys} -> tagKeys) (\s@UntagResource' {} a -> s {tagKeys = a} :: UntagResource) Prelude.. Lens.coerced++instance Core.AWSRequest UntagResource where+  type+    AWSResponse UntagResource =+      UntagResourceResponse+  request overrides =+    Request.postJSON (overrides defaultService)+  response =+    Response.receiveEmpty+      ( \s h x ->+          UntagResourceResponse'+            Prelude.<$> (Prelude.pure (Prelude.fromEnum s))+      )++instance Prelude.Hashable UntagResource where+  hashWithSalt _salt UntagResource' {..} =+    _salt+      `Prelude.hashWithSalt` arn+      `Prelude.hashWithSalt` tagKeys++instance Prelude.NFData UntagResource where+  rnf UntagResource' {..} =+    Prelude.rnf arn `Prelude.seq` Prelude.rnf tagKeys++instance Data.ToHeaders UntagResource where+  toHeaders =+    Prelude.const+      ( Prelude.mconcat+          [ "Content-Type"+              Data.=# ( "application/x-amz-json-1.1" ::+                          Prelude.ByteString+                      )+          ]+      )++instance Data.ToJSON UntagResource where+  toJSON = Prelude.const (Data.Object Prelude.mempty)++instance Data.ToPath UntagResource where+  toPath UntagResource' {..} =+    Prelude.mconcat ["/untagResource/", Data.toBS arn]++instance Data.ToQuery UntagResource where+  toQuery UntagResource' {..} =+    Prelude.mconcat+      ["tagKeys" Data.=: Data.toQueryList "member" tagKeys]++-- | /See:/ 'newUntagResourceResponse' smart constructor.+data UntagResourceResponse = UntagResourceResponse'+  { -- | The response's http status code.+    httpStatus :: Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'UntagResourceResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'httpStatus', 'untagResourceResponse_httpStatus' - The response's http status code.+newUntagResourceResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  UntagResourceResponse+newUntagResourceResponse pHttpStatus_ =+  UntagResourceResponse' {httpStatus = pHttpStatus_}++-- | The response's http status code.+untagResourceResponse_httpStatus :: Lens.Lens' UntagResourceResponse Prelude.Int+untagResourceResponse_httpStatus = Lens.lens (\UntagResourceResponse' {httpStatus} -> httpStatus) (\s@UntagResourceResponse' {} a -> s {httpStatus = a} :: UntagResourceResponse)++instance Prelude.NFData UntagResourceResponse where+  rnf UntagResourceResponse' {..} =+    Prelude.rnf httpStatus
+ gen/Amazonka/CodeStarNotifications/UpdateNotificationRule.hs view
@@ -0,0 +1,258 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Amazonka.CodeStarNotifications.UpdateNotificationRule+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Updates a notification rule for a resource. You can change the events+-- that trigger the notification rule, the status of the rule, and the+-- targets that receive the notifications.+--+-- To add or remove tags for a notification rule, you must use TagResource+-- and UntagResource.+module Amazonka.CodeStarNotifications.UpdateNotificationRule+  ( -- * Creating a Request+    UpdateNotificationRule (..),+    newUpdateNotificationRule,++    -- * Request Lenses+    updateNotificationRule_detailType,+    updateNotificationRule_eventTypeIds,+    updateNotificationRule_name,+    updateNotificationRule_status,+    updateNotificationRule_targets,+    updateNotificationRule_arn,++    -- * Destructuring the Response+    UpdateNotificationRuleResponse (..),+    newUpdateNotificationRuleResponse,++    -- * Response Lenses+    updateNotificationRuleResponse_httpStatus,+  )+where++import Amazonka.CodeStarNotifications.Types+import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newUpdateNotificationRule' smart constructor.+data UpdateNotificationRule = UpdateNotificationRule'+  { -- | The level of detail to include in the notifications for this resource.+    -- BASIC will include only the contents of the event as it would appear in+    -- Amazon CloudWatch. FULL will include any supplemental information+    -- provided by AWS CodeStar Notifications and\/or the service for the+    -- resource for which the notification is created.+    detailType :: Prelude.Maybe DetailType,+    -- | A list of event types associated with this notification rule. For a+    -- complete list of event types and IDs, see+    -- <https://docs.aws.amazon.com/codestar-notifications/latest/userguide/concepts.html#concepts-api Notification concepts>+    -- in the /Developer Tools Console User Guide/.+    eventTypeIds :: Prelude.Maybe [Prelude.Text],+    -- | The name of the notification rule.+    name :: Prelude.Maybe (Data.Sensitive Prelude.Text),+    -- | The status of the notification rule. Valid statuses include enabled+    -- (sending notifications) or disabled (not sending notifications).+    status :: Prelude.Maybe NotificationRuleStatus,+    -- | The address and type of the targets to receive notifications from this+    -- notification rule.+    targets :: Prelude.Maybe [Target],+    -- | The Amazon Resource Name (ARN) of the notification rule.+    arn :: Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'UpdateNotificationRule' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'detailType', 'updateNotificationRule_detailType' - The level of detail to include in the notifications for this resource.+-- BASIC will include only the contents of the event as it would appear in+-- Amazon CloudWatch. FULL will include any supplemental information+-- provided by AWS CodeStar Notifications and\/or the service for the+-- resource for which the notification is created.+--+-- 'eventTypeIds', 'updateNotificationRule_eventTypeIds' - A list of event types associated with this notification rule. For a+-- complete list of event types and IDs, see+-- <https://docs.aws.amazon.com/codestar-notifications/latest/userguide/concepts.html#concepts-api Notification concepts>+-- in the /Developer Tools Console User Guide/.+--+-- 'name', 'updateNotificationRule_name' - The name of the notification rule.+--+-- 'status', 'updateNotificationRule_status' - The status of the notification rule. Valid statuses include enabled+-- (sending notifications) or disabled (not sending notifications).+--+-- 'targets', 'updateNotificationRule_targets' - The address and type of the targets to receive notifications from this+-- notification rule.+--+-- 'arn', 'updateNotificationRule_arn' - The Amazon Resource Name (ARN) of the notification rule.+newUpdateNotificationRule ::+  -- | 'arn'+  Prelude.Text ->+  UpdateNotificationRule+newUpdateNotificationRule pArn_ =+  UpdateNotificationRule'+    { detailType =+        Prelude.Nothing,+      eventTypeIds = Prelude.Nothing,+      name = Prelude.Nothing,+      status = Prelude.Nothing,+      targets = Prelude.Nothing,+      arn = pArn_+    }++-- | The level of detail to include in the notifications for this resource.+-- BASIC will include only the contents of the event as it would appear in+-- Amazon CloudWatch. FULL will include any supplemental information+-- provided by AWS CodeStar Notifications and\/or the service for the+-- resource for which the notification is created.+updateNotificationRule_detailType :: Lens.Lens' UpdateNotificationRule (Prelude.Maybe DetailType)+updateNotificationRule_detailType = Lens.lens (\UpdateNotificationRule' {detailType} -> detailType) (\s@UpdateNotificationRule' {} a -> s {detailType = a} :: UpdateNotificationRule)++-- | A list of event types associated with this notification rule. For a+-- complete list of event types and IDs, see+-- <https://docs.aws.amazon.com/codestar-notifications/latest/userguide/concepts.html#concepts-api Notification concepts>+-- in the /Developer Tools Console User Guide/.+updateNotificationRule_eventTypeIds :: Lens.Lens' UpdateNotificationRule (Prelude.Maybe [Prelude.Text])+updateNotificationRule_eventTypeIds = Lens.lens (\UpdateNotificationRule' {eventTypeIds} -> eventTypeIds) (\s@UpdateNotificationRule' {} a -> s {eventTypeIds = a} :: UpdateNotificationRule) Prelude.. Lens.mapping Lens.coerced++-- | The name of the notification rule.+updateNotificationRule_name :: Lens.Lens' UpdateNotificationRule (Prelude.Maybe Prelude.Text)+updateNotificationRule_name = Lens.lens (\UpdateNotificationRule' {name} -> name) (\s@UpdateNotificationRule' {} a -> s {name = a} :: UpdateNotificationRule) Prelude.. Lens.mapping Data._Sensitive++-- | The status of the notification rule. Valid statuses include enabled+-- (sending notifications) or disabled (not sending notifications).+updateNotificationRule_status :: Lens.Lens' UpdateNotificationRule (Prelude.Maybe NotificationRuleStatus)+updateNotificationRule_status = Lens.lens (\UpdateNotificationRule' {status} -> status) (\s@UpdateNotificationRule' {} a -> s {status = a} :: UpdateNotificationRule)++-- | The address and type of the targets to receive notifications from this+-- notification rule.+updateNotificationRule_targets :: Lens.Lens' UpdateNotificationRule (Prelude.Maybe [Target])+updateNotificationRule_targets = Lens.lens (\UpdateNotificationRule' {targets} -> targets) (\s@UpdateNotificationRule' {} a -> s {targets = a} :: UpdateNotificationRule) Prelude.. Lens.mapping Lens.coerced++-- | The Amazon Resource Name (ARN) of the notification rule.+updateNotificationRule_arn :: Lens.Lens' UpdateNotificationRule Prelude.Text+updateNotificationRule_arn = Lens.lens (\UpdateNotificationRule' {arn} -> arn) (\s@UpdateNotificationRule' {} a -> s {arn = a} :: UpdateNotificationRule)++instance Core.AWSRequest UpdateNotificationRule where+  type+    AWSResponse UpdateNotificationRule =+      UpdateNotificationRuleResponse+  request overrides =+    Request.postJSON (overrides defaultService)+  response =+    Response.receiveEmpty+      ( \s h x ->+          UpdateNotificationRuleResponse'+            Prelude.<$> (Prelude.pure (Prelude.fromEnum s))+      )++instance Prelude.Hashable UpdateNotificationRule where+  hashWithSalt _salt UpdateNotificationRule' {..} =+    _salt+      `Prelude.hashWithSalt` detailType+      `Prelude.hashWithSalt` eventTypeIds+      `Prelude.hashWithSalt` name+      `Prelude.hashWithSalt` status+      `Prelude.hashWithSalt` targets+      `Prelude.hashWithSalt` arn++instance Prelude.NFData UpdateNotificationRule where+  rnf UpdateNotificationRule' {..} =+    Prelude.rnf detailType+      `Prelude.seq` Prelude.rnf eventTypeIds+      `Prelude.seq` Prelude.rnf name+      `Prelude.seq` Prelude.rnf status+      `Prelude.seq` Prelude.rnf targets+      `Prelude.seq` Prelude.rnf arn++instance Data.ToHeaders UpdateNotificationRule where+  toHeaders =+    Prelude.const+      ( Prelude.mconcat+          [ "Content-Type"+              Data.=# ( "application/x-amz-json-1.1" ::+                          Prelude.ByteString+                      )+          ]+      )++instance Data.ToJSON UpdateNotificationRule where+  toJSON UpdateNotificationRule' {..} =+    Data.object+      ( Prelude.catMaybes+          [ ("DetailType" Data..=) Prelude.<$> detailType,+            ("EventTypeIds" Data..=) Prelude.<$> eventTypeIds,+            ("Name" Data..=) Prelude.<$> name,+            ("Status" Data..=) Prelude.<$> status,+            ("Targets" Data..=) Prelude.<$> targets,+            Prelude.Just ("Arn" Data..= arn)+          ]+      )++instance Data.ToPath UpdateNotificationRule where+  toPath = Prelude.const "/updateNotificationRule"++instance Data.ToQuery UpdateNotificationRule where+  toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newUpdateNotificationRuleResponse' smart constructor.+data UpdateNotificationRuleResponse = UpdateNotificationRuleResponse'+  { -- | The response's http status code.+    httpStatus :: Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'UpdateNotificationRuleResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'httpStatus', 'updateNotificationRuleResponse_httpStatus' - The response's http status code.+newUpdateNotificationRuleResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  UpdateNotificationRuleResponse+newUpdateNotificationRuleResponse pHttpStatus_ =+  UpdateNotificationRuleResponse'+    { httpStatus =+        pHttpStatus_+    }++-- | The response's http status code.+updateNotificationRuleResponse_httpStatus :: Lens.Lens' UpdateNotificationRuleResponse Prelude.Int+updateNotificationRuleResponse_httpStatus = Lens.lens (\UpdateNotificationRuleResponse' {httpStatus} -> httpStatus) (\s@UpdateNotificationRuleResponse' {} a -> s {httpStatus = a} :: UpdateNotificationRuleResponse)++instance+  Prelude.NFData+    UpdateNotificationRuleResponse+  where+  rnf UpdateNotificationRuleResponse' {..} =+    Prelude.rnf httpStatus
+ gen/Amazonka/CodeStarNotifications/Waiters.hs view
@@ -0,0 +1,24 @@+{-# LANGUAGE DisambiguateRecordFields #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Amazonka.CodeStarNotifications.Waiters+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+module Amazonka.CodeStarNotifications.Waiters where++import Amazonka.CodeStarNotifications.Lens+import Amazonka.CodeStarNotifications.Types+import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude
+ src/.gitkeep view
+ test/Main.hs view
@@ -0,0 +1,23 @@+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- |+-- Module      : Main+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+module Main (main) where++import Test.Amazonka.CodeStarNotifications+import Test.Amazonka.CodeStarNotifications.Internal+import Test.Tasty++main :: IO ()+main =+  defaultMain $+    testGroup+      "CodeStarNotifications"+      [ testGroup "tests" tests,+        testGroup "fixtures" fixtures+      ]
+ test/Test/Amazonka/CodeStarNotifications.hs view
@@ -0,0 +1,20 @@+-- |+-- Module      : Test.Amazonka.CodeStarNotifications+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+module Test.Amazonka.CodeStarNotifications+  ( tests,+    fixtures,+  )+where++import Test.Tasty (TestTree)++tests :: [TestTree]+tests = []++fixtures :: [TestTree]+fixtures = []
+ test/Test/Amazonka/CodeStarNotifications/Internal.hs view
@@ -0,0 +1,8 @@+-- |+-- Module      : Test.Amazonka.CodeStarNotifications.Internal+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+module Test.Amazonka.CodeStarNotifications.Internal where
+ test/Test/Amazonka/Gen/CodeStarNotifications.hs view
@@ -0,0 +1,298 @@+{-# OPTIONS_GHC -fno-warn-orphans #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Test.Amazonka.Gen.CodeStarNotifications+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+module Test.Amazonka.Gen.CodeStarNotifications where++import Amazonka.CodeStarNotifications+import qualified Data.Proxy as Proxy+import Test.Amazonka.CodeStarNotifications.Internal+import Test.Amazonka.Fixture+import Test.Amazonka.Prelude+import Test.Tasty++-- Auto-generated: the actual test selection needs to be manually placed into+-- the top-level so that real test data can be incrementally added.+--+-- This commented snippet is what the entire set should look like:++-- fixtures :: TestTree+-- fixtures =+--     [ testGroup "request"+--         [ requestCreateNotificationRule $+--             newCreateNotificationRule+--+--         , requestDeleteNotificationRule $+--             newDeleteNotificationRule+--+--         , requestDeleteTarget $+--             newDeleteTarget+--+--         , requestDescribeNotificationRule $+--             newDescribeNotificationRule+--+--         , requestListEventTypes $+--             newListEventTypes+--+--         , requestListNotificationRules $+--             newListNotificationRules+--+--         , requestListTagsForResource $+--             newListTagsForResource+--+--         , requestListTargets $+--             newListTargets+--+--         , requestSubscribe $+--             newSubscribe+--+--         , requestTagResource $+--             newTagResource+--+--         , requestUnsubscribe $+--             newUnsubscribe+--+--         , requestUntagResource $+--             newUntagResource+--+--         , requestUpdateNotificationRule $+--             newUpdateNotificationRule+--+--           ]++--     , testGroup "response"+--         [ responseCreateNotificationRule $+--             newCreateNotificationRuleResponse+--+--         , responseDeleteNotificationRule $+--             newDeleteNotificationRuleResponse+--+--         , responseDeleteTarget $+--             newDeleteTargetResponse+--+--         , responseDescribeNotificationRule $+--             newDescribeNotificationRuleResponse+--+--         , responseListEventTypes $+--             newListEventTypesResponse+--+--         , responseListNotificationRules $+--             newListNotificationRulesResponse+--+--         , responseListTagsForResource $+--             newListTagsForResourceResponse+--+--         , responseListTargets $+--             newListTargetsResponse+--+--         , responseSubscribe $+--             newSubscribeResponse+--+--         , responseTagResource $+--             newTagResourceResponse+--+--         , responseUnsubscribe $+--             newUnsubscribeResponse+--+--         , responseUntagResource $+--             newUntagResourceResponse+--+--         , responseUpdateNotificationRule $+--             newUpdateNotificationRuleResponse+--+--           ]+--     ]++-- Requests++requestCreateNotificationRule :: CreateNotificationRule -> TestTree+requestCreateNotificationRule =+  req+    "CreateNotificationRule"+    "fixture/CreateNotificationRule.yaml"++requestDeleteNotificationRule :: DeleteNotificationRule -> TestTree+requestDeleteNotificationRule =+  req+    "DeleteNotificationRule"+    "fixture/DeleteNotificationRule.yaml"++requestDeleteTarget :: DeleteTarget -> TestTree+requestDeleteTarget =+  req+    "DeleteTarget"+    "fixture/DeleteTarget.yaml"++requestDescribeNotificationRule :: DescribeNotificationRule -> TestTree+requestDescribeNotificationRule =+  req+    "DescribeNotificationRule"+    "fixture/DescribeNotificationRule.yaml"++requestListEventTypes :: ListEventTypes -> TestTree+requestListEventTypes =+  req+    "ListEventTypes"+    "fixture/ListEventTypes.yaml"++requestListNotificationRules :: ListNotificationRules -> TestTree+requestListNotificationRules =+  req+    "ListNotificationRules"+    "fixture/ListNotificationRules.yaml"++requestListTagsForResource :: ListTagsForResource -> TestTree+requestListTagsForResource =+  req+    "ListTagsForResource"+    "fixture/ListTagsForResource.yaml"++requestListTargets :: ListTargets -> TestTree+requestListTargets =+  req+    "ListTargets"+    "fixture/ListTargets.yaml"++requestSubscribe :: Subscribe -> TestTree+requestSubscribe =+  req+    "Subscribe"+    "fixture/Subscribe.yaml"++requestTagResource :: TagResource -> TestTree+requestTagResource =+  req+    "TagResource"+    "fixture/TagResource.yaml"++requestUnsubscribe :: Unsubscribe -> TestTree+requestUnsubscribe =+  req+    "Unsubscribe"+    "fixture/Unsubscribe.yaml"++requestUntagResource :: UntagResource -> TestTree+requestUntagResource =+  req+    "UntagResource"+    "fixture/UntagResource.yaml"++requestUpdateNotificationRule :: UpdateNotificationRule -> TestTree+requestUpdateNotificationRule =+  req+    "UpdateNotificationRule"+    "fixture/UpdateNotificationRule.yaml"++-- Responses++responseCreateNotificationRule :: CreateNotificationRuleResponse -> TestTree+responseCreateNotificationRule =+  res+    "CreateNotificationRuleResponse"+    "fixture/CreateNotificationRuleResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy CreateNotificationRule)++responseDeleteNotificationRule :: DeleteNotificationRuleResponse -> TestTree+responseDeleteNotificationRule =+  res+    "DeleteNotificationRuleResponse"+    "fixture/DeleteNotificationRuleResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy DeleteNotificationRule)++responseDeleteTarget :: DeleteTargetResponse -> TestTree+responseDeleteTarget =+  res+    "DeleteTargetResponse"+    "fixture/DeleteTargetResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy DeleteTarget)++responseDescribeNotificationRule :: DescribeNotificationRuleResponse -> TestTree+responseDescribeNotificationRule =+  res+    "DescribeNotificationRuleResponse"+    "fixture/DescribeNotificationRuleResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy DescribeNotificationRule)++responseListEventTypes :: ListEventTypesResponse -> TestTree+responseListEventTypes =+  res+    "ListEventTypesResponse"+    "fixture/ListEventTypesResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy ListEventTypes)++responseListNotificationRules :: ListNotificationRulesResponse -> TestTree+responseListNotificationRules =+  res+    "ListNotificationRulesResponse"+    "fixture/ListNotificationRulesResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy ListNotificationRules)++responseListTagsForResource :: ListTagsForResourceResponse -> TestTree+responseListTagsForResource =+  res+    "ListTagsForResourceResponse"+    "fixture/ListTagsForResourceResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy ListTagsForResource)++responseListTargets :: ListTargetsResponse -> TestTree+responseListTargets =+  res+    "ListTargetsResponse"+    "fixture/ListTargetsResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy ListTargets)++responseSubscribe :: SubscribeResponse -> TestTree+responseSubscribe =+  res+    "SubscribeResponse"+    "fixture/SubscribeResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy Subscribe)++responseTagResource :: TagResourceResponse -> TestTree+responseTagResource =+  res+    "TagResourceResponse"+    "fixture/TagResourceResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy TagResource)++responseUnsubscribe :: UnsubscribeResponse -> TestTree+responseUnsubscribe =+  res+    "UnsubscribeResponse"+    "fixture/UnsubscribeResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy Unsubscribe)++responseUntagResource :: UntagResourceResponse -> TestTree+responseUntagResource =+  res+    "UntagResourceResponse"+    "fixture/UntagResourceResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy UntagResource)++responseUpdateNotificationRule :: UpdateNotificationRuleResponse -> TestTree+responseUpdateNotificationRule =+  res+    "UpdateNotificationRuleResponse"+    "fixture/UpdateNotificationRuleResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy UpdateNotificationRule)