module Stratosphere.NetworkFirewall.RuleGroup.PortSetProperty (
PortSetProperty(..), mkPortSetProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data PortSetProperty
=
PortSetProperty {PortSetProperty -> ()
haddock_workaround_ :: (),
PortSetProperty -> Maybe (ValueList Text)
definition :: (Prelude.Maybe (ValueList Prelude.Text))}
deriving stock (PortSetProperty -> PortSetProperty -> Bool
(PortSetProperty -> PortSetProperty -> Bool)
-> (PortSetProperty -> PortSetProperty -> Bool)
-> Eq PortSetProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: PortSetProperty -> PortSetProperty -> Bool
== :: PortSetProperty -> PortSetProperty -> Bool
$c/= :: PortSetProperty -> PortSetProperty -> Bool
/= :: PortSetProperty -> PortSetProperty -> Bool
Prelude.Eq, Int -> PortSetProperty -> ShowS
[PortSetProperty] -> ShowS
PortSetProperty -> String
(Int -> PortSetProperty -> ShowS)
-> (PortSetProperty -> String)
-> ([PortSetProperty] -> ShowS)
-> Show PortSetProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> PortSetProperty -> ShowS
showsPrec :: Int -> PortSetProperty -> ShowS
$cshow :: PortSetProperty -> String
show :: PortSetProperty -> String
$cshowList :: [PortSetProperty] -> ShowS
showList :: [PortSetProperty] -> ShowS
Prelude.Show)
mkPortSetProperty :: PortSetProperty
mkPortSetProperty :: PortSetProperty
mkPortSetProperty
= PortSetProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), definition :: Maybe (ValueList Text)
definition = Maybe (ValueList Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties PortSetProperty where
toResourceProperties :: PortSetProperty -> ResourceProperties
toResourceProperties PortSetProperty {Maybe (ValueList Text)
()
haddock_workaround_ :: PortSetProperty -> ()
definition :: PortSetProperty -> Maybe (ValueList Text)
haddock_workaround_ :: ()
definition :: Maybe (ValueList Text)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::NetworkFirewall::RuleGroup.PortSet",
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 PortSetProperty where
toJSON :: PortSetProperty -> Value
toJSON PortSetProperty {Maybe (ValueList Text)
()
haddock_workaround_ :: PortSetProperty -> ()
definition :: PortSetProperty -> 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" PortSetProperty where
type PropertyType "Definition" PortSetProperty = ValueList Prelude.Text
set :: PropertyType "Definition" PortSetProperty
-> PortSetProperty -> PortSetProperty
set PropertyType "Definition" PortSetProperty
newValue PortSetProperty {Maybe (ValueList Text)
()
haddock_workaround_ :: PortSetProperty -> ()
definition :: PortSetProperty -> Maybe (ValueList Text)
haddock_workaround_ :: ()
definition :: Maybe (ValueList Text)
..}
= PortSetProperty {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" PortSetProperty
ValueList Text
newValue, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}