module Stratosphere.IoT.BillingGroup (
        module Exports, BillingGroup(..), mkBillingGroup
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.IoT.BillingGroup.BillingGroupPropertiesProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Tag
import Stratosphere.Value
data BillingGroup
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iot-billinggroup.html>
    BillingGroup {BillingGroup -> ()
haddock_workaround_ :: (),
                  -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iot-billinggroup.html#cfn-iot-billinggroup-billinggroupname>
                  BillingGroup -> Maybe (Value Text)
billingGroupName :: (Prelude.Maybe (Value Prelude.Text)),
                  -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iot-billinggroup.html#cfn-iot-billinggroup-billinggroupproperties>
                  BillingGroup -> Maybe BillingGroupPropertiesProperty
billingGroupProperties :: (Prelude.Maybe BillingGroupPropertiesProperty),
                  -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iot-billinggroup.html#cfn-iot-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 :: BillingGroup
mkBillingGroup :: BillingGroup
mkBillingGroup
  = BillingGroup
      {haddock_workaround_ :: ()
haddock_workaround_ = (), billingGroupName :: Maybe (Value Text)
billingGroupName = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       billingGroupProperties :: Maybe BillingGroupPropertiesProperty
billingGroupProperties = Maybe BillingGroupPropertiesProperty
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)
Maybe BillingGroupPropertiesProperty
()
haddock_workaround_ :: BillingGroup -> ()
billingGroupName :: BillingGroup -> Maybe (Value Text)
billingGroupProperties :: BillingGroup -> Maybe BillingGroupPropertiesProperty
tags :: BillingGroup -> Maybe [Tag]
haddock_workaround_ :: ()
billingGroupName :: Maybe (Value Text)
billingGroupProperties :: Maybe BillingGroupPropertiesProperty
tags :: Maybe [Tag]
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::IoT::BillingGroup", supportsTags :: Bool
supportsTags = Bool
Prelude.True,
         properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
                        ([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
"BillingGroupName" (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)
billingGroupName,
                            Key -> BillingGroupPropertiesProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"BillingGroupProperties"
                              (BillingGroupPropertiesProperty -> (Key, Value))
-> Maybe BillingGroupPropertiesProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe BillingGroupPropertiesProperty
billingGroupProperties,
                            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)
Maybe BillingGroupPropertiesProperty
()
haddock_workaround_ :: BillingGroup -> ()
billingGroupName :: BillingGroup -> Maybe (Value Text)
billingGroupProperties :: BillingGroup -> Maybe BillingGroupPropertiesProperty
tags :: BillingGroup -> Maybe [Tag]
haddock_workaround_ :: ()
billingGroupName :: Maybe (Value Text)
billingGroupProperties :: Maybe BillingGroupPropertiesProperty
tags :: Maybe [Tag]
..}
    = [(Key, Value)] -> Value
JSON.object
        ([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
           ([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
"BillingGroupName" (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)
billingGroupName,
               Key -> BillingGroupPropertiesProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"BillingGroupProperties"
                 (BillingGroupPropertiesProperty -> (Key, Value))
-> Maybe BillingGroupPropertiesProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe BillingGroupPropertiesProperty
billingGroupProperties,
               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 "BillingGroupName" BillingGroup where
  type PropertyType "BillingGroupName" BillingGroup = Value Prelude.Text
  set :: PropertyType "BillingGroupName" BillingGroup
-> BillingGroup -> BillingGroup
set PropertyType "BillingGroupName" BillingGroup
newValue BillingGroup {Maybe [Tag]
Maybe (Value Text)
Maybe BillingGroupPropertiesProperty
()
haddock_workaround_ :: BillingGroup -> ()
billingGroupName :: BillingGroup -> Maybe (Value Text)
billingGroupProperties :: BillingGroup -> Maybe BillingGroupPropertiesProperty
tags :: BillingGroup -> Maybe [Tag]
haddock_workaround_ :: ()
billingGroupName :: Maybe (Value Text)
billingGroupProperties :: Maybe BillingGroupPropertiesProperty
tags :: Maybe [Tag]
..}
    = BillingGroup {billingGroupName :: Maybe (Value Text)
billingGroupName = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "BillingGroupName" BillingGroup
Value Text
newValue, Maybe [Tag]
Maybe BillingGroupPropertiesProperty
()
haddock_workaround_ :: ()
billingGroupProperties :: Maybe BillingGroupPropertiesProperty
tags :: Maybe [Tag]
haddock_workaround_ :: ()
billingGroupProperties :: Maybe BillingGroupPropertiesProperty
tags :: Maybe [Tag]
..}
instance Property "BillingGroupProperties" BillingGroup where
  type PropertyType "BillingGroupProperties" BillingGroup = BillingGroupPropertiesProperty
  set :: PropertyType "BillingGroupProperties" BillingGroup
-> BillingGroup -> BillingGroup
set PropertyType "BillingGroupProperties" BillingGroup
newValue BillingGroup {Maybe [Tag]
Maybe (Value Text)
Maybe BillingGroupPropertiesProperty
()
haddock_workaround_ :: BillingGroup -> ()
billingGroupName :: BillingGroup -> Maybe (Value Text)
billingGroupProperties :: BillingGroup -> Maybe BillingGroupPropertiesProperty
tags :: BillingGroup -> Maybe [Tag]
haddock_workaround_ :: ()
billingGroupName :: Maybe (Value Text)
billingGroupProperties :: Maybe BillingGroupPropertiesProperty
tags :: Maybe [Tag]
..}
    = BillingGroup {billingGroupProperties :: Maybe BillingGroupPropertiesProperty
billingGroupProperties = BillingGroupPropertiesProperty
-> Maybe BillingGroupPropertiesProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "BillingGroupProperties" BillingGroup
BillingGroupPropertiesProperty
newValue, Maybe [Tag]
Maybe (Value Text)
()
haddock_workaround_ :: ()
billingGroupName :: Maybe (Value Text)
tags :: Maybe [Tag]
haddock_workaround_ :: ()
billingGroupName :: Maybe (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)
Maybe BillingGroupPropertiesProperty
()
haddock_workaround_ :: BillingGroup -> ()
billingGroupName :: BillingGroup -> Maybe (Value Text)
billingGroupProperties :: BillingGroup -> Maybe BillingGroupPropertiesProperty
tags :: BillingGroup -> Maybe [Tag]
haddock_workaround_ :: ()
billingGroupName :: Maybe (Value Text)
billingGroupProperties :: Maybe BillingGroupPropertiesProperty
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)
Maybe BillingGroupPropertiesProperty
()
haddock_workaround_ :: ()
billingGroupName :: Maybe (Value Text)
billingGroupProperties :: Maybe BillingGroupPropertiesProperty
haddock_workaround_ :: ()
billingGroupName :: Maybe (Value Text)
billingGroupProperties :: Maybe BillingGroupPropertiesProperty
..}