module Stratosphere.Config.ConfigurationAggregator.OrganizationAggregationSourceProperty (
        OrganizationAggregationSourceProperty(..),
        mkOrganizationAggregationSourceProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data OrganizationAggregationSourceProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-config-configurationaggregator-organizationaggregationsource.html>
    OrganizationAggregationSourceProperty {OrganizationAggregationSourceProperty -> ()
haddock_workaround_ :: (),
                                           -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-config-configurationaggregator-organizationaggregationsource.html#cfn-config-configurationaggregator-organizationaggregationsource-allawsregions>
                                           OrganizationAggregationSourceProperty -> Maybe (Value Bool)
allAwsRegions :: (Prelude.Maybe (Value Prelude.Bool)),
                                           -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-config-configurationaggregator-organizationaggregationsource.html#cfn-config-configurationaggregator-organizationaggregationsource-awsregions>
                                           OrganizationAggregationSourceProperty -> Maybe (ValueList Text)
awsRegions :: (Prelude.Maybe (ValueList Prelude.Text)),
                                           -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-config-configurationaggregator-organizationaggregationsource.html#cfn-config-configurationaggregator-organizationaggregationsource-rolearn>
                                           OrganizationAggregationSourceProperty -> Value Text
roleArn :: (Value Prelude.Text)}
  deriving stock (OrganizationAggregationSourceProperty
-> OrganizationAggregationSourceProperty -> Bool
(OrganizationAggregationSourceProperty
 -> OrganizationAggregationSourceProperty -> Bool)
-> (OrganizationAggregationSourceProperty
    -> OrganizationAggregationSourceProperty -> Bool)
-> Eq OrganizationAggregationSourceProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: OrganizationAggregationSourceProperty
-> OrganizationAggregationSourceProperty -> Bool
== :: OrganizationAggregationSourceProperty
-> OrganizationAggregationSourceProperty -> Bool
$c/= :: OrganizationAggregationSourceProperty
-> OrganizationAggregationSourceProperty -> Bool
/= :: OrganizationAggregationSourceProperty
-> OrganizationAggregationSourceProperty -> Bool
Prelude.Eq, Int -> OrganizationAggregationSourceProperty -> ShowS
[OrganizationAggregationSourceProperty] -> ShowS
OrganizationAggregationSourceProperty -> String
(Int -> OrganizationAggregationSourceProperty -> ShowS)
-> (OrganizationAggregationSourceProperty -> String)
-> ([OrganizationAggregationSourceProperty] -> ShowS)
-> Show OrganizationAggregationSourceProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> OrganizationAggregationSourceProperty -> ShowS
showsPrec :: Int -> OrganizationAggregationSourceProperty -> ShowS
$cshow :: OrganizationAggregationSourceProperty -> String
show :: OrganizationAggregationSourceProperty -> String
$cshowList :: [OrganizationAggregationSourceProperty] -> ShowS
showList :: [OrganizationAggregationSourceProperty] -> ShowS
Prelude.Show)
mkOrganizationAggregationSourceProperty ::
  Value Prelude.Text -> OrganizationAggregationSourceProperty
mkOrganizationAggregationSourceProperty :: Value Text -> OrganizationAggregationSourceProperty
mkOrganizationAggregationSourceProperty Value Text
roleArn
  = OrganizationAggregationSourceProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), roleArn :: Value Text
roleArn = Value Text
roleArn,
       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 OrganizationAggregationSourceProperty where
  toResourceProperties :: OrganizationAggregationSourceProperty -> ResourceProperties
toResourceProperties OrganizationAggregationSourceProperty {Maybe (ValueList Text)
Maybe (Value Bool)
()
Value Text
haddock_workaround_ :: OrganizationAggregationSourceProperty -> ()
allAwsRegions :: OrganizationAggregationSourceProperty -> Maybe (Value Bool)
awsRegions :: OrganizationAggregationSourceProperty -> Maybe (ValueList Text)
roleArn :: OrganizationAggregationSourceProperty -> Value Text
haddock_workaround_ :: ()
allAwsRegions :: Maybe (Value Bool)
awsRegions :: Maybe (ValueList Text)
roleArn :: Value Text
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::Config::ConfigurationAggregator.OrganizationAggregationSource",
         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
"RoleArn" 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
roleArn]
                           ([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 OrganizationAggregationSourceProperty where
  toJSON :: OrganizationAggregationSourceProperty -> Value
toJSON OrganizationAggregationSourceProperty {Maybe (ValueList Text)
Maybe (Value Bool)
()
Value Text
haddock_workaround_ :: OrganizationAggregationSourceProperty -> ()
allAwsRegions :: OrganizationAggregationSourceProperty -> Maybe (Value Bool)
awsRegions :: OrganizationAggregationSourceProperty -> Maybe (ValueList Text)
roleArn :: OrganizationAggregationSourceProperty -> Value Text
haddock_workaround_ :: ()
allAwsRegions :: Maybe (Value Bool)
awsRegions :: Maybe (ValueList Text)
roleArn :: Value 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
"RoleArn" 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
roleArn]
              ([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 "AllAwsRegions" OrganizationAggregationSourceProperty where
  type PropertyType "AllAwsRegions" OrganizationAggregationSourceProperty = Value Prelude.Bool
  set :: PropertyType "AllAwsRegions" OrganizationAggregationSourceProperty
-> OrganizationAggregationSourceProperty
-> OrganizationAggregationSourceProperty
set PropertyType "AllAwsRegions" OrganizationAggregationSourceProperty
newValue OrganizationAggregationSourceProperty {Maybe (ValueList Text)
Maybe (Value Bool)
()
Value Text
haddock_workaround_ :: OrganizationAggregationSourceProperty -> ()
allAwsRegions :: OrganizationAggregationSourceProperty -> Maybe (Value Bool)
awsRegions :: OrganizationAggregationSourceProperty -> Maybe (ValueList Text)
roleArn :: OrganizationAggregationSourceProperty -> Value Text
haddock_workaround_ :: ()
allAwsRegions :: Maybe (Value Bool)
awsRegions :: Maybe (ValueList Text)
roleArn :: Value Text
..}
    = OrganizationAggregationSourceProperty
        {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" OrganizationAggregationSourceProperty
Value Bool
newValue, Maybe (ValueList Text)
()
Value Text
haddock_workaround_ :: ()
awsRegions :: Maybe (ValueList Text)
roleArn :: Value Text
haddock_workaround_ :: ()
awsRegions :: Maybe (ValueList Text)
roleArn :: Value Text
..}
instance Property "AwsRegions" OrganizationAggregationSourceProperty where
  type PropertyType "AwsRegions" OrganizationAggregationSourceProperty = ValueList Prelude.Text
  set :: PropertyType "AwsRegions" OrganizationAggregationSourceProperty
-> OrganizationAggregationSourceProperty
-> OrganizationAggregationSourceProperty
set PropertyType "AwsRegions" OrganizationAggregationSourceProperty
newValue OrganizationAggregationSourceProperty {Maybe (ValueList Text)
Maybe (Value Bool)
()
Value Text
haddock_workaround_ :: OrganizationAggregationSourceProperty -> ()
allAwsRegions :: OrganizationAggregationSourceProperty -> Maybe (Value Bool)
awsRegions :: OrganizationAggregationSourceProperty -> Maybe (ValueList Text)
roleArn :: OrganizationAggregationSourceProperty -> Value Text
haddock_workaround_ :: ()
allAwsRegions :: Maybe (Value Bool)
awsRegions :: Maybe (ValueList Text)
roleArn :: Value Text
..}
    = OrganizationAggregationSourceProperty
        {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" OrganizationAggregationSourceProperty
ValueList Text
newValue, Maybe (Value Bool)
()
Value Text
haddock_workaround_ :: ()
allAwsRegions :: Maybe (Value Bool)
roleArn :: Value Text
haddock_workaround_ :: ()
allAwsRegions :: Maybe (Value Bool)
roleArn :: Value Text
..}
instance Property "RoleArn" OrganizationAggregationSourceProperty where
  type PropertyType "RoleArn" OrganizationAggregationSourceProperty = Value Prelude.Text
  set :: PropertyType "RoleArn" OrganizationAggregationSourceProperty
-> OrganizationAggregationSourceProperty
-> OrganizationAggregationSourceProperty
set PropertyType "RoleArn" OrganizationAggregationSourceProperty
newValue OrganizationAggregationSourceProperty {Maybe (ValueList Text)
Maybe (Value Bool)
()
Value Text
haddock_workaround_ :: OrganizationAggregationSourceProperty -> ()
allAwsRegions :: OrganizationAggregationSourceProperty -> Maybe (Value Bool)
awsRegions :: OrganizationAggregationSourceProperty -> Maybe (ValueList Text)
roleArn :: OrganizationAggregationSourceProperty -> Value Text
haddock_workaround_ :: ()
allAwsRegions :: Maybe (Value Bool)
awsRegions :: Maybe (ValueList Text)
roleArn :: Value Text
..}
    = OrganizationAggregationSourceProperty {roleArn :: Value Text
roleArn = PropertyType "RoleArn" OrganizationAggregationSourceProperty
Value 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)
..}