module Stratosphere.SSM.PatchBaseline.RuleProperty (
        module Exports, RuleProperty(..), mkRuleProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.SSM.PatchBaseline.PatchFilterGroupProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data RuleProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ssm-patchbaseline-rule.html>
    RuleProperty {RuleProperty -> ()
haddock_workaround_ :: (),
                  -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ssm-patchbaseline-rule.html#cfn-ssm-patchbaseline-rule-approveafterdays>
                  RuleProperty -> Maybe (Value Integer)
approveAfterDays :: (Prelude.Maybe (Value Prelude.Integer)),
                  -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ssm-patchbaseline-rule.html#cfn-ssm-patchbaseline-rule-approveuntildate>
                  RuleProperty -> Maybe (Value Text)
approveUntilDate :: (Prelude.Maybe (Value Prelude.Text)),
                  -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ssm-patchbaseline-rule.html#cfn-ssm-patchbaseline-rule-compliancelevel>
                  RuleProperty -> Maybe (Value Text)
complianceLevel :: (Prelude.Maybe (Value Prelude.Text)),
                  -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ssm-patchbaseline-rule.html#cfn-ssm-patchbaseline-rule-enablenonsecurity>
                  RuleProperty -> Maybe (Value Bool)
enableNonSecurity :: (Prelude.Maybe (Value Prelude.Bool)),
                  -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ssm-patchbaseline-rule.html#cfn-ssm-patchbaseline-rule-patchfiltergroup>
                  RuleProperty -> Maybe PatchFilterGroupProperty
patchFilterGroup :: (Prelude.Maybe PatchFilterGroupProperty)}
  deriving stock (RuleProperty -> RuleProperty -> Bool
(RuleProperty -> RuleProperty -> Bool)
-> (RuleProperty -> RuleProperty -> Bool) -> Eq RuleProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: RuleProperty -> RuleProperty -> Bool
== :: RuleProperty -> RuleProperty -> Bool
$c/= :: RuleProperty -> RuleProperty -> Bool
/= :: RuleProperty -> RuleProperty -> Bool
Prelude.Eq, Int -> RuleProperty -> ShowS
[RuleProperty] -> ShowS
RuleProperty -> String
(Int -> RuleProperty -> ShowS)
-> (RuleProperty -> String)
-> ([RuleProperty] -> ShowS)
-> Show RuleProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> RuleProperty -> ShowS
showsPrec :: Int -> RuleProperty -> ShowS
$cshow :: RuleProperty -> String
show :: RuleProperty -> String
$cshowList :: [RuleProperty] -> ShowS
showList :: [RuleProperty] -> ShowS
Prelude.Show)
mkRuleProperty :: RuleProperty
mkRuleProperty :: RuleProperty
mkRuleProperty
  = RuleProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), approveAfterDays :: Maybe (Value Integer)
approveAfterDays = Maybe (Value Integer)
forall a. Maybe a
Prelude.Nothing,
       approveUntilDate :: Maybe (Value Text)
approveUntilDate = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       complianceLevel :: Maybe (Value Text)
complianceLevel = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       enableNonSecurity :: Maybe (Value Bool)
enableNonSecurity = Maybe (Value Bool)
forall a. Maybe a
Prelude.Nothing,
       patchFilterGroup :: Maybe PatchFilterGroupProperty
patchFilterGroup = Maybe PatchFilterGroupProperty
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties RuleProperty where
  toResourceProperties :: RuleProperty -> ResourceProperties
toResourceProperties RuleProperty {Maybe (Value Bool)
Maybe (Value Integer)
Maybe (Value Text)
Maybe PatchFilterGroupProperty
()
haddock_workaround_ :: RuleProperty -> ()
approveAfterDays :: RuleProperty -> Maybe (Value Integer)
approveUntilDate :: RuleProperty -> Maybe (Value Text)
complianceLevel :: RuleProperty -> Maybe (Value Text)
enableNonSecurity :: RuleProperty -> Maybe (Value Bool)
patchFilterGroup :: RuleProperty -> Maybe PatchFilterGroupProperty
haddock_workaround_ :: ()
approveAfterDays :: Maybe (Value Integer)
approveUntilDate :: Maybe (Value Text)
complianceLevel :: Maybe (Value Text)
enableNonSecurity :: Maybe (Value Bool)
patchFilterGroup :: Maybe PatchFilterGroupProperty
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::SSM::PatchBaseline.Rule",
         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 -> Value Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"ApproveAfterDays" (Value Integer -> (Key, Value))
-> Maybe (Value Integer) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Integer)
approveAfterDays,
                            Key -> Value 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
"ApproveUntilDate" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
approveUntilDate,
                            Key -> Value 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
"ComplianceLevel" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
complianceLevel,
                            Key -> Value Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"EnableNonSecurity" (Value Bool -> (Key, Value))
-> Maybe (Value Bool) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Bool)
enableNonSecurity,
                            Key -> PatchFilterGroupProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"PatchFilterGroup" (PatchFilterGroupProperty -> (Key, Value))
-> Maybe PatchFilterGroupProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe PatchFilterGroupProperty
patchFilterGroup])}
instance JSON.ToJSON RuleProperty where
  toJSON :: RuleProperty -> Value
toJSON RuleProperty {Maybe (Value Bool)
Maybe (Value Integer)
Maybe (Value Text)
Maybe PatchFilterGroupProperty
()
haddock_workaround_ :: RuleProperty -> ()
approveAfterDays :: RuleProperty -> Maybe (Value Integer)
approveUntilDate :: RuleProperty -> Maybe (Value Text)
complianceLevel :: RuleProperty -> Maybe (Value Text)
enableNonSecurity :: RuleProperty -> Maybe (Value Bool)
patchFilterGroup :: RuleProperty -> Maybe PatchFilterGroupProperty
haddock_workaround_ :: ()
approveAfterDays :: Maybe (Value Integer)
approveUntilDate :: Maybe (Value Text)
complianceLevel :: Maybe (Value Text)
enableNonSecurity :: Maybe (Value Bool)
patchFilterGroup :: Maybe PatchFilterGroupProperty
..}
    = [(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 -> Value Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"ApproveAfterDays" (Value Integer -> (Key, Value))
-> Maybe (Value Integer) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Integer)
approveAfterDays,
               Key -> Value 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
"ApproveUntilDate" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
approveUntilDate,
               Key -> Value 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
"ComplianceLevel" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
complianceLevel,
               Key -> Value Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"EnableNonSecurity" (Value Bool -> (Key, Value))
-> Maybe (Value Bool) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Bool)
enableNonSecurity,
               Key -> PatchFilterGroupProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"PatchFilterGroup" (PatchFilterGroupProperty -> (Key, Value))
-> Maybe PatchFilterGroupProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe PatchFilterGroupProperty
patchFilterGroup]))
instance Property "ApproveAfterDays" RuleProperty where
  type PropertyType "ApproveAfterDays" RuleProperty = Value Prelude.Integer
  set :: PropertyType "ApproveAfterDays" RuleProperty
-> RuleProperty -> RuleProperty
set PropertyType "ApproveAfterDays" RuleProperty
newValue RuleProperty {Maybe (Value Bool)
Maybe (Value Integer)
Maybe (Value Text)
Maybe PatchFilterGroupProperty
()
haddock_workaround_ :: RuleProperty -> ()
approveAfterDays :: RuleProperty -> Maybe (Value Integer)
approveUntilDate :: RuleProperty -> Maybe (Value Text)
complianceLevel :: RuleProperty -> Maybe (Value Text)
enableNonSecurity :: RuleProperty -> Maybe (Value Bool)
patchFilterGroup :: RuleProperty -> Maybe PatchFilterGroupProperty
haddock_workaround_ :: ()
approveAfterDays :: Maybe (Value Integer)
approveUntilDate :: Maybe (Value Text)
complianceLevel :: Maybe (Value Text)
enableNonSecurity :: Maybe (Value Bool)
patchFilterGroup :: Maybe PatchFilterGroupProperty
..}
    = RuleProperty {approveAfterDays :: Maybe (Value Integer)
approveAfterDays = Value Integer -> Maybe (Value Integer)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ApproveAfterDays" RuleProperty
Value Integer
newValue, Maybe (Value Bool)
Maybe (Value Text)
Maybe PatchFilterGroupProperty
()
haddock_workaround_ :: ()
approveUntilDate :: Maybe (Value Text)
complianceLevel :: Maybe (Value Text)
enableNonSecurity :: Maybe (Value Bool)
patchFilterGroup :: Maybe PatchFilterGroupProperty
haddock_workaround_ :: ()
approveUntilDate :: Maybe (Value Text)
complianceLevel :: Maybe (Value Text)
enableNonSecurity :: Maybe (Value Bool)
patchFilterGroup :: Maybe PatchFilterGroupProperty
..}
instance Property "ApproveUntilDate" RuleProperty where
  type PropertyType "ApproveUntilDate" RuleProperty = Value Prelude.Text
  set :: PropertyType "ApproveUntilDate" RuleProperty
-> RuleProperty -> RuleProperty
set PropertyType "ApproveUntilDate" RuleProperty
newValue RuleProperty {Maybe (Value Bool)
Maybe (Value Integer)
Maybe (Value Text)
Maybe PatchFilterGroupProperty
()
haddock_workaround_ :: RuleProperty -> ()
approveAfterDays :: RuleProperty -> Maybe (Value Integer)
approveUntilDate :: RuleProperty -> Maybe (Value Text)
complianceLevel :: RuleProperty -> Maybe (Value Text)
enableNonSecurity :: RuleProperty -> Maybe (Value Bool)
patchFilterGroup :: RuleProperty -> Maybe PatchFilterGroupProperty
haddock_workaround_ :: ()
approveAfterDays :: Maybe (Value Integer)
approveUntilDate :: Maybe (Value Text)
complianceLevel :: Maybe (Value Text)
enableNonSecurity :: Maybe (Value Bool)
patchFilterGroup :: Maybe PatchFilterGroupProperty
..}
    = RuleProperty {approveUntilDate :: Maybe (Value Text)
approveUntilDate = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ApproveUntilDate" RuleProperty
Value Text
newValue, Maybe (Value Bool)
Maybe (Value Integer)
Maybe (Value Text)
Maybe PatchFilterGroupProperty
()
haddock_workaround_ :: ()
approveAfterDays :: Maybe (Value Integer)
complianceLevel :: Maybe (Value Text)
enableNonSecurity :: Maybe (Value Bool)
patchFilterGroup :: Maybe PatchFilterGroupProperty
haddock_workaround_ :: ()
approveAfterDays :: Maybe (Value Integer)
complianceLevel :: Maybe (Value Text)
enableNonSecurity :: Maybe (Value Bool)
patchFilterGroup :: Maybe PatchFilterGroupProperty
..}
instance Property "ComplianceLevel" RuleProperty where
  type PropertyType "ComplianceLevel" RuleProperty = Value Prelude.Text
  set :: PropertyType "ComplianceLevel" RuleProperty
-> RuleProperty -> RuleProperty
set PropertyType "ComplianceLevel" RuleProperty
newValue RuleProperty {Maybe (Value Bool)
Maybe (Value Integer)
Maybe (Value Text)
Maybe PatchFilterGroupProperty
()
haddock_workaround_ :: RuleProperty -> ()
approveAfterDays :: RuleProperty -> Maybe (Value Integer)
approveUntilDate :: RuleProperty -> Maybe (Value Text)
complianceLevel :: RuleProperty -> Maybe (Value Text)
enableNonSecurity :: RuleProperty -> Maybe (Value Bool)
patchFilterGroup :: RuleProperty -> Maybe PatchFilterGroupProperty
haddock_workaround_ :: ()
approveAfterDays :: Maybe (Value Integer)
approveUntilDate :: Maybe (Value Text)
complianceLevel :: Maybe (Value Text)
enableNonSecurity :: Maybe (Value Bool)
patchFilterGroup :: Maybe PatchFilterGroupProperty
..}
    = RuleProperty {complianceLevel :: Maybe (Value Text)
complianceLevel = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ComplianceLevel" RuleProperty
Value Text
newValue, Maybe (Value Bool)
Maybe (Value Integer)
Maybe (Value Text)
Maybe PatchFilterGroupProperty
()
haddock_workaround_ :: ()
approveAfterDays :: Maybe (Value Integer)
approveUntilDate :: Maybe (Value Text)
enableNonSecurity :: Maybe (Value Bool)
patchFilterGroup :: Maybe PatchFilterGroupProperty
haddock_workaround_ :: ()
approveAfterDays :: Maybe (Value Integer)
approveUntilDate :: Maybe (Value Text)
enableNonSecurity :: Maybe (Value Bool)
patchFilterGroup :: Maybe PatchFilterGroupProperty
..}
instance Property "EnableNonSecurity" RuleProperty where
  type PropertyType "EnableNonSecurity" RuleProperty = Value Prelude.Bool
  set :: PropertyType "EnableNonSecurity" RuleProperty
-> RuleProperty -> RuleProperty
set PropertyType "EnableNonSecurity" RuleProperty
newValue RuleProperty {Maybe (Value Bool)
Maybe (Value Integer)
Maybe (Value Text)
Maybe PatchFilterGroupProperty
()
haddock_workaround_ :: RuleProperty -> ()
approveAfterDays :: RuleProperty -> Maybe (Value Integer)
approveUntilDate :: RuleProperty -> Maybe (Value Text)
complianceLevel :: RuleProperty -> Maybe (Value Text)
enableNonSecurity :: RuleProperty -> Maybe (Value Bool)
patchFilterGroup :: RuleProperty -> Maybe PatchFilterGroupProperty
haddock_workaround_ :: ()
approveAfterDays :: Maybe (Value Integer)
approveUntilDate :: Maybe (Value Text)
complianceLevel :: Maybe (Value Text)
enableNonSecurity :: Maybe (Value Bool)
patchFilterGroup :: Maybe PatchFilterGroupProperty
..}
    = RuleProperty {enableNonSecurity :: Maybe (Value Bool)
enableNonSecurity = Value Bool -> Maybe (Value Bool)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "EnableNonSecurity" RuleProperty
Value Bool
newValue, Maybe (Value Integer)
Maybe (Value Text)
Maybe PatchFilterGroupProperty
()
haddock_workaround_ :: ()
approveAfterDays :: Maybe (Value Integer)
approveUntilDate :: Maybe (Value Text)
complianceLevel :: Maybe (Value Text)
patchFilterGroup :: Maybe PatchFilterGroupProperty
haddock_workaround_ :: ()
approveAfterDays :: Maybe (Value Integer)
approveUntilDate :: Maybe (Value Text)
complianceLevel :: Maybe (Value Text)
patchFilterGroup :: Maybe PatchFilterGroupProperty
..}
instance Property "PatchFilterGroup" RuleProperty where
  type PropertyType "PatchFilterGroup" RuleProperty = PatchFilterGroupProperty
  set :: PropertyType "PatchFilterGroup" RuleProperty
-> RuleProperty -> RuleProperty
set PropertyType "PatchFilterGroup" RuleProperty
newValue RuleProperty {Maybe (Value Bool)
Maybe (Value Integer)
Maybe (Value Text)
Maybe PatchFilterGroupProperty
()
haddock_workaround_ :: RuleProperty -> ()
approveAfterDays :: RuleProperty -> Maybe (Value Integer)
approveUntilDate :: RuleProperty -> Maybe (Value Text)
complianceLevel :: RuleProperty -> Maybe (Value Text)
enableNonSecurity :: RuleProperty -> Maybe (Value Bool)
patchFilterGroup :: RuleProperty -> Maybe PatchFilterGroupProperty
haddock_workaround_ :: ()
approveAfterDays :: Maybe (Value Integer)
approveUntilDate :: Maybe (Value Text)
complianceLevel :: Maybe (Value Text)
enableNonSecurity :: Maybe (Value Bool)
patchFilterGroup :: Maybe PatchFilterGroupProperty
..}
    = RuleProperty {patchFilterGroup :: Maybe PatchFilterGroupProperty
patchFilterGroup = PatchFilterGroupProperty -> Maybe PatchFilterGroupProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "PatchFilterGroup" RuleProperty
PatchFilterGroupProperty
newValue, Maybe (Value Bool)
Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: ()
approveAfterDays :: Maybe (Value Integer)
approveUntilDate :: Maybe (Value Text)
complianceLevel :: Maybe (Value Text)
enableNonSecurity :: Maybe (Value Bool)
haddock_workaround_ :: ()
approveAfterDays :: Maybe (Value Integer)
approveUntilDate :: Maybe (Value Text)
complianceLevel :: Maybe (Value Text)
enableNonSecurity :: Maybe (Value Bool)
..}