module Stratosphere.NetworkFirewall.RuleGroup.StatelessRulesAndCustomActionsProperty (
        module Exports, StatelessRulesAndCustomActionsProperty(..),
        mkStatelessRulesAndCustomActionsProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.NetworkFirewall.RuleGroup.CustomActionProperty as Exports
import {-# SOURCE #-} Stratosphere.NetworkFirewall.RuleGroup.StatelessRuleProperty as Exports
import Stratosphere.ResourceProperties
data StatelessRulesAndCustomActionsProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-rulegroup-statelessrulesandcustomactions.html>
    StatelessRulesAndCustomActionsProperty {StatelessRulesAndCustomActionsProperty -> ()
haddock_workaround_ :: (),
                                            -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-rulegroup-statelessrulesandcustomactions.html#cfn-networkfirewall-rulegroup-statelessrulesandcustomactions-customactions>
                                            StatelessRulesAndCustomActionsProperty
-> Maybe [CustomActionProperty]
customActions :: (Prelude.Maybe [CustomActionProperty]),
                                            -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-rulegroup-statelessrulesandcustomactions.html#cfn-networkfirewall-rulegroup-statelessrulesandcustomactions-statelessrules>
                                            StatelessRulesAndCustomActionsProperty -> [StatelessRuleProperty]
statelessRules :: [StatelessRuleProperty]}
  deriving stock (StatelessRulesAndCustomActionsProperty
-> StatelessRulesAndCustomActionsProperty -> Bool
(StatelessRulesAndCustomActionsProperty
 -> StatelessRulesAndCustomActionsProperty -> Bool)
-> (StatelessRulesAndCustomActionsProperty
    -> StatelessRulesAndCustomActionsProperty -> Bool)
-> Eq StatelessRulesAndCustomActionsProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: StatelessRulesAndCustomActionsProperty
-> StatelessRulesAndCustomActionsProperty -> Bool
== :: StatelessRulesAndCustomActionsProperty
-> StatelessRulesAndCustomActionsProperty -> Bool
$c/= :: StatelessRulesAndCustomActionsProperty
-> StatelessRulesAndCustomActionsProperty -> Bool
/= :: StatelessRulesAndCustomActionsProperty
-> StatelessRulesAndCustomActionsProperty -> Bool
Prelude.Eq, Int -> StatelessRulesAndCustomActionsProperty -> ShowS
[StatelessRulesAndCustomActionsProperty] -> ShowS
StatelessRulesAndCustomActionsProperty -> String
(Int -> StatelessRulesAndCustomActionsProperty -> ShowS)
-> (StatelessRulesAndCustomActionsProperty -> String)
-> ([StatelessRulesAndCustomActionsProperty] -> ShowS)
-> Show StatelessRulesAndCustomActionsProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> StatelessRulesAndCustomActionsProperty -> ShowS
showsPrec :: Int -> StatelessRulesAndCustomActionsProperty -> ShowS
$cshow :: StatelessRulesAndCustomActionsProperty -> String
show :: StatelessRulesAndCustomActionsProperty -> String
$cshowList :: [StatelessRulesAndCustomActionsProperty] -> ShowS
showList :: [StatelessRulesAndCustomActionsProperty] -> ShowS
Prelude.Show)
mkStatelessRulesAndCustomActionsProperty ::
  [StatelessRuleProperty] -> StatelessRulesAndCustomActionsProperty
mkStatelessRulesAndCustomActionsProperty :: [StatelessRuleProperty] -> StatelessRulesAndCustomActionsProperty
mkStatelessRulesAndCustomActionsProperty [StatelessRuleProperty]
statelessRules
  = StatelessRulesAndCustomActionsProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), statelessRules :: [StatelessRuleProperty]
statelessRules = [StatelessRuleProperty]
statelessRules,
       customActions :: Maybe [CustomActionProperty]
customActions = Maybe [CustomActionProperty]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties StatelessRulesAndCustomActionsProperty where
  toResourceProperties :: StatelessRulesAndCustomActionsProperty -> ResourceProperties
toResourceProperties StatelessRulesAndCustomActionsProperty {[StatelessRuleProperty]
Maybe [CustomActionProperty]
()
haddock_workaround_ :: StatelessRulesAndCustomActionsProperty -> ()
customActions :: StatelessRulesAndCustomActionsProperty
-> Maybe [CustomActionProperty]
statelessRules :: StatelessRulesAndCustomActionsProperty -> [StatelessRuleProperty]
haddock_workaround_ :: ()
customActions :: Maybe [CustomActionProperty]
statelessRules :: [StatelessRuleProperty]
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::NetworkFirewall::RuleGroup.StatelessRulesAndCustomActions",
         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
"StatelessRules" Key -> [StatelessRuleProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= [StatelessRuleProperty]
statelessRules]
                           ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                              [Key -> [CustomActionProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"CustomActions" ([CustomActionProperty] -> (Key, Value))
-> Maybe [CustomActionProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [CustomActionProperty]
customActions]))}
instance JSON.ToJSON StatelessRulesAndCustomActionsProperty where
  toJSON :: StatelessRulesAndCustomActionsProperty -> Value
toJSON StatelessRulesAndCustomActionsProperty {[StatelessRuleProperty]
Maybe [CustomActionProperty]
()
haddock_workaround_ :: StatelessRulesAndCustomActionsProperty -> ()
customActions :: StatelessRulesAndCustomActionsProperty
-> Maybe [CustomActionProperty]
statelessRules :: StatelessRulesAndCustomActionsProperty -> [StatelessRuleProperty]
haddock_workaround_ :: ()
customActions :: Maybe [CustomActionProperty]
statelessRules :: [StatelessRuleProperty]
..}
    = [(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
"StatelessRules" Key -> [StatelessRuleProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= [StatelessRuleProperty]
statelessRules]
              ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                 [Key -> [CustomActionProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"CustomActions" ([CustomActionProperty] -> (Key, Value))
-> Maybe [CustomActionProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [CustomActionProperty]
customActions])))
instance Property "CustomActions" StatelessRulesAndCustomActionsProperty where
  type PropertyType "CustomActions" StatelessRulesAndCustomActionsProperty = [CustomActionProperty]
  set :: PropertyType "CustomActions" StatelessRulesAndCustomActionsProperty
-> StatelessRulesAndCustomActionsProperty
-> StatelessRulesAndCustomActionsProperty
set PropertyType "CustomActions" StatelessRulesAndCustomActionsProperty
newValue StatelessRulesAndCustomActionsProperty {[StatelessRuleProperty]
Maybe [CustomActionProperty]
()
haddock_workaround_ :: StatelessRulesAndCustomActionsProperty -> ()
customActions :: StatelessRulesAndCustomActionsProperty
-> Maybe [CustomActionProperty]
statelessRules :: StatelessRulesAndCustomActionsProperty -> [StatelessRuleProperty]
haddock_workaround_ :: ()
customActions :: Maybe [CustomActionProperty]
statelessRules :: [StatelessRuleProperty]
..}
    = StatelessRulesAndCustomActionsProperty
        {customActions :: Maybe [CustomActionProperty]
customActions = [CustomActionProperty] -> Maybe [CustomActionProperty]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [CustomActionProperty]
PropertyType "CustomActions" StatelessRulesAndCustomActionsProperty
newValue, [StatelessRuleProperty]
()
haddock_workaround_ :: ()
statelessRules :: [StatelessRuleProperty]
haddock_workaround_ :: ()
statelessRules :: [StatelessRuleProperty]
..}
instance Property "StatelessRules" StatelessRulesAndCustomActionsProperty where
  type PropertyType "StatelessRules" StatelessRulesAndCustomActionsProperty = [StatelessRuleProperty]
  set :: PropertyType
  "StatelessRules" StatelessRulesAndCustomActionsProperty
-> StatelessRulesAndCustomActionsProperty
-> StatelessRulesAndCustomActionsProperty
set PropertyType
  "StatelessRules" StatelessRulesAndCustomActionsProperty
newValue StatelessRulesAndCustomActionsProperty {[StatelessRuleProperty]
Maybe [CustomActionProperty]
()
haddock_workaround_ :: StatelessRulesAndCustomActionsProperty -> ()
customActions :: StatelessRulesAndCustomActionsProperty
-> Maybe [CustomActionProperty]
statelessRules :: StatelessRulesAndCustomActionsProperty -> [StatelessRuleProperty]
haddock_workaround_ :: ()
customActions :: Maybe [CustomActionProperty]
statelessRules :: [StatelessRuleProperty]
..}
    = StatelessRulesAndCustomActionsProperty
        {statelessRules :: [StatelessRuleProperty]
statelessRules = [StatelessRuleProperty]
PropertyType
  "StatelessRules" StatelessRulesAndCustomActionsProperty
newValue, Maybe [CustomActionProperty]
()
haddock_workaround_ :: ()
customActions :: Maybe [CustomActionProperty]
haddock_workaround_ :: ()
customActions :: Maybe [CustomActionProperty]
..}