packages feed

stratosphere-codecommit (empty) → 1.0.0

raw patch · 9 files changed

+381/−0 lines, 9 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/CodeCommit/Repository.hs view
@@ -0,0 +1,86 @@+module Stratosphere.CodeCommit.Repository (+        module Exports, Repository(..), mkRepository+    ) where+import qualified Data.Aeson as JSON+import qualified Stratosphere.Prelude as Prelude+import Stratosphere.Property+import {-# SOURCE #-} Stratosphere.CodeCommit.Repository.CodeProperty as Exports+import {-# SOURCE #-} Stratosphere.CodeCommit.Repository.RepositoryTriggerProperty as Exports+import Stratosphere.ResourceProperties+import Stratosphere.Tag+import Stratosphere.Value+data Repository+  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codecommit-repository.html>+    Repository {haddock_workaround_ :: (),+                -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codecommit-repository.html#cfn-codecommit-repository-code>+                code :: (Prelude.Maybe CodeProperty),+                -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codecommit-repository.html#cfn-codecommit-repository-kmskeyid>+                kmsKeyId :: (Prelude.Maybe (Value Prelude.Text)),+                -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codecommit-repository.html#cfn-codecommit-repository-repositorydescription>+                repositoryDescription :: (Prelude.Maybe (Value Prelude.Text)),+                -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codecommit-repository.html#cfn-codecommit-repository-repositoryname>+                repositoryName :: (Value Prelude.Text),+                -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codecommit-repository.html#cfn-codecommit-repository-tags>+                tags :: (Prelude.Maybe [Tag]),+                -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codecommit-repository.html#cfn-codecommit-repository-triggers>+                triggers :: (Prelude.Maybe [RepositoryTriggerProperty])}+  deriving stock (Prelude.Eq, Prelude.Show)+mkRepository :: Value Prelude.Text -> Repository+mkRepository repositoryName+  = Repository+      {haddock_workaround_ = (), repositoryName = repositoryName,+       code = Prelude.Nothing, kmsKeyId = Prelude.Nothing,+       repositoryDescription = Prelude.Nothing, tags = Prelude.Nothing,+       triggers = Prelude.Nothing}+instance ToResourceProperties Repository where+  toResourceProperties Repository {..}+    = ResourceProperties+        {awsType = "AWS::CodeCommit::Repository",+         supportsTags = Prelude.True,+         properties = Prelude.fromList+                        ((Prelude.<>)+                           ["RepositoryName" JSON..= repositoryName]+                           (Prelude.catMaybes+                              [(JSON..=) "Code" Prelude.<$> code,+                               (JSON..=) "KmsKeyId" Prelude.<$> kmsKeyId,+                               (JSON..=) "RepositoryDescription"+                                 Prelude.<$> repositoryDescription,+                               (JSON..=) "Tags" Prelude.<$> tags,+                               (JSON..=) "Triggers" Prelude.<$> triggers]))}+instance JSON.ToJSON Repository where+  toJSON Repository {..}+    = JSON.object+        (Prelude.fromList+           ((Prelude.<>)+              ["RepositoryName" JSON..= repositoryName]+              (Prelude.catMaybes+                 [(JSON..=) "Code" Prelude.<$> code,+                  (JSON..=) "KmsKeyId" Prelude.<$> kmsKeyId,+                  (JSON..=) "RepositoryDescription"+                    Prelude.<$> repositoryDescription,+                  (JSON..=) "Tags" Prelude.<$> tags,+                  (JSON..=) "Triggers" Prelude.<$> triggers])))+instance Property "Code" Repository where+  type PropertyType "Code" Repository = CodeProperty+  set newValue Repository {..}+    = Repository {code = Prelude.pure newValue, ..}+instance Property "KmsKeyId" Repository where+  type PropertyType "KmsKeyId" Repository = Value Prelude.Text+  set newValue Repository {..}+    = Repository {kmsKeyId = Prelude.pure newValue, ..}+instance Property "RepositoryDescription" Repository where+  type PropertyType "RepositoryDescription" Repository = Value Prelude.Text+  set newValue Repository {..}+    = Repository {repositoryDescription = Prelude.pure newValue, ..}+instance Property "RepositoryName" Repository where+  type PropertyType "RepositoryName" Repository = Value Prelude.Text+  set newValue Repository {..}+    = Repository {repositoryName = newValue, ..}+instance Property "Tags" Repository where+  type PropertyType "Tags" Repository = [Tag]+  set newValue Repository {..}+    = Repository {tags = Prelude.pure newValue, ..}+instance Property "Triggers" Repository where+  type PropertyType "Triggers" Repository = [RepositoryTriggerProperty]+  set newValue Repository {..}+    = Repository {triggers = Prelude.pure newValue, ..}
+ gen/Stratosphere/CodeCommit/Repository/CodeProperty.hs view
@@ -0,0 +1,46 @@+module Stratosphere.CodeCommit.Repository.CodeProperty (+        module Exports, CodeProperty(..), mkCodeProperty+    ) where+import qualified Data.Aeson as JSON+import qualified Stratosphere.Prelude as Prelude+import Stratosphere.Property+import {-# SOURCE #-} Stratosphere.CodeCommit.Repository.S3Property as Exports+import Stratosphere.ResourceProperties+import Stratosphere.Value+data CodeProperty+  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codecommit-repository-code.html>+    CodeProperty {haddock_workaround_ :: (),+                  -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codecommit-repository-code.html#cfn-codecommit-repository-code-branchname>+                  branchName :: (Prelude.Maybe (Value Prelude.Text)),+                  -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codecommit-repository-code.html#cfn-codecommit-repository-code-s3>+                  s3 :: S3Property}+  deriving stock (Prelude.Eq, Prelude.Show)+mkCodeProperty :: S3Property -> CodeProperty+mkCodeProperty s3+  = CodeProperty+      {haddock_workaround_ = (), s3 = s3, branchName = Prelude.Nothing}+instance ToResourceProperties CodeProperty where+  toResourceProperties CodeProperty {..}+    = ResourceProperties+        {awsType = "AWS::CodeCommit::Repository.Code",+         supportsTags = Prelude.False,+         properties = Prelude.fromList+                        ((Prelude.<>)+                           ["S3" JSON..= s3]+                           (Prelude.catMaybes+                              [(JSON..=) "BranchName" Prelude.<$> branchName]))}+instance JSON.ToJSON CodeProperty where+  toJSON CodeProperty {..}+    = JSON.object+        (Prelude.fromList+           ((Prelude.<>)+              ["S3" JSON..= s3]+              (Prelude.catMaybes+                 [(JSON..=) "BranchName" Prelude.<$> branchName])))+instance Property "BranchName" CodeProperty where+  type PropertyType "BranchName" CodeProperty = Value Prelude.Text+  set newValue CodeProperty {..}+    = CodeProperty {branchName = Prelude.pure newValue, ..}+instance Property "S3" CodeProperty where+  type PropertyType "S3" CodeProperty = S3Property+  set newValue CodeProperty {..} = CodeProperty {s3 = newValue, ..}
+ gen/Stratosphere/CodeCommit/Repository/CodeProperty.hs-boot view
@@ -0,0 +1,9 @@+module Stratosphere.CodeCommit.Repository.CodeProperty where+import qualified Data.Aeson as JSON+import qualified Stratosphere.Prelude as Prelude+import Stratosphere.ResourceProperties+data CodeProperty :: Prelude.Type+instance ToResourceProperties CodeProperty+instance Prelude.Eq CodeProperty+instance Prelude.Show CodeProperty+instance JSON.ToJSON CodeProperty
+ gen/Stratosphere/CodeCommit/Repository/RepositoryTriggerProperty.hs view
@@ -0,0 +1,74 @@+module Stratosphere.CodeCommit.Repository.RepositoryTriggerProperty (+        RepositoryTriggerProperty(..), mkRepositoryTriggerProperty+    ) where+import qualified Data.Aeson as JSON+import qualified Stratosphere.Prelude as Prelude+import Stratosphere.Property+import Stratosphere.ResourceProperties+import Stratosphere.Value+data RepositoryTriggerProperty+  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codecommit-repository-repositorytrigger.html>+    RepositoryTriggerProperty {haddock_workaround_ :: (),+                               -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codecommit-repository-repositorytrigger.html#cfn-codecommit-repository-repositorytrigger-branches>+                               branches :: (Prelude.Maybe (ValueList Prelude.Text)),+                               -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codecommit-repository-repositorytrigger.html#cfn-codecommit-repository-repositorytrigger-customdata>+                               customData :: (Prelude.Maybe (Value Prelude.Text)),+                               -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codecommit-repository-repositorytrigger.html#cfn-codecommit-repository-repositorytrigger-destinationarn>+                               destinationArn :: (Value Prelude.Text),+                               -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codecommit-repository-repositorytrigger.html#cfn-codecommit-repository-repositorytrigger-events>+                               events :: (ValueList Prelude.Text),+                               -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codecommit-repository-repositorytrigger.html#cfn-codecommit-repository-repositorytrigger-name>+                               name :: (Value Prelude.Text)}+  deriving stock (Prelude.Eq, Prelude.Show)+mkRepositoryTriggerProperty ::+  Value Prelude.Text+  -> ValueList Prelude.Text+     -> Value Prelude.Text -> RepositoryTriggerProperty+mkRepositoryTriggerProperty destinationArn events name+  = RepositoryTriggerProperty+      {haddock_workaround_ = (), destinationArn = destinationArn,+       events = events, name = name, branches = Prelude.Nothing,+       customData = Prelude.Nothing}+instance ToResourceProperties RepositoryTriggerProperty where+  toResourceProperties RepositoryTriggerProperty {..}+    = ResourceProperties+        {awsType = "AWS::CodeCommit::Repository.RepositoryTrigger",+         supportsTags = Prelude.False,+         properties = Prelude.fromList+                        ((Prelude.<>)+                           ["DestinationArn" JSON..= destinationArn, "Events" JSON..= events,+                            "Name" JSON..= name]+                           (Prelude.catMaybes+                              [(JSON..=) "Branches" Prelude.<$> branches,+                               (JSON..=) "CustomData" Prelude.<$> customData]))}+instance JSON.ToJSON RepositoryTriggerProperty where+  toJSON RepositoryTriggerProperty {..}+    = JSON.object+        (Prelude.fromList+           ((Prelude.<>)+              ["DestinationArn" JSON..= destinationArn, "Events" JSON..= events,+               "Name" JSON..= name]+              (Prelude.catMaybes+                 [(JSON..=) "Branches" Prelude.<$> branches,+                  (JSON..=) "CustomData" Prelude.<$> customData])))+instance Property "Branches" RepositoryTriggerProperty where+  type PropertyType "Branches" RepositoryTriggerProperty = ValueList Prelude.Text+  set newValue RepositoryTriggerProperty {..}+    = RepositoryTriggerProperty {branches = Prelude.pure newValue, ..}+instance Property "CustomData" RepositoryTriggerProperty where+  type PropertyType "CustomData" RepositoryTriggerProperty = Value Prelude.Text+  set newValue RepositoryTriggerProperty {..}+    = RepositoryTriggerProperty+        {customData = Prelude.pure newValue, ..}+instance Property "DestinationArn" RepositoryTriggerProperty where+  type PropertyType "DestinationArn" RepositoryTriggerProperty = Value Prelude.Text+  set newValue RepositoryTriggerProperty {..}+    = RepositoryTriggerProperty {destinationArn = newValue, ..}+instance Property "Events" RepositoryTriggerProperty where+  type PropertyType "Events" RepositoryTriggerProperty = ValueList Prelude.Text+  set newValue RepositoryTriggerProperty {..}+    = RepositoryTriggerProperty {events = newValue, ..}+instance Property "Name" RepositoryTriggerProperty where+  type PropertyType "Name" RepositoryTriggerProperty = Value Prelude.Text+  set newValue RepositoryTriggerProperty {..}+    = RepositoryTriggerProperty {name = newValue, ..}
+ gen/Stratosphere/CodeCommit/Repository/RepositoryTriggerProperty.hs-boot view
@@ -0,0 +1,9 @@+module Stratosphere.CodeCommit.Repository.RepositoryTriggerProperty where+import qualified Data.Aeson as JSON+import qualified Stratosphere.Prelude as Prelude+import Stratosphere.ResourceProperties+data RepositoryTriggerProperty :: Prelude.Type+instance ToResourceProperties RepositoryTriggerProperty+instance Prelude.Eq RepositoryTriggerProperty+instance Prelude.Show RepositoryTriggerProperty+instance JSON.ToJSON RepositoryTriggerProperty
+ gen/Stratosphere/CodeCommit/Repository/S3Property.hs view
@@ -0,0 +1,52 @@+module Stratosphere.CodeCommit.Repository.S3Property (+        S3Property(..), mkS3Property+    ) where+import qualified Data.Aeson as JSON+import qualified Stratosphere.Prelude as Prelude+import Stratosphere.Property+import Stratosphere.ResourceProperties+import Stratosphere.Value+data S3Property+  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codecommit-repository-s3.html>+    S3Property {haddock_workaround_ :: (),+                -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codecommit-repository-s3.html#cfn-codecommit-repository-s3-bucket>+                bucket :: (Value Prelude.Text),+                -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codecommit-repository-s3.html#cfn-codecommit-repository-s3-key>+                key :: (Value Prelude.Text),+                -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codecommit-repository-s3.html#cfn-codecommit-repository-s3-objectversion>+                objectVersion :: (Prelude.Maybe (Value Prelude.Text))}+  deriving stock (Prelude.Eq, Prelude.Show)+mkS3Property ::+  Value Prelude.Text -> Value Prelude.Text -> S3Property+mkS3Property bucket key+  = S3Property+      {haddock_workaround_ = (), bucket = bucket, key = key,+       objectVersion = Prelude.Nothing}+instance ToResourceProperties S3Property where+  toResourceProperties S3Property {..}+    = ResourceProperties+        {awsType = "AWS::CodeCommit::Repository.S3",+         supportsTags = Prelude.False,+         properties = Prelude.fromList+                        ((Prelude.<>)+                           ["Bucket" JSON..= bucket, "Key" JSON..= key]+                           (Prelude.catMaybes+                              [(JSON..=) "ObjectVersion" Prelude.<$> objectVersion]))}+instance JSON.ToJSON S3Property where+  toJSON S3Property {..}+    = JSON.object+        (Prelude.fromList+           ((Prelude.<>)+              ["Bucket" JSON..= bucket, "Key" JSON..= key]+              (Prelude.catMaybes+                 [(JSON..=) "ObjectVersion" Prelude.<$> objectVersion])))+instance Property "Bucket" S3Property where+  type PropertyType "Bucket" S3Property = Value Prelude.Text+  set newValue S3Property {..} = S3Property {bucket = newValue, ..}+instance Property "Key" S3Property where+  type PropertyType "Key" S3Property = Value Prelude.Text+  set newValue S3Property {..} = S3Property {key = newValue, ..}+instance Property "ObjectVersion" S3Property where+  type PropertyType "ObjectVersion" S3Property = Value Prelude.Text+  set newValue S3Property {..}+    = S3Property {objectVersion = Prelude.pure newValue, ..}
+ gen/Stratosphere/CodeCommit/Repository/S3Property.hs-boot view
@@ -0,0 +1,9 @@+module Stratosphere.CodeCommit.Repository.S3Property where+import qualified Data.Aeson as JSON+import qualified Stratosphere.Prelude as Prelude+import Stratosphere.ResourceProperties+data S3Property :: Prelude.Type+instance ToResourceProperties S3Property+instance Prelude.Eq S3Property+instance Prelude.Show S3Property+instance JSON.ToJSON S3Property
+ stratosphere-codecommit.cabal view
@@ -0,0 +1,76 @@+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-codecommit+version:        1.0.0+synopsis:       Stratosphere integration for AWS CodeCommit.+description:    Integration into stratosphere to generate resources and properties for AWS CodeCommit+category:       AWS, Cloud, CodeCommit+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.CodeCommit.Repository+      Stratosphere.CodeCommit.Repository.CodeProperty+      Stratosphere.CodeCommit.Repository.RepositoryTriggerProperty+      Stratosphere.CodeCommit.Repository.S3Property+  other-modules:+      Paths_stratosphere_codecommit+  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