module Stratosphere.NetworkFirewall.RuleGroup.RuleGroupProperty (
        module Exports, RuleGroupProperty(..), mkRuleGroupProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.NetworkFirewall.RuleGroup.ReferenceSetsProperty as Exports
import {-# SOURCE #-} Stratosphere.NetworkFirewall.RuleGroup.RuleVariablesProperty as Exports
import {-# SOURCE #-} Stratosphere.NetworkFirewall.RuleGroup.RulesSourceProperty as Exports
import {-# SOURCE #-} Stratosphere.NetworkFirewall.RuleGroup.StatefulRuleOptionsProperty as Exports
import Stratosphere.ResourceProperties
data RuleGroupProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-rulegroup-rulegroup.html>
    RuleGroupProperty {RuleGroupProperty -> ()
haddock_workaround_ :: (),
                       -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-rulegroup-rulegroup.html#cfn-networkfirewall-rulegroup-rulegroup-referencesets>
                       RuleGroupProperty -> Maybe ReferenceSetsProperty
referenceSets :: (Prelude.Maybe ReferenceSetsProperty),
                       -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-rulegroup-rulegroup.html#cfn-networkfirewall-rulegroup-rulegroup-rulevariables>
                       RuleGroupProperty -> Maybe RuleVariablesProperty
ruleVariables :: (Prelude.Maybe RuleVariablesProperty),
                       -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-rulegroup-rulegroup.html#cfn-networkfirewall-rulegroup-rulegroup-rulessource>
                       RuleGroupProperty -> RulesSourceProperty
rulesSource :: RulesSourceProperty,
                       -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-rulegroup-rulegroup.html#cfn-networkfirewall-rulegroup-rulegroup-statefulruleoptions>
                       RuleGroupProperty -> Maybe StatefulRuleOptionsProperty
statefulRuleOptions :: (Prelude.Maybe StatefulRuleOptionsProperty)}
  deriving stock (RuleGroupProperty -> RuleGroupProperty -> Bool
(RuleGroupProperty -> RuleGroupProperty -> Bool)
-> (RuleGroupProperty -> RuleGroupProperty -> Bool)
-> Eq RuleGroupProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: RuleGroupProperty -> RuleGroupProperty -> Bool
== :: RuleGroupProperty -> RuleGroupProperty -> Bool
$c/= :: RuleGroupProperty -> RuleGroupProperty -> Bool
/= :: RuleGroupProperty -> RuleGroupProperty -> Bool
Prelude.Eq, Int -> RuleGroupProperty -> ShowS
[RuleGroupProperty] -> ShowS
RuleGroupProperty -> String
(Int -> RuleGroupProperty -> ShowS)
-> (RuleGroupProperty -> String)
-> ([RuleGroupProperty] -> ShowS)
-> Show RuleGroupProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> RuleGroupProperty -> ShowS
showsPrec :: Int -> RuleGroupProperty -> ShowS
$cshow :: RuleGroupProperty -> String
show :: RuleGroupProperty -> String
$cshowList :: [RuleGroupProperty] -> ShowS
showList :: [RuleGroupProperty] -> ShowS
Prelude.Show)
mkRuleGroupProperty :: RulesSourceProperty -> RuleGroupProperty
mkRuleGroupProperty :: RulesSourceProperty -> RuleGroupProperty
mkRuleGroupProperty RulesSourceProperty
rulesSource
  = RuleGroupProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), rulesSource :: RulesSourceProperty
rulesSource = RulesSourceProperty
rulesSource,
       referenceSets :: Maybe ReferenceSetsProperty
referenceSets = Maybe ReferenceSetsProperty
forall a. Maybe a
Prelude.Nothing, ruleVariables :: Maybe RuleVariablesProperty
ruleVariables = Maybe RuleVariablesProperty
forall a. Maybe a
Prelude.Nothing,
       statefulRuleOptions :: Maybe StatefulRuleOptionsProperty
statefulRuleOptions = Maybe StatefulRuleOptionsProperty
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties RuleGroupProperty where
  toResourceProperties :: RuleGroupProperty -> ResourceProperties
toResourceProperties RuleGroupProperty {Maybe ReferenceSetsProperty
Maybe RuleVariablesProperty
Maybe StatefulRuleOptionsProperty
()
RulesSourceProperty
haddock_workaround_ :: RuleGroupProperty -> ()
referenceSets :: RuleGroupProperty -> Maybe ReferenceSetsProperty
ruleVariables :: RuleGroupProperty -> Maybe RuleVariablesProperty
rulesSource :: RuleGroupProperty -> RulesSourceProperty
statefulRuleOptions :: RuleGroupProperty -> Maybe StatefulRuleOptionsProperty
haddock_workaround_ :: ()
referenceSets :: Maybe ReferenceSetsProperty
ruleVariables :: Maybe RuleVariablesProperty
rulesSource :: RulesSourceProperty
statefulRuleOptions :: Maybe StatefulRuleOptionsProperty
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::NetworkFirewall::RuleGroup.RuleGroup",
         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
"RulesSource" Key -> RulesSourceProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= RulesSourceProperty
rulesSource]
                           ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                              [Key -> ReferenceSetsProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"ReferenceSets" (ReferenceSetsProperty -> (Key, Value))
-> Maybe ReferenceSetsProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ReferenceSetsProperty
referenceSets,
                               Key -> RuleVariablesProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"RuleVariables" (RuleVariablesProperty -> (Key, Value))
-> Maybe RuleVariablesProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe RuleVariablesProperty
ruleVariables,
                               Key -> StatefulRuleOptionsProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"StatefulRuleOptions" (StatefulRuleOptionsProperty -> (Key, Value))
-> Maybe StatefulRuleOptionsProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe StatefulRuleOptionsProperty
statefulRuleOptions]))}
instance JSON.ToJSON RuleGroupProperty where
  toJSON :: RuleGroupProperty -> Value
toJSON RuleGroupProperty {Maybe ReferenceSetsProperty
Maybe RuleVariablesProperty
Maybe StatefulRuleOptionsProperty
()
RulesSourceProperty
haddock_workaround_ :: RuleGroupProperty -> ()
referenceSets :: RuleGroupProperty -> Maybe ReferenceSetsProperty
ruleVariables :: RuleGroupProperty -> Maybe RuleVariablesProperty
rulesSource :: RuleGroupProperty -> RulesSourceProperty
statefulRuleOptions :: RuleGroupProperty -> Maybe StatefulRuleOptionsProperty
haddock_workaround_ :: ()
referenceSets :: Maybe ReferenceSetsProperty
ruleVariables :: Maybe RuleVariablesProperty
rulesSource :: RulesSourceProperty
statefulRuleOptions :: Maybe StatefulRuleOptionsProperty
..}
    = [(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
"RulesSource" Key -> RulesSourceProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= RulesSourceProperty
rulesSource]
              ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                 [Key -> ReferenceSetsProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"ReferenceSets" (ReferenceSetsProperty -> (Key, Value))
-> Maybe ReferenceSetsProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ReferenceSetsProperty
referenceSets,
                  Key -> RuleVariablesProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"RuleVariables" (RuleVariablesProperty -> (Key, Value))
-> Maybe RuleVariablesProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe RuleVariablesProperty
ruleVariables,
                  Key -> StatefulRuleOptionsProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"StatefulRuleOptions" (StatefulRuleOptionsProperty -> (Key, Value))
-> Maybe StatefulRuleOptionsProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe StatefulRuleOptionsProperty
statefulRuleOptions])))
instance Property "ReferenceSets" RuleGroupProperty where
  type PropertyType "ReferenceSets" RuleGroupProperty = ReferenceSetsProperty
  set :: PropertyType "ReferenceSets" RuleGroupProperty
-> RuleGroupProperty -> RuleGroupProperty
set PropertyType "ReferenceSets" RuleGroupProperty
newValue RuleGroupProperty {Maybe ReferenceSetsProperty
Maybe RuleVariablesProperty
Maybe StatefulRuleOptionsProperty
()
RulesSourceProperty
haddock_workaround_ :: RuleGroupProperty -> ()
referenceSets :: RuleGroupProperty -> Maybe ReferenceSetsProperty
ruleVariables :: RuleGroupProperty -> Maybe RuleVariablesProperty
rulesSource :: RuleGroupProperty -> RulesSourceProperty
statefulRuleOptions :: RuleGroupProperty -> Maybe StatefulRuleOptionsProperty
haddock_workaround_ :: ()
referenceSets :: Maybe ReferenceSetsProperty
ruleVariables :: Maybe RuleVariablesProperty
rulesSource :: RulesSourceProperty
statefulRuleOptions :: Maybe StatefulRuleOptionsProperty
..}
    = RuleGroupProperty {referenceSets :: Maybe ReferenceSetsProperty
referenceSets = ReferenceSetsProperty -> Maybe ReferenceSetsProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ReferenceSets" RuleGroupProperty
ReferenceSetsProperty
newValue, Maybe RuleVariablesProperty
Maybe StatefulRuleOptionsProperty
()
RulesSourceProperty
haddock_workaround_ :: ()
ruleVariables :: Maybe RuleVariablesProperty
rulesSource :: RulesSourceProperty
statefulRuleOptions :: Maybe StatefulRuleOptionsProperty
haddock_workaround_ :: ()
ruleVariables :: Maybe RuleVariablesProperty
rulesSource :: RulesSourceProperty
statefulRuleOptions :: Maybe StatefulRuleOptionsProperty
..}
instance Property "RuleVariables" RuleGroupProperty where
  type PropertyType "RuleVariables" RuleGroupProperty = RuleVariablesProperty
  set :: PropertyType "RuleVariables" RuleGroupProperty
-> RuleGroupProperty -> RuleGroupProperty
set PropertyType "RuleVariables" RuleGroupProperty
newValue RuleGroupProperty {Maybe ReferenceSetsProperty
Maybe RuleVariablesProperty
Maybe StatefulRuleOptionsProperty
()
RulesSourceProperty
haddock_workaround_ :: RuleGroupProperty -> ()
referenceSets :: RuleGroupProperty -> Maybe ReferenceSetsProperty
ruleVariables :: RuleGroupProperty -> Maybe RuleVariablesProperty
rulesSource :: RuleGroupProperty -> RulesSourceProperty
statefulRuleOptions :: RuleGroupProperty -> Maybe StatefulRuleOptionsProperty
haddock_workaround_ :: ()
referenceSets :: Maybe ReferenceSetsProperty
ruleVariables :: Maybe RuleVariablesProperty
rulesSource :: RulesSourceProperty
statefulRuleOptions :: Maybe StatefulRuleOptionsProperty
..}
    = RuleGroupProperty {ruleVariables :: Maybe RuleVariablesProperty
ruleVariables = RuleVariablesProperty -> Maybe RuleVariablesProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "RuleVariables" RuleGroupProperty
RuleVariablesProperty
newValue, Maybe ReferenceSetsProperty
Maybe StatefulRuleOptionsProperty
()
RulesSourceProperty
haddock_workaround_ :: ()
referenceSets :: Maybe ReferenceSetsProperty
rulesSource :: RulesSourceProperty
statefulRuleOptions :: Maybe StatefulRuleOptionsProperty
haddock_workaround_ :: ()
referenceSets :: Maybe ReferenceSetsProperty
rulesSource :: RulesSourceProperty
statefulRuleOptions :: Maybe StatefulRuleOptionsProperty
..}
instance Property "RulesSource" RuleGroupProperty where
  type PropertyType "RulesSource" RuleGroupProperty = RulesSourceProperty
  set :: PropertyType "RulesSource" RuleGroupProperty
-> RuleGroupProperty -> RuleGroupProperty
set PropertyType "RulesSource" RuleGroupProperty
newValue RuleGroupProperty {Maybe ReferenceSetsProperty
Maybe RuleVariablesProperty
Maybe StatefulRuleOptionsProperty
()
RulesSourceProperty
haddock_workaround_ :: RuleGroupProperty -> ()
referenceSets :: RuleGroupProperty -> Maybe ReferenceSetsProperty
ruleVariables :: RuleGroupProperty -> Maybe RuleVariablesProperty
rulesSource :: RuleGroupProperty -> RulesSourceProperty
statefulRuleOptions :: RuleGroupProperty -> Maybe StatefulRuleOptionsProperty
haddock_workaround_ :: ()
referenceSets :: Maybe ReferenceSetsProperty
ruleVariables :: Maybe RuleVariablesProperty
rulesSource :: RulesSourceProperty
statefulRuleOptions :: Maybe StatefulRuleOptionsProperty
..}
    = RuleGroupProperty {rulesSource :: RulesSourceProperty
rulesSource = PropertyType "RulesSource" RuleGroupProperty
RulesSourceProperty
newValue, Maybe ReferenceSetsProperty
Maybe RuleVariablesProperty
Maybe StatefulRuleOptionsProperty
()
haddock_workaround_ :: ()
referenceSets :: Maybe ReferenceSetsProperty
ruleVariables :: Maybe RuleVariablesProperty
statefulRuleOptions :: Maybe StatefulRuleOptionsProperty
haddock_workaround_ :: ()
referenceSets :: Maybe ReferenceSetsProperty
ruleVariables :: Maybe RuleVariablesProperty
statefulRuleOptions :: Maybe StatefulRuleOptionsProperty
..}
instance Property "StatefulRuleOptions" RuleGroupProperty where
  type PropertyType "StatefulRuleOptions" RuleGroupProperty = StatefulRuleOptionsProperty
  set :: PropertyType "StatefulRuleOptions" RuleGroupProperty
-> RuleGroupProperty -> RuleGroupProperty
set PropertyType "StatefulRuleOptions" RuleGroupProperty
newValue RuleGroupProperty {Maybe ReferenceSetsProperty
Maybe RuleVariablesProperty
Maybe StatefulRuleOptionsProperty
()
RulesSourceProperty
haddock_workaround_ :: RuleGroupProperty -> ()
referenceSets :: RuleGroupProperty -> Maybe ReferenceSetsProperty
ruleVariables :: RuleGroupProperty -> Maybe RuleVariablesProperty
rulesSource :: RuleGroupProperty -> RulesSourceProperty
statefulRuleOptions :: RuleGroupProperty -> Maybe StatefulRuleOptionsProperty
haddock_workaround_ :: ()
referenceSets :: Maybe ReferenceSetsProperty
ruleVariables :: Maybe RuleVariablesProperty
rulesSource :: RulesSourceProperty
statefulRuleOptions :: Maybe StatefulRuleOptionsProperty
..}
    = RuleGroupProperty
        {statefulRuleOptions :: Maybe StatefulRuleOptionsProperty
statefulRuleOptions = StatefulRuleOptionsProperty -> Maybe StatefulRuleOptionsProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "StatefulRuleOptions" RuleGroupProperty
StatefulRuleOptionsProperty
newValue, Maybe ReferenceSetsProperty
Maybe RuleVariablesProperty
()
RulesSourceProperty
haddock_workaround_ :: ()
referenceSets :: Maybe ReferenceSetsProperty
ruleVariables :: Maybe RuleVariablesProperty
rulesSource :: RulesSourceProperty
haddock_workaround_ :: ()
referenceSets :: Maybe ReferenceSetsProperty
ruleVariables :: Maybe RuleVariablesProperty
rulesSource :: RulesSourceProperty
..}