module Stratosphere.DLM.LifecyclePolicy.CreateRuleProperty ( module Exports, CreateRuleProperty(..), mkCreateRuleProperty ) where import qualified Data.Aeson as JSON import qualified Stratosphere.Prelude as Prelude import Stratosphere.Property import {-# SOURCE #-} Stratosphere.DLM.LifecyclePolicy.ScriptProperty as Exports import Stratosphere.ResourceProperties import Stratosphere.Value data CreateRuleProperty = -- | See: CreateRuleProperty {haddock_workaround_ :: (), -- | See: cronExpression :: (Prelude.Maybe (Value Prelude.Text)), -- | See: interval :: (Prelude.Maybe (Value Prelude.Integer)), -- | See: intervalUnit :: (Prelude.Maybe (Value Prelude.Text)), -- | See: location :: (Prelude.Maybe (Value Prelude.Text)), -- | See: scripts :: (Prelude.Maybe [ScriptProperty]), -- | See: times :: (Prelude.Maybe (ValueList Prelude.Text))} deriving stock (Prelude.Eq, Prelude.Show) mkCreateRuleProperty :: CreateRuleProperty mkCreateRuleProperty = CreateRuleProperty {haddock_workaround_ = (), cronExpression = Prelude.Nothing, interval = Prelude.Nothing, intervalUnit = Prelude.Nothing, location = Prelude.Nothing, scripts = Prelude.Nothing, times = Prelude.Nothing} instance ToResourceProperties CreateRuleProperty where toResourceProperties CreateRuleProperty {..} = ResourceProperties {awsType = "AWS::DLM::LifecyclePolicy.CreateRule", supportsTags = Prelude.False, properties = Prelude.fromList (Prelude.catMaybes [(JSON..=) "CronExpression" Prelude.<$> cronExpression, (JSON..=) "Interval" Prelude.<$> interval, (JSON..=) "IntervalUnit" Prelude.<$> intervalUnit, (JSON..=) "Location" Prelude.<$> location, (JSON..=) "Scripts" Prelude.<$> scripts, (JSON..=) "Times" Prelude.<$> times])} instance JSON.ToJSON CreateRuleProperty where toJSON CreateRuleProperty {..} = JSON.object (Prelude.fromList (Prelude.catMaybes [(JSON..=) "CronExpression" Prelude.<$> cronExpression, (JSON..=) "Interval" Prelude.<$> interval, (JSON..=) "IntervalUnit" Prelude.<$> intervalUnit, (JSON..=) "Location" Prelude.<$> location, (JSON..=) "Scripts" Prelude.<$> scripts, (JSON..=) "Times" Prelude.<$> times])) instance Property "CronExpression" CreateRuleProperty where type PropertyType "CronExpression" CreateRuleProperty = Value Prelude.Text set newValue CreateRuleProperty {..} = CreateRuleProperty {cronExpression = Prelude.pure newValue, ..} instance Property "Interval" CreateRuleProperty where type PropertyType "Interval" CreateRuleProperty = Value Prelude.Integer set newValue CreateRuleProperty {..} = CreateRuleProperty {interval = Prelude.pure newValue, ..} instance Property "IntervalUnit" CreateRuleProperty where type PropertyType "IntervalUnit" CreateRuleProperty = Value Prelude.Text set newValue CreateRuleProperty {..} = CreateRuleProperty {intervalUnit = Prelude.pure newValue, ..} instance Property "Location" CreateRuleProperty where type PropertyType "Location" CreateRuleProperty = Value Prelude.Text set newValue CreateRuleProperty {..} = CreateRuleProperty {location = Prelude.pure newValue, ..} instance Property "Scripts" CreateRuleProperty where type PropertyType "Scripts" CreateRuleProperty = [ScriptProperty] set newValue CreateRuleProperty {..} = CreateRuleProperty {scripts = Prelude.pure newValue, ..} instance Property "Times" CreateRuleProperty where type PropertyType "Times" CreateRuleProperty = ValueList Prelude.Text set newValue CreateRuleProperty {..} = CreateRuleProperty {times = Prelude.pure newValue, ..}