module Stratosphere.NetworkFirewall.RuleGroup.IPSetProperty (
        IPSetProperty(..), mkIPSetProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data IPSetProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-rulegroup-ipset.html>
    IPSetProperty {IPSetProperty -> ()
haddock_workaround_ :: (),
                   -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-rulegroup-ipset.html#cfn-networkfirewall-rulegroup-ipset-definition>
                   IPSetProperty -> Maybe (ValueList Text)
definition :: (Prelude.Maybe (ValueList Prelude.Text))}
  deriving stock (IPSetProperty -> IPSetProperty -> Bool
(IPSetProperty -> IPSetProperty -> Bool)
-> (IPSetProperty -> IPSetProperty -> Bool) -> Eq IPSetProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: IPSetProperty -> IPSetProperty -> Bool
== :: IPSetProperty -> IPSetProperty -> Bool
$c/= :: IPSetProperty -> IPSetProperty -> Bool
/= :: IPSetProperty -> IPSetProperty -> Bool
Prelude.Eq, Int -> IPSetProperty -> ShowS
[IPSetProperty] -> ShowS
IPSetProperty -> String
(Int -> IPSetProperty -> ShowS)
-> (IPSetProperty -> String)
-> ([IPSetProperty] -> ShowS)
-> Show IPSetProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> IPSetProperty -> ShowS
showsPrec :: Int -> IPSetProperty -> ShowS
$cshow :: IPSetProperty -> String
show :: IPSetProperty -> String
$cshowList :: [IPSetProperty] -> ShowS
showList :: [IPSetProperty] -> ShowS
Prelude.Show)
mkIPSetProperty :: IPSetProperty
mkIPSetProperty :: IPSetProperty
mkIPSetProperty
  = IPSetProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), definition :: Maybe (ValueList Text)
definition = Maybe (ValueList Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties IPSetProperty where
  toResourceProperties :: IPSetProperty -> ResourceProperties
toResourceProperties IPSetProperty {Maybe (ValueList Text)
()
haddock_workaround_ :: IPSetProperty -> ()
definition :: IPSetProperty -> Maybe (ValueList Text)
haddock_workaround_ :: ()
definition :: Maybe (ValueList Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::NetworkFirewall::RuleGroup.IPSet",
         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 -> 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
"Definition" (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)
definition])}
instance JSON.ToJSON IPSetProperty where
  toJSON :: IPSetProperty -> Value
toJSON IPSetProperty {Maybe (ValueList Text)
()
haddock_workaround_ :: IPSetProperty -> ()
definition :: IPSetProperty -> Maybe (ValueList Text)
haddock_workaround_ :: ()
definition :: Maybe (ValueList Text)
..}
    = [(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 -> 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
"Definition" (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)
definition]))
instance Property "Definition" IPSetProperty where
  type PropertyType "Definition" IPSetProperty = ValueList Prelude.Text
  set :: PropertyType "Definition" IPSetProperty
-> IPSetProperty -> IPSetProperty
set PropertyType "Definition" IPSetProperty
newValue IPSetProperty {Maybe (ValueList Text)
()
haddock_workaround_ :: IPSetProperty -> ()
definition :: IPSetProperty -> Maybe (ValueList Text)
haddock_workaround_ :: ()
definition :: Maybe (ValueList Text)
..}
    = IPSetProperty {definition :: Maybe (ValueList Text)
definition = ValueList Text -> Maybe (ValueList Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Definition" IPSetProperty
ValueList Text
newValue, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}