module Stratosphere.CodeDeploy.DeploymentConfig.TrafficRoutingConfigProperty (
        module Exports, TrafficRoutingConfigProperty(..),
        mkTrafficRoutingConfigProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.CodeDeploy.DeploymentConfig.TimeBasedCanaryProperty as Exports
import {-# SOURCE #-} Stratosphere.CodeDeploy.DeploymentConfig.TimeBasedLinearProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data TrafficRoutingConfigProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codedeploy-deploymentconfig-trafficroutingconfig.html>
    TrafficRoutingConfigProperty {TrafficRoutingConfigProperty -> ()
haddock_workaround_ :: (),
                                  -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codedeploy-deploymentconfig-trafficroutingconfig.html#cfn-codedeploy-deploymentconfig-trafficroutingconfig-timebasedcanary>
                                  TrafficRoutingConfigProperty -> Maybe TimeBasedCanaryProperty
timeBasedCanary :: (Prelude.Maybe TimeBasedCanaryProperty),
                                  -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codedeploy-deploymentconfig-trafficroutingconfig.html#cfn-codedeploy-deploymentconfig-trafficroutingconfig-timebasedlinear>
                                  TrafficRoutingConfigProperty -> Maybe TimeBasedLinearProperty
timeBasedLinear :: (Prelude.Maybe TimeBasedLinearProperty),
                                  -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codedeploy-deploymentconfig-trafficroutingconfig.html#cfn-codedeploy-deploymentconfig-trafficroutingconfig-type>
                                  TrafficRoutingConfigProperty -> Value Text
type' :: (Value Prelude.Text)}
  deriving stock (TrafficRoutingConfigProperty
-> TrafficRoutingConfigProperty -> Bool
(TrafficRoutingConfigProperty
 -> TrafficRoutingConfigProperty -> Bool)
-> (TrafficRoutingConfigProperty
    -> TrafficRoutingConfigProperty -> Bool)
-> Eq TrafficRoutingConfigProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: TrafficRoutingConfigProperty
-> TrafficRoutingConfigProperty -> Bool
== :: TrafficRoutingConfigProperty
-> TrafficRoutingConfigProperty -> Bool
$c/= :: TrafficRoutingConfigProperty
-> TrafficRoutingConfigProperty -> Bool
/= :: TrafficRoutingConfigProperty
-> TrafficRoutingConfigProperty -> Bool
Prelude.Eq, Int -> TrafficRoutingConfigProperty -> ShowS
[TrafficRoutingConfigProperty] -> ShowS
TrafficRoutingConfigProperty -> String
(Int -> TrafficRoutingConfigProperty -> ShowS)
-> (TrafficRoutingConfigProperty -> String)
-> ([TrafficRoutingConfigProperty] -> ShowS)
-> Show TrafficRoutingConfigProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> TrafficRoutingConfigProperty -> ShowS
showsPrec :: Int -> TrafficRoutingConfigProperty -> ShowS
$cshow :: TrafficRoutingConfigProperty -> String
show :: TrafficRoutingConfigProperty -> String
$cshowList :: [TrafficRoutingConfigProperty] -> ShowS
showList :: [TrafficRoutingConfigProperty] -> ShowS
Prelude.Show)
mkTrafficRoutingConfigProperty ::
  Value Prelude.Text -> TrafficRoutingConfigProperty
mkTrafficRoutingConfigProperty :: Value Text -> TrafficRoutingConfigProperty
mkTrafficRoutingConfigProperty Value Text
type'
  = TrafficRoutingConfigProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), type' :: Value Text
type' = Value Text
type',
       timeBasedCanary :: Maybe TimeBasedCanaryProperty
timeBasedCanary = Maybe TimeBasedCanaryProperty
forall a. Maybe a
Prelude.Nothing,
       timeBasedLinear :: Maybe TimeBasedLinearProperty
timeBasedLinear = Maybe TimeBasedLinearProperty
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties TrafficRoutingConfigProperty where
  toResourceProperties :: TrafficRoutingConfigProperty -> ResourceProperties
toResourceProperties TrafficRoutingConfigProperty {Maybe TimeBasedCanaryProperty
Maybe TimeBasedLinearProperty
()
Value Text
haddock_workaround_ :: TrafficRoutingConfigProperty -> ()
timeBasedCanary :: TrafficRoutingConfigProperty -> Maybe TimeBasedCanaryProperty
timeBasedLinear :: TrafficRoutingConfigProperty -> Maybe TimeBasedLinearProperty
type' :: TrafficRoutingConfigProperty -> Value Text
haddock_workaround_ :: ()
timeBasedCanary :: Maybe TimeBasedCanaryProperty
timeBasedLinear :: Maybe TimeBasedLinearProperty
type' :: Value Text
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::CodeDeploy::DeploymentConfig.TrafficRoutingConfig",
         supportsTags :: Bool
supportsTags = Bool
Prelude.False,
         properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
                        ([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
                           [Key
"Type" 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..= Value Text
type']
                           ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                              [Key -> TimeBasedCanaryProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"TimeBasedCanary" (TimeBasedCanaryProperty -> (Key, Value))
-> Maybe TimeBasedCanaryProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe TimeBasedCanaryProperty
timeBasedCanary,
                               Key -> TimeBasedLinearProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"TimeBasedLinear" (TimeBasedLinearProperty -> (Key, Value))
-> Maybe TimeBasedLinearProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe TimeBasedLinearProperty
timeBasedLinear]))}
instance JSON.ToJSON TrafficRoutingConfigProperty where
  toJSON :: TrafficRoutingConfigProperty -> Value
toJSON TrafficRoutingConfigProperty {Maybe TimeBasedCanaryProperty
Maybe TimeBasedLinearProperty
()
Value Text
haddock_workaround_ :: TrafficRoutingConfigProperty -> ()
timeBasedCanary :: TrafficRoutingConfigProperty -> Maybe TimeBasedCanaryProperty
timeBasedLinear :: TrafficRoutingConfigProperty -> Maybe TimeBasedLinearProperty
type' :: TrafficRoutingConfigProperty -> Value Text
haddock_workaround_ :: ()
timeBasedCanary :: Maybe TimeBasedCanaryProperty
timeBasedLinear :: Maybe TimeBasedLinearProperty
type' :: Value Text
..}
    = [(Key, Value)] -> Value
JSON.object
        ([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
           ([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
              [Key
"Type" 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..= Value Text
type']
              ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                 [Key -> TimeBasedCanaryProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"TimeBasedCanary" (TimeBasedCanaryProperty -> (Key, Value))
-> Maybe TimeBasedCanaryProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe TimeBasedCanaryProperty
timeBasedCanary,
                  Key -> TimeBasedLinearProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"TimeBasedLinear" (TimeBasedLinearProperty -> (Key, Value))
-> Maybe TimeBasedLinearProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe TimeBasedLinearProperty
timeBasedLinear])))
instance Property "TimeBasedCanary" TrafficRoutingConfigProperty where
  type PropertyType "TimeBasedCanary" TrafficRoutingConfigProperty = TimeBasedCanaryProperty
  set :: PropertyType "TimeBasedCanary" TrafficRoutingConfigProperty
-> TrafficRoutingConfigProperty -> TrafficRoutingConfigProperty
set PropertyType "TimeBasedCanary" TrafficRoutingConfigProperty
newValue TrafficRoutingConfigProperty {Maybe TimeBasedCanaryProperty
Maybe TimeBasedLinearProperty
()
Value Text
haddock_workaround_ :: TrafficRoutingConfigProperty -> ()
timeBasedCanary :: TrafficRoutingConfigProperty -> Maybe TimeBasedCanaryProperty
timeBasedLinear :: TrafficRoutingConfigProperty -> Maybe TimeBasedLinearProperty
type' :: TrafficRoutingConfigProperty -> Value Text
haddock_workaround_ :: ()
timeBasedCanary :: Maybe TimeBasedCanaryProperty
timeBasedLinear :: Maybe TimeBasedLinearProperty
type' :: Value Text
..}
    = TrafficRoutingConfigProperty
        {timeBasedCanary :: Maybe TimeBasedCanaryProperty
timeBasedCanary = TimeBasedCanaryProperty -> Maybe TimeBasedCanaryProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "TimeBasedCanary" TrafficRoutingConfigProperty
TimeBasedCanaryProperty
newValue, Maybe TimeBasedLinearProperty
()
Value Text
haddock_workaround_ :: ()
timeBasedLinear :: Maybe TimeBasedLinearProperty
type' :: Value Text
haddock_workaround_ :: ()
timeBasedLinear :: Maybe TimeBasedLinearProperty
type' :: Value Text
..}
instance Property "TimeBasedLinear" TrafficRoutingConfigProperty where
  type PropertyType "TimeBasedLinear" TrafficRoutingConfigProperty = TimeBasedLinearProperty
  set :: PropertyType "TimeBasedLinear" TrafficRoutingConfigProperty
-> TrafficRoutingConfigProperty -> TrafficRoutingConfigProperty
set PropertyType "TimeBasedLinear" TrafficRoutingConfigProperty
newValue TrafficRoutingConfigProperty {Maybe TimeBasedCanaryProperty
Maybe TimeBasedLinearProperty
()
Value Text
haddock_workaround_ :: TrafficRoutingConfigProperty -> ()
timeBasedCanary :: TrafficRoutingConfigProperty -> Maybe TimeBasedCanaryProperty
timeBasedLinear :: TrafficRoutingConfigProperty -> Maybe TimeBasedLinearProperty
type' :: TrafficRoutingConfigProperty -> Value Text
haddock_workaround_ :: ()
timeBasedCanary :: Maybe TimeBasedCanaryProperty
timeBasedLinear :: Maybe TimeBasedLinearProperty
type' :: Value Text
..}
    = TrafficRoutingConfigProperty
        {timeBasedLinear :: Maybe TimeBasedLinearProperty
timeBasedLinear = TimeBasedLinearProperty -> Maybe TimeBasedLinearProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "TimeBasedLinear" TrafficRoutingConfigProperty
TimeBasedLinearProperty
newValue, Maybe TimeBasedCanaryProperty
()
Value Text
haddock_workaround_ :: ()
timeBasedCanary :: Maybe TimeBasedCanaryProperty
type' :: Value Text
haddock_workaround_ :: ()
timeBasedCanary :: Maybe TimeBasedCanaryProperty
type' :: Value Text
..}
instance Property "Type" TrafficRoutingConfigProperty where
  type PropertyType "Type" TrafficRoutingConfigProperty = Value Prelude.Text
  set :: PropertyType "Type" TrafficRoutingConfigProperty
-> TrafficRoutingConfigProperty -> TrafficRoutingConfigProperty
set PropertyType "Type" TrafficRoutingConfigProperty
newValue TrafficRoutingConfigProperty {Maybe TimeBasedCanaryProperty
Maybe TimeBasedLinearProperty
()
Value Text
haddock_workaround_ :: TrafficRoutingConfigProperty -> ()
timeBasedCanary :: TrafficRoutingConfigProperty -> Maybe TimeBasedCanaryProperty
timeBasedLinear :: TrafficRoutingConfigProperty -> Maybe TimeBasedLinearProperty
type' :: TrafficRoutingConfigProperty -> Value Text
haddock_workaround_ :: ()
timeBasedCanary :: Maybe TimeBasedCanaryProperty
timeBasedLinear :: Maybe TimeBasedLinearProperty
type' :: Value Text
..}
    = TrafficRoutingConfigProperty {type' :: Value Text
type' = PropertyType "Type" TrafficRoutingConfigProperty
Value Text
newValue, Maybe TimeBasedCanaryProperty
Maybe TimeBasedLinearProperty
()
haddock_workaround_ :: ()
timeBasedCanary :: Maybe TimeBasedCanaryProperty
timeBasedLinear :: Maybe TimeBasedLinearProperty
haddock_workaround_ :: ()
timeBasedCanary :: Maybe TimeBasedCanaryProperty
timeBasedLinear :: Maybe TimeBasedLinearProperty
..}