module Stratosphere.AppMesh.Route.GrpcRouteMatchProperty (
        module Exports, GrpcRouteMatchProperty(..),
        mkGrpcRouteMatchProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.AppMesh.Route.GrpcRouteMetadataProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data GrpcRouteMatchProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-route-grpcroutematch.html>
    GrpcRouteMatchProperty {GrpcRouteMatchProperty -> ()
haddock_workaround_ :: (),
                            -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-route-grpcroutematch.html#cfn-appmesh-route-grpcroutematch-metadata>
                            GrpcRouteMatchProperty -> Maybe [GrpcRouteMetadataProperty]
metadata :: (Prelude.Maybe [GrpcRouteMetadataProperty]),
                            -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-route-grpcroutematch.html#cfn-appmesh-route-grpcroutematch-methodname>
                            GrpcRouteMatchProperty -> Maybe (Value Text)
methodName :: (Prelude.Maybe (Value Prelude.Text)),
                            -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-route-grpcroutematch.html#cfn-appmesh-route-grpcroutematch-port>
                            GrpcRouteMatchProperty -> Maybe (Value Integer)
port :: (Prelude.Maybe (Value Prelude.Integer)),
                            -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-route-grpcroutematch.html#cfn-appmesh-route-grpcroutematch-servicename>
                            GrpcRouteMatchProperty -> Maybe (Value Text)
serviceName :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (GrpcRouteMatchProperty -> GrpcRouteMatchProperty -> Bool
(GrpcRouteMatchProperty -> GrpcRouteMatchProperty -> Bool)
-> (GrpcRouteMatchProperty -> GrpcRouteMatchProperty -> Bool)
-> Eq GrpcRouteMatchProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: GrpcRouteMatchProperty -> GrpcRouteMatchProperty -> Bool
== :: GrpcRouteMatchProperty -> GrpcRouteMatchProperty -> Bool
$c/= :: GrpcRouteMatchProperty -> GrpcRouteMatchProperty -> Bool
/= :: GrpcRouteMatchProperty -> GrpcRouteMatchProperty -> Bool
Prelude.Eq, Int -> GrpcRouteMatchProperty -> ShowS
[GrpcRouteMatchProperty] -> ShowS
GrpcRouteMatchProperty -> String
(Int -> GrpcRouteMatchProperty -> ShowS)
-> (GrpcRouteMatchProperty -> String)
-> ([GrpcRouteMatchProperty] -> ShowS)
-> Show GrpcRouteMatchProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> GrpcRouteMatchProperty -> ShowS
showsPrec :: Int -> GrpcRouteMatchProperty -> ShowS
$cshow :: GrpcRouteMatchProperty -> String
show :: GrpcRouteMatchProperty -> String
$cshowList :: [GrpcRouteMatchProperty] -> ShowS
showList :: [GrpcRouteMatchProperty] -> ShowS
Prelude.Show)
mkGrpcRouteMatchProperty :: GrpcRouteMatchProperty
mkGrpcRouteMatchProperty :: GrpcRouteMatchProperty
mkGrpcRouteMatchProperty
  = GrpcRouteMatchProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), metadata :: Maybe [GrpcRouteMetadataProperty]
metadata = Maybe [GrpcRouteMetadataProperty]
forall a. Maybe a
Prelude.Nothing,
       methodName :: Maybe (Value Text)
methodName = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, port :: Maybe (Value Integer)
port = Maybe (Value Integer)
forall a. Maybe a
Prelude.Nothing,
       serviceName :: Maybe (Value Text)
serviceName = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties GrpcRouteMatchProperty where
  toResourceProperties :: GrpcRouteMatchProperty -> ResourceProperties
toResourceProperties GrpcRouteMatchProperty {Maybe [GrpcRouteMetadataProperty]
Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: GrpcRouteMatchProperty -> ()
metadata :: GrpcRouteMatchProperty -> Maybe [GrpcRouteMetadataProperty]
methodName :: GrpcRouteMatchProperty -> Maybe (Value Text)
port :: GrpcRouteMatchProperty -> Maybe (Value Integer)
serviceName :: GrpcRouteMatchProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
metadata :: Maybe [GrpcRouteMetadataProperty]
methodName :: Maybe (Value Text)
port :: Maybe (Value Integer)
serviceName :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::AppMesh::Route.GrpcRouteMatch",
         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 -> [GrpcRouteMetadataProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Metadata" ([GrpcRouteMetadataProperty] -> (Key, Value))
-> Maybe [GrpcRouteMetadataProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [GrpcRouteMetadataProperty]
metadata,
                            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..=) Key
"MethodName" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
methodName,
                            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,
                            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..=) Key
"ServiceName" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
serviceName])}
instance JSON.ToJSON GrpcRouteMatchProperty where
  toJSON :: GrpcRouteMatchProperty -> Value
toJSON GrpcRouteMatchProperty {Maybe [GrpcRouteMetadataProperty]
Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: GrpcRouteMatchProperty -> ()
metadata :: GrpcRouteMatchProperty -> Maybe [GrpcRouteMetadataProperty]
methodName :: GrpcRouteMatchProperty -> Maybe (Value Text)
port :: GrpcRouteMatchProperty -> Maybe (Value Integer)
serviceName :: GrpcRouteMatchProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
metadata :: Maybe [GrpcRouteMetadataProperty]
methodName :: Maybe (Value Text)
port :: Maybe (Value Integer)
serviceName :: Maybe (Value Text)
..}
    = [(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 -> [GrpcRouteMetadataProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Metadata" ([GrpcRouteMetadataProperty] -> (Key, Value))
-> Maybe [GrpcRouteMetadataProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [GrpcRouteMetadataProperty]
metadata,
               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..=) Key
"MethodName" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
methodName,
               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,
               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..=) Key
"ServiceName" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
serviceName]))
instance Property "Metadata" GrpcRouteMatchProperty where
  type PropertyType "Metadata" GrpcRouteMatchProperty = [GrpcRouteMetadataProperty]
  set :: PropertyType "Metadata" GrpcRouteMatchProperty
-> GrpcRouteMatchProperty -> GrpcRouteMatchProperty
set PropertyType "Metadata" GrpcRouteMatchProperty
newValue GrpcRouteMatchProperty {Maybe [GrpcRouteMetadataProperty]
Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: GrpcRouteMatchProperty -> ()
metadata :: GrpcRouteMatchProperty -> Maybe [GrpcRouteMetadataProperty]
methodName :: GrpcRouteMatchProperty -> Maybe (Value Text)
port :: GrpcRouteMatchProperty -> Maybe (Value Integer)
serviceName :: GrpcRouteMatchProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
metadata :: Maybe [GrpcRouteMetadataProperty]
methodName :: Maybe (Value Text)
port :: Maybe (Value Integer)
serviceName :: Maybe (Value Text)
..}
    = GrpcRouteMatchProperty {metadata :: Maybe [GrpcRouteMetadataProperty]
metadata = [GrpcRouteMetadataProperty] -> Maybe [GrpcRouteMetadataProperty]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [GrpcRouteMetadataProperty]
PropertyType "Metadata" GrpcRouteMatchProperty
newValue, Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: ()
methodName :: Maybe (Value Text)
port :: Maybe (Value Integer)
serviceName :: Maybe (Value Text)
haddock_workaround_ :: ()
methodName :: Maybe (Value Text)
port :: Maybe (Value Integer)
serviceName :: Maybe (Value Text)
..}
instance Property "MethodName" GrpcRouteMatchProperty where
  type PropertyType "MethodName" GrpcRouteMatchProperty = Value Prelude.Text
  set :: PropertyType "MethodName" GrpcRouteMatchProperty
-> GrpcRouteMatchProperty -> GrpcRouteMatchProperty
set PropertyType "MethodName" GrpcRouteMatchProperty
newValue GrpcRouteMatchProperty {Maybe [GrpcRouteMetadataProperty]
Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: GrpcRouteMatchProperty -> ()
metadata :: GrpcRouteMatchProperty -> Maybe [GrpcRouteMetadataProperty]
methodName :: GrpcRouteMatchProperty -> Maybe (Value Text)
port :: GrpcRouteMatchProperty -> Maybe (Value Integer)
serviceName :: GrpcRouteMatchProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
metadata :: Maybe [GrpcRouteMetadataProperty]
methodName :: Maybe (Value Text)
port :: Maybe (Value Integer)
serviceName :: Maybe (Value Text)
..}
    = GrpcRouteMatchProperty {methodName :: Maybe (Value Text)
methodName = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "MethodName" GrpcRouteMatchProperty
Value Text
newValue, Maybe [GrpcRouteMetadataProperty]
Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: ()
metadata :: Maybe [GrpcRouteMetadataProperty]
port :: Maybe (Value Integer)
serviceName :: Maybe (Value Text)
haddock_workaround_ :: ()
metadata :: Maybe [GrpcRouteMetadataProperty]
port :: Maybe (Value Integer)
serviceName :: Maybe (Value Text)
..}
instance Property "Port" GrpcRouteMatchProperty where
  type PropertyType "Port" GrpcRouteMatchProperty = Value Prelude.Integer
  set :: PropertyType "Port" GrpcRouteMatchProperty
-> GrpcRouteMatchProperty -> GrpcRouteMatchProperty
set PropertyType "Port" GrpcRouteMatchProperty
newValue GrpcRouteMatchProperty {Maybe [GrpcRouteMetadataProperty]
Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: GrpcRouteMatchProperty -> ()
metadata :: GrpcRouteMatchProperty -> Maybe [GrpcRouteMetadataProperty]
methodName :: GrpcRouteMatchProperty -> Maybe (Value Text)
port :: GrpcRouteMatchProperty -> Maybe (Value Integer)
serviceName :: GrpcRouteMatchProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
metadata :: Maybe [GrpcRouteMetadataProperty]
methodName :: Maybe (Value Text)
port :: Maybe (Value Integer)
serviceName :: Maybe (Value Text)
..}
    = GrpcRouteMatchProperty {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" GrpcRouteMatchProperty
Value Integer
newValue, Maybe [GrpcRouteMetadataProperty]
Maybe (Value Text)
()
haddock_workaround_ :: ()
metadata :: Maybe [GrpcRouteMetadataProperty]
methodName :: Maybe (Value Text)
serviceName :: Maybe (Value Text)
haddock_workaround_ :: ()
metadata :: Maybe [GrpcRouteMetadataProperty]
methodName :: Maybe (Value Text)
serviceName :: Maybe (Value Text)
..}
instance Property "ServiceName" GrpcRouteMatchProperty where
  type PropertyType "ServiceName" GrpcRouteMatchProperty = Value Prelude.Text
  set :: PropertyType "ServiceName" GrpcRouteMatchProperty
-> GrpcRouteMatchProperty -> GrpcRouteMatchProperty
set PropertyType "ServiceName" GrpcRouteMatchProperty
newValue GrpcRouteMatchProperty {Maybe [GrpcRouteMetadataProperty]
Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: GrpcRouteMatchProperty -> ()
metadata :: GrpcRouteMatchProperty -> Maybe [GrpcRouteMetadataProperty]
methodName :: GrpcRouteMatchProperty -> Maybe (Value Text)
port :: GrpcRouteMatchProperty -> Maybe (Value Integer)
serviceName :: GrpcRouteMatchProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
metadata :: Maybe [GrpcRouteMetadataProperty]
methodName :: Maybe (Value Text)
port :: Maybe (Value Integer)
serviceName :: Maybe (Value Text)
..}
    = GrpcRouteMatchProperty {serviceName :: Maybe (Value Text)
serviceName = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ServiceName" GrpcRouteMatchProperty
Value Text
newValue, Maybe [GrpcRouteMetadataProperty]
Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: ()
metadata :: Maybe [GrpcRouteMetadataProperty]
methodName :: Maybe (Value Text)
port :: Maybe (Value Integer)
haddock_workaround_ :: ()
metadata :: Maybe [GrpcRouteMetadataProperty]
methodName :: Maybe (Value Text)
port :: Maybe (Value Integer)
..}