module Stratosphere.AppMesh.Route.TcpRouteMatchProperty (
TcpRouteMatchProperty(..), mkTcpRouteMatchProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data TcpRouteMatchProperty
=
TcpRouteMatchProperty {TcpRouteMatchProperty -> ()
haddock_workaround_ :: (),
TcpRouteMatchProperty -> Maybe (Value Integer)
port :: (Prelude.Maybe (Value Prelude.Integer))}
deriving stock (TcpRouteMatchProperty -> TcpRouteMatchProperty -> Bool
(TcpRouteMatchProperty -> TcpRouteMatchProperty -> Bool)
-> (TcpRouteMatchProperty -> TcpRouteMatchProperty -> Bool)
-> Eq TcpRouteMatchProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: TcpRouteMatchProperty -> TcpRouteMatchProperty -> Bool
== :: TcpRouteMatchProperty -> TcpRouteMatchProperty -> Bool
$c/= :: TcpRouteMatchProperty -> TcpRouteMatchProperty -> Bool
/= :: TcpRouteMatchProperty -> TcpRouteMatchProperty -> Bool
Prelude.Eq, Int -> TcpRouteMatchProperty -> ShowS
[TcpRouteMatchProperty] -> ShowS
TcpRouteMatchProperty -> String
(Int -> TcpRouteMatchProperty -> ShowS)
-> (TcpRouteMatchProperty -> String)
-> ([TcpRouteMatchProperty] -> ShowS)
-> Show TcpRouteMatchProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> TcpRouteMatchProperty -> ShowS
showsPrec :: Int -> TcpRouteMatchProperty -> ShowS
$cshow :: TcpRouteMatchProperty -> String
show :: TcpRouteMatchProperty -> String
$cshowList :: [TcpRouteMatchProperty] -> ShowS
showList :: [TcpRouteMatchProperty] -> ShowS
Prelude.Show)
mkTcpRouteMatchProperty :: TcpRouteMatchProperty
mkTcpRouteMatchProperty :: TcpRouteMatchProperty
mkTcpRouteMatchProperty
= TcpRouteMatchProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), port :: Maybe (Value Integer)
port = Maybe (Value Integer)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties TcpRouteMatchProperty where
toResourceProperties :: TcpRouteMatchProperty -> ResourceProperties
toResourceProperties TcpRouteMatchProperty {Maybe (Value Integer)
()
haddock_workaround_ :: TcpRouteMatchProperty -> ()
port :: TcpRouteMatchProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
port :: Maybe (Value Integer)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::AppMesh::Route.TcpRouteMatch",
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
"Port" (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)
port])}
instance JSON.ToJSON TcpRouteMatchProperty where
toJSON :: TcpRouteMatchProperty -> Value
toJSON TcpRouteMatchProperty {Maybe (Value Integer)
()
haddock_workaround_ :: TcpRouteMatchProperty -> ()
port :: TcpRouteMatchProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
port :: Maybe (Value Integer)
..}
= [(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
"Port" (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)
port]))
instance Property "Port" TcpRouteMatchProperty where
type PropertyType "Port" TcpRouteMatchProperty = Value Prelude.Integer
set :: PropertyType "Port" TcpRouteMatchProperty
-> TcpRouteMatchProperty -> TcpRouteMatchProperty
set PropertyType "Port" TcpRouteMatchProperty
newValue TcpRouteMatchProperty {Maybe (Value Integer)
()
haddock_workaround_ :: TcpRouteMatchProperty -> ()
port :: TcpRouteMatchProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
port :: Maybe (Value Integer)
..}
= TcpRouteMatchProperty {port :: Maybe (Value Integer)
port = Value Integer -> Maybe (Value Integer)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Port" TcpRouteMatchProperty
Value Integer
newValue, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}