packages feed

stratosphere-billing (empty) → 1.0.0

raw patch · 9 files changed

+333/−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/Billing/BillingView.hs view
@@ -0,0 +1,72 @@+module Stratosphere.Billing.BillingView (+        module Exports, BillingView(..), mkBillingView+    ) where+import qualified Data.Aeson as JSON+import qualified Stratosphere.Prelude as Prelude+import Stratosphere.Property+import {-# SOURCE #-} Stratosphere.Billing.BillingView.DataFilterExpressionProperty as Exports+import Stratosphere.ResourceProperties+import Stratosphere.Tag+import Stratosphere.Value+data BillingView+  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-billing-billingview.html>+    BillingView {haddock_workaround_ :: (),+                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-billing-billingview.html#cfn-billing-billingview-datafilterexpression>+                 dataFilterExpression :: (Prelude.Maybe DataFilterExpressionProperty),+                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-billing-billingview.html#cfn-billing-billingview-description>+                 description :: (Prelude.Maybe (Value Prelude.Text)),+                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-billing-billingview.html#cfn-billing-billingview-name>+                 name :: (Value Prelude.Text),+                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-billing-billingview.html#cfn-billing-billingview-sourceviews>+                 sourceViews :: (ValueList Prelude.Text),+                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-billing-billingview.html#cfn-billing-billingview-tags>+                 tags :: (Prelude.Maybe [Tag])}+  deriving stock (Prelude.Eq, Prelude.Show)+mkBillingView ::+  Value Prelude.Text -> ValueList Prelude.Text -> BillingView+mkBillingView name sourceViews+  = BillingView+      {haddock_workaround_ = (), name = name, sourceViews = sourceViews,+       dataFilterExpression = Prelude.Nothing,+       description = Prelude.Nothing, tags = Prelude.Nothing}+instance ToResourceProperties BillingView where+  toResourceProperties BillingView {..}+    = ResourceProperties+        {awsType = "AWS::Billing::BillingView",+         supportsTags = Prelude.True,+         properties = Prelude.fromList+                        ((Prelude.<>)+                           ["Name" JSON..= name, "SourceViews" JSON..= sourceViews]+                           (Prelude.catMaybes+                              [(JSON..=) "DataFilterExpression" Prelude.<$> dataFilterExpression,+                               (JSON..=) "Description" Prelude.<$> description,+                               (JSON..=) "Tags" Prelude.<$> tags]))}+instance JSON.ToJSON BillingView where+  toJSON BillingView {..}+    = JSON.object+        (Prelude.fromList+           ((Prelude.<>)+              ["Name" JSON..= name, "SourceViews" JSON..= sourceViews]+              (Prelude.catMaybes+                 [(JSON..=) "DataFilterExpression" Prelude.<$> dataFilterExpression,+                  (JSON..=) "Description" Prelude.<$> description,+                  (JSON..=) "Tags" Prelude.<$> tags])))+instance Property "DataFilterExpression" BillingView where+  type PropertyType "DataFilterExpression" BillingView = DataFilterExpressionProperty+  set newValue BillingView {..}+    = BillingView {dataFilterExpression = Prelude.pure newValue, ..}+instance Property "Description" BillingView where+  type PropertyType "Description" BillingView = Value Prelude.Text+  set newValue BillingView {..}+    = BillingView {description = Prelude.pure newValue, ..}+instance Property "Name" BillingView where+  type PropertyType "Name" BillingView = Value Prelude.Text+  set newValue BillingView {..} = BillingView {name = newValue, ..}+instance Property "SourceViews" BillingView where+  type PropertyType "SourceViews" BillingView = ValueList Prelude.Text+  set newValue BillingView {..}+    = BillingView {sourceViews = newValue, ..}+instance Property "Tags" BillingView where+  type PropertyType "Tags" BillingView = [Tag]+  set newValue BillingView {..}+    = BillingView {tags = Prelude.pure newValue, ..}
+ gen/Stratosphere/Billing/BillingView/DataFilterExpressionProperty.hs view
@@ -0,0 +1,48 @@+module Stratosphere.Billing.BillingView.DataFilterExpressionProperty (+        module Exports, DataFilterExpressionProperty(..),+        mkDataFilterExpressionProperty+    ) where+import qualified Data.Aeson as JSON+import qualified Stratosphere.Prelude as Prelude+import Stratosphere.Property+import {-# SOURCE #-} Stratosphere.Billing.BillingView.DimensionsProperty as Exports+import {-# SOURCE #-} Stratosphere.Billing.BillingView.TagsProperty as Exports+import Stratosphere.ResourceProperties+data DataFilterExpressionProperty+  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-billing-billingview-datafilterexpression.html>+    DataFilterExpressionProperty {haddock_workaround_ :: (),+                                  -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-billing-billingview-datafilterexpression.html#cfn-billing-billingview-datafilterexpression-dimensions>+                                  dimensions :: (Prelude.Maybe DimensionsProperty),+                                  -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-billing-billingview-datafilterexpression.html#cfn-billing-billingview-datafilterexpression-tags>+                                  tags :: (Prelude.Maybe TagsProperty)}+  deriving stock (Prelude.Eq, Prelude.Show)+mkDataFilterExpressionProperty :: DataFilterExpressionProperty+mkDataFilterExpressionProperty+  = DataFilterExpressionProperty+      {haddock_workaround_ = (), dimensions = Prelude.Nothing,+       tags = Prelude.Nothing}+instance ToResourceProperties DataFilterExpressionProperty where+  toResourceProperties DataFilterExpressionProperty {..}+    = ResourceProperties+        {awsType = "AWS::Billing::BillingView.DataFilterExpression",+         supportsTags = Prelude.True,+         properties = Prelude.fromList+                        (Prelude.catMaybes+                           [(JSON..=) "Dimensions" Prelude.<$> dimensions,+                            (JSON..=) "Tags" Prelude.<$> tags])}+instance JSON.ToJSON DataFilterExpressionProperty where+  toJSON DataFilterExpressionProperty {..}+    = JSON.object+        (Prelude.fromList+           (Prelude.catMaybes+              [(JSON..=) "Dimensions" Prelude.<$> dimensions,+               (JSON..=) "Tags" Prelude.<$> tags]))+instance Property "Dimensions" DataFilterExpressionProperty where+  type PropertyType "Dimensions" DataFilterExpressionProperty = DimensionsProperty+  set newValue DataFilterExpressionProperty {..}+    = DataFilterExpressionProperty+        {dimensions = Prelude.pure newValue, ..}+instance Property "Tags" DataFilterExpressionProperty where+  type PropertyType "Tags" DataFilterExpressionProperty = TagsProperty+  set newValue DataFilterExpressionProperty {..}+    = DataFilterExpressionProperty {tags = Prelude.pure newValue, ..}
+ gen/Stratosphere/Billing/BillingView/DataFilterExpressionProperty.hs-boot view
@@ -0,0 +1,9 @@+module Stratosphere.Billing.BillingView.DataFilterExpressionProperty where+import qualified Data.Aeson as JSON+import qualified Stratosphere.Prelude as Prelude+import Stratosphere.ResourceProperties+data DataFilterExpressionProperty :: Prelude.Type+instance ToResourceProperties DataFilterExpressionProperty+instance Prelude.Eq DataFilterExpressionProperty+instance Prelude.Show DataFilterExpressionProperty+instance JSON.ToJSON DataFilterExpressionProperty
+ gen/Stratosphere/Billing/BillingView/DimensionsProperty.hs view
@@ -0,0 +1,45 @@+module Stratosphere.Billing.BillingView.DimensionsProperty (+        DimensionsProperty(..), mkDimensionsProperty+    ) where+import qualified Data.Aeson as JSON+import qualified Stratosphere.Prelude as Prelude+import Stratosphere.Property+import Stratosphere.ResourceProperties+import Stratosphere.Value+data DimensionsProperty+  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-billing-billingview-dimensions.html>+    DimensionsProperty {haddock_workaround_ :: (),+                        -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-billing-billingview-dimensions.html#cfn-billing-billingview-dimensions-key>+                        key :: (Prelude.Maybe (Value Prelude.Text)),+                        -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-billing-billingview-dimensions.html#cfn-billing-billingview-dimensions-values>+                        values :: (Prelude.Maybe (ValueList Prelude.Text))}+  deriving stock (Prelude.Eq, Prelude.Show)+mkDimensionsProperty :: DimensionsProperty+mkDimensionsProperty+  = DimensionsProperty+      {haddock_workaround_ = (), key = Prelude.Nothing,+       values = Prelude.Nothing}+instance ToResourceProperties DimensionsProperty where+  toResourceProperties DimensionsProperty {..}+    = ResourceProperties+        {awsType = "AWS::Billing::BillingView.Dimensions",+         supportsTags = Prelude.False,+         properties = Prelude.fromList+                        (Prelude.catMaybes+                           [(JSON..=) "Key" Prelude.<$> key,+                            (JSON..=) "Values" Prelude.<$> values])}+instance JSON.ToJSON DimensionsProperty where+  toJSON DimensionsProperty {..}+    = JSON.object+        (Prelude.fromList+           (Prelude.catMaybes+              [(JSON..=) "Key" Prelude.<$> key,+               (JSON..=) "Values" Prelude.<$> values]))+instance Property "Key" DimensionsProperty where+  type PropertyType "Key" DimensionsProperty = Value Prelude.Text+  set newValue DimensionsProperty {..}+    = DimensionsProperty {key = Prelude.pure newValue, ..}+instance Property "Values" DimensionsProperty where+  type PropertyType "Values" DimensionsProperty = ValueList Prelude.Text+  set newValue DimensionsProperty {..}+    = DimensionsProperty {values = Prelude.pure newValue, ..}
+ gen/Stratosphere/Billing/BillingView/DimensionsProperty.hs-boot view
@@ -0,0 +1,9 @@+module Stratosphere.Billing.BillingView.DimensionsProperty where+import qualified Data.Aeson as JSON+import qualified Stratosphere.Prelude as Prelude+import Stratosphere.ResourceProperties+data DimensionsProperty :: Prelude.Type+instance ToResourceProperties DimensionsProperty+instance Prelude.Eq DimensionsProperty+instance Prelude.Show DimensionsProperty+instance JSON.ToJSON DimensionsProperty
+ gen/Stratosphere/Billing/BillingView/TagsProperty.hs view
@@ -0,0 +1,45 @@+module Stratosphere.Billing.BillingView.TagsProperty (+        TagsProperty(..), mkTagsProperty+    ) where+import qualified Data.Aeson as JSON+import qualified Stratosphere.Prelude as Prelude+import Stratosphere.Property+import Stratosphere.ResourceProperties+import Stratosphere.Value+data TagsProperty+  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-billing-billingview-tags.html>+    TagsProperty {haddock_workaround_ :: (),+                  -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-billing-billingview-tags.html#cfn-billing-billingview-tags-key>+                  key :: (Prelude.Maybe (Value Prelude.Text)),+                  -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-billing-billingview-tags.html#cfn-billing-billingview-tags-values>+                  values :: (Prelude.Maybe (ValueList Prelude.Text))}+  deriving stock (Prelude.Eq, Prelude.Show)+mkTagsProperty :: TagsProperty+mkTagsProperty+  = TagsProperty+      {haddock_workaround_ = (), key = Prelude.Nothing,+       values = Prelude.Nothing}+instance ToResourceProperties TagsProperty where+  toResourceProperties TagsProperty {..}+    = ResourceProperties+        {awsType = "AWS::Billing::BillingView.Tags",+         supportsTags = Prelude.False,+         properties = Prelude.fromList+                        (Prelude.catMaybes+                           [(JSON..=) "Key" Prelude.<$> key,+                            (JSON..=) "Values" Prelude.<$> values])}+instance JSON.ToJSON TagsProperty where+  toJSON TagsProperty {..}+    = JSON.object+        (Prelude.fromList+           (Prelude.catMaybes+              [(JSON..=) "Key" Prelude.<$> key,+               (JSON..=) "Values" Prelude.<$> values]))+instance Property "Key" TagsProperty where+  type PropertyType "Key" TagsProperty = Value Prelude.Text+  set newValue TagsProperty {..}+    = TagsProperty {key = Prelude.pure newValue, ..}+instance Property "Values" TagsProperty where+  type PropertyType "Values" TagsProperty = ValueList Prelude.Text+  set newValue TagsProperty {..}+    = TagsProperty {values = Prelude.pure newValue, ..}
+ gen/Stratosphere/Billing/BillingView/TagsProperty.hs-boot view
@@ -0,0 +1,9 @@+module Stratosphere.Billing.BillingView.TagsProperty where+import qualified Data.Aeson as JSON+import qualified Stratosphere.Prelude as Prelude+import Stratosphere.ResourceProperties+data TagsProperty :: Prelude.Type+instance ToResourceProperties TagsProperty+instance Prelude.Eq TagsProperty+instance Prelude.Show TagsProperty+instance JSON.ToJSON TagsProperty
+ stratosphere-billing.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-billing+version:        1.0.0+synopsis:       Stratosphere integration for AWS Billing.+description:    Integration into stratosphere to generate resources and properties for AWS Billing+category:       AWS, Cloud, Billing+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.Billing.BillingView+      Stratosphere.Billing.BillingView.DataFilterExpressionProperty+      Stratosphere.Billing.BillingView.DimensionsProperty+      Stratosphere.Billing.BillingView.TagsProperty+  other-modules:+      Paths_stratosphere_billing+  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