module Stratosphere.AppMesh.Route.TcpRouteProperty (
module Exports, TcpRouteProperty(..), mkTcpRouteProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.AppMesh.Route.TcpRouteActionProperty as Exports
import {-# SOURCE #-} Stratosphere.AppMesh.Route.TcpRouteMatchProperty as Exports
import {-# SOURCE #-} Stratosphere.AppMesh.Route.TcpTimeoutProperty as Exports
import Stratosphere.ResourceProperties
data TcpRouteProperty
=
TcpRouteProperty {TcpRouteProperty -> ()
haddock_workaround_ :: (),
TcpRouteProperty -> TcpRouteActionProperty
action :: TcpRouteActionProperty,
TcpRouteProperty -> Maybe TcpRouteMatchProperty
match :: (Prelude.Maybe TcpRouteMatchProperty),
TcpRouteProperty -> Maybe TcpTimeoutProperty
timeout :: (Prelude.Maybe TcpTimeoutProperty)}
deriving stock (TcpRouteProperty -> TcpRouteProperty -> Bool
(TcpRouteProperty -> TcpRouteProperty -> Bool)
-> (TcpRouteProperty -> TcpRouteProperty -> Bool)
-> Eq TcpRouteProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: TcpRouteProperty -> TcpRouteProperty -> Bool
== :: TcpRouteProperty -> TcpRouteProperty -> Bool
$c/= :: TcpRouteProperty -> TcpRouteProperty -> Bool
/= :: TcpRouteProperty -> TcpRouteProperty -> Bool
Prelude.Eq, Int -> TcpRouteProperty -> ShowS
[TcpRouteProperty] -> ShowS
TcpRouteProperty -> String
(Int -> TcpRouteProperty -> ShowS)
-> (TcpRouteProperty -> String)
-> ([TcpRouteProperty] -> ShowS)
-> Show TcpRouteProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> TcpRouteProperty -> ShowS
showsPrec :: Int -> TcpRouteProperty -> ShowS
$cshow :: TcpRouteProperty -> String
show :: TcpRouteProperty -> String
$cshowList :: [TcpRouteProperty] -> ShowS
showList :: [TcpRouteProperty] -> ShowS
Prelude.Show)
mkTcpRouteProperty :: TcpRouteActionProperty -> TcpRouteProperty
mkTcpRouteProperty :: TcpRouteActionProperty -> TcpRouteProperty
mkTcpRouteProperty TcpRouteActionProperty
action
= TcpRouteProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), action :: TcpRouteActionProperty
action = TcpRouteActionProperty
action,
match :: Maybe TcpRouteMatchProperty
match = Maybe TcpRouteMatchProperty
forall a. Maybe a
Prelude.Nothing, timeout :: Maybe TcpTimeoutProperty
timeout = Maybe TcpTimeoutProperty
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties TcpRouteProperty where
toResourceProperties :: TcpRouteProperty -> ResourceProperties
toResourceProperties TcpRouteProperty {Maybe TcpRouteMatchProperty
Maybe TcpTimeoutProperty
()
TcpRouteActionProperty
haddock_workaround_ :: TcpRouteProperty -> ()
action :: TcpRouteProperty -> TcpRouteActionProperty
match :: TcpRouteProperty -> Maybe TcpRouteMatchProperty
timeout :: TcpRouteProperty -> Maybe TcpTimeoutProperty
haddock_workaround_ :: ()
action :: TcpRouteActionProperty
match :: Maybe TcpRouteMatchProperty
timeout :: Maybe TcpTimeoutProperty
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::AppMesh::Route.TcpRoute",
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
"Action" Key -> TcpRouteActionProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= TcpRouteActionProperty
action]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> TcpRouteMatchProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Match" (TcpRouteMatchProperty -> (Key, Value))
-> Maybe TcpRouteMatchProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe TcpRouteMatchProperty
match,
Key -> TcpTimeoutProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Timeout" (TcpTimeoutProperty -> (Key, Value))
-> Maybe TcpTimeoutProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe TcpTimeoutProperty
timeout]))}
instance JSON.ToJSON TcpRouteProperty where
toJSON :: TcpRouteProperty -> Value
toJSON TcpRouteProperty {Maybe TcpRouteMatchProperty
Maybe TcpTimeoutProperty
()
TcpRouteActionProperty
haddock_workaround_ :: TcpRouteProperty -> ()
action :: TcpRouteProperty -> TcpRouteActionProperty
match :: TcpRouteProperty -> Maybe TcpRouteMatchProperty
timeout :: TcpRouteProperty -> Maybe TcpTimeoutProperty
haddock_workaround_ :: ()
action :: TcpRouteActionProperty
match :: Maybe TcpRouteMatchProperty
timeout :: Maybe TcpTimeoutProperty
..}
= [(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
"Action" Key -> TcpRouteActionProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= TcpRouteActionProperty
action]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> TcpRouteMatchProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Match" (TcpRouteMatchProperty -> (Key, Value))
-> Maybe TcpRouteMatchProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe TcpRouteMatchProperty
match,
Key -> TcpTimeoutProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Timeout" (TcpTimeoutProperty -> (Key, Value))
-> Maybe TcpTimeoutProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe TcpTimeoutProperty
timeout])))
instance Property "Action" TcpRouteProperty where
type PropertyType "Action" TcpRouteProperty = TcpRouteActionProperty
set :: PropertyType "Action" TcpRouteProperty
-> TcpRouteProperty -> TcpRouteProperty
set PropertyType "Action" TcpRouteProperty
newValue TcpRouteProperty {Maybe TcpRouteMatchProperty
Maybe TcpTimeoutProperty
()
TcpRouteActionProperty
haddock_workaround_ :: TcpRouteProperty -> ()
action :: TcpRouteProperty -> TcpRouteActionProperty
match :: TcpRouteProperty -> Maybe TcpRouteMatchProperty
timeout :: TcpRouteProperty -> Maybe TcpTimeoutProperty
haddock_workaround_ :: ()
action :: TcpRouteActionProperty
match :: Maybe TcpRouteMatchProperty
timeout :: Maybe TcpTimeoutProperty
..}
= TcpRouteProperty {action :: TcpRouteActionProperty
action = PropertyType "Action" TcpRouteProperty
TcpRouteActionProperty
newValue, Maybe TcpRouteMatchProperty
Maybe TcpTimeoutProperty
()
haddock_workaround_ :: ()
match :: Maybe TcpRouteMatchProperty
timeout :: Maybe TcpTimeoutProperty
haddock_workaround_ :: ()
match :: Maybe TcpRouteMatchProperty
timeout :: Maybe TcpTimeoutProperty
..}
instance Property "Match" TcpRouteProperty where
type PropertyType "Match" TcpRouteProperty = TcpRouteMatchProperty
set :: PropertyType "Match" TcpRouteProperty
-> TcpRouteProperty -> TcpRouteProperty
set PropertyType "Match" TcpRouteProperty
newValue TcpRouteProperty {Maybe TcpRouteMatchProperty
Maybe TcpTimeoutProperty
()
TcpRouteActionProperty
haddock_workaround_ :: TcpRouteProperty -> ()
action :: TcpRouteProperty -> TcpRouteActionProperty
match :: TcpRouteProperty -> Maybe TcpRouteMatchProperty
timeout :: TcpRouteProperty -> Maybe TcpTimeoutProperty
haddock_workaround_ :: ()
action :: TcpRouteActionProperty
match :: Maybe TcpRouteMatchProperty
timeout :: Maybe TcpTimeoutProperty
..}
= TcpRouteProperty {match :: Maybe TcpRouteMatchProperty
match = TcpRouteMatchProperty -> Maybe TcpRouteMatchProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Match" TcpRouteProperty
TcpRouteMatchProperty
newValue, Maybe TcpTimeoutProperty
()
TcpRouteActionProperty
haddock_workaround_ :: ()
action :: TcpRouteActionProperty
timeout :: Maybe TcpTimeoutProperty
haddock_workaround_ :: ()
action :: TcpRouteActionProperty
timeout :: Maybe TcpTimeoutProperty
..}
instance Property "Timeout" TcpRouteProperty where
type PropertyType "Timeout" TcpRouteProperty = TcpTimeoutProperty
set :: PropertyType "Timeout" TcpRouteProperty
-> TcpRouteProperty -> TcpRouteProperty
set PropertyType "Timeout" TcpRouteProperty
newValue TcpRouteProperty {Maybe TcpRouteMatchProperty
Maybe TcpTimeoutProperty
()
TcpRouteActionProperty
haddock_workaround_ :: TcpRouteProperty -> ()
action :: TcpRouteProperty -> TcpRouteActionProperty
match :: TcpRouteProperty -> Maybe TcpRouteMatchProperty
timeout :: TcpRouteProperty -> Maybe TcpTimeoutProperty
haddock_workaround_ :: ()
action :: TcpRouteActionProperty
match :: Maybe TcpRouteMatchProperty
timeout :: Maybe TcpTimeoutProperty
..}
= TcpRouteProperty {timeout :: Maybe TcpTimeoutProperty
timeout = TcpTimeoutProperty -> Maybe TcpTimeoutProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Timeout" TcpRouteProperty
TcpTimeoutProperty
newValue, Maybe TcpRouteMatchProperty
()
TcpRouteActionProperty
haddock_workaround_ :: ()
action :: TcpRouteActionProperty
match :: Maybe TcpRouteMatchProperty
haddock_workaround_ :: ()
action :: TcpRouteActionProperty
match :: Maybe TcpRouteMatchProperty
..}