module Stratosphere.ApplicationAutoScaling.ScalingPolicy.TargetTrackingMetricStatProperty (
        module Exports, TargetTrackingMetricStatProperty(..),
        mkTargetTrackingMetricStatProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.ApplicationAutoScaling.ScalingPolicy.TargetTrackingMetricProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data TargetTrackingMetricStatProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationautoscaling-scalingpolicy-targettrackingmetricstat.html>
    TargetTrackingMetricStatProperty {TargetTrackingMetricStatProperty -> ()
haddock_workaround_ :: (),
                                      -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationautoscaling-scalingpolicy-targettrackingmetricstat.html#cfn-applicationautoscaling-scalingpolicy-targettrackingmetricstat-metric>
                                      TargetTrackingMetricStatProperty
-> Maybe TargetTrackingMetricProperty
metric :: (Prelude.Maybe TargetTrackingMetricProperty),
                                      -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationautoscaling-scalingpolicy-targettrackingmetricstat.html#cfn-applicationautoscaling-scalingpolicy-targettrackingmetricstat-stat>
                                      TargetTrackingMetricStatProperty -> Maybe (Value Text)
stat :: (Prelude.Maybe (Value Prelude.Text)),
                                      -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationautoscaling-scalingpolicy-targettrackingmetricstat.html#cfn-applicationautoscaling-scalingpolicy-targettrackingmetricstat-unit>
                                      TargetTrackingMetricStatProperty -> Maybe (Value Text)
unit :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (TargetTrackingMetricStatProperty
-> TargetTrackingMetricStatProperty -> Bool
(TargetTrackingMetricStatProperty
 -> TargetTrackingMetricStatProperty -> Bool)
-> (TargetTrackingMetricStatProperty
    -> TargetTrackingMetricStatProperty -> Bool)
-> Eq TargetTrackingMetricStatProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: TargetTrackingMetricStatProperty
-> TargetTrackingMetricStatProperty -> Bool
== :: TargetTrackingMetricStatProperty
-> TargetTrackingMetricStatProperty -> Bool
$c/= :: TargetTrackingMetricStatProperty
-> TargetTrackingMetricStatProperty -> Bool
/= :: TargetTrackingMetricStatProperty
-> TargetTrackingMetricStatProperty -> Bool
Prelude.Eq, Int -> TargetTrackingMetricStatProperty -> ShowS
[TargetTrackingMetricStatProperty] -> ShowS
TargetTrackingMetricStatProperty -> String
(Int -> TargetTrackingMetricStatProperty -> ShowS)
-> (TargetTrackingMetricStatProperty -> String)
-> ([TargetTrackingMetricStatProperty] -> ShowS)
-> Show TargetTrackingMetricStatProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> TargetTrackingMetricStatProperty -> ShowS
showsPrec :: Int -> TargetTrackingMetricStatProperty -> ShowS
$cshow :: TargetTrackingMetricStatProperty -> String
show :: TargetTrackingMetricStatProperty -> String
$cshowList :: [TargetTrackingMetricStatProperty] -> ShowS
showList :: [TargetTrackingMetricStatProperty] -> ShowS
Prelude.Show)
mkTargetTrackingMetricStatProperty ::
  TargetTrackingMetricStatProperty
mkTargetTrackingMetricStatProperty :: TargetTrackingMetricStatProperty
mkTargetTrackingMetricStatProperty
  = TargetTrackingMetricStatProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), metric :: Maybe TargetTrackingMetricProperty
metric = Maybe TargetTrackingMetricProperty
forall a. Maybe a
Prelude.Nothing,
       stat :: Maybe (Value Text)
stat = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, unit :: Maybe (Value Text)
unit = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties TargetTrackingMetricStatProperty where
  toResourceProperties :: TargetTrackingMetricStatProperty -> ResourceProperties
toResourceProperties TargetTrackingMetricStatProperty {Maybe (Value Text)
Maybe TargetTrackingMetricProperty
()
haddock_workaround_ :: TargetTrackingMetricStatProperty -> ()
metric :: TargetTrackingMetricStatProperty
-> Maybe TargetTrackingMetricProperty
stat :: TargetTrackingMetricStatProperty -> Maybe (Value Text)
unit :: TargetTrackingMetricStatProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
metric :: Maybe TargetTrackingMetricProperty
stat :: Maybe (Value Text)
unit :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::ApplicationAutoScaling::ScalingPolicy.TargetTrackingMetricStat",
         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 -> TargetTrackingMetricProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Metric" (TargetTrackingMetricProperty -> (Key, Value))
-> Maybe TargetTrackingMetricProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe TargetTrackingMetricProperty
metric,
                            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
"Stat" (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)
stat,
                            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
"Unit" (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)
unit])}
instance JSON.ToJSON TargetTrackingMetricStatProperty where
  toJSON :: TargetTrackingMetricStatProperty -> Value
toJSON TargetTrackingMetricStatProperty {Maybe (Value Text)
Maybe TargetTrackingMetricProperty
()
haddock_workaround_ :: TargetTrackingMetricStatProperty -> ()
metric :: TargetTrackingMetricStatProperty
-> Maybe TargetTrackingMetricProperty
stat :: TargetTrackingMetricStatProperty -> Maybe (Value Text)
unit :: TargetTrackingMetricStatProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
metric :: Maybe TargetTrackingMetricProperty
stat :: Maybe (Value Text)
unit :: Maybe (Value Text)
..}
    = [(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 -> TargetTrackingMetricProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Metric" (TargetTrackingMetricProperty -> (Key, Value))
-> Maybe TargetTrackingMetricProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe TargetTrackingMetricProperty
metric,
               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
"Stat" (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)
stat,
               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
"Unit" (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)
unit]))
instance Property "Metric" TargetTrackingMetricStatProperty where
  type PropertyType "Metric" TargetTrackingMetricStatProperty = TargetTrackingMetricProperty
  set :: PropertyType "Metric" TargetTrackingMetricStatProperty
-> TargetTrackingMetricStatProperty
-> TargetTrackingMetricStatProperty
set PropertyType "Metric" TargetTrackingMetricStatProperty
newValue TargetTrackingMetricStatProperty {Maybe (Value Text)
Maybe TargetTrackingMetricProperty
()
haddock_workaround_ :: TargetTrackingMetricStatProperty -> ()
metric :: TargetTrackingMetricStatProperty
-> Maybe TargetTrackingMetricProperty
stat :: TargetTrackingMetricStatProperty -> Maybe (Value Text)
unit :: TargetTrackingMetricStatProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
metric :: Maybe TargetTrackingMetricProperty
stat :: Maybe (Value Text)
unit :: Maybe (Value Text)
..}
    = TargetTrackingMetricStatProperty
        {metric :: Maybe TargetTrackingMetricProperty
metric = TargetTrackingMetricProperty -> Maybe TargetTrackingMetricProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Metric" TargetTrackingMetricStatProperty
TargetTrackingMetricProperty
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
stat :: Maybe (Value Text)
unit :: Maybe (Value Text)
haddock_workaround_ :: ()
stat :: Maybe (Value Text)
unit :: Maybe (Value Text)
..}
instance Property "Stat" TargetTrackingMetricStatProperty where
  type PropertyType "Stat" TargetTrackingMetricStatProperty = Value Prelude.Text
  set :: PropertyType "Stat" TargetTrackingMetricStatProperty
-> TargetTrackingMetricStatProperty
-> TargetTrackingMetricStatProperty
set PropertyType "Stat" TargetTrackingMetricStatProperty
newValue TargetTrackingMetricStatProperty {Maybe (Value Text)
Maybe TargetTrackingMetricProperty
()
haddock_workaround_ :: TargetTrackingMetricStatProperty -> ()
metric :: TargetTrackingMetricStatProperty
-> Maybe TargetTrackingMetricProperty
stat :: TargetTrackingMetricStatProperty -> Maybe (Value Text)
unit :: TargetTrackingMetricStatProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
metric :: Maybe TargetTrackingMetricProperty
stat :: Maybe (Value Text)
unit :: Maybe (Value Text)
..}
    = TargetTrackingMetricStatProperty
        {stat :: Maybe (Value Text)
stat = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Stat" TargetTrackingMetricStatProperty
Value Text
newValue, Maybe (Value Text)
Maybe TargetTrackingMetricProperty
()
haddock_workaround_ :: ()
metric :: Maybe TargetTrackingMetricProperty
unit :: Maybe (Value Text)
haddock_workaround_ :: ()
metric :: Maybe TargetTrackingMetricProperty
unit :: Maybe (Value Text)
..}
instance Property "Unit" TargetTrackingMetricStatProperty where
  type PropertyType "Unit" TargetTrackingMetricStatProperty = Value Prelude.Text
  set :: PropertyType "Unit" TargetTrackingMetricStatProperty
-> TargetTrackingMetricStatProperty
-> TargetTrackingMetricStatProperty
set PropertyType "Unit" TargetTrackingMetricStatProperty
newValue TargetTrackingMetricStatProperty {Maybe (Value Text)
Maybe TargetTrackingMetricProperty
()
haddock_workaround_ :: TargetTrackingMetricStatProperty -> ()
metric :: TargetTrackingMetricStatProperty
-> Maybe TargetTrackingMetricProperty
stat :: TargetTrackingMetricStatProperty -> Maybe (Value Text)
unit :: TargetTrackingMetricStatProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
metric :: Maybe TargetTrackingMetricProperty
stat :: Maybe (Value Text)
unit :: Maybe (Value Text)
..}
    = TargetTrackingMetricStatProperty
        {unit :: Maybe (Value Text)
unit = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Unit" TargetTrackingMetricStatProperty
Value Text
newValue, Maybe (Value Text)
Maybe TargetTrackingMetricProperty
()
haddock_workaround_ :: ()
metric :: Maybe TargetTrackingMetricProperty
stat :: Maybe (Value Text)
haddock_workaround_ :: ()
metric :: Maybe TargetTrackingMetricProperty
stat :: Maybe (Value Text)
..}