module Stratosphere.CodeBuild.Fleet.TargetTrackingScalingConfigurationProperty (
        TargetTrackingScalingConfigurationProperty(..),
        mkTargetTrackingScalingConfigurationProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data TargetTrackingScalingConfigurationProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-fleet-targettrackingscalingconfiguration.html>
    TargetTrackingScalingConfigurationProperty {TargetTrackingScalingConfigurationProperty -> ()
haddock_workaround_ :: (),
                                                -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-fleet-targettrackingscalingconfiguration.html#cfn-codebuild-fleet-targettrackingscalingconfiguration-metrictype>
                                                TargetTrackingScalingConfigurationProperty -> Maybe (Value Text)
metricType :: (Prelude.Maybe (Value Prelude.Text)),
                                                -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-fleet-targettrackingscalingconfiguration.html#cfn-codebuild-fleet-targettrackingscalingconfiguration-targetvalue>
                                                TargetTrackingScalingConfigurationProperty -> Maybe (Value Double)
targetValue :: (Prelude.Maybe (Value Prelude.Double))}
  deriving stock (TargetTrackingScalingConfigurationProperty
-> TargetTrackingScalingConfigurationProperty -> Bool
(TargetTrackingScalingConfigurationProperty
 -> TargetTrackingScalingConfigurationProperty -> Bool)
-> (TargetTrackingScalingConfigurationProperty
    -> TargetTrackingScalingConfigurationProperty -> Bool)
-> Eq TargetTrackingScalingConfigurationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: TargetTrackingScalingConfigurationProperty
-> TargetTrackingScalingConfigurationProperty -> Bool
== :: TargetTrackingScalingConfigurationProperty
-> TargetTrackingScalingConfigurationProperty -> Bool
$c/= :: TargetTrackingScalingConfigurationProperty
-> TargetTrackingScalingConfigurationProperty -> Bool
/= :: TargetTrackingScalingConfigurationProperty
-> TargetTrackingScalingConfigurationProperty -> Bool
Prelude.Eq, Int -> TargetTrackingScalingConfigurationProperty -> ShowS
[TargetTrackingScalingConfigurationProperty] -> ShowS
TargetTrackingScalingConfigurationProperty -> String
(Int -> TargetTrackingScalingConfigurationProperty -> ShowS)
-> (TargetTrackingScalingConfigurationProperty -> String)
-> ([TargetTrackingScalingConfigurationProperty] -> ShowS)
-> Show TargetTrackingScalingConfigurationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> TargetTrackingScalingConfigurationProperty -> ShowS
showsPrec :: Int -> TargetTrackingScalingConfigurationProperty -> ShowS
$cshow :: TargetTrackingScalingConfigurationProperty -> String
show :: TargetTrackingScalingConfigurationProperty -> String
$cshowList :: [TargetTrackingScalingConfigurationProperty] -> ShowS
showList :: [TargetTrackingScalingConfigurationProperty] -> ShowS
Prelude.Show)
mkTargetTrackingScalingConfigurationProperty ::
  TargetTrackingScalingConfigurationProperty
mkTargetTrackingScalingConfigurationProperty :: TargetTrackingScalingConfigurationProperty
mkTargetTrackingScalingConfigurationProperty
  = TargetTrackingScalingConfigurationProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), metricType :: Maybe (Value Text)
metricType = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       targetValue :: Maybe (Value Double)
targetValue = Maybe (Value Double)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties TargetTrackingScalingConfigurationProperty where
  toResourceProperties :: TargetTrackingScalingConfigurationProperty -> ResourceProperties
toResourceProperties
    TargetTrackingScalingConfigurationProperty {Maybe (Value Double)
Maybe (Value Text)
()
haddock_workaround_ :: TargetTrackingScalingConfigurationProperty -> ()
metricType :: TargetTrackingScalingConfigurationProperty -> Maybe (Value Text)
targetValue :: TargetTrackingScalingConfigurationProperty -> Maybe (Value Double)
haddock_workaround_ :: ()
metricType :: Maybe (Value Text)
targetValue :: Maybe (Value Double)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::CodeBuild::Fleet.TargetTrackingScalingConfiguration",
         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 -> 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
"MetricType" (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)
metricType,
                            Key -> Value Double -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"TargetValue" (Value Double -> (Key, Value))
-> Maybe (Value Double) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Double)
targetValue])}
instance JSON.ToJSON TargetTrackingScalingConfigurationProperty where
  toJSON :: TargetTrackingScalingConfigurationProperty -> Value
toJSON TargetTrackingScalingConfigurationProperty {Maybe (Value Double)
Maybe (Value Text)
()
haddock_workaround_ :: TargetTrackingScalingConfigurationProperty -> ()
metricType :: TargetTrackingScalingConfigurationProperty -> Maybe (Value Text)
targetValue :: TargetTrackingScalingConfigurationProperty -> Maybe (Value Double)
haddock_workaround_ :: ()
metricType :: Maybe (Value Text)
targetValue :: Maybe (Value Double)
..}
    = [(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 -> 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
"MetricType" (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)
metricType,
               Key -> Value Double -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"TargetValue" (Value Double -> (Key, Value))
-> Maybe (Value Double) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Double)
targetValue]))
instance Property "MetricType" TargetTrackingScalingConfigurationProperty where
  type PropertyType "MetricType" TargetTrackingScalingConfigurationProperty = Value Prelude.Text
  set :: PropertyType
  "MetricType" TargetTrackingScalingConfigurationProperty
-> TargetTrackingScalingConfigurationProperty
-> TargetTrackingScalingConfigurationProperty
set PropertyType
  "MetricType" TargetTrackingScalingConfigurationProperty
newValue TargetTrackingScalingConfigurationProperty {Maybe (Value Double)
Maybe (Value Text)
()
haddock_workaround_ :: TargetTrackingScalingConfigurationProperty -> ()
metricType :: TargetTrackingScalingConfigurationProperty -> Maybe (Value Text)
targetValue :: TargetTrackingScalingConfigurationProperty -> Maybe (Value Double)
haddock_workaround_ :: ()
metricType :: Maybe (Value Text)
targetValue :: Maybe (Value Double)
..}
    = TargetTrackingScalingConfigurationProperty
        {metricType :: Maybe (Value Text)
metricType = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType
  "MetricType" TargetTrackingScalingConfigurationProperty
Value Text
newValue, Maybe (Value Double)
()
haddock_workaround_ :: ()
targetValue :: Maybe (Value Double)
haddock_workaround_ :: ()
targetValue :: Maybe (Value Double)
..}
instance Property "TargetValue" TargetTrackingScalingConfigurationProperty where
  type PropertyType "TargetValue" TargetTrackingScalingConfigurationProperty = Value Prelude.Double
  set :: PropertyType
  "TargetValue" TargetTrackingScalingConfigurationProperty
-> TargetTrackingScalingConfigurationProperty
-> TargetTrackingScalingConfigurationProperty
set PropertyType
  "TargetValue" TargetTrackingScalingConfigurationProperty
newValue TargetTrackingScalingConfigurationProperty {Maybe (Value Double)
Maybe (Value Text)
()
haddock_workaround_ :: TargetTrackingScalingConfigurationProperty -> ()
metricType :: TargetTrackingScalingConfigurationProperty -> Maybe (Value Text)
targetValue :: TargetTrackingScalingConfigurationProperty -> Maybe (Value Double)
haddock_workaround_ :: ()
metricType :: Maybe (Value Text)
targetValue :: Maybe (Value Double)
..}
    = TargetTrackingScalingConfigurationProperty
        {targetValue :: Maybe (Value Double)
targetValue = Value Double -> Maybe (Value Double)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType
  "TargetValue" TargetTrackingScalingConfigurationProperty
Value Double
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
metricType :: Maybe (Value Text)
haddock_workaround_ :: ()
metricType :: Maybe (Value Text)
..}