module Stratosphere.ECS.TaskSet.ScaleProperty (
        ScaleProperty(..), mkScaleProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data ScaleProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-taskset-scale.html>
    ScaleProperty {ScaleProperty -> ()
haddock_workaround_ :: (),
                   -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-taskset-scale.html#cfn-ecs-taskset-scale-unit>
                   ScaleProperty -> Maybe (Value Text)
unit :: (Prelude.Maybe (Value Prelude.Text)),
                   -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-taskset-scale.html#cfn-ecs-taskset-scale-value>
                   ScaleProperty -> Maybe (Value Double)
value :: (Prelude.Maybe (Value Prelude.Double))}
  deriving stock (ScaleProperty -> ScaleProperty -> Bool
(ScaleProperty -> ScaleProperty -> Bool)
-> (ScaleProperty -> ScaleProperty -> Bool) -> Eq ScaleProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ScaleProperty -> ScaleProperty -> Bool
== :: ScaleProperty -> ScaleProperty -> Bool
$c/= :: ScaleProperty -> ScaleProperty -> Bool
/= :: ScaleProperty -> ScaleProperty -> Bool
Prelude.Eq, Int -> ScaleProperty -> ShowS
[ScaleProperty] -> ShowS
ScaleProperty -> String
(Int -> ScaleProperty -> ShowS)
-> (ScaleProperty -> String)
-> ([ScaleProperty] -> ShowS)
-> Show ScaleProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ScaleProperty -> ShowS
showsPrec :: Int -> ScaleProperty -> ShowS
$cshow :: ScaleProperty -> String
show :: ScaleProperty -> String
$cshowList :: [ScaleProperty] -> ShowS
showList :: [ScaleProperty] -> ShowS
Prelude.Show)
mkScaleProperty :: ScaleProperty
mkScaleProperty :: ScaleProperty
mkScaleProperty
  = ScaleProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), unit :: Maybe (Value Text)
unit = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       value :: Maybe (Value Double)
value = Maybe (Value Double)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ScaleProperty where
  toResourceProperties :: ScaleProperty -> ResourceProperties
toResourceProperties ScaleProperty {Maybe (Value Double)
Maybe (Value Text)
()
haddock_workaround_ :: ScaleProperty -> ()
unit :: ScaleProperty -> Maybe (Value Text)
value :: ScaleProperty -> Maybe (Value Double)
haddock_workaround_ :: ()
unit :: Maybe (Value Text)
value :: Maybe (Value Double)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::ECS::TaskSet.Scale", 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
"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,
                            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
"Value" (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)
value])}
instance JSON.ToJSON ScaleProperty where
  toJSON :: ScaleProperty -> Value
toJSON ScaleProperty {Maybe (Value Double)
Maybe (Value Text)
()
haddock_workaround_ :: ScaleProperty -> ()
unit :: ScaleProperty -> Maybe (Value Text)
value :: ScaleProperty -> Maybe (Value Double)
haddock_workaround_ :: ()
unit :: Maybe (Value Text)
value :: 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
"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,
               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
"Value" (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)
value]))
instance Property "Unit" ScaleProperty where
  type PropertyType "Unit" ScaleProperty = Value Prelude.Text
  set :: PropertyType "Unit" ScaleProperty -> ScaleProperty -> ScaleProperty
set PropertyType "Unit" ScaleProperty
newValue ScaleProperty {Maybe (Value Double)
Maybe (Value Text)
()
haddock_workaround_ :: ScaleProperty -> ()
unit :: ScaleProperty -> Maybe (Value Text)
value :: ScaleProperty -> Maybe (Value Double)
haddock_workaround_ :: ()
unit :: Maybe (Value Text)
value :: Maybe (Value Double)
..}
    = ScaleProperty {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" ScaleProperty
Value Text
newValue, Maybe (Value Double)
()
haddock_workaround_ :: ()
value :: Maybe (Value Double)
haddock_workaround_ :: ()
value :: Maybe (Value Double)
..}
instance Property "Value" ScaleProperty where
  type PropertyType "Value" ScaleProperty = Value Prelude.Double
  set :: PropertyType "Value" ScaleProperty
-> ScaleProperty -> ScaleProperty
set PropertyType "Value" ScaleProperty
newValue ScaleProperty {Maybe (Value Double)
Maybe (Value Text)
()
haddock_workaround_ :: ScaleProperty -> ()
unit :: ScaleProperty -> Maybe (Value Text)
value :: ScaleProperty -> Maybe (Value Double)
haddock_workaround_ :: ()
unit :: Maybe (Value Text)
value :: Maybe (Value Double)
..}
    = ScaleProperty {value :: Maybe (Value Double)
value = Value Double -> Maybe (Value Double)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Value" ScaleProperty
Value Double
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
unit :: Maybe (Value Text)
haddock_workaround_ :: ()
unit :: Maybe (Value Text)
..}