module Stratosphere.CE.CostCategory (
        module Exports, CostCategory(..), mkCostCategory
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.CE.CostCategory.ResourceTagProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data CostCategory
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ce-costcategory.html>
    CostCategory {CostCategory -> ()
haddock_workaround_ :: (),
                  -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ce-costcategory.html#cfn-ce-costcategory-defaultvalue>
                  CostCategory -> Maybe (Value Text)
defaultValue :: (Prelude.Maybe (Value Prelude.Text)),
                  -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ce-costcategory.html#cfn-ce-costcategory-name>
                  CostCategory -> Value Text
name :: (Value Prelude.Text),
                  -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ce-costcategory.html#cfn-ce-costcategory-ruleversion>
                  CostCategory -> Value Text
ruleVersion :: (Value Prelude.Text),
                  -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ce-costcategory.html#cfn-ce-costcategory-rules>
                  CostCategory -> Value Text
rules :: (Value Prelude.Text),
                  -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ce-costcategory.html#cfn-ce-costcategory-splitchargerules>
                  CostCategory -> Maybe (Value Text)
splitChargeRules :: (Prelude.Maybe (Value Prelude.Text)),
                  -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ce-costcategory.html#cfn-ce-costcategory-tags>
                  CostCategory -> Maybe [ResourceTagProperty]
tags :: (Prelude.Maybe [ResourceTagProperty])}
  deriving stock (CostCategory -> CostCategory -> Bool
(CostCategory -> CostCategory -> Bool)
-> (CostCategory -> CostCategory -> Bool) -> Eq CostCategory
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: CostCategory -> CostCategory -> Bool
== :: CostCategory -> CostCategory -> Bool
$c/= :: CostCategory -> CostCategory -> Bool
/= :: CostCategory -> CostCategory -> Bool
Prelude.Eq, Int -> CostCategory -> ShowS
[CostCategory] -> ShowS
CostCategory -> String
(Int -> CostCategory -> ShowS)
-> (CostCategory -> String)
-> ([CostCategory] -> ShowS)
-> Show CostCategory
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> CostCategory -> ShowS
showsPrec :: Int -> CostCategory -> ShowS
$cshow :: CostCategory -> String
show :: CostCategory -> String
$cshowList :: [CostCategory] -> ShowS
showList :: [CostCategory] -> ShowS
Prelude.Show)
mkCostCategory ::
  Value Prelude.Text
  -> Value Prelude.Text -> Value Prelude.Text -> CostCategory
mkCostCategory :: Value Text -> Value Text -> Value Text -> CostCategory
mkCostCategory Value Text
name Value Text
ruleVersion Value Text
rules
  = CostCategory
      {haddock_workaround_ :: ()
haddock_workaround_ = (), name :: Value Text
name = Value Text
name, ruleVersion :: Value Text
ruleVersion = Value Text
ruleVersion,
       rules :: Value Text
rules = Value Text
rules, defaultValue :: Maybe (Value Text)
defaultValue = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       splitChargeRules :: Maybe (Value Text)
splitChargeRules = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, tags :: Maybe [ResourceTagProperty]
tags = Maybe [ResourceTagProperty]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties CostCategory where
  toResourceProperties :: CostCategory -> ResourceProperties
toResourceProperties CostCategory {Maybe [ResourceTagProperty]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: CostCategory -> ()
defaultValue :: CostCategory -> Maybe (Value Text)
name :: CostCategory -> Value Text
ruleVersion :: CostCategory -> Value Text
rules :: CostCategory -> Value Text
splitChargeRules :: CostCategory -> Maybe (Value Text)
tags :: CostCategory -> Maybe [ResourceTagProperty]
haddock_workaround_ :: ()
defaultValue :: Maybe (Value Text)
name :: Value Text
ruleVersion :: Value Text
rules :: Value Text
splitChargeRules :: Maybe (Value Text)
tags :: Maybe [ResourceTagProperty]
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::CE::CostCategory", supportsTags :: Bool
supportsTags = Bool
Prelude.True,
         properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
                        ([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
                           [Key
"Name" Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Value Text
name, Key
"RuleVersion" Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Value Text
ruleVersion,
                            Key
"Rules" Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Value Text
rules]
                           ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                              [Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"DefaultValue" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
defaultValue,
                               Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"SplitChargeRules" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
splitChargeRules,
                               Key -> [ResourceTagProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Tags" ([ResourceTagProperty] -> (Key, Value))
-> Maybe [ResourceTagProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [ResourceTagProperty]
tags]))}
instance JSON.ToJSON CostCategory where
  toJSON :: CostCategory -> Value
toJSON CostCategory {Maybe [ResourceTagProperty]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: CostCategory -> ()
defaultValue :: CostCategory -> Maybe (Value Text)
name :: CostCategory -> Value Text
ruleVersion :: CostCategory -> Value Text
rules :: CostCategory -> Value Text
splitChargeRules :: CostCategory -> Maybe (Value Text)
tags :: CostCategory -> Maybe [ResourceTagProperty]
haddock_workaround_ :: ()
defaultValue :: Maybe (Value Text)
name :: Value Text
ruleVersion :: Value Text
rules :: Value Text
splitChargeRules :: Maybe (Value Text)
tags :: Maybe [ResourceTagProperty]
..}
    = [(Key, Value)] -> Value
JSON.object
        ([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
           ([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
              [Key
"Name" Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Value Text
name, Key
"RuleVersion" Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Value Text
ruleVersion,
               Key
"Rules" Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Value Text
rules]
              ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                 [Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"DefaultValue" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
defaultValue,
                  Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"SplitChargeRules" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
splitChargeRules,
                  Key -> [ResourceTagProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Tags" ([ResourceTagProperty] -> (Key, Value))
-> Maybe [ResourceTagProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [ResourceTagProperty]
tags])))
instance Property "DefaultValue" CostCategory where
  type PropertyType "DefaultValue" CostCategory = Value Prelude.Text
  set :: PropertyType "DefaultValue" CostCategory
-> CostCategory -> CostCategory
set PropertyType "DefaultValue" CostCategory
newValue CostCategory {Maybe [ResourceTagProperty]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: CostCategory -> ()
defaultValue :: CostCategory -> Maybe (Value Text)
name :: CostCategory -> Value Text
ruleVersion :: CostCategory -> Value Text
rules :: CostCategory -> Value Text
splitChargeRules :: CostCategory -> Maybe (Value Text)
tags :: CostCategory -> Maybe [ResourceTagProperty]
haddock_workaround_ :: ()
defaultValue :: Maybe (Value Text)
name :: Value Text
ruleVersion :: Value Text
rules :: Value Text
splitChargeRules :: Maybe (Value Text)
tags :: Maybe [ResourceTagProperty]
..}
    = CostCategory {defaultValue :: Maybe (Value Text)
defaultValue = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "DefaultValue" CostCategory
Value Text
newValue, Maybe [ResourceTagProperty]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
name :: Value Text
ruleVersion :: Value Text
rules :: Value Text
splitChargeRules :: Maybe (Value Text)
tags :: Maybe [ResourceTagProperty]
haddock_workaround_ :: ()
name :: Value Text
ruleVersion :: Value Text
rules :: Value Text
splitChargeRules :: Maybe (Value Text)
tags :: Maybe [ResourceTagProperty]
..}
instance Property "Name" CostCategory where
  type PropertyType "Name" CostCategory = Value Prelude.Text
  set :: PropertyType "Name" CostCategory -> CostCategory -> CostCategory
set PropertyType "Name" CostCategory
newValue CostCategory {Maybe [ResourceTagProperty]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: CostCategory -> ()
defaultValue :: CostCategory -> Maybe (Value Text)
name :: CostCategory -> Value Text
ruleVersion :: CostCategory -> Value Text
rules :: CostCategory -> Value Text
splitChargeRules :: CostCategory -> Maybe (Value Text)
tags :: CostCategory -> Maybe [ResourceTagProperty]
haddock_workaround_ :: ()
defaultValue :: Maybe (Value Text)
name :: Value Text
ruleVersion :: Value Text
rules :: Value Text
splitChargeRules :: Maybe (Value Text)
tags :: Maybe [ResourceTagProperty]
..} = CostCategory {name :: Value Text
name = PropertyType "Name" CostCategory
Value Text
newValue, Maybe [ResourceTagProperty]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
defaultValue :: Maybe (Value Text)
ruleVersion :: Value Text
rules :: Value Text
splitChargeRules :: Maybe (Value Text)
tags :: Maybe [ResourceTagProperty]
haddock_workaround_ :: ()
defaultValue :: Maybe (Value Text)
ruleVersion :: Value Text
rules :: Value Text
splitChargeRules :: Maybe (Value Text)
tags :: Maybe [ResourceTagProperty]
..}
instance Property "RuleVersion" CostCategory where
  type PropertyType "RuleVersion" CostCategory = Value Prelude.Text
  set :: PropertyType "RuleVersion" CostCategory
-> CostCategory -> CostCategory
set PropertyType "RuleVersion" CostCategory
newValue CostCategory {Maybe [ResourceTagProperty]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: CostCategory -> ()
defaultValue :: CostCategory -> Maybe (Value Text)
name :: CostCategory -> Value Text
ruleVersion :: CostCategory -> Value Text
rules :: CostCategory -> Value Text
splitChargeRules :: CostCategory -> Maybe (Value Text)
tags :: CostCategory -> Maybe [ResourceTagProperty]
haddock_workaround_ :: ()
defaultValue :: Maybe (Value Text)
name :: Value Text
ruleVersion :: Value Text
rules :: Value Text
splitChargeRules :: Maybe (Value Text)
tags :: Maybe [ResourceTagProperty]
..}
    = CostCategory {ruleVersion :: Value Text
ruleVersion = PropertyType "RuleVersion" CostCategory
Value Text
newValue, Maybe [ResourceTagProperty]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
defaultValue :: Maybe (Value Text)
name :: Value Text
rules :: Value Text
splitChargeRules :: Maybe (Value Text)
tags :: Maybe [ResourceTagProperty]
haddock_workaround_ :: ()
defaultValue :: Maybe (Value Text)
name :: Value Text
rules :: Value Text
splitChargeRules :: Maybe (Value Text)
tags :: Maybe [ResourceTagProperty]
..}
instance Property "Rules" CostCategory where
  type PropertyType "Rules" CostCategory = Value Prelude.Text
  set :: PropertyType "Rules" CostCategory -> CostCategory -> CostCategory
set PropertyType "Rules" CostCategory
newValue CostCategory {Maybe [ResourceTagProperty]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: CostCategory -> ()
defaultValue :: CostCategory -> Maybe (Value Text)
name :: CostCategory -> Value Text
ruleVersion :: CostCategory -> Value Text
rules :: CostCategory -> Value Text
splitChargeRules :: CostCategory -> Maybe (Value Text)
tags :: CostCategory -> Maybe [ResourceTagProperty]
haddock_workaround_ :: ()
defaultValue :: Maybe (Value Text)
name :: Value Text
ruleVersion :: Value Text
rules :: Value Text
splitChargeRules :: Maybe (Value Text)
tags :: Maybe [ResourceTagProperty]
..}
    = CostCategory {rules :: Value Text
rules = PropertyType "Rules" CostCategory
Value Text
newValue, Maybe [ResourceTagProperty]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
defaultValue :: Maybe (Value Text)
name :: Value Text
ruleVersion :: Value Text
splitChargeRules :: Maybe (Value Text)
tags :: Maybe [ResourceTagProperty]
haddock_workaround_ :: ()
defaultValue :: Maybe (Value Text)
name :: Value Text
ruleVersion :: Value Text
splitChargeRules :: Maybe (Value Text)
tags :: Maybe [ResourceTagProperty]
..}
instance Property "SplitChargeRules" CostCategory where
  type PropertyType "SplitChargeRules" CostCategory = Value Prelude.Text
  set :: PropertyType "SplitChargeRules" CostCategory
-> CostCategory -> CostCategory
set PropertyType "SplitChargeRules" CostCategory
newValue CostCategory {Maybe [ResourceTagProperty]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: CostCategory -> ()
defaultValue :: CostCategory -> Maybe (Value Text)
name :: CostCategory -> Value Text
ruleVersion :: CostCategory -> Value Text
rules :: CostCategory -> Value Text
splitChargeRules :: CostCategory -> Maybe (Value Text)
tags :: CostCategory -> Maybe [ResourceTagProperty]
haddock_workaround_ :: ()
defaultValue :: Maybe (Value Text)
name :: Value Text
ruleVersion :: Value Text
rules :: Value Text
splitChargeRules :: Maybe (Value Text)
tags :: Maybe [ResourceTagProperty]
..}
    = CostCategory {splitChargeRules :: Maybe (Value Text)
splitChargeRules = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "SplitChargeRules" CostCategory
Value Text
newValue, Maybe [ResourceTagProperty]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
defaultValue :: Maybe (Value Text)
name :: Value Text
ruleVersion :: Value Text
rules :: Value Text
tags :: Maybe [ResourceTagProperty]
haddock_workaround_ :: ()
defaultValue :: Maybe (Value Text)
name :: Value Text
ruleVersion :: Value Text
rules :: Value Text
tags :: Maybe [ResourceTagProperty]
..}
instance Property "Tags" CostCategory where
  type PropertyType "Tags" CostCategory = [ResourceTagProperty]
  set :: PropertyType "Tags" CostCategory -> CostCategory -> CostCategory
set PropertyType "Tags" CostCategory
newValue CostCategory {Maybe [ResourceTagProperty]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: CostCategory -> ()
defaultValue :: CostCategory -> Maybe (Value Text)
name :: CostCategory -> Value Text
ruleVersion :: CostCategory -> Value Text
rules :: CostCategory -> Value Text
splitChargeRules :: CostCategory -> Maybe (Value Text)
tags :: CostCategory -> Maybe [ResourceTagProperty]
haddock_workaround_ :: ()
defaultValue :: Maybe (Value Text)
name :: Value Text
ruleVersion :: Value Text
rules :: Value Text
splitChargeRules :: Maybe (Value Text)
tags :: Maybe [ResourceTagProperty]
..}
    = CostCategory {tags :: Maybe [ResourceTagProperty]
tags = [ResourceTagProperty] -> Maybe [ResourceTagProperty]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [ResourceTagProperty]
PropertyType "Tags" CostCategory
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
defaultValue :: Maybe (Value Text)
name :: Value Text
ruleVersion :: Value Text
rules :: Value Text
splitChargeRules :: Maybe (Value Text)
haddock_workaround_ :: ()
defaultValue :: Maybe (Value Text)
name :: Value Text
ruleVersion :: Value Text
rules :: Value Text
splitChargeRules :: Maybe (Value Text)
..}