module Stratosphere.Config.ConfigurationAggregator.AccountAggregationSourceProperty (
        AccountAggregationSourceProperty(..),
        mkAccountAggregationSourceProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data AccountAggregationSourceProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-config-configurationaggregator-accountaggregationsource.html>
    AccountAggregationSourceProperty {AccountAggregationSourceProperty -> ()
haddock_workaround_ :: (),
                                      -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-config-configurationaggregator-accountaggregationsource.html#cfn-config-configurationaggregator-accountaggregationsource-accountids>
                                      AccountAggregationSourceProperty -> ValueList Text
accountIds :: (ValueList Prelude.Text),
                                      -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-config-configurationaggregator-accountaggregationsource.html#cfn-config-configurationaggregator-accountaggregationsource-allawsregions>
                                      AccountAggregationSourceProperty -> Maybe (Value Bool)
allAwsRegions :: (Prelude.Maybe (Value Prelude.Bool)),
                                      -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-config-configurationaggregator-accountaggregationsource.html#cfn-config-configurationaggregator-accountaggregationsource-awsregions>
                                      AccountAggregationSourceProperty -> Maybe (ValueList Text)
awsRegions :: (Prelude.Maybe (ValueList Prelude.Text))}
  deriving stock (AccountAggregationSourceProperty
-> AccountAggregationSourceProperty -> Bool
(AccountAggregationSourceProperty
 -> AccountAggregationSourceProperty -> Bool)
-> (AccountAggregationSourceProperty
    -> AccountAggregationSourceProperty -> Bool)
-> Eq AccountAggregationSourceProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: AccountAggregationSourceProperty
-> AccountAggregationSourceProperty -> Bool
== :: AccountAggregationSourceProperty
-> AccountAggregationSourceProperty -> Bool
$c/= :: AccountAggregationSourceProperty
-> AccountAggregationSourceProperty -> Bool
/= :: AccountAggregationSourceProperty
-> AccountAggregationSourceProperty -> Bool
Prelude.Eq, Int -> AccountAggregationSourceProperty -> ShowS
[AccountAggregationSourceProperty] -> ShowS
AccountAggregationSourceProperty -> String
(Int -> AccountAggregationSourceProperty -> ShowS)
-> (AccountAggregationSourceProperty -> String)
-> ([AccountAggregationSourceProperty] -> ShowS)
-> Show AccountAggregationSourceProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> AccountAggregationSourceProperty -> ShowS
showsPrec :: Int -> AccountAggregationSourceProperty -> ShowS
$cshow :: AccountAggregationSourceProperty -> String
show :: AccountAggregationSourceProperty -> String
$cshowList :: [AccountAggregationSourceProperty] -> ShowS
showList :: [AccountAggregationSourceProperty] -> ShowS
Prelude.Show)
mkAccountAggregationSourceProperty ::
  ValueList Prelude.Text -> AccountAggregationSourceProperty
mkAccountAggregationSourceProperty :: ValueList Text -> AccountAggregationSourceProperty
mkAccountAggregationSourceProperty ValueList Text
accountIds
  = AccountAggregationSourceProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), accountIds :: ValueList Text
accountIds = ValueList Text
accountIds,
       allAwsRegions :: Maybe (Value Bool)
allAwsRegions = Maybe (Value Bool)
forall a. Maybe a
Prelude.Nothing, awsRegions :: Maybe (ValueList Text)
awsRegions = Maybe (ValueList Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties AccountAggregationSourceProperty where
  toResourceProperties :: AccountAggregationSourceProperty -> ResourceProperties
toResourceProperties AccountAggregationSourceProperty {Maybe (ValueList Text)
Maybe (Value Bool)
()
ValueList Text
haddock_workaround_ :: AccountAggregationSourceProperty -> ()
accountIds :: AccountAggregationSourceProperty -> ValueList Text
allAwsRegions :: AccountAggregationSourceProperty -> Maybe (Value Bool)
awsRegions :: AccountAggregationSourceProperty -> Maybe (ValueList Text)
haddock_workaround_ :: ()
accountIds :: ValueList Text
allAwsRegions :: Maybe (Value Bool)
awsRegions :: Maybe (ValueList Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::Config::ConfigurationAggregator.AccountAggregationSource",
         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
"AccountIds" Key -> ValueList Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= ValueList Text
accountIds]
                           ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                              [Key -> Value Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"AllAwsRegions" (Value Bool -> (Key, Value))
-> Maybe (Value Bool) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Bool)
allAwsRegions,
                               Key -> ValueList 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
"AwsRegions" (ValueList Text -> (Key, Value))
-> Maybe (ValueList Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (ValueList Text)
awsRegions]))}
instance JSON.ToJSON AccountAggregationSourceProperty where
  toJSON :: AccountAggregationSourceProperty -> Value
toJSON AccountAggregationSourceProperty {Maybe (ValueList Text)
Maybe (Value Bool)
()
ValueList Text
haddock_workaround_ :: AccountAggregationSourceProperty -> ()
accountIds :: AccountAggregationSourceProperty -> ValueList Text
allAwsRegions :: AccountAggregationSourceProperty -> Maybe (Value Bool)
awsRegions :: AccountAggregationSourceProperty -> Maybe (ValueList Text)
haddock_workaround_ :: ()
accountIds :: ValueList Text
allAwsRegions :: Maybe (Value Bool)
awsRegions :: Maybe (ValueList Text)
..}
    = [(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
"AccountIds" Key -> ValueList Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= ValueList Text
accountIds]
              ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                 [Key -> Value Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"AllAwsRegions" (Value Bool -> (Key, Value))
-> Maybe (Value Bool) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Bool)
allAwsRegions,
                  Key -> ValueList 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
"AwsRegions" (ValueList Text -> (Key, Value))
-> Maybe (ValueList Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (ValueList Text)
awsRegions])))
instance Property "AccountIds" AccountAggregationSourceProperty where
  type PropertyType "AccountIds" AccountAggregationSourceProperty = ValueList Prelude.Text
  set :: PropertyType "AccountIds" AccountAggregationSourceProperty
-> AccountAggregationSourceProperty
-> AccountAggregationSourceProperty
set PropertyType "AccountIds" AccountAggregationSourceProperty
newValue AccountAggregationSourceProperty {Maybe (ValueList Text)
Maybe (Value Bool)
()
ValueList Text
haddock_workaround_ :: AccountAggregationSourceProperty -> ()
accountIds :: AccountAggregationSourceProperty -> ValueList Text
allAwsRegions :: AccountAggregationSourceProperty -> Maybe (Value Bool)
awsRegions :: AccountAggregationSourceProperty -> Maybe (ValueList Text)
haddock_workaround_ :: ()
accountIds :: ValueList Text
allAwsRegions :: Maybe (Value Bool)
awsRegions :: Maybe (ValueList Text)
..}
    = AccountAggregationSourceProperty {accountIds :: ValueList Text
accountIds = PropertyType "AccountIds" AccountAggregationSourceProperty
ValueList Text
newValue, Maybe (ValueList Text)
Maybe (Value Bool)
()
haddock_workaround_ :: ()
allAwsRegions :: Maybe (Value Bool)
awsRegions :: Maybe (ValueList Text)
haddock_workaround_ :: ()
allAwsRegions :: Maybe (Value Bool)
awsRegions :: Maybe (ValueList Text)
..}
instance Property "AllAwsRegions" AccountAggregationSourceProperty where
  type PropertyType "AllAwsRegions" AccountAggregationSourceProperty = Value Prelude.Bool
  set :: PropertyType "AllAwsRegions" AccountAggregationSourceProperty
-> AccountAggregationSourceProperty
-> AccountAggregationSourceProperty
set PropertyType "AllAwsRegions" AccountAggregationSourceProperty
newValue AccountAggregationSourceProperty {Maybe (ValueList Text)
Maybe (Value Bool)
()
ValueList Text
haddock_workaround_ :: AccountAggregationSourceProperty -> ()
accountIds :: AccountAggregationSourceProperty -> ValueList Text
allAwsRegions :: AccountAggregationSourceProperty -> Maybe (Value Bool)
awsRegions :: AccountAggregationSourceProperty -> Maybe (ValueList Text)
haddock_workaround_ :: ()
accountIds :: ValueList Text
allAwsRegions :: Maybe (Value Bool)
awsRegions :: Maybe (ValueList Text)
..}
    = AccountAggregationSourceProperty
        {allAwsRegions :: Maybe (Value Bool)
allAwsRegions = Value Bool -> Maybe (Value Bool)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "AllAwsRegions" AccountAggregationSourceProperty
Value Bool
newValue, Maybe (ValueList Text)
()
ValueList Text
haddock_workaround_ :: ()
accountIds :: ValueList Text
awsRegions :: Maybe (ValueList Text)
haddock_workaround_ :: ()
accountIds :: ValueList Text
awsRegions :: Maybe (ValueList Text)
..}
instance Property "AwsRegions" AccountAggregationSourceProperty where
  type PropertyType "AwsRegions" AccountAggregationSourceProperty = ValueList Prelude.Text
  set :: PropertyType "AwsRegions" AccountAggregationSourceProperty
-> AccountAggregationSourceProperty
-> AccountAggregationSourceProperty
set PropertyType "AwsRegions" AccountAggregationSourceProperty
newValue AccountAggregationSourceProperty {Maybe (ValueList Text)
Maybe (Value Bool)
()
ValueList Text
haddock_workaround_ :: AccountAggregationSourceProperty -> ()
accountIds :: AccountAggregationSourceProperty -> ValueList Text
allAwsRegions :: AccountAggregationSourceProperty -> Maybe (Value Bool)
awsRegions :: AccountAggregationSourceProperty -> Maybe (ValueList Text)
haddock_workaround_ :: ()
accountIds :: ValueList Text
allAwsRegions :: Maybe (Value Bool)
awsRegions :: Maybe (ValueList Text)
..}
    = AccountAggregationSourceProperty
        {awsRegions :: Maybe (ValueList Text)
awsRegions = ValueList Text -> Maybe (ValueList Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "AwsRegions" AccountAggregationSourceProperty
ValueList Text
newValue, Maybe (Value Bool)
()
ValueList Text
haddock_workaround_ :: ()
accountIds :: ValueList Text
allAwsRegions :: Maybe (Value Bool)
haddock_workaround_ :: ()
accountIds :: ValueList Text
allAwsRegions :: Maybe (Value Bool)
..}