packages feed

stratosphere-codestarnotifications (empty) → 1.0.0

raw patch · 5 files changed

+260/−0 lines, 5 filesdep +aesondep +basedep +stratosphere

Dependencies added: aeson, base, stratosphere

Files

+ LICENSE.md view
@@ -0,0 +1,20 @@+Copyright (c) 2016 David Reaver+Copyright (c) 2022 Markus Schirp++Permission is hereby granted, free of charge, to any person obtaining a copy of+this software and associated documentation files (the "Software"), to deal in+the Software without restriction, including without limitation the rights to+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies+of the Software, and to permit persons to whom the Software is furnished to do+so, subject to the following conditions:++The above copyright notice and this permission notice shall be included in all+copies or substantial portions of the Software.++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE+SOFTWARE.
+ gen/Stratosphere/CodeStarNotifications/NotificationRule.hs view
@@ -0,0 +1,115 @@+module Stratosphere.CodeStarNotifications.NotificationRule (+        module Exports, NotificationRule(..), mkNotificationRule+    ) where+import qualified Data.Aeson as JSON+import qualified Stratosphere.Prelude as Prelude+import Stratosphere.Property+import {-# SOURCE #-} Stratosphere.CodeStarNotifications.NotificationRule.TargetProperty as Exports+import Stratosphere.ResourceProperties+import Stratosphere.Value+data NotificationRule+  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codestarnotifications-notificationrule.html>+    NotificationRule {haddock_workaround_ :: (),+                      -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codestarnotifications-notificationrule.html#cfn-codestarnotifications-notificationrule-createdby>+                      createdBy :: (Prelude.Maybe (Value Prelude.Text)),+                      -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codestarnotifications-notificationrule.html#cfn-codestarnotifications-notificationrule-detailtype>+                      detailType :: (Value Prelude.Text),+                      -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codestarnotifications-notificationrule.html#cfn-codestarnotifications-notificationrule-eventtypeid>+                      eventTypeId :: (Prelude.Maybe (Value Prelude.Text)),+                      -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codestarnotifications-notificationrule.html#cfn-codestarnotifications-notificationrule-eventtypeids>+                      eventTypeIds :: (ValueList Prelude.Text),+                      -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codestarnotifications-notificationrule.html#cfn-codestarnotifications-notificationrule-name>+                      name :: (Value Prelude.Text),+                      -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codestarnotifications-notificationrule.html#cfn-codestarnotifications-notificationrule-resource>+                      resource :: (Value Prelude.Text),+                      -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codestarnotifications-notificationrule.html#cfn-codestarnotifications-notificationrule-status>+                      status :: (Prelude.Maybe (Value Prelude.Text)),+                      -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codestarnotifications-notificationrule.html#cfn-codestarnotifications-notificationrule-tags>+                      tags :: (Prelude.Maybe (Prelude.Map Prelude.Text (Value Prelude.Text))),+                      -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codestarnotifications-notificationrule.html#cfn-codestarnotifications-notificationrule-targetaddress>+                      targetAddress :: (Prelude.Maybe (Value Prelude.Text)),+                      -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codestarnotifications-notificationrule.html#cfn-codestarnotifications-notificationrule-targets>+                      targets :: [TargetProperty]}+  deriving stock (Prelude.Eq, Prelude.Show)+mkNotificationRule ::+  Value Prelude.Text+  -> ValueList Prelude.Text+     -> Value Prelude.Text+        -> Value Prelude.Text -> [TargetProperty] -> NotificationRule+mkNotificationRule detailType eventTypeIds name resource targets+  = NotificationRule+      {haddock_workaround_ = (), detailType = detailType,+       eventTypeIds = eventTypeIds, name = name, resource = resource,+       targets = targets, createdBy = Prelude.Nothing,+       eventTypeId = Prelude.Nothing, status = Prelude.Nothing,+       tags = Prelude.Nothing, targetAddress = Prelude.Nothing}+instance ToResourceProperties NotificationRule where+  toResourceProperties NotificationRule {..}+    = ResourceProperties+        {awsType = "AWS::CodeStarNotifications::NotificationRule",+         supportsTags = Prelude.True,+         properties = Prelude.fromList+                        ((Prelude.<>)+                           ["DetailType" JSON..= detailType,+                            "EventTypeIds" JSON..= eventTypeIds, "Name" JSON..= name,+                            "Resource" JSON..= resource, "Targets" JSON..= targets]+                           (Prelude.catMaybes+                              [(JSON..=) "CreatedBy" Prelude.<$> createdBy,+                               (JSON..=) "EventTypeId" Prelude.<$> eventTypeId,+                               (JSON..=) "Status" Prelude.<$> status,+                               (JSON..=) "Tags" Prelude.<$> tags,+                               (JSON..=) "TargetAddress" Prelude.<$> targetAddress]))}+instance JSON.ToJSON NotificationRule where+  toJSON NotificationRule {..}+    = JSON.object+        (Prelude.fromList+           ((Prelude.<>)+              ["DetailType" JSON..= detailType,+               "EventTypeIds" JSON..= eventTypeIds, "Name" JSON..= name,+               "Resource" JSON..= resource, "Targets" JSON..= targets]+              (Prelude.catMaybes+                 [(JSON..=) "CreatedBy" Prelude.<$> createdBy,+                  (JSON..=) "EventTypeId" Prelude.<$> eventTypeId,+                  (JSON..=) "Status" Prelude.<$> status,+                  (JSON..=) "Tags" Prelude.<$> tags,+                  (JSON..=) "TargetAddress" Prelude.<$> targetAddress])))+instance Property "CreatedBy" NotificationRule where+  type PropertyType "CreatedBy" NotificationRule = Value Prelude.Text+  set newValue NotificationRule {..}+    = NotificationRule {createdBy = Prelude.pure newValue, ..}+instance Property "DetailType" NotificationRule where+  type PropertyType "DetailType" NotificationRule = Value Prelude.Text+  set newValue NotificationRule {..}+    = NotificationRule {detailType = newValue, ..}+instance Property "EventTypeId" NotificationRule where+  type PropertyType "EventTypeId" NotificationRule = Value Prelude.Text+  set newValue NotificationRule {..}+    = NotificationRule {eventTypeId = Prelude.pure newValue, ..}+instance Property "EventTypeIds" NotificationRule where+  type PropertyType "EventTypeIds" NotificationRule = ValueList Prelude.Text+  set newValue NotificationRule {..}+    = NotificationRule {eventTypeIds = newValue, ..}+instance Property "Name" NotificationRule where+  type PropertyType "Name" NotificationRule = Value Prelude.Text+  set newValue NotificationRule {..}+    = NotificationRule {name = newValue, ..}+instance Property "Resource" NotificationRule where+  type PropertyType "Resource" NotificationRule = Value Prelude.Text+  set newValue NotificationRule {..}+    = NotificationRule {resource = newValue, ..}+instance Property "Status" NotificationRule where+  type PropertyType "Status" NotificationRule = Value Prelude.Text+  set newValue NotificationRule {..}+    = NotificationRule {status = Prelude.pure newValue, ..}+instance Property "Tags" NotificationRule where+  type PropertyType "Tags" NotificationRule = Prelude.Map Prelude.Text (Value Prelude.Text)+  set newValue NotificationRule {..}+    = NotificationRule {tags = Prelude.pure newValue, ..}+instance Property "TargetAddress" NotificationRule where+  type PropertyType "TargetAddress" NotificationRule = Value Prelude.Text+  set newValue NotificationRule {..}+    = NotificationRule {targetAddress = Prelude.pure newValue, ..}+instance Property "Targets" NotificationRule where+  type PropertyType "Targets" NotificationRule = [TargetProperty]+  set newValue NotificationRule {..}+    = NotificationRule {targets = newValue, ..}
+ gen/Stratosphere/CodeStarNotifications/NotificationRule/TargetProperty.hs view
@@ -0,0 +1,42 @@+module Stratosphere.CodeStarNotifications.NotificationRule.TargetProperty (+        TargetProperty(..), mkTargetProperty+    ) where+import qualified Data.Aeson as JSON+import qualified Stratosphere.Prelude as Prelude+import Stratosphere.Property+import Stratosphere.ResourceProperties+import Stratosphere.Value+data TargetProperty+  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codestarnotifications-notificationrule-target.html>+    TargetProperty {haddock_workaround_ :: (),+                    -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codestarnotifications-notificationrule-target.html#cfn-codestarnotifications-notificationrule-target-targetaddress>+                    targetAddress :: (Value Prelude.Text),+                    -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codestarnotifications-notificationrule-target.html#cfn-codestarnotifications-notificationrule-target-targettype>+                    targetType :: (Value Prelude.Text)}+  deriving stock (Prelude.Eq, Prelude.Show)+mkTargetProperty ::+  Value Prelude.Text -> Value Prelude.Text -> TargetProperty+mkTargetProperty targetAddress targetType+  = TargetProperty+      {haddock_workaround_ = (), targetAddress = targetAddress,+       targetType = targetType}+instance ToResourceProperties TargetProperty where+  toResourceProperties TargetProperty {..}+    = ResourceProperties+        {awsType = "AWS::CodeStarNotifications::NotificationRule.Target",+         supportsTags = Prelude.False,+         properties = ["TargetAddress" JSON..= targetAddress,+                       "TargetType" JSON..= targetType]}+instance JSON.ToJSON TargetProperty where+  toJSON TargetProperty {..}+    = JSON.object+        ["TargetAddress" JSON..= targetAddress,+         "TargetType" JSON..= targetType]+instance Property "TargetAddress" TargetProperty where+  type PropertyType "TargetAddress" TargetProperty = Value Prelude.Text+  set newValue TargetProperty {..}+    = TargetProperty {targetAddress = newValue, ..}+instance Property "TargetType" TargetProperty where+  type PropertyType "TargetType" TargetProperty = Value Prelude.Text+  set newValue TargetProperty {..}+    = TargetProperty {targetType = newValue, ..}
+ gen/Stratosphere/CodeStarNotifications/NotificationRule/TargetProperty.hs-boot view
@@ -0,0 +1,9 @@+module Stratosphere.CodeStarNotifications.NotificationRule.TargetProperty where+import qualified Data.Aeson as JSON+import qualified Stratosphere.Prelude as Prelude+import Stratosphere.ResourceProperties+data TargetProperty :: Prelude.Type+instance ToResourceProperties TargetProperty+instance Prelude.Eq TargetProperty+instance Prelude.Show TargetProperty+instance JSON.ToJSON TargetProperty
+ stratosphere-codestarnotifications.cabal view
@@ -0,0 +1,74 @@+cabal-version: 1.12++-- This file has been generated from package.yaml by hpack version 0.38.2.+--+-- see: https://github.com/sol/hpack++name:           stratosphere-codestarnotifications+version:        1.0.0+synopsis:       Stratosphere integration for AWS CodeStarNotifications.+description:    Integration into stratosphere to generate resources and properties for AWS CodeStarNotifications+category:       AWS, Cloud, CodeStarNotifications+stability:      experimental+homepage:       https://github.com/mbj/stratosphere#readme+bug-reports:    https://github.com/mbj/stratosphere/issues+maintainer:     Markus Schirp+license:        MIT+license-file:   LICENSE.md+build-type:     Simple++source-repository head+  type: git+  location: https://github.com/mbj/stratosphere++flag development+  description: Run GHC with development flags+  manual: True+  default: False++library+  exposed-modules:+      Stratosphere.CodeStarNotifications.NotificationRule+      Stratosphere.CodeStarNotifications.NotificationRule.TargetProperty+  other-modules:+      Paths_stratosphere_codestarnotifications+  hs-source-dirs:+      gen+  default-extensions:+      DataKinds+      DeriveGeneric+      DerivingStrategies+      DerivingVia+      DuplicateRecordFields+      FlexibleContexts+      FlexibleInstances+      GADTs+      GeneralizedNewtypeDeriving+      InstanceSigs+      LambdaCase+      MultiParamTypeClasses+      NoFieldSelectors+      NoImplicitPrelude+      NumericUnderscores+      OverloadedLists+      OverloadedRecordDot+      OverloadedStrings+      PolyKinds+      RecordWildCards+      ScopedTypeVariables+      StandaloneDeriving+      Strict+      TemplateHaskell+      TupleSections+      TypeApplications+      TypeFamilies+  ghc-options: -Wall -Wcompat -Widentities -Wimplicit-prelude -Wincomplete-record-updates -Wincomplete-uni-patterns -Wmissing-local-signatures -Wmissing-signatures -Wmonomorphism-restriction -Wredundant-constraints -fhide-source-paths -funbox-strict-fields -optP-Wno-nonportable-include-path -Wno-unused-imports+  build-depends:+      aeson ==2.*+    , base >=4.8 && <4.22+    , stratosphere ==1.0.0+  default-language: Haskell2010+  if flag(development)+    ghc-options: -Werror+  else+    ghc-options: -Wwarn