module Stratosphere.BillingConductor.BillingGroup (
        module Exports, BillingGroup(..), mkBillingGroup
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.BillingConductor.BillingGroup.AccountGroupingProperty as Exports
import {-# SOURCE #-} Stratosphere.BillingConductor.BillingGroup.ComputationPreferenceProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Tag
import Stratosphere.Value
data BillingGroup
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-billingconductor-billinggroup.html>
    BillingGroup {BillingGroup -> ()
haddock_workaround_ :: (),
                  -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-billingconductor-billinggroup.html#cfn-billingconductor-billinggroup-accountgrouping>
                  BillingGroup -> AccountGroupingProperty
accountGrouping :: AccountGroupingProperty,
                  -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-billingconductor-billinggroup.html#cfn-billingconductor-billinggroup-computationpreference>
                  BillingGroup -> ComputationPreferenceProperty
computationPreference :: ComputationPreferenceProperty,
                  -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-billingconductor-billinggroup.html#cfn-billingconductor-billinggroup-description>
                  BillingGroup -> Maybe (Value Text)
description :: (Prelude.Maybe (Value Prelude.Text)),
                  -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-billingconductor-billinggroup.html#cfn-billingconductor-billinggroup-name>
                  BillingGroup -> Value Text
name :: (Value Prelude.Text),
                  -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-billingconductor-billinggroup.html#cfn-billingconductor-billinggroup-primaryaccountid>
                  BillingGroup -> Value Text
primaryAccountId :: (Value Prelude.Text),
                  -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-billingconductor-billinggroup.html#cfn-billingconductor-billinggroup-tags>
                  BillingGroup -> Maybe [Tag]
tags :: (Prelude.Maybe [Tag])}
  deriving stock (BillingGroup -> BillingGroup -> Bool
(BillingGroup -> BillingGroup -> Bool)
-> (BillingGroup -> BillingGroup -> Bool) -> Eq BillingGroup
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: BillingGroup -> BillingGroup -> Bool
== :: BillingGroup -> BillingGroup -> Bool
$c/= :: BillingGroup -> BillingGroup -> Bool
/= :: BillingGroup -> BillingGroup -> Bool
Prelude.Eq, Int -> BillingGroup -> ShowS
[BillingGroup] -> ShowS
BillingGroup -> String
(Int -> BillingGroup -> ShowS)
-> (BillingGroup -> String)
-> ([BillingGroup] -> ShowS)
-> Show BillingGroup
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> BillingGroup -> ShowS
showsPrec :: Int -> BillingGroup -> ShowS
$cshow :: BillingGroup -> String
show :: BillingGroup -> String
$cshowList :: [BillingGroup] -> ShowS
showList :: [BillingGroup] -> ShowS
Prelude.Show)
mkBillingGroup ::
  AccountGroupingProperty
  -> ComputationPreferenceProperty
     -> Value Prelude.Text -> Value Prelude.Text -> BillingGroup
mkBillingGroup :: AccountGroupingProperty
-> ComputationPreferenceProperty
-> Value Text
-> Value Text
-> BillingGroup
mkBillingGroup
  AccountGroupingProperty
accountGrouping
  ComputationPreferenceProperty
computationPreference
  Value Text
name
  Value Text
primaryAccountId
  = BillingGroup
      {haddock_workaround_ :: ()
haddock_workaround_ = (), accountGrouping :: AccountGroupingProperty
accountGrouping = AccountGroupingProperty
accountGrouping,
       computationPreference :: ComputationPreferenceProperty
computationPreference = ComputationPreferenceProperty
computationPreference, name :: Value Text
name = Value Text
name,
       primaryAccountId :: Value Text
primaryAccountId = Value Text
primaryAccountId, description :: Maybe (Value Text)
description = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       tags :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties BillingGroup where
  toResourceProperties :: BillingGroup -> ResourceProperties
toResourceProperties BillingGroup {Maybe [Tag]
Maybe (Value Text)
()
Value Text
AccountGroupingProperty
ComputationPreferenceProperty
haddock_workaround_ :: BillingGroup -> ()
accountGrouping :: BillingGroup -> AccountGroupingProperty
computationPreference :: BillingGroup -> ComputationPreferenceProperty
description :: BillingGroup -> Maybe (Value Text)
name :: BillingGroup -> Value Text
primaryAccountId :: BillingGroup -> Value Text
tags :: BillingGroup -> Maybe [Tag]
haddock_workaround_ :: ()
accountGrouping :: AccountGroupingProperty
computationPreference :: ComputationPreferenceProperty
description :: Maybe (Value Text)
name :: Value Text
primaryAccountId :: Value Text
tags :: Maybe [Tag]
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::BillingConductor::BillingGroup",
         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
"AccountGrouping" Key -> AccountGroupingProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= AccountGroupingProperty
accountGrouping,
                            Key
"ComputationPreference" Key -> ComputationPreferenceProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= ComputationPreferenceProperty
computationPreference,
                            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
"PrimaryAccountId" 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
primaryAccountId]
                           ([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
"Description" (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)
description,
                               Key -> [Tag] -> (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" ([Tag] -> (Key, Value)) -> Maybe [Tag] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags]))}
instance JSON.ToJSON BillingGroup where
  toJSON :: BillingGroup -> Value
toJSON BillingGroup {Maybe [Tag]
Maybe (Value Text)
()
Value Text
AccountGroupingProperty
ComputationPreferenceProperty
haddock_workaround_ :: BillingGroup -> ()
accountGrouping :: BillingGroup -> AccountGroupingProperty
computationPreference :: BillingGroup -> ComputationPreferenceProperty
description :: BillingGroup -> Maybe (Value Text)
name :: BillingGroup -> Value Text
primaryAccountId :: BillingGroup -> Value Text
tags :: BillingGroup -> Maybe [Tag]
haddock_workaround_ :: ()
accountGrouping :: AccountGroupingProperty
computationPreference :: ComputationPreferenceProperty
description :: Maybe (Value Text)
name :: Value Text
primaryAccountId :: Value Text
tags :: Maybe [Tag]
..}
    = [(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
"AccountGrouping" Key -> AccountGroupingProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= AccountGroupingProperty
accountGrouping,
               Key
"ComputationPreference" Key -> ComputationPreferenceProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= ComputationPreferenceProperty
computationPreference,
               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
"PrimaryAccountId" 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
primaryAccountId]
              ([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
"Description" (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)
description,
                  Key -> [Tag] -> (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" ([Tag] -> (Key, Value)) -> Maybe [Tag] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags])))
instance Property "AccountGrouping" BillingGroup where
  type PropertyType "AccountGrouping" BillingGroup = AccountGroupingProperty
  set :: PropertyType "AccountGrouping" BillingGroup
-> BillingGroup -> BillingGroup
set PropertyType "AccountGrouping" BillingGroup
newValue BillingGroup {Maybe [Tag]
Maybe (Value Text)
()
Value Text
AccountGroupingProperty
ComputationPreferenceProperty
haddock_workaround_ :: BillingGroup -> ()
accountGrouping :: BillingGroup -> AccountGroupingProperty
computationPreference :: BillingGroup -> ComputationPreferenceProperty
description :: BillingGroup -> Maybe (Value Text)
name :: BillingGroup -> Value Text
primaryAccountId :: BillingGroup -> Value Text
tags :: BillingGroup -> Maybe [Tag]
haddock_workaround_ :: ()
accountGrouping :: AccountGroupingProperty
computationPreference :: ComputationPreferenceProperty
description :: Maybe (Value Text)
name :: Value Text
primaryAccountId :: Value Text
tags :: Maybe [Tag]
..}
    = BillingGroup {accountGrouping :: AccountGroupingProperty
accountGrouping = PropertyType "AccountGrouping" BillingGroup
AccountGroupingProperty
newValue, Maybe [Tag]
Maybe (Value Text)
()
Value Text
ComputationPreferenceProperty
haddock_workaround_ :: ()
computationPreference :: ComputationPreferenceProperty
description :: Maybe (Value Text)
name :: Value Text
primaryAccountId :: Value Text
tags :: Maybe [Tag]
haddock_workaround_ :: ()
computationPreference :: ComputationPreferenceProperty
description :: Maybe (Value Text)
name :: Value Text
primaryAccountId :: Value Text
tags :: Maybe [Tag]
..}
instance Property "ComputationPreference" BillingGroup where
  type PropertyType "ComputationPreference" BillingGroup = ComputationPreferenceProperty
  set :: PropertyType "ComputationPreference" BillingGroup
-> BillingGroup -> BillingGroup
set PropertyType "ComputationPreference" BillingGroup
newValue BillingGroup {Maybe [Tag]
Maybe (Value Text)
()
Value Text
AccountGroupingProperty
ComputationPreferenceProperty
haddock_workaround_ :: BillingGroup -> ()
accountGrouping :: BillingGroup -> AccountGroupingProperty
computationPreference :: BillingGroup -> ComputationPreferenceProperty
description :: BillingGroup -> Maybe (Value Text)
name :: BillingGroup -> Value Text
primaryAccountId :: BillingGroup -> Value Text
tags :: BillingGroup -> Maybe [Tag]
haddock_workaround_ :: ()
accountGrouping :: AccountGroupingProperty
computationPreference :: ComputationPreferenceProperty
description :: Maybe (Value Text)
name :: Value Text
primaryAccountId :: Value Text
tags :: Maybe [Tag]
..}
    = BillingGroup {computationPreference :: ComputationPreferenceProperty
computationPreference = PropertyType "ComputationPreference" BillingGroup
ComputationPreferenceProperty
newValue, Maybe [Tag]
Maybe (Value Text)
()
Value Text
AccountGroupingProperty
haddock_workaround_ :: ()
accountGrouping :: AccountGroupingProperty
description :: Maybe (Value Text)
name :: Value Text
primaryAccountId :: Value Text
tags :: Maybe [Tag]
haddock_workaround_ :: ()
accountGrouping :: AccountGroupingProperty
description :: Maybe (Value Text)
name :: Value Text
primaryAccountId :: Value Text
tags :: Maybe [Tag]
..}
instance Property "Description" BillingGroup where
  type PropertyType "Description" BillingGroup = Value Prelude.Text
  set :: PropertyType "Description" BillingGroup
-> BillingGroup -> BillingGroup
set PropertyType "Description" BillingGroup
newValue BillingGroup {Maybe [Tag]
Maybe (Value Text)
()
Value Text
AccountGroupingProperty
ComputationPreferenceProperty
haddock_workaround_ :: BillingGroup -> ()
accountGrouping :: BillingGroup -> AccountGroupingProperty
computationPreference :: BillingGroup -> ComputationPreferenceProperty
description :: BillingGroup -> Maybe (Value Text)
name :: BillingGroup -> Value Text
primaryAccountId :: BillingGroup -> Value Text
tags :: BillingGroup -> Maybe [Tag]
haddock_workaround_ :: ()
accountGrouping :: AccountGroupingProperty
computationPreference :: ComputationPreferenceProperty
description :: Maybe (Value Text)
name :: Value Text
primaryAccountId :: Value Text
tags :: Maybe [Tag]
..}
    = BillingGroup {description :: Maybe (Value Text)
description = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Description" BillingGroup
Value Text
newValue, Maybe [Tag]
()
Value Text
AccountGroupingProperty
ComputationPreferenceProperty
haddock_workaround_ :: ()
accountGrouping :: AccountGroupingProperty
computationPreference :: ComputationPreferenceProperty
name :: Value Text
primaryAccountId :: Value Text
tags :: Maybe [Tag]
haddock_workaround_ :: ()
accountGrouping :: AccountGroupingProperty
computationPreference :: ComputationPreferenceProperty
name :: Value Text
primaryAccountId :: Value Text
tags :: Maybe [Tag]
..}
instance Property "Name" BillingGroup where
  type PropertyType "Name" BillingGroup = Value Prelude.Text
  set :: PropertyType "Name" BillingGroup -> BillingGroup -> BillingGroup
set PropertyType "Name" BillingGroup
newValue BillingGroup {Maybe [Tag]
Maybe (Value Text)
()
Value Text
AccountGroupingProperty
ComputationPreferenceProperty
haddock_workaround_ :: BillingGroup -> ()
accountGrouping :: BillingGroup -> AccountGroupingProperty
computationPreference :: BillingGroup -> ComputationPreferenceProperty
description :: BillingGroup -> Maybe (Value Text)
name :: BillingGroup -> Value Text
primaryAccountId :: BillingGroup -> Value Text
tags :: BillingGroup -> Maybe [Tag]
haddock_workaround_ :: ()
accountGrouping :: AccountGroupingProperty
computationPreference :: ComputationPreferenceProperty
description :: Maybe (Value Text)
name :: Value Text
primaryAccountId :: Value Text
tags :: Maybe [Tag]
..} = BillingGroup {name :: Value Text
name = PropertyType "Name" BillingGroup
Value Text
newValue, Maybe [Tag]
Maybe (Value Text)
()
Value Text
AccountGroupingProperty
ComputationPreferenceProperty
haddock_workaround_ :: ()
accountGrouping :: AccountGroupingProperty
computationPreference :: ComputationPreferenceProperty
description :: Maybe (Value Text)
primaryAccountId :: Value Text
tags :: Maybe [Tag]
haddock_workaround_ :: ()
accountGrouping :: AccountGroupingProperty
computationPreference :: ComputationPreferenceProperty
description :: Maybe (Value Text)
primaryAccountId :: Value Text
tags :: Maybe [Tag]
..}
instance Property "PrimaryAccountId" BillingGroup where
  type PropertyType "PrimaryAccountId" BillingGroup = Value Prelude.Text
  set :: PropertyType "PrimaryAccountId" BillingGroup
-> BillingGroup -> BillingGroup
set PropertyType "PrimaryAccountId" BillingGroup
newValue BillingGroup {Maybe [Tag]
Maybe (Value Text)
()
Value Text
AccountGroupingProperty
ComputationPreferenceProperty
haddock_workaround_ :: BillingGroup -> ()
accountGrouping :: BillingGroup -> AccountGroupingProperty
computationPreference :: BillingGroup -> ComputationPreferenceProperty
description :: BillingGroup -> Maybe (Value Text)
name :: BillingGroup -> Value Text
primaryAccountId :: BillingGroup -> Value Text
tags :: BillingGroup -> Maybe [Tag]
haddock_workaround_ :: ()
accountGrouping :: AccountGroupingProperty
computationPreference :: ComputationPreferenceProperty
description :: Maybe (Value Text)
name :: Value Text
primaryAccountId :: Value Text
tags :: Maybe [Tag]
..}
    = BillingGroup {primaryAccountId :: Value Text
primaryAccountId = PropertyType "PrimaryAccountId" BillingGroup
Value Text
newValue, Maybe [Tag]
Maybe (Value Text)
()
Value Text
AccountGroupingProperty
ComputationPreferenceProperty
haddock_workaround_ :: ()
accountGrouping :: AccountGroupingProperty
computationPreference :: ComputationPreferenceProperty
description :: Maybe (Value Text)
name :: Value Text
tags :: Maybe [Tag]
haddock_workaround_ :: ()
accountGrouping :: AccountGroupingProperty
computationPreference :: ComputationPreferenceProperty
description :: Maybe (Value Text)
name :: Value Text
tags :: Maybe [Tag]
..}
instance Property "Tags" BillingGroup where
  type PropertyType "Tags" BillingGroup = [Tag]
  set :: PropertyType "Tags" BillingGroup -> BillingGroup -> BillingGroup
set PropertyType "Tags" BillingGroup
newValue BillingGroup {Maybe [Tag]
Maybe (Value Text)
()
Value Text
AccountGroupingProperty
ComputationPreferenceProperty
haddock_workaround_ :: BillingGroup -> ()
accountGrouping :: BillingGroup -> AccountGroupingProperty
computationPreference :: BillingGroup -> ComputationPreferenceProperty
description :: BillingGroup -> Maybe (Value Text)
name :: BillingGroup -> Value Text
primaryAccountId :: BillingGroup -> Value Text
tags :: BillingGroup -> Maybe [Tag]
haddock_workaround_ :: ()
accountGrouping :: AccountGroupingProperty
computationPreference :: ComputationPreferenceProperty
description :: Maybe (Value Text)
name :: Value Text
primaryAccountId :: Value Text
tags :: Maybe [Tag]
..}
    = BillingGroup {tags :: Maybe [Tag]
tags = [Tag] -> Maybe [Tag]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [Tag]
PropertyType "Tags" BillingGroup
newValue, Maybe (Value Text)
()
Value Text
AccountGroupingProperty
ComputationPreferenceProperty
haddock_workaround_ :: ()
accountGrouping :: AccountGroupingProperty
computationPreference :: ComputationPreferenceProperty
description :: Maybe (Value Text)
name :: Value Text
primaryAccountId :: Value Text
haddock_workaround_ :: ()
accountGrouping :: AccountGroupingProperty
computationPreference :: ComputationPreferenceProperty
description :: Maybe (Value Text)
name :: Value Text
primaryAccountId :: Value Text
..}