module Stratosphere.ECS.Service.CanaryConfigurationProperty (
        CanaryConfigurationProperty(..), mkCanaryConfigurationProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data CanaryConfigurationProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-service-canaryconfiguration.html>
    CanaryConfigurationProperty {CanaryConfigurationProperty -> ()
haddock_workaround_ :: (),
                                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-service-canaryconfiguration.html#cfn-ecs-service-canaryconfiguration-canarybaketimeinminutes>
                                 CanaryConfigurationProperty -> Maybe (Value Integer)
canaryBakeTimeInMinutes :: (Prelude.Maybe (Value Prelude.Integer)),
                                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-service-canaryconfiguration.html#cfn-ecs-service-canaryconfiguration-canarypercent>
                                 CanaryConfigurationProperty -> Maybe (Value Double)
canaryPercent :: (Prelude.Maybe (Value Prelude.Double))}
  deriving stock (CanaryConfigurationProperty -> CanaryConfigurationProperty -> Bool
(CanaryConfigurationProperty
 -> CanaryConfigurationProperty -> Bool)
-> (CanaryConfigurationProperty
    -> CanaryConfigurationProperty -> Bool)
-> Eq CanaryConfigurationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: CanaryConfigurationProperty -> CanaryConfigurationProperty -> Bool
== :: CanaryConfigurationProperty -> CanaryConfigurationProperty -> Bool
$c/= :: CanaryConfigurationProperty -> CanaryConfigurationProperty -> Bool
/= :: CanaryConfigurationProperty -> CanaryConfigurationProperty -> Bool
Prelude.Eq, Int -> CanaryConfigurationProperty -> ShowS
[CanaryConfigurationProperty] -> ShowS
CanaryConfigurationProperty -> String
(Int -> CanaryConfigurationProperty -> ShowS)
-> (CanaryConfigurationProperty -> String)
-> ([CanaryConfigurationProperty] -> ShowS)
-> Show CanaryConfigurationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> CanaryConfigurationProperty -> ShowS
showsPrec :: Int -> CanaryConfigurationProperty -> ShowS
$cshow :: CanaryConfigurationProperty -> String
show :: CanaryConfigurationProperty -> String
$cshowList :: [CanaryConfigurationProperty] -> ShowS
showList :: [CanaryConfigurationProperty] -> ShowS
Prelude.Show)
mkCanaryConfigurationProperty :: CanaryConfigurationProperty
mkCanaryConfigurationProperty :: CanaryConfigurationProperty
mkCanaryConfigurationProperty
  = CanaryConfigurationProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (),
       canaryBakeTimeInMinutes :: Maybe (Value Integer)
canaryBakeTimeInMinutes = Maybe (Value Integer)
forall a. Maybe a
Prelude.Nothing,
       canaryPercent :: Maybe (Value Double)
canaryPercent = Maybe (Value Double)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties CanaryConfigurationProperty where
  toResourceProperties :: CanaryConfigurationProperty -> ResourceProperties
toResourceProperties CanaryConfigurationProperty {Maybe (Value Double)
Maybe (Value Integer)
()
haddock_workaround_ :: CanaryConfigurationProperty -> ()
canaryBakeTimeInMinutes :: CanaryConfigurationProperty -> Maybe (Value Integer)
canaryPercent :: CanaryConfigurationProperty -> Maybe (Value Double)
haddock_workaround_ :: ()
canaryBakeTimeInMinutes :: Maybe (Value Integer)
canaryPercent :: Maybe (Value Double)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::ECS::Service.CanaryConfiguration",
         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
"CanaryBakeTimeInMinutes"
                              (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)
canaryBakeTimeInMinutes,
                            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
"CanaryPercent" (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)
canaryPercent])}
instance JSON.ToJSON CanaryConfigurationProperty where
  toJSON :: CanaryConfigurationProperty -> Value
toJSON CanaryConfigurationProperty {Maybe (Value Double)
Maybe (Value Integer)
()
haddock_workaround_ :: CanaryConfigurationProperty -> ()
canaryBakeTimeInMinutes :: CanaryConfigurationProperty -> Maybe (Value Integer)
canaryPercent :: CanaryConfigurationProperty -> Maybe (Value Double)
haddock_workaround_ :: ()
canaryBakeTimeInMinutes :: Maybe (Value Integer)
canaryPercent :: 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
"CanaryBakeTimeInMinutes"
                 (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)
canaryBakeTimeInMinutes,
               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
"CanaryPercent" (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)
canaryPercent]))
instance Property "CanaryBakeTimeInMinutes" CanaryConfigurationProperty where
  type PropertyType "CanaryBakeTimeInMinutes" CanaryConfigurationProperty = Value Prelude.Integer
  set :: PropertyType "CanaryBakeTimeInMinutes" CanaryConfigurationProperty
-> CanaryConfigurationProperty -> CanaryConfigurationProperty
set PropertyType "CanaryBakeTimeInMinutes" CanaryConfigurationProperty
newValue CanaryConfigurationProperty {Maybe (Value Double)
Maybe (Value Integer)
()
haddock_workaround_ :: CanaryConfigurationProperty -> ()
canaryBakeTimeInMinutes :: CanaryConfigurationProperty -> Maybe (Value Integer)
canaryPercent :: CanaryConfigurationProperty -> Maybe (Value Double)
haddock_workaround_ :: ()
canaryBakeTimeInMinutes :: Maybe (Value Integer)
canaryPercent :: Maybe (Value Double)
..}
    = CanaryConfigurationProperty
        {canaryBakeTimeInMinutes :: Maybe (Value Integer)
canaryBakeTimeInMinutes = Value Integer -> Maybe (Value Integer)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "CanaryBakeTimeInMinutes" CanaryConfigurationProperty
Value Integer
newValue, Maybe (Value Double)
()
haddock_workaround_ :: ()
canaryPercent :: Maybe (Value Double)
haddock_workaround_ :: ()
canaryPercent :: Maybe (Value Double)
..}
instance Property "CanaryPercent" CanaryConfigurationProperty where
  type PropertyType "CanaryPercent" CanaryConfigurationProperty = Value Prelude.Double
  set :: PropertyType "CanaryPercent" CanaryConfigurationProperty
-> CanaryConfigurationProperty -> CanaryConfigurationProperty
set PropertyType "CanaryPercent" CanaryConfigurationProperty
newValue CanaryConfigurationProperty {Maybe (Value Double)
Maybe (Value Integer)
()
haddock_workaround_ :: CanaryConfigurationProperty -> ()
canaryBakeTimeInMinutes :: CanaryConfigurationProperty -> Maybe (Value Integer)
canaryPercent :: CanaryConfigurationProperty -> Maybe (Value Double)
haddock_workaround_ :: ()
canaryBakeTimeInMinutes :: Maybe (Value Integer)
canaryPercent :: Maybe (Value Double)
..}
    = CanaryConfigurationProperty
        {canaryPercent :: Maybe (Value Double)
canaryPercent = Value Double -> Maybe (Value Double)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "CanaryPercent" CanaryConfigurationProperty
Value Double
newValue, Maybe (Value Integer)
()
haddock_workaround_ :: ()
canaryBakeTimeInMinutes :: Maybe (Value Integer)
haddock_workaround_ :: ()
canaryBakeTimeInMinutes :: Maybe (Value Integer)
..}