module Stratosphere.Budgets.Budget (
module Exports, Budget(..), mkBudget
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.Budgets.Budget.BudgetDataProperty as Exports
import {-# SOURCE #-} Stratosphere.Budgets.Budget.NotificationWithSubscribersProperty as Exports
import {-# SOURCE #-} Stratosphere.Budgets.Budget.ResourceTagProperty as Exports
import Stratosphere.ResourceProperties
data Budget
=
Budget {Budget -> ()
haddock_workaround_ :: (),
Budget -> BudgetDataProperty
budget :: BudgetDataProperty,
Budget -> Maybe [NotificationWithSubscribersProperty]
notificationsWithSubscribers :: (Prelude.Maybe [NotificationWithSubscribersProperty]),
Budget -> Maybe [ResourceTagProperty]
resourceTags :: (Prelude.Maybe [ResourceTagProperty])}
deriving stock (Budget -> Budget -> Bool
(Budget -> Budget -> Bool)
-> (Budget -> Budget -> Bool) -> Eq Budget
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Budget -> Budget -> Bool
== :: Budget -> Budget -> Bool
$c/= :: Budget -> Budget -> Bool
/= :: Budget -> Budget -> Bool
Prelude.Eq, Int -> Budget -> ShowS
[Budget] -> ShowS
Budget -> String
(Int -> Budget -> ShowS)
-> (Budget -> String) -> ([Budget] -> ShowS) -> Show Budget
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Budget -> ShowS
showsPrec :: Int -> Budget -> ShowS
$cshow :: Budget -> String
show :: Budget -> String
$cshowList :: [Budget] -> ShowS
showList :: [Budget] -> ShowS
Prelude.Show)
mkBudget :: BudgetDataProperty -> Budget
mkBudget :: BudgetDataProperty -> Budget
mkBudget BudgetDataProperty
budget
= Budget
{haddock_workaround_ :: ()
haddock_workaround_ = (), budget :: BudgetDataProperty
budget = BudgetDataProperty
budget,
notificationsWithSubscribers :: Maybe [NotificationWithSubscribersProperty]
notificationsWithSubscribers = Maybe [NotificationWithSubscribersProperty]
forall a. Maybe a
Prelude.Nothing,
resourceTags :: Maybe [ResourceTagProperty]
resourceTags = Maybe [ResourceTagProperty]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties Budget where
toResourceProperties :: Budget -> ResourceProperties
toResourceProperties Budget {Maybe [ResourceTagProperty]
Maybe [NotificationWithSubscribersProperty]
()
BudgetDataProperty
haddock_workaround_ :: Budget -> ()
budget :: Budget -> BudgetDataProperty
notificationsWithSubscribers :: Budget -> Maybe [NotificationWithSubscribersProperty]
resourceTags :: Budget -> Maybe [ResourceTagProperty]
haddock_workaround_ :: ()
budget :: BudgetDataProperty
notificationsWithSubscribers :: Maybe [NotificationWithSubscribersProperty]
resourceTags :: Maybe [ResourceTagProperty]
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::Budgets::Budget", supportsTags :: Bool
supportsTags = Bool
Prelude.False,
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
"Budget" Key -> BudgetDataProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= BudgetDataProperty
budget]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> [NotificationWithSubscribersProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"NotificationsWithSubscribers"
([NotificationWithSubscribersProperty] -> (Key, Value))
-> Maybe [NotificationWithSubscribersProperty]
-> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [NotificationWithSubscribersProperty]
notificationsWithSubscribers,
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
"ResourceTags" ([ResourceTagProperty] -> (Key, Value))
-> Maybe [ResourceTagProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [ResourceTagProperty]
resourceTags]))}
instance JSON.ToJSON Budget where
toJSON :: Budget -> Value
toJSON Budget {Maybe [ResourceTagProperty]
Maybe [NotificationWithSubscribersProperty]
()
BudgetDataProperty
haddock_workaround_ :: Budget -> ()
budget :: Budget -> BudgetDataProperty
notificationsWithSubscribers :: Budget -> Maybe [NotificationWithSubscribersProperty]
resourceTags :: Budget -> Maybe [ResourceTagProperty]
haddock_workaround_ :: ()
budget :: BudgetDataProperty
notificationsWithSubscribers :: Maybe [NotificationWithSubscribersProperty]
resourceTags :: 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
"Budget" Key -> BudgetDataProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= BudgetDataProperty
budget]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> [NotificationWithSubscribersProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"NotificationsWithSubscribers"
([NotificationWithSubscribersProperty] -> (Key, Value))
-> Maybe [NotificationWithSubscribersProperty]
-> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [NotificationWithSubscribersProperty]
notificationsWithSubscribers,
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
"ResourceTags" ([ResourceTagProperty] -> (Key, Value))
-> Maybe [ResourceTagProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [ResourceTagProperty]
resourceTags])))
instance Property "Budget" Budget where
type PropertyType "Budget" Budget = BudgetDataProperty
set :: PropertyType "Budget" Budget -> Budget -> Budget
set PropertyType "Budget" Budget
newValue Budget {Maybe [ResourceTagProperty]
Maybe [NotificationWithSubscribersProperty]
()
BudgetDataProperty
haddock_workaround_ :: Budget -> ()
budget :: Budget -> BudgetDataProperty
notificationsWithSubscribers :: Budget -> Maybe [NotificationWithSubscribersProperty]
resourceTags :: Budget -> Maybe [ResourceTagProperty]
haddock_workaround_ :: ()
budget :: BudgetDataProperty
notificationsWithSubscribers :: Maybe [NotificationWithSubscribersProperty]
resourceTags :: Maybe [ResourceTagProperty]
..} = Budget {budget :: BudgetDataProperty
budget = PropertyType "Budget" Budget
BudgetDataProperty
newValue, Maybe [ResourceTagProperty]
Maybe [NotificationWithSubscribersProperty]
()
haddock_workaround_ :: ()
notificationsWithSubscribers :: Maybe [NotificationWithSubscribersProperty]
resourceTags :: Maybe [ResourceTagProperty]
haddock_workaround_ :: ()
notificationsWithSubscribers :: Maybe [NotificationWithSubscribersProperty]
resourceTags :: Maybe [ResourceTagProperty]
..}
instance Property "NotificationsWithSubscribers" Budget where
type PropertyType "NotificationsWithSubscribers" Budget = [NotificationWithSubscribersProperty]
set :: PropertyType "NotificationsWithSubscribers" Budget
-> Budget -> Budget
set PropertyType "NotificationsWithSubscribers" Budget
newValue Budget {Maybe [ResourceTagProperty]
Maybe [NotificationWithSubscribersProperty]
()
BudgetDataProperty
haddock_workaround_ :: Budget -> ()
budget :: Budget -> BudgetDataProperty
notificationsWithSubscribers :: Budget -> Maybe [NotificationWithSubscribersProperty]
resourceTags :: Budget -> Maybe [ResourceTagProperty]
haddock_workaround_ :: ()
budget :: BudgetDataProperty
notificationsWithSubscribers :: Maybe [NotificationWithSubscribersProperty]
resourceTags :: Maybe [ResourceTagProperty]
..}
= Budget {notificationsWithSubscribers :: Maybe [NotificationWithSubscribersProperty]
notificationsWithSubscribers = [NotificationWithSubscribersProperty]
-> Maybe [NotificationWithSubscribersProperty]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [NotificationWithSubscribersProperty]
PropertyType "NotificationsWithSubscribers" Budget
newValue, Maybe [ResourceTagProperty]
()
BudgetDataProperty
haddock_workaround_ :: ()
budget :: BudgetDataProperty
resourceTags :: Maybe [ResourceTagProperty]
haddock_workaround_ :: ()
budget :: BudgetDataProperty
resourceTags :: Maybe [ResourceTagProperty]
..}
instance Property "ResourceTags" Budget where
type PropertyType "ResourceTags" Budget = [ResourceTagProperty]
set :: PropertyType "ResourceTags" Budget -> Budget -> Budget
set PropertyType "ResourceTags" Budget
newValue Budget {Maybe [ResourceTagProperty]
Maybe [NotificationWithSubscribersProperty]
()
BudgetDataProperty
haddock_workaround_ :: Budget -> ()
budget :: Budget -> BudgetDataProperty
notificationsWithSubscribers :: Budget -> Maybe [NotificationWithSubscribersProperty]
resourceTags :: Budget -> Maybe [ResourceTagProperty]
haddock_workaround_ :: ()
budget :: BudgetDataProperty
notificationsWithSubscribers :: Maybe [NotificationWithSubscribersProperty]
resourceTags :: Maybe [ResourceTagProperty]
..}
= Budget {resourceTags :: Maybe [ResourceTagProperty]
resourceTags = [ResourceTagProperty] -> Maybe [ResourceTagProperty]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [ResourceTagProperty]
PropertyType "ResourceTags" Budget
newValue, Maybe [NotificationWithSubscribersProperty]
()
BudgetDataProperty
haddock_workaround_ :: ()
budget :: BudgetDataProperty
notificationsWithSubscribers :: Maybe [NotificationWithSubscribersProperty]
haddock_workaround_ :: ()
budget :: BudgetDataProperty
notificationsWithSubscribers :: Maybe [NotificationWithSubscribersProperty]
..}