module Stratosphere.ApiGatewayV2.RoutingRule (
module Exports, RoutingRule(..), mkRoutingRule
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.ApiGatewayV2.RoutingRule.ActionProperty as Exports
import {-# SOURCE #-} Stratosphere.ApiGatewayV2.RoutingRule.ConditionProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data RoutingRule
=
RoutingRule {RoutingRule -> ()
haddock_workaround_ :: (),
RoutingRule -> [ActionProperty]
actions :: [ActionProperty],
RoutingRule -> [ConditionProperty]
conditions :: [ConditionProperty],
RoutingRule -> Value Text
domainNameArn :: (Value Prelude.Text),
RoutingRule -> Value Integer
priority :: (Value Prelude.Integer)}
deriving stock (RoutingRule -> RoutingRule -> Bool
(RoutingRule -> RoutingRule -> Bool)
-> (RoutingRule -> RoutingRule -> Bool) -> Eq RoutingRule
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: RoutingRule -> RoutingRule -> Bool
== :: RoutingRule -> RoutingRule -> Bool
$c/= :: RoutingRule -> RoutingRule -> Bool
/= :: RoutingRule -> RoutingRule -> Bool
Prelude.Eq, Int -> RoutingRule -> ShowS
[RoutingRule] -> ShowS
RoutingRule -> String
(Int -> RoutingRule -> ShowS)
-> (RoutingRule -> String)
-> ([RoutingRule] -> ShowS)
-> Show RoutingRule
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> RoutingRule -> ShowS
showsPrec :: Int -> RoutingRule -> ShowS
$cshow :: RoutingRule -> String
show :: RoutingRule -> String
$cshowList :: [RoutingRule] -> ShowS
showList :: [RoutingRule] -> ShowS
Prelude.Show)
mkRoutingRule ::
[ActionProperty]
-> [ConditionProperty]
-> Value Prelude.Text -> Value Prelude.Integer -> RoutingRule
mkRoutingRule :: [ActionProperty]
-> [ConditionProperty]
-> Value Text
-> Value Integer
-> RoutingRule
mkRoutingRule [ActionProperty]
actions [ConditionProperty]
conditions Value Text
domainNameArn Value Integer
priority
= RoutingRule
{haddock_workaround_ :: ()
haddock_workaround_ = (), actions :: [ActionProperty]
actions = [ActionProperty]
actions,
conditions :: [ConditionProperty]
conditions = [ConditionProperty]
conditions, domainNameArn :: Value Text
domainNameArn = Value Text
domainNameArn,
priority :: Value Integer
priority = Value Integer
priority}
instance ToResourceProperties RoutingRule where
toResourceProperties :: RoutingRule -> ResourceProperties
toResourceProperties RoutingRule {[ActionProperty]
[ConditionProperty]
()
Value Integer
Value Text
haddock_workaround_ :: RoutingRule -> ()
actions :: RoutingRule -> [ActionProperty]
conditions :: RoutingRule -> [ConditionProperty]
domainNameArn :: RoutingRule -> Value Text
priority :: RoutingRule -> Value Integer
haddock_workaround_ :: ()
actions :: [ActionProperty]
conditions :: [ConditionProperty]
domainNameArn :: Value Text
priority :: Value Integer
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::ApiGatewayV2::RoutingRule",
supportsTags :: Bool
supportsTags = Bool
Prelude.False,
properties :: Object
properties = [Key
"Actions" Key -> [ActionProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= [ActionProperty]
actions,
Key
"Conditions" Key -> [ConditionProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= [ConditionProperty]
conditions,
Key
"DomainNameArn" 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
domainNameArn,
Key
"Priority" 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
priority]}
instance JSON.ToJSON RoutingRule where
toJSON :: RoutingRule -> Value
toJSON RoutingRule {[ActionProperty]
[ConditionProperty]
()
Value Integer
Value Text
haddock_workaround_ :: RoutingRule -> ()
actions :: RoutingRule -> [ActionProperty]
conditions :: RoutingRule -> [ConditionProperty]
domainNameArn :: RoutingRule -> Value Text
priority :: RoutingRule -> Value Integer
haddock_workaround_ :: ()
actions :: [ActionProperty]
conditions :: [ConditionProperty]
domainNameArn :: Value Text
priority :: Value Integer
..}
= [(Key, Value)] -> Value
JSON.object
[Key
"Actions" Key -> [ActionProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= [ActionProperty]
actions, Key
"Conditions" Key -> [ConditionProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= [ConditionProperty]
conditions,
Key
"DomainNameArn" 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
domainNameArn, Key
"Priority" 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
priority]
instance Property "Actions" RoutingRule where
type PropertyType "Actions" RoutingRule = [ActionProperty]
set :: PropertyType "Actions" RoutingRule -> RoutingRule -> RoutingRule
set PropertyType "Actions" RoutingRule
newValue RoutingRule {[ActionProperty]
[ConditionProperty]
()
Value Integer
Value Text
haddock_workaround_ :: RoutingRule -> ()
actions :: RoutingRule -> [ActionProperty]
conditions :: RoutingRule -> [ConditionProperty]
domainNameArn :: RoutingRule -> Value Text
priority :: RoutingRule -> Value Integer
haddock_workaround_ :: ()
actions :: [ActionProperty]
conditions :: [ConditionProperty]
domainNameArn :: Value Text
priority :: Value Integer
..}
= RoutingRule {actions :: [ActionProperty]
actions = [ActionProperty]
PropertyType "Actions" RoutingRule
newValue, [ConditionProperty]
()
Value Integer
Value Text
haddock_workaround_ :: ()
conditions :: [ConditionProperty]
domainNameArn :: Value Text
priority :: Value Integer
haddock_workaround_ :: ()
conditions :: [ConditionProperty]
domainNameArn :: Value Text
priority :: Value Integer
..}
instance Property "Conditions" RoutingRule where
type PropertyType "Conditions" RoutingRule = [ConditionProperty]
set :: PropertyType "Conditions" RoutingRule -> RoutingRule -> RoutingRule
set PropertyType "Conditions" RoutingRule
newValue RoutingRule {[ActionProperty]
[ConditionProperty]
()
Value Integer
Value Text
haddock_workaround_ :: RoutingRule -> ()
actions :: RoutingRule -> [ActionProperty]
conditions :: RoutingRule -> [ConditionProperty]
domainNameArn :: RoutingRule -> Value Text
priority :: RoutingRule -> Value Integer
haddock_workaround_ :: ()
actions :: [ActionProperty]
conditions :: [ConditionProperty]
domainNameArn :: Value Text
priority :: Value Integer
..}
= RoutingRule {conditions :: [ConditionProperty]
conditions = [ConditionProperty]
PropertyType "Conditions" RoutingRule
newValue, [ActionProperty]
()
Value Integer
Value Text
haddock_workaround_ :: ()
actions :: [ActionProperty]
domainNameArn :: Value Text
priority :: Value Integer
haddock_workaround_ :: ()
actions :: [ActionProperty]
domainNameArn :: Value Text
priority :: Value Integer
..}
instance Property "DomainNameArn" RoutingRule where
type PropertyType "DomainNameArn" RoutingRule = Value Prelude.Text
set :: PropertyType "DomainNameArn" RoutingRule
-> RoutingRule -> RoutingRule
set PropertyType "DomainNameArn" RoutingRule
newValue RoutingRule {[ActionProperty]
[ConditionProperty]
()
Value Integer
Value Text
haddock_workaround_ :: RoutingRule -> ()
actions :: RoutingRule -> [ActionProperty]
conditions :: RoutingRule -> [ConditionProperty]
domainNameArn :: RoutingRule -> Value Text
priority :: RoutingRule -> Value Integer
haddock_workaround_ :: ()
actions :: [ActionProperty]
conditions :: [ConditionProperty]
domainNameArn :: Value Text
priority :: Value Integer
..}
= RoutingRule {domainNameArn :: Value Text
domainNameArn = PropertyType "DomainNameArn" RoutingRule
Value Text
newValue, [ActionProperty]
[ConditionProperty]
()
Value Integer
haddock_workaround_ :: ()
actions :: [ActionProperty]
conditions :: [ConditionProperty]
priority :: Value Integer
haddock_workaround_ :: ()
actions :: [ActionProperty]
conditions :: [ConditionProperty]
priority :: Value Integer
..}
instance Property "Priority" RoutingRule where
type PropertyType "Priority" RoutingRule = Value Prelude.Integer
set :: PropertyType "Priority" RoutingRule -> RoutingRule -> RoutingRule
set PropertyType "Priority" RoutingRule
newValue RoutingRule {[ActionProperty]
[ConditionProperty]
()
Value Integer
Value Text
haddock_workaround_ :: RoutingRule -> ()
actions :: RoutingRule -> [ActionProperty]
conditions :: RoutingRule -> [ConditionProperty]
domainNameArn :: RoutingRule -> Value Text
priority :: RoutingRule -> Value Integer
haddock_workaround_ :: ()
actions :: [ActionProperty]
conditions :: [ConditionProperty]
domainNameArn :: Value Text
priority :: Value Integer
..}
= RoutingRule {priority :: Value Integer
priority = PropertyType "Priority" RoutingRule
Value Integer
newValue, [ActionProperty]
[ConditionProperty]
()
Value Text
haddock_workaround_ :: ()
actions :: [ActionProperty]
conditions :: [ConditionProperty]
domainNameArn :: Value Text
haddock_workaround_ :: ()
actions :: [ActionProperty]
conditions :: [ConditionProperty]
domainNameArn :: Value Text
..}