module Stratosphere.ApplicationAutoScaling.ScalingPolicy.PredefinedMetricSpecificationProperty (
        PredefinedMetricSpecificationProperty(..),
        mkPredefinedMetricSpecificationProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data PredefinedMetricSpecificationProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationautoscaling-scalingpolicy-predefinedmetricspecification.html>
    PredefinedMetricSpecificationProperty {PredefinedMetricSpecificationProperty -> ()
haddock_workaround_ :: (),
                                           -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationautoscaling-scalingpolicy-predefinedmetricspecification.html#cfn-applicationautoscaling-scalingpolicy-predefinedmetricspecification-predefinedmetrictype>
                                           PredefinedMetricSpecificationProperty -> Value Text
predefinedMetricType :: (Value Prelude.Text),
                                           -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationautoscaling-scalingpolicy-predefinedmetricspecification.html#cfn-applicationautoscaling-scalingpolicy-predefinedmetricspecification-resourcelabel>
                                           PredefinedMetricSpecificationProperty -> Maybe (Value Text)
resourceLabel :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (PredefinedMetricSpecificationProperty
-> PredefinedMetricSpecificationProperty -> Bool
(PredefinedMetricSpecificationProperty
 -> PredefinedMetricSpecificationProperty -> Bool)
-> (PredefinedMetricSpecificationProperty
    -> PredefinedMetricSpecificationProperty -> Bool)
-> Eq PredefinedMetricSpecificationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: PredefinedMetricSpecificationProperty
-> PredefinedMetricSpecificationProperty -> Bool
== :: PredefinedMetricSpecificationProperty
-> PredefinedMetricSpecificationProperty -> Bool
$c/= :: PredefinedMetricSpecificationProperty
-> PredefinedMetricSpecificationProperty -> Bool
/= :: PredefinedMetricSpecificationProperty
-> PredefinedMetricSpecificationProperty -> Bool
Prelude.Eq, Int -> PredefinedMetricSpecificationProperty -> ShowS
[PredefinedMetricSpecificationProperty] -> ShowS
PredefinedMetricSpecificationProperty -> String
(Int -> PredefinedMetricSpecificationProperty -> ShowS)
-> (PredefinedMetricSpecificationProperty -> String)
-> ([PredefinedMetricSpecificationProperty] -> ShowS)
-> Show PredefinedMetricSpecificationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> PredefinedMetricSpecificationProperty -> ShowS
showsPrec :: Int -> PredefinedMetricSpecificationProperty -> ShowS
$cshow :: PredefinedMetricSpecificationProperty -> String
show :: PredefinedMetricSpecificationProperty -> String
$cshowList :: [PredefinedMetricSpecificationProperty] -> ShowS
showList :: [PredefinedMetricSpecificationProperty] -> ShowS
Prelude.Show)
mkPredefinedMetricSpecificationProperty ::
  Value Prelude.Text -> PredefinedMetricSpecificationProperty
mkPredefinedMetricSpecificationProperty :: Value Text -> PredefinedMetricSpecificationProperty
mkPredefinedMetricSpecificationProperty Value Text
predefinedMetricType
  = PredefinedMetricSpecificationProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (),
       predefinedMetricType :: Value Text
predefinedMetricType = Value Text
predefinedMetricType,
       resourceLabel :: Maybe (Value Text)
resourceLabel = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties PredefinedMetricSpecificationProperty where
  toResourceProperties :: PredefinedMetricSpecificationProperty -> ResourceProperties
toResourceProperties PredefinedMetricSpecificationProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: PredefinedMetricSpecificationProperty -> ()
predefinedMetricType :: PredefinedMetricSpecificationProperty -> Value Text
resourceLabel :: PredefinedMetricSpecificationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
predefinedMetricType :: Value Text
resourceLabel :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::ApplicationAutoScaling::ScalingPolicy.PredefinedMetricSpecification",
         supportsTags :: Bool
supportsTags = Bool
Prelude.False,
         properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
                        ([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
                           [Key
"PredefinedMetricType" 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
predefinedMetricType]
                           ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                              [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
"ResourceLabel" (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)
resourceLabel]))}
instance JSON.ToJSON PredefinedMetricSpecificationProperty where
  toJSON :: PredefinedMetricSpecificationProperty -> Value
toJSON PredefinedMetricSpecificationProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: PredefinedMetricSpecificationProperty -> ()
predefinedMetricType :: PredefinedMetricSpecificationProperty -> Value Text
resourceLabel :: PredefinedMetricSpecificationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
predefinedMetricType :: Value Text
resourceLabel :: Maybe (Value Text)
..}
    = [(Key, Value)] -> Value
JSON.object
        ([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
           ([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
              [Key
"PredefinedMetricType" 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
predefinedMetricType]
              ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                 [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
"ResourceLabel" (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)
resourceLabel])))
instance Property "PredefinedMetricType" PredefinedMetricSpecificationProperty where
  type PropertyType "PredefinedMetricType" PredefinedMetricSpecificationProperty = Value Prelude.Text
  set :: PropertyType
  "PredefinedMetricType" PredefinedMetricSpecificationProperty
-> PredefinedMetricSpecificationProperty
-> PredefinedMetricSpecificationProperty
set PropertyType
  "PredefinedMetricType" PredefinedMetricSpecificationProperty
newValue PredefinedMetricSpecificationProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: PredefinedMetricSpecificationProperty -> ()
predefinedMetricType :: PredefinedMetricSpecificationProperty -> Value Text
resourceLabel :: PredefinedMetricSpecificationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
predefinedMetricType :: Value Text
resourceLabel :: Maybe (Value Text)
..}
    = PredefinedMetricSpecificationProperty
        {predefinedMetricType :: Value Text
predefinedMetricType = PropertyType
  "PredefinedMetricType" PredefinedMetricSpecificationProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
resourceLabel :: Maybe (Value Text)
haddock_workaround_ :: ()
resourceLabel :: Maybe (Value Text)
..}
instance Property "ResourceLabel" PredefinedMetricSpecificationProperty where
  type PropertyType "ResourceLabel" PredefinedMetricSpecificationProperty = Value Prelude.Text
  set :: PropertyType "ResourceLabel" PredefinedMetricSpecificationProperty
-> PredefinedMetricSpecificationProperty
-> PredefinedMetricSpecificationProperty
set PropertyType "ResourceLabel" PredefinedMetricSpecificationProperty
newValue PredefinedMetricSpecificationProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: PredefinedMetricSpecificationProperty -> ()
predefinedMetricType :: PredefinedMetricSpecificationProperty -> Value Text
resourceLabel :: PredefinedMetricSpecificationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
predefinedMetricType :: Value Text
resourceLabel :: Maybe (Value Text)
..}
    = PredefinedMetricSpecificationProperty
        {resourceLabel :: Maybe (Value Text)
resourceLabel = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ResourceLabel" PredefinedMetricSpecificationProperty
Value Text
newValue, ()
Value Text
haddock_workaround_ :: ()
predefinedMetricType :: Value Text
haddock_workaround_ :: ()
predefinedMetricType :: Value Text
..}