module Stratosphere.ApplicationSignals.ServiceLevelObjective.RollingIntervalProperty (
        RollingIntervalProperty(..), mkRollingIntervalProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data RollingIntervalProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationsignals-servicelevelobjective-rollinginterval.html>
    RollingIntervalProperty {RollingIntervalProperty -> ()
haddock_workaround_ :: (),
                             -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationsignals-servicelevelobjective-rollinginterval.html#cfn-applicationsignals-servicelevelobjective-rollinginterval-duration>
                             RollingIntervalProperty -> Value Integer
duration :: (Value Prelude.Integer),
                             -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationsignals-servicelevelobjective-rollinginterval.html#cfn-applicationsignals-servicelevelobjective-rollinginterval-durationunit>
                             RollingIntervalProperty -> Value Text
durationUnit :: (Value Prelude.Text)}
  deriving stock (RollingIntervalProperty -> RollingIntervalProperty -> Bool
(RollingIntervalProperty -> RollingIntervalProperty -> Bool)
-> (RollingIntervalProperty -> RollingIntervalProperty -> Bool)
-> Eq RollingIntervalProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: RollingIntervalProperty -> RollingIntervalProperty -> Bool
== :: RollingIntervalProperty -> RollingIntervalProperty -> Bool
$c/= :: RollingIntervalProperty -> RollingIntervalProperty -> Bool
/= :: RollingIntervalProperty -> RollingIntervalProperty -> Bool
Prelude.Eq, Int -> RollingIntervalProperty -> ShowS
[RollingIntervalProperty] -> ShowS
RollingIntervalProperty -> String
(Int -> RollingIntervalProperty -> ShowS)
-> (RollingIntervalProperty -> String)
-> ([RollingIntervalProperty] -> ShowS)
-> Show RollingIntervalProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> RollingIntervalProperty -> ShowS
showsPrec :: Int -> RollingIntervalProperty -> ShowS
$cshow :: RollingIntervalProperty -> String
show :: RollingIntervalProperty -> String
$cshowList :: [RollingIntervalProperty] -> ShowS
showList :: [RollingIntervalProperty] -> ShowS
Prelude.Show)
mkRollingIntervalProperty ::
  Value Prelude.Integer
  -> Value Prelude.Text -> RollingIntervalProperty
mkRollingIntervalProperty :: Value Integer -> Value Text -> RollingIntervalProperty
mkRollingIntervalProperty Value Integer
duration Value Text
durationUnit
  = RollingIntervalProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), duration :: Value Integer
duration = Value Integer
duration,
       durationUnit :: Value Text
durationUnit = Value Text
durationUnit}
instance ToResourceProperties RollingIntervalProperty where
  toResourceProperties :: RollingIntervalProperty -> ResourceProperties
toResourceProperties RollingIntervalProperty {()
Value Integer
Value Text
haddock_workaround_ :: RollingIntervalProperty -> ()
duration :: RollingIntervalProperty -> Value Integer
durationUnit :: RollingIntervalProperty -> Value Text
haddock_workaround_ :: ()
duration :: Value Integer
durationUnit :: Value Text
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::ApplicationSignals::ServiceLevelObjective.RollingInterval",
         supportsTags :: Bool
supportsTags = Bool
Prelude.False,
         properties :: Object
properties = [Key
"Duration" 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..= Value Integer
duration,
                       Key
"DurationUnit" 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..= Value Text
durationUnit]}
instance JSON.ToJSON RollingIntervalProperty where
  toJSON :: RollingIntervalProperty -> Value
toJSON RollingIntervalProperty {()
Value Integer
Value Text
haddock_workaround_ :: RollingIntervalProperty -> ()
duration :: RollingIntervalProperty -> Value Integer
durationUnit :: RollingIntervalProperty -> Value Text
haddock_workaround_ :: ()
duration :: Value Integer
durationUnit :: Value Text
..}
    = [(Key, Value)] -> Value
JSON.object
        [Key
"Duration" 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..= Value Integer
duration, Key
"DurationUnit" 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..= Value Text
durationUnit]
instance Property "Duration" RollingIntervalProperty where
  type PropertyType "Duration" RollingIntervalProperty = Value Prelude.Integer
  set :: PropertyType "Duration" RollingIntervalProperty
-> RollingIntervalProperty -> RollingIntervalProperty
set PropertyType "Duration" RollingIntervalProperty
newValue RollingIntervalProperty {()
Value Integer
Value Text
haddock_workaround_ :: RollingIntervalProperty -> ()
duration :: RollingIntervalProperty -> Value Integer
durationUnit :: RollingIntervalProperty -> Value Text
haddock_workaround_ :: ()
duration :: Value Integer
durationUnit :: Value Text
..}
    = RollingIntervalProperty {duration :: Value Integer
duration = PropertyType "Duration" RollingIntervalProperty
Value Integer
newValue, ()
Value Text
haddock_workaround_ :: ()
durationUnit :: Value Text
haddock_workaround_ :: ()
durationUnit :: Value Text
..}
instance Property "DurationUnit" RollingIntervalProperty where
  type PropertyType "DurationUnit" RollingIntervalProperty = Value Prelude.Text
  set :: PropertyType "DurationUnit" RollingIntervalProperty
-> RollingIntervalProperty -> RollingIntervalProperty
set PropertyType "DurationUnit" RollingIntervalProperty
newValue RollingIntervalProperty {()
Value Integer
Value Text
haddock_workaround_ :: RollingIntervalProperty -> ()
duration :: RollingIntervalProperty -> Value Integer
durationUnit :: RollingIntervalProperty -> Value Text
haddock_workaround_ :: ()
duration :: Value Integer
durationUnit :: Value Text
..}
    = RollingIntervalProperty {durationUnit :: Value Text
durationUnit = PropertyType "DurationUnit" RollingIntervalProperty
Value Text
newValue, ()
Value Integer
haddock_workaround_ :: ()
duration :: Value Integer
haddock_workaround_ :: ()
duration :: Value Integer
..}