module Stratosphere.NetworkFirewall.RuleGroup.ReferenceSetsProperty (
        module Exports, ReferenceSetsProperty(..), mkReferenceSetsProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.NetworkFirewall.RuleGroup.IPSetReferenceProperty as Exports
import Stratosphere.ResourceProperties
data ReferenceSetsProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-rulegroup-referencesets.html>
    ReferenceSetsProperty {ReferenceSetsProperty -> ()
haddock_workaround_ :: (),
                           -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-rulegroup-referencesets.html#cfn-networkfirewall-rulegroup-referencesets-ipsetreferences>
                           ReferenceSetsProperty -> Maybe (Map Text IPSetReferenceProperty)
iPSetReferences :: (Prelude.Maybe (Prelude.Map Prelude.Text IPSetReferenceProperty))}
  deriving stock (ReferenceSetsProperty -> ReferenceSetsProperty -> Bool
(ReferenceSetsProperty -> ReferenceSetsProperty -> Bool)
-> (ReferenceSetsProperty -> ReferenceSetsProperty -> Bool)
-> Eq ReferenceSetsProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ReferenceSetsProperty -> ReferenceSetsProperty -> Bool
== :: ReferenceSetsProperty -> ReferenceSetsProperty -> Bool
$c/= :: ReferenceSetsProperty -> ReferenceSetsProperty -> Bool
/= :: ReferenceSetsProperty -> ReferenceSetsProperty -> Bool
Prelude.Eq, Int -> ReferenceSetsProperty -> ShowS
[ReferenceSetsProperty] -> ShowS
ReferenceSetsProperty -> String
(Int -> ReferenceSetsProperty -> ShowS)
-> (ReferenceSetsProperty -> String)
-> ([ReferenceSetsProperty] -> ShowS)
-> Show ReferenceSetsProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ReferenceSetsProperty -> ShowS
showsPrec :: Int -> ReferenceSetsProperty -> ShowS
$cshow :: ReferenceSetsProperty -> String
show :: ReferenceSetsProperty -> String
$cshowList :: [ReferenceSetsProperty] -> ShowS
showList :: [ReferenceSetsProperty] -> ShowS
Prelude.Show)
mkReferenceSetsProperty :: ReferenceSetsProperty
mkReferenceSetsProperty :: ReferenceSetsProperty
mkReferenceSetsProperty
  = ReferenceSetsProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), iPSetReferences :: Maybe (Map Text IPSetReferenceProperty)
iPSetReferences = Maybe (Map Text IPSetReferenceProperty)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ReferenceSetsProperty where
  toResourceProperties :: ReferenceSetsProperty -> ResourceProperties
toResourceProperties ReferenceSetsProperty {Maybe (Map Text IPSetReferenceProperty)
()
haddock_workaround_ :: ReferenceSetsProperty -> ()
iPSetReferences :: ReferenceSetsProperty -> Maybe (Map Text IPSetReferenceProperty)
haddock_workaround_ :: ()
iPSetReferences :: Maybe (Map Text IPSetReferenceProperty)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::NetworkFirewall::RuleGroup.ReferenceSets",
         supportsTags :: Bool
supportsTags = Bool
Prelude.False,
         properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
                        ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                           [Key -> Map Text IPSetReferenceProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"IPSetReferences" (Map Text IPSetReferenceProperty -> (Key, Value))
-> Maybe (Map Text IPSetReferenceProperty) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Map Text IPSetReferenceProperty)
iPSetReferences])}
instance JSON.ToJSON ReferenceSetsProperty where
  toJSON :: ReferenceSetsProperty -> Value
toJSON ReferenceSetsProperty {Maybe (Map Text IPSetReferenceProperty)
()
haddock_workaround_ :: ReferenceSetsProperty -> ()
iPSetReferences :: ReferenceSetsProperty -> Maybe (Map Text IPSetReferenceProperty)
haddock_workaround_ :: ()
iPSetReferences :: Maybe (Map Text IPSetReferenceProperty)
..}
    = [(Key, Value)] -> Value
JSON.object
        ([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
           ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
              [Key -> Map Text IPSetReferenceProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"IPSetReferences" (Map Text IPSetReferenceProperty -> (Key, Value))
-> Maybe (Map Text IPSetReferenceProperty) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Map Text IPSetReferenceProperty)
iPSetReferences]))
instance Property "IPSetReferences" ReferenceSetsProperty where
  type PropertyType "IPSetReferences" ReferenceSetsProperty = Prelude.Map Prelude.Text IPSetReferenceProperty
  set :: PropertyType "IPSetReferences" ReferenceSetsProperty
-> ReferenceSetsProperty -> ReferenceSetsProperty
set PropertyType "IPSetReferences" ReferenceSetsProperty
newValue ReferenceSetsProperty {Maybe (Map Text IPSetReferenceProperty)
()
haddock_workaround_ :: ReferenceSetsProperty -> ()
iPSetReferences :: ReferenceSetsProperty -> Maybe (Map Text IPSetReferenceProperty)
haddock_workaround_ :: ()
iPSetReferences :: Maybe (Map Text IPSetReferenceProperty)
..}
    = ReferenceSetsProperty
        {iPSetReferences :: Maybe (Map Text IPSetReferenceProperty)
iPSetReferences = Map Text IPSetReferenceProperty
-> Maybe (Map Text IPSetReferenceProperty)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure Map Text IPSetReferenceProperty
PropertyType "IPSetReferences" ReferenceSetsProperty
newValue, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}