module Stratosphere.NetworkFirewall.FirewallPolicy.ActionDefinitionProperty (
module Exports, ActionDefinitionProperty(..),
mkActionDefinitionProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.NetworkFirewall.FirewallPolicy.PublishMetricActionProperty as Exports
import Stratosphere.ResourceProperties
data ActionDefinitionProperty
=
ActionDefinitionProperty {ActionDefinitionProperty -> ()
haddock_workaround_ :: (),
ActionDefinitionProperty -> Maybe PublishMetricActionProperty
publishMetricAction :: (Prelude.Maybe PublishMetricActionProperty)}
deriving stock (ActionDefinitionProperty -> ActionDefinitionProperty -> Bool
(ActionDefinitionProperty -> ActionDefinitionProperty -> Bool)
-> (ActionDefinitionProperty -> ActionDefinitionProperty -> Bool)
-> Eq ActionDefinitionProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ActionDefinitionProperty -> ActionDefinitionProperty -> Bool
== :: ActionDefinitionProperty -> ActionDefinitionProperty -> Bool
$c/= :: ActionDefinitionProperty -> ActionDefinitionProperty -> Bool
/= :: ActionDefinitionProperty -> ActionDefinitionProperty -> Bool
Prelude.Eq, Int -> ActionDefinitionProperty -> ShowS
[ActionDefinitionProperty] -> ShowS
ActionDefinitionProperty -> String
(Int -> ActionDefinitionProperty -> ShowS)
-> (ActionDefinitionProperty -> String)
-> ([ActionDefinitionProperty] -> ShowS)
-> Show ActionDefinitionProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ActionDefinitionProperty -> ShowS
showsPrec :: Int -> ActionDefinitionProperty -> ShowS
$cshow :: ActionDefinitionProperty -> String
show :: ActionDefinitionProperty -> String
$cshowList :: [ActionDefinitionProperty] -> ShowS
showList :: [ActionDefinitionProperty] -> ShowS
Prelude.Show)
mkActionDefinitionProperty :: ActionDefinitionProperty
mkActionDefinitionProperty :: ActionDefinitionProperty
mkActionDefinitionProperty
= ActionDefinitionProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), publishMetricAction :: Maybe PublishMetricActionProperty
publishMetricAction = Maybe PublishMetricActionProperty
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ActionDefinitionProperty where
toResourceProperties :: ActionDefinitionProperty -> ResourceProperties
toResourceProperties ActionDefinitionProperty {Maybe PublishMetricActionProperty
()
haddock_workaround_ :: ActionDefinitionProperty -> ()
publishMetricAction :: ActionDefinitionProperty -> Maybe PublishMetricActionProperty
haddock_workaround_ :: ()
publishMetricAction :: Maybe PublishMetricActionProperty
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::NetworkFirewall::FirewallPolicy.ActionDefinition",
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 -> PublishMetricActionProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"PublishMetricAction" (PublishMetricActionProperty -> (Key, Value))
-> Maybe PublishMetricActionProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe PublishMetricActionProperty
publishMetricAction])}
instance JSON.ToJSON ActionDefinitionProperty where
toJSON :: ActionDefinitionProperty -> Value
toJSON ActionDefinitionProperty {Maybe PublishMetricActionProperty
()
haddock_workaround_ :: ActionDefinitionProperty -> ()
publishMetricAction :: ActionDefinitionProperty -> Maybe PublishMetricActionProperty
haddock_workaround_ :: ()
publishMetricAction :: Maybe PublishMetricActionProperty
..}
= [(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 -> PublishMetricActionProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"PublishMetricAction" (PublishMetricActionProperty -> (Key, Value))
-> Maybe PublishMetricActionProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe PublishMetricActionProperty
publishMetricAction]))
instance Property "PublishMetricAction" ActionDefinitionProperty where
type PropertyType "PublishMetricAction" ActionDefinitionProperty = PublishMetricActionProperty
set :: PropertyType "PublishMetricAction" ActionDefinitionProperty
-> ActionDefinitionProperty -> ActionDefinitionProperty
set PropertyType "PublishMetricAction" ActionDefinitionProperty
newValue ActionDefinitionProperty {Maybe PublishMetricActionProperty
()
haddock_workaround_ :: ActionDefinitionProperty -> ()
publishMetricAction :: ActionDefinitionProperty -> Maybe PublishMetricActionProperty
haddock_workaround_ :: ()
publishMetricAction :: Maybe PublishMetricActionProperty
..}
= ActionDefinitionProperty
{publishMetricAction :: Maybe PublishMetricActionProperty
publishMetricAction = PublishMetricActionProperty -> Maybe PublishMetricActionProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "PublishMetricAction" ActionDefinitionProperty
PublishMetricActionProperty
newValue, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}