module Stratosphere.Config.ConfigurationAggregator (
module Exports, ConfigurationAggregator(..),
mkConfigurationAggregator
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.Config.ConfigurationAggregator.AccountAggregationSourceProperty as Exports
import {-# SOURCE #-} Stratosphere.Config.ConfigurationAggregator.OrganizationAggregationSourceProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Tag
import Stratosphere.Value
data ConfigurationAggregator
=
ConfigurationAggregator {ConfigurationAggregator -> ()
haddock_workaround_ :: (),
ConfigurationAggregator -> Maybe [AccountAggregationSourceProperty]
accountAggregationSources :: (Prelude.Maybe [AccountAggregationSourceProperty]),
ConfigurationAggregator -> Maybe (Value Text)
configurationAggregatorName :: (Prelude.Maybe (Value Prelude.Text)),
ConfigurationAggregator
-> Maybe OrganizationAggregationSourceProperty
organizationAggregationSource :: (Prelude.Maybe OrganizationAggregationSourceProperty),
ConfigurationAggregator -> Maybe [Tag]
tags :: (Prelude.Maybe [Tag])}
deriving stock (ConfigurationAggregator -> ConfigurationAggregator -> Bool
(ConfigurationAggregator -> ConfigurationAggregator -> Bool)
-> (ConfigurationAggregator -> ConfigurationAggregator -> Bool)
-> Eq ConfigurationAggregator
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ConfigurationAggregator -> ConfigurationAggregator -> Bool
== :: ConfigurationAggregator -> ConfigurationAggregator -> Bool
$c/= :: ConfigurationAggregator -> ConfigurationAggregator -> Bool
/= :: ConfigurationAggregator -> ConfigurationAggregator -> Bool
Prelude.Eq, Int -> ConfigurationAggregator -> ShowS
[ConfigurationAggregator] -> ShowS
ConfigurationAggregator -> String
(Int -> ConfigurationAggregator -> ShowS)
-> (ConfigurationAggregator -> String)
-> ([ConfigurationAggregator] -> ShowS)
-> Show ConfigurationAggregator
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ConfigurationAggregator -> ShowS
showsPrec :: Int -> ConfigurationAggregator -> ShowS
$cshow :: ConfigurationAggregator -> String
show :: ConfigurationAggregator -> String
$cshowList :: [ConfigurationAggregator] -> ShowS
showList :: [ConfigurationAggregator] -> ShowS
Prelude.Show)
mkConfigurationAggregator :: ConfigurationAggregator
mkConfigurationAggregator :: ConfigurationAggregator
mkConfigurationAggregator
= ConfigurationAggregator
{haddock_workaround_ :: ()
haddock_workaround_ = (),
accountAggregationSources :: Maybe [AccountAggregationSourceProperty]
accountAggregationSources = Maybe [AccountAggregationSourceProperty]
forall a. Maybe a
Prelude.Nothing,
configurationAggregatorName :: Maybe (Value Text)
configurationAggregatorName = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
organizationAggregationSource :: Maybe OrganizationAggregationSourceProperty
organizationAggregationSource = Maybe OrganizationAggregationSourceProperty
forall a. Maybe a
Prelude.Nothing,
tags :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ConfigurationAggregator where
toResourceProperties :: ConfigurationAggregator -> ResourceProperties
toResourceProperties ConfigurationAggregator {Maybe [Tag]
Maybe [AccountAggregationSourceProperty]
Maybe (Value Text)
Maybe OrganizationAggregationSourceProperty
()
haddock_workaround_ :: ConfigurationAggregator -> ()
accountAggregationSources :: ConfigurationAggregator -> Maybe [AccountAggregationSourceProperty]
configurationAggregatorName :: ConfigurationAggregator -> Maybe (Value Text)
organizationAggregationSource :: ConfigurationAggregator
-> Maybe OrganizationAggregationSourceProperty
tags :: ConfigurationAggregator -> Maybe [Tag]
haddock_workaround_ :: ()
accountAggregationSources :: Maybe [AccountAggregationSourceProperty]
configurationAggregatorName :: Maybe (Value Text)
organizationAggregationSource :: Maybe OrganizationAggregationSourceProperty
tags :: Maybe [Tag]
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::Config::ConfigurationAggregator",
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 -> [AccountAggregationSourceProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"AccountAggregationSources"
([AccountAggregationSourceProperty] -> (Key, Value))
-> Maybe [AccountAggregationSourceProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [AccountAggregationSourceProperty]
accountAggregationSources,
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
"ConfigurationAggregatorName"
(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)
configurationAggregatorName,
Key -> OrganizationAggregationSourceProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"OrganizationAggregationSource"
(OrganizationAggregationSourceProperty -> (Key, Value))
-> Maybe OrganizationAggregationSourceProperty
-> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe OrganizationAggregationSourceProperty
organizationAggregationSource,
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 ConfigurationAggregator where
toJSON :: ConfigurationAggregator -> Value
toJSON ConfigurationAggregator {Maybe [Tag]
Maybe [AccountAggregationSourceProperty]
Maybe (Value Text)
Maybe OrganizationAggregationSourceProperty
()
haddock_workaround_ :: ConfigurationAggregator -> ()
accountAggregationSources :: ConfigurationAggregator -> Maybe [AccountAggregationSourceProperty]
configurationAggregatorName :: ConfigurationAggregator -> Maybe (Value Text)
organizationAggregationSource :: ConfigurationAggregator
-> Maybe OrganizationAggregationSourceProperty
tags :: ConfigurationAggregator -> Maybe [Tag]
haddock_workaround_ :: ()
accountAggregationSources :: Maybe [AccountAggregationSourceProperty]
configurationAggregatorName :: Maybe (Value Text)
organizationAggregationSource :: Maybe OrganizationAggregationSourceProperty
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 -> [AccountAggregationSourceProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"AccountAggregationSources"
([AccountAggregationSourceProperty] -> (Key, Value))
-> Maybe [AccountAggregationSourceProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [AccountAggregationSourceProperty]
accountAggregationSources,
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
"ConfigurationAggregatorName"
(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)
configurationAggregatorName,
Key -> OrganizationAggregationSourceProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"OrganizationAggregationSource"
(OrganizationAggregationSourceProperty -> (Key, Value))
-> Maybe OrganizationAggregationSourceProperty
-> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe OrganizationAggregationSourceProperty
organizationAggregationSource,
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 "AccountAggregationSources" ConfigurationAggregator where
type PropertyType "AccountAggregationSources" ConfigurationAggregator = [AccountAggregationSourceProperty]
set :: PropertyType "AccountAggregationSources" ConfigurationAggregator
-> ConfigurationAggregator -> ConfigurationAggregator
set PropertyType "AccountAggregationSources" ConfigurationAggregator
newValue ConfigurationAggregator {Maybe [Tag]
Maybe [AccountAggregationSourceProperty]
Maybe (Value Text)
Maybe OrganizationAggregationSourceProperty
()
haddock_workaround_ :: ConfigurationAggregator -> ()
accountAggregationSources :: ConfigurationAggregator -> Maybe [AccountAggregationSourceProperty]
configurationAggregatorName :: ConfigurationAggregator -> Maybe (Value Text)
organizationAggregationSource :: ConfigurationAggregator
-> Maybe OrganizationAggregationSourceProperty
tags :: ConfigurationAggregator -> Maybe [Tag]
haddock_workaround_ :: ()
accountAggregationSources :: Maybe [AccountAggregationSourceProperty]
configurationAggregatorName :: Maybe (Value Text)
organizationAggregationSource :: Maybe OrganizationAggregationSourceProperty
tags :: Maybe [Tag]
..}
= ConfigurationAggregator
{accountAggregationSources :: Maybe [AccountAggregationSourceProperty]
accountAggregationSources = [AccountAggregationSourceProperty]
-> Maybe [AccountAggregationSourceProperty]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [AccountAggregationSourceProperty]
PropertyType "AccountAggregationSources" ConfigurationAggregator
newValue, Maybe [Tag]
Maybe (Value Text)
Maybe OrganizationAggregationSourceProperty
()
haddock_workaround_ :: ()
configurationAggregatorName :: Maybe (Value Text)
organizationAggregationSource :: Maybe OrganizationAggregationSourceProperty
tags :: Maybe [Tag]
haddock_workaround_ :: ()
configurationAggregatorName :: Maybe (Value Text)
organizationAggregationSource :: Maybe OrganizationAggregationSourceProperty
tags :: Maybe [Tag]
..}
instance Property "ConfigurationAggregatorName" ConfigurationAggregator where
type PropertyType "ConfigurationAggregatorName" ConfigurationAggregator = Value Prelude.Text
set :: PropertyType "ConfigurationAggregatorName" ConfigurationAggregator
-> ConfigurationAggregator -> ConfigurationAggregator
set PropertyType "ConfigurationAggregatorName" ConfigurationAggregator
newValue ConfigurationAggregator {Maybe [Tag]
Maybe [AccountAggregationSourceProperty]
Maybe (Value Text)
Maybe OrganizationAggregationSourceProperty
()
haddock_workaround_ :: ConfigurationAggregator -> ()
accountAggregationSources :: ConfigurationAggregator -> Maybe [AccountAggregationSourceProperty]
configurationAggregatorName :: ConfigurationAggregator -> Maybe (Value Text)
organizationAggregationSource :: ConfigurationAggregator
-> Maybe OrganizationAggregationSourceProperty
tags :: ConfigurationAggregator -> Maybe [Tag]
haddock_workaround_ :: ()
accountAggregationSources :: Maybe [AccountAggregationSourceProperty]
configurationAggregatorName :: Maybe (Value Text)
organizationAggregationSource :: Maybe OrganizationAggregationSourceProperty
tags :: Maybe [Tag]
..}
= ConfigurationAggregator
{configurationAggregatorName :: Maybe (Value Text)
configurationAggregatorName = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ConfigurationAggregatorName" ConfigurationAggregator
Value Text
newValue, Maybe [Tag]
Maybe [AccountAggregationSourceProperty]
Maybe OrganizationAggregationSourceProperty
()
haddock_workaround_ :: ()
accountAggregationSources :: Maybe [AccountAggregationSourceProperty]
organizationAggregationSource :: Maybe OrganizationAggregationSourceProperty
tags :: Maybe [Tag]
haddock_workaround_ :: ()
accountAggregationSources :: Maybe [AccountAggregationSourceProperty]
organizationAggregationSource :: Maybe OrganizationAggregationSourceProperty
tags :: Maybe [Tag]
..}
instance Property "OrganizationAggregationSource" ConfigurationAggregator where
type PropertyType "OrganizationAggregationSource" ConfigurationAggregator = OrganizationAggregationSourceProperty
set :: PropertyType
"OrganizationAggregationSource" ConfigurationAggregator
-> ConfigurationAggregator -> ConfigurationAggregator
set PropertyType
"OrganizationAggregationSource" ConfigurationAggregator
newValue ConfigurationAggregator {Maybe [Tag]
Maybe [AccountAggregationSourceProperty]
Maybe (Value Text)
Maybe OrganizationAggregationSourceProperty
()
haddock_workaround_ :: ConfigurationAggregator -> ()
accountAggregationSources :: ConfigurationAggregator -> Maybe [AccountAggregationSourceProperty]
configurationAggregatorName :: ConfigurationAggregator -> Maybe (Value Text)
organizationAggregationSource :: ConfigurationAggregator
-> Maybe OrganizationAggregationSourceProperty
tags :: ConfigurationAggregator -> Maybe [Tag]
haddock_workaround_ :: ()
accountAggregationSources :: Maybe [AccountAggregationSourceProperty]
configurationAggregatorName :: Maybe (Value Text)
organizationAggregationSource :: Maybe OrganizationAggregationSourceProperty
tags :: Maybe [Tag]
..}
= ConfigurationAggregator
{organizationAggregationSource :: Maybe OrganizationAggregationSourceProperty
organizationAggregationSource = OrganizationAggregationSourceProperty
-> Maybe OrganizationAggregationSourceProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType
"OrganizationAggregationSource" ConfigurationAggregator
OrganizationAggregationSourceProperty
newValue, Maybe [Tag]
Maybe [AccountAggregationSourceProperty]
Maybe (Value Text)
()
haddock_workaround_ :: ()
accountAggregationSources :: Maybe [AccountAggregationSourceProperty]
configurationAggregatorName :: Maybe (Value Text)
tags :: Maybe [Tag]
haddock_workaround_ :: ()
accountAggregationSources :: Maybe [AccountAggregationSourceProperty]
configurationAggregatorName :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
instance Property "Tags" ConfigurationAggregator where
type PropertyType "Tags" ConfigurationAggregator = [Tag]
set :: PropertyType "Tags" ConfigurationAggregator
-> ConfigurationAggregator -> ConfigurationAggregator
set PropertyType "Tags" ConfigurationAggregator
newValue ConfigurationAggregator {Maybe [Tag]
Maybe [AccountAggregationSourceProperty]
Maybe (Value Text)
Maybe OrganizationAggregationSourceProperty
()
haddock_workaround_ :: ConfigurationAggregator -> ()
accountAggregationSources :: ConfigurationAggregator -> Maybe [AccountAggregationSourceProperty]
configurationAggregatorName :: ConfigurationAggregator -> Maybe (Value Text)
organizationAggregationSource :: ConfigurationAggregator
-> Maybe OrganizationAggregationSourceProperty
tags :: ConfigurationAggregator -> Maybe [Tag]
haddock_workaround_ :: ()
accountAggregationSources :: Maybe [AccountAggregationSourceProperty]
configurationAggregatorName :: Maybe (Value Text)
organizationAggregationSource :: Maybe OrganizationAggregationSourceProperty
tags :: Maybe [Tag]
..}
= ConfigurationAggregator {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" ConfigurationAggregator
newValue, Maybe [AccountAggregationSourceProperty]
Maybe (Value Text)
Maybe OrganizationAggregationSourceProperty
()
haddock_workaround_ :: ()
accountAggregationSources :: Maybe [AccountAggregationSourceProperty]
configurationAggregatorName :: Maybe (Value Text)
organizationAggregationSource :: Maybe OrganizationAggregationSourceProperty
haddock_workaround_ :: ()
accountAggregationSources :: Maybe [AccountAggregationSourceProperty]
configurationAggregatorName :: Maybe (Value Text)
organizationAggregationSource :: Maybe OrganizationAggregationSourceProperty
..}