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