module Stratosphere.CodeDeploy.DeploymentConfig.TimeBasedCanaryProperty (
        TimeBasedCanaryProperty(..), mkTimeBasedCanaryProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data TimeBasedCanaryProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codedeploy-deploymentconfig-timebasedcanary.html>
    TimeBasedCanaryProperty {TimeBasedCanaryProperty -> ()
haddock_workaround_ :: (),
                             -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codedeploy-deploymentconfig-timebasedcanary.html#cfn-codedeploy-deploymentconfig-timebasedcanary-canaryinterval>
                             TimeBasedCanaryProperty -> Value Integer
canaryInterval :: (Value Prelude.Integer),
                             -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codedeploy-deploymentconfig-timebasedcanary.html#cfn-codedeploy-deploymentconfig-timebasedcanary-canarypercentage>
                             TimeBasedCanaryProperty -> Value Integer
canaryPercentage :: (Value Prelude.Integer)}
  deriving stock (TimeBasedCanaryProperty -> TimeBasedCanaryProperty -> Bool
(TimeBasedCanaryProperty -> TimeBasedCanaryProperty -> Bool)
-> (TimeBasedCanaryProperty -> TimeBasedCanaryProperty -> Bool)
-> Eq TimeBasedCanaryProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: TimeBasedCanaryProperty -> TimeBasedCanaryProperty -> Bool
== :: TimeBasedCanaryProperty -> TimeBasedCanaryProperty -> Bool
$c/= :: TimeBasedCanaryProperty -> TimeBasedCanaryProperty -> Bool
/= :: TimeBasedCanaryProperty -> TimeBasedCanaryProperty -> Bool
Prelude.Eq, Int -> TimeBasedCanaryProperty -> ShowS
[TimeBasedCanaryProperty] -> ShowS
TimeBasedCanaryProperty -> String
(Int -> TimeBasedCanaryProperty -> ShowS)
-> (TimeBasedCanaryProperty -> String)
-> ([TimeBasedCanaryProperty] -> ShowS)
-> Show TimeBasedCanaryProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> TimeBasedCanaryProperty -> ShowS
showsPrec :: Int -> TimeBasedCanaryProperty -> ShowS
$cshow :: TimeBasedCanaryProperty -> String
show :: TimeBasedCanaryProperty -> String
$cshowList :: [TimeBasedCanaryProperty] -> ShowS
showList :: [TimeBasedCanaryProperty] -> ShowS
Prelude.Show)
mkTimeBasedCanaryProperty ::
  Value Prelude.Integer
  -> Value Prelude.Integer -> TimeBasedCanaryProperty
mkTimeBasedCanaryProperty :: Value Integer -> Value Integer -> TimeBasedCanaryProperty
mkTimeBasedCanaryProperty Value Integer
canaryInterval Value Integer
canaryPercentage
  = TimeBasedCanaryProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), canaryInterval :: Value Integer
canaryInterval = Value Integer
canaryInterval,
       canaryPercentage :: Value Integer
canaryPercentage = Value Integer
canaryPercentage}
instance ToResourceProperties TimeBasedCanaryProperty where
  toResourceProperties :: TimeBasedCanaryProperty -> ResourceProperties
toResourceProperties TimeBasedCanaryProperty {()
Value Integer
haddock_workaround_ :: TimeBasedCanaryProperty -> ()
canaryInterval :: TimeBasedCanaryProperty -> Value Integer
canaryPercentage :: TimeBasedCanaryProperty -> Value Integer
haddock_workaround_ :: ()
canaryInterval :: Value Integer
canaryPercentage :: Value Integer
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::CodeDeploy::DeploymentConfig.TimeBasedCanary",
         supportsTags :: Bool
supportsTags = Bool
Prelude.False,
         properties :: Object
properties = [Key
"CanaryInterval" 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..= Value Integer
canaryInterval,
                       Key
"CanaryPercentage" 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..= Value Integer
canaryPercentage]}
instance JSON.ToJSON TimeBasedCanaryProperty where
  toJSON :: TimeBasedCanaryProperty -> Value
toJSON TimeBasedCanaryProperty {()
Value Integer
haddock_workaround_ :: TimeBasedCanaryProperty -> ()
canaryInterval :: TimeBasedCanaryProperty -> Value Integer
canaryPercentage :: TimeBasedCanaryProperty -> Value Integer
haddock_workaround_ :: ()
canaryInterval :: Value Integer
canaryPercentage :: Value Integer
..}
    = [(Key, Value)] -> Value
JSON.object
        [Key
"CanaryInterval" 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..= Value Integer
canaryInterval,
         Key
"CanaryPercentage" 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..= Value Integer
canaryPercentage]
instance Property "CanaryInterval" TimeBasedCanaryProperty where
  type PropertyType "CanaryInterval" TimeBasedCanaryProperty = Value Prelude.Integer
  set :: PropertyType "CanaryInterval" TimeBasedCanaryProperty
-> TimeBasedCanaryProperty -> TimeBasedCanaryProperty
set PropertyType "CanaryInterval" TimeBasedCanaryProperty
newValue TimeBasedCanaryProperty {()
Value Integer
haddock_workaround_ :: TimeBasedCanaryProperty -> ()
canaryInterval :: TimeBasedCanaryProperty -> Value Integer
canaryPercentage :: TimeBasedCanaryProperty -> Value Integer
haddock_workaround_ :: ()
canaryInterval :: Value Integer
canaryPercentage :: Value Integer
..}
    = TimeBasedCanaryProperty {canaryInterval :: Value Integer
canaryInterval = PropertyType "CanaryInterval" TimeBasedCanaryProperty
Value Integer
newValue, ()
Value Integer
haddock_workaround_ :: ()
canaryPercentage :: Value Integer
haddock_workaround_ :: ()
canaryPercentage :: Value Integer
..}
instance Property "CanaryPercentage" TimeBasedCanaryProperty where
  type PropertyType "CanaryPercentage" TimeBasedCanaryProperty = Value Prelude.Integer
  set :: PropertyType "CanaryPercentage" TimeBasedCanaryProperty
-> TimeBasedCanaryProperty -> TimeBasedCanaryProperty
set PropertyType "CanaryPercentage" TimeBasedCanaryProperty
newValue TimeBasedCanaryProperty {()
Value Integer
haddock_workaround_ :: TimeBasedCanaryProperty -> ()
canaryInterval :: TimeBasedCanaryProperty -> Value Integer
canaryPercentage :: TimeBasedCanaryProperty -> Value Integer
haddock_workaround_ :: ()
canaryInterval :: Value Integer
canaryPercentage :: Value Integer
..}
    = TimeBasedCanaryProperty {canaryPercentage :: Value Integer
canaryPercentage = PropertyType "CanaryPercentage" TimeBasedCanaryProperty
Value Integer
newValue, ()
Value Integer
haddock_workaround_ :: ()
canaryInterval :: Value Integer
haddock_workaround_ :: ()
canaryInterval :: Value Integer
..}