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