module Stratosphere.ObservabilityAdmin.OrganizationCentralizationRule (
        module Exports, OrganizationCentralizationRule(..),
        mkOrganizationCentralizationRule
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.ObservabilityAdmin.OrganizationCentralizationRule.CentralizationRuleProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Tag
import Stratosphere.Value
data OrganizationCentralizationRule
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-observabilityadmin-organizationcentralizationrule.html>
    OrganizationCentralizationRule {OrganizationCentralizationRule -> ()
haddock_workaround_ :: (),
                                    -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-observabilityadmin-organizationcentralizationrule.html#cfn-observabilityadmin-organizationcentralizationrule-rule>
                                    OrganizationCentralizationRule -> CentralizationRuleProperty
rule :: CentralizationRuleProperty,
                                    -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-observabilityadmin-organizationcentralizationrule.html#cfn-observabilityadmin-organizationcentralizationrule-rulename>
                                    OrganizationCentralizationRule -> Value Text
ruleName :: (Value Prelude.Text),
                                    -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-observabilityadmin-organizationcentralizationrule.html#cfn-observabilityadmin-organizationcentralizationrule-tags>
                                    OrganizationCentralizationRule -> Maybe [Tag]
tags :: (Prelude.Maybe [Tag])}
  deriving stock (OrganizationCentralizationRule
-> OrganizationCentralizationRule -> Bool
(OrganizationCentralizationRule
 -> OrganizationCentralizationRule -> Bool)
-> (OrganizationCentralizationRule
    -> OrganizationCentralizationRule -> Bool)
-> Eq OrganizationCentralizationRule
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: OrganizationCentralizationRule
-> OrganizationCentralizationRule -> Bool
== :: OrganizationCentralizationRule
-> OrganizationCentralizationRule -> Bool
$c/= :: OrganizationCentralizationRule
-> OrganizationCentralizationRule -> Bool
/= :: OrganizationCentralizationRule
-> OrganizationCentralizationRule -> Bool
Prelude.Eq, Int -> OrganizationCentralizationRule -> ShowS
[OrganizationCentralizationRule] -> ShowS
OrganizationCentralizationRule -> String
(Int -> OrganizationCentralizationRule -> ShowS)
-> (OrganizationCentralizationRule -> String)
-> ([OrganizationCentralizationRule] -> ShowS)
-> Show OrganizationCentralizationRule
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> OrganizationCentralizationRule -> ShowS
showsPrec :: Int -> OrganizationCentralizationRule -> ShowS
$cshow :: OrganizationCentralizationRule -> String
show :: OrganizationCentralizationRule -> String
$cshowList :: [OrganizationCentralizationRule] -> ShowS
showList :: [OrganizationCentralizationRule] -> ShowS
Prelude.Show)
mkOrganizationCentralizationRule ::
  CentralizationRuleProperty
  -> Value Prelude.Text -> OrganizationCentralizationRule
mkOrganizationCentralizationRule :: CentralizationRuleProperty
-> Value Text -> OrganizationCentralizationRule
mkOrganizationCentralizationRule CentralizationRuleProperty
rule Value Text
ruleName
  = OrganizationCentralizationRule
      {haddock_workaround_ :: ()
haddock_workaround_ = (), rule :: CentralizationRuleProperty
rule = CentralizationRuleProperty
rule, ruleName :: Value Text
ruleName = Value Text
ruleName,
       tags :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties OrganizationCentralizationRule where
  toResourceProperties :: OrganizationCentralizationRule -> ResourceProperties
toResourceProperties OrganizationCentralizationRule {Maybe [Tag]
()
Value Text
CentralizationRuleProperty
haddock_workaround_ :: OrganizationCentralizationRule -> ()
rule :: OrganizationCentralizationRule -> CentralizationRuleProperty
ruleName :: OrganizationCentralizationRule -> Value Text
tags :: OrganizationCentralizationRule -> Maybe [Tag]
haddock_workaround_ :: ()
rule :: CentralizationRuleProperty
ruleName :: Value Text
tags :: Maybe [Tag]
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::ObservabilityAdmin::OrganizationCentralizationRule",
         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
"Rule" Key -> CentralizationRuleProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= CentralizationRuleProperty
rule, Key
"RuleName" 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
ruleName]
                           ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes [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 OrganizationCentralizationRule where
  toJSON :: OrganizationCentralizationRule -> Value
toJSON OrganizationCentralizationRule {Maybe [Tag]
()
Value Text
CentralizationRuleProperty
haddock_workaround_ :: OrganizationCentralizationRule -> ()
rule :: OrganizationCentralizationRule -> CentralizationRuleProperty
ruleName :: OrganizationCentralizationRule -> Value Text
tags :: OrganizationCentralizationRule -> Maybe [Tag]
haddock_workaround_ :: ()
rule :: CentralizationRuleProperty
ruleName :: 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
"Rule" Key -> CentralizationRuleProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= CentralizationRuleProperty
rule, Key
"RuleName" 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
ruleName]
              ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes [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 "Rule" OrganizationCentralizationRule where
  type PropertyType "Rule" OrganizationCentralizationRule = CentralizationRuleProperty
  set :: PropertyType "Rule" OrganizationCentralizationRule
-> OrganizationCentralizationRule -> OrganizationCentralizationRule
set PropertyType "Rule" OrganizationCentralizationRule
newValue OrganizationCentralizationRule {Maybe [Tag]
()
Value Text
CentralizationRuleProperty
haddock_workaround_ :: OrganizationCentralizationRule -> ()
rule :: OrganizationCentralizationRule -> CentralizationRuleProperty
ruleName :: OrganizationCentralizationRule -> Value Text
tags :: OrganizationCentralizationRule -> Maybe [Tag]
haddock_workaround_ :: ()
rule :: CentralizationRuleProperty
ruleName :: Value Text
tags :: Maybe [Tag]
..}
    = OrganizationCentralizationRule {rule :: CentralizationRuleProperty
rule = PropertyType "Rule" OrganizationCentralizationRule
CentralizationRuleProperty
newValue, Maybe [Tag]
()
Value Text
haddock_workaround_ :: ()
ruleName :: Value Text
tags :: Maybe [Tag]
haddock_workaround_ :: ()
ruleName :: Value Text
tags :: Maybe [Tag]
..}
instance Property "RuleName" OrganizationCentralizationRule where
  type PropertyType "RuleName" OrganizationCentralizationRule = Value Prelude.Text
  set :: PropertyType "RuleName" OrganizationCentralizationRule
-> OrganizationCentralizationRule -> OrganizationCentralizationRule
set PropertyType "RuleName" OrganizationCentralizationRule
newValue OrganizationCentralizationRule {Maybe [Tag]
()
Value Text
CentralizationRuleProperty
haddock_workaround_ :: OrganizationCentralizationRule -> ()
rule :: OrganizationCentralizationRule -> CentralizationRuleProperty
ruleName :: OrganizationCentralizationRule -> Value Text
tags :: OrganizationCentralizationRule -> Maybe [Tag]
haddock_workaround_ :: ()
rule :: CentralizationRuleProperty
ruleName :: Value Text
tags :: Maybe [Tag]
..}
    = OrganizationCentralizationRule {ruleName :: Value Text
ruleName = PropertyType "RuleName" OrganizationCentralizationRule
Value Text
newValue, Maybe [Tag]
()
CentralizationRuleProperty
haddock_workaround_ :: ()
rule :: CentralizationRuleProperty
tags :: Maybe [Tag]
haddock_workaround_ :: ()
rule :: CentralizationRuleProperty
tags :: Maybe [Tag]
..}
instance Property "Tags" OrganizationCentralizationRule where
  type PropertyType "Tags" OrganizationCentralizationRule = [Tag]
  set :: PropertyType "Tags" OrganizationCentralizationRule
-> OrganizationCentralizationRule -> OrganizationCentralizationRule
set PropertyType "Tags" OrganizationCentralizationRule
newValue OrganizationCentralizationRule {Maybe [Tag]
()
Value Text
CentralizationRuleProperty
haddock_workaround_ :: OrganizationCentralizationRule -> ()
rule :: OrganizationCentralizationRule -> CentralizationRuleProperty
ruleName :: OrganizationCentralizationRule -> Value Text
tags :: OrganizationCentralizationRule -> Maybe [Tag]
haddock_workaround_ :: ()
rule :: CentralizationRuleProperty
ruleName :: Value Text
tags :: Maybe [Tag]
..}
    = OrganizationCentralizationRule {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" OrganizationCentralizationRule
newValue, ()
Value Text
CentralizationRuleProperty
haddock_workaround_ :: ()
rule :: CentralizationRuleProperty
ruleName :: Value Text
haddock_workaround_ :: ()
rule :: CentralizationRuleProperty
ruleName :: Value Text
..}