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