module Stratosphere.ECS.Service.LinearConfigurationProperty (
        LinearConfigurationProperty(..), mkLinearConfigurationProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data LinearConfigurationProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-service-linearconfiguration.html>
    LinearConfigurationProperty {LinearConfigurationProperty -> ()
haddock_workaround_ :: (),
                                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-service-linearconfiguration.html#cfn-ecs-service-linearconfiguration-stepbaketimeinminutes>
                                 LinearConfigurationProperty -> Maybe (Value Integer)
stepBakeTimeInMinutes :: (Prelude.Maybe (Value Prelude.Integer)),
                                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-service-linearconfiguration.html#cfn-ecs-service-linearconfiguration-steppercent>
                                 LinearConfigurationProperty -> Maybe (Value Double)
stepPercent :: (Prelude.Maybe (Value Prelude.Double))}
  deriving stock (LinearConfigurationProperty -> LinearConfigurationProperty -> Bool
(LinearConfigurationProperty
 -> LinearConfigurationProperty -> Bool)
-> (LinearConfigurationProperty
    -> LinearConfigurationProperty -> Bool)
-> Eq LinearConfigurationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: LinearConfigurationProperty -> LinearConfigurationProperty -> Bool
== :: LinearConfigurationProperty -> LinearConfigurationProperty -> Bool
$c/= :: LinearConfigurationProperty -> LinearConfigurationProperty -> Bool
/= :: LinearConfigurationProperty -> LinearConfigurationProperty -> Bool
Prelude.Eq, Int -> LinearConfigurationProperty -> ShowS
[LinearConfigurationProperty] -> ShowS
LinearConfigurationProperty -> String
(Int -> LinearConfigurationProperty -> ShowS)
-> (LinearConfigurationProperty -> String)
-> ([LinearConfigurationProperty] -> ShowS)
-> Show LinearConfigurationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> LinearConfigurationProperty -> ShowS
showsPrec :: Int -> LinearConfigurationProperty -> ShowS
$cshow :: LinearConfigurationProperty -> String
show :: LinearConfigurationProperty -> String
$cshowList :: [LinearConfigurationProperty] -> ShowS
showList :: [LinearConfigurationProperty] -> ShowS
Prelude.Show)
mkLinearConfigurationProperty :: LinearConfigurationProperty
mkLinearConfigurationProperty :: LinearConfigurationProperty
mkLinearConfigurationProperty
  = LinearConfigurationProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), stepBakeTimeInMinutes :: Maybe (Value Integer)
stepBakeTimeInMinutes = Maybe (Value Integer)
forall a. Maybe a
Prelude.Nothing,
       stepPercent :: Maybe (Value Double)
stepPercent = Maybe (Value Double)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties LinearConfigurationProperty where
  toResourceProperties :: LinearConfigurationProperty -> ResourceProperties
toResourceProperties LinearConfigurationProperty {Maybe (Value Double)
Maybe (Value Integer)
()
haddock_workaround_ :: LinearConfigurationProperty -> ()
stepBakeTimeInMinutes :: LinearConfigurationProperty -> Maybe (Value Integer)
stepPercent :: LinearConfigurationProperty -> Maybe (Value Double)
haddock_workaround_ :: ()
stepBakeTimeInMinutes :: Maybe (Value Integer)
stepPercent :: Maybe (Value Double)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::ECS::Service.LinearConfiguration",
         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 Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"StepBakeTimeInMinutes"
                              (Value Integer -> (Key, Value))
-> Maybe (Value Integer) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Integer)
stepBakeTimeInMinutes,
                            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
"StepPercent" (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)
stepPercent])}
instance JSON.ToJSON LinearConfigurationProperty where
  toJSON :: LinearConfigurationProperty -> Value
toJSON LinearConfigurationProperty {Maybe (Value Double)
Maybe (Value Integer)
()
haddock_workaround_ :: LinearConfigurationProperty -> ()
stepBakeTimeInMinutes :: LinearConfigurationProperty -> Maybe (Value Integer)
stepPercent :: LinearConfigurationProperty -> Maybe (Value Double)
haddock_workaround_ :: ()
stepBakeTimeInMinutes :: Maybe (Value Integer)
stepPercent :: 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 Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"StepBakeTimeInMinutes"
                 (Value Integer -> (Key, Value))
-> Maybe (Value Integer) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Integer)
stepBakeTimeInMinutes,
               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
"StepPercent" (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)
stepPercent]))
instance Property "StepBakeTimeInMinutes" LinearConfigurationProperty where
  type PropertyType "StepBakeTimeInMinutes" LinearConfigurationProperty = Value Prelude.Integer
  set :: PropertyType "StepBakeTimeInMinutes" LinearConfigurationProperty
-> LinearConfigurationProperty -> LinearConfigurationProperty
set PropertyType "StepBakeTimeInMinutes" LinearConfigurationProperty
newValue LinearConfigurationProperty {Maybe (Value Double)
Maybe (Value Integer)
()
haddock_workaround_ :: LinearConfigurationProperty -> ()
stepBakeTimeInMinutes :: LinearConfigurationProperty -> Maybe (Value Integer)
stepPercent :: LinearConfigurationProperty -> Maybe (Value Double)
haddock_workaround_ :: ()
stepBakeTimeInMinutes :: Maybe (Value Integer)
stepPercent :: Maybe (Value Double)
..}
    = LinearConfigurationProperty
        {stepBakeTimeInMinutes :: Maybe (Value Integer)
stepBakeTimeInMinutes = Value Integer -> Maybe (Value Integer)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "StepBakeTimeInMinutes" LinearConfigurationProperty
Value Integer
newValue, Maybe (Value Double)
()
haddock_workaround_ :: ()
stepPercent :: Maybe (Value Double)
haddock_workaround_ :: ()
stepPercent :: Maybe (Value Double)
..}
instance Property "StepPercent" LinearConfigurationProperty where
  type PropertyType "StepPercent" LinearConfigurationProperty = Value Prelude.Double
  set :: PropertyType "StepPercent" LinearConfigurationProperty
-> LinearConfigurationProperty -> LinearConfigurationProperty
set PropertyType "StepPercent" LinearConfigurationProperty
newValue LinearConfigurationProperty {Maybe (Value Double)
Maybe (Value Integer)
()
haddock_workaround_ :: LinearConfigurationProperty -> ()
stepBakeTimeInMinutes :: LinearConfigurationProperty -> Maybe (Value Integer)
stepPercent :: LinearConfigurationProperty -> Maybe (Value Double)
haddock_workaround_ :: ()
stepBakeTimeInMinutes :: Maybe (Value Integer)
stepPercent :: Maybe (Value Double)
..}
    = LinearConfigurationProperty
        {stepPercent :: Maybe (Value Double)
stepPercent = Value Double -> Maybe (Value Double)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "StepPercent" LinearConfigurationProperty
Value Double
newValue, Maybe (Value Integer)
()
haddock_workaround_ :: ()
stepBakeTimeInMinutes :: Maybe (Value Integer)
haddock_workaround_ :: ()
stepBakeTimeInMinutes :: Maybe (Value Integer)
..}